首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在使用buttord()设计butterworth滤波器时,我得到了N的零值或负值

在使用buttord()设计butterworth滤波器时,我得到了N的零值或负值
EN

Stack Overflow用户
提问于 2019-07-31 10:43:30
回答 1查看 330关注 0票数 0

这些是我的低通巴特沃斯滤波器所需的规格。

代码语言:javascript
复制
delta_l = 0.2929;
delta_h = sqrt(0.1);

passband_min = 1-delta_l;
stopband_max = delta_h;

% the passband and stopband edge frequencies, normalized from 0 to 1 where
% 1 corresponds to pi rad/sample
Wp = 0.25; %*pi
Ws = 0.4; %*pi

%in the input to buttord(), Rp is the passband ripple
%"no more than Rp dB of passband ripple"
Rp = mag2db(delta_l)

%in the input to buttord(), Rs is the stopband attenuation
Rs = mag2db(1-delta_h)

[n, Wn] = buttord(Wp, Ws, Rp, Rs)

输出为

代码语言:javascript
复制
Rp =

  -10.6656


Rs =

   -3.3018


n =

    -1


Wn =

    0.3805

这显然是错误的。

使用数学方法,我得到n= 3的截止频率为0.7854。一旦我获得这些值,我计划将它们放入butter()函数中。

谢谢你的帮助。

EN

回答 1

Stack Overflow用户

发布于 2019-07-31 13:00:12

我使用了错误的衰减公式:

衰减级别( dB )= 20 * log10(vout/vin)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57282448

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档