Practical No: - 07: Aim: To Write A Program To Design Butterworth Filter Using Bilinear Transformation Theory
Practical No: - 07: Aim: To Write A Program To Design Butterworth Filter Using Bilinear Transformation Theory
Theory:
IIR FILTERS
An infinite impulse response (IIR) filter is a digital filter that depends linearly on a finite number of input
samples and a finite number of previous filter outputs. In other words, it combines a FIR filter with
feedback from previous filter outputs. Mathematically, for some coefficients bi and aj:
The infinite impulse response (IIR) filter is a recursive filter in that the output from the filter is computed
by using the current and previous inputs and previous outputs.
Because the filter uses previous values of the output, there is feedback of the output in the filter structure.
The design of the IIR filter is based on identifying the pulse transfer function G(z) that satisfies the
requirements of the filter specification. This can be undertaken either by developing an analogue
prototype and then transforming it to the pulse transfer function, or by designing directly in digital. Figure
shows typical IIR filter architecture.
The filter design process starts with specifications and requirements of the desirable IIR filter. A type of
reference analog prototype filter to be used is specified according to the specifications and after that
everything is ready for analog prototype filter design.
The next step in the design process is scaling of the frequency range of analog prototype filter into
desirable frequency range. This is how an analog prototype filter is converted into an analog filter.
After the analog filter is designed, it is time to go through the last step in the digital IIR filter design
process. It is conversion from analog to digital filter. The most popular and most commonly used
converting method is bilinear transformation method. The resulting filter, obtained in this way, is always
stable. However, instability of the resulting filter, when bilinear transformation is used, may be caused
only by the finite word-length side-effect.
Abhinav Arora (09)
Transformation Methods – Analog IIR Filter Transfer Function [ H(S)] to Digital IIR Filter Transfer
Function [ H(Z)]
1) Bilinear Transformation
3) Matched Z Transform
Butterworth, Caur, and Chebyshev are some of the most commonly used filters that can provide a near-
ideal response curve. In them, we will discuss the Butterworth filter here as it is the most popular one of
the three.
The figure shows the circuit model of the first-order low-pass Butter worth filter.
If we use the voltage divider rule at point ‘V1’then we can get the voltage across the capacitor as,
V1 = Vin / (1+j2ᴫfRC)
Now the op-amp here used in negative feedback configuration and for such a case the output voltage
equation is given as,
V0 = ( 1 + RF / R1 ) V1
This is a standard formula and you can look into op-amp circuits for more details.
V0 / Vin = AF / ( 1 + j(f/fL) )
In this equation,
The figure shows the circuit model of the 2nd order Butterworth low pass filter.
Second-order filters are important because higher-order filters are designed using them. The gain of the
second-order filter is set by R1 and RF, while the cutoff frequency fH is determined by R2, R3, C2 &
C3 values. The derivation for the cutoff frequency is given as follows,
fH = 1 / 2ᴫ(R2R3C2C3)1/2
The voltage gain equation for this circuit can also be found in a similar way as before and this equation is
given below,
Abhinav Arora (09)
In this equation,
We can the voltage gain equation to observe the change in gain magnitude with the corresponding change
in the frequency of the input signal.
Bilinear Transformation: -
(8.6)
(typically)
(8.7)
where is some positive constant That is, given a continuous-time transfer function , we apply the
bilinear transform by defining
Abhinav Arora (09)
where the `` '' subscript denotes ``digital,'' and `` '' denotes ``analog.''
It can be seen that analog dc ( ) maps to digital dc ( ) and the highest analog frequency (
) maps to the highest digital frequency ( ). It is easy to show that the entire axis in
the plane (where ) is mapped exactly once around the unit circle in the plane (rather than
summing around it infinitely many times, or ``aliasing'' as it does in ordinary sampling). With real and
positive, the left-half plane maps to the interior of the unit circle, and the right-half plane maps
outside the unit circle. This means stability is preserved when mapping a continuous-time transfer
function to discrete time.
Another valuable property of the bilinear transform is that order is preserved. That is, an th-order -
plane transfer function carries over to an th-order -plane transfer function. (Order in both cases
equals the maximum of the degrees of the numerator and denominator polynomials
The constant provides one remaining degree of freedom which can be used to map any particular finite
frequency from the axis in the plane to a particular desired location on the unit circle in
the plane. All other frequencies will be warped. In particular, approaching half the sampling rate, the
frequency axis compresses more and more. Note that at most one resonant frequency can be preserved
under the bilinear transformation of a mass-spring-dashpot system. On the other hand, filters having a
single transition frequency, such as lowpass or high pass filters, map beautifully under the bilinear
transform; one simply uses to map the cut-off frequency where it belongs, and the response looks great.
In particular, ``equal ripple'' is preserved for optimal filters of the elliptic and Chebyshev types because
the values taken on by the frequency response are identical in both cases; only the frequency axis is
warped. The bilinear transform is often used to design digital filters from analog prototype filters.
Abhinav Arora (09)
Procedure:
Step 1:
Step 2:
Filter Order =
1
( )
( )
−1
δ 2
2
log
1
N≥
( δ 2
1
−1
)
Ωs
2 log ( ΩP )
Abhinav Arora (09)
Step 3:
Step 4:
(Ωc) N
H(S) = ---------
poles
Step 5:
Poles
S= j Ωc e j (2 k+1)π /2 N
Step 6:
(1-z-1)
H(Z) = H(S) / S = (2/T) -------
(1+z-1)
Abhinav Arora (09)
clc ;
close all;
clear all;
Ts=1/f
[bz,az]=bilinear(b,a,f)
systf=tf(bz,az,Ts)
figure(1)
freqz(bz,az)
figure(2)
zplane(bz,az)
[R,p,c]=residuez(bz,az)
Abhinav Arora (09)
OUTPUT:
b = 2
f = 1
Ts = 1
bz = 0.1667 0.3333 0.1667
az = 1.0000 -0.3333 0.0000
R = 1.0e+15 *
0.0000
-2.2518
p = 0.3333
0.0000
c = 2.2518e+15
Abhinav Arora (09)