DSPRelated.com
Forums

Simple, fast and CAD-friendly test for closed loop stability?

Started by gretzteam May 23, 2012
Hi,
I'm starting to work on an optimization routine to help determine 'good
enough' parameters for a fixed-structure digital controller according to
various constraints. I essentially vary parameters of the controller and
try to optimize various constraints such as crossover frequency or
low-frequency loop gain...One of the constraint is of course stability of
the closed-loop system. Note that I'm working ONLY with frequency response
data of the plant (no parametric models).

It's easy enough to calculate gain/phase margins, but there are some
pathological cases where you might get 'decent' values for those but the
closed loop is unstable. This happens when there are multiple gain/phase
crossover frequencies.

Everything I can find in control books refer to using the Nyquist stability
criteria. That works fine for a human, but it is kind of hard to code in a
'fast' loop! Are there any *simple* way to asses closed loop stability from
frequency response data of the open loop (or even closed-loop if needed)
that would be easy to code and relatively fast? 

Thanks!
On 5/23/12 9:19 AM, gretzteam wrote:
> Hi, > I'm starting to work on an optimization routine to help determine 'good > enough' parameters for a fixed-structure digital controller according to > various constraints. I essentially vary parameters of the controller and > try to optimize various constraints such as crossover frequency or > low-frequency loop gain...One of the constraint is of course stability of > the closed-loop system. Note that I'm working ONLY with frequency response > data of the plant (no parametric models). > > It's easy enough to calculate gain/phase margins, but there are some > pathological cases where you might get 'decent' values for those but the > closed loop is unstable. This happens when there are multiple gain/phase > crossover frequencies. > > Everything I can find in control books refer to using the Nyquist stability > criteria. That works fine for a human, but it is kind of hard to code in a > 'fast' loop! Are there any *simple* way to asses closed loop stability from > frequency response data of the open loop (or even closed-loop if needed) > that would be easy to code and relatively fast? >
i thought in electronics class, they called it the Barkhousen criterion: loop gain bigger than 1, loop phase shift some multiple of 2*pi. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

> >i thought in electronics class, they called it the Barkhousen criterion: >loop gain bigger than 1, loop phase shift some multiple of 2*pi. > >-- >
Hi, So the first google hit starts with: 'The Barkhausen Stability Criterion is simple, intuitive, and wrong.' http://web.mit.edu/klund/www/weblatex/node4.html Although it is very simple which is nice, I think it would fail for the same pathological cases as the gain/phase margins - probably worst.
On May 24, 1:19&#4294967295;am, "gretzteam" <gretzteam@n_o_s_p_a_m.yahoo.com>
wrote:
> Hi, > I'm starting to work on an optimization routine to help determine 'good > enough' parameters for a fixed-structure digital controller according to > various constraints. I essentially vary parameters of the controller and > try to optimize various constraints such as crossover frequency or > low-frequency loop gain...One of the constraint is of course stability of > the closed-loop system. Note that I'm working ONLY with frequency response > data of the plant (no parametric models). > > It's easy enough to calculate gain/phase margins, but there are some > pathological cases where you might get 'decent' values for those but the > closed loop is unstable. This happens when there are multiple gain/phase > crossover frequencies. > > Everything I can find in control books refer to using the Nyquist stability > criteria. That works fine for a human, but it is kind of hard to code in a > 'fast' loop! Are there any *simple* way to asses closed loop stability from > frequency response data of the open loop (or even closed-loop if needed) > that would be easy to code and relatively fast? > > Thanks!
Of course, the phase margin. The thing that limits bandwidth in an electro-mechanical system though is structural resonance. Ask any hard disk servo designer. Hardy
On 5/23/2012 12:03 PM, gretzteam wrote:
>> >> i thought in electronics class, they called it the Barkhousen criterion: >> loop gain bigger than 1, loop phase shift some multiple of 2*pi. >> >> -- >> > > > Hi, > So the first google hit starts with: > > 'The Barkhausen Stability Criterion is simple, intuitive, and wrong.' > > http://web.mit.edu/klund/www/weblatex/node4.html > > Although it is very simple which is nice, I think it would fail for the > same pathological cases as the gain/phase margins - probably worst.
The Nyquist Criterion's pathological cases exsist (mostly?) in cases where /reducing/ the gain puts the stability point on the wrong side of the phase/gain curve. There ought to be an elegant way to detect that topology. For now, I leave it to the reader. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Wed, 23 May 2012 11:03:40 -0500, gretzteam wrote:


>>i thought in electronics class, they called it the Barkhousen criterion: >>loop gain bigger than 1, loop phase shift some multiple of 2*pi. >> >>-- >> >> > > Hi, > So the first google hit starts with: > > 'The Barkhausen Stability Criterion is simple, intuitive, and wrong.' > > http://web.mit.edu/klund/www/weblatex/node4.html > > Although it is very simple which is nice, I think it would fail for the > same pathological cases as the gain/phase margins - probably worst.
As originally formulated, the Barkhausen is a necessary but not sufficient condition for an oscillator (which you want to exhibit a certain kind of linear instability). When used as stated by Dr. Barkhausen, it is quite useful. As it is commonly misunderstood and applied to control problems, yes, it is wrong. Just for reference, the "real" Barkhausen criterion states that to successfully oscillate, the system must be able to operate with a gain of 1 and a phase shift of 0 around the loop. It neither says that a system that does so is guaranteed to oscillate, nor that a system that does not do so is guaranteed not to oscillate. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On Wed, 23 May 2012 08:19:48 -0500, gretzteam wrote:

> Hi, > I'm starting to work on an optimization routine to help determine 'good > enough' parameters for a fixed-structure digital controller according to > various constraints. I essentially vary parameters of the controller and > try to optimize various constraints such as crossover frequency or > low-frequency loop gain...One of the constraint is of course stability > of the closed-loop system. Note that I'm working ONLY with frequency > response data of the plant (no parametric models). > > It's easy enough to calculate gain/phase margins, but there are some > pathological cases where you might get 'decent' values for those but the > closed loop is unstable. This happens when there are multiple gain/phase > crossover frequencies. > > Everything I can find in control books refer to using the Nyquist > stability criteria. That works fine for a human, but it is kind of hard > to code in a 'fast' loop! Are there any *simple* way to asses closed > loop stability from frequency response data of the open loop (or even > closed-loop if needed) that would be easy to code and relatively fast?
It's worse than that: if you look at the Nyquist stability criteria it requires you to count the number of times that the open-loop gain circles one, then compare that to the number of unstable zeros in the system -- without knowing the unstable zero count, you cannot use it as stated. _I_ use it by starting from a known stable system (with stability demonstrated by experiment), or from a system that is known to have no unstable zeros. I'm not sure why you feel that it is so intractable from a mathematical point of view: there are rapid ways of estimating the angle of a complex number that are more than good enough for counting rotations around a point, so you should be able to scan through your measured data and apply the Nyquist criteria just as well as you could scan through the measured data and apply anything else. But it's worse than that: gain and phase margins, and even the system sensitivity margins that are easy to get from the Nyquist plots, have an Achilles heel in that they don't take the possible variation of your plant into account. If you can't trust your plant gain to vary by less than +/-10dB, a "good" gain margin of 6dB is suddenly insufficient. Worse, if you _can_ trust your plant gain (or delay) in some frequency range but not in others, then you cannot just design by phase or gain margin -- you have to specify gain and phase margins _by frequency_, and this cannot be done without regards to knowledge of the plant behavior. But: good luck! -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
> >I'm not sure why you feel that it is so intractable from a mathematical >point of view: there are rapid ways of estimating the angle of a complex >number that are more than good enough for counting rotations around a >point, so you should be able to scan through your measured data and apply
>the Nyquist criteria just as well as you could scan through the measured >data and apply anything else.
You are right, this is doable. It's interesting though that it seems like nobody ever did this -> I really can't find any implementation being discussed anywhere. You would think this is something people need!
On Thu, 24 May 2012 11:39:06 -0500, gretzteam wrote:


>>I'm not sure why you feel that it is so intractable from a mathematical >>point of view: there are rapid ways of estimating the angle of a complex >>number that are more than good enough for counting rotations around a >>point, so you should be able to scan through your measured data and >>apply > >>the Nyquist criteria just as well as you could scan through the measured >>data and apply anything else. > > You are right, this is doable. It's interesting though that it seems > like nobody ever did this -> I really can't find any implementation > being discussed anywhere. You would think this is something people need!
I think that most autotuning work is being done with industrial controllers where folks are comfortable with ad-hoc procedures like Ziegler-Nichols or Astrom-Haaglund. In addition, doing frequency sweeps on large equipment can be scary for bystanders -- large-amplitude swept-sine tests on anything that makes sound or couples vibration to the floor sounds an awful lot like a Hollywood "equipment about to explode" special effect, and can make the uninitiated dive for cover. I suppose you could mitigate this by sweeping the frequency downward -- then it just sounds like you're powering down the tractor beam on the Death Star. But I suspect you'd still give people the heebie-jeebies. Once you get beyond autotuning to on-line adaptive control, frequency- design methods don't work so well (although thinking in the frequency domain as you work on your time-domain controller is often helpful). -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On May 24, 2:01=A0pm, Tim Wescott <t...@seemywebsite.com> wrote:
> On Thu, 24 May 2012 11:39:06 -0500, gretzteam wrote: > >>I'm not sure why you feel that it is so intractable from a mathematical > >>point of view: there are rapid ways of estimating the angle of a comple=
x
> >>number that are more than good enough for counting rotations around a > >>point, so you should be able to scan through your measured data and > >>apply > > >>the Nyquist criteria just as well as you could scan through the measure=
d
> >>data and apply anything else. > > > You are right, this is doable. It's interesting though that it seems > > like nobody ever did this -> I really can't find any implementation > > being discussed anywhere. You would think this is something people need=
!
> > I think that most autotuning work is being done with industrial > controllers where folks are comfortable with ad-hoc procedures like > Ziegler-Nichols or Astrom-Haaglund. > > In addition, doing frequency sweeps on large equipment can be scary for > bystanders -- large-amplitude swept-sine tests on anything that makes > sound or couples vibration to the floor sounds an awful lot like a > Hollywood "equipment about to explode" special effect, and can make the > uninitiated dive for cover. > > I suppose you could mitigate this by sweeping the frequency downward -- > then it just sounds like you're powering down the tractor beam on the > Death Star. =A0But I suspect you'd still give people the heebie-jeebies. > > Once you get beyond autotuning to on-line adaptive control, frequency- > design methods don't work so well (although thinking in the frequency > domain as you work on your time-domain controller is often helpful). > > -- > My liberal friends think I'm a conservative kook. > My conservative friends think I'm a liberal kook. > Why am I not happy that they have found common ground? > > Tim Wescott, Communications, Control, Circuits & Softwarehttp://www.wesco=
ttdesign.com Conditionally stable systems are found in more places than you might think. All high-order sigma-delta converters are conditionally stable, which means you can find a point where the open-loop phase is 0 degrees and the gain is greater than 1, and yet the system is still stable, against all intuition. Another way to view the Nyquist criterion is that if you have N low frequency poles, you must have N-1 low frequency zeros before the unity gain crossover point. If the input to the plant is sufficiently "busy", you could run a system identification adaptive filter which gives you an FIR equivalent to the plant, and then copy these coefficients into an offline model of the closed-loop system. Bob