tf2sos of iirnotch giving different results

7 visualizaciones (últimos 30 días)
Daoyuan
Daoyuan el 11 de Dic. de 2014
Comentada: Daoyuan el 15 de Dic. de 2014
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?

Respuesta aceptada

Star Strider
Star Strider el 11 de Dic. de 2014
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 comentarios
Star Strider
Star Strider el 12 de Dic. de 2014
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.
Daoyuan
Daoyuan el 15 de Dic. de 2014
OK, thanks for the advice, I will try to send a bug report.
=D

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by