Вы находитесь на странице: 1из 11

Frequency hopping system

AIM: To simulate the frequency hopping (FH) system Apparatus: 1. Hardware : Desktop computer 2. Software Theory: Frequency-hopping spread spectrum (FHSS) is a method of transmitting radio signals by rapidly switching a carrier among many frequency channels, using a pseudorandom sequence known to both transmitter and receiver. It is utilized as a multiple access method in the frequency-hopping code division multiple access (FH-CDMA) scheme. A spread-spectrum transmission offers three main advantages over a fixed-frequency transmission: 1. Spread-spectrum signals are highly resistant to narrowband interference. The process of re-collecting a spread signal spreads out the interfering signal, causing it to recede into the background. 2. Spread-spectrum signals are difficult to intercept. An FHSS signal simply appears as an increase in the background noise to a narrowband receiver. An eavesdropper would only be able to intercept the transmission if the pseudorandom sequence was known. 3. Spread-spectrum transmissions can share a frequency band with many types of conventional transmissions with minimal interference. The spread-spectrum signals add minimal noise to the narrow-frequency communications, and vice versa. As a result, bandwidth can be utilized more efficiently. : Matlab 7.10.0 version

Programme:
clc clear % Generation of bit pattern s=round(rand(1,25)); % Generating 20 bits signal=[]; carrier=[]; t=[0:2*pi/119:2*pi]; % Creating 60 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\it Spread Signal with 6 frequencies'); % Spreading BPSK Signal into wider band with total of 12 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\it 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\it Frequency Hopped Spread Spectrum signal and its FFT'); subplot(2,1,2); plot([1:3000],abs(fft(freq_hopped_sig)));

Results:

DS spread spectrum technique


AIM: To determine the efficiency of DSSS technique. Apparatus: 1. Hardware : Desktop computer 2. Software : Matlab 7.10.0 version

Theory:
In telecommunications, direct-sequence spread spectrum (DSSS) is a modulation technique. As with other spread spectrum technologies, the transmitted signal takes up more bandwidth than the information signal that modulates the carrier or broadcast frequency. The name 'spread spectrum' comes from the fact that the carrier signals occur over the full bandwidth (spectrum) of a device's transmitting frequency. Certain IEEE 802.11 standards use DSSS signaling. DSSS uses a signal structure in which the sequence of chips produced by the transmitter is already known by the receiver. The receiver can then use the same PN sequence to counteract the effect of the PN sequence on the received signal in order to reconstruct the information signal.

Programme:
clc clear % Generating the bit pattern with each bit 6 samples long b=round(rand(1,20)); pattern=[]; for k=1:20 if b(1,k)==0 sig=zeros(1,6); else sig=ones(1,6); end pattern=[pattern sig]; end plot(pattern); axis([-1 130 -.5 1.5]); title('\bf\it Original Bit Sequence'); % Generating the pseudo random bit pattern for spreading

spread_sig=round(rand(1,120)); figure,plot(spread_sig); axis([-1 130 -.5 1.5]); title('\bf\it Pseudorandom Bit Sequence'); % XORing the pattern with the spread signal hopped_sig=xor(pattern,spread_sig); % Modulating the hopped signal dsss_sig=[]; t=[0:100]; fc=.1 c1=cos(2*pi*fc*t); c2=cos(2*pi*fc*t+pi); for k=1:120 if hopped_sig(1,k)==0 dsss_sig=[dsss_sig c1]; else dsss_sig=[dsss_sig c2]; end end figure,plot([1:12120],dsss_sig); axis([-1 12220 -1.5 1.5]); title('\bf\it DSSS Signal'); % Plotting the FFT of DSSS signal figure,plot([1:12120],abs(fft(dsss_sig)))

Result:

Bit error rate using binary data


AIM: To determine the efficiency of DSSS technique. Apparatus: 1. Hardware : Desktop computer 2. Software : Matlab 7.10.0 version

Theory
In digital transmission, the number of bit errors is the number of received bits of a data stream over a communication channel that have been altered due to noise, interference, distortion or bit synchronization errors. The bit error rate or bit error ratio (BER) is the number of bit errors divided by the total number of transferred bits during a studied time interval. BER is a unitless performance measure, often expressed as a percentage. The bit error probability pe is the expectation value of the BER. The BER can be considered as an approximate estimate of the bit error probability. This estimate is accurate for a long time interval and a high number of bit errors.

Programme:
x=input('enter the length of the codeword') a=length(x) y=input('enter the length of the codeword') b=length(y) [c,d]=biterr(x,y)

Result:
enter the length of the codeword [ 1 1 1 0 0 0 0 1] x= 1 a=8 enter the length of the codeword[ 1 0 1 0 1 1 1 1] y=1 b =8 c =4 d = 0.5000 0 1 0 1 1 1 1 1 1 0 0 0 0 1

Вам также может понравиться