Lecture 9 Outlie: Block-by Block Covolutio, FFT/IFFT, Digital Spectral Aalysis Aoucemets: Readig: 5: The Discrete Fourier Trasform pp. 3-5, 8, 9+block diagram at top of pg, pp. 7. HW 6 due today with free etesio to Thurs. 5pm Graded midterms ready for pickup (with TAs after class or from Julia) Eample of Liear Covolutio from Circular Block-by-block covolutio: Overlap/Add FFT/IFFT ad its Compleity Digital Spectral Aalysis
Midterm Postmortem Graded midterms/sols available (from TAs/Julia) Gradig Histogram?? Media: 65.5 Mea: 67.77 Std. Dev: 4.46 Low: 4 High: 98 Regrade requests must be submitted i writig Describe gradig error that occurred; partial credit fied Course grade from all coursework: B+ class average Before etra credit; etra credit poits added to HW grade
Review of Last Lecture Computig circular covolutio: Liearly covolve ~ ad ~ Place sequeces o circle i opposite directios, sum up all pairs, rotate outer sequece clockwise each time icremet N N m ~ m~ m N otherwise Liear Covolutio usig Circular Covolutio zp Zero pad [] by appedig P- zeros: Zero pad h[] by appedig L- zeros: Both sequeces are of legth M=L+P-, same as y[] Take circular covolutio of zero padded sequeces This yields the liear covolutio: y h zp h M zp hzp * h L L L P P P L P M otherwise
Eample: Liear from Circular Liear Covolutio 3 3 4 5 [ ] L=4 P=6 3 4 4 5 6 3 4 4 3 [] * [] 7 8 4 4 6 3 4 5 Liear from Circular with Zero Paddig M=L+P-=9, zp 9, zp 3, zp 3 4 5 4 5 6 7 8, zp [ 6 7 8 ] = =
Block Covolutio usig Overlap Methods Wat block-by-block liear covolutio for log sequeces Uses fied hardware. Has fied delay/compleity Goal: compute liear covolutio of [] ad y[] [] very log, h[] has legth P Wat to break [] ito shorter blocks ad compute portios of y[] block-by-block. Overlap-Add Method y * h mh m mhm m Breaks [] ito o-overlappig segmets of legth L: rl r L r Covolve each segmet with h[] ad sum: These covolutios computed usig DFT: r zp otherwise P m h N h FFT FFT * r,zp y r r * h * h FFTh r,zp zp r r
Overlap-Save (Not resposible for this topic; pp. 5-6) Breaks [] ito segmets of legth L>P, each segmet overlappig with previous oe at P- poits Perform L-poit circular covolutio of each segmet with zero-padded filter h[] (usig DFT): y L r p r hzp, Idetify portio of each circular covolutio that correspods to a liear covolutio, ad save it. First P poits are uusable, while the remaiig L P + poits correspod to a liear covolutio. Thus, we save L P + poits from each circular covolutio. yr, p P L y r otherwise Because first P poits are uusable, the iput segmets must overlap at P poits. y y rl P P r r
Blocklegth Choice I overlap methods, several factors affect the choice of the block legth L a shorter block legth miimizes latecy. a shorter block legth miimizes memory required for performig the FFTs, multiplicatio, ad iverse FFT. Give P (legth of h[]), there is a optimal block legth L that miimizes compleity. L too short, compleity icreased by overhead of adjacet block overlap L too log, compleity icreased because FFT compleity icreases with the block legth I practice, set block legth so that FFT blocklegth is a iteger power of (required for FFTs)
FFT ad IFFT Algorithms FFT computes the DFT of a sequece, IFFT N N k computes the iverse DFT: X k W N X k DFT as matri operatio: N comple multiplies (lect. 6) Compleity of FFT ad IFFT same: FFT/IFFT breaks dow a DFT with N comple multiplies ito may smaller DFTs with N multiplies Reduces compleity of computig N-poit DFT or IDFT from N comple multiplies to.5nlog N N N N log N N N log N 6 56 3 8. 8 6,384 448 36.6,4,48,576 5, 4.8 8,9 67,8,864 53,48 6.3 N k DFT k W * X k DFT X k - I 994 Strag described the FFT as "the most importat umerical algorithm of our lifetime - Icluded i Top Algorithms of th Cetury by IEEE Joural of Computig i Sciece ad Egieerig N N *
Digital Spectral Aalysis (ppt slide oly) Ati-Aliasig Origial CT Sigal ct X c j t, tt Lowpass Filter sct Sc j j H aa Filtered CT Sigal Sampled Sigal t T A B Form Block of Legth L Block of L Sigal Samples, L C...... Widow of Legth L, L w Sampled, Widowed Sigal v w Aalog spectrum aalysis: D Zero-Pad To Legth N L Aalog sigal iput to a arrow BPF with tuable ceter frequecy. The ceter frequecy is swept over some rage Sigal recorded (amplitude ad phase) to obtai CTFT estimate Ca be used at ay frequecy rage: audio, radio ad microwave, optical, Digital spectrum aalysis is as show i the block diagram Sampler (ADC) techology limited to ~ GHz; sigals with BW>5 GHz distorted Widowig reduces distortio of FIR approimatio to IIR sigal Digital spectrum aalysis is cheaper, smaller, ad cosumes less power tha aalog Used by all small electroic devices that must do spectrum aalysis (e.g. WiFi) v L L N E N-Poit Block of N Spectral Samples V k, k N F DFT
Mai Poits For liear covolutio of log sequeces, computatio is doe i L-legth blocks usig overlap-add or overlap-save Methods are very similar, differ i where overlap is itroduced Choice of L optimizes tradeoff i latecy, memory, ad compleity The FFT ad IFFT drastically reduce the compleity of the DFT/IDFT computatio These algorithms are resposible for the widespread use of digital sigal processig i today s electroic devices Usig low-compleity FFTs ad IFFTs, spectral aalysis ca be doe with low-cost, low-power, small devices