PID tuning
Example: a DC Servo motor.
The parameters for P, I and D are all set to zero to start with. A Small amount of P (Graph 1) is added and the response of the motor to the input is started. It can be seen that there is a stepped response to the stepped Aim value but the aim position is not reached. The P is increased (figure 2) and the error (Aim minus Actual) is reduced.
Graph 2 also shows that with added P there is a slightly quicker response to the stepped input, this shows as reduced ‘rounding’ of the actual position step.
P is increased even further so that response is quicker and the error between Aim and Actual position is a lot smaller but there is now some overshoot and undershoot (Graph 3). Dropping the P amount slightly will reduce the hunting and adding some D will reduce it even further while keeping the response time acceptable (Graph 4). The D parameter acts like a damper on the systems response. There is still some small error remaining though.
Some I can be introduced to the system to reduce the remaining error to close to zero, i.e.: to within the dead band range. The I will keep adding duty over the time that the error is not zero. The reaction from the P and the additional D can also be seen by looking at the output current. Graph 5 shows the system with P component only; the current applied to the motor shows that it has no damping (braking) effect and the current is only reversed when the Actual position overshoots the Aim. In Graph 6 there is a noticeable reversing of the current (braking) as the error gets close to zero. Fine tuning the P and D will make the system better. I is (generally) set last to eliminate any remaining error.
A system such as a DC Servo motor will almost always need full PID control because of its requirement to have very rapid and accurate response to a rapidly changing Aim request. Systems that have a slower response requirement may only need P and some I with no D. Some systems may require P and D only as any left over errors do not affect the system, boost control for example.
If the DC Servo motor is not able to achieve its aim position for some reason, say if something were to physically prevent movement, the integral gain would keep increasing the duty cycle to eliminate this error. If you were to suddenly release the motor there would be so much built up Integral component that it might overshoot wildly. Having a sensible Integral Clamp stops this from happening.
General PID Tuning
On-line trial tuning or, the "by-guess-and-by-golly" method
1. Enter an initial set of tuning constants from experience. A conservative setting would be a
Proportional gain of 1 or less and an Integral gain of less than 0.1.
2. Put loop in automatic with process "lined out".
3. Make step changes (about 5%) in setpoint.
4. Compare response with diagrams and adjust.
This method may be feasible for some (but not all) vehicle systems. More robust starting parameters can be calculated mathematically using the Ziegler-Nichols tuning method. A discussion of this method is beyond the scope of this document. Many references can be found on the Internet by interested parties.
Comments
0 comments
Please sign in to leave a comment.