SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
SIGNALS AND
  SYSTEMS-EEL 205

   DFT AND ITS APPLICATIONS




A study submitted at IIT,Delhi as a part of EEL 205
              course requirement




                            RISHABH DUDEJA (2011EE10477)

                                AGAM GOEL (2011EE20505)
ACKNOWLDGEMENT


     We have taken great efforts in this project.
However, it would not have been possible without the
kind support and help of many individuals. I would like
to extend my sincere thanks to all of them.


We are highly indebted to Professor S.D Joshi for his
guidance and constant supervision. He provided us with
necessary information regarding the project &
invaluable support in completion of the project.

We would like to express our gratitude towards our
parents for their kind co-operation and encouragement
which helped us in the completion of this project.

My thanks and appreciations also go to my friends in
developing the project and people who have willingly
helped me out with their abilities.




                                       Rishabh Dudeja
                                            Agam Goel
ABSTRACT
The study looks at an alternative representation of signals known as the
Discrete Fourier Transform (DFT). DFT has widespread applications in Spectral
Analysis of systems, LTI systems, Calculating convolution of signals,
multiplication of large polynomials, noise removal etc.

Computing DFT of a signal via normal computations takes a considerable time.
We have calculated DFT using the famous algorithm of Fast Fourier Transform
(FFT). There are several other variations to calculate DFT also.

Thereafter, we have looked at logics to compute Inverse DFT to get back a
signal from its DFT. This has been done using two well-known tricks which
involve conjugation and reversing of the DFT. We have implemented Linear
and Circular convolution using the normal methods and the DFT method.

We have plotted graphs for each algorithm to show their time complexity, by
using signals of various sample lengths. Also, to further validate our algorithms
, we have computed DFT’s and Inverse DFT using Matlab inbuilt function and
shown the results to be the same.

We have also shown the relationship between DFT and DTFT and that instead
of storing the whole continuous DTFT, we can simply store finite points of DTFT
and still recover the signal.

Along with the Project report, we have attached soft copies of the various
programs we have developed in Matlab along with their GUI implementation.
GUI implementation allows one to compute DFT’s Inverse DFT’s and
convolution for various types of signals from square to exponential and even
custom signals. Custom signals have to be input in the form of a list.
DISCRETE FOURIER TRANSFORM

The discrete Fourier transform (DFT) is a specific kind of discrete transform, used in Fourier analysis.
It transforms one function into another, which is called the frequency domain representation, or simply
the DFT, of the original function (which is often a function in the time domain. The DFT requires an
input function that is discrete. Such inputs are often created by sampling a continuous function, such
as a person's voice. The discrete input function must also have a limited (finite) duration, such as one
period of a periodic sequence or a windowed segment of a longer sequence.



Unlike the discrete-time Fourier transform (DTFT), the DFT only evaluates enough frequency
components to reconstruct the finite segment that was analyzed. The inverse DFT cannot reproduce
the entire time domain, unless the input happens to be periodic. Therefore it is often said that the DFT
is a transform for Fourier analysis of finite-domain discrete-time functions.



In particular, the DFT is widely employed in signal processing and related fields to analyze the
frequencies contained in a sampled signal, to solve partial differential equations, and to perform other
operations such as convolutions or multiplying large integers. A key enabling factor for these
applications is the fact that the DFT can be computed efficiently in practice using a fast Fourier
transform (FFT) algorithm.



FFT algorithms are so commonly employed to compute DFTs that the term "FFT" is often used to
mean "DFT" in colloquial settings. Formally, there is a clear distinction: "DFT" refers to a mathematical
transformation or function, regardless of how it is computed, whereas "FFT" refers to a specific family
of algorithms for computing DFTs.



The sequence of N complex numbers x0.... xN−1 is transformed into another sequence of N complex
numbers according to the DFT formula:
FAST FOURIER TRANSFORM

One of the reasons for the significant increase in the use of computerised techniques was the
development of a very efficient technique known as the FAST FOURIER TRANSFORM (FFT) algorithm
for the calculation of the DFT of finite duration sequences.

One method of calculation of the DFT is by direct evaluation. A useful measure of the complexity of
such a computation is the total number of complex computations required. Clearly for calculation
each point of the DFT we require N computations and hence for a complete N point DFT we have N2

It is convenient to write the above equations as:




Where ,




Suppose that N is even and a power of 2. Let f[n]=X[2n] represent the even indexed samples and
g[n]=X[2n+1] represent the odd indexed samples.. Clearly f[n] and g[n] are zero outside the interval
0≤n≤(N/2)-1.

The N-point DFT of X[n] can be expressed as




Where




Also, clearly a N point DFT is periodic with period N. This main point is basically going to help us
decrease our computations. The N-point DFT of X[n] can be calculated in terms of two DFT’s of
length N/2. Even if we now compute the DFTs of the 2 halves using the traditional algorithm,
number of computations required is N2/2, less than N2. Actually these halves are further
decomposed and hence the computational advantage is enormous.
If N is a power of two, then we can decompose function at every step into sequences of even and
odd indexed samples, and therefore their DFT’s can be computed using the same process. We can
iterate the process, thus achieving significant savings in computation time. The time complexity of
the program will be Nlog(N) which is a significant improvement over N2

To implement FFT using the matlab , firstly we have created a function ‘expmatrix’ which returns an
array of complex exponentials of desired period.




The following is the ‘myfft’ function which calculates the nearest power of 2 point DFT of the input
signal using the FFT algorithm as was described above. Note that even if we input a signal which is
not of length which is a power of 2, it converts it into one by zero-padding. That is the remaining
points are assigned the value of 0.




Here , we have taken samples of the sine signal, and then found out its DFT using the built in FFT and
our version of FFT. Finally, the signal has also been recovered using IFFT.
INVERSE FAST FOURIER TRANSFORM

One major advantage of the DFT is that that its inverse can be computed using the DFT function
itself.

Expressing the inverse DFT in terms of DFT (i.e. finding out the signal if its DFT has been given) can
be done using several well known tricks:

    1) First, we can compute the inverse DFT by reversing the inputs:




The subscripts are interpreted modulo N.

Following is the program ‘myIFFTver2’ to calculate the inverse DFT using the above algorithm. Note
fliplr reverses the signal.




    2) Second, one can also conjugate the inputs and outputs:




Following is the program ‘myIFFT’ to calculate the inverse DFT using the above logic.
CIRCULAR CONVOLUTION USING DFT


Circular Convolution
The circular convolution, also known as cyclic convolution, of two aperiodic functions occurs when
one of them is convolved in the normal way with a periodic summation of the other function. That
situation arises in the context of the Circular convolution theorem. The identical operation can also
be expressed in terms of the periodic summations of both functions, if the infinite integration
interval is reduced to just one period. That situation arises in the context of the discrete-time
Fourier transform (DTFT) and is also called periodic convolution. In particular, the transform (DTFT)
of the product of two discrete sequences is the periodic convolution of the transforms of the
individual sequences.



Circular convolution using DFT can be calculated in many ways.

Algorithm 1

In this, Let X1[n] and X2[n] be the two signals whose circular convolution we have to compute. We
calculate the N point DFT of both the signals. It is important to calculate the same point DFT of both
the signals. The number of points in the DFT is the period of the circular convolution obtained. Now
multiply the DFT’s point wise. After this calculate IDFT of the resultant to get the required solution.
Consider the number of computations if we do the DFTs using FFTs: Each transform requires O
(NLog(N))operations, the multiplication is O(N) , and the inverse transform is O(NLog(N)) . The
overall computation is O (NLog(N)), which saves a significant amount of time , specially for large N.




Here is the matlab implementation of the above algorithm using the self designed DFT myfft.
The code given below uses the inbuilt fft function.
Algorithm 2

Circular convolution computed directly from its summation formula.




The above algorithm has been implemented in the function mycconv.




The function basically computes the value of circular convolution of the 2 functions from 0 to N-1 by
actually evaluating the summation in an internal while loop. The first signal is treated as a finite hold
signal and hence the upper and lower limits of the summation are N-1 and 0 rather than infinity and
negative infinity. The second signal is assumed to be periodic with period N. Hence its arguments are
taken modulo N. The order of the function coded above is O (N2). The computation of the convolved
function at any point required computation of N products – x(0)y(n-0), x(1)y(n-1)…..x(n-1)y(1) and
their summation i.e. O(N) operations. Since value of the convolved function needs to be computed
at N pts, the overall order is O (N*N) =O (N2).
Here, we have done circular convolution of sine and cosine.
Period of convolution=150
Time for FFT based convolution=extremely small O( NlogN)
Time for inefficient convolution (the one done in terms of linear convolution) =0.001594sec O(N2)
Clearly, one can observe the huge time difference.
LINEAR CONVOLUTION USING DFT

Algorithm 1
The linear convolution equals the circular convolution provided the period of the circular
convolution is large enough.

To see this interpret the circular convolution as:




The periodic extension of x2 is obtained by passing the discrete delta function through an LTI whose
impulse response is x2. Since the circular convolution is nothing but the linear convolution of x1 with
periodic extension of x2. It can be obtained as the response of an LTI with impulse response x1 to
periodic x2. The response thus obtained is multiplied by a rectangular window of size N to extract a
single period and hence find circular convolution. Since convolution is a commutative operation the
order of these LTIs can be changed as:
Now, circular convolution can be simply interpreted as a periodic extension of linear convolution.
Now when 2 signals of M and L are convolved the linear convolution always has length M+L-1. If the
period for extension of this linear convolution is more than or equal to M+L-1, then the various
periods don’t interfere with each other and the linear convolution can be obtained as a one period
extraction of circular convolution. If it is less than L+M-1 aliasing occurs between various periods and
the linear convolution is lost.

Hence to obtain linear convolution we find the circular convolution of the 2 signals with a period
N>=L+M-1 say in particular L+M using the FFT based algorithm for circular convolution. We then
extract the first L+M-1 samples from the circular convolution and obtain the linear convolution in
the order of the DFT algorithm that is NlogN.




We have implemented it using both myfft functions:
And built in FFT function:




Algorithm 2

Linear convolution computed directly from its summation formula.




If we have 2 signals f and g of finite holds say L and M, all indices in the summation aren’t valid in
fact the summation start index can be replaced by:

Start=max (0, n-M+1)

End=min (L-1, n)

Where n denotes the value at which f*g is being evaluated.

The program given below basically evaluates the summation explicitly using while loops. Like the
circular convolution it takes O (N2) time.
Here, we have done linear convolution between the exponential signal and the square signal.

Time for FFT based convolution=0.0001153sec

Time for inefficient convolution=0.0003166sec
RELATIONSHIP BETWEEN DFT AND DTFT

A finite duration discrete signal which is non zero only between 0 to N-1 can be represented in
frequency domain using two transforms:

The Discrete time Fourier transform which defines a corresponding function X (Ω):




Since the signal is non zero beyond 0 and N-1,




And

Using the N-point DFT (N>signal length):




The 2 equations simply show:




What these means is that    is nothing but the discretized version of   , the number of
equispaced samples being equal to N. Note that the samples are only taken between
However, since      is periodic with , these are sufficient.

Since, it is possible to reconstruct the the signal using both its DFT and its DTFT it simply shows that
the information contained in          a continuous time signal can be stored by simply taking N
samples provided N is greater than the signal length.

This also suggests a method to approximate the DTFT plot in matlab by simply interpolating the N
samples of the N point DFT. The greater are the number of samples i.e. greater the value of N, the
more closely spaced samples are, and more continuous looking the DTFT plot is.
The following figure shows the implementation:

The first plot is the signal, the second the closest power of 2 DFT and the last the DTFT plot by taking
at 1024 pt DFT.
REFERENCES

LITERARY RESOURCES

      Signals and Systems, 2nd edition, Alan V. Oppenheim
      The scientist and Engineer’s guide to digital signal processing, Steven Smith

ONLINE RESOURCES

      http://ocw.mit.edu/index.htm : Lectures By Alan Oppenheim on convolution
      www.mathsworks.in
      www.wikipedia.com
      www.google.com
      http://ee.sjtu.edu.cn
      http://ee.sjtu.edu.cn/st/studio/my/9304/Fundamentals%20of%20Signal%20Processing/A.%
       20Basics%20of%20Discrete%20Fourier%20Transform.pdf
      http://www.physics.iitm.ac.in/~kavita/sujoyketan.pdf
      http://www.ele.uri.edu/~hansenj/projects/ele436/fft.pdf

Contenu connexe

Tendances

5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals MdFazleRabbi18
 
Simulation of Wireless Communication Systems
Simulation of Wireless Communication SystemsSimulation of Wireless Communication Systems
Simulation of Wireless Communication SystemsBernd-Peter Paris
 
Ec 2401 wireless communication unit 2
Ec 2401 wireless communication   unit 2Ec 2401 wireless communication   unit 2
Ec 2401 wireless communication unit 2JAIGANESH SEKAR
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation pptsanjeev2419
 
Fir filter design (windowing technique)
Fir filter design (windowing technique)Fir filter design (windowing technique)
Fir filter design (windowing technique)Bin Biny Bino
 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalizationKamal Bhatt
 
9. parameters of mobile multipath channels
9. parameters of mobile multipath channels9. parameters of mobile multipath channels
9. parameters of mobile multipath channelsJAIGANESH SEKAR
 
MIMO Channel Capacity
MIMO Channel CapacityMIMO Channel Capacity
MIMO Channel CapacityPei-Che Chang
 
microwave-engineering
microwave-engineeringmicrowave-engineering
microwave-engineeringATTO RATHORE
 
Non orthogonal multiple access
Non orthogonal multiple accessNon orthogonal multiple access
Non orthogonal multiple accessShalikramRajpoot
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filtersop205
 
Diversity techniques presentation material
Diversity techniques presentation materialDiversity techniques presentation material
Diversity techniques presentation materialNini Lashari
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNALkaran sati
 
Microwave Engineering Lecture Notes
Microwave Engineering Lecture NotesMicrowave Engineering Lecture Notes
Microwave Engineering Lecture NotesFellowBuddy.com
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_designshrinivasgnaik
 

Tendances (20)

5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals
 
Simulation of Wireless Communication Systems
Simulation of Wireless Communication SystemsSimulation of Wireless Communication Systems
Simulation of Wireless Communication Systems
 
Ec 2401 wireless communication unit 2
Ec 2401 wireless communication   unit 2Ec 2401 wireless communication   unit 2
Ec 2401 wireless communication unit 2
 
Adaptive filter
Adaptive filterAdaptive filter
Adaptive filter
 
Microwave cavity 1st 4
Microwave cavity 1st 4Microwave cavity 1st 4
Microwave cavity 1st 4
 
Pulse Modulation ppt
Pulse Modulation pptPulse Modulation ppt
Pulse Modulation ppt
 
Fir filter design (windowing technique)
Fir filter design (windowing technique)Fir filter design (windowing technique)
Fir filter design (windowing technique)
 
Adaptive equalization
Adaptive equalizationAdaptive equalization
Adaptive equalization
 
Introduction to equalization
Introduction to equalizationIntroduction to equalization
Introduction to equalization
 
9. parameters of mobile multipath channels
9. parameters of mobile multipath channels9. parameters of mobile multipath channels
9. parameters of mobile multipath channels
 
MIMO Channel Capacity
MIMO Channel CapacityMIMO Channel Capacity
MIMO Channel Capacity
 
microwave-engineering
microwave-engineeringmicrowave-engineering
microwave-engineering
 
Non orthogonal multiple access
Non orthogonal multiple accessNon orthogonal multiple access
Non orthogonal multiple access
 
Design of FIR filters
Design of FIR filtersDesign of FIR filters
Design of FIR filters
 
Diversity techniques presentation material
Diversity techniques presentation materialDiversity techniques presentation material
Diversity techniques presentation material
 
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNALSAMPLING & RECONSTRUCTION  OF DISCRETE TIME SIGNAL
SAMPLING & RECONSTRUCTION OF DISCRETE TIME SIGNAL
 
Microwave Engineering Lecture Notes
Microwave Engineering Lecture NotesMicrowave Engineering Lecture Notes
Microwave Engineering Lecture Notes
 
Mimo
MimoMimo
Mimo
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
 

En vedette

The discrete fourier transform (dsp) 4
The discrete fourier transform  (dsp) 4The discrete fourier transform  (dsp) 4
The discrete fourier transform (dsp) 4HIMANSHU DIWAKAR
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)Oka Danil
 
Discrete Time Fourier Transform
Discrete Time Fourier TransformDiscrete Time Fourier Transform
Discrete Time Fourier TransformDaphne Silveira
 
Introduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysisIntroduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysis宗翰 謝
 
fourier transforms
fourier transformsfourier transforms
fourier transformsUmang Gupta
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsArvind Devaraj
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFTtaha25
 
Density Functional Theory
Density Functional TheoryDensity Functional Theory
Density Functional Theorykrishslide
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filtersop205
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transformsIffat Anjum
 
Applications of Z transform
Applications of Z transformApplications of Z transform
Applications of Z transformAakankshaR
 

En vedette (20)

The discrete fourier transform (dsp) 4
The discrete fourier transform  (dsp) 4The discrete fourier transform  (dsp) 4
The discrete fourier transform (dsp) 4
 
Introduction to DFT Part 1
Introduction to DFT Part 1 Introduction to DFT Part 1
Introduction to DFT Part 1
 
The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)The Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT)
 
Discrete Time Fourier Transform
Discrete Time Fourier TransformDiscrete Time Fourier Transform
Discrete Time Fourier Transform
 
dft
dftdft
dft
 
Introduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysisIntroduction to Fourier transform and signal analysis
Introduction to Fourier transform and signal analysis
 
Fft ppt
Fft pptFft ppt
Fft ppt
 
fourier transforms
fourier transformsfourier transforms
fourier transforms
 
Dsp lecture vol 2 dft & fft
Dsp lecture vol 2 dft & fftDsp lecture vol 2 dft & fft
Dsp lecture vol 2 dft & fft
 
Dft,fft,windowing
Dft,fft,windowingDft,fft,windowing
Dft,fft,windowing
 
Signal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier TransformsSignal Processing Introduction using Fourier Transforms
Signal Processing Introduction using Fourier Transforms
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
 
Density Functional Theory
Density Functional TheoryDensity Functional Theory
Density Functional Theory
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Design of IIR filters
Design of IIR filtersDesign of IIR filters
Design of IIR filters
 
Fourier transform
Fourier transformFourier transform
Fourier transform
 
Dft calculation by vasp
Dft calculation by vaspDft calculation by vasp
Dft calculation by vasp
 
Bode plot
Bode plot Bode plot
Bode plot
 
Fourier transforms
Fourier transformsFourier transforms
Fourier transforms
 
Applications of Z transform
Applications of Z transformApplications of Z transform
Applications of Z transform
 

Similaire à Dft and its applications

EC8562 DSP Viva Questions
EC8562 DSP Viva Questions EC8562 DSP Viva Questions
EC8562 DSP Viva Questions ssuser2797e4
 
Fft analysis
Fft analysisFft analysis
Fft analysisSatrious
 
Design of FFT Processor
Design of FFT ProcessorDesign of FFT Processor
Design of FFT ProcessorRohit Singh
 
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...cscpconf
 
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...csandit
 
Resourceful fast dht algorithm for vlsi implementation by split radix algorithm
Resourceful fast dht algorithm for vlsi implementation by split radix algorithmResourceful fast dht algorithm for vlsi implementation by split radix algorithm
Resourceful fast dht algorithm for vlsi implementation by split radix algorithmeSAT Publishing House
 
Iaetsd computational performances of ofdm using
Iaetsd computational performances of ofdm usingIaetsd computational performances of ofdm using
Iaetsd computational performances of ofdm usingIaetsd Iaetsd
 
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...ijma
 
Fast Fourier Transform Analysis
Fast Fourier Transform AnalysisFast Fourier Transform Analysis
Fast Fourier Transform Analysisdhikadixiana
 
3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transformWiw Miu
 
Ecg signal compression for diverse transforms
Ecg signal compression for diverse transformsEcg signal compression for diverse transforms
Ecg signal compression for diverse transformsAlexander Decker
 
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...paperpublications3
 
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...sasidhar2168
 
1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSINGmukesh bhardwaj
 
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...Design of Scalable FFT architecture for Advanced Wireless Communication Stand...
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...IOSRJECE
 

Similaire à Dft and its applications (20)

Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
Discrete Fourier Series | Discrete Fourier Transform | Discrete Time Fourier ...
 
EC8562 DSP Viva Questions
EC8562 DSP Viva Questions EC8562 DSP Viva Questions
EC8562 DSP Viva Questions
 
FFT Analysis
FFT AnalysisFFT Analysis
FFT Analysis
 
Fft analysis
Fft analysisFft analysis
Fft analysis
 
Design of FFT Processor
Design of FFT ProcessorDesign of FFT Processor
Design of FFT Processor
 
DFT.pptx
DFT.pptxDFT.pptx
DFT.pptx
 
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...
PERFORMANCE EVALUATIONS OF GRIORYAN FFT AND COOLEY-TUKEY FFT ONTO XILINX VIRT...
 
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...
Performance evaluations of grioryan fft and cooley tukey fft onto xilinx virt...
 
Resourceful fast dht algorithm for vlsi implementation by split radix algorithm
Resourceful fast dht algorithm for vlsi implementation by split radix algorithmResourceful fast dht algorithm for vlsi implementation by split radix algorithm
Resourceful fast dht algorithm for vlsi implementation by split radix algorithm
 
Iaetsd computational performances of ofdm using
Iaetsd computational performances of ofdm usingIaetsd computational performances of ofdm using
Iaetsd computational performances of ofdm using
 
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...
Implementation Of Grigoryan FFT For Its Performance Case Study Over Cooley-Tu...
 
Res701 research methodology fft1
Res701 research methodology fft1Res701 research methodology fft1
Res701 research methodology fft1
 
Fast Fourier Transform Analysis
Fast Fourier Transform AnalysisFast Fourier Transform Analysis
Fast Fourier Transform Analysis
 
3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform3 f3 3_fast_ fourier_transform
3 f3 3_fast_ fourier_transform
 
Ecg signal compression for diverse transforms
Ecg signal compression for diverse transformsEcg signal compression for diverse transforms
Ecg signal compression for diverse transforms
 
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...
Performance Comparison of FFT, DHT and DCT Based OFDM Systems with BPSK as A ...
 
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...
wepik-frequencies-unveiled-exploring-the-discrete-fourier-transform-202404181...
 
dsp-1.pdf
dsp-1.pdfdsp-1.pdf
dsp-1.pdf
 
1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING1 AUDIO SIGNAL PROCESSING
1 AUDIO SIGNAL PROCESSING
 
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...Design of Scalable FFT architecture for Advanced Wireless Communication Stand...
Design of Scalable FFT architecture for Advanced Wireless Communication Stand...
 

Dft and its applications

  • 1. SIGNALS AND SYSTEMS-EEL 205 DFT AND ITS APPLICATIONS A study submitted at IIT,Delhi as a part of EEL 205 course requirement RISHABH DUDEJA (2011EE10477) AGAM GOEL (2011EE20505)
  • 2. ACKNOWLDGEMENT We have taken great efforts in this project. However, it would not have been possible without the kind support and help of many individuals. I would like to extend my sincere thanks to all of them. We are highly indebted to Professor S.D Joshi for his guidance and constant supervision. He provided us with necessary information regarding the project & invaluable support in completion of the project. We would like to express our gratitude towards our parents for their kind co-operation and encouragement which helped us in the completion of this project. My thanks and appreciations also go to my friends in developing the project and people who have willingly helped me out with their abilities. Rishabh Dudeja Agam Goel
  • 3. ABSTRACT The study looks at an alternative representation of signals known as the Discrete Fourier Transform (DFT). DFT has widespread applications in Spectral Analysis of systems, LTI systems, Calculating convolution of signals, multiplication of large polynomials, noise removal etc. Computing DFT of a signal via normal computations takes a considerable time. We have calculated DFT using the famous algorithm of Fast Fourier Transform (FFT). There are several other variations to calculate DFT also. Thereafter, we have looked at logics to compute Inverse DFT to get back a signal from its DFT. This has been done using two well-known tricks which involve conjugation and reversing of the DFT. We have implemented Linear and Circular convolution using the normal methods and the DFT method. We have plotted graphs for each algorithm to show their time complexity, by using signals of various sample lengths. Also, to further validate our algorithms , we have computed DFT’s and Inverse DFT using Matlab inbuilt function and shown the results to be the same. We have also shown the relationship between DFT and DTFT and that instead of storing the whole continuous DTFT, we can simply store finite points of DTFT and still recover the signal. Along with the Project report, we have attached soft copies of the various programs we have developed in Matlab along with their GUI implementation. GUI implementation allows one to compute DFT’s Inverse DFT’s and convolution for various types of signals from square to exponential and even custom signals. Custom signals have to be input in the form of a list.
  • 4.
  • 5. DISCRETE FOURIER TRANSFORM The discrete Fourier transform (DFT) is a specific kind of discrete transform, used in Fourier analysis. It transforms one function into another, which is called the frequency domain representation, or simply the DFT, of the original function (which is often a function in the time domain. The DFT requires an input function that is discrete. Such inputs are often created by sampling a continuous function, such as a person's voice. The discrete input function must also have a limited (finite) duration, such as one period of a periodic sequence or a windowed segment of a longer sequence. Unlike the discrete-time Fourier transform (DTFT), the DFT only evaluates enough frequency components to reconstruct the finite segment that was analyzed. The inverse DFT cannot reproduce the entire time domain, unless the input happens to be periodic. Therefore it is often said that the DFT is a transform for Fourier analysis of finite-domain discrete-time functions. In particular, the DFT is widely employed in signal processing and related fields to analyze the frequencies contained in a sampled signal, to solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers. A key enabling factor for these applications is the fact that the DFT can be computed efficiently in practice using a fast Fourier transform (FFT) algorithm. FFT algorithms are so commonly employed to compute DFTs that the term "FFT" is often used to mean "DFT" in colloquial settings. Formally, there is a clear distinction: "DFT" refers to a mathematical transformation or function, regardless of how it is computed, whereas "FFT" refers to a specific family of algorithms for computing DFTs. The sequence of N complex numbers x0.... xN−1 is transformed into another sequence of N complex numbers according to the DFT formula:
  • 6. FAST FOURIER TRANSFORM One of the reasons for the significant increase in the use of computerised techniques was the development of a very efficient technique known as the FAST FOURIER TRANSFORM (FFT) algorithm for the calculation of the DFT of finite duration sequences. One method of calculation of the DFT is by direct evaluation. A useful measure of the complexity of such a computation is the total number of complex computations required. Clearly for calculation each point of the DFT we require N computations and hence for a complete N point DFT we have N2 It is convenient to write the above equations as: Where , Suppose that N is even and a power of 2. Let f[n]=X[2n] represent the even indexed samples and g[n]=X[2n+1] represent the odd indexed samples.. Clearly f[n] and g[n] are zero outside the interval 0≤n≤(N/2)-1. The N-point DFT of X[n] can be expressed as Where Also, clearly a N point DFT is periodic with period N. This main point is basically going to help us decrease our computations. The N-point DFT of X[n] can be calculated in terms of two DFT’s of length N/2. Even if we now compute the DFTs of the 2 halves using the traditional algorithm, number of computations required is N2/2, less than N2. Actually these halves are further decomposed and hence the computational advantage is enormous.
  • 7. If N is a power of two, then we can decompose function at every step into sequences of even and odd indexed samples, and therefore their DFT’s can be computed using the same process. We can iterate the process, thus achieving significant savings in computation time. The time complexity of the program will be Nlog(N) which is a significant improvement over N2 To implement FFT using the matlab , firstly we have created a function ‘expmatrix’ which returns an array of complex exponentials of desired period. The following is the ‘myfft’ function which calculates the nearest power of 2 point DFT of the input signal using the FFT algorithm as was described above. Note that even if we input a signal which is not of length which is a power of 2, it converts it into one by zero-padding. That is the remaining points are assigned the value of 0. Here , we have taken samples of the sine signal, and then found out its DFT using the built in FFT and our version of FFT. Finally, the signal has also been recovered using IFFT.
  • 8.
  • 9. INVERSE FAST FOURIER TRANSFORM One major advantage of the DFT is that that its inverse can be computed using the DFT function itself. Expressing the inverse DFT in terms of DFT (i.e. finding out the signal if its DFT has been given) can be done using several well known tricks: 1) First, we can compute the inverse DFT by reversing the inputs: The subscripts are interpreted modulo N. Following is the program ‘myIFFTver2’ to calculate the inverse DFT using the above algorithm. Note fliplr reverses the signal. 2) Second, one can also conjugate the inputs and outputs: Following is the program ‘myIFFT’ to calculate the inverse DFT using the above logic.
  • 10. CIRCULAR CONVOLUTION USING DFT Circular Convolution The circular convolution, also known as cyclic convolution, of two aperiodic functions occurs when one of them is convolved in the normal way with a periodic summation of the other function. That situation arises in the context of the Circular convolution theorem. The identical operation can also be expressed in terms of the periodic summations of both functions, if the infinite integration interval is reduced to just one period. That situation arises in the context of the discrete-time Fourier transform (DTFT) and is also called periodic convolution. In particular, the transform (DTFT) of the product of two discrete sequences is the periodic convolution of the transforms of the individual sequences. Circular convolution using DFT can be calculated in many ways. Algorithm 1 In this, Let X1[n] and X2[n] be the two signals whose circular convolution we have to compute. We calculate the N point DFT of both the signals. It is important to calculate the same point DFT of both the signals. The number of points in the DFT is the period of the circular convolution obtained. Now multiply the DFT’s point wise. After this calculate IDFT of the resultant to get the required solution. Consider the number of computations if we do the DFTs using FFTs: Each transform requires O (NLog(N))operations, the multiplication is O(N) , and the inverse transform is O(NLog(N)) . The overall computation is O (NLog(N)), which saves a significant amount of time , specially for large N. Here is the matlab implementation of the above algorithm using the self designed DFT myfft.
  • 11. The code given below uses the inbuilt fft function.
  • 12. Algorithm 2 Circular convolution computed directly from its summation formula. The above algorithm has been implemented in the function mycconv. The function basically computes the value of circular convolution of the 2 functions from 0 to N-1 by actually evaluating the summation in an internal while loop. The first signal is treated as a finite hold signal and hence the upper and lower limits of the summation are N-1 and 0 rather than infinity and negative infinity. The second signal is assumed to be periodic with period N. Hence its arguments are taken modulo N. The order of the function coded above is O (N2). The computation of the convolved function at any point required computation of N products – x(0)y(n-0), x(1)y(n-1)…..x(n-1)y(1) and their summation i.e. O(N) operations. Since value of the convolved function needs to be computed at N pts, the overall order is O (N*N) =O (N2).
  • 13. Here, we have done circular convolution of sine and cosine. Period of convolution=150 Time for FFT based convolution=extremely small O( NlogN) Time for inefficient convolution (the one done in terms of linear convolution) =0.001594sec O(N2) Clearly, one can observe the huge time difference.
  • 14. LINEAR CONVOLUTION USING DFT Algorithm 1 The linear convolution equals the circular convolution provided the period of the circular convolution is large enough. To see this interpret the circular convolution as: The periodic extension of x2 is obtained by passing the discrete delta function through an LTI whose impulse response is x2. Since the circular convolution is nothing but the linear convolution of x1 with periodic extension of x2. It can be obtained as the response of an LTI with impulse response x1 to periodic x2. The response thus obtained is multiplied by a rectangular window of size N to extract a single period and hence find circular convolution. Since convolution is a commutative operation the order of these LTIs can be changed as:
  • 15. Now, circular convolution can be simply interpreted as a periodic extension of linear convolution. Now when 2 signals of M and L are convolved the linear convolution always has length M+L-1. If the period for extension of this linear convolution is more than or equal to M+L-1, then the various periods don’t interfere with each other and the linear convolution can be obtained as a one period extraction of circular convolution. If it is less than L+M-1 aliasing occurs between various periods and the linear convolution is lost. Hence to obtain linear convolution we find the circular convolution of the 2 signals with a period N>=L+M-1 say in particular L+M using the FFT based algorithm for circular convolution. We then extract the first L+M-1 samples from the circular convolution and obtain the linear convolution in the order of the DFT algorithm that is NlogN. We have implemented it using both myfft functions:
  • 16. And built in FFT function: Algorithm 2 Linear convolution computed directly from its summation formula. If we have 2 signals f and g of finite holds say L and M, all indices in the summation aren’t valid in fact the summation start index can be replaced by: Start=max (0, n-M+1) End=min (L-1, n) Where n denotes the value at which f*g is being evaluated. The program given below basically evaluates the summation explicitly using while loops. Like the circular convolution it takes O (N2) time.
  • 17.
  • 18. Here, we have done linear convolution between the exponential signal and the square signal. Time for FFT based convolution=0.0001153sec Time for inefficient convolution=0.0003166sec
  • 19. RELATIONSHIP BETWEEN DFT AND DTFT A finite duration discrete signal which is non zero only between 0 to N-1 can be represented in frequency domain using two transforms: The Discrete time Fourier transform which defines a corresponding function X (Ω): Since the signal is non zero beyond 0 and N-1, And Using the N-point DFT (N>signal length): The 2 equations simply show: What these means is that is nothing but the discretized version of , the number of equispaced samples being equal to N. Note that the samples are only taken between However, since is periodic with , these are sufficient. Since, it is possible to reconstruct the the signal using both its DFT and its DTFT it simply shows that the information contained in a continuous time signal can be stored by simply taking N samples provided N is greater than the signal length. This also suggests a method to approximate the DTFT plot in matlab by simply interpolating the N samples of the N point DFT. The greater are the number of samples i.e. greater the value of N, the more closely spaced samples are, and more continuous looking the DTFT plot is.
  • 20. The following figure shows the implementation: The first plot is the signal, the second the closest power of 2 DFT and the last the DTFT plot by taking at 1024 pt DFT.
  • 21. REFERENCES LITERARY RESOURCES  Signals and Systems, 2nd edition, Alan V. Oppenheim  The scientist and Engineer’s guide to digital signal processing, Steven Smith ONLINE RESOURCES  http://ocw.mit.edu/index.htm : Lectures By Alan Oppenheim on convolution  www.mathsworks.in  www.wikipedia.com  www.google.com  http://ee.sjtu.edu.cn  http://ee.sjtu.edu.cn/st/studio/my/9304/Fundamentals%20of%20Signal%20Processing/A.% 20Basics%20of%20Discrete%20Fourier%20Transform.pdf  http://www.physics.iitm.ac.in/~kavita/sujoyketan.pdf  http://www.ele.uri.edu/~hansenj/projects/ele436/fft.pdf