PID Control
PID Control
Contents
[hide] [hide]
1 Control loop basics
2 PID controller theory
o 2.1 Proportional term
o 2.2 Integral term
o 2.3 Derivative term
o 2.4 Summary
3 Loop tuning
o 3.1 Ziegler-Nichols method
o 3.2 PID tuning software
4 Modifications to the PID algorithm
5 Limitations of PID control
6 Physical implementation of PID control
7 Alternative Nomenclature and PID forms
o 7.1 Pseudocode
o 7.2 Ideal vs Standard PID form
o 7.3 Series / interacting form
8 See also
9 External links
o 9.1 PID tutorials
o 9.2 Simulations
o 9.3 Special topics and PID control applications
10 References
from the process history, but PID controllers do not have the ability to learn and must be set
up correctly. Selecting the correct gains for effective control is known as tuning the
controller.
If a controller starts from a stable state at zero error (PV = SP), then further changes by the
controller will be in response to changes in other measured or unmeasured inputs to the
process that impact on the process, and hence on the PV. Variables that impact on the process
other than the MV are known as disturbances and generally controllers are used to reject
disturbances and/or implement setpoint changes. Changes in feed water temperature constitute
a disturbance to the shower process.
In theory, a controller can be used to control any process which has a measurable output (PV),
a known ideal value for that output (SP) and an input to the process (MV) that will affect the
relevant PV. Controllers are used in industry to regulate temperature, pressure, flow rate,
chemical composition, level in a tank containing fluid, speed and practically every other
variable for which a measurement exists. Automobile cruise control is an example of a
process which utilizes automated control.
Due to their long history, simplicity, well grounded theory and simple setup and maintenance
requirements, PID controllers are the controllers of choice for many of these applications.
where Pout, Iout, and Dout are the contributions to the output from the PID controller from each
of the three terms, as defined below.
Where
The integral term (when added to the proportional term) accelerates the movement of the
process towards setpoint and eliminates the residual steady-state error that occurs with a
proportional only controller. However, since the integral term is responding to accumulated
errors from the past, it can cause the present value to overshoot the setpoint value (cross over
the setpoint and then create a deviation in the other direction). For further notes regarding
integral gain tuning and controller stability, see the section on Loop Tuning.
The derivative term slows the rate of change of the controller output and this effect is most
noticeable close to the controller setpoint. Hence, derivative control is used to reduce the
magnitude of the overshoot produced by the integral component and improve the combined
controller-process stability. However, differentiation of a signal amplifies noise in the signal
and thus this term in the controller is highly sensitive to noise in the error term, and can cause
a process to become unstable if the noise and the derivative gain are sufficiently large.
[edit] Summary
The output from the three terms, the proportional, the integral and the derivative terms are
summed to calculate the output of the PID controller. Defining u(t) as the controller output,
the final form of the PID algorithm is:
Method
ZieglerNichols
Tune By
Feel
Software
Tools
CohenCoon
Disadvantages
Process upset, some trial-anderror, very aggressive tuning
If the system must remain online, one tuning method is to first set the I and D values to zero.
Increase the P until the output of the loop oscillates, then the P should be left set to be
approximately half of that value for a "quarter amplitude decay" type response. Then increase
I until any offset is correct in sufficient time for the process. However, too much I will cause
instability. Finally, increase D, if required, until the loop is acceptably quick to reach its
reference after a load disturbance. However, too much D will cause excessive response and
overshoot. A fast PID loop tuning usually overshoots slightly to reach the setpoint more
quickly; however, some systems cannot accept overshoot, in which case an "over damped"
tune is required, which will require a P setting significantly less than half that of the P setting
causing oscillation.
Effects of increasing parameters
Initializing the controller integral to a desired value, commonly the process present
value for startup problems
Disabling the integral function until the PV has entered the controllable region
Limiting the time period over which the integral error is calculated
Preventing the integral term from accumulating above or below pre-determined
bounds
Many PID loops control a mechanical device (for example, a valve). Mechanical maintenance
can be a major cost and wear leads to control degradation in the form of either stiction or a
deadband in the mechanical response to an input signal. The rate of mechanical wear is
mainly a function of how often a device is activated to make a change. Where wear is a
significant concern, the PID loop may have an output deadband to reduce the frequency of
activation of the output (valve). This is accomplished by modifying the controller to hold its
output steady if the change would be small (within the defined deadband range). The
calculated output must leave the deadband before the actual output will change.
The proportional and differential terms can produce excessive movement in the output when a
system is subjected to an instantaneous "step" increase in the error, such as a large setpoint
change. In the case of the derivative term, this is due to taking the derivative of the error,
which is very large in the case of an instantaneous step change. As a result, some PID
algorithms incorporate the following modifications:
derivative of output In this case the PID controller measures the differential of the
output quantity, rather than the derivative of the error. The output is always continuous
(i.e., never has a step change). For this to be effective, the derivative of the output
must have the same sign as the derivative of the error.
setpoint ramping In this modification, the setpoint is gradually moved from its old
value to a newly specified value using a linear or first order differential ramp function.
This avoids the discontinuity present in a simple step change.
setpoint weighting Setpoint weighting uses different multipliers for the error
depending on which element of the controller it is used in. The error in the integral
term must be the true control error to avoid steady-state control errors. This affects the
controller's setpoint response. These parameters do not affect the response to load
disturbances and measurement noise.
mover regardless of the feedback value. The PID loop in this situation uses the feedback
information to effect any increase or decrease of the combined output in order to reduce the
remaining difference between the process setpoint and the feedback value. Working together,
the combined Feed-Forward open loop controller and closed loop PID controller can provide
more responsive, stable and reliable control systems.
Another problem faced with PID controllers is that they are linear. Thus, performance of PID
controllers in non-linear systems (such as HVAC systems) is variable. Often PID controllers
are enhanced through methods such as gain scheduling or fuzzy logic. Further practical
application issues can arise from instrumentation connected to the controller. A high enough
sampling rate and measurement precision and measurement accuracy (more relevant to FF
and MPC).
A problem with the differential term is that small amounts of measurement or process noise
can cause large amounts of change in the output. Sometimes it is helpful to filter the
measurements, with a running average, also known as a low-pass filter. However, low-pass
filtering and derivative control cancel each other out, so reducing noise by instrumentation
means is a much better choice. Alternatively, the differential band can be turned off in most
systems with little loss of control. This is equivalent to using the PID controller as a PI
controller.
output = P + I + D
wait(dt)
goto start
Where
Ti is the Integral Time
Td is the Derivative Time
In the ideal parallel form, shown in the Controller Theory section
the gain parameters are related to the parameters of the standard form through
and
Kd = KpTd. This parallel form, where the parameters are treated as simple gains, is the most
general and flexible form. However, it is also the form where the parameters have the least
physical interpretation and is generally reserved for theoretical treatment of the PID
controller. The "standard" form, despite being slightly more complex mathematically, is more
common in industry.