Вы находитесь на странице: 1из 2

EX No.

8 Design of IIR Filter by using IMPULSE


INVARIANT method

clc
clear all
close all
wp=input('Enter the passband frequency');
ws=input('Enter the stopband frequency');
Rp=input('Enter the passband attenuation');
Rs=input('Enter the stopband attenuation');
fs=input('Enter the sampling frequency');
[n,wn]=buttord(2*pi*wp,2*pi*ws,Rp,Rs,'s');
[b,a]=butter(n,wn,'s');
freqs(b,a);
[bz,az]=impinvar(b,a,fs);
figure,freqz(bz,az);

OUTPUT:
Enter the passband frequency100
Enter the stopband frequency200
Enter the passband attenuation-2
Enter the stopband attenuation-30
Enter the sampling frequency5000
0
Magnitude 10

-5
10

-10
10
2 3 4
10 10 10
Frequency (rad/s)

200
Phase (degrees)

100

-100

-200
2 3 4
10 10 10
Frequency (rad/s)

100
Magnitude (dB)

-100

-200
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)

0
Phase (degrees)

-200

-400

-600
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)

Вам также может понравиться