10. Digital Filters 12/20/20 Digital Signal Processing Prof. Hesham Tolba Alexandria University Faculty of Engineering Electrical Engineering Department Alexandria 2020 Prof. Hesham Tolba Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Digital Filters 12/20/20 Digital Signal Processing Prof. Hesham Tolba Digital Signal Processing 2 1 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Table of contents 1. General Considerations. 2. Design of FIR Filters. q Symmetric and Antisymmetric FIR Filters q Design of Linear-Phase FIR Filters Using Windows q Design of Linear-Phase FIR Filters by the Frequency-Sampling Method. q Design of Optimum Equiripple Linear-Phase FIR Filters. 3. Design of IIR Filters from Analog Filters. q IIR Filter Design by Approximation of Derivatives. q IIR Filter Design by Impulse Invariance. q IIR Filter Design by the Bilinear Transformation. 4. Frequency Transformations. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 3 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations General Considerations 12/20/20 Digital Signal Processing Prof. Hesham Tolba Digital Signal Processing 4 2 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Introduction q In the filter design process q The desired filter characteristics are specified in the frequency domain in terms of the desired magnitude and phase response of the filter. q The coefficients of a causal FIR or IIR filter that closely approximates the desired frequency response specifications are determined. q Depending on the nature of the problem and on the specifications of the desired frequency response, FIR or IIR filter is chosen. q FIR filters are employed when there is a requirement for a linear-phase characteristic within the passband of the filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 5 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Introduction … q If there is no requirement for a linear-phase characteristic, either an IIR or an FIR filter may be employed. q An IIR filter has lower sidelobes in the stopband than an FIR filter having the same number of parameters. q Thus, if some phase distortion is either tolerable, an IIR filter is preferable. q Its implementation involves fewer parameters, q It requires less memory q It has lower computational complexity. q Today, FIR and IIR digital filter design is greatly facilitated by the availability of numerous computer software programs. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 6 3 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication q The issue of causality is considered here by examining the impulse response !(#) of an ideal LPF with frequency response characteristic %, ! " =$ (, " ≤ "! "! < " ≤ * q The impulse response of this filter is "! , * + , = " sin " , ! ! , * "!, 12/20/20 Prof. Hesham Tolba " ≤ "! "! < " ≤ * Digital Signal Processing 7 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … q A plot of !(#) for %! = '/) is as shown. Unit sample response of an ideal LPF. q It is clear that the ideal LPF is noncausal and hence it cannot be realized in practice. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 8 4 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … q One possible solution is to introduce a large delay #" in !(#) and arbitrarily to set ! # = * for # < #". q The resulting system no longer has an ideal frequency response characteristic. q If we set ! # = * for # < #", the FS expansion of , % results in the Gibbs phenomenon. q This is not limited to the realization of a LPF, but hold, for all the other ideal filter characteristics. q Necessary and sufficient conditions that , % must satisfy for the causality of the resulting filter is given by the PaleyWiener theorem. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 9 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … q Paley-Wiener Theorem. q If ! " has finite energy and ! " = $ for " < $, then " ) *+ & ' , ' < ∞ !" if & ' is square integrable and if the above integral is finite, then we can associate with & ' a phase response Θ ' , so that the resulting filter with frequency response q Conversely, & ' = & ' .#$ % is causal. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 10 5 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … q Causality imposes some tight constraints on an LTI system. ,# % , the real and imaginary components of the frequency ,$ % response , % . q Causality also implies a strong relationship between q This could be illustrated by decomposing and !(#) into an even and an odd sequence, i.e., ! # = !% # + !" # where !% # = 12/20/20 . ! # + !(−#) / and Prof. Hesham Tolba !" # = . ! # − !(−#) / Digital Signal Processing 11 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … +(,) is causal, it is possible to recover +(,) from its even part +" , for ( ≤ , ≤ ∞ or from its odd component +# , for % ≤ , ≤ ∞. q Now, if q It can be easily seen that and ! # = /!% # 1 # − !% * 2 # , #≥* ! # = /!" # 1 # + ! * 2 # , #≥. +# ( = ( for , = (, we cannot recover + ( also must know + ( . q Since q In any case, it is apparent that strong relationship between +# , 12/20/20 Digital Signal Processing Prof. Hesham Tolba +# , = +" , and +" , . Prof. Hesham Tolba Digital Signal Processing from +# , and hence we for , ≥ %, so there is a 12 6 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … !(#) is is absolutely summable (i.e., BIBO stable), the frequency response , % exists, and q If , % = ,# % + 5,$ % !(#) is real-valued and causal, the symmetry properties of the FT imply that q In addition, if & !% # ↔ ,# % & !" # ↔ ,$ % 12/20/20 Prof. Hesham Tolba Digital Signal Processing 13 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Causality & Its Implication … q Since , % !(#) is completely specified by !% # , it follows that is completely determined if we know ,# % . q Alternatively, q , % is completely determined from ,$ % & !(*). ,# % and ,$ % are interdependent and cannot be specified independently if the system is causal. q Equivalently, the magnitude and phase responses of a causal filter are interdependent and hence cannot be specified independently. ,# % for a corresponding real, even, and absolutely summable sequence !% # , we can determine , % . q Given 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 14 7 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Consider a stable LTI system with real and even impulse response !(#). Determine , % if . − 7 cos % ,# % = , . − /7 cos % + 7' q Solution: q The first step is to determine noting that 7 < .. !% # , which can be done by ,# % = ,# = < ()%!" where ,# = = . − 7 = + =*+ // = − 7 =' + . // = . − 7 = + =*+ + 7' (= − 7)(. − 7=) 12/20/20 Prof. Hesham Tolba Digital Signal Processing 15 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The ROC has to be restricted by the poles at should include the unit circle. q Hence the ROC is 5$ = 6 and 5% = %/6 and 6 < 8 < %/ 6 . +" , is a two-sided sequence, with 5$ = 6 contributing to the causal part and 5% = %/6 contributing to the anticausal part. q Thus q By using a partial-fraction expansion, we obtain q Substitution leads to q The FT of 12/20/20 Digital Signal Processing Prof. Hesham Tolba +(,) is +" , = % & % 6 + < (,) : : +(,) = 6& 9(,) ! " = % % − 6>'() Prof. Hesham Tolba Digital Signal Processing 16 8 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The relationship between the real and imaginary components of the FT of an absolutely summable, causal, and real sequence can be easily established from ! # = /!% # 1 # − !% * 2 # , # ≥ *. q The FT relationship of this equation is % , ! " = !* " + ?!+ " = @ !* A B(" − A)CA − +" ( * ', where >(%) is the FT of the unit step sequence 1(#). q Although the unit step sequence is not absolutely summable, it has an FT B " = '2 " + % % % " = '2 " + − ? cot , '() %−> : : : 12/20/20 Prof. Hesham Tolba −* ≤ " ≤ * Digital Signal Processing 17 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Using the previous two equations and carrying out the integration, we obtain the relation between ,# % and ,$ % as . , %−@ ,$ % = ? ,# @ cot B@ /' *, / ,$ % is uniquely determined from ,# % integral relationship. q Thus through this q The integral is called a discrete Hilbert transform. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 18 9 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Summary q Implications of causality in the design of frequency-selective filters are as follows a) , % cannot be zero, except at a finite set of points in frequency; b) , % cannot be constant in any finite range of frequencies and the transition from passband to stopband cannot be infinitely sharp [this is a consequence of the Gibbs phenomenon, which results from the truncation of !(#) to achieve causality]; c) ,# % and ,$ % are interdependent and are related by the discrete Hilbert transform. q As a consequence, , % 12/20/20 and C % Prof. Hesham Tolba cannot be chosen arbitrarily. Digital Signal Processing 19 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Summary … , % and the fact that ideal filters are not achievable in practice, attention will be limited to the class of LTI systems specified by the difference equation q Knowing the restrictions that causality imposes on . 0 D # = − E 7- D # − F + E G- H # − F -)+ -)/ which are causal and physically realizable. q Such systems have a frequency response *12∑0 -)/ G- J , % = *12. + ∑. -)+ 7- J 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 20 10 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Summary … q The basic digital filter design problem is to approximate any of the ideal frequency response characteristics with a system that has the frequency response , % = *12∑0 -)/ G- J *12. + ∑. -)+ 7- J by properly selecting the coefficients {7- } and {G- }. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 21 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Practical Frequency-Selective Filters q Ideal filters are noncausal and hence physically unrealizable for real-time signal processing applications. ! " of the filter cannot be zero, except at a finite set of points in the frequency range. q Causality implies that ! " cannot have an infinitely sharp cutoff from passband to stopband. q In addition, q Although the frequency response characteristics possessed by ideal filters may be desirable, they are not absolutely necessary in most practical applications. q If we relax these conditions, it is possible to realize causal filters that approximate the ideal filters as closely as we desire. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 22 11 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Practical Frequency-Selective Filters … q It is not necessary to insist that the magnitude , % be constant in the entire passband of the filter. q A small amount of ripple in the passband, as shown, is tolerable. q It is not necessary for , % to be zero in the stopband. q A small, nonzero value or a small amount of ripple in the stopband is also tolerable. Magnitude characteristics of physically realizable filters. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 23 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Practical Frequency-Selective Filters … q The transition of the frequency response from passband to stopband defines the transition band of the filter. q The band-edge frequency while the frequency %4 %3 defines the edge of the passband, denotes the beginning of the stopband. q The width of the transition band is %4 − %3; it is usually called the bandwidth of the filter. q For example, if the filter is lowpass with a passband edge frequency %3, its bandwidth is %3. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 24 12 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Practical Frequency-Selective Filters … q If there is ripple in the passband, its value is denoted as and the magnitude , % 2+ , varies between the limits . ± 2+ . q The ripple in the stopband is denoted as 2' . q To accommodate a large dynamic range in the graph of the frequency response of any filter, it is common practice to use a logarithmic scale for the magnitude , % . q Consequently, the ripple in the passband is /* log +/ 2+ dB, and that in the stopband is /* log +/ 2' dB. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 25 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Practical Frequency-Selective Filters … q In 1. 2. 3. 4. any the the the the filter design problem we can specify maximum tolerable passband ripple 2+ 567 , maximum tolerable stopband ripple 2' 567 , passband edge frequency %3, and stopband edge frequency %4 . {7- } and {G- } in the frequency response characteristic, which best approximate the desired specification. q Based on these specifications, we can select the parameters , % approximates the specifications depends on the criterion used in the selection of the filter coefficients {7- } and {G- } as well as on the numbers (P, Q) of coefficients. q The degree to which 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 26 13 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of FIR Filters 12/20/20 Digital Signal Processing 27 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters G with input H(,) and output I(,) is described by the difference equation q An FIR filter of length I , = K# H , + K$ H , − % + ⋯ + K. H , − G + % .'$ = N K- H , − O -/0 where {K- } is the set of filter coefficients. q Alternatively, we can express the output sequence as the convolution of the unit sample response +(,) of the system with the input signal, thus we have .'$ I , = N +(O)H , − O -/0 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 28 14 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q The last two equations are identical in form and hence it follows that G- = ! F , F = *, ., … , P − .. q The filter can also be characterized by its system function .'$ ! 8 = N +(O)8'-/0 q The roots of , = constitute the zeros of the filter. q An FIR filter has linear phase if its unit sample response satisfies the condition + , = ±+(G − % − ,), 12/20/20 Prof. Hesham Tolba # = *, ., … , P − . Digital Signal Processing 29 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q Incorporating the above-defined symmetry and antisymmetry *conditions in , = = ∑0*+ leads to -)/ !(F)= ! 8 = + ( + + % 8'$ + + : 8'% + ⋯ + +(G − :)8'(.'%) + +(G − %)8'(.'$) = 8'(.'$)/% G−% + + : (.'4)/% N + , 8(.'$'%-)/% ± 8'(.'$'%-)/% , G QRR G STSU &/0 .⁄% '$ = 8'(.'$)/% N + , 8(.'$'%-)/% ± 8'(.'$'%-)/% , &/0 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 30 15 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … *and multiplying both =*+ for = in , = = ∑0*+ -)/ !(F)= *(0*+) sides of the resulting equation by = , leads to q substituting 8' .'$ ! =*+ = ±!(8) q This result implies that the roots of ,(=) are identical to the roots of , =*+ . ,(=) must occur in reciprocal pairs, is a root or a zero of ,(=), then ./=+ is also a q Consequently, the roots of i.e., if =+ root. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 31 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … !(#) of the filter is real, complex-valued roots must occur in complex-conjugate pairs. q If the unit sample response =+ is a complex-valued root, =∗+ is also a root. q Hence, if =* 0*+ , =*+ = ±,(=), ,(=) also has a zero at ./=∗+ . q As a consequence of q The shown figure illustrates the symmetry that exists in the location of the zeros of a linear-phase FIR filter. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 32 16 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … , = on the unit circle, yields the expression for . , % q When ! # = !(P − . − #), , % can be expressed as q Evaluating , % = ,; % >'(2 .'$ /% where ,; % is a real function of % and can be expressed as G−% !6 " = + +: : .⁄% '$ !6 " = : N (.'4)/% N &/0 + , VQW " &/0 12/20/20 + , VQW " G−% −, , : G−% −, , : Prof. Hesham Tolba G QRR G STSU Digital Signal Processing 33 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q The phase characteristic of the filter for both G−% , : X " = G−% −" + *, : −" q When G odd and G even is YZ !6 " > ( YZ !6 " < ( + , = −+(G − % − ,), the unit sample response is antisymmetric. G odd, the center point of the antisymmetric + , consequently, q For ! q If P−. =* / G is even, each term in + , 12/20/20 Digital Signal Processing Prof. Hesham Tolba is , = (G − %)/:, has a matching term of opposite sign. Prof. Hesham Tolba Digital Signal Processing 34 17 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q The frequency response of an FIR filter with an antisymmetric unit sample response can be expressed as , % = ,; % J1 *12(0*+)/'=,/' where (0*?)/' ,; % = / E ! # STU % P−. −# , / P VWW ! # STU % P−. −# , / P XYXU >)/ 0⁄' *+ ,; % = / E >)/ 12/20/20 Prof. Hesham Tolba Digital Signal Processing 35 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q The phase characteristic of the filter for both G odd and G even is ' P−. −% , / C % = / \' P−. −% + ', / / TZ ,; % > * TZ ,; % < * q These general frequency response formulas can be used to design linear-phase FIR filters with symmetric and antisymmetric unit sample responses. + , : the number of filter coefficients that specify the frequency response is (G + %)/: when G is odd or G/: when G is even. q For a symmetric 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 36 18 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … q For a symmetric ! # , ! P−. =* / antisymmetric there are (P − .)// filter coefficients when P is odd and P// coefficients when P is even to be specified. q The choice of a symmetric or antisymmetric unit sample response depends on the application. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 37 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Symmetric & Antisymmetric FIR Filters … + , = −+(G − % − ,) and G is odd ➞ !6 ( = ( and !6 * = ( ➞ not suitable as either an LPF or an HPF. q For example, if G even also results in !6 ( = ( ➞ we would not use the antisymmetric condition in the design of a LP linear-phase FIR filter. q Similarly, the antisymmetric unit sample response with + , = +(G − % − ,) yields a linear-phase FIR filter with a nonzero response at " = (, if desired, i.e., q The symmetry condition G−% !6 ( = + +: : (.'4)/% (.'4)/% !6 ( = : N N + , , G QRR G STSU &/0 + , , &/0 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 38 19 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Summary q In summary, the problem of FIR filter design is simply to determine the P coefficients ! # , # = *, ., … , P − ., from a specification of the desired frequency response ,A % of the FIR filter. q The important parameters in the specification of ,A % as shown. are q In the following subsections, design methods based on specification of ,A % will be described. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 39 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows q We begin with the desired frequency response specification ,A % q !A # and determine the corresponding !A # . is related to ,A % by the FT relation 8 !7 " = N +7 , >'()& &/0 where +7 , = % , @ ! " >()& C" :* ', 7 ,A % , we can determine the unit sample response by evaluating the above integral. q Thus, given !A # 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 40 20 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … +7 , is infinite in duration and must be truncated at some point, say at , = G − %, to yield an FIR filter of length G . q The obtained +7 , to a length G − % is equivalent to multiplying by a “rectangular window”, defined as q Truncation of +7 , %, \ , =$ (, , = (, %, … , G − % Q^_S`aYWS q Thus the unit sample response of the FIR filter becomes + , = !A # \ , * + , , = (, %, … , G − % =$ # (, Q^_S`aYWS 12/20/20 Prof. Hesham Tolba Digital Signal Processing 41 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … !7 " with b " the (truncated) FIR filter, i.e., q The convolution of !" = where b " is yields the frequency response of % , @ ! c b " − c Cc :* ', 7 .'$ b " = N \ , >'()& &/0 q The FT of the rectangular window is .'$ b " = N >'()& = &/0 12/20/20 Digital Signal Processing Prof. Hesham Tolba % − >'(). sin "G/2 = >'()(.'$)/% '() %−> sin "/2 Prof. Hesham Tolba Digital Signal Processing 42 21 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q This window function has a magnitude response ] % = sin %P/2 , sin %/2 −' ≤ % ≤ ' and a piecewise linear phase P−. , / C % = P−. −% + ', / −% 12/20/20 bcXU sin %P/2 ≥ * bcXU sin %P⁄2 < * Prof. Hesham Tolba Digital Signal Processing 43 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The magnitude response of the window function is as shown for P = \. and e.. q The width of the main lobe is )'/P ➞ as P increases, the main lobe becomes narrower. ] % are relatively high and remain unaffected by an increase in P. q The side lobes of P, the width of each side lobe decreases & its height increases in such a manner that the area under each sidelobe remains invariant to changes in P. q With an increase in 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 44 22 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q This characteristic behavior is not evident from observation of the figure because ] % has been normalized by P such that the normalized peak values of the sidelobes remain invariant to an increase in P. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 45 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The characteristics of the rectangular window play a significant role in determining the resulting frequency response of the FIR filter obtained by truncating !A # to length P. q The convolution of ,A % . ,A % with ] % has the effect of smoothing P is increased, ] % becomes narrower, and the smoothing provided by ] % is reduced. q As ] % result in some undesirable ringing effects in the FIR filter frequency response , % , and also in relatively larger sidelobes in , % . q The large sidelobes of 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 46 23 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q These undesirable effects are best alleviated using windows that q do not contain abrupt discontinuities in their time-domain characteristics, and q have correspondingly low sidelobes in their frequency-domain characteristics. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 47 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q Several window functions that possess desirable frequency response characteristics are listed as shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 48 24 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The time-domain characteristics of the windows are shown below. Rectangular Hamming Hanning Blackman T K B L Shapes of several window functions. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 49 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The frequency response characteristics of the Hanning is as shown below. Frequency responses of Hanning window for (a) , = ./ and (b) , = 0/. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 50 25 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The frequency response characteristics of the Hamming is as shown below. Frequency responses of Hamming window for (a) , = ./ and (b) , = 0/. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 51 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The frequency response characteristics of the Blackman is as shown below. Frequency responses of Blackman window for (a) , = ./ and (b) , = 0/. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 52 26 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q All of these window functions have significantly lower side lobes compared with the rectangular window. P, the width of the main lobe is also wider for these windows compared to the rectangular window. q For the same value of q Consequently, these window functions provide more smoothing through the convolution operation in the frequency domain, and as a result, the transition region in the FIR filter response is wider. q To reduce the width of this transition region, we can simply increase the length of the window, which results in a larger filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 53 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR filters Using Windows … q The shown table summarizes these important frequency-domain features of the various window functions. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 54 27 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Suppose that we want to design a symmetric LP linear-phase FIR filter having a desired frequency response %>'() !7 " = $ (, .'$ ⁄% , ( ≤ " ≤ "! Q^_S`aYWS (G − %)/: units is incorporated into !7 " of forcing the filter to be of length G. q A delay of in anticipation q The corresponding unit sample response, obtained by evaluating the $ , integral in +7 , = %, ∫', !7 " >()& C", is % )$ () +7 , = @ > :* ')$ &'.'$ % 9% C" 12/20/20 = ,−/ 5 , ,−/ " +− 5 sin %$ + − Prof. Hesham Tolba noncausal & infinite in duration +≠ ,−/ 5 Digital Signal Processing 55 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Clearly, !A # q Multiplying is noncausal and infinite in duration. !A # by the rectangular window sequence, f # =g ., *, # = *, ., … , P − . VhcXibTSX leads to an FIR filter of length P having the unit sample response + , = 12/20/20 Digital Signal Processing Prof. Hesham Tolba ,−/ 5 , ,−/ " +− 5 89: %$ + − Prof. Hesham Tolba ; ≤ + ≤ , − /, Digital Signal Processing +≠ ,−/ 5 56 28 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q If P is selected to be odd, the value of ! # P−. %! = / ' q The magnitude of the frequency response , % as shown below for P = e. and P = .*.. at # = P − . ⁄/ is ! of this filter is LPF designed with a rectangular window: (a) , = 0/ and (b) , = /;/. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 57 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations q Relatively large oscillations (ripples) occur near the band edge of the filter. q The oscillations increase in frequency as P increases, but they do not diminish in amplitude. q These large oscillations are the direct result of the large side lobes existing in ] % of the rectangular window. ,A % , the oscillations occur as the large constant-area side lobes of ] % move across the discontinuity that exists in ,A % . q As this window function is convolved with 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 58 29 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … *12> is basically a FS representation of ,A % = ∑B >)/ !A # J ,A % , the multiplication of !A # with a rectangular window is identical to truncating the FS representation of the desired filter characteristic ,A % . q Since , % due to the nonuniform convergence of the FS at a discontinuity. q The truncation of the FS is known to introduce ripples in q The oscillatory behavior near the band edge of the filter is called the Gibbs phenomenon. q A window function that contains a taper and decays toward zero gradually should be used to alleviate the presence of large oscillations in both the passband and the stopband. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 59 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q The shown figures illustrate , % of the resulting filter when some of the window functions are used to taper !A # . LP FIR filter designed with rectangular window (. = ;$). q The window functions eliminate the ringing effects at the band edge and result in lower sidelobes at the expense of an increase in the width of the transition band of the filter. 12/20/20 Digital Signal Processing Prof. Hesham Tolba LP FIR filter designed with Blackman window (. = ;$). Prof. Hesham Tolba Digital Signal Processing LP FIR filter designed with Hamming window (. = ;$). LP FIR filter designed with < = = Kaiser window (. = ;$). 60 30 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method q In this method, we specify the desired frequency response ,A % at a set of equally spaced frequencies %- = q q /' F+j , P P−. , / P F = *, . … , − ., / . j=* Vi / F = *, . … , P VWW P XYXU and solve for ! # of the FIR filter from these %-. To reduce sidelobes, we optimize the frequency specification in the transition band of the filter. This optimization can be accomplished by linear programming. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 61 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … q The basic symmetry property of the sampled frequency response function is exploited to simplify the computations. q We begin with the desired frequency response of the FIR filter 0*+ , % = E ! # J*12> >)/ q Suppose that we specify the frequency response of the filter at the frequencies mentioned above (i.e., at %- ). 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 62 31 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … q Then from the previous equation we obtain , F+j ≡, /' F+j P 0*+ 1', -=D > 0 , , F+j ≡ E ! # J F = *, . … , P − . >)/ q It is a simple matter to invert the previous equation and express ! # in terms of , F + j . q Multiplying both sides of the previous equation by the exponential J1(',-C)/0) , k = *, ., … , P − . and sum over F = *, ., … , P − ., the RHS reduces to P l ! k J*1(',DC)/0) . 12/20/20 Prof. Hesham Tolba Digital Signal Processing 63 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … q Thus we obtain 0*+ 1', -=D > . 0 ! # = E , F+j J , P # = *, . … , P − . -)/ ! # from the specification of the frequency samples , F + j , F = *, . … , P − .. q This relationship allows computing the values of j = *, the previous two equations reduce to the DFT of the sequence {! # } and its IDFT, respectively. q Note that when 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 64 32 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … {! # } is real, the frequency samples , F + j symmetry condition q Since satisfy the , F + j = ,∗ k − F − j q This symmetry condition, along with the symmetry conditions for {! # }, can be used to reduce the frequency specifications from P points to (P + .)// points for P odd and P// points for P even. q Thus the linear equations for determining {! # } from {, F + j } are considerably simplified. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 65 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … , % = ,; % J1 *12(0*+)/'=,/' is sampled at the frequencies %- = /' F + j /P, F = *, . … , P − ., we obtain q In particular, if , F + j = ,; /' (F + j) J1 E,/'*',(-=D)12(0*+)/'0 P where n = * when {! # } is symmetric and n = . when {! # } is antisymmetric. q A simplification occurs by defining a set of real frequency samples {o F + j } o F + j = −. - ,; 12/20/20 Digital Signal Processing Prof. Hesham Tolba /' (F + j) , P Prof. Hesham Tolba F = *, ., … , P − . Digital Signal Processing 66 33 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … q Using the two previous equations to eliminate ,; %- , we get , F + j = o F + j J1,- J1 E,/'*',(-=D)(0*+)/'0 , F + j translates into a corresponding symmetry condition for o F + j , which can be exploited to simplify the expressions for the FIR filter impulse response {! # } for the four cases j = *, j = .//, n = *, and n = .. q The symmetry condition for q The results are summarized in the table shown in the next slide. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 67 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … Unit Sample Response: * + = ±*(, − / − +) 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 68 34 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Linear-Phase FIR Filters by the FrequencySampling Method … q The frequency sampling method provides us with another means for designing linear-phase FIR filters. q Its major advantage lies in the efficient frequency-sampling structure, which is obtained when most of the frequency samples are zero. q The optimum values for the samples in the transition band are obtained from the tables in Appendix B. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 69 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Determine the coefficients of a linear-phase FIR filter of length P = .p which has a symmetric unit sample response and a frequency response that satisfies the conditions !6 %, O = (, %, :, h :*O O=j = g (. j, %f (, O = f, k, l q Solution: q Since !(#) is symmetric and the frequencies are selected to correspond to the case j = *, we use the corresponding formula in the above table to evaluate !(#). 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 70 35 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q In this case, /'F , .p q The result of this computation is o F = −. - ,; ! ! ! ! ! ! ! ! * . / \ ) p e q 12/20/20 =! =! =! =! =! =! =! .) .\ ./ .. .* s r F = *, ., … , q = −*. *.)../rs\ = −*. **.s)p\*s = *. *)*****4 = *. *.//\)p) = −*. *s.\rr*/ = −*. *.r*rsre = *. \.\\.qe = *. p/ Prof. Hesham Tolba Digital Signal Processing 71 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The frequency response characteristic of this filter is as shown. q We should emphasize that ,; % is exactly equal to the values given by the specifications above at %- = /'F/.p. Frequency response of linear-phase FIR filter. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 72 36 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Determine the coefficients of a linear-phase FIR filter of length P = \/ which has a symmetric unit sample response and a frequency response that satisfies the condition !6 %, :*(O + m) = g n$, h: (, O = (, %, :, h, j, f O=k O = l, o, … , %f + ' where u+ = *. \qrsqsp for j = *, and u+ = *. \pq*)se for j = . u+ were obtained from the tables of optimum transition parameters given in Appendix B. q These values of 12/20/20 Prof. Hesham Tolba Digital Signal Processing 73 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Solution: q The appropriate equations for this computation are given in the + ' previous table for j = * & j = . q These computations yield the unit sample responses in the shown table. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 74 37 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The corresponding frequency response characteristics are illustrated in the shown figures, respectively. Frequency response of linear-phase FIR filter (0 = ?' and D = /). q Note that the filter BW for 12/20/20 Frequency response of linear-phase FIR filter (0 = ?' and D = +/'). m = %/: is wider than that for m = (. Prof. Hesham Tolba Digital Signal Processing 75 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations q The optimization of the frequency samples in the transition region of the frequency response can be explained by evaluating the system function , = , given by 0*+ . − =*0J1',D , F+j , = = E , P . − J1',(-=D)/0=*+ -)/ on the unit circle and using the relationship , F + j = o F + j J1,- J1 E,/'*',(-=D)(0*+)/'0 to express , % 12/20/20 Digital Signal Processing Prof. Hesham Tolba in terms of o F + j . Prof. Hesham Tolba Digital Signal Processing 76 38 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q Thus for the symmetric filter we obtain , % = sin %w 0*+ o F+j 2 − 'j E % ' P -)/ sin 2 − P (F + j) J*12(0*+)/' where −o P − F , o F+j =v . o P−F− , / 12/20/20 Prof. Hesham Tolba j=* . j= / Digital Signal Processing 77 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q Similarly, for the antisymmetric linear-phase FIR filter, obtain , % = sin %w 0*+ o F+j 2 − 'j E % ' P -)/ sin 2 − P (F + j) we J*12(0*+)/' J1,/' where o P−F , o F+j =v . −o P − F − , / j=* . j= / o F + j in the passband are set to in the stopband are set to zero. q The values of 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing −. - and those 78 39 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … p O + m in the transition band, the value of ! " is computed at a dense set of frequencies (e.g., at "& = :*,/q, , = (, %, … , q − %, where, for example, q = %(G). q For any choice of q The value of the maximum side lobe is determined, and the values of the parameters {p O + m } in the transition band are changed in a direction of steepest descent, which, in effect, reduces the maximum sidelobe. q The computation of {p O + m }. ! " is now repeated with the new choice of ! " is again determined and the values of the parameters {p O + m } in the transition band are adjusted in a direction of steepest descent, which, in turn, reduces the sidelobe. q The maximum sidelobe of 12/20/20 Prof. Hesham Tolba Digital Signal Processing 79 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q This iterative process is performed until it converges to the optimum choice of the parameters {o F + j } in the transition band. q There is a potential problem in the frequency-sampling realization of the FIR linear-phase filter. q The frequency-sampling realization of the FIR filter introduces poles and zeros at equally spaced points on the unit circle. q In the ideal situation, the zeros cancel the poles and, consequently, the actual zeros of ,(=) are determined by the selection of the frequency samples {, F + j }. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 80 40 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q In a practical implementation, quantization effects preclude a perfect cancellation of the poles and zeros. q The location of poles on the unit circle provide no damping of the round-off noise that is introduced in the computations. q As a result, such noise tends to increase with time and, ultimately, may destroy the normal operation of the filter. q To mitigate this problem, we can move both the poles and zeros from the unit circle to a circle just inside the unit circle, say at radius x = . − y, where y is a very small number. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 81 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q Thus the system function of the linear-phase FIR filter becomes 0*+ . − x0=*0J1',D , F+j , = = E P . − xJ1'2,(-=D)/0=*+ -)/ q The corresponding two-pole filter realization given previously can be modified accordingly. x < . ensures that roundoff noise will be bounded and thus instability is avoided. q The damping provided by selecting 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 82 41 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters q The window & the frequency-sampling method are relatively simple techniques for designing linear-phase FIR filters. q They possess some minor disadvantages, which may render them undesirable for some applications. q A major problem is the lack of precise control of the critical frequencies such as %3 and %4 . q The filter design method described here is formulated as a Chebyshev approximation problem. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 83 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q It is viewed as an optimum design criterion. q This criterion implies that weighted approximation error between the desired and the actual frequency responses is spread evenly across both the passband and the stopband of the filter minimizing the maximum error q The resulting filter designs have ripples in both the passband and the stopband. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 84 42 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Consider the design of an LPF with passband edge frequency and stopband edge frequency %4 . %3 q From the shown general specifications, in the passband, the filter frequency response satisfies the condition . − 2+ ≤ ,; % ≤ . + 2+ , % ≤ %3 q Similarly, in the stopband, the filter frequency response is specified to fall between the limits ±2' , i.e., −2' ≤ ,; % ≤ 2' , 12/20/20 % > %4 Prof. Hesham Tolba Digital Signal Processing 85 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … + , = +(G − % − ,) & G odd. q In this case, the real-valued frequency response characteristic ! 6 " is q Case 1: Symmetric unit sample response. G−% !6 " = + +: : (.'4)/% N +(,) cos " &/0 G−% −, : O = G − % ⁄: − , and define a new set of filter parameters {6(O)} as q If we let G−% , : 6(O) = G−% :+ −O , : + 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba O=( O = %, :, … , Digital Signal Processing G−% : 86 43 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Thus, we can write ,; % to the compact form (0*+)/' ,; % = E 7(F) cos %F >)/ q Case 2: Symmetric unit sample response. even. q In this case, ,; % is expressed as 0⁄' *+ ,; % = / E !(#) cos % >)/ 12/20/20 ! # = !(P − . − #) & P Prof. Hesham Tolba P−. −# / Digital Signal Processing 87 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … , to O = G⁄: − , and define a new set of filter parameters {K(O)} as q Again, we change the summation index from G G −O , O = %, :, … , : : q With these substitutions !6 " becomes K(O) = :+ ./% !6 " = N K(O) cos " O − &/0 q It is convenient to rearrange !6 " " !6 " = cos : 12/20/20 Digital Signal Processing Prof. Hesham Tolba % : further into the form .⁄% '$ N s (O) cos "O K &/0 Prof. Hesham Tolba Digital Signal Processing 88 44 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … z F } are linearly related to the {G coefficients {G F } as follows q where the coefficients z * = .G . , G / z . = /G . − /G * , G P z F = /G F − /G F − . , G F = ., /, … , − / / P P z G − . = /G / / 12/20/20 Prof. Hesham Tolba Digital Signal Processing 89 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Case 3: Antisymmetric unit sample response. P odd. q In this case, ,; % ! # = −!(P − . − #) & is (0*?)/' ,; % = / E !(#) sin % >)/ P−. −# / q Now, define a new set of filter parameters {(F) = /! 12/20/20 Digital Signal Processing Prof. Hesham Tolba P−. −F , / Prof. Hesham Tolba F = ., /, … , Digital Signal Processing {{(F)} as P−. / 90 45 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … # to F = (P − .)⁄/ − # and using the above-defined sequence {{(F)}, we get q Changing the summation index from (0*+)/' ,; % = E {(F) sin %F -)+ ,; % q It is convenient to rearrange further into the form .'4 /% !6 " = sin " N ut (O) cos "O &/0 12/20/20 Prof. Hesham Tolba Digital Signal Processing 91 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q The coefficients {tu O } are linearly related to the {u O } as follows P−\ P−. ={ , / / P−p P−\ {| = /{ / / ⋮ ⋮ {| {| F − . − {| F + . = /{ F , . {| * − {| / = { . / 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba /≤F≤ Digital Signal Processing P−p / 92 46 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Case 4: Antisymmetric unit sample response. even. q In this case, !6 " + , = −+(G − % − ,) & G is .⁄%'$ !6 " = : N +(,) sin " &/0 G−% −, : q If we change the summation index from , to O = G/: − , and define a new set of filter parameters {C(O)} as G G C(O) = :+ −O , O = %, :, … , : : then ./% % !6 " = N C(O) sin " O − : -/$ 12/20/20 Prof. Hesham Tolba Digital Signal Processing 93 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q It is convenient to rearrange ,; % further into the form 0⁄'*+ % z (F) cos %F ,; % = sin E B 2 >)/ z F } are linearly related to the where the coefficients {B {B F } as follows z P − . = /B P , B / / P z F−. −B z F = /B F , B /≤F≤ −. / . z * − B . =B . B / 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 94 47 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … !6 " in these four cases are summarized as shown. q The expressions for q The rearrangements in Cases 2, 3 & 4 allows us to express as !6 " = v " w " !6 " where ., % cos / , ~ % = sin %, % sin / , 12/20/20 ÄSX . ÄSX / ÄSX \ ÄSX ) Prof. Hesham Tolba Digital Signal Processing 95 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … and G Ç % = E j(F) cos %F -)/ with {j(F)} representing the parameters of the filter, which are linearly related to the unit sample response !(#) of the FIR filter. Å in the sum is Å = (P − .)// for Case 1, Å = (P − \)// for Case 3, and Å = P// − . for Case 2 and Case 4. q The upper limit 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 96 48 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q In addition to the common framework given above for the representation, the real-valued desired frequency response !76 " & the weighting function b " on the approximation error, are defined. q !76 " is simply defined to be unity in the passband and zero in the stopband; some different types of !76 " are as shown. q b " allows us to choose the relative size of the errors in the different frequency bands. q b " is usually normalized to unity in the stopband and set to b " = <% /<$ in the passband, i.e., ] % =g 12/20/20 2' ⁄2+ , ., % TU hcX ÉÄSSÑÄUW % TU hcX ShVÉÑÄUW Prof. Hesham Tolba Digital Signal Processing 97 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q ] % is then simply selected in the passband to reflect our emphasis on the relative size of the ripple in the stopband to the ripple in the passband. ,A; % and ] % , the weighted approximation error is defined as q With the specification of Ö % = ] % ,A; % − ,; % = ] % ,A; % − ~ % Ç % ,A; % =] % ~ % − Ç % ~ % 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 98 49 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Ü % and a modified desired ] are defined for mathematical q A modified weighting function á A; % frequency response , convenience, as Ü % =] % ~ % ] ,A; % ~ % q Then the weighted approximation error may be expressed as á A; % = , Ü % , á A; % − Ç % Ö % =] for all four different types of linear-phase FIR filters. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 99 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Given the error function Ö % , the Chebyshev approximation problem is basically to determine the filter parameters {j F } that minimize the maximum absolute value of Ö % over the frequency bands in which the approximation is to be performed, i.e., G àTU HIJK{D - } àÄâ Ö % 2∈O = àTU HIJK{D - } Ü % , á A; % − E j F {äã %F àÄâ ] 2∈O -)/ where x represents the set (disjoint union) of frequency bands (passbands and stopbands of the desired filter) over which the optimization is to be performed. q The solution to this problem based on a theorem in the theory of Chebyshev approximation, called the alternation theorem. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 100 50 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Alternation Theorem. Let [(, *). x be a compact subset of the interval w " = ∑ >-/0 m O VQW "O to be the unique, best weighted Chebyshev approximation to ! 76 " in x, is that the error function { " exhibit at least | + : extremal frequencies in x. q A necessary and sufficient condition for | + : frequencies {" ? } in x such that " $ < " % < ⋯ < " >@% , { " ? = { " ?@$ , and q That is, there must exist at least Ö %P = àÄâ Ö % , 2∈O å = ., / … , Å + / { " alternates in sign between two successive extremal frequencies ➞ the theorem is called the alternation theorem. q The error function 12/20/20 Prof. Hesham Tolba Digital Signal Processing 101 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Consider the design of a LPF with passband stopband %4 ≤ % ≤ '. * ≤ % ≤ %3 and ,A; % and the weighting are piecewise constant, we have q Since the desired frequency response function ] % BÖ % B = ] % ,A; % − ,; % B% B% B,A; % = =* B% {%P } corresponding to the peaks of Ö % also correspond to peaks at which ,; % meets the error tolerance. q Consequently, the frequencies 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 102 51 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … !6 " is a trigonometric polynomial of degree |, for Case 1, for example, q Since > > !6 " = N m O VQW "O = N m O -/0 > -/0 = N mA O VQW " - N }&- VQW " & &/0 - -/0 !6 " can have at most | − % local maxima and minima in the open interval ( < " < *. q It follows that q In addition, of { " . q Therefore, 12/20/20 " = ( and " = * are usually extrema of !6 " !6 " and, also, has at most | + % extremal frequencies. Prof. Hesham Tolba Digital Signal Processing 103 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … %3 and %4 are also extrema of Ö % , is maximum at % = %3 and % = %4 . q The band-edge frequencies since Ö % Å + \ extremal frequencies for the unique, best approximation of the ideal LPF. q As a consequence, there are at most in Ö % Å+/ extremal frequencies in Ö % ➞ the error function for the LPF design has either Å + \ or Å + / extrema. q The alternation theorem states that there are at least Å+/ alternations or ripples are called extra ripple filters. q In general, filter designs that contain more than q When the filter design contains the maximum number of alternations, it is called a maximal ripple filter. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 104 52 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q The alternation theorem guarantees a unique solution for the Chebyshev optimization problem. q At the desired extremal frequencies equations Ü %> , á A; %> − Ç %> ] {%> }, we have the set of = −. > 2, # = *, ., … , Å + . where 2 represents the maximum value of the error function Ö % . ] % as unity in the stopband and 2' /2+ in the passband, it follows that 2 = 2' . q If we select 12/20/20 Prof. Hesham Tolba Digital Signal Processing 105 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Ü %> , á A; %> − Ç %> ] # = *, ., … , Å + . can be rearranged as q The set of linear equations Ç %> −. > 2 á A; %> , + =, Ü %> ] = −. > 2, # = *, ., … , Å + . or, equivalently, in the form G −. > 2 á E j(F) cos %> F + Ü = ,A; %> , ] %> # = *, ., … , Å + . -)/ 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 106 53 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … {j(F)} and 2 as the parameters to be determined, the previous equation can be expressed in matrix form as q Treating the % % ⋮ ⋮ % cos " # cos " $ ⋮ ⋮ cos " >@$ cos :" # cos :" $ ⋮ ⋮ cos :" >@$ … … ⋮ ⋮ … cos |" # cos |" $ ⋮ ⋮ cos |" >@$ "# %⁄b "$ −%⁄b ⋮ ⋮ " >@$ −% >@$ ⁄b m(() m(%) = ⋮ m(|) ? Ä 76 " # ! Ä 76 " $ ! ⋮ ⋮ Ä 76 " >@$ ! q Initially, we know neither the set of extremal frequencies nor the parameters {j(F)} and 2. 12/20/20 Prof. Hesham Tolba {%> } Digital Signal Processing 107 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q To solve for the parameters, we use an iterative algorithm, called the Remez exchange algorithm, in which we begin by guessing at the set of extremal frequencies, determine Ç % 2, and then compute the error function Ö % . and Ö % we determine another set of Å + / extremal frequencies and repeat the process iteratively until it converges to the optimal set of extremal frequencies. q From q Although the above matrix equation can be used in the iterative procedure, matrix inversion is time consuming and inefficient. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 108 54 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q A more efficient procedure is to compute < analytically, according to the formula <= Ä 76 "# + Å$ ! Ä 76 "$ + ⋯ + Å>@$ ! Ä 76 ">@$ Å# ! Å# Å$ Å>@$ − + ⋯+ b "# b "$ b ">@$ where >@$ Å- = Ç &/0 &B- % cos "- − cos "& < follows immediately from the matrix equation. q Thus with an initial guess at the | + : extremal frequencies, we compute <. q The above expression for 12/20/20 Prof. Hesham Tolba Digital Signal Processing 109 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q since Ç % is a trigonometric polynomial of the form G Ç % = E j(F)H- , H = cos % -)/ and since we know that the polynomial at the points H> ≡ cos %> , # = *, ., … , Å − ., has the corresponding values Ç %> á A; %> − =, −. > 2 , Ü %> ] # = *, ., … , Å + . we can use the Lagrange interpolation formula for Ç % . 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 110 55 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Thus w " can be expressed as w " = q where Ç %> ∑>-/0 w "- }- / H − H∑>-/0 }- / H − H- is as given above, H = cos %, H- = VS %- , and G n- = ç >)/ >Q12/20/20 Prof. Hesham Tolba . H- − H> Digital Signal Processing 111 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q Having the solution for function Ö % Ç % , we can now compute the error from Ü % , á A; % − Ç % Ö % =] on a dense set of frequency points. q Usually, a number of points equal to .eP, where P is the length of the filter, suffices. Ö % ≥ 2 for some frequencies on the dense set, then a new set of frequencies corresponding to the Å + / largest peaks of Ö % are selected and the computational procedure beginning with the repetition of computation of 2. q If 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 112 56 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Å + / extremal frequencies is selected to correspond to the peaks of Ö % , the algorithm forces 2 to increase in each iteration until it converges to the upper bound and hence to the optimum solution for the Chebyshev approximation problem. q Since the new set of Ö % ≤ 2 for all frequencies on the dense set, the optimal solution has been found in terms of the polynomial , % . q In other words, when q A flowchart of the algorithm is shown. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 113 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Ç % , the unit sample response ! # can be computed directly, without having to compute the parameters {j(F)}. q Once the optimal solution has been obtained in terms of q In effect, we have determined ,; % = ~ % Ç % which can be evaluated at % = /'F/P, F = *, ., … , (P − .)//, for P odd, or P// for P even. !(#) can be determined from the formulas given in the table in the next slide. q Then, depending on the type of filter being designed, 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 114 57 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … Unit Sample Response: R > = ±R(0 − + − >) 12/20/20 Prof. Hesham Tolba Digital Signal Processing 115 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q A computer program written by Parks and McClellan is available for designing linear-phase FIR filters based on the Chebyshev approximation criterion. q It is implemented with the Remez exchange algorithm. q This program can be used to design LPFs, HPFs, or BPFs, differentiators, and Hilbert transformers. q A number of software packages for designing equiripple linear- phase FIR filters are now available. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 116 58 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … q The Parks-McClellan program requires a number of input parameters which determine the filter characteristics. q The following parameters must be specified: NFILT: The filter length, denoted above as M. JTYPE: Type of JTYPE = JTYPE = JTYPE = filter: 1 results in a multiple passband/stopband filter. 2 results in a differentiator. 3 results in a Hilbert transformer. NBANDS: The number of frequency bands from 2 (for a lowpass filter) to a maximum of 10 (for a multiple-band filter). 12/20/20 Prof. Hesham Tolba Digital Signal Processing 117 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Optimum Equiripple Linear-Phase FIR Filters … LGRID: The frequency bands specified by lower and upper cutoff frequencies, up to a maximum of 10 bands (an array of size 20, maximum). The frequencies are given in terms of the variable @ = %/5", where @ = ;. C corresponds to the folding frequency. FX: An array of maximum size 10 that specifies the desired frequency response D#% % in each band. WTX: An array of maximum size 10 that specifies the weight function in each band. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 118 59 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example P = e. with a passband edge frequency é3 = *. . and a stopband edge frequency é4 = *. .p. q Design a lowpass filter of length q Solution: q The lowpass filter is a two-band filter with passband edge frequencies (*, *. .) and stopband edge frequencies (*. .p, *. p). (., *) and the weight function is arbitrarily selected as (., .). q The desired response is e., *. *, .. *, .. *, ., / *. ., *. .p, *. * .. * 12/20/20 Prof. Hesham Tolba *. p Digital Signal Processing 119 Digital Signal Processing 120 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The impulse response and frequency response of P = e. FIR filter are as shown. q The resulting filter has a stopband attenuation of -56 dB and a passband ripple of 0.0135 dB. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba 60 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … P to .*. while maintaining all the other parameters the same, the resulting filter has the impulse response and frequency response shown. q Increasing q The stopband attenuation is -85 dB and the passband ripple is reduced to 0.00046 dB. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 121 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q It is possible to increase the attenuation in the stopband by P = e., q decreasing the weighting function ] % = 2' /2+ in the passband. q Keeping the filter length fixed, say at P = e. and a weighting function (*. ., .), we obtain a filter that has q a stopband attenuation of -65 dB, q a passband ripple of 0.049 dB. q With 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 122 61 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example P = \/ with a passband edge frequencies é3+ = *. / & é3' = *. \p and a stopband edge frequencies é4+ = *. . & é4' = *. )/p. q Design a bandpass filter of length q Solution: q This passband filter is a three-band filter with a stopband range of (*, *. .),a passband range of (*. /, *. \p), and second stopband range of (*. )/p, *. p). (.*. *, .. *, .*. *), or as (.*. *, *. ., .. *), and the desired response in the three bands is (*. *, .. *, *. *). q The weighting function is selected as 12/20/20 Prof. Hesham Tolba Digital Signal Processing 123 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Thus the input parameters to the program are \/, *. *, *. *, .*. *, ., *. ., .. *, .. *, \ *. /, *. * .*. * *. \p, *. )/p, *. p 2' is .* times smaller than the ripple in the passband due to the fact that errors in the stopband were given a weight of .* compared to the passband weight of unity. q Note that the ripple in the stopbands 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 124 62 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The impulse response and frequency response of the bandpass FIR filter of P = \/ are illustrated as shown. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 125 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of FIR Differentiators q An ideal differentiator has a frequency response that is linearly proportional to frequency. q Similarly, an ideal digital differentiator is defined as one that has the frequency response ,A % = 5%, −' ≤ % ≤ ' q The unit sample response corresponding to ,A % is . , . , ? ,A % J12> B% = ? 5%J12> B% /' *, /' *, cos '# = , −∞ < # < ∞, #≠* # !A # = 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 126 63 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of FIR Differentiators … q The ideal differentiator has an antisymmetric unit sample response (!A # = −!A −# , !A * = *). q The design of linear-phase FIR differentiators based on the Chebyshev approximation criterion is considered here with focus on FIR designs in which ! # = −!(P − . − #). ,; % of the FIR has the characteristic that ,; * = *. q Recall that in Case 3, q Both cases 3 & 4 filter types satisfy the condition “zero response at zero frequency” that the differentiator should satisfy. Response Functions for Linear-Phase FIR Filters 12/20/20 Prof. Hesham Tolba Digital Signal Processing 127 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of FIR Differentiators … q A full-band differentiator is impossible to achieve with an FIR filter having an odd number of coefficients, since ,; ' = * for P odd. q However, in practice, full-band differentiators are rarely required. q In most cases, the desired frequency response characteristic need only be linear over the limited frequency range * ≤ % ≤ /'é3, where é3 is called the BW of the differentiator. /'é3 ≤ % ≤ ', the desired response may be either left unconstrained or constrained to be zero. q In the range 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 128 64 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of FIR Differentiators … q In the design of FIR differentiators based on the Chebyshev approximation, the weighting function b(") is specified as E % = / , % ; ≤ % ≤ 5"@& in order that the relative ripple in the passband be a constant. " and the increases as " varies from ( to :*ÉC . q Thus the absolute error between the desired response approximation !6 " q However, ] % ?= ensures that the relative error FGH '("()*+! E % % − D% % = FGH '("()*+! /− D% % % is fixed within the passband of the differentiator. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 129 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Use the Remez algorithm to design a linear-phase FIR differentiator of length P = e*. The passband edge frequency is *. . and the stopband edge frequency is *. .p. q Solution: q The input parameters to the program are e*, *. *, .. *, .. *, 12/20/20 Digital Signal Processing Prof. Hesham Tolba /, *. ., *. * .. * Prof. Hesham Tolba / *. .p, *. p Digital Signal Processing 130 65 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The frequency response characteristic is illustrated as shown. q Also shown in the same figure is the approximation error over the passband a * ≤ é ≤ *. . of the filter. Frequency response and approximation error for . = ;0 FIR differentiator 12/20/20 Prof. Hesham Tolba Digital Signal Processing 131 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations q The important parameters in a differentiator are its length P, its BW é3, and the peak relative error 2 of the approximation. /* log +/ 2 versus é3 with P as a parameter is as shown for P even. q The value of %0 log "# G vs H! for . = =, J, $;, 4%, and ;= FIR differentiator 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 132 66 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … /* log +/ 2 versus é3 for P odd is as shown. q The value of q These results are useful in the selection of the filter length, given specifications on the in-band ripple and the cutoff frequency é3. q These graphs reveals that even- length differentiators result in a significantly smaller approximation error 2 than comparable odd-length differentiators. 12/20/20 Prof. Hesham Tolba %0 log "# G vs H! for . = K, L, $M, 44, and ;K FIR differentiator Digital Signal Processing 133 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q Designs based on é3 = *. )p. P odd are particularly poor if the BW exceeds q The problem is basically the zero in the frequency response at % = ' (é = .⁄/). é3 < *. )p, good designs are obtained for P odd, but comparable-length differentiators with P even are always better in the sense that the approximation error is smaller. q When q In view of the obvious advantage of even-length over odd-length differentiators, a conclusion might be that even-length differentiators are always preferable in practical systems. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 134 67 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q However, we should note that the signal delay introduced by any linear-phase FIR filter is (P − .)//, which is not an integer when P is even. q In many practical applications, this is unimportant. q In some applications where it is desirable to have an integer- valued delay in the signal at the output of the differentiator, we must select P to be odd. q These numerical results are based on designs resulting from the Chebyshev approximation criterion. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 135 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q It is also possible to design linear-phase FIR differentiators based on the frequency-sampling method. q For example, the frequency response characteristics of a wideband (é3 = *. p) differentiator, P = \*, designed by frequency-sampling method is shown. q The graph of the absolute value of the approximation error as a function of frequency is also shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 136 68 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers q An ideal Hilbert transformer is an all-pass filter that imparts a 90° phase shift on the signal at its input. q Hence the frequency response of the ideal Hilbert transformer is specified as ,A % = g −5, 5, *≤%≤' −' ≤ % ≤ * q Hilbert transformers are frequently used in communication systems and signal processing. q For example, in the generation of single-sideband modulated signals, radar signal processing, and speech signal processing. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 137 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers q The unit sample response of an ideal Hilbert transformer is !A # = / , . , . ? ,A % J12> B% = ? 5J12> B% − ? 5J12> B% /' *, /' *, / / sin' '#// , = v' # *, #≠* #=* q !A # is infinite in duration and noncausal. q !A # is antisymmetric [i.e., !A # = −!A −# ]. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 138 69 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … q Focus is on the design of linear-phase FIR Hilbert transformers with antisymmetric unit sample response [i.e., + , = + G − % − , ]. q This choice is consistent with having a purely imaginary frequency response characteristic ! 7 " . +7 , is antisymmetric, ! 6 " is zero at " = ( for both G odd and even and at " = * when G is odd. q When q Clearly, then, it is impossible to design an all-pass digital Hilbert transformer. q In practical applications, an all-pass Hilbert transformer is unnecessary; its BW need only cover the BW of the signal to be phase shifted. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 139 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … q Consequently, we specify the desired transform filter as ,A; % = ., ,; % of a Hilbert /'éU ≤ % ≤ /'éV where éU and éV are the lower and upper cutoff frequencies, respectively. q Note that the ideal Hilbert transformer with unit sample response !A # as given above is zero for # even. q This property is retained by the FIR Hilbert transformer under some symmetry conditions. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 140 70 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … ,; % = and suppose that éU = *. p − éV to ensures a symmetric passband about the midpoint frequency é = *. /p. q Having this symmetry in the frequency response, ,; % = ,; (' − %), thus q Consider the Case 3 filter type for which ∑(0*+)/' {(F) sin %F -)+ (01.)/) I (01.)/) J(K) sin %K = ,-. I J(K) sin " − % K ,-. (01.)/) = I J(K) sin %K cos "K ,-. (01.)/) = I J(K) −/ ,4. sin %K ,-. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 141 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … q Equivalently, we have (01.)/) I / − −/ ,4. J(K) sin %K = ; ,-. q Clearly, {(F) must be equal to zero for F = *, /, ), …. q The relationship between {! # } is, J(K) = 5* 12/20/20 Digital Signal Processing Prof. Hesham Tolba ,−/ −K 5 {{ F } and the unit sample response or, equivalently Prof. Hesham Tolba Digital Signal Processing * ,−/ / − K = J(K) 5 5 142 71 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … q If {(F) is zero for F = *, /, ), …, then *(K) = ;, K = ;, 5, M, … , ;,, q This holds only for q ,−/ RSR: 5 ,−/ OPQ PTT 5 OPQ K = /, ., C, … , P odd, but does not hold for P even. P odd is preferable since the computational complexity is roughly one half of that for P even. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 143 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of Hilbert Transformers … q When the design is performed by the Chebyshev approximation criterion using the Remez algorithm, the filter coefficients are selected to minimize the peak approximation error 2= = àÄâ ,A; % − ,; % àÄâ . − ,; % ',W5 X2X',W6 ',W5 X2X',W6 q Thus the weighting function is set to unity and the optimization is performed over the single frequency band (i.e., the passband of the filter). 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 144 72 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Design a Hilbert transformer with parameters and éV = *. )p. P = \., éU = *. *p q Solution: q We observe that the frequency response is symmetric, since éU = *. p − éV. q The parameters for executing the Remez algorithm are \., *. *p, .. * .. * 12/20/20 \, . *. )p Prof. Hesham Tolba Digital Signal Processing 145 Digital Signal Processing 146 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The result of this design is the unit sample response and frequency response as shown. q We observe that, indeed, every other value of !(#) is essentially zero. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba 73 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations q If the filter design is restricted to a symmetric frequency response, then there are basically three parameters of interest, G, <, and ÉN . :( log $0 < versus Üá (the transition width) with G as a parameter is shown. q A plot of G, there is no performance advantage of using G odd over G even, and vice versa. q For comparable values of q The computational complexity in implementing a filter for G odd is less by a factor of 2 over G even as previously indicated. 12/20/20 Prof. Hesham Tolba %0 log "# G vs OP for . = 4, =, M, J, $K, $;, 4$, 4%, ;4, ;=. Digital Signal Processing 147 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q Therefore, P odd is preferable in practice. q For design purposes, the graphs in the previous figure suggest that, as a rule of thumb, PéU ≈ −*. e. log +/ 2 q Hence this formula can be used to estimate the size of one of the three basic filter parameters when the other two parameters are specified. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 148 74 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters q The method based on the use of windows to truncate the impulse response !A(#) and obtain the desired spectral shaping was the first method proposed for designing linear-phase FIR filters. q The frequency-sampling method and the Chebyshev approximation method were developed in the 1970s and have since become very popular in the design of practical linear-phase FIR filters. q The major disadvantage of the window design method is the lack of precise control of the critical frequencies, such as %3 and %4, in the design of a LP FIR filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 149 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … %3 and %4, in general, depend on the type of window and the filter length P. q The values of q The frequency-sampling method provides an improvement over the window design method, since ,;(%) is specified at the frequencies %- = /'F/P or %- = '(/F + .)/P and the transition band is a multiple of /'/P. q This filter design method is particularly attractive when the FIR filter is realized either in the frequency domain by means of the DFT or in any of the frequency-sampling realizations. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 150 75 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … ,;(%- ) is either zero or unity at all frequencies, except in the transition band. q The attractive feature of these realizations is that q The Chebyshev approximation method provides total control of the filter specifications, and, as a consequence, it is usually preferable over the other two methods. q For an LPF, the specifications are given in terms of the parameters %3, %4 , 2+ , 2' and P. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 151 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … q We can specify the parameters the filters relative to 2' . %3, %4, P, and 2, and optimize q By spreading the approximation error over the passband and the stopband of the filter, this method results in an optimal filter design (the maximum sidelobe level is minimized). q The Chebyshev design procedure based on the Remez exchange algorithm requires that we specify the length of the filter, the critical frequencies %3 and %4 , and the ratio 2' /2+ . 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 152 76 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … q However, it is more natural in filter design to specify (%3 , %4, 2+ , and 2' and to determine the filter length that satisfies the specifications. q Although there is no simple formula to determine the filter length from these specifications, a number of approximations have been proposed for estimating P from %3, %4 , 2+ , and 2' . q A particularly simple formula for approximating á = P P is −/* log +/ 2+ 2Y − .\ .). eíé where íé is the transition band, defined as íé = (%4 − %3)//'. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 153 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … q A more accurate formula is á = P ìB(2+ 2Y) − é(2+ 2Y)íé' +. íé where, by definition, ìB(2+ 2Y) = *. **p\*s log +/ 2+ ' + *. *q..) log +/ 2+ − *. )qe. log +/ 2Y − *. **/ee log +/ 2+ ' + *. ps). log +/ 2+ + *. )/qr é 2+ , 2Y = ... *./ + *. p./)) log +/ 2+ − log +/ 2Y 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 154 77 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Comparison of Design Methods for Linear-Phase FIR Filters … q These formulas are useful in obtaining a good estimate of the filter length required to achieve the given specifications íé, 2+ & 2Y. q The estimate is used to carry out the design, and if the resulting 2 exceeds the specified 2Y, the length can be increased until we obtain a sidelobe level that meets the specifications. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 155 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters 12/20/20 Digital Signal Processing Prof. Hesham Tolba Digital Signal Processing 156 78 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters q Several methods can be used to design IIR digital filters. q The techniques described here are all based on converting an analog filter into a digital filter. q The design of a digital filter begins in the analog domain, then it is converted into the digital domain. q An analog filter can be described by its system function, !Q à = âà ∑. }-à= -/0 äà ∑R -/0 m-à where {m - } and {} - } are the filter coefficients, or by its impulse response 8 !Q à = @ +(ã)>'ST Cã '8 12/20/20 Prof. Hesham Tolba Digital Signal Processing 157 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters … , ã can be described by the linear constant-coefficient differential equation q The analog filter having the rational system function . E -)/ j- 0 B- D(î) B- H(î) = E n BîBî-)/ where H î denotes the input signal and D î of the filter. denotes the output q Each of these three equivalent characterizations of an analog filter leads to alternative methods for converting the filter into the digital domain. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 158 79 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters … , ã is stable if all its poles lie in the left half of the ã-plane. q Recall that an analog LTI system with system function q Consequently, if the conversion technique is to be effective, it should possess the following desirable properties: 1. The 5ï axis in the ã-plane should map into the unit circle in the ñ-plane ➞ there will be a direct relationship between the two frequency variables in the two domains. 2. The LHP of the ã-plane should map into the inside of the unit circle in the ñ-plane ➞ a stable analog filter will be converted to a stable digital filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 159 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters … q Recall that physically realizable and stable IIR filters cannot have linear phase. q Recall that a linear-phase filter must have a system function that satisfies the condition , = = ±=*., =*+ where =*. represents a delay of Q units of time q But if this were the case, the filter would have a mirror-image pole outside the unit circle for every pole inside the unit circle. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 160 80 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters … q Hence the filter would be unstable. q Consequently, a causal and stable IIR filter cannot have linear phase. q If the restriction on physical realizability is removed, it is possible to obtain a linear-phase IIR filter, at least in principle. q This approach involves performing a time reversal of the input signal H # , passing H −# through a digital filter , = , timereversing the output of , = , and finally, passing the result through , = again. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 161 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Design of IIR Filters from Analog Filters … q This signal processing is computationally cumbersome and offer no advantages over linear-phase FIR filters. q Consequently, when an application requires a linear-phase filter, it should be an FIR filter. q In the design of IIR filters, we specify the desired filter characteristics for the magnitude response only. q This does not mean that the phase response unimportant. q Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the obtained phase response. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 162 81 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q One of the simplest methods for converting an analog filter into a digital filter is to approximate the differential equation . 0 B- D(î) B- H(î) E j= E n BîBî-)/ -)/ by an equivalent difference equation. q This approach is often used to solve a linear constant- coefficient differential equation numerically on a digital computer. BD(î)/Bî at time î = #u, we substitute the backward difference D #u − D(#u − .) /u. q For the derivative 12/20/20 Prof. Hesham Tolba Digital Signal Processing 163 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q Thus BD î D #u − D(#u − .) D # − D(# − .) ó = = Bî Z)>[ u u where u represents the sampling interval and D # ≡ D(#u). q The analog differentiator with output function , ã = ã. BD(î)/Bî has the system q The digital system that produces the output has the system function , = = . − =*+ /u. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing D #u − D(#u − .) /u 164 82 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q Consequently, as shown, the frequency-domain equivalent for the previous relationship is ã= . − =*+ u Substitution of the \(>) backward difference for the derivative implies the mapping 4 = + − (1. ⁄[. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 165 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q The 2nd derivative B' D î ⁄Bî' is replaced by the second difference B' D î ò Bî' Z)>[ = B BD î Bî Bî Z)>[ D #u − D #u − u /u − D #u − u − D #u − /u /u u D # − /D # − . + D(# − /) = u' = q In the frequency domain, this is equivalent to ã' 12/20/20 Digital Signal Processing Prof. Hesham Tolba . − /=*+ + =*' / − U1. = = u' V Prof. Hesham Tolba Digital Signal Processing ) 166 83 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … Fth derivative D(î) results in the equivalent frequency-domain relationship q The substitution for the - ã = / − U1. , V q Consequently, the system function for the digital IIR filter obtained as a result of the approximation of the derivatives is , = = ,](ã)< 4) +*(7. ⁄[ where ,](ã) is the system function of the analog filter A, \(Z) A, ^(Z) ∑0 characterized by the equation ∑. -)/ j, = -)/ n, . AZ 12/20/20 Prof. Hesham Tolba AZ Digital Signal Processing 167 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q The mapping from the à-plane to the ç-plane as given by à = % − 8'$ ⁄n is equivalent to == . . − ãu à = ?å in the previous equation leads to q Substituting == . . ïu = + 5 . − 5ïu . + ï' u' . + ï' u' å varies from −∞ to ∞, the corresponding locus of points in the ç-plane is a circle of radius %/: and with center at 8 = %/:, as shown. q As 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing The mapping from the S-plane to the U-plane 168 84 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … ã-plane into corresponding points inside this circle in the ñ-plane, and points in the RHP of the ã-plane are mapped into points outside this circle. q The above mapping takes points in the LHP of the q This mapping has the desirable property that a stable analog filter is transformed into a stable digital filter. q However, the possible location of the poles of the digital filter are confined to relatively small frequencies. q As a consequence, the mapping is restricted to the design of LP and BP filters having relatively small resonant frequencies. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 169 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q It is not possible, for example, to transform a HP analog filter into a corresponding HP digital filter. q To overcome the limitations in the mapping given above, more complex substitutions for the derivatives have been proposed. q An Åth order difference of the form G BD î . D #u + Fu − D(#u − Fu) ó = E jBî Z)>[ u u -)+ has been proposed, where {j- } are a set of parameters that can be selected to optimize the approximation. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 170 85 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q The resulting mapping between the ã-plane and the ñ-plane is > à= % N m- 8- − 8'n -/$ q When ô = J12 , we have > : à = ? N m- sin "O n -/$ which is purely imaginary; thus > å= : N m- sin "O n -/$ is the resulting mapping between the two frequency variables. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 171 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Approximation of Derivatives … q By proper choice of the coefficients the 5ï-axis into the unit circle. q Furthermore, points in the LHP in inside the unit circle in ñ. {j- } it is possible to map ã can be mapped into points q Despite achieving the two desirable characteristics with the ' mapping of ï = ∑G-)+ j- sin %F, the problem of selecting the set of [ coefficients {j- } remains. q This is a difficult problem. q Since simpler techniques exist for converting analog filters into IIR digital filters, the use of the Åth-order difference as a substitute for the derivative will not be emphasized here. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 172 86 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Convert the analog BPF with system function % à + (. % % + é into a digital IIR filter by use of the backward difference for the derivative. Solution: q Substitution for W from à = % − 8'$ ⁄n into !(à) yields % ! 8 = % % − 8'$ + (. % +é n n% / % + (. :n + é. (%n% = : % + (. %n % %− 8'$ + 8'% % + (. :n + é. (%n% % + (. :n + é. (%n% !Q (à) = q 12/20/20 Prof. Hesham Tolba Digital Signal Processing 173 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q We observe that this mapping has introduced two additional poles in the conversion from ,](ã) to ,(=). q As a consequence, the digital filter is significantly more complex than the analog filter. q This is a major drawback to the mapping given above. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 174 87 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance q Objective: Design an IIR filter having a unit sample response ! # that is the sampled version of the impulse response of the analog filter, i.e., + , ≡ + ,n , , = (, %, :, … where u is the sampling interval. H](î) with spectrum ö](õ) is sampled at a rate õ4 = ./u, the spectrum of the sampled signal is ö é = õ 4 ∑B -)*B ö] (é − F)õ4 , where é = õ/õ4 is the normalized frequency. q Recall that when a CT signal õ4 is less than twice the highest frequency contained in ö](õ). q Recall also that aliasing occurs if the sampling rate 12/20/20 Prof. Hesham Tolba Digital Signal Processing 175 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q Expressed in the context of sampling the impulse response of an analog filter with frequency response ,](õ), the digital filter with ! # ≡ !] #u has the frequency response B ! é = õ4 E ,] (é − F)õ4 -)*B or, equivalently, B ! % = õ4 E ,] (% − /'F)õ4 -)*B or ! ïu = 12/20/20 Digital Signal Processing Prof. Hesham Tolba B . /'F ,] ï − E u -)*B u Prof. Hesham Tolba Digital Signal Processing 176 88 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q The frequency response of an LP analog filter and the frequency response of the corresponding digital filter are shown. % has the frequency response of the corresponding analog filter if u is selected sufficiently small to completely avoid or at least minimize the effects of aliasing. q The digital filter with ! q The impulse invariance method is inappropriate for designing HP filters due to the spectrum aliasing that results from the sampling process. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 177 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … ñ-plane and the ã-plane by the sampling process, rely on the generalization of the previous equation which relates the ñ-transform of !(#) to the Laplace Transform of !](î), as q The mapping of points between the ,(=)< = ()%89 B . /'F E ,] ã − u -)*B u where *> ! = = ∑B >)/ !(#)= B ,(=)< ()%89 12/20/20 Digital Signal Processing Prof. Hesham Tolba = E !(#)J*4[> >)/ Prof. Hesham Tolba Digital Signal Processing 178 89 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q When ã = 5ï, the relation ,(=)< = ()%89 B . /'F E ,] ã − u -)*B u reduces to ! ïu = B . /'F E ,] ï − u -)*B u ã = ú + 5ï, and expressing the complex variable in polar form as = = xJ12, the mapping = = J4[ becomes q Substituting xJ12 = J_[J1`[ 12/20/20 Prof. Hesham Tolba Digital Signal Processing 179 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q Clearly, we must have x = J_[ and % = ïu ú < * implies that * < x < . and ú > * implies that x > .; when ú = *, we have x = .. q Consequently, ã is mapped inside the unit circle in = and the RHP in ã is mapped outside the unit circle in =. q Therefore, the LHP in 5ï-axis is mapped into the unit circle in = as indicated above. q Also, the 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 180 90 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q However, the mapping of the 5ï-axis into the unit circle is not one-to-one. % is unique over the range (−', '), the mapping % = ïu implies that the interval −'/u ≤ ï ≤ '/u maps into the corresponding values of −' ≤ % ≤ '. q Since '/u ≤ ï ≤ \'/u also maps into the interval −' ≤ % ≤ ' and, in general, so does the interval (/F − .)'/u ≤ ï ≤ (/F + .)'/u, when F is an integer. q The frequency interval ï to % in the digital domain is many-toone, which simply reflects the effects of aliasing due to sampling. q Thus the mapping from 12/20/20 Prof. Hesham Tolba Digital Signal Processing 181 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … ã–plane to the ñ-plane for the relation = = J4[ is as shown. q The mapping from the ( = %89 maps strips of width ',/[ (for _ < /) in the 4-plane into points in the unit circle in the b-plane. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 182 91 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q Expressing the system function of the analog filter in partial- fraction form and assuming that the poles of the analog filter are distinct, we can write . ,] ã = E -)+ {ã − ù- where {ù- } are the poles of the analog filter and {{- } are the coefficients in the partial-fraction expansion. q Consequently, . !] î = E {- J3, Z , î≥* -)+ 12/20/20 Prof. Hesham Tolba Digital Signal Processing 183 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … q If we sample !] î periodically at î = #u, we have . ! # = !] #u = E {- J3, [> -)+ q The system function of the resulting digital IIR filter becomes B B . . B , = = E ! # =*> = E E {- J3, [> =*> = E {- E J3, [=*+ >)/ 12/20/20 Digital Signal Processing Prof. Hesham Tolba >)/ -)+ Prof. Hesham Tolba -)+ Digital Signal Processing > >)/ 184 92 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … ù- < * and yields q The inner sum converges because B E J3, [=*+ > = >)/ . . − J3, [=*+ q Therefore, the system function of the digital filter is . , = =E -)+ . . − J3, [=*+ q Observe that the digital filter has poles at =- = J3, [, 12/20/20 Prof. Hesham Tolba F = ., /, … , Q Digital Signal Processing 185 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Impulse Invariance … ã–plane to the ñ-plane by the relationship =- = J , F = ., /, … , Q, the zeros in the two domains do not satisfy the same relationship. q Although the poles are mapped from the 3, [ q Therefore, the impulse invariance method does not correspond to the simple mapping of points given by = = J4[ + ,(=) given by , = = ∑. -)+ +*%&, 9 (7. was based on a filter having distinct poles. q The development that resulted in q It can be generalized to include multiple-order poles. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 186 93 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Convert the analog filter with system function ã + *. . ã + *. . ' + s ,] ã = into a digital IIR filter by means of the impulse invariance method. q Solution: q We note that the analog filter has a zero at ã = −*. . and a pair of complexconjugate poles at ù- = −*. . ± 5\ as shown. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 187 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q No need to determine the impulse response q Instead, we directly determine . , = =E -)+ !] î . , = , as given by . . − J3, [=*+ from the partial-fraction expansion of ,] ã . q Thus we have , ã = 12/20/20 Digital Signal Processing Prof. Hesham Tolba *. p *. p + ã + *. . − 5\ ã + *. . + 5\ Prof. Hesham Tolba Digital Signal Processing 188 94 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Then, , = = *. p *. p + . − J*/.+[J1?[=*+ . − J*/.+[J*1?[=*+ q Since the two poles are complex conjugates, we can combine them to form a single two-pole filter with system function . − J*/.+[ cos \u =*+ , = = . − /J*/.+[ cos \u =*+ + J*'/.+[=*+ 12/20/20 Prof. Hesham Tolba Digital Signal Processing 189 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The magnitude of the frequency response characteristic of this filter is as shown for u = *. . and u = *. p. Frequency response of digital filter 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 190 95 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q For purpose of comparison, the magnitude of the frequency response of the analog filter is plotted as shown. q We note that aliasing is significantly more prevalent when u = *. p than when u = *. .. Frequency response of analog filter 12/20/20 Prof. Hesham Tolba Digital Signal Processing 191 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Also, note the shift of the resonant frequency as u changes. q Selecting a small value for u is important to minimize the effect of aliasing. q Due to the presence of aliasing, the impulse invariance method is appropriate for the design of LP & BP filters only. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Frequency response of analog filter Digital Signal Processing 192 96 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation q The design techniques described above are appropriate only for LPFs and a limited class of BPFs. q The bilinear transformation overcomes the limitation of the two design methods described previously. 5ï-axis into the unit circle in the ñ-plane only once ➞ avoiding aliasing of frequency components. s plan to z q It is a conformal mapping that transforms the S are mapped inside the unit circle in the ñ-plane and all points in the RHP of S are mapped into corresponding points outside the unit circle in the ñ-plane. q All points in the LHP of 12/20/20 Prof. Hesham Tolba Digital Signal Processing 193 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q Consider an analog linear filter with system function , ã = G ã+7 q This system is also characterized by the differential equation BD î + 7D î = GH(î) Bî q Instead of substituting a finite difference for the derivative, suppose that we integrate the derivative and approximate the integral by the trapezoidal formula. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 194 97 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q Thus Z D î = ? Dd û Bû + D(î" ) Z: where Dd î denotes the derivative of D î . q The approximation of the above integral by the trapezoidal formula at î = #u and î" = #u − u yields D #u = u d D #u + Dd #u − u + D #u − u / î = #u yields #u = −7D #u + GH(#u) q Thus the differential equation at Dd 12/20/20 Prof. Hesham Tolba Digital Signal Processing 195 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q Using the two previous equations, we get .+ q The 7u 7u Gu D # − .− D #−. = H # −H #−. / / / ñ -transform of this difference equation is .+ 7u 7u *+ Gu ü = − .− = ü = = . + =*+ ö(=) / / / q Consequently, the system function of the equivalent digital filter is , = = 12/20/20 Digital Signal Processing Prof. Hesham Tolba ü = Gu// . + =*+ = ö(=) . + 7u⁄/ − . − 7u⁄/ =*+ Prof. Hesham Tolba Digital Signal Processing 196 98 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … or, equivalently , = = G / . − =*+ u . + =*+ + 7 q Clearly, the mapping from the ã= ã-plane to the ñ-plane is / . − =*+ u . + =*+ q This is called the bilinear transformation. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 197 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q The previous derivation of the bilinear transformation holds for Qth-order differential equations. q Recalling that = = xJ12 and ã = ú + †ï , thus ã = / . − =*+ u . + =*+ can be expressed as / =−. ã= l u =+. / xJ12 − . / x' − . /x sin % = l 12 = +5 ' u xJ + . u . + x + /x cos % . + x' + /x cos % q Consequently, / x' − . ú= l u . + x' + /x cos % 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba and ï= Digital Signal Processing / /x sin % l u . + x' + /x cos % 198 99 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … x < ., then ú < *, and if x > ., then ú > *. q Consequently, the LHP in ã maps into the inside of the unit circle in the ñ-plane and the RHP in ã maps into the outside of the unit circle. q When x = ., then ú = * and q If ï= / sin % / % l = l tan u . + cos % u 2 q or, equivalently, % = / hÄU*+ 12/20/20 Prof. Hesham Tolba ïu / Digital Signal Processing 199 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q The relationship between the frequency variables in the two domains % = / hÄU*+ [ïu⁄/] is as shown. q We observe that the entire range in ï is mapped only once into the range −§ ≤ • ≤ '. bilinear q However, the mapping is highly nonlinear. q We observe a frequency compression (frequency warping) due to the nonlinearity of the arctangent function. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Mapping between e and ` resulting from the bilinear transformation. Digital Signal Processing 200 100 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations IIR Filter Design by Bilinear Transformation … q Note that the bilinear transformation maps the point the point = = −.. ã = ∞ into for bilinear q Consequently, the single-pole LPF described above by , ã = G ã+7 which has a zero at ã = ∞, results in a digital filter that has a zero at = = −. . 12/20/20 Prof. Hesham Tolba Digital Signal Processing 201 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Convert the analog filter with system function !Q à = à + (. % à + (. % % + %k into a digital IIR filter by means of the bilinear transformation. The digital filter is to have a resonant frequency of ê6 = */:. q Solution: q The analog filter has a resonant frequency at at q This frequency is to be mapped into of the parameter n. q From W = 5⁄V Y tan[%⁄2], we must select 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba å6 = j. ê6 = */: by selecting the value n = %/: in order to have å6 = */:. Digital Signal Processing 202 101 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Thus the desired mapping is à=j % − 8'$ % + 8'$ q The resulting digital filter has the system function , = = *. ./r + *. **e=*+ − *. .//=*' . + *. ***e=*+ + *. sqp=*' =*+ term in the denominator of ,(=) is extremely small and can be approximated by zero. q The coefficient of the 12/20/20 Prof. Hesham Tolba Digital Signal Processing 203 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Thus we have the system function *. ./r + *. **e=*+ − *. .//=*' , = = . + *. sqp=*' q This filter has poles at *. sp. ù+,' = *. srq J±1,/' and zeros at =+,' = −., q Therefore, we have succeeded in designing a two-pole filter that resonates near % = '//. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 204 102 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q In this example, u was selected to map ï; into the desired •;. q The design of the digital filter usually begins with specifications in the digital domain, which involve the frequency variable •. q These specifications in frequency are converted to the analog domain by means of the relation in ï = /⁄u l tan[%⁄2]. q The analog filter is then designed that meets these specifications and converted to a digital filter by means of the bilinear transformation in ã = /⁄u . − =*+ ¶ . + =*+ . u is transparent and may be set to any arbitrary value (e.g., u = .). q In this procedure, the parameter 12/20/20 Prof. Hesham Tolba Digital Signal Processing 205 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example \-dB bandwidth of *. /', using the bilinear transformation applied to the analog filter q Design a single-pole lowpass digital filter with a !Q à = åV à + åV where ïg is the \-dB bandwidth of the analog filter. q Solution: q The digital filter is specified to have its ê! = (. :*. −\-dB gain at q In the frequency domain of the analog filter corresponds to 12/20/20 Digital Signal Processing Prof. Hesham Tolba •! = *. /' ïg = [/⁄u] l tan 0.1' = *. ep/u Prof. Hesham Tolba Digital Signal Processing 206 103 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Thus the analog filter has the system function !Q à = (. kf/n à + (. kf/n q This represents our filter design in the analog domain. ã = /⁄u . − =*+ ¶ . + =*+ to convert the analog filter into the desired digital filter. q Thus we obtain q Applying the bilinear transformation , = = *. /)p . + =*+ . − *. p*s=*+ where the parameter u has been divided out. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 207 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The frequency response of the digital filter is , = = *. /)p . + J*1e . − *. p*sJ*1e • = *, , * = ., and at • = *. /', we have , *. /' = *. q*q, which is the desired response. q At 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 208 104 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Characteristics of Commonly Used Analog Filters q IIR digital filters can be obtained by beginning with an analog filter and then using a mapping to transform the ã-plane into the ñ-plane. q Such a mapping preserves, as much as possible, the desired characteristics of the analog filter. q In this section, the important characteristics of commonly used analog filters will be described here. q Discussion is limited to LPFs. q Subsequently, several frequency transformations that convert a LP prototype filter into either a BP, HP, or band-elimination filter will be described. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 209 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Butterworth Filters q LP Butterworth filters are all-pole filters characterized by the magnitude-squared frequency response ! å % = 1 % + å/å! %R = 1 % + y' å/åC %R where Q is the order of the filter, ïg is its cutoff frequency, ï3 is the passband edge frequency, and ./ . + y' the band-edge value of , ï ' . , S , −ã follows that q Since evaluated at ã = 5ï is simply equal to , ï , ã , −ã = 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba is ' , it 1 % + −^) /W)$ Digital Signal Processing R 210 105 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Butterworth Filters … , S , −ã spaced points. q The poles of occur on a circle of radius ïg at equally q From the previous equation we find that −/5 05J = −. +/. = J1 '-=+ ,/. , F = *, ., … , Q − . and hence /K = 0J .#"/5 .# 12/20/20 5K_/ "/5` , Prof. Hesham Tolba 2 = $, 3, … , 5 − 3 Digital Signal Processing 211 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Butterworth Filters … q For example, the pole positions for Q = ) and Q = p Butterworth filters are illustrated as shown. Pole positions for Butterworth filters. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 212 106 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Butterworth Filters … q The frequency response characteristics of the class of Butterworth filters are as shown for several values of Q. butterworth monotonically decrease with freq butterworth filter ' is monotonic in , ï both the passband and stopband. q Note that q The order of the filter required to meet an attenuation 2' at a specified frequency ï4 is easily determined from D W ) = 1 / + W/W; )< = 1 /+ 12/20/20 c) W/W= Frequency response for Butterworth filters. )< Prof. Hesham Tolba Digital Signal Processing 213 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Butterworth Filters … q Thus at ï = ï4 we have 1 . + y' and hence Q= ï4/ï3 '. = 2'' ©V™ ./2'' − . ©V™ 2/y = / ©V™ ï4/ï! ©V™ ï4/ï3 where, by definition, 2' = ./ . + 2' q Thus the Butterworth filter is completely characterized by the parameters Q, 2' , y, and the ratio ï4 /ï3. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 214 107 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Determine the order and the poles of a LP Butterworth filter that has a −\-dB bandwidth of 500 Hz and an attenuation of )* dB at 1000 Hz. q Solution: q The critical frequencies are the −\-dB ï! and the stopband frequency ï4 , which are ï! = .***' & ï4 = /***'. q Recall that , ï3 ' = h += `& /`> + )< q For an attenuation of 40 dB, 12/20/20 Prof. Hesham Tolba = +=i) and , ï4 −)* W¨ = .* log +/ ' = += ` h 8 /`> + j)) + )< = j) . ) ⟹ 2' = *. *.. Digital Signal Processing 215 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Hence ©V™ ./2'' − . ©V™ +/ .*k − . Q= = = e. e) / ©V™ ï4/ï! / ©V™ +/ / q To meet the desired specifications, we select Q = q. q The pole positions are ã- = .***'J1 ,⁄'= '-=+ ,/+k , 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba F = *, ., … , e Digital Signal Processing 216 108 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters q There are two types of Chebyshev filters. q Type I Chebyshev filters are all-pole filters that exhibit equiripple behavior in the passband and a monotonic characteristic in the stopband. q The family of type II Chebyshev filters contains both poles and zeros and exhibits a monotonic behavior in the passband and an equiripple behavior in the stopband. q The zeros of this class of filters lie on the imaginary axis in the ã-plane. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 217 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q The magnitude squared of the frequency response characteristic of a type I Chebyshev filter is given as ! å % = 1 % + y'u'. å/åC Where y is a parameter of the filter related to the ripple in the passband and u.(H) is the Qth-order Chebyshev polynomial defined as VQW í VQW '$ H , VQW_ í VQW_'$ H , u.(H) = $ 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing H ≤% H >% 218 109 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q The Chebyshev polynomials can be generated by the recursive equation u.=+ H = /H u. H − u.*+ H , Q = ., /, … where u" H = ., u+ H = H; from the recursive relation we obtain u' H = /H' − ., u? H = )H? − \H, and so on. q Some of the properties of these polynomials are as follows: u. H ≤ . for all H ≤ .. 2. u. . = . for all Q. 3. All the roots of the polynomial u. H − . ≤ H ≤ .. 1. 12/20/20 Prof. Hesham Tolba occur in the interval Digital Signal Processing 219 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … y is related to the ripple in the passband, as shown, for Q odd and Q even. q The filter parameter Q odd, u. * = * and hence , * ' = .. q For Type 1 Q even, u. * = . and hence , * ' = ./ . + y' . q For Type I Chebyshev filter characteristic. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 220 110 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q At the band-edge frequency ï = ï3, we have u. . = ., so that . . + y' or, equivalently y' = = 1 − 2h . −1 . − 2'+ where 2h is the value of the passband ripple. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 221 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q The poles of a type I Chebyshev filter lie on an ellipse in the ã-plane with major axis x+ = ï3 n' + . /n x' = ï3 n' − . /n and minor axis where n is related to y according to the equation n= 12/20/20 Digital Signal Processing Prof. Hesham Tolba . + y' + . y Prof. Hesham Tolba Digital Signal Processing 222 111 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … íth-order filter by first locating the poles for an equivalent í Butterworth filter that lie on circles of radius ì$ or radius ì% , as shown. butterworth circles q Denoting the angular positions of the poles chebyshev ellipse of the Butterworth filter as q The pole locations are determined for an th -order * :O + % * + , O = (, %, … , í − % : :í then the positions of the poles for the Chebyshev filter lie on the ellipse at the coordinates H- , I- , O = (, %, … , í − %, where î- = H- = ì% cos î- , O = (, %, … , í − % ï- = ì$ sin î- , O = (, %, … , í − % 12/20/20 Prof. Hesham Tolba Determination of the pole locations for a Chebyshev filter. Digital Signal Processing 223 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q A type II Chebyshev filter contains zeros as well as poles. q The magnitude squared of its frequency response is given as ! å % = Type 2 1 % + y' 75` ï4/ï3 /75` ï4/ï where u.(H) is the Qth-order Chebyshev polynomial and ï4 is the stopband frequency as shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Type II Chebyshev filter characteristic. Digital Signal Processing 224 112 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q The zeros are located on the on the imaginary axis at the points óåS à- = , O = (, %, … , í − % sin î- q The poles are located at the points (ñ-, \-), where ñ- = åSH-/ H%- + I%-, O = (, %, … , í − % \- = åSI-/ H%- + I%-, O = (, %, … , í − % where {H-} & {I-} are as defined previously with } now related to the ripple in the stopband through the equation $/R % + % − <%% /<W }= 12/20/20 Prof. Hesham Tolba Digital Signal Processing 225 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Chebyshev Filters … q Observe that the Chebyshev filters are characterized by the parameters í, ò, <% & åS /åC . ò, <% & åS /åC , we can determine the order of the filter from the equation q For a given set of specifications on öQõ í= % − <%% + öQõ åS /åC + % − <%% % + ò% åS /åC % /ò<% −% = cosh'$ </ò cosh'$ åS /åC where, by definition, <% = 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba % % + <% Digital Signal Processing 226 113 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Determine the order and the poles of a type I LP Chebyshev filter that has a .-dB ripple in the passband, a cutoff frequency ï3 = .***', a stopband frequency ï4 = /***', and an attenuation of )* dB or more for ï ≥ ï4 . q Solution: q First, we determine the order of the filter. q We have .* log +/ . + y' = . . + y' = .. /ps y' = *. /ps y = *. p*rr 12/20/20 Prof. Hesham Tolba Digital Signal Processing 227 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Also, /* log +/ 2' = −)* 2' = *. *. y, 2' & ï4/ï3, we get ©V™ +/ .se. p) Q= = ). * ©V™ +/ / + \ q Substituting the values of q Thus a type I Chebyshev filter having four poles meets the specifications. q The pole positions are determined from the above-mentioned relations. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 228 114 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q First, we compute }, ì$ , and ì% . q Hence n = .. )/s, q The angles x+ = .. *e ï3, x' = *. \ep ï3 {î- } are î- = * :O + % * + , : o O = (, %, :, h q Therefore, the poles are located at H+ + 5D+ = −*. .\sï3 ± 5*. sqsï3 H' + 5D' = −*. \\qï3 ± 5*. )*peï3 12/20/20 Prof. Hesham Tolba Digital Signal Processing 229 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q The filter specifications are very similar to the specifications given in the previous example (Butterworth filter). q In that case the number of poles required was seven. q The Chebyshev filter required only four poles. q In general, the Chebyshev filter meets the specifications with fewer poles than the corresponding Butterworth filter. q Alternatively, if we compare a Butterworth filter to a Chebyshev filter having the same number of poles and the same passband and stopband specifications, the Chebyshev filter will have a smaller transition bandwidth. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 230 115 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Elliptic Filters q Elliptic (or Cauer) filters exhibit equiripple behavior in both the passband and the stopband, as shown for Q odd and Q even. q This class of filters contains both poles and zeros and is characterized by the magnitude-squared frequency response ! å % = 1 % + y'>. å/åC where >.(H) is the Jacobian elliptic function of order Q (tabulated by Zverev) and y is a parameter related to the passband ripple. q The zeros lie on the 12/20/20 elliptical filter 5ï-axis. Prof. Hesham Tolba Digital Signal Processing 231 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Elliptic Filters … q Recall that the most efficient designs occur when we spread the approximation error equally over the passband and the stopband. q Elliptic filters accomplish this objective and, as a consequence, are the most efficient. q Such filters yield the smallest-order filter for a given set of specifications. q Equivalently, we can say that for a given order and a given set of specifications, an elliptic filter has the smallest transition bandwidth. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 232 116 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Elliptic Filters … q The filter order required to achieve a given set of specifications in passband ripple 2+ , stopband ripple 2' , and transition ratio ï3/ï4 is given as í= q ï3/ï4 q q ò/< q % − ò% /<% % − W& /W8 % where Æ(H) is the complete elliptic integral of the first kind, defined as ,/% Æ(H) = @ 0 Cù % − H% WYU% ù and 2' = ./ . + 2' ; the passband ripple is /* log +/ . + y' . 12/20/20 Prof. Hesham Tolba Digital Signal Processing 233 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Elliptic Filters … q Computer programs are available for designing elliptic filters from the frequency specifications indicated above. q Butterworth & Chebyshev filters might be preferable in some applications because they possess better phase response characteristics. q The phase response of elliptic filters is more nonlinear in the passband than a comparable Butterworth filter or a Chebyshev filter, especially near the band edge. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 234 117 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Bessel Filters q Bessel filters are a class of all-pole filters that are characterized by the system function ! à = where âR à % âR à is the íth-order Bessel polynomial. q These polynomials can be expressed in the form R âR à = N 6- à-/0 where the coefficients {6- } are given as 6- = 12/20/20 Prof. Hesham Tolba :í − O ! í−O ! :R'- O! Digital Signal Processing 235 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Bessel Filters … q Alternatively, the Bessel polynomials may be generated recursively from the relation âR à = :í − % âR'$ à + à% âR'% à with Ø" ã = . and Ø+ ã = ã + . as initial conditions. q An important characteristic of Bessel filters is the linear-phase response over the passband of the filter. q An example showing a comparison of the magnitude and phase responses of a Bessel filter and Butterworth filter of order Q = ) is as shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing Magnitude & phase responses of Bessel & Butterworth filters of order R = =. 236 118 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Bessel Filters … q The Bessel filter has a larger transition bandwidth. q Its phase is linear within the passband. q It should be emphasized that the linear-phase characteristics of the analog filter are destroyed in the process of converting the filter into the digital domain by means of the transformations described previously. 12/20/20 Prof. Hesham Tolba Magnitude & phase responses of Bessel & Butterworth filters of order R = =. Digital Signal Processing 237 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Some Examples of Digital Filter Designs Based on the Bilinear Transformation q A LPF is designed to meet specifications of q a maximum ripple of .// dB in the passband, q e*-dB attenuation in the stopband, q a passband edge frequency of %3 = *. /p' q a stopband edge frequency of %4 = *. \*' q Example 1: A Butterworth filter of order Q = \q is required to satisfy the specifications. q Its frequency response characteristics are as shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing Frequency response characteristics of a 37-order Butterworth filter. 238 119 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Some Examples of Digital Filter Designs Based on the Bilinear Transformation … q Example 2: If a Chebyshev filter I used, a filter of order Q = .\ satisfies the specifications. q The frequency response characteristics for a type I Chebyshev filter are as shown. q The filter has a passband ripple of *. \. dB. Frequency response characteristics of a 13-order Type I Chebyshev filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 239 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Some Examples of Digital Filter Designs Based on the Bilinear Transformation … q Example 3: An elliptic filter of order Q = q is designed which also satisfies the specifications. q The numerical values for the filter parameters are as listed q The resulting frequency specifications are as shown. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing Frequency response characteristics of a 7-order Elliptic filter. 240 120 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Some Examples of Digital Filter Designs Based on the Bilinear Transformation … q The following notation is used for the parameters in the function ,(=): X K ü, ( + K ü, % 8'$ + K ü, : 8'% !(8) = Ç % + 6 ü, % 8'$ + 6 ü, : 8'% ?/$ q It is a simple matter to convert a LP analog filter into a BP, BS, or HP analog filter by a frequency transformation, as will be seen later. q The bilinear transformation is then applied to convert the analog filter into an equivalent digital filter. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 241 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations 12/20/20 Digital Signal Processing Prof. Hesham Tolba Digital Signal Processing 242 121 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations q It is a simple matter to take a LP prototype filter (Butterworth, Chebyshev, elliptic, Bessel) and perform a frequency transformation to design a HP or a BP or a BS filter. q One possibility is to perform the frequency transformation in the analog domain and then to convert the analog filter into a corresponding digital filter by mapping à-plane ➞ ç-plane. q An alternative approach is first to convert the analog LP filter into a LP digital filter and then to transform the LP digital filter into the desired digital filter by a digital transformation. q These two approaches yield different results, except for the bilinear transformation, in which case the resulting filter designs are identical. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 243 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Analog Domain … q Suppose that we have a LPF with passband edge frequency ï3 and we wish to convert it to another LPF with passband edge frequency ïd3. q The transformation that accomplishes this is ã⟶ ï3 ã, ïd3 (©VbÉÄSS hV ©VbÉÄSS) q Thus we obtain a lowpass filter with system function ,U (ã) = ,3 ï3/ïd3 ã , where ,3(ã) is the system function of the prototype filter with passband edge frequency ï3. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 244 122 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Analog Domain … q If we wish to convert an LPF into an HPF with passband edge frequency ïd3, the desired transformation is ï3ïd3 ã⟶ , ã (©VbÉÄSS hV cT™cÉÄSS) q The system function of this HPF is ,R (ã) = ,3 ï3ïd3/ã 12/20/20 Prof. Hesham Tolba Digital Signal Processing 245 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Analog Domain … å! into a BPF, with upper and lower band edge frequencies åY & åN , can be accomplished by first converting the LPF into another LPF having a band edge frequency åAC = % and then performing the transformation q Converting an LPF analog filter with passband edge frequency à⟶ à% + åN åY , à åY − åN (öQa°¢WW ^Q £¢UR°¢WW) q The same result can be accomplished in a single step by means of the transformation à ⟶ åC 12/20/20 Digital Signal Processing Prof. Hesham Tolba à% + åN åY , à åY − åN Prof. Hesham Tolba (öQa°¢WW ^Q £¢UR°¢WW) Digital Signal Processing 246 123 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Analog Domain … q Thus we obtain ,l(ã) = ,3 ã' + ïU ïV ï3 ã ïV − ïU ï3 into a BS filter, the transformation is simply the inverse of ã ⟶ ã' + ïU ïV ⁄ã ïV − ïU with the additional factor ï3 serving to normalize for the band-edge frequency of the LPF. q Converting an LP analog filter with band-edge frequency q Thus the transformation is à ⟶ åC 12/20/20 à åY − åN , à% + åN åY (öQa°¢WW ^Q £¢URW^Q°) Prof. Hesham Tolba Digital Signal Processing 247 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Analog Domain … q This leads to ,l4(ã) = ,3 ï3 ã ïV − ïU ã' + ïU ïV q All the above mappings are summarized in the shown table. Frequency Transformations for Analog Filters (Prototype LPF has Band Edge Frequency `&). 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 248 124 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Transform the single-pole lowpass Butterworth filter with system function ,(ã) = ï3 ã + ï3 into a bandpass filter with upper and lower band edge frequencies ïV and ïU , respectively. q Solution: The desired transformation is given by ã ⟶ ï3 12/20/20 ã' + ïU ïV ã ïV − ïU Prof. Hesham Tolba Digital Signal Processing 249 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Thus we have . ã' + ïU ïV ã ïV − ïU + . ïV − ïU ã = ' ã + ïV − ïU ã + ïU ïV , ã = q The resulting filter has a zero at ^= 12/20/20 Digital Signal Processing Prof. Hesham Tolba ã = * and poles at − W6 − W5 ± W)6 + W)5 − 0W6 W5 5 Prof. Hesham Tolba Digital Signal Processing 250 125 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Digital Domain q Frequency transformations can be performed on a digital LPF to convert it to either a BP, BS, or HP filter. =*+ by a rational function ± = , which must satisfy the following properties: 1. The mapping =*+ ⟶ ± =*+ must map points inside the unit circle in the ñ-plane into itself. 2. The unit circle must also be mapped into itself. q This implies that for x = ., q The transformation involves replacing the *+ J*12 = ± J*12 ≡ ± % = ± % J16Km n 2 12/20/20 Digital Signal Processing Prof. Hesham Tolba 251 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Digital Domain … q We must have ± % = . for all %, i.e., the mapping must be all pass. q Hence it is of the form & ± =*+ = ±Ç -/$ 8'$ − 6% − 6- 8'$ where 7- < . to ensure that a stable filter is transformed into another stable filter (i.e., to satisfy condition 1). q From the above form, we obtain the desired set of digital transformations for converting a prototype digital LPF into either a BP, a BS, an HP, or another LP digital filter. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 252 126 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Frequency Transformations in the Digital Domain … q These transformations are tabulated as shown. Frequency Transformations for digital Filters (Prototype LPF has Band Edge Frequency 2&). 12/20/20 Prof. Hesham Tolba Digital Signal Processing 253 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example q Convert the single-pole lowpass Butterworth filter with system function ,(=) = *. /)p . + =*+ . − *. p*s=*+ into a BPF with upper and lower cutoff frequencies %V and %U , respectively. The LPF has 3-dB bandwidth, %3 = *. /'. q Solution: q The desired transformation is =*+ ⟶ =*' − 7+ =*+ + 7' 7' =*' − 7+ =*+ + . where 7+ and 7' are defined in the previous Table. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 254 127 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q Substitution into ,(=) yields =*' − 7+ =*+ + 7' 7' =*' − 7+ =*+ + . ,(=) = =*' − 7+ =*+ + 7' . + *. p*s . − 7' =*' − 7+ =*+ + . *. /)p . − 7' . − =*' = . + *. p*s7' − .. p*s7+ =*+ + 7' + *. p*s =*' *. /)p . − = = ±. and a pair of poles that depend on the choice of %V and %U . q Note that the resulting filter has zeros at 12/20/20 Prof. Hesham Tolba Digital Signal Processing 255 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Example … q For example, suppose that q Since %V = \'/p and %U = /'/p. %3 = *. /', we find that Æ = ., 7' = * and 7+ = *. q Then *. /)p . − =*' ,(=) = . + *. p*s=*' q This filter has poles at % = '//. 12/20/20 Digital Signal Processing Prof. Hesham Tolba = = ±5*. q.\ and hence resonates at Prof. Hesham Tolba Digital Signal Processing 256 128 10. Digital Filters 12/20/20 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations q Frequency transformation can be performed either in the analog domain or in the digital domain. q Some caution must be exercised depending on the types of filters being designed. q The impulse invariance method and the mapping of derivatives are inappropriate to use in designing HP and many BP filters, due to the aliasing problem. q Analog frequency transformation followed by conversion into the digital domain by use of these two mappings would not be employed. 12/20/20 Prof. Hesham Tolba Digital Signal Processing 257 Table of contents General Considerations Design of FIR Filters Design of IIR Filters Frequency Transformations Observations … q It is much better to perform the mapping from an analog LPF into a digital LPF by either of these mappings, and then to perform the frequency transformation in the digital domain. q Thus the problem of aliasing is avoided. q In the case of the bilinear transformation, where aliasing is not a problem, it does not matter whether the frequency transformation is performed in the analog domain or in the digital domain. q In this case only, the two approaches result in identical digital filters. 12/20/20 Digital Signal Processing Prof. Hesham Tolba Prof. Hesham Tolba Digital Signal Processing 258 129