# BER Vs Eb/N0 for QPSK modulation over AWGN

(3 votes, average: 5.00 out of 5)

This post is a part of the ebook :  Digital Modulations using Matlab: build simulation models from scratch – by Mathuranathan Viswanathan

In the previous article we saw about how QPSK modulation and demodulation can be done. This concept is extended further to simulate the performance of QPSK modulation technique over an AWGN.

### Transmitter:

For the QPSK modulation , a series of binary input message bits are generated. In QPSK, a symbol contains 2 bits. The generated binary bits are combined in terms of two bits and QPSK symbols are generated. From the constellation of QPSK modulation the symbol ’00’ is represented by 1, ’01’ by j (90 degrees phase rotation), ’10’ by -1 (180 degrees phase rotation) and ’11’ by -j (270 degrees phase rotation). In pi/4 QPSK, these phase rotations are offset by 45 degrees. So the effective representation of symbols in pi/4-QPSK is ’00’=1+j (45 degrees), ’01’=-1+j (135 degrees), ’10’ = -1-j (225 degrees) and ’11’= 1-j (315 degrees).

Here we are simulating a pi/4 QPSK system.Once the symbols are mapped, the power of the QPSK modulated signal need to be normalized by (\frac{1}{\sqrt{2}}).

### AWGN channel:

For QPSK modulation the channel can be modeled as

$$y=ax+n$$

where y is the received signal at the input of the QPSK receiver, x is the complex modulated signal transmitted through the channel , a is a channel amplitude scaling factor for the transmitted signal usually 1. ‘n’ is the Additive Gaussian White Noise random random variable with zero mean and variance (\sigma^2 ). For AWGN the noise variance in terms of noise power spectral density (N_0) is given by,

$$\sigma^{2}=\frac{N_{0}}{2}$$

For M-PSK modulation schemes including BPSK, the symbol energy is given by

$$E_s = R_m R_c E_b$$

where (E_s) =Symbol energy per modulated bit ((x)), (Rm = log_2(M)) , (for BPSK M=2, QPSK M=4, 16 QAM M=16 etc..,). (R_c) is the code rate of the system if a coding scheme is used. In our case since no coding scheme is used Rc = 1. Eb is the Energy per information bit.

Assuming (E_s=1) for BPSK (Symbol energy normalized to 1) (\frac{E_b}{N_0}) can be represented as (using above equations),

$$\frac{E_b}{N_0} = \frac{E_s}{R_m R_c N_0}$$

$$\frac{E_b}{N_0} = \frac{E_s}{R_m R_c N_0} = \frac{E_s}{R_m R_c 2 \sigma^{2}} = \frac{1}{2 R_m R_c \sigma^{2}}$$

From the above equation the noise variance for the given (\frac{E_b}{N_0}) can be calculated as

$$\sigma^{2} = \left( 2 R_m R_c \frac{E_b}{N_0}\right) ^{-1}$$

For the channel model randn function in Matlab is used to generate the noise term. This function generates noise with unit variance and zero mean. In order to generate a noise with sigma (\sigma) for the given (\frac{E_b}{N_0}) ratio , use the above equation , find (\sigma), multiply the ‘randn’ generated noise with this sigma , add this final noise term with the transmitted signal to get the received signal. For a pi/4 QPSK system, since the modulated signal is in complex form, the noise should also be also in complex form.

QPSK receiver employs two threshold detectors that detect real(inphase arm) and imaginary part (quadrature arm). The detected signals are sent through a parallel to serial converter (achieved by “reshape” function in MATLAB).

The Eb/N0 Vs BER Curve for QPSK and BPSK are identical. This is because, QPSK actually consists of two orthogonal BPSK systems. Since the two individual BPSK systems are orthogonal, they don’t interfere with each other. That is why the BER curved for QPSK and BPSK are identical.

### Matlab Code:

Check this book for full Matlab code.
Digital Modulations using Matlab: build simulation models from scratch – by Mathuranathan Viswanathan

### Recommended Books

• Thath Sara Nee

Hi, Thanks for the explanation. But I have a question. Since you have normalized the symbol to have a variance of 1. But the random noise generated have variance of 2 before multiplying with sigma^2 . As I see here noise variance is 2*sigma^2 .
Can you clarify this

• Lou Nigra

Nice work, but FYI: There’s a typo in your plot. The label for the vertical axis is incorrect. It is stated as BER in dB (=10*log(BER), but should be log(BER). Interpreting the vertical axis in dB as labeled, the BER at 10 dB Eb/No would be 0.29 when it is actually 4*10^-6.

• Thanks for spotting the mistake. I will correct it.

• Pingback: Chi-Squared Distribution | GaussianWaves()

• Pingback: Channel Coding | GaussianWaves()

• Pingback: Channel Capacity | GaussianWaves()

• yes, i understand now.