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에서 Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!