Hi, It would very helpful if someone could tell me how to test for the stability of an IIR filter.(i.e the stability problems related to the implementation-due to availability of only finite precision) thanks srikar
IIR filter stability issues
Started by ●July 4, 2005
Reply by ●July 4, 20052005-07-04
srikar.ebe@gmail.com wrote:> Hi, > It would very helpful if someone could tell me how to test for the > stability of an IIR filter.(i.e the stability problems related to the > implementation-due to availability of only finite precision) > > thanks > srikar >There are two problems that you need to check for: coefficient quantization and data quantization. If it's a fixed-coefficient filter the coefficient quantization happens at design time, so you just take your as-designed coefficients and check the pole locations (better yet, check the transfer function and make sure it's close enough -- you can have a stable filter that's still not acceptable). If it's a variable-coefficient filter then play around with the math to get an idea of the filter's sensitivity to coefficient quantization and use that as a guide for setting your precision. Data quantization can be handled by treating the quantization as a noise process. Make a block diagram of your filter as implemented, plug in your coefficients, and calculate the transfer function from each quantization point to the output. The conservative analyist will find the worst-case gain and take that for the overall quantization gain. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●July 5, 20052005-07-05
Thanks a lot for the solutions Tim. I am working on a filter with pre-set coefficients for which I need to verify if the filter is stable in a given precision implementation. What inputs should I feed for such a filter to check whether the filter is stable?( Here, the poles are inside the unit circle but close to it and hence the problem with the implementation in finite precision.) Thanks Srikar PS: as a newbie in DSP, I would be extremely glad if you could relate the stability in these filters to the stability of systems in general. i.e What exactly do I mean when I conclude that a filter is stable? (In general systems studied until now it is FIFO stability- how do I assure that the given filter is stable by FIFO was perhaps a better question)
Reply by ●July 5, 20052005-07-05
Thanks a lot for the solutions Tim. I am working on a filter with pre-set coefficients for which I need to verify if the filter is stable in a given precision implementation. What inputs should I feed for such a filter to check whether the filter is stable?( Here, the poles are inside the unit circle but close to it and hence the problem with the implementation in finite precision.) Thanks Srikar PS: as a newbie in DSP, I would be extremely glad if you could relate the stability in these filters to the stability of systems in general. i.e What exactly do I mean when I conclude that a filter is stable? (In general systems studied until now it is FIFO stability- how am I assured that the given filter is stable by FIFO was perhaps a better question)
Reply by ●July 5, 20052005-07-05
Srikar wrote:> Thanks a lot for the solutions Tim. I am working on a filter with > pre-set coefficients for which I need to verify if the filter is stable > in a given precision implementation. What inputs should I feed for such > a filter to check whether the filter is stable?( Here, the poles are > inside the unit circle but close to it and hence the problem with the > implementation in finite precision.)OK, in my last post I told you to take the filter coefficients _as implemented_, i.e. _after quantization_ and check the filter poles -- is that not what you're doing? If you feel you must do it experimentally just give it a step input, and hope that what you've coded doesn't have any bugs that's making what should be stable unstable or visa versa (fixing a coding bug only to uncover a serious system definition bug is _not_ a nice thing to have happen). It is good to be worried about poles close to the unit circle creeping outwards when the coefficients are quantized -- those little buggers can move an astounding distance for relatively small changes in the coefficients.> > Thanks > Srikar > > PS: as a newbie in DSP, I would be extremely glad if you could relate > the stability in these filters to the stability of systems in general. > i.e What exactly do I mean when I conclude that a filter is stable? (In > general systems studied until now it is FIFO stability- how do I assure > that the given filter is stable by FIFO was perhaps a better question) >The filter is a system, just like any other system. I assume you mean BIBO stability (bounded-input, bounded-output)? At any rate, a filter follows all the same rules for stability that any other linear shift-invariant system would follow. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●July 5, 20052005-07-05
If I see no instability in the step response, I can only say that the filter is stable for the step input, and I assume it doesnt mean that the filter has to be stable for all inputs( please correct me if I am wrong) because there is no theorem/rule that validates the stability of the filter in case of it being stable to step input.( I have searched for a long time on the net, and I think I saw somewhere white noise being given as an input to the filter to test its stability.) Unfortunately I lost that site. Please let me know how this test is implemented.
Reply by ●July 5, 20052005-07-05
Srikar wrote:> If I see no instability in the step response, I can only say that the > filter is stable for the step input, and I assume it doesnt mean that > the filter has to be stable for all inputs( please correct me if I am > wrong) because there is no theorem/rule that validates the stability of > the filter in case of it being stable to step input.Theoretically correct, but you'd have to go out of your way to construct an unstable filter that wouldn't have troubles with the step input.> ( I have searched > for a long time on the net, and I think I saw somewhere white noise > being given as an input to the filter to test its stability.) > Unfortunately I lost that site. Please let me know how this test is > implemented. >Matlab has, I believe, a white noise generator. If you're checking a physical system you can get various noise generators. You seem reluctant to do this with theoretical means. Is it that you have already verified it in theory and want to double check, that you don't trust the theory, or that you don't want to make the effort? The first is perfectly valid, the second -- well, linear systems theory is pretty solid and will save you time (but a check of the real system is a good idea). In the last case -- just do the check!! -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●July 5, 20052005-07-05
Srikar wrote:> Thanks a lot for the solutions Tim. I am working on a filter with > pre-set coefficients for which I need to verify if the filter is stable > in a given precision implementation. What inputs should I feed for such > a filter to check whether the filter is stable?( Here, the poles are > inside the unit circle but close to it and hence the problem with the > implementation in finite precision.) > > Thanks > Srikar > > PS: as a newbie in DSP, I would be extremely glad if you could relate > the stability in these filters to the stability of systems in general. > i.e What exactly do I mean when I conclude that a filter is stable? (In > general systems studied until now it is FIFO stability- how am I > assured that the given filter is stable by FIFO was perhaps a better > question)Would it not be a good idea as a practical test, to use a very large i.e. full scale input step function (to check for overflow issues) as well as a very small one (to check for limit cycle issues) ? Mark Mark
Reply by ●July 5, 20052005-07-05
Mark wrote:> > Srikar wrote: > >>Thanks a lot for the solutions Tim. I am working on a filter with >>pre-set coefficients for which I need to verify if the filter is stable >>in a given precision implementation. What inputs should I feed for such >>a filter to check whether the filter is stable?( Here, the poles are >>inside the unit circle but close to it and hence the problem with the >>implementation in finite precision.) >> >>Thanks >>Srikar >> >>PS: as a newbie in DSP, I would be extremely glad if you could relate >>the stability in these filters to the stability of systems in general. >>i.e What exactly do I mean when I conclude that a filter is stable? (In >>general systems studied until now it is FIFO stability- how am I >>assured that the given filter is stable by FIFO was perhaps a better >>question) > > > Would it not be a good idea as a practical test, to use a very large > i.e. full scale input step function (to check for overflow issues) as > well as a very small one (to check for limit cycle issues) ? >Probably -- and if it's a resonant filter it'd be a good idea to check it through the neighborhood of the resonant frequency as well. Here again I find that doing a block diagram and investigating the sensitivity of the thing (in this case the internal states vs. the input) is a good idea. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●July 6, 20052005-07-06
Thanks Tim, and ya.. its for the second reason that I have to check the filter stability. I hav already checked them in theory and the problem has been that some of these filters turned up with noise when tested practically. Hence the effort to check them before I implement them in hardware. Srikar PS: Mark could you please elucidate further, the issue of limit cycle testingand also With a large step function what should i look for in the output?