Limiting PID Loop Overshoot

Jerry Avins made a comment in another thread that made me realize: I discussed a lot of methods for use with PID loops that, when used
correctly, limit overshoot. But dangit if I never actually said "if you want to limit overshoot, this is what you do"!
So now I'm all fired up to write an article on how to design your PID loop so that overshoot would be limited, and I'm wondering if you could share your favorite methods of doing so. The methods that I know of are:
1. Combine a controlled command trajectory (trapezoidal) with clever feedforward to keep the integrator from really winding up, and hence relieve the need for that overshoot at the end.
2. Use comparatively heavy derivative feedback (or back off on the 'P' and 'I' terms) to generally slow things down. This will give you a low, long overshoot which is sometimes acceptable.
3. Seen here -- change the tuning of the controller as the target is approached, to continually kill the overshoot.
4. Make a two-loop system with an inner, limited velocity loop wrapped by a position loop. I've done this before with success, but I think I may have also had to wrap it with feedforward -- I'm going to check.
Anyone have any others?
Thanks.
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

Classical PIDs that overshoot because the integrator has seen a net shortfall by the time the setpoint is reached (unless the response is instantaneous) and the sign of the error must be reversed for a while to discharge it. The overshoot will be 11% if the entire operation takes place in the linear region. Several solutions exist. One is dumping the integrator whenever the error it has accumulated is opposite in sign to the actual error. A further refinement prevents integration when the error exceeds a certain small amount. That may seem counterintuitive. A note below attempts to make it less so. Another way to avoid overshoot is making the forward loop consist /only/ of integration, using linear and derivative feedback. http://users.rcn.com/jyavins/servo.html describes this in a little more detail. Almost every servo designer has a favorite way to modify the internals of what he calls a PID, but is no longer a PID by the time it's done.
Jerry _________________________________________ Sidebar. The purpose of integration in a PID controller is the removal of error due to finite proportional gain (an integrator has infinite gain at DC). It removes error by changing the setpoint chosen by the operator. Many commercial PID controllers call the integrator "reset" because moving the setpoint is seen as its function. The proportional gain is called "proportional band". Increasing the gain reduces the width of the linear band by allowing a smaller error to drive the circuit into saturation. Since the integrator exists to remove small errors by fine tuning the setpoint, it has no use when the system is so far from equilibrium as to be in saturation. No use doesn't mean no effect. It does harm by "winding up". When the integrator wants to move the system "up" and we know it already too "high", the only sensible thing to do is force it into line: *SHUT UP AND SIT DOWN! You'll have your turn later!*
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Jerry Avins wrote:

-- snip --

- snip -
I'm not sure what you define as PID and what not -- as far as I'm concerned if the feedback path experiences P, I and D then it's a PID. You can rearrange the forward path profitably, moving the differentiator or even both differentiator and proportional out of the forward path, but as long as all three are in the feedback path then it'll respond the same to disturbances.
Ditto with how you handle integrator windup -- you can choose various methods to deal with it (and I have more than one favorite, depending on the circumstance), but if it acts like a PID to disturbances when the integrator is operating in its linear region then it's a PID to me.
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

All right. I use 'PID' with no modifier to mean a particular configuration. You and others apparently allow the unmodified name to apply to an entire family of configurations. Which usage is "right" doesn't matter, only understanding what's meant.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Overshoot is caused by insufficient phase margin. All you need to do is add phase-advance and it will fix it. You need to be careful about structural resonances however as phase advances have high freq gain and will amplify them. You may need to sacrifice some bandwidth therefore.
Tam
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Then explain how the I-PD or I-PV that is mentioned in Jerry's link can close the error without overshooting when properly tuned. I-PD or I-PV controllers adds no zeros ( phase lead ) to the closed loop transfer function. The closed loop Bode plot has only phase lag.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Peter Nachtwey wrote:

Peter,
They can avoid overshoot because their integrators don't need to be discharged even in the absence of error due to load. Their integrators only secondarily cancel small errors. The integrator's primary purpose is limiting a step command to a ramp that the actuator can follow. That's why the time constant of integration can be shorter than you are prepared to believe. With short enough time constant, Phelan's position servos behave very nearly like an ideal bang-bang servo, accelerating full tilt half way to the setpoint, then decelerating the rest of the way. Keep in mind that bounding the integrator makes the circuit quite nonlinear, although in a mathematically tractable way.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I know Jerry. The purpose of my question was to see if Tam could justify his statement. I have all forms of PID analyzed to death. PID, I-PD, PI-D, multiple degrees of freedom, double derivatives, with and without integrators etc. I am not a rookie. See Tam's statement about phase lead and overshoot. I know his statement isn't so, for reasons you have pointed out. In addition, I-PD is a PID that doesn't add zeros to the closed loop transfer function like a PID does. If Tam's statements were true then you would not want to add zeros. It is the zeros that cause the derivative jerk etc. However the zeros do extend the closed loop bandwidth which means a PID will respond faster than an I-PD to changes in the set point. I still take issue with point 1 and 4 in you link. I know you don't consider my dynamic limiting a standard PID but I haven't got a clue what you think a standard PID is.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

PI-D,
pointed
you
jerk
Leave bandwidth out of it - you fix teh bandwidth and then design the controller around it. Let's suppose the bandwidth is 1kHz but there is too much overshoot. You add phase advance BUT KEEP THE BANDWIDTH AT 1kHz! That way the response time is approx the same. You cannot really design properly except in the frequency domain where you knwo what is happening.
Tam
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

We agree here but.....

I disagree here. Given a simple system with a transfer function 1/(s+1). I want a crtically damped response ( no overshoot ) with the closed loop poles at -1. The required PI gains are Ki = 1 and Kp = 1. Now how would derivative this system from overshooting? A type 0 single pole system doesn't even need a derivative gain or phase lead to keep from over shooting. If this system was over shooting it would be only because the proper values of Ki andKp were not selected.
BTW, this is a trick example. I chose it because it proves two points and is simple enough where the results can be verified by hand or graphed using Excel. This system does not overshoot in response to a step as Jerry claims it must do. Try it! No fancy limiting is required in fact no limiting is required at all. I can send Tim the .mcd for him to verify if you don't believe me. However, the trick is that the closed loop poles can't be farther to the left than the open loop pole. If they are then what Jerry sayes is true and I don't see how any amount of phase lead will fix the overshoot.
Jerry, I think you need to rephrase your statement about overshooting to 'may or probably will overshoot but it isn't certain. I don't know where you get that 11% overshoot number. Someone must have tried ONE example and the overshoot was 11%. I can get the overshoot to be more by increasing the ratio of the close loop to the open loop pole locations. A ratio .5/1 to 1/1 is the sweet spot. Over one to one the system overshoots. Below .5 to one the system has a non-minimum phase response. At least for type 0 single pole systems.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Oops, left out a work. It should read .. Now how would derivative KEEP this system from overshooting?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Peter Nachtwey wrote:
...

I had in mind a second-order system in the classical configuration trimmed for "critical damping" (a term which, given the overshoot, is less than ideal) without the fixes that we have all learned to apply.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Second order systems don't need to overshoot either. I have another example using Jerry's second order system and critical damping. I chose another simple text book example:
T(s)=1/(s^2+s+1)
G=1.0 Omega=1.0 Zeta=0.5
I want no overshoot so I want a critically damped response with the 3 closed loop poles at .577 or omega/sqrt(3). My resulting gains are Ki=0.192, Kp=0.0 and Kd=0.732
Try it. This closed loop system will not over shoot even if there is no integrator limiting. BTW, the range for the closed loop poles is omega/sqrt(3) to sqrt((1+zeta*G)/3)*omega. Again, I can send Tim the .mcd files to verify this.
The key is that the integrator must not wind up to or beyond the required steady state output before the error is reduced to 0. Duh. This is easy to do with type 0 systems. Type 1 systems are more difficult to keep from overshooting but it is possible to do with the right limiting techniques that meet this requirement.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Peter Nachtwey wrote:

For a PID and an integrating plant (ignoring the differentiator pole) you only get the above transfer function if you put the integrator only in the forward path, and restrict the proportional and differential terms to the feedback path. Not that this is a bad way to go -- if eliminating overshoot is a prime consideration then this would be the bee's knees.
--

Tim Wescott
Wescott Design Services
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes, but there are integrator limit techniques that allow the P and D gains in the forward path. One must make sure that 1. the system is critically or over damped. 2. the integrator does not wind up to or beyond the set point before the error is reduced to 0.
This applies to type 1 or integrating systems as well.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Peter Nachtwey wrote:

How do you make a position servo with no overshoot and very little mechanical friction?
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

That is what the derivative and higher derivatives gains are for. Feed forwards also help. My company makes hydraulic motion controllers. We can easily control servo motors too. A hydraulic system is basically a mass between two springs so it is a second order under damped system. if the valve is ignored. Our controllers are used to control second order systems with very low damping factors all the time.
One of my test systems is a motor with a disk to provide inertia. It's rotational velocity transfer function is approximately 60/(s+1) were the 60 represents the gain in (radians/second) volt. There is no friction except that of the motor. This should be simple for most motion controllers to control without overshooting. Acceleration and deceleration is limited by the amplifiers.
Peter Nachtwey
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Peter Nachtwey wrote:

You do better than most textbooks, that's for sure. I'm pretty much out of date, but I don't now anything off the shelf called "PID" that can do that.
Jerry
--
Engineering is the art of making what you want from things you can get.

  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

:)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

justify
a
There's your problem - you have no limiting effect on bandwidth - that's why you can get away with all these ideas. In a real electro mechanical servo there is a structural resonance(s) that limit the bandwidth. The book always leave this out. Even with pure electronic systems we have high freq poels that limit bandwidth.
Tam
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.