You are on page 1of 39

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGG.

www.arivurp.tk
CO5104 COMMUNICATION SYSTEM LABORATORY I

Ex no. 1.a) AIM:

RADIATION PATTERN OF HALF WAVE DIPOLE ANTENNA

To find out the radiation pattern of the half wave dipole antenna. APPRATUS REQUIRED: 1. 2. 3. 4. 5. Transmitting antenna(ST2262) Receiving antenna UHF transmitter Field strength meter Angle measurement panel

THEORY: The three dimensional view of the radiation pattern of a horizontal wave dipole notice that minimum radiation occurs at the end of the antenna. The wavelength of the dipole is /2 along at the operating frequency , the antenna appropriate length of the horizontal dipole is calculated from 1ft = 468/f MHz The input resistance at center of the half wave dipole antenna is iriade peraent of the gap size of frequency alone 14 Mhz . But it is selected to the antenna length of antenna. The difference is the current at various part of antenna is compensated for variable experiment. The antenna is lying in the horizontal plane. So that the electric field is in a horizontal plane. Therefore antenna is horizontally polarized. The pattern is sine wave function & appear as a true carrier in horizontal direction. PROCEDURE:

Connect the VHF transmitter to transmit radiation which in fixed frequency of 110 Mhz. Place receiver and transmitter antenna in a parallel direction. Rotate the angular measurement & note the reading in field strength meter. Plot the readings in graph.

RESULT: Thus the radiation pattern of half wave dipole antenna was studied.

TABULATION: ANGLE (Deg) GAIN IN dB

RF GENERATOR

Half wave dipole TRANSMIT TER MAST

Half wave dipole RECEIVING MAST

RF DETECTOR

EX.No.1b AIM:

RADIATION PATTERN OFYAGI- UDA ANTENNA

To find out the radiation pattern of Yagi-uda antenna. APPRATUS REQUIRED: 1.Transmitting antenna(ST2262) 2.Receiving antenna 3.UHF transmitter 4.Field strength meter 5.Angle measurement panel THEORY: The Figure shows the three dimensional of very particular radiator in the HF (3-30MHz) ,UHF(300-3000MHz) in Yagi- uda antenna contains reflectors driven element or feeder element & directs in the yagi- uda antenna only one element is driven (fed by transmission)(line). The rest being parasilite elements energized by mutual coupling the reflector having a lagging phase & the directors leading phase. The most common fold element for a Yagi-uda antenna is folded Dipole. Thus radiator is exclusive designed to operate as an end fire array. This is accomplished by having the parastic elements as the forward beam act as directors while there is the rear act as reflectors. The driven element is reason with its length slightly less than N2 (usually is resonant with where as the length of directors will be about 0.4 to 0.45). The separation between the directors will the driven element the reflector is optimum at 0.25. The major role of the reflector is played by its element next to the one energized and very little in the performance of yagi-uda antenna is gained and more than one cut the most for elements are used as reflectors. Consideration of improvements can be achievement it, more directors are added to the array. The length of a diameter of line detectors & reflectors as well as their respective determine the optimum radiation characteristic usually Yagi-uda array here. Low input impedance & relatively narrow band width the Yagi uda array is widely used as a home T.V. PROCEDURE:

Connect the UHF transmitter to transmitting antenna which in fixed to a frequency of 150 Mhz. Place receiver and transmitter antenna in a parallel direction. Rotate the angular measurement& note the reading in field strength meter. Plot the readings in graph. RESULT: Thus the radiation pattern of Yagi-uda antenna was studied.

TABULATION: ANGLE (Deg) GAIN IN dB

RF GENERATOR

yagi TRANSMIT TER MAST

yagi RECEIVING MAST

RF DETECTOR

EX.No.1c AIM:

RADIATION PATTERN O F LOOP ANTENNA

To find out the radiation pattern of loop antenna. APPRATUS REQUIRED: 1.Transmitting antenna(ST2262) 2.Receiving antenna 3.UHF transmitter 4.Field strength meter 5.Angle measurement panel THEORY: Very versatile antenna type is the loop antenna. It is a small loop evaluation to an infinitesimal Magnetic dipole where axis is perpendicular to the phase of the loop . Loop antenna takes many different forms sum as rectangular, square, triangle, ellipse, circular & many other configurations. Because of simplicity in analysis the construction. The circular loop is most popular and received the widest attenuation. The field pattern of electricity small antennas of any shape circular, elliptical, rectangular, triangle, square etc., is similar to that of an infinitesimal dipole with a null to the plane of the loop antenna as usually smaller than two resistances. Thus they are employed for transmission in radio communication. PROCEDURE: 1. Mount the loop antenna on the transmitting mast. 2. Mount detector antenna on the receiving mast. Keep it towards the transmitting mast to the rotating it in counter clockwise direction. 3. Route the transmitting antenna behavior between 0-360 degree and observe the display at RT detection. 4. Plot the readings on the graph.

RESULT: Thus the radiation pattern of the loop antenna was studied.

TABULATION: ANGLE (Deg) GAIN IN dB

RF GENERATOR

loop TRANSMIT TER MAST

loop RECEIVING MAST

RF DETECTOR

EX.No. 1d AIM:

RADIATION PATTERN O F LOG PERODIC ANTENNA

To draw the radiation pattern of log periodic antenna. APPRATUS REQUIRED: 1. Transmitting antenna-(ST2262) 2. Receiving antenna 3. UHF transmitter 4. Field strength meter 5. Angle measurement panel THEORY: The main feature of this antenna is frequency impedance for both radiation & resistance pattern. The radiation pattern may be unidirectional or bidirectional. Bandwidth of 10.1 is easily achievable. The array consists of number of dipoles of different length and spacing, fed from a two wire line which is transported between each adjustment pair of dipoles. The array is fed from the narrow end and maximum. The radiation is in this direction. PROCEDURE: 1. Mount the log periodic antenna on the transmitting mast. 2. Mount the detector antenna on the receiving mast keep its direction towards the transmitting mast by rotating it in counter clockwise direction. 3. Rotate the transmitting antenna between 0-360 degree and observe the display at RF detection . 4. Plot the reading on the graph. RESULT: Thus the rotation pattern of log periodic antenna was studied.

TABULATION: ANGLE (Deg) GAIN IN dB

RF GENERATOR

Log periodic TRANSMIT TER MAST

Log periodic RECEIVING MAST

RF DETECTOR

BER SIMULATION OF BPSK IN AWGN CHANNEL


AIM:
To simulate the BER of BPSK modulation scheme (theoretical and practical) value over AWGN channel using MATLAB.

SOFTWARE REQUIRED:
Matlab 7.1

ALGORITHM: TRANSMITTER SECTION:


Define the number of information bits. Generate the data using desired information Initialize the SNR data Raise the amplitude level of information bits and multiply with the generated data. Take decision by comparing the received signal and the transmitted signal. Count the errors between the transmitted and received signal. Calculate the bit error rate. Calculate the probability of error for the mean BER. Calculate the BER theoretical calculation for the above modulation. Plot the semi log graph between the BER and SNR in dB for practical and theoretical modulation for BPSK modulation.

CHANNEL SECTION:

clc; clear all; close all; N=10^6; d=rand(1,N)>0.5; s=2*d-1; Eb_N0_dB=1:1:10; n=1/sqrt(2)*[randn(1,N)+j*randn(1,N)]; for ii=1:length(Eb_N0_dB) y=s+10^(-Eb_N0_dB(ii)/20)*n; ipHat=real(y)>0; nErr(ii)=size(find([d-ipHat]),2); end BER=nErr/N; figure(2) snrindb=1:10; semilogy (snrindb,BER,'g-v'); hold on; theoryBer=0.5*erfc(sqrt(10.^(snrindb/10)));

semilogy (snrindb,theoryBer,'r--'); grid on; title('BER OF BPSK MODULATION'); xlabel('SNR in dB'); ylabel('BER'); legend('BER-practical','BER-theoritical')

10

-1

BER OF BPSK MODULATION BER-practical BER-theoritical

10

-2

10

-3

BER
10
-4

10

-5

10

-6

5 6 SNR in dB

10

RESULT:
Thus the simulations of BER of BPSK modulation were observed over AWGN channel.

STUDY OF SPREAD SPECTRUM TECHNIQUES FOR DSSS IN ASK MODULATION


AIM:
To simulate the direct spread spectrum techniques for amplitude shift keying using MATLAB.

SOFTWARE REQUIRED:
MATLAB 7.1

ALGORITHM: Get the values for the input signal so in order to generate the carrier signal. Enter the length of input data. Get the values of PN sequence N=T. Generate the PN sequence and plot the graph. Generate the value of data and enter the length of the data. Get the spread spectrum sequence for the above generated sequence. Multiply the data and PN sequence and get the direct spread spectrum sequence. End the program by plotting the spread spectrum response for DSSS. FORMULA: S0=sqrt (2*Eb/T0)*cos (2*pi*fc*t)
STUDY OF SPREAD SPECTRUM TECHNIQUES DIRECT SPREAD SPECTRUM

clc; close all; clear all; Tb=0.01; n=10; fc=n/Tb; ebdb=5; N=input('Enter the length of data'); Eb=10^(ebdb/20); t=0.0011:0.0001:(N*Tb); tt=length(t) s0=sqrt(2*Eb/Tb)*cos(2*pi*fc*t); subplot(5,1,1); plot(s0);

pn=[1 1 1 0 1 0 0] Nq=length(pn) Mq=[1:1:Nq]; t1q=0:0.00009:Tb/7; uq=length(t1q); iq=[1:1:Nq]; for iq=1:1:Nq ikq=Mq(iq); if pn(ikq)==1 kkq(:,ikq)=linspace(1,1,uq-2); else kkq(:,ikq)=linspace(0,0,uq-2); end end dsq=reshape(kkq,1,[]); subplot(5,1,2); plot(dsq) M=[1:1:N]; data=randn(1,N)>0.5; t1=0.0003:0.0001:Tb; u=length(t1); i=[1:1:N]; for i=1:1:N ik=M(i); if data(ik)==1 kk(:,ik)=linspace(1,1,u); ch(:,ik)=dsq; else

kk(:,ik)=linspace(0,0,u); ch(:,ik)=linspace(0,0,u); end end data ds=reshape(kk,1,[]); subplot(5,1,3); plot(ds) chs=reshape(ch,1,[]); subplot(5,1,4); plot(chs) subplot(5,1,5); dsss=s0.*chs; plot(dsss)

OUTPUT

20 0 -20 1 0.5 0 1 0.5 0 1 0.5 0 20 0 -20 0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500 0 10 20 30 40 50 60 70 80 90 100 0 50 100 150 200 250 300 350 400 450 500

RESULT:
Hence the simulation of direct spread spectrum sequence for ASK modulation were observed using MATLAB.

BER SIMULATION OF BPSK IN AWGN CHANNEL


AIM:
To simulate the BER of BPSK modulation scheme (theoretical and practical) value over AWGN channel using MATLAB.

SOFTWARE REQUIRED:
Matlab 7.1

ALGORITHM: TRANSMITTER SECTION:


Define the number of information bits. Generate the data using desired information Initialize the SNR data Raise the amplitude level of information bits and multiply with the generated data. Take decision by comparing the received signal and the transmitted signal. Count the errors between the transmitted and received signal. Calculate the bit error rate. Calculate the probability of error for the mean BER. Calculate the BER theoretical calculation for the above modulation. Plot the semi log graph between the BER and SNR in dB for practical and theoretical modulation for BPSK modulation.

CHANNEL SECTION:

PROGRAM:
clc; close all; clear all; Tb=0.01; n=10; fc=n/Tb; ebdb=5; %GENERATION OF CARRIER SSIGNAL N=input('Enter the length of data'); Eb=10^(ebdb/20); t=0.0011:0.0001:(N*Tb); tt=length(t) s0=sqrt(2*Eb/Tb)*cos(2*pi*fc*t); subplot(5,1,1);

plot(s0); title('CARRIER SIGNAL'); %GENERATION OF PN SEQUENCE pn=[1 1 1 0 1 0 0] Nq=length(pn) Mq=[1:1:Nq]; t1q=0:0.00009:Tb/7; uq=length(t1q); iq=[1:1:Nq]; for iq=1:1:Nq ikq=Mq(iq); if pn(ikq)==1 kkq(:,ikq)=linspace(1,1,uq-2); kkq1(:,ikq)=linspace(1,1,uq-2); else kkq(:,ikq)=linspace(0,0,uq-2); kkq1(:,ikq)=linspace(-1,-1,uq-2); end end dsq=reshape(kkq,1,[]); dsq1=reshape(kkq1,1,[]); subplot(5,1,2); plot(dsq) title('PN SEQUENCE'); %GENERATION OF DATA SEQUENCE M=[1:1:N]; data=randn(1,N)> 0.5; t1=0.0003:0.0001:Tb; u=length(t1); i=[1:1:N]; for i=1:1:N ik=M(i); if data(ik)==1 kk(:,ik)=linspace(1,1,u); ch(:,ik)=dsq; ch1(:,ik)=dsq1; else kk(:,ik)=linspace(0,0,u); ch(:,ik)=linspace(0,0,u); ch1(:,ik)=linspace(-1,-1,u); end end data ds=reshape(kk,1,[]); subplot(5,1,3); plot(ds) title('DATA SEQUENCE'); %GENERATION OF SPREAD SPECTRUM SEQUENCE chs=reshape(ch,1,[]); subplot(5,1,4); plot(chs) title('SPREAD SPECTRUM SEQUENCE'); %GENERATION OF BPSK SEQUENCE chs1=reshape(ch1,1,[]);

subplot(5,1,5); dsss=s0.*chs1; plot(dsss) xlabel('TIME PERIOD---->'); ylabel('AMPLITUDE------>'); title('DSSS IN BPSK');

OUTPUT

CARRIER SIGNAL 20 0 -20 1 0.5 0 1 0.5 0 1 0.5 0 20 0 -20

50

100

150

200 250 300 PN SEQUENCE

350

400

450

500

10

20

30

40 50 60 DATA SEQUENCE

70

80

90

100

50

100

150 200 250 300 350 SPREAD SPECTRUM SEQUENCE

400

450

500

AMPLITUDE------>

50

100

150

200 250 300 DSSS IN BPSK

350

400

450

500

50

100

150

200 250 300 TIME PERIOD---->

350

400

450

500

RESULT:
Thus the simulations of BER of BPSK modulation were observed over AWGN channel.

LINEAR BLOCK CODE


AIM: To simulate the linear block code using MATLAB. SOFTWARE REQUIRED: MATLAB 7.1 ALGORITHM:
Clear the command window using clc Enter the generator matrix Perform the length of codeword (n) & number of message bits (k) from input generator matrix. Generate the 2k possible messages and display the command window. Determine the codeword (x) using the formula x=mG & also calculate weight of the each code words. Display the minimum hamming distance (dmin) &cordword x. Enter the received vector r Obtain the parity check matrix (H) Display the syndrome using S=YHT & corrected codeword.

PROGRAM:

clc; clear all; close all; % Input Generator Matrix g=input('Enter The Generator Matrix: ') disp ('G = ') disp ('The Order of Linear block Code for given Generator Matrix is:') [n,k] = size(transpose(g)) for i = 1:2^k for j = k:-1:1 if rem(i-1,2^(-j+k+1))>=2^(-j+k) u(i,j)=1; else u(i,j)=0; end end end u; disp('The Possible Codewords are :') c = rem(u*g,2) disp('The Minimum Hamming Distance dmin for given Block Code is= ') d_min = min(sum((c(2:2^k,:))')) % Code Word r = input('Enter the Received Code Word:') p = [g(:,n-k+2:n)]; h = [transpose(p),eye(n-k)]; disp('Hammimg Code') ht = transpose(h) disp('Syndrome of a Given Codeword is :') s = rem(r*ht,2) for i = 1:1:size(ht) if(ht(i,1:3)==s) r(i) = 1-r(i); break; end end disp('The Error is in bit:') i disp('The Corrected Codeword is :') r

OUTPUT: Enter The Generator Matrix: [1 0 0 0 1 0 1;0 1 0 0 1 1 1;0 0 1 0 1 1 0;0 0 0 1 0 1 1] g= 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 1 G = The Order of Linear block Code for given Generator Matrix is:

n =7 k =4 The Possible Codewords are : c= 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1

The Minimum Hamming Distance dmin for given Block Code is= d_min =3 Enter the Received Code Word:[1 1 1 0 0 0 0] r =1 1 1 0 0 0 0

RESULT:
Hence the simulation of Linear block code were observed using MATLAB

COMMUNICATION LINK THROUGH FIBER EX.NOFIBER OPTIC ANALOG LINK AIM: To study & construct the analog link through fiber optic cable using 660nm, 850nm&1300nm LED sources APPARATUS REQUIRED: Transmitter trainer kit Receiver trainer kit Step index multimode plastic fiber Patch cards

THEORY: TARNSMITTER: Fiber optic transmitter consists of the following, Buffer Preamplifier Driver circuit Optical source Function generator Buffer provides both an electrical connection and isolation between the transmitter & the electrical system supplying data. The driver provides the electrical power to the optical source to convert the electrical current to the light energy. RECEIVER: Optical power transmitted by the transmitter is detected by photo diode or photo transmitter. And it is also used to convert the light from the fiber cable into electrical current. PROCEDURE:
1. 2. 3. 4. Patch the circuit as per patching diagram. Switch on the trainer kit & verify the function generator using CRO. Connect the CRO CH1 at the input of driver circuit (Analog). Now connect the CRO CH2 at the input of AC amplifier in receiver & verify the transmitted signal received on the receiver side 5. Change the frequency & amplitude of the input signal which is going to be transmit through the fiber optic cable & verify the corresponding changes in receiver using CRO in dual mode operation. 6. Set the amplitude of input signal to 5v &set the same receiver voltage. 7. Now change the LED source from 660nm to 850 nm & verify the changes in receiver output. RESULT:

Thus the analog link through fiber optic cable was constructed and studied.

TABULATION:

S.NO

AMPLITUDE

TIME

MODEL GRAPH:

EX.NO

FIBER OPTIC DIGITAL LINK

AIM: To study &construct the digital link through fiber optic cable using 660nm, 850nm&1300nm LED sources APPARATUS REQUIRED: Transmitter trainer kit Receiver trainer kit Step index multimode plastic fiber Patch cards THEORY: TARNSMITTER: Fiber optic transmitter consists of the following, Buffer Preamplifier Driver circuit Optical source Function generator Buffer provides both an electrical connection and isolation between the transmitter & the electrical system supplying data. The driver provides the electrical power to the optical source to convert the electrical current to the light energy.Here the driver circuit is designed as ON &OFF according to the input data that means when the data is high the LED goes to glow. When data is low it goes to OFF. RECEIVER: Optical power transmitted by the transmitter is detected by photo diode or photo transmitter. And it is also used to convert the light from the fiber cable into electrical current. In digital signal transmission the detected signal is not clear digital data .so that the detected output is given to the comparator& the data is taken out on its output. PROCEDURE:
1. 2. 3. 4. Patch the circuit as per patching diagram. Switch on the trainer &verify the function generator using CRO. Connect the CRO CH1 at the input of driver circuit Now connect the CRO CH2 at the output of comparator in receiver &verify the transmitted signal received on the receiver side 5. Change the frequency &amplitude of the input signal which is going to be transmit through the fiber optic cable &verify the corresponding changes in receiver using CRO in dual mode operation.

RESULT: Thus the digital link through fiber optic cable was constructed and studied.

TABULATION:

S.NO

AMPLITUDE

TIME

MODEL GRAPH:

IMPLEMENTATION OF ADAPTIVE FILTER USING DSP PROCESSOR Ex.No. Date:

OBJECTIVE:

To implement of Adaptive Filter using the instructions of TMS320c50. AIM: To write a assembly language program to calculate the Fast Fourier transform for the given sequence Apparatus Required: MATLAB 7.1 PROGRAM .mmregs .text B START CTABLE: .word 0FF82H .word 083H .word0167H .word01CFH .word0188H .word09DH .word0FF5BH .word0FE38H .word0FDACH .word0FE01H .word0FF31H .word0DEH .word0271H .word0342H .word02DDH .word0132H .word0FEADH .word0FC20H .word0FA92H .word0FAEEH

.word0FDB6H .word02CCH .word096AH .word0104CH .word015F9H .word0192EH .word0192EH .word015F9H .word0104CH .word096AH .word02CCH .word0FDB6H .word0FAEEH .word0FA92H .word0FC20H .word0FEADH .word0132H .word02DDH .word0342H .word0271H .word0DEH .word0FF31H .word0FE01H .word0FDACH .word0FE38H .word0FF5BH .word09DH .word0188H .word01CFH .word0167H .word083H .word0FF82H * * START MAR *,AR0 LAR AR0,#0200H RPT #33H BLKP CTABLE,*+ Move the filter coefficients from program memory to data memory

SETC CNF
*Input data and perform convolution

LAR AR0,#4H ISR: LDP #0AH LACC #0 SACL 0 OUT 0,05 MAR *,AR0 BANZ INC0,*IN 0,06H LAR AR7,#0 MAR *,AR7 BACK: BANZ BACK,*RPT #10H IN 0,4 LAR AR0,#4H B STORE INC0: SPLK #0H,0H RPT #15H NOP STORE: NOP NOP NOP NOP MAR *,AR1 LAR AR1,#0300H LACC 0 AND #0FFFH SUB #800H SACL * LAR AR1,#333H MPY #0 ZAC RPT #33H MACD 0FF00H,*APAC LAR AR1,#0300H SACH * LACC * ADD #800H SFR SACL * OUT *,4

LACC #0FFFH SACL 0 OUT 0,05 NOP B ISR .end

RESULT:

Thus assembly language program to perform Adaptive filter was written and executed successfully

IMPLEMENTATION OF MULTIRATE SIGNAL PROCESSING USING DSP PROCESSOR Ex.No. Date:

OBJECTIVE:

To implement of Multirate Signal Processing using the instructions of TMS320c50. AIM: To write a assembly language program to calculate Multirate Signal Processing for the given sequence Apparatus Required: MATLAB 7.1 PROGRAM .mmregs .text B START CTABLE: .word 0FF82H .word 083H .word0167H .word01CFH .word0188H .word09DH .word0FF5BH .word0FE38H .word0FDACH .word0FE01H .word0FF31H .word0DEH .word0271H .word0342H .word02DDH .word0132H .word0FEADH .word0FC20H .word0FA92H .word0FAEEH

.word0FDB6H .word02CCH .word096AH .word0104CH .word015F9H .word0192EH .word0192EH .word015F9H .word0104CH .word096AH .word02CCH .word0FDB6H .word0FAEEH .word0FA92H .word0FC20H .word0FEADH .word0132H .word02DDH .word0342H .word0271H .word0DEH .word0FF31H .word0FE01H .word0FDACH .word0FE38H .word0FF5BH .word09DH .word0188H .word01CFH .word0167H .word083H .word0FF82H * * START MAR *,AR0 LAR AR0,#0200H RPT #33H BLKP CTABLE,*+ Move the filter coefficients from program memory to data memory

SETC CNF
*Input data and perform convolution

LAR AR0,#4H ISR: LDP #0AH LACC #0 SACL 0 OUT 0,05 IN 0,06H LAR AR7,#0 MAR *,AR7 BACK: BANZ BACK,*IN 0,4 NOP NOP NOP NOP MAR *,AR1 LAR AR1,#0300H LACC 0 AND #0FFFH SUB #800H SACL * LAR AR1,#0300H LACC 0 AND #0FFFH SUB #800H SACL * LAR AR1,#333H MPY #0 ZAC RPT #33H MACD 0FF00H,*APAC LAR AR1,#0300H SACH * LACC * ADD #800H SFR SACL * MAR *,AR0 BANZ NO_OUT,*MAR *,AR0 BANZ NO_OUT,*-

MAR *,AR1 OUT *,4 LAR AR0,#4H NO_OUT: LACC #0FFH SACL 0 OUT 0,05 NOP B ISR .end

RESULT:

Thus assembly language program to perform Multirate Signal Processing was written and executed successfully.

EX.NO:08 CALCULATION OF FFT USING TMS320C50


OBJECTIVE:

To implement the processing technique for calculation of FFT using the instructions of TMS320c50.

AIM: To write a assembly language program to calculate the Fast Fourier transform for the given sequence.

THEORY:
The fast fourier transform (FFT) is an algorithm used to compute the DFT with minimum number of calculations. It makes use of the symmetry and periodicity properties of twiddle factor W kN to effectively reduce the DFT computation time. It is based on the fundamental principal of decomposing the computation of DFT of a sequence of length N into successively smaller discrete Fourier transforms. The FFT algorithm provides speed-increase factors, when compared with direct computation of the DFT. The direct evaluation of DFT using the formula

requires N2 complex multiplications and N (N-1) complex additions. Thus for reasonably large values of N (in the order of 1000) direct evaluation of the DFT requires an inordinate amount of computation. By using FFT algorithms the number of computations can be reduced. For example, for an N-point DFT, the number of complex multiplications required using FFT is N 2 log2 N. If N=16, the number of complex multiplications required for direct evaluation of DFT is 256, whereas using FFT only 32 multiplications are required.

Two Types of FFT :


1. Decimation in time ( DIT ) Algorithm : Decimation in-time algorithm is used to calculate the DFT of a N-point sequence. The idea is to break the N-point sequence into two sequences, the DFTs of which can be combined to give the DFT of the original N-point sequence. Initially the N-point sequence is divided into two N 2 point sequences xe(n) and xo(n), which have the even and odd members of x(n) respectively. The N 2 point

DFTs of these two sequences are evaluated and combined to give the N-point DFT. Similarly the N 2 point DFTs can be expressed as a combination of N 4 point DFTs. This process is continued until we left with 2-point DFT. This algorithm is called decimation-in-time because the sequence x(n) is often splited into smaller subsequences.

2. Decimation-in-frequency algorithm : It is a popular form of the FFT algorithm. In this the output sequence x(k) is divided into smaller and smaller subsequences, that is why the name decimation in frequency. Initially the input sequence x(n) is divided into two sequences x1(n) and x2(n) consisting of the first N 2 samples of x(n) and the last N 2 samples of x(n) respectively. Then we find the N 2 point sequences f(n) and g(n) as f(n) = x1(n) + x2(n) and g(n) = [x1(n) - x2(n)]WnN The N 2 point DFTs of the above two sequences give even numbered and odd numbered output samples respectively. The above procedure can now be iterated to express each N 2 point DFT as a combination of two N 4 point DFTs. This process is continued until we left with 2-point DFT.

PROGRAM: IN .set 8010H BITREV .set 8020H REAL .set 8040H IMG .set 8050H .MMREGS .TEXT LDP #100H LAR AR1,#IN LAR AR2,#BITREV SPLK #2H,05H LMMR INDX,#8005H MAR *,AR2 RPT #3H BLDD #IN,*BR0+ LAR AR2,#BITREV LAR AR3,#8030H LAR AR0,#1H FFT1: MAR *,AR2 LACC *+ SACB LT *+ MPY #1H APAC

MAR *,AR3 SACL *+ LACB SPAC SACL *+,AR0 BANZ FFT1,*LAR AR3,#8030H LAR AR4,#REAL LAR AR5,#IMG MAR *,AR3 LACC * SACB ADRK #2H LT *MPY #1H APAC MAR *,AR4 SACL * ADRK #2H LACC #0H MAR *,AR5 SACL * ADRK #2H LACB SPAC MAR *,AR4 SACL *LACC #0H MAR *,AR5 SACL *-,AR3 LACC *,AR4 SACL * ADRK #2H SACL *,AR3 ADRK #2H LT * MPY #0FFFFH MAR *,AR5 SPL *,AR3 LT * MPY #1H MAR *,AR5 ADRK #2H SPL * B H

H:

INPUT: 8010-0001 8011-0001 8012-0000 8013-0000 BIT_REV: 8020-0001 8021-0000 8022-0001 8023-0000 FFT1: 8030-0001 8031-0001 8032-0001 8033-0001 REAL: 8040-0002 8041-0001 8042-0000 8043-0001 IMG: 8050-0000 8051-FFFF 8052-0000 8053-0001

RESULT:

Thus assembly language program to perform FFT was written and executed successfully

www.arivurp.tk

You might also like