0% found this document useful (0 votes)
113 views2 pages

Exp - No.4 DSSS

This document describes direct sequence spread spectrum (DSSS) modulation and demodulation. It generates a random bit pattern, which is then spread using a pseudo-random number sequence. The spread signal is BPSK modulated using a carrier signal. For demodulation, the received signal is multiplied by the carrier to demodulate, and then multiplied by the pseudo-random number sequence to despread the data back to the original bit pattern. Plots of the input bit pattern, PN sequence, spread signal, modulated signal, demodulated signal, and despread data are shown.

Uploaded by

Sowmiya
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)
113 views2 pages

Exp - No.4 DSSS

This document describes direct sequence spread spectrum (DSSS) modulation and demodulation. It generates a random bit pattern, which is then spread using a pseudo-random number sequence. The spread signal is BPSK modulated using a carrier signal. For demodulation, the received signal is multiplied by the carrier to demodulate, and then multiplied by the pseudo-random number sequence to despread the data back to the original bit pattern. Plots of the input bit pattern, PN sequence, spread signal, modulated signal, demodulated signal, and despread data are shown.

Uploaded by

Sowmiya
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/ 2

Exp.No.

4 Spread Spectrum – DSSS Modulation & Demodulation

clc
clear all
close all

% Generating the bit pattern with each bit 20 samples long

b=round(rand(1,30));
pattern=[];

%%

for k=1:30
if b(1,k)==0
sig=-ones(1,20);
else
sig=ones(1,20);
end

pattern=[pattern sig];
end
subplot(2,2,1);
plot(pattern);
title('Input Bit Sequence');

% Generating the pseudo random bit pattern for spreading


d=round(rand(1,120));
pn_seq=[];
carrier=[];
t=[0:2*pi/4:2*pi]; % Creating 5 samples for one cosine
for k=1:120
if d(1,k)==0
sig=-ones(1,5);
else
sig=ones(1,5);
end
c=cos(t);
carrier=[carrier c];
pn_seq=[pn_seq sig];

end

subplot(2,2,2);
plot(pn_seq);
title('PN sequence');
% Spreading of sequence
spreaded_sig=pattern.*pn_seq;
subplot(2,2,3);
plot(spreaded_sig);
title('Spreaded signal');

% Modulation of the spreaded signal


bpsk_sig=spreaded_sig.*carrier;

subplot(2,2,4);
plot(bpsk_sig);
title('BPSK Modulated Signal');

%Demodulation and Despreading of Received Signal

figure
rxsig=bpsk_sig.*carrier;
demod_sig=[];
for i=1:600
if rxsig(i)>=0
rxs =1;
else
rxs =-1;
end
demod_sig=[demod_sig rxs];
end
subplot(2,1,1);
plot(demod_sig);
title('Demodulated Signal')

despread_sig=demod_sig.*pn_seq;
subplot(2,1,2);
plot(despread_sig);
title('Despreaded data');

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy