You are on page 1of 2

BPSK Modulation

IIn phase shift keying (PSK), the phase of a carrier is changed according to the
modulating waveform which is a digital signal. InBPSK, the transmitted signal is a
sinusoid of !ed amplitude. It has one !ed phase when the data is at one level
and when thedata is at the other level, phase is di"erent #y $%& degree.
MATLAB CODE:-
% Generation of BPSK waveforms
d=[1 0 1 1 0]; % Data sequence
b=2*d-1; % Convert unipolar to bipolar
T=1; % Bit duration
b=T!2; % T"is #ill result in unit a$plitude #ave%or$s
%c=&!T; % Carrier %requenc'
t=linspace(0)*)1000+; % discrete ti$e sequence bet#een 0 and **T (1000 sa$ples+
,=len-t"(t+; % ,u$ber o% sa$ples
,sb=,!len-t"(d+; % ,u$ber o% sa$ples per bit
dd=rep$at(d.)1),sb+; % replicate eac" bit ,sb ti$es
bb=rep$at(b.)1),sb+;
d#=dd.; % Transpose t"e ro#s and colu$ns
d#=d#(/+.; % Convert d# to a colu$n vector (colu$ b' colu$n+ and convert to a
ro# vector
b#=bb.;
b#=b#(/+.; % Data sequence sa$ples
#=sqrt(2*b!T+*cos(2*pi*%c*t+; % carrier #ave%or$
bps01#=b#2*#; % $odulated #ave%or$
% plottin- co$$ands %ollo#
subplot(3)1)1+;
plot(t)d#+; a4is([0 * -12* 12*]+
subplot(3)1)2+;
plot(t)b#+; a4is([0 * -12* 12*]+
subplot(3)1)&+;
plot(t)#+; a4is([0 * -12* 12*]+
subplot(3)1)3+;
plot(t)bps01#).2.+; a4is([0 * -12* 12*]+
4label(.ti$e.+

You might also like