A proportional-integral-derivative controller (PID controller) is a common feedback loop component in industrial control systems (see also control theory).
The controller compares a measured value from a process (typically an industrial process) with a reference setpoint value. The difference (or "error" signal) is then used to calculate a new value for a manipulatable input to the process that brings the process' measured value back to its desired setpoint. Unlike simpler control algorithms, the PID controller can adjust process outputs based on the history and rate of change of the error signal, which gives more accurate and stable control. (It can be shown mathematically that a PID loop will produce accurate, stable control in cases where a simple proportional control would either have a steady-state error or would cause the process to oscillate). PID controllers do not require advanced mathematics to design and can be easily adjusted (or "tuned") to the desired application, unlike more complicated control algorithms based on optimal control theory.
A control loop consists of three parts:
As the controller reads a sensor, it subtracts this measurement from the "setpoint" to determine the "error". It then uses the error to calculate a correction to the process's output variable (the "action") so that this correction will remove the error from the process's input measurement.
In a PID loop, correction is calculated from the error in three ways: cancel out the current error directly (Proportional), the amount of time the error has continued uncorrected (Integral), and anticipate the future error from the rate of change of the error over time (Derivative).
For example: suppose a water tank is used to supply water for use in several parts of a plant, and it is necessary to control the water level at a constant. A sensor would measure the height of water in the tank, producing the "measurement", and continuously feed this data to the controller. The controller would have a "setpoint" of (for example) 75% full. The controller would have its output (the "action") connected to a proportionally-controlled characterized control valve controlling the make-up water feed. Opening the valve would increase the rate of water entering the tank, closing the valve would decrease it. The controller would use the measurement of how the level is changing over time to calculate how to manipulate the control valve to maintain a constant level at the "setpoint".
A PID controller can be used to control any measurable variable which can be affected by manipulating some other process variable. For example, it can be used to control temperature, pressure, flow rate, chemical composition, speed, or other variables. Automobile cruise control is an example of an application area outside of the process industries which utilizes crude PID control.
Some control systems arrange PID controllers in cascades or networks. That is, a "master" control produces signals used by "slave" controllers. One common situation is motor controls: one often wants the motor to have a controlled speed, with the "slave" controller (often built into a variable frequency drive) directly managing the speed based on a proportional input. This "slave" input is fed by the "master" controllers' output, which is controlling based upon a related variable.
Coupled and cascaded controls are common in chemical process control, HVAC and other systems where many parts cooperate.
Differing terms are used in the process control industry: The "process variable" is also called the "process's input" or "controller's output." The process's output is also called the "measurement" or "controller's input."
This "up a bit, down a bit" movement of the process's input variable is how the PID loop automatically finds the correct level of input for the process. Removing the error "turns the control knob," adjusting the process's input to keep the process's measured output at the setpoint.
The error is found by subtracting the measured quantity from the setpoint.
"PID" is named after its three correcting calculations, which all add to and adjust the controlled quantity. These additions are actually "subtractions" of error, because the proportions are usually negative:
More technically, a PID loop can be characterized as a filter applied to a complex frequency-domain system. This is useful in order to calculate whether it will actually reach a stable value. If the values are chosen incorrectly, the controlled process input can oscillate, and the process output may never stay at the setpoint.
PID controller is called PI, PD, or P controller in absence of respective control actions. It may be noted that EWMA (Exponential Weighted Moving Average) controller is equivalent to PI controller.
The generic transfer function for a PID controller of the interacting form is
with C being a constant which depends on the bandwidth of the controlled system.
Traditionally
where , , and are the feedback contributions from the PID controller, defined below:
Where , , are contants that are used to tune the PID control loop:
Normally it is implemented with the gain applied to the , and terms as well in the following form;
Most standard tuning methods, such as Ziegler-Nichols and others, are based on this form, as it reduces interaction. In this form, the and gains relate only to dynamics of the process, and the (proportional gain) relates to the gain of the process.
Often, one deals with discrete time intervals instead of the continuity. Thus, the PID controller may also be dealt with recursively:
Here, the first term is integral, the second proportional, and the third derivative. Note that in this form, must be identically 1, otherwise the controller will not even come close to converging to the setpoint. This isn't quite the same integral as in the continuous form, but it's analogous.
In practice, most PID controllers employ 3 slightly different constants which correspond to these proportional, integral, and derivative gain.
There are several different forms of the PID controller. The terms "interacting" and "non-interacting" are used many ways and can lead to confusion.
Note that the most common form of PID controller effectively has the P part in series, with its output feeding the I and D parts in parallel. This mixture of the two forms contributes to the confusion surrounding this terminology.
Gain and proportional band are related but inverse quantities. A controller setting of 100% proportional band means that a 100% change of the error signal (setpoint – process variable) will result in 100% change of the output, which is a gain of 1.0. A 20% proportional band indicates that 20% change in error gives a 100% output change, which is a gain of 5.
The reset and rate values are scaled based on the proportional band of the interacting control algorithm. Reset is measured in minutes to correct the output by the proportional band. Rate is measured in proportional band/minute.
There are several methods for tuning a PID loop. The choice of method will depend largely on whether or not the loop can be taken "offline" for tuning, and the response speed of the system. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring the output as a function of time, and using this response to determine the control parameters.
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 increase I until oscillation stops. Finally, increase D until the loop is acceptably quick to reach its reference. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly; however, some systems cannot accept overshoot.
| Effects of increasing parameters | ||||
| Parameter | Rise Time | Overshoot | Settling Time | S.S. Error |
| P | Decrease | Increase | Small Change | Decrease |
| I | Decrease | Increase | Increase | Eliminate |
| D | Small Change | Decrease | Decrease | Small Change |
Another tuning method is formally known as the "Ziegler-Nichols method", introduced by John G. Ziegler and Nathaniel B. Nichols. It starts in the same way as the method described before: first set the I and D gains to zero and then increase the P gain until the output of the loop starts to oscillate. Write down the critical gain (Kc) and the oscillation period of the output (Pc). Then adjust the P, I and D controls as the table shows:
| Ziegler-Nichols method | ||||
| Control | P | Tr | Td | |
| P | 0.5·Kc | - | - | |
| PI | 0.45·Kc | 1.2 / Pc | - | |
| PID | 0.6·Kc | 2 / Pc | Pc / 8 | |
Most modern industrial facilities no longer tune loops using the manual calculation methods shown above. Instead, PID tuning and loop optimization software are used to ensure consistent results. These software packages will gather the data, develop process models, and suggest optimal tuning. Some software packages can even develop tuning by gathering data from reference changes.
Mathematical PID loop tuning induces an impulse in the system, and then uses the controlled system's frequency response to design the PID loop values. In loops with response times of several minutes, mathematical loop tuning is recommended, because trial and error can literally take days just to find a stable set of loop values. Optimal values are harder to find, and yet can save a company huge amounts of money. Commercial software is available from several sources, and can easily pay for itself if a PID loop runs a large, or expensive process. Some digital loop controllers offer a self-tuning feature in which very small setpoint changes are sent to the process, allowing the controller itself to calculate optimal tuning values.
Other formulas are available to tune the loop accordingly to different performance criterion.
The following table provides some initial estimates for loop tuning different loop types:
| Loop Tuning Initial Estimates | |||
| Loop Type | Proportional | Integral | Derivative |
| - | K | TI | TD |
| - | - | sec | sec |
| Flows | 0.30 | 6 | - |
| Levels | 0.50 | 600 | - |
| Pressures (fast) | 2.00 | 30 | - |
| Pressures (slow) | 1.00 | 120 | 7.5 |
| Temperatures (fast) | 1.00 | 120 | - |
| Temperatures (slow) | 1.00 | 900 | 15 |
| Analysers | 1.00 | 120 | - |
One common problem is "integral windup". It might take too long for the output value to ramp up to the necessary value when the loop first starts up. Sometimes this can be fixed with a more aggressive differential term. Sometimes the loop has to be "preloaded" with a starting output. Another option is to disable the integral function until the measured variable has entered the proportional band.
Some PID loops control a valve or similar mechanical device. Wear of the valve or device can be a major maintenance cost. In these cases, the PID loop may have a "deadband" to reduce the frequency of activation of the mechanical device. This is accomplished by designing 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. Then, a new deadband will be established around the new output value.
Another problem with the differential term is that small amounts of noise can cause large amounts of change in the output. Sometimes it is helpful to filter the measurements, with a running average, or 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.
The proportional and differential terms can also produce undesirable results in systems subjected to instantaneous "step" inputs (such as when a computer changes the setpoint). To avoid this, some PID algorithms incorporate various schemes:
Digital implementations of a PID algorithm may have limitations owing to the sampling rate of the data, and the limits of internal calculation and precision. For example, very old programmable logic controller (PLC) systems may have used only 12 or 16 bits to represent internal variables. Additionally, some software implementations do not correctly handle internal overflow or extreme values, or may arbitrarily limit the values for the adjustable gain parameters.
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 scheduling or fuzzy logic.
Software PID loops are the most stable, because they do not wear out, and their expense has been decreasing. PID controller functionality is a common feature of PLCs used by many factories.
A PID controller can also be purchased for industrial uses as a panel-mounted controller. These often control only one or two loops and are still used for small stand-alone systems where a PLC or computer control is unnecessary.
In the early history of automatic process control the PID controller was implemented as a mechanical device, often energized by compressed air. Mechanical systems (once the cheapest) can use a lever, spring and a mass. Pneumatic controllers were once common, but have been largely replaced by digital electronic controllers.
Electronic analog controllers are now very cheap, and can be made from a solid-state or tube amplifier, a capacitor and a resistance. Electronic analog PID control loops were often found within more complex electronic systems, for example, the head positioning of a disk drive, the power conditioning of a power supply, or even the movement-detection circuit of a modern seismometer. Nowadays, they are replaced with digital controllers implemented in microcontrollers or FPGA.
Regler | Proporcional integral derivativo (PID) | PID regelaar | PID制御 | Regulator PID | PID-säädin | PID控制器
This article is licensed under the GNU Free Documentation License.
It uses material from the
"PID controller".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world