Signal Processing and Linear Systems-B.P.Lathi copy

P lot t he resulting fourier spectra t he matlab

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ir s amples, they m ust b e s ampled a t t he s ame r ate ( not below t he N yquist r ate o f e ither signal). Let i k (0 ::; k :::; N l - 1) a nd 9k (0 ::; k ::; N2 - 1) b e t he c orresponding discrete sequences representing these samples. Now, C(t) = f (t) a nd if we d efine three sequences as i k t hent = T f(kT), Ck = tWe can show t hat 4 this equation. Ck = l imT_o!k * 9 (t) We generally t hink o f filtering in t erms of some hardware-oriented solution (namely, building a circuit w ith R LC c omponents a nd o perational amplifiers). However, filtering also has a software-oriented solution [a c omputer a lgorithm t hat yields t he filtered o utput y (t) for a given i nput f (t) J. T his goal c an b e c onveniently accomplished by using t he D FT. I f f (t) is t he s ignal t o b e filtered, t hen Fro t he D FT o f ik, is found. T he s pectrum Fr is t hen s haped (filtered) as desired by multiplying F r by Hro where H r a re t he s amples of t he filter t ransfer f unction H (w) [Hr = H (rwo)J. Finally, we t ake t he I DFT of F rHr t o o btain t he filtered o utput Yk [Yk = T y(kT)J. T his p rocedure is d emonstrated i n t he following example. • E xample 5 .8 T he signal f (t) in Fig. 5.18a is passed through an ideal lowpass filter of transfer function H{w) depicted in Fig. 5.18b. Using DFT, find the filter output. We have already found the 32-point DFT of f (t) (see Fig. 5.16d). Next we multiply Fr by Hr. To find H r , we recall using Fo = ~ in computing the 32-point DFT of f (t). Because Fr is 32-periodic, Hr must also be 32-periodic with samples separated by Hz. This fact means t hat Hr must be repeated every 8 Hz or 1611' r ad/s (see Fig. 5.18c). The resulting 32 samples of H r over (0 ~ w ~ 1611') are as follows: i Hr = 9k = T 9(kT), a nd Ck = T c(kT), i k * 9k * 9k. Because T # 0 in practice, there will be some error in {~ 0.5 o ~ r ::; 7 9 and 25::; r ::; 31 23 r = 8 ,24 ~ r ~ We multiply Fr with Hr. The desired output signal samples Yk are found by taking the inverse DFT of F rH r . The resulting output signal is illustrated in Fig. 5.18d. Table 5.1 gives a printout of h , F r , H r , Yr , and Yk . • 352 5 Sampling 8 I (t) 1 H (ro) (a) 5.3 T he F ast Fourier Transform ( FFT) ( b) f, No. 0 I 2 3 - 0.5 0.5 -2 t- 5 7 8 9 10 \I - 40 - 32 - 24 - 16 - 10 -8 -6 -4 -2 16 r _ o 2 24 32 40 4 :I'(Hz) 4 - 8-4 ..? 8 12 \3 I' 15 16 17 18 19 20 21 (c) 10 22 j\ - 16 ..•. - 8 ..•. o F ig. 5.18 .8 16 31 Filtering f (t) through H(w). o C omputer E xample C 5.3 Solve Example 5.8 using MATLAB. The MATLAB program of Example C5.2, where we obtained the 32-point F r , should be saved as an m-file, e.g., 'c52.m'. We can import Fr in the MATLAB environment by the command 'c52'. c52; N O=32;k=0:NO-1; H =[Ones(1,8) 0 .5 z eros(1,15) 0.5 o nes(1,7)]; Y r=H.*Fr; y k= ifft ( Yr); s tem(k,yk) 0 5.3 T he F ast Fourier Transform (FFT) T he n umber of computations required in performing the D FT was dramatically reduced by a n a lgorithm developed by Tukey a nd Cooley in 1965. 5 T his al...
View Full Document

This note was uploaded on 04/14/2013 for the course ENG 350 taught by Professor Bayliss during the Spring '13 term at Northwestern.

Ask a homework question - tutors are online