Phase Shift Keying (PSK) Modulation Code in MATLAB

Binary Phase shift keying (BPSK) is one of the basic modulation schemes in which the phase of the carrier signal is varied or switched according to the input message pulses. When the modulation input is at logic 1, a finite number of cycles of a sinusoidal signal are transmitted and when the input is at logic 0, phase of the sinusoid is changed. We have discussed in detail about binary phase shift keying and applications of PSK modulation before.

Comments in green font color are given for better understanding of this matlab program for bpsk modulation.

Matlab Program for PSK / Matlab Code for PSK

clear all;
clc;
close all;
set(0,'defaultlinelinewidth',2);
A=5;
t=0:.001:1;
f1=input('Carrier Sine wave frequency =');
f2=input('Message frequency =');
x=A.*sin(2*pi*f1*t);%Carrier Sine
subplot(3,1,1);
plot(t,x);
xlabel('time');
ylabel('Amplitude');
title('Carrier');
grid on;
u=square(2*pi*f2*t);%Message signal
subplot(3,1,2);
plot(t,u);
xlabel('time');
ylabel('Amplitude');
title('Message Signal');
grid on;

v=x.*u;%Sine wave multiplied with square wave
subplot(3,1,3);
plot(t,v);
axis([0 1 -6 6]);
xlabel('t');
ylabel('y');
title('PSK');
grid on;

Generated PSK Signal

Carrier Sine wave frequency =10
Message frequency =2
Soon we will come up with MATLAB programs for other modulation processes like FSK. So stay tuned and follow us on facebook.
Ads


0 comments:

Post a Comment

 

Copyright © 2011 CircuitsGallery| ToS | Privacy Policy |

Contact Us | Write For Us | Advertise on Circuits Gallery | About Us