Simple Digital Filters Later in the ourse we shall review various methods of designing frequeny-seletive filters satisfying presribed speifiations We now desribe several low-order FIR and IIR digital filters with reasonable seletive frequeny responses that often are satisfatory in a number of appliations FIR digital filters onsidered here have integer-valued impulse response oeffiients These filters are employed in a number of pratial appliations, primarily beause of their simpliity, whih makes them amenable to inexpensive hardware implementations 3 Lowpass FIR Digital Filters The simplest lowpass FIR digital filter is the -point moving-average filter given by H ( ) ( + ) + The above transfer funtion has a ero at and a pole at Note that here the pole vetor has a unity magnitude for all values of ω 4 On the other hand, as ω inreases from to π, the magnitude of the ero vetor dereases from a value of, the diameter of the unit irle, to Hene, the magnitude response H( e ) is a monotonially dereasing funtion of ω from ω to ω π The maximum value of the magnitude funtion is at ω, and the minimum value is at ω π, i.e., j jπ H ( e ), H( e ) The frequeny response of the above filter is given by H / ( e ) e os( ω / ) The magnitude response H( e ) os( ω/ ) an be seen to be a monotonially dereasing funtion of ω.8.6.4. First-order FIR lowpass filter 5 6..4.6.8
7 The frequeny ω ω at whih j H( e ) H( e ) is of pratial interest sine here the gain G( ω) in db is given by j G ( ω) log H ( e ω ) j log H ( e ) log 3 db j sine the d gain G( ) log H( e ) 8 Thus, the gain G(ω) at ω ω is approximately 3 db less than the gain at ω As a result, ω is alled the 3-dB utoff frequeny To determine the value of ω we set ω H ( e j ) os ( ω / ) whih yields ω π/ ω The 3-dB utoff frequeny an be onsidered as the passband edge frequeny As a result, for the filter H () the passband width is approximately π/ The stopband is from π/ to π Note: H () has a ero at or ω π, whih is in the stopband of the filter A asade of the simple FIR filter ( ) H ( + ) results in an improved lowpass frequeny response as illustrated below for a asade of 3 setions.8.6.4 First-order FIR lowpass filter asade. 9..4.6.8 The 3-dB utoff frequeny of a asade of M setions is given by / M ω os ( ) For M 3, the above yields ω. 3π Thus, the asade of first-order setions yields a sharper magnitude response but at the expense of a derease in the width of the passband A better approximation to the ideal lowpass filter is given by a higher-order movingaverage filter Signals with rapid flutuations in sample values are generally assoiated with highfrequeny omponents These high-frequeny omponents are essentially removed by an moving-average filter resulting in a smoother output waveform
Highpass FIR Digital Filters The simplest highpass FIR filter is obtained from the simplest lowpass FIR filter by replaing with This results in H ( ) ( ) Corresponding frequeny response is given by / H( e ) j e sin( ω/ ) whose magnitude response is plotted below.8.6.4 First-order FIR highpass filter. 3 4..4.6.8 5 The monotonially inreasing behavior of the magnitude funtion an again be demonstrated by examining the pole-ero pattern of the transfer funtion H () The highpass transfer funtion H () has a ero at or ω whih is in the stopband of the filter 6 Improved highpass magnitude response an again be obtained by asading several setions of the first-order highpass filter Alternately, a higher-order highpass filter of the form M n n H ( ) M n ( ) is obtained by replaing with in the transfer funtion of a moving average filter 7 An appliation of the FIR highpass filters is in moving-target-indiator (MTI) radars In these radars, interfering signals, alled lutters, are generated from fixed objets in the path of the radar beam The lutter, generated mainly from ground ehoes and weather returns, has frequeny omponents near ero frequeny (d) 8 The lutter an be removed by filtering the radar return signal through a two-pulse aneler, whih is the first-order FIR highpass filter ( ) H ( ) For a more effetive removal it may be neessary to use a three-pulse aneler obtained by asading two two-pulse anelers 3
Lowpass IIR Digital Filters We have shown earlier that the first-order ausal IIR transfer funtion K H( ), < α < α has a lowpass magnitude response for α > An improved lowpass magnitude response is obtained by adding a fator ( + ) to the numerator of transfer funtion K( + ) H( ), < α < α This fores the magnitude response to have a ero at ω π in the stopband of the filter 9 On the other hand, the first-order ausal IIR transfer funtion K H( ), < α < α has a highpass magnitude response for α < However, the modified transfer funtion obtained with the addition of a fator ( + ) to the numerator K( + ) H( ), < α < α exhibits a lowpass magnitude response 3 The modified first-order lowpass transfer funtion for both positive and negative values of α is then given by K( + ) H LP ( ), < α < α As ω inreases from to π, the magnitude of the ero vetor dereases from a value of to 4 The maximum values of the magnitude funtion is K /( α) at ω and the minimum value is at ω π, i.e., j K jπ HLP( e ), HLP( e ) α Therefore, H LP ( e ) is a monotonially dereasing funtion of ω from ω to ω π 4
5 For most appliations, it is usual to have a d gain of db, that is to have H( e j ) To this end, we hoose K ( α) / resulting in the first-order IIR lowpass transfer funtion α ( ) + H LP, < α < α The above transfer funtion has a ero at i.e., at ω π whih is in the stopband 6 Lowpass IIR Digital Filters A first-order ausal lowpass IIR digital filter has a transfer funtion given by α + H LP ( ) α where α < for stability The above transfer funtion has a ero at i.e., at ω π whih is in the stopband 7 H LP () has a real pole at α As ω inreases from to π, the magnitude of the ero vetor dereases from a value of to, whereas, for a positive value of α, the magnitude of the pole vetor inreases from a value of α to + α The maximum value of the magnitude funtion is at ω, and the minimum value is at ω π 8 j i.e., H LP( e ), H LP( e ) Therefore, H LP ( e ) is a monotonially dereasing funtion of ω from ω to ω π as indiated below.8.6.4. α.8 α.7 α.5..4.6.8 Gain, db -5 - -5 - jπ α.8 α.7 α.5 - - 9 The squared magnitude funtion is given by ( α) ( + osω) H LP ( e ) ( + α αosω) The derivative of H LP( e ) with respet to ω is given by d H LP( e ) ( α) ( + α + α )sin ω dω ( αosω + α ) 3 d H LP( e ) / dω in the range ω π verifying again the monotonially dereasing behavior of the magnitude funtion To determine the 3-dB utoff frequeny we set H ( ) LP e in the expression for the square magnitude funtion resulting in 5
3 ( α) ( + osω ) ( + α αosω ) or ( α) ( + osω ) + α αosω whih when solved yields α osω + α The above quadrati equation an be solved for α yielding two solutions 3 The solution resulting in a stable transfer funtion H LP () is given by sin ω α osω It follows from ( α) H LP ( e ) ( + α ( + osω) αosω) that H LP () is a BR funtion for α < 33 Highpass IIR Digital Filters A first-order ausal highpass IIR digital filter has a transfer funtion given by + α H HP ( ) α where α < for stability The above transfer funtion has a ero at i.e., at ω whih is in the stopband 34 ω Its 3-dB utoff frequeny is given by α ( sin ω ) / osω whih is the same as that of H LP () and gain responses of H HP () are shown below.8.6.4. α.8 α.7 α.5..4.6.8 Gain, db -5 - -5 - α.8 α.7 α.5 - - 35 H HP () is a BR funtion for α < Example-Design a first-order highpass digital filter with a 3-dB utoff frequeny of.8π Now, sin( ω ) sin(.8π).587785 and os(.8π). 89 Therefore α ( sin ω ) / osω.59545 36 Therefore, + α H HP ( ) α. 4538 +. 59545 6
37 Bandpass IIR Digital Filters A nd-order bandpass digital transfer funtion is given by α H BP ( ) β( + α) + α Its squared magnitude funtion is H BP ( e [ + β ) ( + α) ( α) ( osω) + α β( + α) osω + αosω] 38 H BP ( e ) goes to ero at ω and ω π It assumes a maximum value of at ω ω o, alled the enter frequeny of the bandpass filter, where ωo os ( β) The frequenies ω and ω where H BP ( e ) beomes / are alled the 3-dB utoff frequenies The differene between the two utoff frequenies, assuming ω > ω is alled the 3-dB bandwidth and is given by B ω ω os α w + α The transfer funtion H BP () is a BR funtion if α < and β < Plots of.8.6.4. H BP ( e β.34 α.8 α.5 α. )..4.6.8 are shown below.8.6.4. α.6 β.8 β.5 β...4.6.8 39 4 4 Example-Design a nd order bandpass digital filter with enter frequeny at.4π and a 3-dB bandwidth of.π Hereβ os( ωo ) os(.4π).397 and α os( B ) os(. ).95565 w π + α The solution of the above equation yields: α.37638 and α.765453 4 The orresponding transfer funtions are H ' BP ( ). 889. 734344 +. 37638 and H" BP ( ). 3673. 53353 +. 765453 The poles of H ' BP ( ) are at.3677 ± j.45636 and have a magnitude > 7
43 Thus, the poles of H ' BP ( ) are outside the unit irle making the transfer funtion unstable On the other hand, the poles of H" BP ( ) are at. 667655 ± j. 895546 and have a magnitude of.853746 Hene H" BP ( ) is BIBO stable Later we outline a simpler stability test 44 Figures below show the plots of the magnitude funtion and the group delay of " ( ).8.6.4. H BP..4.6.8 Group delay, samples 7 6 5 4 3 -..4.6.8 Bandstop IIR Digital Filters A nd-order bandstop digital filter has a transfer funtion given by + α β + H BS ( ) β( + α) + α The transfer funtion H BS () is a BR funtion if α < and β < Its magnitude response is plotted below.8.6.4. α.8 α.5 α...4.6.8.8.6.4. β.8 β.5 β...4.6.8 45 46 47 Here, the magnitude funtion takes the maximum value of at ω and ω π It goes to at ω ω o, where ωo, alled the noth frequeny, is given by ωo os ( β) The digital transfer funtion H BS () is more ommonly alled a noth filter 48 ω The frequenies ω and where H BS ( e ) beomes / are alled the 3-dB utoff frequenies The differene between the two utoff frequenies, assuming ω > ω is alled the 3-dB noth bandwidth and is given by Bw ω ω os α + α 8
49 Higher-Order IIR Digital Filters By asading the simple digital filters disussed so far, we an implement digital filters with sharper magnitude responses Consider a asade of K first-order lowpass setions harateried by the transfer funtion α + ( ) α H LP 5 The overall struture has a transfer funtion given by K α + GLP( ) α The orresponding squared-magnitude funtion is given by j ω ( α) ( + osω) GLP( e ) ( + α αosω) K 5 To determine the relation between its 3-dB utoff frequeny ω and the parameter α, we set K ( α) ( + osω ) ( + α αosω ) whih when solved for α, yields for a stable G LP (): + ( C)osω sin ω C C α C + osω 5 where ( K )/ K C It should be noted that the expression for α given earlier redues to for K sin ω α osω 53 Example-Design a lowpass filter with a 3- db utoff frequeny at ω. 4π using a single first-order setion and a asade of 4 first-order setions, and ompare their gain responses For the single first-order lowpass filter we have + sin ω + sin(.4π) α.584 osω os(.4π) 54 For the asade of 4 first-order setions, we substitute K 4 and get ( K )/ K ( 4)/ 4 C. 688 Next we ompute + ( C)osω sin ω C C α C + osω + (.688)os(.4π) sin(.4π) (.688) (.688).688 + os(.4π).5 9
The gain responses of the two filters are shown below As an be seen, asading has resulted in a sharper roll-off in the gain response 55 Gain, db -5 - -5 K4 - - - K Passband details Gain, db - -4 - - K K4