Re: Digest Number 15
Posted by
Mike Romine
on 1999-05-19 23:58:52 UTC
COOL! Control system talk. I LOVE THIS STUFF!
linear mechanical system, the integrator can and should be left on all
the time, BUT...
during steady state conditions, and hurts during transient conditions.
This comes more from experience than theory. I have worked on a number
of control systems where we chose to turn the integrator off under
various conditions. One example was a high speed positioning system
which moved with a trapezoidal profile (pure acc and dec) and had to
stop on a dime (total acceptable position tolerance was +/- .0001
inches). No problem right... well, the motor worked through a low
inertia gear train which had loads of backlash. We found that when we
finished the move, even the smallest amount of integral windup would
cause the motor to go unstable because between the backlash and the low
inertia, the system was not damped enough to tolerate even the motor
correction without buzzing like a snake. We also saw that the majority
of error occurred at the highest velocities. So we scaled the
integrator as a function of velocity. TADA! Instant success. The
position tracked the set points perfectly, and stopped on a dime with no
oscillation. Another one I can think of was a robot which had to stop
and go (pick and place to be exact) with long slew times between stops.
Here the integrator would cause overshoot on the ramp up and ramp down.
This time we would turn the I on at the beginning and let it get stable
on the steady state portion of the move (the slew). But we would turn it
off just prior to every ramp down, and back on again after the next ramp
up. Another success. Here, we used the integrator where it works
best--under steady state conditions.
PID gains.
NON-LINEAR mechanical systems. The more non-linear you mechanics are,
the more problems you will have.
term effects the system in a very distinct and predictable way.
Instabilites are easy to design out once you understand the mechanical
system.
backwards. You should dial in P, I and D as best you can, and THEN
compensate for non linearities with feed forward. Most controls
engineers consider feed forward to be a crutch, and a tacky one at that
(there is actually a controls guru at the company I work for which, when
faced with a strange life situation he can't figure out says "oh, I wish
I could just add feed forward to it".) You have mentioned the
advantages, but the big disadvantage is that feed forward acts only on
the input signal (R(s) in control speak), and is therefore open loop.
What this means is it can not see the mechanical system it is working on
like the components in the feedback loop can. But it does work, as Fred
has testified. My question is are you sure your PID filter is as dialed
as it could be?
input? If so, we could probably get your PID gains dialed as well. Let
me know how it goes.
Jon wrote:
one of the set points is constant, be it position, velocity or
acceleration.
software (as opposed to op-amps) is that you can do all sorts of cool
tricks that non-linearize the control system like the one you mention
above.
-Mike
>I agree with you here, for the most part. When PID is applied to a very
> Message: 13
> Date: Tue, 18 May 1999 18:11:34 -0400
> From: Fred Proctor <proctor@...>
> Subject: PID control and NIST Software
>
> CAD/CAM folks,
>
> Dropping oldest values is not what you want with PID. The I gain is used
> to compensate for steady state error.
linear mechanical system, the integrator can and should be left on all
the time, BUT...
>If only all systems were this simple. In general, the integrator helps
> Only when the beam becomes truly horizontal does the
> single-cycle error become zero. At this point there is no additional
> contribution to the accumulated error, and the beam balances
> horizontally. Note that there is no P gain contribution anymore: it's
> all due to the I gain. The entire past error history has resulted in
> exactly the amount of compensation we need to hold the beam truly
> horizontal.
>
> Now, what happens if we drop the oldest value in a moving array?
> Suddenly the I contribution is reduced somewhat, since 0 error is coming
> in and non-zero error is dropping off. The beam would drop slightly, the
> next cycle would add some small error, and the beam would move up. So,
> in order to eliminate steady state error, we need to keep the entire
> error history.
during steady state conditions, and hurts during transient conditions.
This comes more from experience than theory. I have worked on a number
of control systems where we chose to turn the integrator off under
various conditions. One example was a high speed positioning system
which moved with a trapezoidal profile (pure acc and dec) and had to
stop on a dime (total acceptable position tolerance was +/- .0001
inches). No problem right... well, the motor worked through a low
inertia gear train which had loads of backlash. We found that when we
finished the move, even the smallest amount of integral windup would
cause the motor to go unstable because between the backlash and the low
inertia, the system was not damped enough to tolerate even the motor
correction without buzzing like a snake. We also saw that the majority
of error occurred at the highest velocities. So we scaled the
integrator as a function of velocity. TADA! Instant success. The
position tracked the set points perfectly, and stopped on a dime with no
oscillation. Another one I can think of was a robot which had to stop
and go (pick and place to be exact) with long slew times between stops.
Here the integrator would cause overshoot on the ramp up and ramp down.
This time we would turn the I on at the beginning and let it get stable
on the steady state portion of the move (the slew). But we would turn it
off just prior to every ramp down, and back on again after the next ramp
up. Another success. Here, we used the integrator where it works
best--under steady state conditions.
>Never thought of it that way.
> If you are limiting yourself to only driving the system through errors,
> you'll always be suffering errors.
> A better method is to generate aWell, I hope you are developing a model of the system to generate your
> contribution to the output based on what you *think* it needs to be
> based on a model of the system.
PID gains.
> This is feed forward control. In theMore specifically, PID is a LINEAR control filter that gets applied to
> case of the cantilevered beam, it's not hard to determine what the
> feed-forward output should be based on the desired angle. The problem
> with this in real life is that the system model needs to include
> friction, inertia, non-linear amps and motors, etc. that are all varying
> in time as the system heats up, cools down, and ages.
NON-LINEAR mechanical systems. The more non-linear you mechanics are,
the more problems you will have.
>But P, I, and D are also far more powerful when applied properly. Each
> The advantage of feed forward terms is that they can't cause
> instabilities like P, I, and D can.
term effects the system in a very distinct and predictable way.
Instabilites are easy to design out once you understand the mechanical
system.
> The tuning procedure should beginHere I believe you are 180 degrees out of phase... err, I mean
> with estimating the velocity feedforward, then clean up the residual
> errors using P to increase the stiffness, D to damp out oscillations,
> and I to get rid of any steady-state errors.
backwards. You should dial in P, I and D as best you can, and THEN
compensate for non linearities with feed forward. Most controls
engineers consider feed forward to be a crutch, and a tacky one at that
(there is actually a controls guru at the company I work for which, when
faced with a strange life situation he can't figure out says "oh, I wish
I could just add feed forward to it".) You have mentioned the
advantages, but the big disadvantage is that feed forward acts only on
the input signal (R(s) in control speak), and is therefore open loop.
What this means is it can not see the mechanical system it is working on
like the components in the feedback loop can. But it does work, as Fred
has testified. My question is are you sure your PID filter is as dialed
as it could be?
> The velocity feed forward gain can be automatically calculated byDo you have any way of analyzing the response of your axis to a step
> dividing the output send to the amp by the velocity (measured by
> differencing) in the next cycle. Time delay latencies introduce a lot of
> noise, but it can be done in the EMC code. I'm going to try this and see
> how well it works.
>
input? If so, we could probably get your PID gains dialed as well. Let
me know how it goes.
Jon wrote:
> In a totally steady state system, that might be OK, but here,IF the loop is open, why is it integrating?
> we have a system that starts life open-loop. The loop is not even closed
> until the operator takes the machine out of e-stop. What if he walks away
> for an hour with the machine in e-stop? Does that hour of error (3.6 million
> samples at 1 KHz) get added to the Integrated error?
> Well, I beg to differ. A machine tool is NOT a steady-state system, asTrue, but it is steady state from a controls perspective anytime the
> the one you describe above. It also has friction (which changes sign
> when velocity does) which is somewhat protortional to velocity plus
> the static friction. Also, there are cutting forces, which vary all over
> the place.
one of the set points is constant, be it position, velocity or
acceleration.
> All of this is why old errors are not relevant to the currentSounds like a good idea to me. The beauty of doing the control loop in
> state of the system. You have to find a reasonable time window to
> look back through, and keep a rolling sum of those errors - unless
> you want digital filtering, in which older errors become less significant.
software (as opposed to op-amps) is that you can do all sorts of cool
tricks that non-linearize the control system like the one you mention
above.
-Mike
Discussion Thread
Mike Romine
1999-05-19 23:58:52 UTC
Re: Digest Number 15
Andrew Werby
1999-05-20 05:33:29 UTC
Re: Digest Number 15
Dan Mauch
1999-05-21 06:39:21 UTC
Re: Digest Number 15