1-4 1676827348074

You might also like

Download as pdf
Download as pdf
You are on page 1of 9
sganpiee S20R628 o vasee gin OCF) seude/phase 1 arid jecpnase Ji (oath) sea Nr eoretcehiai arier Transform spyn (232) RVD 32) 0-95 petiesic, sinewidth Because Gi is No-petioic. Gy = Gig+ 24) go that Gago = Go- Hences we cover the rane ¢ vl 296), Moreover, because of this periodicity, Gog = eet 27 —1 ae iene tO Ue over the range 61300 C1 In addition, because of Magnitude BO MATIAB Exercises 163 ef cojugte symmetry of the Fourier wansform, Gy = flows hat Ge = han G0 Gh gs ns Gass = Gf. Thus, he plots beyond = No/2 (126 in this cane are ct necessary for real Sil ncn heya conjugate fy fr 0 128 en ‘The plo of ti Fourier spesita n Fig 3.45 shows the smnpesof magni aed phase of GU) 2th feral 1/7909 Hor om = 1 70h a nF 338 we hve sow ont 2p rate tan 128 pois) ara to much cowsing of he a ae Trthisexampe vo saew Gop baertand and beac oak nelget coins or Bt the sampling recency In practice we gral do nt know GU) bapa é fat tat the very thing we ore trying to determine. In such a case, we must make an intelligent guess Cor B OF {Gtvomclcunuant oritenes We hel ten on ret tevae of Tan compu the rarsform lh ei saves whine dese rer of sigan cigs a ‘Next, we compute the Foutier transform of g@ = 8T1(/r)- COMPUTER EXAMPLE C3.2 Use DFM (implemenisd by the FFT algoridhm) to compute the Fourier transform of 8T(¢/). Plot the resulting Fourier spectra and compare agains the theorsical values. ‘This rectangular signa ard its Fourice transform are shown in Figs. 3.8a and b, respectively. To determine the value ofthe sampling interval 7s, we must frst decide on the essential bandwidth B, From Fig. 38b, we see that GY) decays rather slowly with /. Hence, the essential bandh 2B ig rather lange. For insiance, ar 15 $/z Wz. (97.39 rads), GC) = 0.1683, which is about 2% Of the peak at G(0). Hence, th essential andwidth may be taken as 16/c Hz, However, we shall delinarately take B=) ta Show the effect of aliasing withoot requiring a large number of samples. The choice of B= 4x results in the sampling interval 7, = 1/28 = ¢/8. Looking again at the spectrum in Fig. 3.8, we see that the choice of the frequency resolution fp = 0.25/r Ha is reasonable. This will give four samples in each lobe of G(f). This choice iets us consider the total signal interval of 7p = 1/fo =r seconds end No = 1/1, = 32 samples in DFT. Also, sr = Tah) = 5 atk) Since g() = AN), the values of gy are 41/8, 0, or x16 (tthe points of disconsinuty) as shown in Fig. 3.46 inthis figure, gy is shown asa function of «us well ws k for convenience. {In he derivation ofthe DET, we assumed that g¢ begins at = 0 (Fig, 3.440) and then took Np ‘samples over the interval (0, To). However, the current g(¢) begins at —4P. "This difficulty is easily resolved when we realize thatthe DFT found by this procedure is actually the DFT of gy repeating Deriocically every 7p seconds. From Fig, 3.46, its lear that repeating the segment of gy over the interval from =2r t0 2x seonds perioically is identical to repeating the segment of gy over the {nerval from to Tp = 4 seconds. fence, the DET ofthe samples taken from —2r to 2¢ seconds ‘isthe same as tha of the samples taken from 0 4r seconds, Therefore, regardless of where g) stars, we can always take the samples of gy and its periodic extension over the interval from 0 to Ty =4r. In the present example, the Np = 32 sample values of gy are 1 OSk<3 and 29 )"Pont6ize’,10): Jaxdaber ((\ieC6)) Had # Labet linewidth’ ,1); set width set (Figtdi, ‘Linewidth',2); set (figtal set (£igfd2, ‘Linewldth’,2)) met (figfd3,‘Linewidth’,2); set width eS els 169 3.10 MATLAB Exercises tiele(“Time response’) ;xlabel (“(\ietr)) ec./)4 vlabel (VEC) C\LECEY Te ‘set (gea, ‘FontName’, "Pimes', "Fontsize’,10) 7 subplot (342), figid2_testen(Evec,an, "b"}1 hold ons subplot (312) ;figf42 2=plot(tvec,Gm, ‘b:'):gridi fe subplot 312) ;sigfaactepior(enmoscf,"t')1. analyeial vale Eitle(/Amplitude response’) ;x1abel(’(\4t (£3) H2')7 ylabel (“| (it (G))( (\4t(£))) [97 set (gea, "FontName’, “Pinec’, 'Fontsize’ 10); subplot (313), figfdpl=stem(Fvec,cp,’b’}; hold on; figédp2=plot |fvec, angle(Gfdlay) ); ylabol (\theca_(\it(a}}( (\S€(£)))‘): title(’ Phase response’) ;xlabel (’(\it(£}) Hz"): set (Eigtd2 1, ‘Linewidth*,2); set(figfd2_1, 'Linowidth’ 1); set (figf82_2, ‘Linewidch’,2); set (tigea2_3, ‘Linewidth',2)1 set (Eicfdp?, ‘Linewidth’,2) ;set (figédp2, “Linewidth’ 2); 3.10.3 Filtering ‘We generally think of filtering in terms of a hardware-oriented solution (namely, building a citouit with electronic components and operational amplifiers). However, filtering. also has. a sofiware-oriented solution {a computer algorithm that yields the filtered output y(f) for a given input 4(A)], This ean be conveniently accomplished by using the DET. If g(¢) is the signal to be filtered, then Gy, the DFT of gi, is found. The spectrum G, is then shaped (filtered) as desired by multiplying G by H., where H, are the samples of the filter transfer function H(A) [fla = H(afo)]. Finally, we take the IDFT of GyHy to obtain the filtered output debe = Tz (kT)]. This procedure is demonstrated in the following example. COMPUTER EXAMPLE C3. The signal ¢() in Computer Example C32 has the DFT shown inthe top graph of Fig. 3.49, Swictly speaking, this signal does not have limited bandwicib. However, its high-fequency components are veryweakas parte £8( 5s passed through an ideal lowpass filter of bandwidth 2/r, that is, at the Second 2ero-crossing, Using FFT and direct convolution, find the output signal y(t) of this filter siven inpul signal AN), mass _ He have already found the 32-poim DFT of g() (see Fig. 3.46), Next we multipl i 46), Next we multiply Gy by the ideal lows flee ea Hy a compute Ha, ve remember that in computing the 32-puint DFT ot (1, ‘We have used fp = 0.25/r. Because Gy, is 32-periodic, Hy mus -periodic wit < Sete) '® 2-perioaic, Hy must also be 32-periodie with samples ‘The samples Hy of the transfer Function for the low, ‘pass filter A(f) are shown in the middle ‘raph of Fig, 3.49, For DFT, Hy, must be repeat be Seal Se DTH, ‘peated every 8/r Hz. This gives the 32 samples of Hg 1 Os¢<7 und 2

You might also like