0% found this document useful (0 votes)
991 views6 pages

Experiment No.3 Phase Shift Keying Aim: To Generate and Demodulate Phase Shift Keyed (PSK) Signal Using OCTAVE Online

This document describes an experiment to generate and demodulate phase shift keyed (PSK) signals using MATLAB. It explains how PSK encoding works by changing the phase of a carrier signal to represent digital data. The experiment involves generating a BPSK signal by multiplying a carrier wave with a binary message signal, and demodulating the signal by correlating it with the carrier wave to recover the original data bits. Key steps include generating the carrier signal, binary message signal, BPSK modulated signal, and demodulating the signal using a correlator and decision device to recover the data bits. Graphs are plotted at each stage of the modulation and demodulation process.

Uploaded by

vanitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
991 views6 pages

Experiment No.3 Phase Shift Keying Aim: To Generate and Demodulate Phase Shift Keyed (PSK) Signal Using OCTAVE Online

This document describes an experiment to generate and demodulate phase shift keyed (PSK) signals using MATLAB. It explains how PSK encoding works by changing the phase of a carrier signal to represent digital data. The experiment involves generating a BPSK signal by multiplying a carrier wave with a binary message signal, and demodulating the signal by correlating it with the carrier wave to recover the original data bits. Key steps include generating the carrier signal, binary message signal, BPSK modulated signal, and demodulating the signal using a correlator and decision device to recover the data bits. Graphs are plotted at each stage of the modulation and demodulation process.

Uploaded by

vanitha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Experiment No.

PHASE SHIFT KEYING

Aim: To generate and demodulate phase shift keyed (PSK) signal using OCTAVE Online.

Generation of PSK signal

PSK is a digital modulation scheme that conveys data by changing, or modulating, the phase of a
reference signal (the carrier wave). PSK uses a finite number of phases, each assigned a unique
pattern of binary digits. Usually, each phase encodes an equal number of bits. Each pattern of bits
forms the symbol that is represented by the particular phase. The demodulator, which is designed
specifically for the symbol-set used by the modulator, determines the phase of the received signal
and maps it back to the symbol it represents, thus recovering the original data.

In a coherent binary PSK system, the pair of signal S 1(t) and S2 (t) used to represent binary
symbols 1 & 0 are defined by

S1 (t) = √2Eb/ Tb Cos 2πfct


S2 (t) =√2Eb/Tb (2πfct+π) = - √ 2Eb/Tb Cos 2πfct where 0 ≤ t< Tb and
Eb = Transmitted signed energy for bit
The carrier frequency fc =n/Tb for some fixed integer n.

Antipodal Signal:

The pair of sinusoidal waves that differ only in a relative phase shift of 180° are called antipodal
signals.

BPSK Transmitter

Product
Binary Wave Product BPSK signal
Modulator
(Polar form)

c1 (t) = √2/Tb cos 2πfct

1
The input binary symbols are represented in polar form with symbols 1 & 0 represented by
constant amplitude levels √Eb & -√Eb. This binary wave is multiplied by a sinusoidal carrier in a
product modulator. The result in a BSPK signal.

BSPK Receiver:
Decision
PSK signal X ∫ dt x device Choose ‘1’ if x > 0
Choose ‘0’ if x < 0
c1 (t).

The received BPSK signal is applied to a correlator which is also supplied with a locally generated
reference signal c1 (t). The correlated o/p is compared with a threshold of zero volts. If x> 0, the
receiver decides in favour of symbol 1. If x< 0, it decides in favour of symbol 0.

Algorithm

Initialization commands

PSK modulation

1. Generate carrier signal.


2. Start FOR loop
3. Generate binary data, message signal in polar form
4. Generate PSK modulated signal.
5. Plot message signal and PSK modulated signal.
6. End FOR loop.
7. Plot the binary data and carrier.

PSK demodulation

1. Start FOR loop


Perform correlation of PSK signal with carrier to get decision variable
2. Make decision to get demodulated binary data. If x>0, choose ‘1’ else choose ‘0’
3. Plot the demodulated binary data.
Program

clc;
clear all;
close all;

%GENERATE CARRIER SIGNAL


Tb=1;
t=0:Tb/100:Tb;
fc=2;
c=sqrt(2/Tb)*sin(2*pi*fc*t);

%generate message signal

N=8;
m=rand(1,N);
t1=0;t2=Tb ;
for i=1:N
t=[t1:.01:t2]
if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
else
m(i)=0;
m_s=-1*ones(1,length(t));
end
message(i,:)=m_s;

%product of carrier and message signal

bpsk_sig(i,:)=c.*m_s;

%Plot the message and BPSK modulated signal

subplot(5,1,2);
axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal(POLAR form)');
xlabel('t--->');
ylabel('m(t)');
grid on;
hold on;
subplot(5,1,4);
plot(t,bpsk_sig(i,:));
title('BPSK signal');
xlabel('t--->');
ylabel('s(t)');
grid on;
hold on;
t1=t1+1.01; t2=t2+1.01;
end
hold off

%plot the input binary data and carrier signal

subplot(5,1,1);stem(m);
title('binary data bits');
xlabel('n--->');
ylabel('b(n)');
grid on;
subplot(5,1,3);
plot(t,c);
title('carrier signal');
xlabel('t--->');
ylabel('c(t)');
grid on;

% PSK Demodulation

t1=0;t2=Tb;
for i=1:N
t=[t1:.01:t2]

%correlator

x=sum(c.*bpsk_sig(i,:));

%decision device

if x>0
demod(i)=1;
else
demod(i)=0;
end
t1=t1+1.01;
t2=t2+1.01;
end

%plot the demodulated data bits

subplot(5,1,5);
stem(demod);
title('demodulated data');
xlabel('n--->');
ylabel('b(n)');
grid on
Modal Graphs

Result

The program for PSK modulation and demodulation has been simulated and necessary graphs are
plotted.

You might also like