Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

VEERMATA JIJABAI TECHNOLOGICAL INSTITUTE

MUMBAI

DEPARTMENT OF ELECTRICAL ENGINEERING


THIRD YEAR B. TECH ELECTRONICS
DIGITAL COMMUNICATION LAB

EXPERIMENT NO. 5

Submitted by:
Nikhil Nichite (171060041) (Batch A)
EXPERIMENT NO 5

AIM: To perform demodulation of QPSK signal without noise.


APPARATUS: Scilab-6.0.2
THEORY:

For QPSK demodulator, a coherent demodulator is taken as an example. In


coherent detection technique the knowledge of the carrier frequency and phase
must be known to the receiver. This can be achieved by using a PLL (phase lock
loop) at the receiver. A PLL essentially locks to the incoming carrier frequency
and tracks the variations in frequency and phase. For the following simulation, a
PLL is not used but instead we simple use the output of the PLL. For
demonstration purposes we simply assume that the carrier phase recovery is
done and simply use the generated reference frequencies at the receiver
(cos(ωt)) and (sin(ωt)). In the demodulator the received signal is multiplied by a
reference frequency generator (cos(ωt)) and (sin(ωt)) on separate arms (in-phase
and quadrature arms). The multiplied output on each arm is integrated over one-
bit period using an integrator. A threshold detector makes a decision on each
integrated bit based on a threshold. Finally, the bits on the in-phase arm (even
bits) and on the quadrature arm (odd bits) are remapped to form detected
information stream.
Carrier Recovery Circuit:
A carrier recovery system is a circuit used to estimate and compensate for
frequency and phase differences between a received signal's carrier wave and
the receiver's local oscillator for the purpose of coherent demodulation.
In the transmitter of a communications carrier system, a carrier wave is
modulated by a baseband signal. At the receiver the baseband information is
extracted from the incoming modulated waveform.
In an ideal communications system, the carrier signal oscillators of the
transmitter and receiver would be perfectly matched in frequency and phase
thereby permitting perfect coherent demodulation of the modulated baseband
signal.
However, transmitters and receivers rarely share the same carrier oscillator.
Communications receiver systems are usually independent of transmitting
systems and contain their own oscillators with frequency and phase offsets and
instabilities. Doppler shift may also contribute to frequency differences in
mobile radio frequency communications systems.
All these frequency and phase variations must be estimated using information in
the received signal to reproduce or recover the carrier signal at the receiver and
permit coherent demodulation.

Carrier recovery Circuit used in demodulation of QPSK is shown below:


The input to the carrier recovery circuit is Vqpsk(t) and the output is sin and
cosine of (Wct)

Input Raise to Bandpass filter Frequency


4 circuitry 4 (Wc) Divider /4

Block 1: Input is raised to 4 to increase the strength of the modulated signal


Block 2: Bandpass filter is used to remove the dc component and unwanted
frequencies except those which are centred at 4Wc.
Block 3: Frequency divider circuit to regenerate the carrier frequency in terms
of sin and cosine.
CODE:
// QPSK Modulation and Demodulation without consideration of noise

clc;
clear all;
close;
data=[1 1 0 1 1 1 0 1 0 1]; //% information
//%Number_of_bit=1024;
//%data=randint(Number_of_bit,1);
figure(1)
plot(data,'r','linewidth',1)
title(' Information before Transmiting ');
xlabel("Time(sec)-->")
ylabel("Amplitude-->")
xgrid(1)
ax=gca();
ax.data_bounds=[0 -0.1;11 1.1]
//axis([ 0 11 0 1.5]);
/*data_NZR=2*data-1; //% Data Represented at NZR form for QPSK
modulation
s_p_data=matrix(data_NZR,2,length(data)/2); //% S/P convertion of data
br=10.^6; //%Let us transmission bit rate 1000000
f=br; //% minimum carrier frequency
T=1/br; //% bit duration
t=T/99:T/99:T; //% Time vector for one bit information

// QPSK modulation
y=[];
y_in=[];
y_qd=[];
for(i=1:length(data)/2)
y1=s_p_data(1,i)*cos(2*%pi*f*t); //% inphase component
y2=s_p_data(2,i)*sin(2*%pi*f*t) ;//% Quadrature component
y_in=[y_in y1]; //% inphase signal vector
y_qd=[y_qd y2]; //%quadrature signal vector
y=[y y1+y2]; //% modulated signal vector
end
Tx_sig=y; //% transmitting signal after modulation
tt=T/99:T/99:(T*length(data))/2;
figure(2)
subplot(3,1,1);
plot(tt,y_in,'r','linewidth',1)
title(' wave form for inphase component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt0');
subplot(3,1,2);
plot(tt,y_qd,'r','linewidth',1)
title(' wave form for Quadrature component in QPSK modulation ');
xlabel('time(sec)');
ylabel(' amplitude(volt0');
subplot(3,1,3);
plot(tt,Tx_sig,'r','linewidth',1)
title('QPSK modulated signal (sum of inphase and Quadrature phase signal)');
xlabel('time(sec)');
ylabel(' amplitude(volt0');

//QPSK demodulation
Rx_data=[];
Rx_sig=Tx_sig; //% Received signal
for(i=1:1:length(data)/2)
//%%XXXXXX inphase coherent dector XXXXXXX
Z_in=Rx_sig((i-1)*length(t)+1:i*length(t)).*cos(2*%pi*f*t);
//% above line indicat multiplication of received & inphase carred signal

Z_in_intg=(inttrap(t,Z_in))*(2/T);//% integration using trapizodial rull


if(Z_in_intg>0) //% Decession Maker
Rx_in_data=1;
else
Rx_in_data=0;
end

// Quadrature coherent detector


Z_qd=Rx_sig((i-1)*length(t)+1:i*length(t)).*sin(2*%pi*f*t);
//%above line indicat multiplication ofreceived & Quadphase carred signal

Z_qd_intg=(inttrap(t,Z_qd))*(2/T);//%integration using trapizodial rull


if (Z_qd_intg>0)//% Decession Maker
Rx_qd_data=1;
else
Rx_qd_data=0;
end
Rx_data=[Rx_data Rx_in_data Rx_qd_data]; //% Received Data vector
end
figure(3)
plot(Rx_data,'r','linewidth',1)
title('Information after Receiveing ');
ax=gca();
ax.data_bounds=[0 -0.1;11 1.1]
xgrid()
xlabel("Time(sec)-->")
ylabel("Amplitude-->")
//axis([ 0 11 0 1.5]), grid on;
OUTPUT:

a) Input message signal:

b). In-phase and Quadrature component of QPSK signal:


c). Recovered Signal:

CONCLUSION:

1. In this experiment we studied QPSK demodulation technique without


noise.
2. QPSK Demodulation, this can be achieved by using PLL (Phase Lock
Loop) at the receiver.
3. A PLL essentially locks to the incoming carrier frequency and tracks the
variations in frequency and phase.
4. The QPSK Demodulator uses two product demodulator circuits with local
oscillator, two band pass filters, two integrator circuits, and a 2-bit
parallel to serial converter.
5. The received signal is multiplied by a reference frequency generators
cos(ὼt) and sin(ὼt) on separate arms.
6. The multiplied output on each arm is integrated over one bit period using
an integrator. A threshold detector makes a decision on each integrated
bit based on a threshold.
7. Finally, The bits on the in-phase arm (Even bits) and on the quadrature
arm (Odd bits) are remapped to form detected information stream bit.

You might also like