Butterworth IIR Filter using Bilinear Transformation Method | MATLAB Tutorial

Bilinear Transformation Method:

  1. Poles are transformed by using equation,

Bilinear Transformation

Where, Ts is Sampling Time

  1. Mapping is one to one.
  2. Aliasing effect is not present.
  3. High pass Filter and band Reject Filter can be designed.
  4. Poles as well as zeros can be mapped.
  5. Frequency warping effect is present.

Butterworth approximation:

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:

Let

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:

digital filter step 1

Here,

Ω= Frequency of analog Filter.

ω= Frequency of digital Filter.

Ts= Sampling Time.

Step 2: Calculate the order ‘N’ of Filter using the equation,

Order equation

If the specifications are given in decibel (dB) then use,

order equation in decibels

Step 3: Calculation of Cut off Frequency (Ωc),

When ωc is not given then use the equation,

Cutoff Frequency

And if the specifications are in decibel (db) then,

cutoff frequency in decibels

Step 4: Calculate the poles using,

BLT poles Equations

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,

Transfer Function





and if the poles are complex conjugate then,

Transfer Function Conjugates

Step 6: Design the digital filter by obtaining transfer function H(z) simply by substituting,

Substitutingin the equation of H(s). We have to assume sampling time Ts= 1 if not given.

 

MATLAB CODE:

Consider a problem: Design a Butterworth IIR Filter using Bilinear Transformation by taking T= 1 sec and

Solution:

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')

Output:

Normalized transfer function is-

Hsn =

1

—————–

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-

Hs =

1.548

——————–

s^2 + 1.76 s + 1.548

Continuous-time transfer function.

Digital Transfer function-

Hz =

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]

Output Butterworth IIR BLT

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.


Pursuing Bachelor's Degree in Electronics and Telecommunication Engineering from K. J. Somaiya Institute of Engineering and Information Technology, Mumbai University.