Sei sulla pagina 1di 7

G. S.

Sanyal School of Telecommunications


Indian Institute of Technology Kharagpur

MOOC: Spread Spectrum Communications & Jamming

Assignment 7: Matlab code for BER generation of Spread Spectrum


QPSK system over AWGN Channel.
Due date: Max. marks: 20

Write a MATLAB code to generate Bit Error Rate (BER) vs Bit-Energy-to-Noise-Power-


Spectral-Density ratio (Eb /N0 ) and Signal-Power-to-Noise-Power ratio (SN R) plot for Spread
Spectrum Quadrature Phase Shift Keying (QPSK) system over Additive White Guassian
Noise (AWGN) channel. Assume system employes a Hadamard sequence of length 4 for
spreading data. Fig. 1 depicts a QPSK Spread Spectrum modulator and demodulator sys-
tem. Referring to the same, answer the following:

Bipolar In-phase
stream ݅ In-phase Ǥ෡݅
generation detection
‫ݏ‬s
‫ݏ‬ ‫ݎ‬ ‫ݎ‬d
Despread BER
Spread
calculation
Bipolar quadrature
Quadrature
stream generation
‫ݍ‬ ݊ detection
‫ݍ‬ො
Complex
operator, j

Figure 1: QPSK Spread Spectrum modulator modulator and demodulator system

1
Parameter Mathematical MATLAB
notation variable
In-phase bipolar data i I data
Quadrature bipolar data q Q data
Baseband complex data ss base sig
Spreading code c spread code
Transmit spread signal s tx data
AWGN channel noise n n AWGN
Received signal r rec data
Despread signal rd despread data
Decoded in-phase data î decod sig I
Decoded quadrature data q̂ decod sig Q

Table 1: Table of notations.

1. The spreading code can be generated using the sequence of MATLAB commands: (2
marks)

i. code mat=hadamard(4);
spread code=code mat(1,:);
ii. code mat=hadamard(4);
spread code=code mat(3,:);
iii. code mat=hadamard(4);
spread code=code mat(5,:);
iv. code mat=hadamard(4);
spread code=code mat(6,:);

2. The 3rd row of the Hadmard matrix, code mat, in question 1 is the code sequence: (2
marks)

i. 1 -1 1 -1
ii. 1 1 -1 -1
iii. 1 1 1 1
iv. 1 -1 -1 1

3. The MATLAB command to generate the spread signal: (2 marks)

i. tx data=base sig+spread code;


ii. tx data=xor(base sig, spread code);
iii. tx data=base sig.*spread code;
iv. tx data=kron(base sig, spread code);

2/7
4. The power of the spread QPSK data stream can be calculated using the following
MATLAB command: (2 marks)

i. sum(abs(tx data).∧2)/length(tx data);


ii. 0.5*sum(abs(tx data).∧2);
iii. sum(abs(tx data).∧2)/(2*length(tx data));
iv. sum(abs(tx data).∧2);

5. In comparison to the BER vs Eb/No plot of a conventional QPSK modulation scheme


(without spreading), the BER vs Eb/No plot for the Spread Spectrum QPSK scheme
is offset towards the left by: (2 marks)

i. 0 dB
ii. 3 dB
iii. 9 dB
iv. 6 dB

6. In comparison to the BER vs SNR plot of a conventional QPSK modulation scheme


(without spreading), the BER vs SNR plot for the Spread Spectrum QPSK scheme is
offset towards the left by: (2 marks)

i. 2 dB
ii. 9 dB
iii. 6 dB
iv. 3 dB

7. The Bit Error Rate plot versus Eb/No for the spread spectrum QPSK system is: (4
marks)

i.

3/7
10 0
Prob. of Error

10 -1

BER 10 -2

10 -3

10 -4

10 -5

10 -6
-2 0 2 4 6 8 10
Eb/No in dB

ii.

10 0
Prob. of Error

10 -1

10 -2
BER

10 -3

10 -4

10 -5

10 -6
-10 -8 -6 -4 -2 0
Eb/No in dB

iii.

4/7
10 0
Prob. of Error

10 -1

10 -2
BER

10 -3

10 -4

10 -5
-4 -2 0 2 4 6
Eb/No in dB

iv.

10 0
Prob. of Error

10 -1

10 -2
BER

10 -3

10 -4

10 -5

10 -6
-8 -6 -4 -2 0 2 4
Eb/No in dB

8. The Bit Error Rate plot versus SNR for the spread spectrum QPSK system is: (4
marks)

i.

5/7
10 -1
Prob. of Error

10 -2

BER

10 -3

10 -4

10 -5
2 3 4 5 6 7 8 9 10 11
SNR in dB

ii.

10 -1
Prob. of Error

10 -2
BER

10 -3

10 -4

10 -5
-2 -1 0 1 2 3 4 5 6 7
SNR in dB

iii.

6/7
10 -1
Prob. of Error

10 -2

BER

10 -3

10 -4

10 -5
1 2 3 4 5 6 7 8 9
SNR in dB

iv.

10 -1
Prob. of Error

10 -2
BER

10 -3

10 -4

10 -5
-3 -2 -1 0 1 2 3 4
SNR in dB

7/7

Potrebbero piacerti anche