0% found this document useful (0 votes)
26 views10 pages

Some FIR Filter Designs

Finite impulse response filters design

Uploaded by

najmuus786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
26 views10 pages

Some FIR Filter Designs

Finite impulse response filters design

Uploaded by

najmuus786
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
7.2. MAGNITUDE RESPONSE AND PHASE RESPONSE OF DIGITAL FILTERS The discrete-time Fourier transform of a finite sequence impulse response A(n) is given by M-1 H(e/*) = > bine"? = |H(e™) |e *™ ay a=0 The magnitude and phase responses are given by M(o) = |H(e/®)| = (RelH(e?*)] * + Im [H(e*1")°* = tan me) ©(@) = tan RelH(e™) (7.2) Filters can have a linear or non-linear phase depending upon the delay function, namely the phase delay and group delay. The phase and group delays of the filter are given by and t= -22), respectively. B= my _ @) ? o 382_ Digital Signal Processing The group delay is defined as the delayed response of the filter as a function of @ to a signal. Linear phase filters are those filters in which the phase delay and group delay are constants, i.e. independent of frequency. Linear phase filters are also called constant time delay filters. Let us obtain the conditions FIR filters must satisfy in order to have constant phase and group delays and hence obtain the conditions for having a linear phase. For the phase response to be linear @@) _ o Therefore, Oo) =-a@t where tis a constant phase delay expressed in number of samples. Using Eq. 7.2, -T, -KS@S+K tan-! ImH(e*) %o) = tan” Re Hie™) =- Ot or Met > A@)sinwn -1 nwo wt = tan 3-5 Y Al) cos on n=O Scanned with CamScanner M1 LAG)sinon n= tan ot = 2-0 h(n) cos wn ned Simplifying, we get M-1 ¥ A(n)sin(@t- wn) =0 (7.3) a=0 and a solution to Eq.7.3 is given by : (M-) ae ae (7.4) and h(n) = h(M - 1-n) for 0 hn) cos2nn fT aay and A= > A(n)sin2xnfT (7.12) — From Eq. 7.11 and 7.12 we infer that H, (f) is an even function and H((f) is an odd function of frequency. If h(nT’) is an even sequence, the imaginary part of the transfer function, H,(f), will be zero and if h(n’) is an odd sequence, the real part of the transfer function, H,( f), will be zero. Thus an even unit impulse response yields a real transfer function and an odd unit impulse response yields an imaginary transfer function. A real transfer function has 0 or + x radians phase shift, while an imaginary transfer function has + n/2 radians phase shift. Therefore, by making the unit impulse response either even or odd, one can generate a transfer function that is either real or imaginary. ‘Scanned with CamScanner in the Gesign of digital fliters two interesting situations are olten sought after. (i) For filtering applications, the main interest is in the amplitude response of the filter, where some portion of the input signal spectrum is to be attenuated and some portion is to be passed to the output with no attenuation. This should be accomplished without phase distortion. Thus the amplitude response is realised by using only a real transfer function. That is He®)=H(f) and H(f)= 0 (ii) For filtering plus quadrature phase shift. the applications include integrators, differentiators and Hilbert transform devices. For all these applications the desired transfer function is imaginary. Thus, the required amplitude response is realised by using only Hf ). That is He!®) =j H{f) Hf) =0 and Design Equations The term H(e2) is periodic in the sampling frequency and hence both H,{f) and H{ f) are also periodic in the sampling frequency. Both H,(f) and Hf) can be expanded in a Fourier series. Since the real part of the transfer function, H,(f), is an even function of frequency, its Fourier series will be of the form Hf) = a9+ 5, a, €08 (2xnfT) (7.13) nel Finite Impulse Response (FIR) Filters 387 The Fourier coefficients a, are given by hl2 a,=2 J H,(f) cos (2nnfT) df, n#0 (7.14) S -fl2 and the ap term is given by 1 Ae a= f Hf) af he iva In a similar manner, the imaginary part of the transfer function, which is an odd function of frequency, can be expanded in the Fourier series Hf) = > 6, sin (2xnfT) (7.15) ml The Fourier coefficients 6, are given by — tlt Scanned with CamScanner The Fourier coefficients 5, are given by 2 M2 b= J Hf) sin (2nnfT) df (7.16) fs fra Since an odd function has zero average value, by = 0. The Fourier coefficients a,, and b, must be related to the unit pulse response of the filter. Case (i): For simple filtering applications, consider Hj(/) = 0. Equation 7.13 can be written as Hee!®) = Hf) = 09+ 5, a, 008 (2nnfT) =a,+ > + (2" +2"), sear (7.17) = The transfer function can be also written as He’*)= Y hn)2|,_ janet (7.18) =O) + Y [A(—n) 2" + An) 2°) eer mt Comparing Eqs 7.17 and 7.18, the terms of the unit pulse response h(nT) can be related to the Fourier coefficients of the frequency response. This yields (0) = ay 1 hn) =a, 2" 1 n>o0 (7.19) 388 Digital Signal Processing Case (ii): For filtering with quadrature phase shift. Consider H, (/)= 0. From Eq, (7.15) He?) = jH(f)=j Yb, sin (2xnfT) nl Comparing this equation with Eq. 7.18 yields Alen) = 3 b, (7.20) n>0O (7.21) hin)=-+, Scanned with CamScanner Equations 7.19 and 7.21 are the even and odd unit pulse responses respectively, and are used for the design of FIR filters. Design Procedure The procedure for designing an FIR digital filter using the Fourier series method is summarised as follows. 1. Decide whether H,(f) or Hf) is to be set equal to zero. For filtering applications we typically set H(f) = 0. For integrators, differentiators and Hilbert transformers, we set H,{ f) = 0. 2. Expand H,( f) or H,{ f) in a Fourier series. 3. The unit pulse response is determined from the Fourier coefficients using Eqs 7.19 and 7.21. The number of taps, i.e. the value of M may have to be increased in order to get a satisfactory sinusoidal steady-state response. There are two problems involved in the implementation of FIR filters using this technique. The transfer function H(e/’°) represents a non- causal digital filter of infinite duration. A finite duration causal filter can be obtained by truncating the infinite duration impulse response and delaying the resulting finite duration impulse response. This modification does not effect the amplitude response of the filter; however, the abrupt truncation of the Fourier series results in oscillations in the passband and stopband. These oscillations are due to slow convergence of the Fourier series, particularly near the points of discontinuity. This effect is known as the Gibbs phenomenon. These undesirable oscillations can be reduced by multiplying the desired impulse response coefficients by an appropriate window function. Scanned with CamScanner TS EHO tO Gesign a low-pass digital filter ts approximate the ideal specifications given by Finite Impulse Response (FIR) Filters 389 1, forlfl0 F ie f -2 f 1 cos (onnf) af tp -2 snanelT Fl Qn? J, Replacing T by W/F, and multiplying both numerator and denominator by f,, we get, a - (28) sin 2 xnf,/F "UR JL anf, /F) Fi2 f 2F, =i et f rape 2 aon | HNar pit 7 Therefore, from Eq. 7.19, 2f, f, \[ sin 2 xnf,/F (0) = ag = eo A(-n) = (4) Seer | _ (fy [sin 2 nnf,/F and A(n) = (4) Serer | Scanned with CamScanner Dace A low-pass filter has the desired response as given low ; e" O<@<% Hy(e/®)= x 2 0 gsost Determine the filter coefficients h(n) for M = 7, using type-I frequency sampling technique. Solution The samples of the given frequency response is taken uniformly at @, = 2nk/M. For 0 < w< 3 the values of k = 0,1. For § sos, k=2,3,4, 5and for sas 2x, k=6, Thus, the sampled frequency response is given by eJ6rA7, = 0,1 H(k)= 40, h=2,3,4,5 eJerhi7, pig The filter coefficients h,(n) are given by the inverse discrete Fourier transform, i's xk _ 1 j2nkniT han) = — > A(k)e’ =D Abe M k=O 7 ke0 =i Serioan el2knlT , 9-J6nk/7 el2nhnty, 6 7 Lixo . = 1 Si elttn-o0v7 +. gman] kao = 3 [as enna + eftxin-3y7) Since H (k) = H"(M — k), we have e/!?*("-37 = g-J2x("- 397 Therefore, ha(n) = 3fi+ g/min -37 , 9-J2nin | h An) = 0.1429 + 0.2857 cos[0.898 (n — 3)] Scanned with CamScanner

You might also like