You are on page 1of 3

Netaji Subhash Engineering College Department of Electronics and Communication Engg.

Design and Simulation Lab Code: MCE 192 M. Tech 1st Year 1st Semester 2011-12 EXPERIMENT NO: -07 NAME OF THE EXPERIMENT : Generate a QPSK Signal and observe time domain
characteristics.

Objective:- To generate a QPSK Signal and to observe time domain characteristics in MATLAB m.file as well as in simulink. Theory :

Code written in MATLAB:


r=100;%data rate n=16;%No of Bit T=r/n;%total time x=randint(1,n)%random bit m=rectpulse(x,10);%rectangular pulse representation p=length(x); i=x(1:2:p)%odd bit j=x(2:2:p)%even bit e=rectpulse(i,20); f=rectpulse(j,20); mpolar=e*2-1;%odd polar mpolar1=f*2-1;%even polar L=length(mpolar); N=length(mpolar1); t1=0:T/L:(L-1)*T/L; t2=0:T/N:(N-1)*T/N; f=1000;%frequency of carrier signal s=sin(2*pi*f*t1);%carrier signal 1 c=cos(2*pi*f*t2);%carrier signal 2 Se= mpolar.*sin(2*pi*f*t1);%modulated signal 1 So= mpolar1.*cos(2*pi*f*t2);%modulated signal 2 Sr=Se+So;%QPSK Signal subplot(411);plot(m); subplot(412);plot(mpolar); subplot(413);plot(mpolar1);

subplot(414);plot(Sr);

Simulink Model: QPSK Modulator Demodulator

QPSK Modulator

QPSK Demodulator

Output:

Conclusion:

You might also like