tf2sos of iirnotch giving different results
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi,
I am trying to use iirnotch() for filtering, I noticed that if I ran the coefficients from iirnotch (2nd order) through tf2sos (still comes out to be the exact same numbers), the frequency response of (b,a) and (sos) showed in freqz() or fvtool() gives very different results.
eg: [b,a] = iirnotch(wo,bw); [sos1] = tf2sos(b,a); freqz (b, a, Fs); freqz (sos, Fs);
I was wondering how come there is a difference?
댓글 수: 0
채택된 답변
Star Strider
2014년 12월 11일
You didn’t post the details of your code so I can only provide a general reply. As the documentation states, the second-order-section (‘sos’) implementation of a filter characteristically produces the most stable version of the filter. The transfer function (‘tf’) is usually less stable. Therefore, the plotted filter passband-stopband characteristics may be different between the two implementations. (I convert to and use the ‘sos’ implementation whenever I design a filter.)
댓글 수: 6
Star Strider
2014년 12월 12일
Your previous Comment seems to have solved the problem. Still, there seems something anomalous about the results you’re getting with the SOS implementation. Something is wrong somewhere, and it isn’t in your code.
I suggest you mention your findings to The MathWorks in a bug report. Copy and paste the URL for your Question here to your bug report so you don’t have to repeat everything.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!