如何使用fdatool使用IIR过滤WAV信号? [英] How to filter a wav signal using IIR using fdatool?

查看:79
本文介绍了如何使用fdatool使用IIR过滤WAV信号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用fdatool设计了一个IIR滤波器,在设计之后,我导出了联合科学家SOSG

I used fdatool to design an IIR filter , after the design i exported the co-ofcients SOS and G

然后我使用Output1=filtfilt(SOS,G,wave);是正确的,因为它运行时需要很长时间,而且当我绘制频率和时间响应时,没有值出现?

then i used Output1=filtfilt(SOS,G,wave);, is that correct , because when it runs it take a very long time and when i plot the frequency and time response, no values appear ??

推荐答案

filtfilt函数期望传递函数的分子和分母系数向量(分别为B和A)作为前两个参数.您可以使用SOS2TF函数将二阶部分转换为这些系数向量:

The filtfilt function is expecting the numerator and denominator coefficient vectors (B and A, respectively) of the transfer function as the first two arguments. you can use the SOS2TF function to convert the second order sections into these coeffectient vectors:

[B,A] = sos2tf(SOS,G);

然后您可以使用filtfilt函数:

Then you can use the filtfilt function:

Output = filtfilt(B,A,wave);

虽然这行得通,但在使用高阶系统时我会小心;将高阶滤波器分解为许多级联的低阶滤波器是避免系数误差的好方法.

While this would work, I would watch out when using high order systems; breaking up a high order filter into many cascaded low order filters is a good way to avoid coefficient error.

这篇关于如何使用fdatool使用IIR过滤WAV信号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆