Auto AdSense

Sunday, 21 September 2014

MATLAB code for IIR Butterworth Filter using Bilinear Transform

clc;
clear all;
close all;
Ap=2;
As=40;
fp=100;
fs=900;
fst=2000;
t=(1/fst);
wp=2*pi*fp;
ws=2*pi*fs;
w1=(2/t)*tan(wp/(2*fst));
w2=(2/t)*tan(ws/(2*fst));
[n,wn]=buttord(w1,w2,Ap,As,'s');
[b,a]=butter(n,wn,'s');
[bz,az]=bilinear(b,a,fst);
freqz(bz,az,fst);

No comments:

Post a Comment