of a PID controller in a feedback loop.
r(
t) is the
setpoint (SP), and
y(
t) is the measured
process variable (PV). The most distinguishing feature of the PID controller is the ability to use the three
control terms of proportional, integral and derivative influence on the controller output to apply accurate and optimal control. The block diagram on the right shows the principles of how these terms are generated and applied. It shows a PID controller, which continuously calculates an
error value e(t) as the difference between a desired
setpoint \text{SP} = r(t) and a measured
process variable \text{PV} = y(t): e(t) = r(t) - y(t), and applies a correction based on
proportional,
integral, and
derivative terms. The controller attempts to minimize the error over time by adjustment of a
control variable u(t), such as the opening of a
control valve, to a new value determined by a
weighted sum of the control terms. The PID controller directly generates a continuous control signal based on error, without discrete modulation. In this model: • Term
P is proportional to the current value of the SP−PV error e(t). For example, if the error is large, the control output will be proportionately large by using the gain factor "Kp". Using proportional control alone will result in an error between the set point and the process value because the controller requires an error to generate the proportional output response. In steady state process conditions an equilibrium is reached, with a steady SP−PV "offset". • Term
I accounts for past values of the SP−PV error and integrates them over time to produce the
I term. For example, if there is a residual SP−PV error after the application of proportional control, the integral term seeks to eliminate the residual error by adding a control effect due to the historic cumulative value of the error. When the error is eliminated, the integral term will cease to grow. This will result in the proportional effect diminishing as the error decreases, but this is compensated for by the growing integral effect. • Term
D is a best estimate of the future trend of the SP−PV error, based on its current rate of change. It is sometimes called "anticipatory control", as it is effectively seeking to reduce the effect of the SP−PV error by exerting a control influence generated by the rate of error change. The more rapid the change, the greater the controlling or damping effect.
Tuning – The balance of these effects is achieved by
loop tuning to produce the optimal control function. The tuning constants are shown below as "K" and must be derived for each control application, as they depend on the response characteristics of the
physical system, external to the controller. These are dependent on the behavior of the measuring sensor, the final control element (such as a control valve), any control signal delays, and the process itself. Approximate values of constants can usually be initially entered knowing the type of application, but they are normally refined, or tuned, by introducing a setpoint change and observing the system response.
Control action – The mathematical model and practical loop above both use a
direct control action for all the terms, which means an increasing positive error results in an increasing positive control output correction. This is because the "error" term is not the deviation from the setpoint (actual–desired) but is in fact the correction needed (desired–actual). The system is called
reverse acting if it is necessary to apply negative corrective action. For instance, if the valve in the flow loop was 100–0% valve opening for 0–100% control output, meaning that the controller action has to be reversed. Some process control schemes and final control elements require this reverse action. An example would be a valve for cooling water, where the
fail-safe mode, in the case of signal loss, would be 100% opening of the valve; therefore 0% controller output needs to cause 100% valve opening.
Control function The overall control function is :u(t) = K_\text{p} e(t) + K_\text{i} \int_0^t e(\tau) \,\mathrm{d}\tau + K_\text{d} \frac{\mathrm{d}e(t)}{\mathrm{d}t}, where K_\text{p}, K_\text{i}, and K_\text{d}, all non-negative, denote the coefficients for the proportional, integral, and derivative terms respectively (sometimes denoted
P,
I, and
D).
Standard form In the
standard form of the equation (see later in article), K_\text{i} and K_\text{d} are respectively replaced by K_\text{p}/T_\text{i} and K_\text{p} T_\text{d}; the advantage of this being that T_\text{i} and T_\text{d} have some understandable physical meaning, as they represent an integration time and a derivative time respectively. K_\text{p} T_\text{d} is the time constant with which the controller will attempt to approach the set point. K_\text{p}/T_\text{i} determines how long the controller will tolerate the output being consistently above or below the set point. :u(t) = K_\text{p}\left(e(t) + \frac{1}{T_\text{i}} \int_0^t e(\tau) \,\mathrm{d}\tau + T_\text{d} \frac{\mathrm{d}e(t)}{\mathrm{d}t}\right) where : T_\text{i} = { K_\text{p} \over K_\text{i} } is the integration time constant, and : T_\text{d} = { K_\text{d} \over K_\text{p} } is the derivative time constant.
Selective use of control terms Although a PID controller has three control terms, some applications need only one or two terms to provide appropriate control. This is achieved by setting the unused parameters to zero and is called a PI, PD, P, or I controller in the absence of the other control actions. PI controllers are fairly common in applications where derivative action would be sensitive to measurement noise, but the integral term is often needed for the system to reach its target value.
Applicability The use of the PID algorithm does not guarantee
optimal control of the system or its
control stability . Situations may occur where there are excessive delays: the measurement of the process value is delayed, or the control action does not apply quickly enough. In these cases,
lead–lag compensation is required to be effective. The response of the controller can be described in terms of its responsiveness to an error, the degree to which the system
overshoots a setpoint, and the degree of any system
oscillation. But the PID controller is broadly applicable since it relies only on the response of the measured process variable, not on knowledge or a model of the underlying process. ==History==