0% found this document useful (0 votes)
37 views4 pages

Program To Design Butter Worth Lowpass Filter

The document describes a program to design a Butterworth lowpass filter. It takes in user inputs for the passband ripple, stopband ripple, passband frequency, stopband frequency, and sampling frequency. It then uses these values to calculate the filter order and cutoff frequency. Finally, it plots the pole-zero plot and frequency response of the designed lowpass filter in two subplots.

Uploaded by

Karan Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

Program To Design Butter Worth Lowpass Filter

The document describes a program to design a Butterworth lowpass filter. It takes in user inputs for the passband ripple, stopband ripple, passband frequency, stopband frequency, and sampling frequency. It then uses these values to calculate the filter order and cutoff frequency. Finally, it plots the pole-zero plot and frequency response of the designed lowpass filter in two subplots.

Uploaded by

Karan Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

%program to design butterworth lowpass filter

rp=input('enter passband ripple')


rs=input('enter stopband ripple')
wp=input('enter passband frequency')
ws=input('enter stopband frequency')
fs=input('enter sampling frequency');
w1=2*wp/fs
w2=2*ws/fs
[n,wn]=buttord(w1,w2,rp,rs)
[z,p,k]=butter(n, wn)
[b,a]=butter(n,wn)
subplot(2,1,1)
zplane(b,a);
title('Pole Zero plote of H(Z)')
[H,F]=freqz(b,a,256,fs);
subplot(2,1,2)
plot(F,abs(H));
title('f-responce')
enter passband ripple1

rp =

enter stopband ripple40

rs =

40

enter passband frequency100

wp =

100

enter stopband frequency200

ws =

200

enter sampling frequency1000

w1 =

0.2000

w2 =

0.4000

n=

7
wn =

0.2291

z=

-1
-1
-1
-1
-1
-1
-1

p=

0.6557 + 0.5605i
0.6557 - 0.5605i
0.4717 + 0.1795i
0.4717 - 0.1795i
0.5329 + 0.3653i
0.5329 - 0.3653i
0.4532

k=

2.0235e-004

b=

0.0002 0.0014 0.0042 0.0071 0.0071 0.0042 0.0014 0.0002

a=

1.0000 -3.7738 6.5614 -6.6518 4.2030 -1.6437 0.3666 -0.0359

You might also like