Assignment 6: Matlab Code For BER Generation of QPSK System Over AWGN Channel
Assignment 6: Matlab Code For BER Generation of QPSK System Over AWGN Channel
Bipolar In-phase
݅ In-phase ଓƸ
stream
generation detection
1
Parameter Mathematical MATLAB
notation variable
In-phase bipolar data i I data
Quadrature bipolar data q Q data
Transmitted complex data s tx data
AWGN channel noise n n AWGN
Received signal r rec data
Decoded in-phase data î decod sig I
Decoded quadrature data q̂ decod sig Q
Number of error in in-phase data Ei Err1
Number of error in quadrature data Eq Err2
1. The random bipolar data samples (3 × 105 samples each) can be generated using the
following MATLAB command: (2 marks)
2. The baseband QPSK modulated signal s can be generated using the MATLAB com-
mand:(2 marks)
i tx data=I data
ii tx data=I data+Q data
iii tx data=Q data
iv tx data=I data+j*Q data
3. The complex AWGN signal, n with zero mean and variance equal to 0.5 can be gen-
erated using the following MATLAB command: (Hint: The MATLAB function randn
generates a zero mean Gaussian random variable with unit variance. AWGN noise for
QPSK signal is complex Gaussian (in-phase and quadrature components)).(2 marks)
2/7
4. The zero crossing detector at the receiver can be implemented using the following MAT-
LAB command: (2 marks)
5. The number of bit errors for in-phase transmission is calculated using the MATLAB
command:(2 marks)
6. The BER for QPSK transmission is calculated using the MATLAB command: (2
marks)
i BER=(Err1+Err2)/(3*105 )
ii BER=(Err1+Err2)
iii BER=(3*105 )/(Err1+Err2)
iv BER=(Err1+Err2)/(6*105 )
7. The BER plot versus Eb /N0 for the QPSK system is: (4 marks)
3/7
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-2 0 2 4 6 8 10 12
Eb/No in dB
ii
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-4 -2 0 2 4 6 8
Eb/No in dB
iii
4/7
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
4 6 8 10 12 14 16
Eb/No in dB
iv
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-2 0 2 4 6 8 10
Eb/No in dB
8. The BER plot versus SNR for the QPSK system is: (Hint: For QPSK, 2*Eb/No =
SNR) (4 marks)
5/7
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-2 0 2 4 6 8 10
SNR in dB
ii
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
4 6 8 10 12 14 16
SNR in dB
iii
6/7
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-4 -2 0 2 4 6 8
SNR in dB
iv
10 0
Prob. of Error
10 -1
10 -2
BER
10 -3
10 -4
-2 0 2 4 6 8 10 12
SNR in dB
7/7