sos2tf: different result in filtfilt by using SOS vs tf
9 次查看(过去 30 天)
显示 更早的评论
Dear all,
I am using filtfilt() on WAVE audio data. The specifics of the filter I am using are: IIR Butterworth bandpass of order 40. Sample rate is 16kHz and the cut-off frequencies are 200 and 1200 Hz.
The issue is: if I create SOS and G parameters by using the filterDesigner tool, or by using designfilt() and create a filter object and use this as the input parameters for filtfilt, this will output the expected result. Whilst, if I convert the SOS matrix to the b and a transfer function vectors by using the sos2tf() function, the resulting filtfilt(b,a,in) output will be a series of NaNs.
For my undestanding, the result of filtering by using the combination SOS/G and the resulting b/a should be the same hence this is either a bug or (most probably) I am missing something. Please let me know if you ideas and/or suggestions.
MATLAB version: 9.4.0.813654 (R2018a) on Linux.
0 个评论
采纳的回答
Christoph F.
2018-5-29
> IIR Butterworth bandpass of order 40
IIR filters with orders this high are fairly susceptible to numerical effects like coefficient quantization errors. How pronounced these effects are depends on the filter structure and implementation.
Remember that even using double precision floating point arithmetics still means that quantization errors occur.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Single-Rate Filters 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!