Hello mates, Another question about IIRs from me. I managed to fix my buggy code and I have further problems now. Is it possible (and it what way) to alter the IIR filter coefficients (the ones from the diff equation) to make it stable if the filter is unstable? And I need to know the stable filter's coefficients! What is the optimal way to check if an IIR filter is stable (having only its ceofficients)? So far, I jammed an impulse through the filter and checked the output and if the output was still non-zero after a constant ammount of samples have passed I claimed the filter unstable. This isn't very efficient though. Thanks again for your help, Dani
IIR filters revisited
Started by ●September 14, 2004
Reply by ●September 15, 20042004-09-15
Dani wrote:> Hello mates, > > Another question about IIRs from me. I managed to fix my buggy code and > I have further problems now. > > Is it possible (and it what way) to alter the IIR filter coefficients > (the ones from the diff equation) to make it stable if the filter is > unstable? And I need to know the stable filter's coefficients! > > What is the optimal way to check if an IIR filter is stable (having only > its ceofficients)? So far, I jammed an impulse through the filter and > checked the output and if the output was still non-zero after a constant > ammount of samples have passed I claimed the filter unstable. This isn't > very efficient though. > > Thanks again for your help, > DaniThe first "I" in IIR stands for "infinite" -- because an ideal IIR filter has a response that decays exponentially but never, ever goes completely away. If you have an IIR filter of the form y_n = a_1*y_{n-1} + a_2*y_{n-2} + ... + b_0*u_n + b_1*u{n-1} + ... then the transfer function will be b_0*z^m + b_1*z^(m-1) + ... H(z) = -----------------------------. z^m + a_1*z^(m-1) + ... If any roots of the denominator polynomial have absolute values greater than 1 then the filter is not stable. You can get more details from http://www.wescottdesign.com/articles/zTransform/z-transforms.html. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●September 15, 20042004-09-15
Dani <devil_slayer@nospam.com> wrote in message news:<opseb1c9v7q81tw3@news.tpi.pl>...> Hello mates, > > Another question about IIRs from me. I managed to fix my buggy code and I > have further problems now. > > Is it possible (and it what way) to alter the IIR filter coefficients (the > ones from the diff equation) to make it stable if the filter is unstable? > And I need to know the stable filter's coefficients! > > What is the optimal way to check if an IIR filter is stable (having only > its ceofficients)? So far, I jammed an impulse through the filter and > checked the output and if the output was still non-zero after a constant > ammount of samples have passed I claimed the filter unstable. This isn't > very efficient though.Even worse, it's wrong. No Infinite Impulse Response filter will ever pass your test.> Thanks again for your help, > DaniTo check whether the filter is stable, compute the roots of the denominator polynoumial. If any root lies outside the unit circle, the filter is unstable. Check out a text on DSP. I would suggest Lyons: Understanding Digital Signal Processing, 2nd edition, Prentice-Hall, 2004. For your questions, chapter 6.3 would be particularly useful. Rune
Reply by ●September 15, 20042004-09-15
Another thing misundertstood... What would i do without you... So in aother terms, the filter is stable if the poles of the filter are inside the unity circle of the z-plot, right? Ok, i'll think about that, but how would i go to make such a filter stable again (without the need of inverse z-transform)?
Reply by ●September 15, 20042004-09-15
Rune Allnor wrote: ...>>What is the optimal way to check if an IIR filter is stable (having only >>its ceofficients)? So far, I jammed an impulse through the filter and >>checked the output and if the output was still non-zero after a constant >>ammount of samples have passed I claimed the filter unstable. This isn't >>very efficient though. > > > Even worse, it's wrong. No Infinite Impulse Response filter will ever > pass your test.Baring limit cycles, you'd need pretty high resolution maths for true infinite response :-).
Reply by ●September 15, 20042004-09-15
Dani wrote:> Another thing misundertstood... What would i do without you... > > So in aother terms, the filter is stable if the poles of the filter are > inside the unity circle of the z-plot, right? > > Ok, i'll think about that, but how would i go to make such a filter > stable again (without the need of inverse z-transform)?What do you mean by stable _again_? You can't move the poles (poles are zeros of the denominator) without changing the coefficients. There are filter-design programs, some of them free, that compute a set of coefficients to meet your filter specifications. Do you use one? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●September 15, 20042004-09-15
allnor@tele.ntnu.no (Rune Allnor) wrote in message news:<f56893ae.0409150049.3effeee9@posting.google.com>...> > To check whether the filter is stable, compute the roots of the denominator > polynoumial. If any root lies outside the unit circle, the filter is > unstable. >You can also check for stability without having to find the roots by converting to lattice form and checking that none of the k-parameters have absolute value greater than one. -Frederick Umminger
Reply by ●September 15, 20042004-09-15
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message news:f56893ae.0409150049.3effeee9@posting.google.com...> Dani <devil_slayer@nospam.com> wrote in messagenews:<opseb1c9v7q81tw3@news.tpi.pl>...> > Hello mates, > > > > What is the optimal way to check if an IIR filter is stable (having only > > its ceofficients)? So far, I jammed an impulse through the filter and > > checked the output and if the output was still non-zero after a constant > > ammount of samples have passed I claimed the filter unstable. This isn't > > very efficient though. > > Even worse, it's wrong. No Infinite Impulse Response filter will ever > pass your test.Correct in theory, but with finite-precision math, this test may end up working just fine. But it would be better to modify the procedure to check that the output was below a certain level rather than being zero after the prescribed time had elapsed. And still better are the other methods involving roots or converting the lattice.
Reply by ●September 15, 20042004-09-15
In article <41484553$0$2669$61fed72c@news.rcn.com>, Jerry Avins <jya@ieee.org> wrote:> [someone wrote:] >> So in aother terms, the filter is stable if the poles of the filter are >> inside the unity circle of the z-plot, right? >> >> Ok, i'll think about that, but how would i go to make such a filter...>There are filter-design programs, some of them free, that compute a set >of coefficients to meet your filter specifications. Do you use one?This assumes that there are specifications (frequency or impulse) to which an IIR filter can be designed. This may not be the case. If you are searching among stable sets of filter coefficients (using some other, perhaps more computationally tractable, fitness metric for ones given requirements), the standard filter-design approaches might not work. IMHO. YMMV. -- Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ #include <canonical.disclaimer> // only my own opinions, etc.
Reply by ●September 15, 20042004-09-15
Ronald H. Nicholson Jr. wrote:> In article <41484553$0$2669$61fed72c@news.rcn.com>, > Jerry Avins <jya@ieee.org> wrote: > >>[someone wrote:] >> >>>So in aother terms, the filter is stable if the poles of the filter are >>>inside the unity circle of the z-plot, right? >>> >>>Ok, i'll think about that, but how would i go to make such a filter > > ... > >>There are filter-design programs, some of them free, that compute a set >>of coefficients to meet your filter specifications. Do you use one? > > > This assumes that there are specifications (frequency or impulse) > to which an IIR filter can be designed. This may not be the case. > If you are searching among stable sets of filter coefficients (using some > other, perhaps more computationally tractable, fitness metric for ones > given requirements), the standard filter-design approaches might not work. > > > IMHO. YMMV.Agreed. My remark wasn't intended to be a cure-all or a criticism; just a possibly helpful hint. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������