1

我的 buttord 函数有问题,我想我不明白它是如何工作的。我正在传递一些参数并获得过滤器的负序。这怎么可能?我正在构建一个模拟低通滤波器,其通带以 1500Hz 结束,阻带以 2000Hz 开始。纹波要求以 dB 为单位,不确定它是否会改变任何东西。我一直在查看 Matlab 文档,但找不到代码有什么问题。

这是我的代码:

rbp = 0.10; %pass band ripple requierement 
rbs = 0.05; %stop band ripple

fp = 1500; %pass band freq
fs = 2000; %stop band freq

Wp = 2*pi*fp; % change to rad/sec
Ws = 2*pi*fs;

[N, Wn] = buttord(Wp,Ws,rbp,rbs,'s') %yields N = -1

谢谢!

4

1 回答 1

2

您错误地将其解释rbs为阻带波纹。实际上它代表阻带最小衰减,因此它应该具有更高的值。例如,设置 . rbs=20(dB) 给出N=15

来自help buttord

[N, Wn] = BUTTORD(Wp, Ws, Rp, Rs) returns the order N of the lowest 
order digital Butterworth filter that loses no more than Rp dB in 
the passband and has at least Rs dB of attenuation in the stopband.  
Wp and Ws are the passband and stopband edge frequencies, normalized 
from 0 to 1 (where 1 corresponds to pi radians/sample).
于 2013-10-20T20:32:00.117 回答