Matlab Programfor IIRButterworth Filter Design
Matlab Programfor IIRButterworth Filter Design
Filter
by
R.Senthilkumar, Assistant Professor, ECE
Department, IRTT
Matlab Program for IIR Butterworth Filter Design using Bilinear
Transformation
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
delta1 = input('Enter the Pass Band Ripple');
delta2 = input('Enter the Stop Band Ripple');
wp = input('Enter the Digital Pass Band Edge Frequency');
ws = input('Enter the Digital Stop Band Edge Frequency');
T = input('Enter the Sampling Time Period in Seconds');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
%Analog Frequencies Calculated using Bilinear Transformation
omegap = (2/T)*tan(wp/2);
omegas = (2/T)*tan(ws/2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%To Calculate the filter order
den = 2*log10(omegas/omegap);
delta = ((1/(delta2^2))-1);
epsi = ((1/(delta1^2))-1);
num = log10(delta/epsi);
N = ceil(num/den);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1) Bilinear Transformation
2) Impulse Invariant Method
3) Matched Z Transform
4) Approximation of Derivatives Method
1) Bilinear Transformation:
(1-z-1)
H(Z) = H(S) / S = (2/T) -------
(1+z-1)
(S+1)
(S+2)
H(Z) = Z { h(nT)}
Butterworth IIR Filter:
1
1
2
log 2
1 1
2
1
N
2 log
s
P
2) Formula to calculate Poles
S jce j( 2k 1) / 2N
where k = 0,1,2,………N-1
Design Of Digital Butterworth IIR Filter uisng Bilinear Transformation
Procedure:
Step 1:
Ωp = Analog Pass band Edge Frequency = (2/T) tan( wp / 2)
Ωs = Analog Pass band Edge Frequency = (2/T) tan( ws / 2)
Step 2:
1
1
Filter Order = 2
log 2
1
1
2
1
N
s
2 log
P
Step 3:
Analog Cut off Frequency Ωc = Ωp / [(1/ δ12 ) -1] (1/2N)
Step 4:
Analog Butterworth IIR Filter transfer function
(Ωc) N
H(S) = ---------
poles
Step 5:
Poles
S j ce j( 2k 1) / 2N
Where k =0,1,2….N-1
Step 6:
Digital IIR Butterworth Filter from Analog IIR Butterworth Filter
(1-z-1)
H(Z) = H(S) / S = (2/T) -------
(1+z-1)