0% found this document useful (0 votes)
6 views24 pages

DSP Module 4vvce

The document discusses the design and characteristics of Finite Impulse Response (FIR) filters, emphasizing their linear phase properties and applications in signal processing. It covers the design process, including the use of window functions like Rectangular, Hamming, Hanning, and Bartlett windows to achieve desired frequency responses. Additionally, it outlines the implications of filter causality and the importance of passband and stopband specifications in filter design.

Uploaded by

Shankar Yagnic
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)
6 views24 pages

DSP Module 4vvce

The document discusses the design and characteristics of Finite Impulse Response (FIR) filters, emphasizing their linear phase properties and applications in signal processing. It covers the design process, including the use of window functions like Rectangular, Hamming, Hanning, and Bartlett windows to achieve desired frequency responses. Additionally, it outlines the implications of filter causality and the importance of passband and stopband specifications in filter design.

Uploaded by

Shankar Yagnic
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
—_——_- ern tw MODULE - IV eristics of practical frequency selective filters, Symmetric and an FIR Filter Design: Charact linear-phase FIR filters using windows - Rectangular, Hamme i "4, symmetric FIR filters, Design 0 Hanning and Bartlett windows. Self study component: Structure for FIR Systems: Direct and Cascade form. 4.1 Introduction Finite Impulse Response (FIR) filters are a fundamental class of digital filters commonly uy | in various signal processing applications. Unlike IIR filters, FIR filters have no feedback loops | and provide linear phase characteristics. | In the design of frequency-selective filters, the desired filter characteristics are specified in | the frequency domain in terms of the desired magnitude and phase response of the filter. In the design process, we determine the coefficients of a causal finite impulse response (FIR) filter that closely approximates the desired frequency response specifications. In practice, FIR filters are employed in filtering problems where there is a requirement for a linear-phase characteristic within the passband of the filter. Causality has very important implications in the design of frequency selective filters. © The frequency response H(w) cannot be zero, except at a finite set of points in frequency. © The magnitude |H(w)| cannot be constant in any finite range of frequencies and the | transition from passband to stopband cannot be infinitely sharp. © The magnitude |H(w)| and phase of H(w) cannot be chosen arbitrarily. 4.2 Characteristics of Practical Frequency-Selective Filters Ideal filters are non causal and hence physically unrealizable for real-time signal processing applications, If we relax certain conditions, it is possible to realize causal filters that approximate the ideal filters as closely as we wish. In particular, * A small amount of ripple in the passband. 86 |H(w)| 1+5p Transition band 5s Fig. 4.1. Magnitude characteristics of physically realizable filters. « It is not necessary to insist that |H(w)| be constant in the entire passband. * Asmall, nonzero value or a small amount of ripple in the stopband. The transition of the frequency response from passband to stopband denotes the transition band of the filter as shown in Fig. 4.1. The band edge frequency wp defines the edge of the passband, while the frequency ws denotes the beginning of the stopband. The width of the passband (ws — wp) is called the bandwidth of the filter. It is common practice to use a logarithmic scale for the magnitude |H(w)| to accommodate a large dynamic range in the frequency response. Thus, the ripple in the passband is (20 logjo 6p dB) and that of the stopband is (20 logo 4s dB) In any filter design, we need to specify: © Maximum tolerable passband ripple (5p). * Maximum tolerable stopband ripple (5s). * Stopband edge frequency (ws). * Passband edge frequency (wp). 4.3, Symmetric and Anti-symmetric FIR filters filter is a linear function hifted in time e filters have Linear phase is a property of a filter, where the phase response of the Of frequency. The result is that all frequency components of the input signal are st by the same constant amount, which is referred to as the phase delay. Linear-phes 88 i a symmetric impulse response. Unit sample response of FIR filters is symmetric i : » following condition. ‘ h(n) = A(M-1—n); 1=0,1,..,M=1 (41 7 Unit sample response of FIR filters is Anti-symmetric if it satisfies following Condition h(n) = —h(M—1-n); 1=0,1,..,M=1 (44 Consider the z - transform of unit sample response, M-1 H(z) = > A(n)z~" (43) a=0 4.3.1 Symmetric Impulse Response with M=odd Symmetric impulse response with M=odd, then z = e M=1) u(t) 4, wn 4. gn jul M=1— H(e) =n 5 )eaet) + 3° mem [o> tein] (44) nln = eriuneto( M54) osu Me) giu( Men), gs Met) eM AAmm) = gndi(M—2) pian = odie) . piu MS) gum — goitn( ME) . grsi(Mpt=n) etary goiatttainn) = MOR Dre MEN) (1 )rcosu Msdn) Substituting in eqn. (3.4) Ma H(w) = h(Mp2) eel) + > Wine (“54)2 cos ( 5 a (45) Hw) = @ M4) J (M52) 4.2 > An) cos (44 7 ) a0 The polar form of H(w) can be expressed as H(w) = |H(w) eZ) (4.6) ai signal Processing ee e pag 60 (3.6) with eqn. (3.5) we get, 0 tHewyl =n (MS 2) 425% mo meosu (M54 _) n=0 cw) =| 7? for |H(w)| > 0 -w(“4) +m for |H(w)| <0 432. Anti-symmetric Impulse Response with M=even For even value of M we can write eqn. (3.5) directly as Mon H(w) = eH“) Jo Y A(n) cosw (4 ue n) (4.7) n=0 Consequently, Maa \H(w)| = 25 h(n) cosw (" = n=0 “5 cana = { “2 for |H(w)| > 0 aan) +m for|H(w)| <0 4.4 Design of Linear-phase FIR filters using Windows A window is a mathematical function that applies a weighting (often between 0 and 1) to each discrete time series sample in a finite set. Based on the desired frequency response Specification Hg(w) determine the corresponding unit sample response ha(n).. He (e) = > ha( nese (4.8) a where, * ha(n) = x [ite (ce) edu (49) In general the sample response hy(n) is infinite in duration and must be truncated at some Point to get an FIR filter of length M. Truncation is achieved by multiplying ha(n) by window function. ‘The unit sample response of the FIR filter becomes ee < h(n) = ha(n)w(n) { ha(n), 1 =0,1,...,M=1 0, otherwise where w(n) is the window function. Different types of windows are » Rectangular window © Hamming window Hanning window © Bartlett (Triangular) window © Blackman window Kaiser window 4.4.1 Rectangular window The rectangular window may be defined by 1, forn=0,1,...,.M—-1 0; otherwise wp(n) = { (4.10) where M is the window length in samples. oM sin (4 [Wa(w)| = | ( | (4.12) (I In the magnitude spectrum of rectangular window there are one main lobe and many side lobes. As M increases the main lobe becomes narrower. The area under the side lobes remain same irrespective of changes in M. 4.4.2 Hamming window Hamming window is most commonly used window in speech signal processing. This is 3 modified version of the raised cosine window. It is given by, for n=0,1, otherwise wnla) = { 0.54 ~ 0.46 cos (, - anal Processing 91 signal ight gow has bell like shape and its first as well as last samples are not zero, Further, it has jin . a igelobes but slightly increased main lobe. si ret" took) os a4 a, oo 1 2 Gece amet (a) Rectangular window (b) Hamming window wav) wri) (c) Hanning window (d) Bartlett window Fig. 4.2. Impulse response for different windows. 443 Hanning window Hanning window has shape similar to those of Hamming but its first and last samples are 2er0. This is a raised cosine window function given by 2 (1—cos 2%); forn=0,1,...M—1 wan(n) = { : ( ) (4.13) 0; otherwise 92 be, but first few sidelobes are signif It is observed that it has narrow main lol sidelobes reduce rapidly. 4.4.4 Bartlett window Bartlett Window is also called as triangular window. It is mathematically expressaq as Mote Mt and ' 0; otherwise (44 | an MAL - _ enin={? raft; form =0,1,...M—1 mary of window function characteristics. Table 4. Jranation width of main lobe Min, stopband attenuation Peak val Window name, Rectangular wh -21 dB -21 dB Hamming a -53 dB -41 dB Hanning a -44 dB -31 dB Bartlett oF -25 dB -25 dB eres Example 4.1: Design the symmetric FIR | as a. fh ay Jot for sl < we 0. Otherwise Haw The length of the filter should be 7 and we «& Solution: We know that, T = hata) = f Ha(w)e" des ie es ~ On 1 + jw(n—r) -xf ey ? [ewremrau lowpass filter whose desired frequency response is given 1a) signal P rocessing oi 93 1 feimin-r)]! 2m Lin=7)| 1 Jello 1) _ git Qin(n—T) le edn | 1 eil=1) — giln-ny n(n—=T) ay | eshan) = tO tor n xr when n= T 1 1 ha(n) = ag [ed lp =f tw 1 = alla 1 = 90th S 7 Thus ha(n) is, ha(3) = 4 = 0.3183 hal) = we = 0.2678 ha(5) = we = 0.1447 hal6) = mee = 0.015 04 Motieg For M = 7 Hanning window is defined as ey restroce et) x(n) = 0.5 (1 — cos 25") w(0) =0 w(1) = 0.5 (1 — cos 2) = 0.25 (2) = 0.5 (1 — cos 4*) = 0.75 (3) = 0.5 (1—cos 8) =1 (4) = 0.5 (1 —cos &) = 0.75 (5) = 0.5 (1 — cos 40) = 0,25 w(6) =0.5 ineemyoe J. A(n) = han) x w(n); for O 2) n=4; hg(4) = 2 —4— = 0.159 a(4 = 2) Moc, sire processing 101 we 0. _{ forosnsa wt) { 0; otherwise « rectangular window of length M =5. this h(n) = han) x w(n) = ha(n) forO h(n) cos w(2 — n) m=O = h(2) + 2h(0) cos 2w + 2h(1) cosw = 0.25 +2 x 0.159cos wu +2 x 0.224 cosw |H (ei) | = 0.25 + 0.318 cos 2u + 0.448 cosw Hw) = eH) |H(w)| = e!2[0.25 + 0.318 cos 2w + 0.448 cosw.] Example 4.5: Dea a s normalized linear phase FIR low pass flter having phase delay of r = and at least 40 dB attenuation in the stopband. Also obtain the magnitude frequency response of the filter. ‘ — ® Solution: The linear phase FIR filter is normalized. ie., cut-off frequency, we = 1 r/sample We know that, 102 Mody, when n= T= 4 ha(ny = Si 4). ‘ =a n=) ar a(n) = al, elt) uy ar = 5 [tae = Llults | n#4 = pelt +] == x Thus ha(n) is, forn=4 a(n) = { ne “i pana To find h(n); h(n) = ha(n) x w(n). ‘The stopband attenuation required for this fiteris | dB. From the Table 4.1 the Hanning window satisfies this requirement. The Hanning window | function given by: | 3 (1 -cos #M4); form =0,1,..,M—1 | ws sD cae | wan) = ant) {? 0; otherwise oat mae for n #4 A(n) = ha(n) x w(n) = { 1—cos 242 forn=4 (0) = #00=4 [0.5 — 0.5cos (%2)] = 0.0000 | (1) = S059 [0.5 — 0.5cos (41)] = 0.0022 | (2) = SBE=8 10.5 — 0.5cos (2 )] = 0.0724 A(3) = E59 [0.5 — 0.5cos (3")] = 0.2286 Wa) = § [0.5 — 08e0s (4F)] = 0.3183 A(5) = S8E=9 [0.5 - 0.5 cos = 0.2286 (6) = on 0.0724 n(7) = 6Y=9 [0.5 - 0.5cos (4 )| = 0.0022 n(8) = 805) [0.5 - 0.5cos (§)] = 0.0000 signal Pr S - —_—~ gta! Sn - es| th =odd=9 response is symmetric with M frequency qhe " Ce") 0 M9 n(Ms*) 420 us) cos (Mt n) 3 (4) +20 h(n) cosw(4 — n) a0 W H(A) + 2N(0) cos Aw + 2h(1) cos 3w + 2h(2) cos 2u + 2h(3) cos |x (el), = 0.3183 + 0.0044 cos(3u) + 0.1448 cos(2u) + 0.4572 cos(u) example 4.6: Design the bandpass linear phase FIR filter having cut-off frequencies of we, = x r/samole and Wee = 2 r/sample. Obtain the unit sample response through following window 1; forO yz sf (2) » K (4.15) H(z) = Hi(z) x Ho(2) x H(z) x... Hie(z) (4.16) ee Hq(2) = Dao + baz? + bya2? + by yz hat we know tI ry _ Yaz) K(2) = Xz)" Ya(Z) _ -1 = _ Xz) > bho + baz + byaz™? +... + byeayo-M (4.17) Taking inverse z-transform of the eqn. (3.18), Yam) = byoxie(n) + berxe(a = 1) +o. + DqnaXe(n — M) (4.18) Se ero realization of the system Solution: Direct form realization { za {2 fz [2 x(n) | Example 4.8: Obtain the cascade realization of the system H(z) = (1+ 22° = 2°?)(1 +271 — 2-2) ** Solution; Example 4.9: Realize the following system i *= Solution: Direct fort x(n) "= Solution: yer “AC 1 5/2 eae H(z) =145/2z7} +227? +2273 = ue ase y(n) 1 Processing j Sigh pig? 107 z41/2z+1 (z+2) Zo + 5/222 +22 +2 F422 Wat +2 Re +2 ZH Zee re _ (z+2)(2? 40.5241) _ (2+2) (22405241) He) ~~ z.22 ~ Zz Zz H(z) = (1+ 2z71)(1+ 0.5271 +27) H(z) = Ha(z) x Ho(z) aa TF) 2 1 Example 4.11: Realize the following system in direct form. ** Solution: 4 . m= (8) un = ao 9) “ h(n) = Gy {u(n) ~ un ~5)] n= [(@)"-G)-G)-G)-G)] h(n) = (1.1/2, 1/4,1/8,1/16} H(z) = + 1/227} + 1/42-? + 1/8273 + 1/162~* 108 Meri x(n) Example 4.12: What is Gibbs ‘phenomenon and why tt occurs? «= Solution: To describe a signal with a sharp transient in the time domain requires infnts frequency content. In practice, it is not possible to sample infinite frequency content, The truncation of higher frequency content causes a time domain ringing artifact near the bang edge of the filter which is often referred to as the Gibbs phenomenon. It can be reduced by selectig proper window. ere Example 4.13: Bring out differences betwe FIR and UR fiers. = Solution: FIR filters IIR filters (i) Linear phase characteristics Non-linear phase characteristics (ii) Always stable as they have no feedback Conditionally stable as they have feedback (iii) Impulse response is finite Impulse response is infinite (iv) High implementation cost Low implementation cost (v) More memory requirement Less memory requirement (vi) All-zero structure Pole-zero structure (vii) Suitable for adaptive systems Not easily possible to be used in adaptive syst 4.6 Conclusions As we conclude this chapter, it is evident that FIR filters are foundational tools in signal processing, enabling us to achieve precise control over the frequency response and phase charac” teristics of systems. Whether you are designing audio equalizers, digital communication systems, or image processing algorithms, a solid grasp of FIR filter design and structure is indispensable for achieving your signal processing goals. In the ever-evolving landscape of technology, FIR picital 59 nal Process sing 109 continue t 0 play a pivotal al role in shapi ing the fut ure o f di igital sign al proces ssin 9, off ferin g iters id rest searcher vs the mean: s to enhat NC and refin efine th e Si ignal Is th at di rive inno vation n and engi 3 roaress

You might also like