Reply by Srikar July 13, 20052005-07-13
Thanks for your help Tim, Mark. I was able to finish the project in
time.

Reply by Tim Wescott July 7, 20052005-07-07
Mark wrote:

> > Srikar wrote: > >>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? > > > You want to apply large signals at frequencies that are equal to the > resonant frequency of poles to check for overflow that may occur at > intermediate parts of the filter, i.e. not necessarily the output but > at some stage in the middle. The overflow can cause non-linearities > and also can sometimes cause a steady state oscillation that continues > even after the input is removed. (This can happen in hardware also). > So you want to look for clipping anywhere in the filter. > > Limit cycle oscillations are small low level oscillations that can > occur due to roundoff errors in an IIR filter. These oscillations also > can continue after the input is removed. I'm not sure what is the > best way to stimulate these to test for them.
In general non-linear systems theory a limit cycle is any path through the phase space of the system that loops back on itself, i.e. any oscillation that reaches a steady amplitude, frequency and shape -- it doesn't even have to be a stable limit cycle; you can have unstable limit cycles where any small divergence will cause the system state vector to go someplace else. In DSP the term has come to mean the small limit cycle as a result of quantization. In practice any excitation that will get the states to nonzero values will probably excite a limit cycle.
> > I think FIR filters, because their structure lacks feedback, are > immune to both of these problems. >
Yes, they are. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by Mark July 6, 20052005-07-06

Srikar wrote:
> 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?
You want to apply large signals at frequencies that are equal to the resonant frequency of poles to check for overflow that may occur at intermediate parts of the filter, i.e. not necessarily the output but at some stage in the middle. The overflow can cause non-linearities and also can sometimes cause a steady state oscillation that continues even after the input is removed. (This can happen in hardware also). So you want to look for clipping anywhere in the filter. Limit cycle oscillations are small low level oscillations that can occur due to roundoff errors in an IIR filter. These oscillations also can continue after the input is removed. I'm not sure what is the best way to stimulate these to test for them. I think FIR filters, because their structure lacks feedback, are immune to both of these problems.
Reply by Srikar 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?

Reply by Tim Wescott 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 Mark 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 Tim Wescott 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 Srikar 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 Tim Wescott 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 Srikar 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)