=
= - - Crewe Tt eee w Vr COC VCTCSelCUSOCOCUCOCUSOCUWO
Bypertent 6 Spread Speeteum Modulation
Ady To Generate PN sequence ot length 21 andl build rhe Spread Spectrum modulation tir
CDMA system, Whory N is ardor of the Generator Polynomial,
sequence spread apeetruin (28-88) ayatem xprondy the baveband data by dlreetly
8 The baseband data pulses With a paoudosolye xequence that lv produwed by
Apsoudo-noise code generator, A xingte pulie ar xymbal ofthe PN waveltarnn ly galled a chip,
This system is one of the most Widely used ditwet Aequenee Lnplementations, Synchronized
data symbols, which may be information bits or binary channel code xymboly, are addled
in modtulo-2 fashion to the chips before being phave modulated, A coherent or differentially
coherent phasesshitt Keying (PSK) demodulation may be used in the receiver, The
received spread spectrum signal fora single user ean be represented ay
S(t) = FRmerncnemarr +o
Where m(t) is the data sequence, pl) is the PN spreading sequence, fe le the carrier
frequency, and B is the carrier phase angle at to, The data waveform iv a tine xequenee of
nonoverlapping rectangular pulses, each of which has an amplitude equal to} or st, Bagh
symbol in m(t) represents a data symbol and has duration Bach pulse in p(t) representa a
chip, is usually rectangular with an amplitude equal to +1 or «1, and hay a duration of Te,
‘The transitions of the data symbols and chips coincide such that the ratio Ts to ‘Te ty an
integer, If Wss is the bandwidth of Sss(t) and B is the bandwidth of m() cos(Qutet), the
spreading due to p(t) gives Wss >> B,
Vramseniiied Mipnat
Mannie oC) —nef HAG es
|% Direct Sequence Spread Spectrum
cle;
clear all;
close al
% Generating the bit pattern
DATA_pattem=randi({0,1],1,16);
figure(1);
stem(DATA_pattern);
axis([-1 16 -22));
title( Original Bit Sequence’);
rating the pseudo random bit pattern for spreading
‘M=4; “onumber of flipflops in LFSR{Linear Feedback Shift Registers)
N=24M-1; Yolength of PN sequence
Yoinitial states of LFSR
states;x (i) x2(i) x3(i) x4(i));
x1(i+1)=xor(x3(i),x4(i));
x2(i+1)=x1(i);
x3(i+1)=x2{i);
x4(i#1)=x3(i);
end
PN_sequence=(reshape((x4’),M,N))';
figure(2);
PN_sequence_chosen=PN_sequence(randi((1,N],1,1),:);
stem(PN_sequence_chosen);
axis({-1 16 -2 2));
title('Pscudorandom Bit Sequence’);
‘Newpattern=[];
for i=1:N+1
Newpattern=[Newpattern repmat(DATA_pattern(i),4,1)];
end
Newpattern=Newpattern’;
% XORing the DATA pattern with the PN sequence
dsss_bitsequence=[];
for i=1:N
dsss_bitsequence=[dsss_bitsequence xor(Newpattern(i,:),PN_sequence_chosen)};
end
figure(3);
stem(dsss_bitsequence);
axis({-I length(dsss_bitsequence) -2 2));
title(DSSS Bit Sequer
% Modula
dsss_sig=[];
t=[0:2*pi/256:2*pi-(pi/256)}; % Creating 256 samples for one cosine
"% Bpsk symbols
cl=cos(t);
c2=cos(t*+pi);
ing the DSSS Bit Sequeneefor k=I:length(dsss_bitsequence)
if dsss_bitsequence(1,k)==0
sigel;
else
sig=c2
end
dsss_sig=[dsss_sig sig];
end
figure(4);
plot({I:length(dsss_sig)],dsss_sig);
axis({-1 length(dsss_sig) -2 2]);
title(DSSS Signal’);
% Plotting the FFT of DSSS s
figure(S);
plot({1:length(dsss_sig)],abs(fit(dsss_sig)))
nal
Sample Output:
Original Bit Sequence2 4 16
0
Pseudorandom Bit Sequence
ae
6
DSSS Bit Sequence
50
40
30
20
10
15
1
05
e
2