Blogger Widgets

Sunday, 29 April 2012

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 fixed amplitude. It has one fixed phase when the data is at one level and when thedata is at the other level, phase is different by 180 degree. A Binary Phase Shift Keying(BPSK) signal can be defined as


 where b(t) = +1 or -1 fc  is the carrier frequency, and T is the bit duration. The signal has a power , so that , where A represents the peak value of sinusoidal carrier.

Thus the above equation can be written as

       =
         =
          , where  E=PT is the energy contained in the bit duration.      




                          Figure1.    shows  the BPSK signal for bit sequence 1001, 

 

where and 
 The received signal has the form  , where is the phase shift introduced by the channel. The signal b(t) is recovered in the demodulator. If synchronous demodulation is used, the waveform  is required at the demodulator. Carrier recovery scheme in the demodulator is shown in Fig 2.


Figure2:   BPSK modulator and demodulator

The recovered carrier is multiplied with the received signal to generate


 

Assuming that integral number of carrier cycles is present in bit duration   voltage and the bit synchronizer in Fig 2 knows the end of a bit interval and beginning of the next, the output  voltage  at the output of the integrate and dump circuit is:

MATLAB CODE:-
% ENGINEERSFUNDA
% Generation of BPSK waveforms

d=[1 0 1 1 0];     % Data sequence
b=2*d-1;           % Convert unipolar to bipolar
T=1;                  % Bit duration
Eb=T/2;             % This will result in unit amplitude waveforms
fc=3/T;              % Carrier frequency
t=linspace(0,5,1000);      % discrete time sequence between 0 and 5*T (1000 samples)
N=length(t);  % Number of samples
Nsb=N/length(d); % Number of samples per bit
dd=repmat(d',1,Nsb); % replicate each bit Nsb times
bb=repmat(b',1,Nsb);
dw=dd';             % Transpose the rows and columns
dw=dw(:)';          % Convert dw to a column vector (colum by column) and convert to a row vector
bw=bb';
bw=bw(:)';          % Data sequence samples
w=sqrt(2*Eb/T)*cos(2*pi*fc*t); % carrier waveform
bpsk_w=bw.*w;  % modulated waveform

% plotting commands follow

subplot(4,1,1);
plot(t,dw); axis([0 5 -1.5 1.5])

subplot(4,1,2);
plot(t,bw); axis([0 5 -1.5 1.5])

subplot(4,1,3);
plot(t,w); axis([0 5 -1.5 1.5])

subplot(4,1,4);
plot(t,bpsk_w,'.'); axis([0 5 -1.5 1.5])
xlabel('time')
 
 
FIGURE:
 
 

0 comments

Post a Comment