# Designing Butterworth analog lowpass filter design for high frequencies.

조회 수: 48 (최근 30일)
Sachin Trankatwar 2022년 10월 17일
답변: Nadia Shaik 2022년 11월 23일
MATLAB code using built-in filter commands is given below for Butterworth analog lowpass filter design. The filter was designed for the following specifications: Passband frequency (fp) =30 Hz, Stopband frequency (fs) =60 Hz, Maximum passband attenuation (rp) = 1dB, and Minimum stopband attenuation (rs) = 40dB.
clc; clear all; close all;
% Given specifications
wp=2*pi*1000;
ws=2*pi*5000;
rp=1;
rs=40;
% code for order(n), cut-off frequency (wn), zeros (z), poles (p), gain (k)
[n,wn]=buttord(wp,ws,rp,rs,'s');
[z,p,k] = buttap(n);
% code for obtaining the filter transfer function coefficients
[b,a] = butter(n,wn,'low','s');
% code for plotting pole-zero plot
z1=tf(b,a);
figure(1)
pzmap(z1)
title('Butterworth Lowpass filter')
% code for obtaining magnitude values (h) at different frequencies (w) using filter coefficients (b,a) and plotting the frequency response
[h,w] = freqs(b,a);
figure(2)
plot(w,mag2db(abs(h)))
grid on;
title('Butterworth Lowpass filter');
ylabel('Gain in db');
xlabel('Frequency');
When I verify wp, ws, and wn in the simulation result, it matches the given specifications. However, when I change the wp and ws of a given specification to a high frequency (say, wp = 6280 and ws = 31400), ws and wn in the simulation result match the given specification, but wp does not. Could you please explain why?

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Hi Sachin,
I understand that you want to design a Butterworth Lowpass filter with different 'passband corner frequency(Wp)' and 'stopband corner frequency(Ws)'. The input arguments of the function 'butterord', 'Wp' and 'Ws' are expected to be between 0 and 1, where 1 corresponds to the normalized Nyquist frequency, π rad/sample.
For more information, you may refer to the 'Input Arguments' section in the 'butterord' function documentation page.
I hope this helps.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Analog Filters에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by