Butterworth IIR Filter using Bilinear Transformation Method | MATLAB Tutorial
Bilinear Transformation Method:
- Poles are transformed by using equation,
Where, Ts is Sampling Time
- Mapping is one to one.
- Aliasing effect is not present.
- High pass Filter and band Reject Filter can be designed.
- Poles as well as zeros can be mapped.
- Frequency warping effect is present.
Many a times it is necessary to approximate the characteristics of analog filter. This approximation is required because the practical characteristics of a filter are not identical to the ideal characteristics. The Butterworth filter is a type of signal processing filter designed to have as flat a frequency response as possible in the passband. It is also referred to as a maximally flat magnitude filter. It was first described in 1930 by the British engineer and physicist Stephen Butterworth in his paper entitled “On the Theory of Filter Amplifiers”.
Design equations and Design steps:
Ap= Attenuation in pass band.
As= Attenuation in Stop Band.
Ωp= Pass Band edge frequency.
Ωc= Cut-off Frequency.
Ωs= Stop Band edge Frequency.
Step 1: From the given specification of digital Filter, obtain equivalent analog filter as follows:
Ω= Frequency of analog Filter.
ω= Frequency of digital Filter.
Ts= Sampling Time.
Step 2: Calculate the order ‘N’ of Filter using the equation,
If the specifications are given in decibel (dB) then use,
Step 3: Calculation of Cut off Frequency (Ωc),
When ωc is not given then use the equation,
And if the specifications are in decibel (db) then,
Step 4: Calculate the poles using,
If the poles are complex conjugate then organize the poles (Pk) as complex conjugate pairs that means,
S1 and S1*, S2 and S2*, etc.
Step 5: Calculate the system transfer function of analog filter using,
and if the poles are complex conjugate then,
Step 6: Design the digital filter by obtaining transfer function H(z) simply by substituting,
in the equation of H(s). We have to assume sampling time Ts= 1 if not given.
Consider a problem: Design a Butterworth IIR Filter using Bilinear Transformation by taking T= 1 sec and
The Given Specifications are
Ap= 0.6 omega_p= 0.35 π
As= 0.1 omega_s= 0.7 π
clear all clc Ap=0.6; As=0.1; PEF_D=0.35*pi; SEF_D=0.7*pi ; T=1; alpha_P=-20*log10(Ap); alpha_S=-20*log10(As); PEF_A=(2/T)*tan(PEF_D/2); SEF_A=(2/T)*tan(SEF_D/2); [N,la]=buttord(PEF_A,SEF_A,alpha_P,alpha_S,'s'); [Bn,An]=butter(N,1,'s'); display('Normalized transfer function is-'); Hsn=tf(Bn,An) [B,A]=butter(N,la,'s') display('Denormalized transfer function is-'); Hs=tf(B,A) w=0:pi/16:pi [num,den]=bilinear(B,A,1/T) display('Digital Transfer function-'); Hz=tf(num,den,T) display('Frequency response is-'); Hw=freqz(num,den,w) display('Magnitude response is-'); Hw_mag=abs(Hw) plot(w/pi,Hw_mag,'k');grid; title('Magnitude response','fontweight','b'); xlabel('Normalized frequency,\omega/\pi','fontweight','b') ylabel('Magnitude','fontweight','b')
Normalized transfer function is-
s^2 + 1.414 s + 1
[showhide type=”post” more_text=”Show more…” less_text=”Show less…”]
Continuous-time transfer function.
Denormalized transfer function is-
s^2 + 1.76 s + 1.548
Continuous-time transfer function.
Digital Transfer function-
0.1708 z^2 + 0.3415 z + 0.1708
z^2 – 0.5407 z + 0.2237
Sample time: 1 seconds
Discrete-time transfer function.[/showhide]
What is Frequency Warping?
Because of the non-linear mapping, the amplitude response of digital IIR filter is expanded at lower frequencies and compressed at higher frequencies in comparison to the analog filter. This effect is called as frequency warping.
What is aliasing effect ?
Aliasing is an effect that causes different signals to become indistinguishable (or aliases of one another) when sampled. It also refers to the distortion or artifacts that result when the signal reconstructed from samples is different from the original continuous signal.