## Online Self-Tuning PID Controller | ||||||||||||

## Introduction(View more Control information or download preliminary software modules.) A previously posted note on this site describes an experimental PI controller augmented with automatic self-tuning features [1]. Why not a PID controller? This article explains why. It also shows how a classic tuning strategy, unsatisfactory in itself, makes a useful complement to the self-tuning strategy, extending the method to full PID control. ## Why Not Just Extend the Original Method?We did that. We were not happy with the results. In theory, the iterative feedback technique [2] used for the self-tuning PI controller [1] is equally valid for PID controllers or any kind of
low order controller. Whatever the tuning parameters are, you
have to expand the math and derive the filters to estimate
the required gradient terms, but this is basically an
algebraic exercise. Adding an additional new gradient term for
the ## Problem of Estimation and Noise The transfer function for a derivative operator in the
Laplace frequency domain is In the iterative feedback scheme, the filters for estimating
the gradient of the D-term gain have an ## Problem of Cross-PurposesIf you are familiar with the effects of PID gains (see for example the tutorial article [3] on this site), you know that when a system is operating too close to its stability limit, it tends to oscillate. Some reasonable tuning strategies to correct this are -
*reduce the integral gain to reduce phase shifts.* -
*increase the derivative gain to improve damping.*
Similarly, if the system response is too heavily damped and sluggish, try the opposite. -
*increase the integral gain to respond more quickly.* -
*decrease the derivative gain to reduce excess damping.*
The integral feedback and derivative feedback adjustments
tend to adjust in the same manner except opposite in sign. Maybe
one should be adjusted more than the other, ## Raising The DeadCan we substitute a more productive behavior than the "wandering" driven up and down by noise? Strangely enough, we can draw motivation from a very old source: PID tuning rules. Another technology article on this site treats the historical Z-N Tuning Rule [4] rather rudely. The underlying idea isn't bad, it is just that the assumptions under which the rule is valid usually lie so far from reality that it is hard to take the results seriously. However, we can observe that, in the end, the tuning rules select integral and derivative time constant parameters using formulas of the form T where T The value of the
A heuristic observation based on the tuning rules:
What is the best ratio? You will have to make that determination, depending on your system. It seems reasonable to start with something roughly in the middle of the range that works for Ziegler-Nichols-style tuning rules — 0.4 for example. If you are not satisfied with the results, try values of 0.2 and 0.6 and compare. ## Integration Into the Self-Tuning Controller To include the tuning ratio heuristic in the self-tuning PI
controller, start with the Without formal proof of convergence for this approach, testing has shown that it converges very much like the original P-I controller tuning. There appears to be no particular reason to use both command forms. If you don't want to use the derivative gain term, just set the gain ratio parameter value to zero. ## Test Case For a baseline case, the gain ratio parameter is set to 0 in
a simulation of a sluggish, noisy low order system under closed
loop control. This disables the derivative term, yielding the
same tuning result as the original P-I configuration. The self-tuning process is allowed to run to convergence. At this point,
its response to small online step disturbances is shown in
Now the tuning ratio parameter is set to the value 0.35,
enabling the derivative control action according to the tuning
heuristic. The experiment is repeated. After tuning, the
step disturbance responses are as shown in You can see that there are some subtle differences. - The extra damping allows a slightly higher integral gain, so the initial transient is a little faster.
- The final settling is just slightly faster. In the PI response, you can see some curvature about halfway through the pulse disturbance. In the PID response, the curvature is visible about 1/3 of the way.
- The tuned PID response has an initial overshoot, typical of tuning rules. You can use a different gain ratio to get more overshoot or less.
That the results are not dramatically different is no surprise. The differences are basically between using or not using derivative gain in PID loops. Sometimes the benefits are significant, sometimes not. ## ConclusionsThe self-tuning PID controls can be well suited for systems in which - PI or PID controls are suitable.
- PID controls are slightly better than PI controls when well tuned.
- the essential character of the system response remains about the same over time.
- system parameters change slowly over time so loop tuning adjustments are needed.
The implementation is an interesting example of the flexibility of a DAPL processing command for implementing a control strategy. A theoretically appealing feature doesn't want to work out? With the implementation available in the form of a maintainable DAPL processing command, you can fix the problem. You don't have to throw away everything and start over. Adaptive and self-tuning methods seem inherently risky. They
change — into what? Can you trust them to change in a
beneficial way? To give the ## Footnotes and References:
Return to the Control page. |