Lectur The Discr ete ourier ransf orm PDF document - DocSlides

Lectur The Discr ete ourier ransf orm PDF document - DocSlides

2014-12-14 104K 104 0 0


1 The DFT The Discrete ourier ransform DFT is the equi alent of the continuous ourier ransform for signals kno wn only at instants separated by sample times ie 64257nite sequence of data Let be the continuous signal which is the source of the d ID: 23810

Direct Link: Link:https://www.docslides.com/pasty-toler/lectur-the-discr-ete-ourier-ransf Embed code:

Download this pdf

DownloadNote - The PPT/PDF document "Lectur The Discr ete ourier ransf orm" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentations text content in Lectur The Discr ete ourier ransf orm

Page 1
Lectur The Discr ete ourier ransf orm 7.1 The DFT The Discrete ourier ransform (DFT) is the equi alent of the continuous ourier ransform for signals kno wn only at instants separated by sample times (i.e. finite sequence of data). Let  be the continuous signal which is the source of the data. Let samples be denoted            The ourier ransform of the original signal,  ould be "!$#%'& (*) ,.- +/102,3 could re gard each sample   as an impulse ha ving area  45 Then, since the inte grand xists only at the sample points: 6!$#%7& (98;: +=<>;? - +/A02B3  C  D- +/EGF   D- +/10H?IF    D- +/10J?IF   H- +/A0 8;: +=<>;? ie. "!$#%K& +=< JNMOE   D- +/10J? could in principle aluate this for an ut with only data points to start with, only final outputs will be significant. ou may remember that the continuous ourier transform could be aluated er finite interv al (usually the fundamental period rather than from QP to 82
Page 2
if the eform as periodic Similarly since there are only finite number of input data points, the DFT treats the data as if it were periodic (i.e.  to   H is the same as  R to  S H .) Hence the sequence sho wn belo in Fig. 7.1(a) is considered to be one period of the periodic sequence in plot (b). 10 11 0.2 0.4 0.6 0.8 (a) 10 15 20 25 30 0.2 0.4 0.6 0.8 (b) Figure 7.1: (a) Sequence of &TU samples. (b) implicit periodicity in DFT Since the operation treats the data as if it were periodic, we aluate the DFT equation for the fundamental frequenc (one ycle per sequence, Hz, VXW rad/sec.) and its harmonics (not for getting the d.c. component (or erage) at #Y&Z ). i.e. set #Y&Z [ H\ \ S] ^ \ ]`_  \ S]  U or in general & +=< JaMOE   D- +/$bdc egf &Z ih S H 83
Page 3
is the Discrete ourier ransform of the sequence   may write this equation in matrix form as: C    S  mn  prq Tp +=< pts pru Tp pvq prw Tp +=<   C         mn where &Zxy[z{ !\}| and &Zp etc. &~ DFT example Let the continuous signal be K& €‚ƒ dc „…$†UH\ ˆ‡ ‚ 1Hz FŠ‰ „…‹†OŒ\ ‚ 2Hz 10 −4 −2 10 Figure 7.2: Example signal for DFT Let us sample  at times per second (ie.  4Hz) from Ž&r to Ž& The alues of the discrete samples are gi en by:   &t $‘’5 “‡ F”‰ •$’\{ by putting &r–—& 84
Page 4
i.e.   ˜&t™   &šŒ   ›&t™  &Z &ZŒR Therefore &   d- +/c JNMOE   A ! C    mn mn  C       mn $ !RŒ H !RŒ mn The magnitude of the DFT coef ficients is sho wn belo in Fig. 7.3. 10 15 20 f (Hz) |F[n]| Figure 7.3: DFT of four point sequence In erse Discr ete ourier ransf orm The in erse transform of & +=< JaMOE   d- +/bdc egf 85
Page 5
is  4 & +=< MOE D-Uœ bdc ef i.e. the in erse matrix is times the comple conjugate of the original (symmet- ric) matrix. Note that the coef ficients are comple can assume that the  4 alues are eal (this is the simplest case; there are situations (e.g. radar) in which tw inputs, at each are treated as comple pair since the are the outputs from and demodulators). In the process of taking the in erse transform the terms and ž (re- member that the spectrum is symmetrical about combine to produce fre- quenc components, only one of which is considered to be alid (the one at the lower of the tw frequencies, _*] VXW Hz where _ Ÿ the higher frequenc component is at an aliasing frequenc y _Š )). From the in erse transform formula, the contrib ution to   of and  is:  & š D- bdc egf JF  D- bdc 8;: >"J (7.2) or all   real S & +=< JaMOE   D- +/bdc 8: >J But +/bdc 8: >J +/ VXW ‚ for all /$bdc &Z- /$bdc egf i.e. S & (i.e. the comple conjugate) 86
Page 6
Substituting into the Equation for  abo gi es, 4 & d- bdc egf JF .- +/ bdc egf JH since VXW &T ie.  ›&  „‘…‹† \ š †6 \ or  & T „‘…‹† \  F”$ d i.e. sampled sine at VXW Hz, of magnitude or the special case of &  Ž&S 4 (i.e. sum of all samples) and the contrib ution of C  to  4 is  &  —& erage of   & d.c. compo- nent. Inter pr etation of example 1. C  ›&r$ implies d.c. alue of C  & &r (as xpected) 2.  {& !RŒ& implies fundamental component of peak amplitude ‘ Œ&r with phase gi en by   ›& ‡ i.e. „…‹† \  ˆ‡ &tK„‘…‹†U Y‡ (as xpected) 3.  &H no other S component here) and this implies component  &  D- bdc e 4H d- ‘’\{ (as xpected) since †D\{i&t for all 87
Page 7
f (Hz) |F[n]| sqrt(2) 3/sqrt(2) Figure 7.4: DFT of four point signal. Thus, the con entional ay of displaying spectrum is not as sho wn in Fig. 7.3 ut as sho wn in Fig. 7.4 (ob viously the information content is the same): In typical applications, is much greater than for xample, for &U RŒ has U ‹Œ components, ut ^ U R are the comple conjugates of ^$ lea ving  E as the d.c. component, s{  < to sG  as complete a.c. com- ponents and  as the cosine-only component at the highest distinguishable frequenc Most computer programmes aluate  (or  for the po wer spectral den- sity) which gi es the correct shape for the spectrum, xcept for the alues at &Z and 7.2 Discr ete ourier ransf orm Err ors what de gree does the DFT approximate the ourier transform of the function underlying the data? Clearly the DFT is only an approximation since it pro vides only for finite set of frequencies. But ho correct are these discrete alues themselv es? There are tw main types of DFT errors: aliasing and leakage: 88
Page 8
7.2.1 Aliasing This is another manifestation of the phenomenon which we ha no encountered se eral times. If the initial samples are not suf ficiently closely spaced to represent high-frequenc components present in the underlying function, then the DFT al- ues will be corrupted by aliasing. As before, the solution is either to increase the sampling rate (if possible) or to pre-filter the signal in order to minimise its high- frequenc spectral content. 7.2.2 Leakage Recall that the continuous ourier transform of periodic eform requires the inte gration to be performed er the interv al to or er an inte ger number of ycles of the eform. If we attempt to complete the DFT er non-inte ger number of ycles of the input signal, then we might xpect the transform to be corrupted in some ay This is indeed the case, as will no be sho wn. Consider the case of an input signal which is sinusoid with fractional num- ber of ycles in the data samples. The DFT for this case (for & to is sho wn belo in 7.5. freq |F[n]| Figure 7.5: Leaka might ha xpected the DFT to gi an output at just the quantised frequen- 89
Page 9
cies either side of the true frequenc This certainly does happen ut we also find non-zero outputs at all other frequencies. This smearing ef fect, which is kno wn as leakage, arises because we are ef fecti ely calculating the ourier series for the eform in Fig. 7.6, which has major discontinuities, hence other frequenc components. 10 15 20 25 30 35 40 45 50 −1 −0.5 0.5 Figure 7.6: Leaka The epeating waveform has discontinuities. Most sequences of real data are much more complicated than the sinusoidal se- quences that we ha so ar considered and so it will not be possible to oid in- troducing discontinuities when using finite number of points from the sequence in order to calculate the DFT The solution is to use one of the window functions which we encountered in the design of FIR filters (e.g. the Hamming or Hanning windo ws). These windo functions taper the samples to ards zero alues at both endpoints, and so there is no discontinuity (or ery little, in the case of the Hanning windo w) with hypothetical ne xt period. Hence the leakage of spectral content ay from its correct location is much reduced, as in Fig 7.7. (a) (b) Figure 7.7: Leaka is educed using Hanning window 90
Page 10
7.3 The ast ourier ransf orm The time tak en to aluate DFT on digital computer depends principally on the number of multiplications in olv ed, since these are the slo west operations. ith the DFT this number is directly related to (matrix multiplication of ector), where is the length of the transform. or most problems, is chosen to be at least 256 in order to get reasonable approximation for the spectrum of the sequence under consideration hence computational speed becomes major con- sideration. Highly ef ficient computer algorithms for estimating Discrete ourier rans- forms ha been de eloped since the mid-60 s. These are kno wn as ast ourier ransform (FFT) algorithms and the rely on the act that the standard DFT in- olv es lot of redundant calculations: Re-writing ›& +=< JaMOE   D- +/ bdc as & +=< JNMOE   dp it is easy to realise that the same alues of are calculated man times as the computation proceeds. Firstly the inte ger product repeats for dif ferent com- binations of and secondly is periodic function with only distinct alues. or xample, consider &9™ (the FFT is simplest by ar if is an inte gral po wer of 2) &t- +/ bdc &t- +/ X &Z= say Then Rq& !5i& &! 5%&!5&9 &~ From the abo e, it can be seen that: 91
Page 11
pts pv pvq Also, if alls outside the range 0-7, we still get one of the abo alues: g. if &t and i&r^ &t & sŽ &t 7.3.1 Decimation-in-time algorithm Let us be gin by splitting the single summation er samples into summations, each with samples, one for en and the other for odd. Substitute S& for en and S& J‘+=< for odd and write: & +=< MOE  4ϸ dp +=< MOE    dp <> Note that &t- +/ bdc &9- +/ bdc &rp Therefore & +=< MOE  4ϸ dp +=< MOE    dp ie. &t :i Thus the -point DFT can be obtained from tw -point transforms, one on en input data, and one on odd input data, Although the fre- quenc inde ranges er alues, only alues of and need to be computed since and are periodic in with period or xample, for &9™ 92
Page 12
en input data     d Œ$   odd input data   d d 4H    ›&t  C  ‘ ›&t   4H ›&t 4  ›&t prq CŒ ›&t  pts C  ›&t C  C  4H ›&t   ›&t    ›&t 4  ›&t   4H ›&t pv ›&t prq This is sho wn graphically on the flo graph of Fig 7.8: N/2 point DFT N/2 point DFT f[0] f[2] f[3] f[4] f[6] f[1] f[5] f[7] H[0] H[3] G[3] G[0] F[0] F[7] Figure 7.8: FFT flow gr aph 1. Assuming than is po wer of we can repeat the abo process on the tw -point transforms, breaking them do wn to -point transforms, etc  until we come do wn to -point transforms. or &™ only one further stage is needed (i.e. there are stages, where &ZH ), as sho wn belo in Fig 7.9. Thus the FFT is computed by di viding up, or decimating the sample sequence   into sub-sequences until only -point DFT remain. Since it is the input, or time, samples which are di vided up, this algorithm is kno wn as the decimation- in-time (DIT) algorithm. (An equi alent algorithm xists for which the output, or frequenc points are sub-di vided the decimation-in-frequenc algorithm.) The basic computation at the heart of the FFT is kno wn as the utterfly because of its criss-cross appearance. or the DIT FFT algorithm, the utterfly computa- tion is of the form of Fig 7.10 93
Page 13
N/4 point DFT N/4 point DFT N/4 point DFT N/4 point DFT f[0] f[4] f[2] f[6] f[1] f[5] f[3] f[7] F[0] F[7] Figure 7.9: FFT flow gr aph 2. p* p* R R Figure 7.10: Butterfly oper ation in FFT where and are comple numbers. Thus utterfly computation requires one comple multiplication and comple additions. Note also, that the input samples are bit-re ersed (see table belo w) because at each stage of decimation the sequence input samples is separated into en- and odd- inde ed samples. NB the bit-re ersal algorithm only applies if is an inte gral po wer of ). 94
Page 14
Inde [ Binary Bit-re ersed Bit-re ersed representation Binary inde 000 000 001 100 010 010 011 110 100 001 101 101 110 011 111 111 7.3.2 Computational speed of FFT The DFT requires comple multiplications. At each stage of the FFT (i.e. each halving) comple multiplications are required to combine the results of the pre vious stage. Since there are BBU stages, the number of comple mul- tiplications required to aluate an -point DFT with the FFT is approximately |‹BU (approximately because multiplications by actors such as and p are really just comple additions and subtractions). (DFT) ,U (FFT) sa ving 32 1,024 80 92 256 65,536 1,024 98 1,024 1,048,576 5,120 99.5 7.3.3 Practical considerations If is not po wer of there are strate gies ailable to complete an -point FFT 1. tak adv antage of such actors as possesses. or xample, if is di visi- ble by (e.g. &ŒR™ ), the final decimation stage ould include -point transform. 95
Page 15
2. pack the data with zeroes; e.g. include 16 zeroes with the 48 data points (for &vŒR™ and compute $Œ -point FFT (Ho we er you should again be ary of abrupt transitions between the trailing (or leading) edge of the data and the follo wing (or preceding) zeroes; better approach might be to pack the data with more realistic dummy alues). 96

About DocSlides
DocSlides allows users to easily upload and share presentations, PDF documents, and images.Share your documents with the world , watch,share and upload any time you want. How can you benefit from using DocSlides? DocSlides consists documents from individuals and organizations on topics ranging from technology and business to travel, health, and education. Find and search for what interests you, and learn from people and more. You can also download DocSlides to read or reference later.