0% found this document useful (0 votes)
112 views102 pages

Chap-7 Filter Design Techniques

filter design

Uploaded by

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

Chap-7 Filter Design Techniques

filter design

Uploaded by

ujwa prince
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 102
7 FILTER DESIGN TECHNIQUES 7.0 INTRODUCTION Filters are a particularly important class of linear time-invariant systems Strictly speak- ing, the term frequency-selective filter suggests a system that passes certain frequency components and totally rejects all others, but in a broader context any system that modifies certain frequencies relative to others is also called a filter. While the primary emphasis in this chapter is on the design of frequency-selective filters, some of the tech- niques are more broadly applicable. Also, we concentrate on the design of causal filters, although in many conteats filters need not be restricted to causal designs, Very often, noncausal filters are designed and implemented by modifying causal designs. The design of filters involves the following stages: (1) the specification of the desired properties of the system, (2) the approximation of the specifications using a causal discrete-time system, and (3) the realization of the system. Although these three steps are certainly not independent, we focus our attention primarily on the second step, the first being highly dependent on the application and the third dependent on the technology to be used for the implementation. In a practical setting, the desired filter is generally implemented with digital computation and used to filter a signal thatis derived from a continuous-time signal by means of periodic sampling followed by analog-to- digital conversion. For this reason, it has become common to refer to discrete-time filters as digital filters, even though the underlying design techniques most often relate only to the discrete-time nature of the signals and systems. When a discrete-time filter is to be used for discrete-time processing of continuous- time signals in the configuration of Figure 7.1, the specifications for both the discrete- time filter and the effective continuous-time filter are typically (but not always) given in the frequency domain, This is especially common for frequency-selective filters such 439 440 Filter Design Techniques Chap. 7 ol em ‘| pe Le tn) ytnl Js. Figure 7.1 Basic system for discrete-time filtering of a continuous-time signals. as lowpass, bandpass, and highpass filters. As shown in Section 4.4, if a linear time- invariant discrete-time system is used as in Figure 7.1, and if the input is bandlimited and the sampling frequency is high enough to avoid aliasing, then the overall system behaves as a linear time-invariant continuous-time system with frequency response ja) = { Hei"), IQ) x/Ta, (76) then H(e!®) = He (2). lol <7; (7) Ta i.e., the discrete-time and continuous-time frequency responses are related by a linear scaling of the frequency axis, namely, w = 27, for || < x. Unfortunately, any practical continuous-time filter cannot be exactly bandlimited, and consequently, interference between successive terms in Eq. (7.5) occurs, causing aliasing, as illustrated in Fig- ure 7.3. However, if'the continuous-time filter approaches zero at high frequencies, the aliasing may be negligibly small, and a useful discrete-time filter can result from the sampling of the impulse response of a continuous-time filter. In the impulse invariance design procedure, the discrete-time filter specifications are first transformed to continuous-time filter specifications through the use of Eq. (7.7). Assuming that the aliasing involved in the transformation from He(j2) to H(e!) will be negligible, we obtain the specifications on H.(j&) by applying the relation R=w0/Ty (7.8) Figure 7.3 Illustration of aliasing in the impulse invariance design technique. Sec. 7.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters 445 to obtain the continuous-time filter specifications from the specifications on H(e/). After obtaining a suitable continuous-time filter based on these specifications, the continuous-time filter with system function H,(s) is transformed to the desired discrete- time filter with system function H(z). We develop the algebraic details of the transfor- mation from H,(s) to H(z) shortly. Note, however, that in the transformation back to discrete-time frequency, H(e’*) will be related to H(j&) through Eq. (7.5), which again applies the transformation of Eq. (7.8) to the frequency axis. As a consequence, the “sampling” parameter Ty cannot be used to control aliasing. Since the basic specifi- cations are in terms of discrete-time frequency, if the sampling rate is increased (i.e.,if Ta is made smaller), then the cutoff frequency of the continuous-time filter must increase in proportion. In practice, to compensate for aliasing that might occur in the transfor- mation from H.(s) to H(2), the continuous-time filter may be somewhat overdesigned, i.e., designed to exceed the specifications, particularly in the stopband. While the impulse invariance transformation from continuous time to discrete time is defined in terms of time-domain sampling, itis easy to carry out as a transforma- tion on the system function. To develop this transformation, let us consider the system function of the continuous-time filter expressed in terms of a partial fraction expansion, so that? N HAs) =o Ae, (79) kal The corresponding impulse response is N Ae", 120, he(t) = = ieee (7.10) 0, 1<0. ‘The impulse response of the discrete-time filter obtained by sampling Tyh-(t) is N hn] = Tah(nTa) = D> Ta Ane" un] i mi (7.11) =o TAde™" The system function of the discrete-time filter is therefore given by N Ta Ax H(z) = Lira eatiga (7.12) In comparing Eqs. (7.9) and (7.12), we observe that a pole at s = s; in the s-plane transforms to a pole at z = e**”: in the z-plane and the coefficients in the partial fraction expansions of H,(s) and H(z) are equal, except for the scaling multiplier Ty. If the continuous-time filter is stable, corresponding to the real part of s, being less than zero, then the magnitude of e*” will be less than unity, so that the corresponding pole in the discrete-time filter is inside the unit circle. Therefore, the causal discrete-time filter is 1 For simplicity, we assume in the discussion that all poles of H(s) are single order. In Problem 7.24, we consider the modifications required for multiple-order poles. 448 Filter Design Techniques Chap. 7 also stable. While the poles in the s-plane map to poles in the z-plane according to the relationship zx = e*", it is important to recognize that the impulse invariance design procedure does not correspond toa simple mapping of the s-plane to the z-plane by that relationship. In particular, the zeros in the discrete-time system function are a function of the poles and the coefficients 7 Ax in the partial fraction expansion, and they will not in general be mapped in the same way the poles are mapped. We illustrate the impulse invariance design procedure with the following example. Example 7.2 Impulse Invariance with a Butterworth Filter Let us consider the design of a lowpass discrete-time filter by applying impulse invari- ance to an appropriate Butterworth continuous-time filter.” The specifications for the liscrete-time filter are 0.89125 <|H(e*) <1, O< |u| < 0.27, (7.13a) 1H(e!*)| < 0.17783, 03m < lol <7, (7.136) Since the parameter Ty cancels in the impulse invariance procedure, we can choose Ta = 1,80 that » = &. In Problem 7.2, this same example is considered, but with the parameter Ty explicitly included to illustrate how and where it cancels. In designing the filter using impulse invariance on a continuous-time Butter- worth filter, we must first transform the discrete-time specifications to specifications on the continuous-time filter. Recall that impulse invariance corresponds to a linear mapping between & and w in the absence of aliasing. For this example, we will assume that the effect of aliasing is negligible. After the design is complete, we can evaluate the resulting frequency response against the specifications in Eqs. (7.13a) and (7.13b).. Because of the preceding considerations, we want to design a continuous-time Butterworth filter with magnitude function |H-(j2)] for which 0.89125 <|H(JQ) <1, 0< 12} <02n, (7.14a) |He(jQ)| < 0.17783, 0.3m <|Q\ 0, then |z| > 1 for all &. That is, if a pole of H-(s) is in the left-half s-plane, its image in the z-plane will be inside the unit circle. Therefore, causal stable continuous- time filters map into causal stable discrete-time filters. Sec. 7.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters 451 Next, to show that the j9-axis of the s-plane maps onto the unit circle, we substi- tute s = /2 into Eq, (7.22), obtaining + j2T4/2 = Tane (7.24) z From Eq. (7.24), it is clear that |z| = 1 for all values of s on the jS-axis, That is, the axis maps onto the unit circle, so Eq. (7.24) takes the form _ 1+ jQT/2 © T= jat2 To derive a relationship between the variables w and Q, it is useful to return to Eq. (7.20) and substitute z =e. We obtain jo (7.25) 2 _ 7.26) 6-7, (een): ey or, equivalently, 8 2 fre (jsinw/2)) _ 2f saa4 j= 7 ae] 7, tanw/2). (727) Equating real and imaginary parts on both sides of Eq. (7.27) leads to the relations o =Oand 2= 2 tan(w/2), (7.28) Ts or w = 2arctan(QT,/2). (7.29) ‘These properties of the bilinear transformation as a mapping from the s-plane to the z-plane are summarized in Figures 7.6 and 7.7. From Eq. (7.29) and Figure 7.7, we see that the range of frequencies 0 < 2 < co maps to 0 < w < 2, while the range —co < Q < Omaps to —x < w < 0. The bilinear transformation avoids the problem of aliasing encountered with the use of impulse invariance, because it maps the entire imaginary axis of the s-plane onto the unit circle in the z-plane. The price paid for this, however, is the nonlinear compression of the frequency axis depicted in Figure 7.7. Con- sequently, the design of discrete-time filters using the bilinear transformation is useful only when this compression can be tolerated or compensated for, as in the case of filters that approximate ideal piecewise-constant magnitude-response characteristics. This is illustrated in Figure 7.8, where we show how a continuous-time frequency response and tolerance scheme maps to a corresponding discrete-time frequency response and tolerance scheme through the frequency warping of Eqs. (7.28) and (7.29). If the critical frequencies (such as the passband and stopband edge frequencies) of the continuous- time filter are prewarped according to Eq. (7.28) then, when the continuous-time filter is transformed to the discrete-time filter using Eq. (7.21), the discrete-time filter will meet the desired specifications. Image of left half-plane me Plane Image of 5 =02 (unit circle) Figure 7.8 Mapping of the s-plane ‘onto the z-plane using the bilinear transformation. Figure 7.7. Mapping of the continuous-time frequency axis onto the discrete-time frequency axis by bilinear transformation. Figure 7.8 Frequency warping inherent in the bilinear transformation of a continuous-time lowpass filter into a discrete-time lowpass fiter. To achieve the desired discrete-time cutofl frequencies, the continuous-time cutoff frequencies must be prewarped as indicated. Sec.7.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters 453 Typical frequency-selective continuous-time approximations are Butterworth, Chebyshev, and elliptic filters. The closed-form design formulas of these continuous- time approximation methods make the design procedure rather straightforward. As discussed in Appendix B a Butterworth continuous-time filter is monotonic in the pass- band and in the stopband. A type I Chebyshev filter has an equiripple characteristic in the passband and varies monotonically in the stopband. A type II Chebyshev filter is monotonicin the passband and equiripple in the stopband. An elliptic filter is equiripple in both the passband and the stopband. Clearly, these properties will be preserved when the filter is mapped to a digital filter with the bilinear transformation. This is illustrated by the dashed approximation shown in Figure 7.8. Although the bilinear transformation can be used effectively in mapping a piecewise-constant magnitude-response characteristic from the s-plane to the z-plane, the distortion in the frequency axis also manifests itself as a warping of the phase re- sponse of the filter. For example, Figure 7.9 shows the result of applying the bilinear transformation to an ideal linear phase factor e~**. If we substitute Eq. (7.20) for s and evaluate the result on the unit circle, the phase angle is —(2a/7,) tan(w/2). In Fig- ure 7.9, the solid curve shows the function —(2a/ Ty) tan(w/2), and the dotted curve is the periodic linear phase function —(wa/ Tz), which is obtained by using the small angle approximation /2 ~ tan(w/2). From this, it should be evident that if we were interested in a discrete-time lowpass filter with a linear phase characteristic, we could not obtain such a filter by applying the bilinear transformation to a continuous-time lowpass filter with a linear phase characteristic. ‘As mentioned previously, because of the frequency warping, the use of the bilinear transformation is restricted to the design of approximations to filters with tHe) Figure 7.9 _ Illustration of the effect ofthe bilinear transf characteristic. (Dashed line is linear phase and solid line is phase resulting from bilinear transformation.) 454 Filter Design Techniques Chap. 7 piecewise-constant frequency magnitude characteristics, such as highpass, lowpass and bandpass filters. As demonstrated in Example 7.2, impulse invariance can also be used to design lowpass filters. However, impulse invariance cannot be used to map highpass continuous-time designs to highpass discrete-time designs, since highpass continuous- time filters are not bandlimited. In Example 4.5, we discussed a class of filters often referred to as discrete-time differentiators. A significant feature of the frequency response of this class of filters is that it is linear with frequency. The nonlinear warping of the frequency axis intro- duced by the bilinear transformation will not preserve that property. Consequently, the bilinear transformation applied to a continuous-time differentiator will not result in a discrete-time differentiator. However, impulse invariance applied to an appropriately bandlimited continuous-time differentiator will result in a discrete-time differentiator. 7.1.3 Examples of Bilinear Transformation Design In the following discussion, we present a number of examples to illustrate IIR filter de- sign using the bilinear transformation. Example 7.3 serves to illustrate the design proce- dure based on the bilinear transformation, in comparison with the use of impulse invari- ance. Examples 7.4, 7.5, and 7.6 illustrate a Butterworth, Chebyshev, and elliptic filter, respectively, each designed to the same specifications using the bilinear transformation. Example 7.3 Bilinear Transformation of a Butterworth Filter Consider the discrete-time filter specifications of Example 7.2, in which we illustrated the impulse invariance technique for the design of a discrete-time filter. The specifica- tions on the discrete-time filter are 0.89125 <|H(e/")J <1, O 0.89125 (7.32a) Seo. 7.1 Design of Discrete-Time IIR Filters from Continuous-Time Filters 455 and |H-(j2 tan(0.15x))| < 0.17783. (7.32b) ‘The form of the magnitude-squared function for the Butterworth filter is 1 UDP = ere 733) Solving for N and Q- with the equality sign in Eqs. (7.32a) and (7.32b), we obtain wo ye denn) = (as) (7.34a) 2tan(0.15e)\"" _ (_1_\? 1+ (Zee) =(a) > (7.34b) and and solving for N in Eqs. (7.34a) and (7.34b) gives 2logltan(0.15)/tan(0.1x)] (735) = 5.305. Since N must be an integer, we choose N = 6. Substituting N = 6 into Eq. (7.34b), we obtain 2. = 0.766. For this value of 2., the passband specifications are exceeded and the stopband specifications are met exactly. This is reasonable for the bilinear transformation, since we do not have to be concerned with aliasing. That is, with proper prewarping, we can be certain that the resulting discrete-time filter will meet the specifications exactly at the desired stopband edge. In the s-plane, the 12 poles of the magnitude-squared function are uniformly distributed in angle on a circle of radius 0.766, as shown in Figure 7.10. The sys- tem function of the continuous-time filter obtained by selecting the left half-plane Figure 7.10. s-plane locations for poles of He(s)H.(-s) for sixth-order Butterworth fiter in Example 7.3. Fitter Design Techniques Chap. 7 My 02m 04m 06m O89 7 Radian frequency (w) @) n 0 O25 Oa 6% 08% 7 Radian frequency (w) () 2 Samples 0 0.20 O40 0.60 0.80 7 Radian frequency (1) © Figure 7.11 Frequency response of sixth-order Butterworth filter transformed by bilinear transform. (a) Log magnitude in dB. (b) Magnitude. (c) Group delay. Sec. 7.1 Design of Discrete-Time IIR Filters from Continuous-Time 457 poles is Hels) = 0.20238 = GF 030965 + OSBTING + 1.08365 + OSBTINS? + 1.48028 + 05871) (7.36) ‘The system function for the discrete-time filters then obtained by applying the bilinear transformation to H-(s) with Ty = 1. The result is 0.0007378(1 + -")* 1 = 1.2686z~! + 0.7051z-)(1 — 1.0106z MO=— + 0.358327) (737) 1 * (0908421 0215522)" The magnitude, log magnitude, and group delay of the frequency response of the discrete-time filter are shown in Figure 7.11. At @ = 0.2% the log magnitude is —0.56 dB, and at « = 0.3% the log magnitude is exactly ~15 dB. Since the bilinear transformation maps the entire j9-axis of the s-plane onto the unit circle in the z-plane, the magnitude response of the discrete-time filter falls off much more rapidly than that of the original continuous-time filter. In particular, the behavior of H(e!*) at « = x corresponds to the behavior of H.(j2) at ‘Therefore, since the continuous-time Butterworth filter hasa sixth-orderzeroat the resulting discrete-time filter has a sixth-order zero at z = —1 It is interesting to note that, since the general form of the Nth-order Butter- worth continuous-time filter is as given by Eq. (7.33), and since w and @ are related by Eq. (7.28), it follows that the general Nth-order Butterworth discrete-time filter has magnitude-squared function 1 tan(w/2) \""" + (Goer) |H(e!*)P? = (7.38) where tan(w./2) = 74/2. ‘The frequency-response function of Eq. (7.38) has the same properties as the continuous-time Butterworth response; i.e., it is maximally flat? and |H(e!*)|? = 0.5. However, the function in Eq. (7.38) is periodic with period 2 and falls off more sharply than the continuous-time Butterworth response. We do not design discrete-time Butterworth filters directly by starting with Eq, (7.38), because it is not straightforward to determine the z-plane locations of the poles (all the zeros are at z = —1) associated with the magnitude-squared function of Eq. (7.38). It is necessary to determine the poles so as to factor the magnitude-squared 8 The first (2N — 1) derivatives of |H(e/#)/? are zero at w = 0. 458 Filter Design Techniques Chap. 7 function into H(z)H(z"') and thereby determine H(z). It is much easier to find the s-plane pole locations (alll the zeros are at infinity), factor the continuous-time system function, and then transform the left half-plane poles by the bilinear transformation as we did in Example 7.3. Equations of the form of Eq. (7.38) may also be obtained for discrete-time Chebyshev filters, but the same difficulties arise in their use. Thus, the two-step approach just described has become the established method of designing IIR frequency-selective filters. ‘The major approximation methods for frequency-selective IIR analog filters are the Butterworth, Chebyshev, and elliptic function approximation methods. The details of these methods can be found in Guillemin (1957), Daniels (1974), Weinberg (1975), and Lam (1979). The methods are generally explained and developed in terms of lowpass filter approximations. This is the approach followed in Appendix B, where we summarize the essential features of some of the methods. In the next three examples, we illustrate the realization of a set of filter specifications for each of these classes of filters. The details of the design computations are not presented, since they are tedious and lengthy and are best carried out by computer programs that incorporate the appropriate closed-form design equations. ‘The lowpass discrete-time filter specifications for these examples are those used in Example 7.1, ic., 0.99 < |H(e!*)| < 1.01, \o| < 0.42, (7.39a) and |H(e/*)| < 0.001, 0.62 <|o| halnjeio", (7.40) 466 Filter Design Techniques Chap. 7 where hg[n] is the corresponding impulse response sequence, which can be expressed in terms of Hg(e/*) as Ha(e!)e!*"deo. (741) Many idealized systems are defined by piecewise-constant or piecewise-functional fre- quency responses with discontinuities at the boundaries between bands. As a result, these systems have impulse responses that are noncausal and infinitely long. The most straightforward approach to obtaining a causal FIR approximation to such systems is to truncate the ideal response. Equation (7.40) can be thought of as a Fourier series repre- sentation of the periodic frequency response H,(e!), with the sequence hg[7!] playing the role of the Fourier coefficients. Thus, the approximation of an ideal filter by trunca- tion of the ideal impulse response is identical to the issue of the convergence of Fourier series, a subject that has received a great deal of study. A particularly important concept from this theory is the Gibbs phenomenon, which was discussed in Example 2.22. In the following discussion, we will see how this nonuniform convergence phenomenon manifests itself in the design of FIR filters. The simplest way to obtain a causal FIR filter from /a[n] is to define a new system with impulse response h[71] given by® ta {a O

You might also like