Re: Putting the 'I' in 'PID'



On Mon, 20 Apr 2009 04:48:03 +0000, Ben Jackson wrote:

On 2009-04-17, Rick Armstrong <bogus@xxxxxxxxx> wrote:

I'm building a (hopefully) self-leveling quad-rotor rc helicopter,

You've already gotten some good advice. I will fill in some holes I saw
in the other replies:

1. Buy Tim's book.

I blush. Not out of false modesty, but because I neglected to plug the
damn thing. Here, I'll correct that: http://www.wescottdesign.com/
actfes/actfes.html.

Sure, you can just keep asking questions here and
get the answers one reply at a time, but it's faster to read the book.
Be sure to download the errata. (I still need to test Tim's claim that
you can print the errata pdf on stickers and paste them right into the
book!)

I'm not sure you still can -- thanks for reminding me. I #1 son hard at
work reformatting all of the articles on my website; I can add this to
his to-do list.

(it's interesting to watch him work. He ran my whole Master's thesis
through OCR, then tidied it up -- including entering all the equations
into an equation editor. He didn't have the vaguest notion of what the
stuff _meant_, but you can give him an integral or an infinite sum and he
knows how to tell OpenOffice how to typeset it. He's going to hit
calculus one of these days and finally realize what all those pothooks
and squiggles mean -- I wonder if it'll help, hinder, or not make a
difference).

2. Beware any temptation to "help" your controller by directly clamping
things that aren't doing "what you want". Usually the misbehavior you
are trying to fix is due to a larger design issue (such as instability)
and your attempts to solve it by brute force will only make things
worse. I learned this the hard way before I learned #1 above.

I've learned this the hard way several times by now, and it hurt every
time (I'm slow). I think the time between lessons increases
exponentially, but there's an unfortunate early termination to the
experiment somewhere between 60 and 100 years, so I'll never know for
sure.

Now, I've decided to add the 'I' term, and realize now that there's
something that I don't understand: does the integrator sum the error
for _all_ time (i.e. as long as the controller has been running), or
just for the "recent past"?

Think about what happens if you hang a small weight from one corner of
your vehicle. The integral term is essentially what "learns" that one
rotor needs to driver harder to compensate. Tim: It's too bad we
didn't think to make a video of the demo with the doorstop... Did you
ever finish the new, improved version?

No, I got seduced by paying work. It's still an ongoing project, though,
for all that it's simmering gently on the back burner.

(For those of you who are wondering, Ben attended a class that I gave for
Oregon Institute of Technology aimed at teaching control theory to
embedded software engineers. Ben decided that the class needed a lab
exercise, so he generously built a propeller on a stick that could be
used to learn many ramifications of controlling real things in the real
world. I've been developing it further, into something that can be
produced economically in modest volumes, but more immediate profits have
intervened for now.)

--
http://www.wescottdesign.com
.



Relevant Pages

  • Re: control law modification
    ... reject any steady-state disturbance from C, so the question is fair as ... You're being asked to make a _PD_ controller (one gain times proportional, ... settle to 0 (or zero steady-state error). ... When you integrate your error the output of the integrator is guaranteed ...
    (sci.engr.control)
  • Re: Limiting PID Loop Overshoot
    ... In any case you are changing the topic which is about integrator ... The controller is a PID with an extra ... alpha=1 The real pole ... Doesn't mean anything - what is your BANDWIDTH!!? ...
    (sci.engr.control)
  • Re: Limiting PID Loop Overshoot
    ... your new plant has 3 poles. ... |> without a integrator limit. ... The controller is a PID with an extra ... | Doesn't mean anything - what is your BANDWIDTH!!? ...
    (sci.engr.control)
  • Re: control law modification
    ... You're being asked to make a generic PI controller, which should reject any steady-state disturbance from C, so the question is fair as long as they are telling you where C comes into the dynamics of your system. ... Actually, if you implement this as it implies (integrate everything, then differentiate) you'll get a problem because of the pole-zero cancellation. ... When you integrate your error the output of the integrator is guaranteed to follow the average error*. ...
    (sci.engr.control)