EECE 301 Signals & Systms Prof. Mark Fowlr ot St #25 D-T Signals: Rlation btwn DFT, DTFT, & CTFT Rading Assignmnt: Sctions 4.2.4 & 4.3 of Kamn and Hck 1/22
Cours Flow Diagram Th arrows hr show concptual flow btwn idas. ot th paralll structur btwn th pink blocks (C-T Frq. Analysis) and th blu blocks (D-T Frq. Analysis). w Signal Modls Ch. 1 Intro C-T Signal Modl Functions on Ral Lin Systm Proprtis LTI Causal Etc Ch. 3: CT Fourir Signal Modls Fourir Sris Priodic Signals Fourir Transform (CTFT) on-priodic Signals Ch. 2 Diff Eqs C-T Systm Modl Diffrntial Equations D-T Signal Modl Diffrnc Equations Zro-Stat Rspons Ch. 5: CT Fourir Systm Modls Frquncy Rspons Basd on Fourir Transform w Systm Modl Ch. 2 Convolution C-T Systm Modl Convolution Intgral Ch. 6 & 8: Laplac Modls for CT Signals & Systms Transfr Function w Systm Modl w Systm Modl D-T Signal Modl Functions on Intgrs w Signal Modl Powrful Analysis Tool Zro-Input Rspons Charactristic Eq. Ch. 4: DT Fourir Signal Modls DTFT (for Hand Analysis) DFT & FFT (for Computr Analysis) D-T Systm Modl Convolution Sum Ch. 5: DT Fourir Systm Modls Frq. Rspons for DT Basd on DTFT w Systm Modl Ch. 7: Z Trans. Modls for DT Signals & Systms Transfr Function w Systm Modl 2/22
W can us th DFT to implmnt numrical FT procssing This nabls us to numrically analyz a signal to find out what frquncis it contains!!! sampls ar FFT algorithm A CT signal coms in through a snsor & lctronics (.g., a microphon & amp) dumpd into a mmory array computs DFT valus ADC x (t) x[n] Th ADC crats sampls (takn at an appropriat F s ) Insid Computr x[0] x[1] x[2] x[-1] mmory array DFT Procssing (via FFT) H/W or S/W on procssor [0] [1] [2] [-1] mmory array DFT valus in mmory array (thy can b plottd or usd to do somthing nat ) 3/22
If w ar doing this DFT procssing to s what th original CT signal x(t) looks lik in th frquncy domain w want th DFT valus to b rprsntativ of th CTFT of x(t) Likwis If w ar doing this DFT procssing to do som nat procssing to xtract som information from x(t) or to modify it in som way w want th DFT valus to b rprsntativ of th CTFT of x(t) So w nd to undrstand what th DFT valus tll us about th CTFT of x(t) W nd to undrstand th rlations btwn CTFT, DTFT, and DFT 4/22
W ll mathmatically xplor th link btwn DTFT & DFT in two cass: 1. For x[n] of finit duration: 0 0 x[0] x[1] x[2]... [ 1] 0 0 non-zro trms (of cours, w could hav som of th intrior valus 0) For this cas w ll assum that th signal is zro outsid th rang that w hav capturd. So w hav all of th maningful signal data. This cas hardly vr happns but it s asy to analyz and provids a prspctiv for th 2 nd cas 2. For x[n] of infinit duration or at last of duration longr than what w can gt into our DFT Procssor insid our computr. So w don t hav all th maningful signal data. This is th practical cas. What ffct dos that hav? How much data do w nd for a givn goal? 5/22
DFT & DTFT: Finit Duration Cas If x[n] 0 for n < 0 and n thn th DTFT is: ( Ω) n x[ n] jωn 1 n 0 x[ n] jωn w can lav out trms that ar zro -π ow if w tak ths sampls and comput th DFT (using th FFT, prhaps) w gt: 1 j2πkn / [ k] x[ n] k 0,1,2,..., 1 n 0 2π Comparing ths w s that for th finit-duration signal cas: [ k] ( k ) (Ω) -π/2 [k] 0 1 2 3 4 5 6 7 π/2 π 2π k Ω DTFT & DFT : DFT points li xactly on th finit-duration signal s DTFT!!! 6/22
Summary of DFT & DTFT for a finit duration x[n] x[n] DTFT DFT (Ω) [ k] k 2π Points of DFT ar sampls of DTFT of x[n] Th numbr of sampls sts how closly spacd ths sampls ar on th DTFT sms to b a limitation. Zro-Padding Trick Aftr w collct our sampls, w tack on som additional zros at th nd to trick th DFT Procssing into thinking thr ar rally mor sampls. (Sinc ths ar zros tackd on thy don t chang th valus in th DFT sums) If w now hav a total of Z sampls (including th tackd on zros), thn th spacing btwn DFT points is 2π/ Z which is smallr than 2π/ 7/22
Ex. 4.11 DTFT & DFT of puls 1, n 0,1,2,...2q x[ n] 0, othrwis Rcall : 1, p q [ n] 0, n q,, 1, othrwis 0, 1,, q Thn x[ n] pq[ n q] ot: w ll nd th dlay proprty for DTFT From DTFT Tabl: p q [ n] P ( Ω) q sin[( q + 0.5) Ω] sin[ Ω / 2] From DTFT Proprty Tabl (Dlay Proprty): ( Ω) sin[( q + 0.5) Ω] sin[ Ω / 2] jqω Sinc x[n] is a finit-duration signal thn th DFT of th 2q+1 non-zro sampls is just sampls of th DTFT: [ k] k 2π [ k] sin[( q +.5)2πk / sin[ πk / ] ] jq2πk / 8/22
ot that if w don t zro pad, thn all but th k 0 DFT valus ar zro!!! That dosn t show what th DTFT looks lik! So w nd to us zro-padding. Hr ar two numrically computd xampls, both for th cas of q 5: For th cas of zropadding 11 zros onto th nd of th signal th DFT points still don t rally show what th DTFT looks lik! For th cas of zropadding 77 zros onto th nd of th signal OW th DFT points rally show what th DTFT looks lik! DFTs wr computd using matlab s fft command s cod on nxt slid 9/22
Comput th DTFT Equation drivd for th puls. Using ps adds a vry small numbr to avoid gtting Ω 0 and thn dividing by 0 omgaps+(-1:0.0001:1)*pi; q5; % usd to st puls lngth to 11 points sin((q+0.5)*omga)./sin(omga/2); subplot(2,1,1) plot(omga/pi,abs()); % plot magn of DTFT xlabl('\omga/\pi (ormalizd rad/sampl)') ylabl(' (\Omga) and [k] ') hold on xzros(1,22); % Initially fill x with 22 zros x(1:(2*q+1))1; % Thn fill first 11 pts with ons kfftshift(fft(x)); % fft computs th DFT and fftshift r-ordrs points % to btwn -pi and pi omga_k(-11:10)*2*pi/22; % comput DFT frquncis, xcpt mak thm % btwn -pi and pi stm(omga_k/pi,abs(k)); % plot DFT vs. normalizd frquncis hold off subplot(2,1,2) plot(omga/pi,abs()); xlabl('\omga/\pi (ormalizd rad/sampl)') ylabl(' (\Omga) and [k] ') hold on xzros(1,88); x(1:(2*q+1))1; kfftshift(fft(x)); omga_k(-44:43)*2*pi/88; stm(omga_k/pi,abs(k)); hold off Mak th zro-paddd signal Comput th DFT Comput th DFT point s frquncy valus and plot th DFT 10/22
Important Points for Finit-Duration Signal Cas DFT points li on th DTFT curv prfct viw of th DTFT But only if th DFT points ar spacd closly nough Zro-Padding dosn t chang th shap of th DFT It just givs a dnsr st of DFT points all of which li on th tru DTFT Zro-padding provids a bttr viw of this prfct viw of th DTFT 11/22
DFT & DTFT: Infinit Duration Cas As w said in a computr w cannot dal with an infinit numbr of signal sampls. So say thr is som signal that gos on forvr (or at last continus on for longr than w can or ar willing to grab sampls) x[n] n, -3, -2, -1, 0, 1, 2, 3, W only grab sampls: x[n], n 0,, 1 W v lost som information! W can dfin an imagind finit-duration signal: W can comput th DFT of th collctd sampls: x[ n], x [ n] 0, [ k] n 1 0 x [ n] n lswhr j2πnk / 0,1,2,..., k 1 0,1,..., 1 Q: How dos this DFT of th truncatd signal rlat to th tru DTFT of th full-duration x[n]? which is what w rally want to s!! 12/22
"Tru" DTFT : ( Ω) n x[ n] jωn What w want to s DTFT of truncatd signal : ( Ω) n 1 n 0 x x[ n] [ n] jωn jωn A distortd vrsion of what w want to s DFT of collctd signal data : [ k] 1 n 0 x[ n] j2πkn / What w can s DFT givs sampls of So DFT of collctd data givs sampls of DTFT of truncatd signal Tru DTFT DFT of collctd data dos not prfctly show DTFT of complt signal. Instad, th DFT of th data shows th DTFT of th truncatd signal So our goal is to undrstand what kinds of rrors ar in th truncatd DTFT thn w ll know what rrors ar in th computd DFT of th data ( Ω) 13/22
To s what th DFT dos show w nd to undrstand how (Ω) rlats to (Ω) First, w not that: x [ n] x[ n] p q [ n q] DTFT P ( Ω) q sin sin [ Ω / 2] [ Ω / 2] j( 1) Ω / 2 with 2q+1 From mult. in tim domain proprty in DTFT Proprty Tabl: ( ) ( Ω) P ( Ω) Ω q Convolution causs smaring of (Ω) So (Ω) which w can s via th DFT [k] is a smard vrsion of (Ω) Fact : Th mor data you collct, th lss smaring bcaus P q (Ω) bcoms mor lik δ(ω) 14/22
Suppos th infinit-duration signal s DTFT is: (Ω) DTFT of infinitduration signal 2π π π 2π Ω Thn it gts smard into somthing that might look lik this: (Ω) DTFT of truncatd signal 2π π π 2π Ω Thn th DFT computd from th data points is: [k] 2π π π 2π Ω Th DFT points ar shown aftr uppr points ar movd (.g., by matlab s fftshift 15/22
Exampl: Infinit-Duration Complx Sinusoid & DFT Suppos w hav th signal jωon x[ n] n..., 3, 2, 1,0,1,2,... and w want to comput th DFT of collctd sampls (n 0, 1, 2,, -1). This is an important xampl bcaus in practic w oftn hav signals that consists of a fw significant sinusoids among som othr signals (.g. radar and sonar). In practic w just gt th sampls and w comput th DFT but bfor w do that w nd to undrstand what th DFT of th sampls will show. So w first nd to thortically find th DTFT of th infinit-duration signal. From DTFT Tabl w hav: (Ω) ( Ω) δ ( Ω Ω0), π < Ω < π priodic lswhr 2π π Ω o π 2π Ω 16/22
From our prvious rsults w know that th DTFT of th collctd data is: ( Ω) sin ( Ω) sin [ Ω / 2] j( 1) Ω / 2 [ Ω / 2] P q (Ω) Just Dlta s in hr Us Sifting Proprty!! δ ( Ω Ω0), π < Ω < π ( Ω) priodic lswhr Just a shiftd vrsion of P q (Ω) ( Ω) ( Ω Ω0) sin 2 ( Ω Ω0) sin 2 priodic lswhr j( 1)( Ω Ω 0 ) / 2, π < Ω < π This is th DTFT on which our data-computd DFT points will li so looking at this DTFT shows us what w can xpct from our DFT procssing!!! 17/22
Tru DTFT of Infinit Duration Complx Sinusoid ( Ω) δ ( Ω Ω0), π < Ω < π priodic lswhr Ω Ω 0 DTFT of Finit umbr of Sampls of a Complx Sinusoid ( Ω Ω0) sin 2 ( Ω) ( Ω Ω0) sin 2 priodic lswhr j( 1)( Ω Ω 0 ) / 2, π < Ω < π Digital Frquncy Ω (rad/sampl) Ω 0 Th computd DFT would giv points on this curv th spacing of points is controlld through zro padding 18/22
So what ffct dos our choic of hav??? To answr that w can simply look at P q (Ω) for diffrnt valus of 2q+1 D(θ,41) P q (Ω) P D(θ,11) q (Ω) 15 10 5 0-5 -3-2 -1 0 1 2 3 θ/π 60 40 41 20 0 11-20 -3-2 -1 0 1 2 3 θ/π As grows looks mor lik a dlta!! So lss smaring of (Ω)!! 19/22
Important points for Infinit-Duration Signal Cas 1. DTFT of finit collctd data is a smard vrsion of th DTFT of th infinit-duration data 2. Th computd DFT points li on th smard DTFT curv not th tru DTFT a. This givs an imprfct viw of th tru DTFT! 3. Zro-padding givs dnsr st of DFT points a bttr viw of this imprfct viw of th dsird DTFT!!! 20/22
Connctions btwn th CTFT, DTFT, & DFT x(t) ADC x[n] Fs / 2 ( f ) CTFT Fs / 2 (Ω)Full Aliasing f DTFT x[0] x[1] x[2] x[-1] Insid Computr DFT procssing [0] [1] [2] [-1] π π Look hr to s aliasd viw of CTFT Ω (Ω) Truncatd Smaring DTFT [ k] Computd DFT π π Ω π π Ω 21/22
Errors in a Computd DFT CTFT DTFT DTFT DFT Aliasing Error control through F s choic (i.. through propr sampling) Smaring Error control through Grid Error control through choic window choic choic zro padding S DSP cours This is th only thing w can comput from data and it has all ths rrors in it!! Th thory covrd hr allows an nginr to undrstand how to control th amount of thos rrors!!! Zro padding trick Collct sampls dfins (Ω) Tack M zros on at th nd of th sampls Tak ( + M)pt. DFT givs points on (Ω) spacd by 2π/(+M) (rathr than 2π/) 22/22