matlab - 使用 buttord() 设计巴特沃斯滤波器时,我得到 N 的零值或负值
问题描述
这些是我的低通巴特沃斯滤波器所需的规格。
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)
输出是
Rp =
-10.6656
Rs =
-3.3018
n =
-1
Wn =
0.3805
这显然是错误的。
使用数学我得到 0.7854 的截止频率,n = 3。一旦我得到这些值,我计划将它们放入 butter() 函数。
谢谢您的帮助。
解决方案
我使用了错误的衰减公式:
以 dB 为单位的衰减电平 = 20 * log10(vout/vin)
推荐阅读
- bash - bash 变量的远程命令后跟 if 语句,但输出读取不正确?
- flutter - 文本字段焦点触发 UI 的重建
- android - 执行 com.android.build.gradle.internal.tasks.Workers$ActionFacade 时发生故障
- java - OSX Catalina 以管理员权限打破了 osascript 启动
- python - 按索引和列排序
- android - 如何通过使用带有子元素的Scrollview将底部导航保持在底部是LinearLayout作为根
- python - 这个脚本运行良好,直到他停下来并显示错误
- c++ - 双模板对象
- c# - 如何将 f(x) = sin(x)*sin(x) 函数拟合到您的数据中?
- python-3.x - 如何在图像 JtessBoxEditor 上创建框?