Powerline user guide – High Country Tek PLD, Powerline / universal single / dual coil PWM Valve Driver User Manual

Page 37

Advertising
background image

Part No:-

021-00155 RevD7

PowerLine System Controller User Guide

Page | 37

PowerLine User Guide





PID - The Basic Technique for Feedback Control:

The Proportional-Integral-Derivative or “PID” controller looks at the present value of the error, the integral of the
error over a recent time interval, and the derivative of the error signal to calculate how much of a correction to
apply. These calculations are done once every “I Time”, but are fast enough to appear to be continuous to the
system. These three quantities are each multiplied by tuning constants and added together to produce the
controller output.

Error = target-feedback
Pterm = (P * error / 2^Process_P_Scale_Factor)
Iterm = (I * sum_of_error / 2^ Process_I_scale_factor)
Output = Pterm + Iterm

Note: The derivative or D term is not implemented at this time.

Tuning a PID Controller
How to best tune a PID controller depends upon how the process responds to the controller’s corrective efforts.

Consider a sluggish system that tends to respond slowly. If an error is introduced abruptly (as when the set point
is changed) the controller’s initial reaction will be determined primarily by the proportional term. After a while, the
integral term will also begin to contribute to the controller’s output as the error accumulates over time. In fact,
the integral term will eventually come to dominate the output signal, since the error decreases so slowly in a
slow-moving process.
The controller’s output will lead the process. This means that the controller will continue to command ever-
higher outputs while the process slowly tries to follow. Overshoot of the system can occur if the controller is set
up to be much faster than the system. When the system reaches the desired value, it is responding to the
accumulation of commands over the recent past and its own delay. It can be assumed that the system is
responding to commands issued one “Update delay” ago. Simply freezing the controller’s output when the
system hits the commanded value will cause overshoot as the system catches up to the value that is now
commanded, and goes past the set point. The process variable then overshoots the set point, causing an error
in the opposite direction.
This results in an oscillation of positive and negative error. The PID constants determine the extent (if any) of
this oscillation and how soon it dies out. The smaller the “P” and “I” terms, and the longer the I time, the slower
the controller will respond and the less over shoot and oscillation will occur. “Critical damping” can be achieved
with the process brought smoothly up to the set point with no overshoot at all. The tradeoff of achieving critical
damping is a much slower system response to changes of load or set point. In the opposite extreme, it is
possible to tune the system for continuous and violent oscillation. The user must tradeoff system speed of
response, against the amplitude and decay time of the oscillation.

Now suppose the process responds quickly to the controller’s corrective efforts. The integral term in the
equation will not play as dominant a role in the controller’s response to changes, since the errors will be so
short-lived.

Advertising