Presentation on theme: "Digital Signal Processing IIR Filter IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be."— Presentation transcript:
Digital Signal Processing IIR Filter
IIR Filter Design by Approximation of Derivatives Analogue filters having rational transfer function H(s) can be described by the linear constant coefficient differential equation. One of the simplest methods for converting an analog filter into a digital filter is to approximate the differential equation by an equivalent difference equation. This approach is often used to solve a linear constant coefficient differential equation numerically on a digital computer. For the derivative dy(t)/dt at a time t = nT we substitute the backward difference [y[n]-y[n-1)]/T. Thus (1) Where T represents the sampling interval and y(n) = y(nT).
The analogue differentiator with output dy(t)/dt has the system function H(s) = s, while the digital system that produces the output [y(n)- y(n-1)]/T has the transfer function H(s) = (1 – z -1 )/T. Consequently, the frequency domain equivalent is: (2) The second derivative d 2 y(t)/dt 2 is replaced by the second difference which is given by (3) In the frequency domain, (3) is equivalent to (4)
It is easy to generalize equation (2) and (4) as (5) Implications: From (2) we have (6) If we substitute s = jw in (6), we have (7) As w varies from - to + , the corresponding locus of points in the z-plane is a circle of radius ½ and with centre at z =1/2, as shown in the figure given on the next slide.
jw s-plane 1/2 The above figure shows that the mapping in (7) takes points in the LHP of s into corresponding points inside this circle (i.e. circle with radius ½ and the points in RHP plane in s are mapped into points outside this circle. Consequently, this mapping has the desirable property that a stable analog filter is Transformed into a stable digital filter. However, the possible location of the poles of the digital filter are confined to relatively small frequencies and, thus, the mapping is restricted to low-pass and band-pass filters having relatively small resonant frequencies.
Example1: Convert the analogue band- pass filter with system function given below into a digital IIR filter by use of the backward difference for the derivative. Solution: substituting s = (1-z -1 )/T yields
Bilinear Transformation (Tustin’s Method) This is the most widely used transformation which is suitable for the design of low-pass, high-pass, band-pass and band-stop filters. In the Bilinear Transformation (BLT) method, the basic operation required to convert an analogue filter is to replace s as follows: k = 1 or 2/T (8)
To investigate the characteristics of the bilinear transformation, let z = re jwT s = + jw’ Now Consequently, (9) (10) Note that if r 1, > 0. Consequently, the LHP in s maps into the inside of the unit circle in the z-plane and the RHP in s maps into the outside of the unit circle.
When r = 1, then = 0 and (11) or (12) The relationship between the frequency variables in the two domains is illustrated in the following figure: w w’
From the figure we observe that the mapping between w and w’ is almost linear for small values of w, but becomes non-linear for larger values of w, leading to a distortion (or warping) of the digital frequency response. This effect is normally compensated for by pre-warping the the analog filter before applying the bilinear transformation. To compensate for the effect, we pre-warp one or more critical frequencies before applying the BLT. For example, for a low-pass filter, we often pre-warp the cutoff or bandedge frequency as follows: (13) where w p = specified cutoff frequency w’ p = prewarped cutoff frequency k = 1 or 2/T T = sampling period.
Summary of the BLT method of coefficient calculation: For standard, frequency selective IIR filters, the steps for using the BLT method may be summarized as follows: 1. Use the digital filter specifications to find a suitable normalized, prototype, analogue lowpass filter, H(s). 2. Determine and prewarp the bandedge or critical frequencies of the desired filter. 3. Denormalize the analog prototype filter by replacing s in the transfer function H(s), using one of the following transformations, depending on the type of filter required:
lowpass to lowpass (14) lowpass to highpass(15) lowpass to bandpass (16) lowpass to bandstop (17) where and 4.Apply the BLT to obtain the desired digital filter transfer function.
Example 1:Design a digital low-pass filter to approximate the following transfer function: Using the BLT method obtain the transfer function, H(z), of the digital filter, assuming a 3 dB cutoff frequency of 150 Hz and a sampling frequency of 1.28kHz. Solution: w p = 2 150 rad/sec, T = 1/F s = 1/1280, giving a prewarped critical frequency of w’ p = tan(w p T/2) = The frequency scaled analog filter is given by
Applying the BLT gives Example 2: The normalized transfer function of a simple, analog lowpass, filter given by Starting from the s-plane, determine, using the BLT method, the transfer function of an equivalent discrete time high-pass filter. Assume a sampling frequency of 150 Hz and a cutoff frequency of 30 Hz.
Solution: The cut-off frequency of the digital filter is w p = 2 30 rad/sec. The cut-off frequency, after prewarping is w’ p = tan(w p T/2). With T = 1/150, w’ p = tan( /5) = Using the low to high-pass transformation of equation (15), the denormalized analog transfer function is obtained as The z-transfer function is obtained by applying the BLT:
Example 3: A discrete time bandpass filter with Butterworth characteristics meeting the specifications given below is required. Obtain the coefficients of the filter using the BLT method. passband200 – 300 Hz sampling frequency2 kHz filter order 2 Solution: A first-order normalized analog low-pass filter is required (since the frequency band transformation for for bandpass filters – equation (16) – will double the filter order. Thus The prewarped critical frequencies are:
Using the lowpass-to-bandpass transformation, equation (16), we have Applying the BLT gives