Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Aim: To study Frequency Hopped Spread Spectrum Technique using

FFT.

Apparatus : Matlab

Theory :  Spread spectrum is a digital modulation technology and a


technique based on principals of spreading a signal among many
frequencies to prevent interference and signal detection. As the name
shows it is a technique to spread the transmitted spectrum over a wide
range of frequencies.

Frequency hopping spread spectrum is a transmission technology used in


wireless networks and a technique to generate spread spectrum by
hopping the carrier frequency. FHSS uses narrow band signal which is less
than 1 MHz, In this method data signal is modulated with a narrowband
carrier signal that "hops" in random and hopping happens in pseudo-
random "predictable" sequence in a regular time from frequency to
frequency which is synchronized at both ends. Using FHSS technology
improves privacy, it is a powerful solution to avoid interference and multi
path fading (distortion), it decreases narrowband interference, increases
signal capacity, improve the signal to  noise ratio, efficiency of bandwidth is
high and difficult to intercept also this transmission can share a frequency
band with many types of conventional transmissions with minimal
interference. There are two types of hopping sequence: random hopping
sequence and deterministic hopping sequence. The focus of this work is on
slow and deterministic frequency hopping sequence.

Procedure : Following steps were undergone while making the code


1.      Random no. of bits were generated
2.      NRZ line coding was implemented
3.      BPSK modulation was done
4.      Random carrier frequencies were generated
5.      A spread signal was formed by randomly choosing the frequencies.
6.      Frequency hoped spread signal was formed.
NRZ was chosen to give 180 degree phase shift. And BPSK was used for
simplicity. Choice of carrier frequencies was random.
  

Matlab Code:

% Frequency Hopping Spread Spectrum


%------------------------------------------------------------%
clc
clear

% Generation of bit pattern


s=round(rand(1,25));    % Generating 25 bits
signal=[]; 
carrier=[];
t=[0:2*pi/119:2*pi];     % Creating 120 samples for one cosine
for k=1:25
    if s(1,k)==0
        sig=-ones(1,120);    % 120 minus ones for bit 0
    else
        sig=ones(1,120);     % 120 ones for bit 1
    end
    c=cos(t);  
    carrier=[carrier c];
    signal=[signal sig];
end
subplot(4,1,1);
plot(signal);
axis([-100 3100 -1.5 1.5]);
title('\bf\it Original Bit Sequence');

% BPSK Modulation of the signal


bpsk_sig=signal.*carrier;   % Modulating the signal
subplot(4,1,2);
plot(bpsk_sig)
axis([-100 3100 -1.5 1.5]);
title('\bf\it BPSK Modulated Signal');

% Preparation of 6 new carrier frequencies


t1=[0:2*pi/9:2*pi];
t2=[0:2*pi/19:2*pi];
t3=[0:2*pi/29:2*pi];
t4=[0:2*pi/39:2*pi];
t5=[0:2*pi/59:2*pi];
t6=[0:2*pi/119:2*pi];
c1=cos(t1);
c1=[c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1];
c2=cos(t2);
c2=[c2 c2 c2 c2 c2 c2];
c3=cos(t3);
c3=[c3 c3 c3 c3];
c4=cos(t4);
c4=[c4 c4 c4];
c5=cos(t5);
c5=[c5 c5];
c6=cos(t6);

% Random frequency hopps to form a spread signal


spread_signal=[];
for n=1:25
    c=randint(1,1,[1 6]);
    switch(c)
        case(1)
            spread_signal=[spread_signal c1];
        case(2)
            spread_signal=[spread_signal c2];
        case(3)
            spread_signal=[spread_signal c3];
        case(4)
            spread_signal=[spread_signal c4];
        case(5)       
            spread_signal=[spread_signal c5];
        case(6)
            spread_signal=[spread_signal c6];
    end
end
subplot(4,1,3)
plot([1:3000],spread_signal);
axis([-100 3100 -1.5 1.5]);
title('\bf Spread Signal with 6 frequencies');

% Spreading BPSK Signal into wider band with total of 5


frequencies
freq_hopped_sig=bpsk_sig.*spread_signal;
subplot(4,1,4)
plot([1:3000],freq_hopped_sig);
axis([-100 3100 -1.5 1.5]);
title('\bf Frequency Hopped Spread Spectrum Signal');

% Expressing the FFTs


figure,subplot(2,1,1)
plot([1:3000],freq_hopped_sig);
axis([-100 3100 -1.5 1.5]);
title('\bf Frequency Hopped Spread Spectrum signal and its FFT');
subplot(2,1,2);
plot([1:3000],abs(fft(freq_hopped_sig)));

Output :
Conclusion : The basic concept of FHSS was gained. It’s
implementation was learnt .

You might also like