5
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 -40 -20 0 20 40 60 80 100 Spectrum of Input binary data 0 1000 2000 3000 4000 5000 0 50 100 Spectrum of I-channel data 0 1000 2000 3000 4000 5000 0 50 100 Spectrum of Q-channel data 0 0.5 1 1.5 2 2.5 x 10 4 -20 0 20 40 60 80 100 120 140 Spectrum of I-channel data after zero insertion 0 0.5 1 1.5 2 2.5 x 10 4 -20 0 20 40 60 80 100 120 140 Spectrum of Q-channel data after zero insertion 200 220 240 260 280 300 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 Time domain response of pulse shaping filter 0 100 200 300 400 500 -350 -300 -250 -200 -150 -100 -50 0 50 Transfer function of pulse shaping filter 0 0.5 1 1.5 2 2.5 x 10 4 -250 -200 -150 -100 -50 0 50 100 150 Spectrum of I-channel after pulse shaping filter 0 0.5 1 1.5 2 2.5 x 10 4 -250 -200 -150 -100 -50 0 50 100 150 Spectrum of Q-channel after pulse shaping filter

of QPSK transmitter and receiv er W SungW and Hw A ...read.pudn.com/downloads101/sourcecode/mobile/j2me/412428/time sy… · unications QAM QPSK Mo d eling I Intr oduction T HE increasing

Embed Size (px)

Citation preview

Modeling of QPSK transmitter and receiverusing MATLABy

Chang�Gene Woo�� Sung�Wook Jung� � and Hwan�Mok Jung�

Abstract� This report describes fundamentals of QPSKand its implementation� And functional model of the blockhas developed using MATLAB�

Keywords�Digital Communications� QAM� QPSK� Mod�

eling�

I� Introduction

THE increasing demand for digital transmission chan�nels has led to the investigation of spectrally e�cient

modulation techniques which is to maximize bandwidth ef��ciency and thus help ameliorate the spectral congestionproblem�Quadrature phase shift keying�QPSK� modulation is a

well�known technique for achieving bandwidth reduction�And this report focused on designing� and modeling of aQPSK transmitter and receiver� Design speci�cations aregiven as follows�

� Symbol rate� Msps� Given channel bandwidth� MHz� Pulse shaping �lter� root raised cosine �lter� Sample rate� fs � ��ts � MHz

II� Transmitter Design

Trasmitter parts of the MATLAB script are consists of�White random binary source generator�� �Serial to Parallelconverter�� �Zero Insertion� and �Pulse Shaping Filter��

0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000−40

−20

0

20

40

60

80

100Spectrum of Input binary data

Fig� �� Spectrum of Input random binary data

Spectrum of random input binay data is shown as �gure

y MATLAB is a registered trademark of The MathWorks� Inc�

Report submitted May �� ���� �LATEX�� used��� Chang�Gene Woo �������� Sung�Wook Jung ���� �� and

Hwan�Mok Jung ���� � are the members of the ASIC Lab��Kyungpook National University�

�� And Spectrum of I�� Q�channel data with data after zeroinsertion is plotted in �gure �

0 1000 2000 3000 4000 5000

0

50

100

Spectrum of I−channel data

0 1000 2000 3000 4000 5000

0

50

100

Spectrum of Q−channel data

0 0.5 1 1.5 2 2.5

x 104

−20

0

20

40

60

80

100

120

140Spectrum of I−channel data after zero insertion

0 0.5 1 1.5 2 2.5

x 104

−20

0

20

40

60

80

100

120

140Spectrum of Q−channel data after zero insertion

Fig� �� Spectrum of I�� Q�channel data�

The design of raised cosine �lter is mainly focused on�� the roll�o� factor also known as the normalized excessbandwidth which is given by � � �f

fxand can take any

value between � and �� According to the speci�cationgiven� the � is �� But we de�ne the roll�o� factor�rf�� as ��� for the su�cient margin� After the �Mapping� and�Filtering�� the data are IF modulated by I� Q mixer respec�tively� I�channel data are in�phase mixed with IF carrierand Q�channel data are quadrature mixed�

200 220 240 260 280 300−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time domain response of pulse shaping filter

0 100 200 300 400 500−350

−300

−250

−200

−150

−100

−50

0

50Transfer function of pulse shaping filter

0 0.5 1 1.5 2 2.5

x 104

−250

−200

−150

−100

−50

0

50

100

150Spectrum of I−channel after pulse shaping filter

0 0.5 1 1.5 2 2.5

x 104

−250

−200

−150

−100

−50

0

50

100

150Spectrum of Q−channel after pulse shaping filter

Fig� �� Time domain response of pulse shaping �lter�

III� Receiver Design

Since QPSK systems require a fully coherent or di�eren�tially coherent detection scheme� assuming that the amount

0 0.5 1 1.5 2 2.5

x 104

−250

−200

−150

−100

−50

0

50

100

150Spectrum of I−channel after modulation

0 0.5 1 1.5 2 2.5

x 104

−250

−200

−150

−100

−50

0

50

100

150Spectrum of Q−channel after modulation

Fig� �� Spectrum of I�� Q�channel data after modulation

400 500 600 700 800

−1

−0.5

0

0.5

1

I channel after pulse shaping filter

400 500 600 700 800

−1

−0.5

0

0.5

1

Q channel after pulse shaping filter

400 500 600 700 800

−1

−0.5

0

0.5

1

I channel after modulation

400 500 600 700 800

−1

−0.5

0

0.5

1

Q channel after modulation

Fig� � Waveform data after pulse shaping �lter and modulator

of phase shift at the carrier and the exact sampling timeare known�

IV� Conclusions

In this report� QPSK transmitter and receiver model hasdeveloped using MATLAB� Full script �le is attached inSupplement section�

References

��� Bernard Sklar� Digital Communications� Fundamentals and Ap�plications� Prentice Hall� �����

��� John G� Proakis� Digital Communications� McGraw�Hill� ������� Ian A� Glover and Peter M� Grant� Digital Communications�

Prentice�Hall� �����

0 0.5 1 1.5 2 2.5

x 104

−200

−150

−100

−50

0

50

100

150Spectrum of I−channel after demodulation

0 0.5 1 1.5 2 2.5

x 104

−200

−150

−100

−50

0

50

100

150Spectrum of Q−channel after demodulation

0 0.5 1 1.5 2 2.5

x 104

−400

−300

−200

−100

0

100

200Spectrum of I−channel after matched filter

0 0.5 1 1.5 2 2.5

x 104

−400

−300

−200

−100

0

100

200Spectrum of Q−channel after matched filter

Fig� �� Spectrum of I�� Q�channel data after demodulation�

0 1000 2000 3000 4000 5000

0

50

100

150Spectrum of I−channel after sampler

0 1000 2000 3000 4000 5000

0

50

100

150Spectrum of Q−channel after sampler

0 1000 2000 3000 4000 5000

0

50

100

150Spectrum of I−channel after Decision threshold

0 1000 2000 3000 4000 5000

0

50

100

150Spectrum of Q−channel after Decision threshold

Fig� � Spectrum of I�� Q�channel data after sampler�

Supplement

� MATLAB script for System Simulation Homework ��

clear

� Carrier frequency for modulation and

� demodulation

Fc � �e��

� QPSK transmitter

data � ����� � Input binary data of �MHz

randdata � randn�� data �

for i ���data

if randdatai �� ���

inputi � ��

else

inputi � ��

end

end

−1.5 −1 −0.5 0 0.5 1 1.5

−1.5

−1

−0.5

0

0.5

1

1.5

Constellation of matched filter output

Fig� �� Constellation of matched �lter output

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Constellation of sampler

Fig� �� Constellation of sampler

� Series to Parallel

for i � ��data

if remi� � �� �

if inputi �� �

Ii � ��

Ii � � � ��

else

Ii � ���

Ii � � � ���

end

else

if inputi �� �

Qi � � � ��

Qi � ��

else

Qi � � � ���

Qi � ���

end

end

end

� Zero insertion

zero � �� � Sampling rate is ��MHz

for i � ��zero�data

if remi� zero �� �

0 500 1000 1500 2000 2500 3000 3500 4000 4500 50000

20

40

60

80

100

120Spectrum of final received binary data

Fig� �� Spectrum of received binary data

Izeroi � Ifixi � � � zero � � �

Qzeroi � Qfixi � � � zero � � �

else

Izeroi � ��

Qzeroi � ��

end

end

� Pulse shaping filter

NT � ���

N � ��zero�NT�

Fs � ��e��

rf � ����

psf � rcosfirrf� NT� zero� Fs� �sqrt� �

Ipulse � convIzero� psf �

Qpulse � convQzero� psf �

� Modulation

for i � ��zero�data�N

ti � i � � � Fc � zero �

Imodi �Ipulsei ��sqrt� �cos��pi�Fc�ti �

Qmodi �Qpulsei ���sqrt� �sin��pi�Fc�ti �

end

sum � Imod � Qmod�

� QPSK Receiver

� Demodulation

for i � ��zero�data�N

Idemi �sumi ��sqrt� �cos��pi�Fc�ti �

Qdemi �sumi ���sqrt� �sin��pi�Fc�ti �

end

� Matched filter

mtf � rcosfirrf� NT� zero� Fs� �sqrt� �

Imat � convIdem� mtf �

Qmat � convQdem� mtf �

� Data selection

for i � ��zero�data

Iseli � Imati�N �

Qseli � Qmati�N �

end

� Sampler

for i � ��data

Isami � Iseli�� �zero�� �

Qsami � Qseli�� �zero�� �

end

� Decision threshold

threshold � ����

for i � ��data

if Isami �� threshold

Ifinali � ��

else

Ifinali � ���

end

if Qsami �� threshold

Qfinali � ��

else

Qfinali � ���

end

end

� Parallel to Series

for i � ��data

if remi� � �� �

if Ifinali �� �

finali � ��

else

finali � ��

end

else

if Qfinali �� �

finali � ��

else

finali � ��

end

end

end

figure�

plot���logabsfftinput

axis�� data ��� ����

grid

title�Spectrum of Input binary data�

figure�

subplot���

plot���logabsfftI

axis�� data ��� ����

grid

title�Spectrum of I�channel data�

subplot���

plot���logabsfftQ

axis�� data ��� ����

grid

title�Spectrum of Q�channel data�

subplot���

plot���logabsfftIzero

axis�� zero�data ��� ����

grid

title�Spectrum of I�channel data after

zero insertion�

subplot���

plot���logabsfftQzero

axis�� zero�data ��� ����

grid

title�Spectrum of Q�channel data after

zero insertion�

figure�

subplot���

plotpsf

axis���� ��� ���� ����

grid

title�Time domain response of

pulse shaping filter�

subplot���

plot���logabsfftpsf

axis�� N ���� ���

grid

title�Transfer function of

pulse shaping filter�

subplot���

plot���logabsfftIpulse

axis�� zero�data�N ���� ����

grid

title�Spectrum of I�channel after

pulse shaping filter�

subplot���

plot���logabsfftQpulse

axis�� zero�data�N ���� ����

grid

title�Spectrum of Q�channel after

pulse shaping filter�

figure�

subplot���

plot���logabsfftImod

axis�� zero�data�N ���� ����

grid

title�Spectrum of I�channel after modulation�

subplot���

plot���logabsfftQmod

axis�� zero�data�N ���� ����

grid

title�Spectrum of Q�channel after modulation�

figure�

subplot���

plot���logabsfftIdem

axis�� zero�data�N ���� ����

grid

title�Spectrum of I�channel after demodulation�

subplot���

plot���logabsfftQdem

axis�� zero�data�N ���� ����

grid

title�Spectrum of Q�channel after demodulation�

subplot���

plot���logabsfftImat

axis�� zero�data ���� ����

grid

title�Spectrum of I�channel after

matched filter�

subplot���

plot���logabsfftQmat

axis�� zero�data ���� ����

grid

title�Spectrum of Q�channel after

matched filter�

figure�

subplot���

plot���logabsfftIsam

axis�� data ��� ����

grid

title�Spectrum of I�channel after sampler�

subplot���

plot���logabsfftQsam

axis�� data ��� ����

grid

title�Spectrum of Q�channel after sampler�

subplot���

plot���logabsfftIfinal

axis�� data ��� ����

grid

title�Spectrum of I�channel after

Decision threshold�

subplot���

plot���logabsfftQfinal

axis�� data ��� ����

grid

title�Spectrum of Q�channel after

Decision threshold�

figure�

plotIsel� Qsel

axis����� ��� ���� ����

grid

title�Constellation of matched filter output�

figure�

plotIsam� Qsam� �X�

axis����� ��� ���� ����

grid

title�Constellation of sampler�

figure�

plot���logabsfftfinal

axis�� data � ����

grid

title�Spectrum of final received binary data�