Quick Primer On Single Zone Closed Loop PID Control

Quick Primer On Closed Loop Control

 Definition

The definition of a closed loop system is where the controlled variable is measured and this measurement is used to manipulate a process variable..

 

Example

The easiest way to explain open loop control is to take a blank sheet of paper and put a dot in the middle of the page….now put your finger on the dot…easy right? This is an example of closed loop control where your eyes provide the feedback information you need to move your finger onto the dot.  The target is defined and there is a measurement process loop to control the processing action.

In this example a temperature sensor measures the temperature of the liquid flowing out and that temperature reading is compared to the desired temperature (known as the setpoint) and the controller will increase or decrease the steam valve opening accordingly, affecting the flow of steam.

The amount of opening, or closing, of the steam valve is determined by the algorithms used by the controller which have, hopefully, been properly tuned to how the process reacts. There are five types of mathematical models that are used to determine the system response and the ‘weight’ given to each model will determine the effectiveness of the controller response to the system.

These five models are simple On/Off, Proportional response, Proportional with Integral response (PI), Proportional with Derivative response (PD), and Proportional Integral Derivative (PID) response…

  1. On / Off. On-Off control has two states, fully off and fully on. To prevent rapid cycling, some hysteresis is added to the switching function. In operation, the controller output is on from start-up until temperature set value is achieved. After overshoot, the temperature then falls to the hysteresis limit and power is reapplied.

On-Off control can be used where:
a) The process is underpowered and the heater has very little storage capacity.
b) Where some temperature oscillation is permissible.
c) On electromechanical systems (compressors) where cycling must be minimized.

  1. Proportional.  Proportional controllers modulate power to the process by adjusting their output power within a proportional band. The proportional band is expressed as a percentage of the instrument span and is centered over the setpoint. At the lower proportional band edge and below, power output is 100%. As the temperature rises through the band, power is proportionately reduced so that at the upper band edge and above, power output is 0%.

Proportional controllers can have two adjustments:

  1. Manual Reset. Allows positioning the band with respect to the setpoint so that more or less power is applied at setpoint to eliminate the offset error inherent in proportional control.
  2. Bandwidth (Gain). Permits changing the modulating bandwidth to accommodate various process characteristics. High-gain, fast processes require a wide band for good control without oscillation. Low-gain, slow-moving processes can be managed well with narrow band to on-off control. The relationship between gain and bandwidth is expressed inversely:

         

Proportional-only controllers may be used where the process load is fairly constant and the setpoint is not frequently changed. Proportional control and controllers are not frequently used.

  1. Proportional with Integral (PI), automatic reset. Integral action moves the proportional band to increase or decrease power in response to temperature deviation from setpoint. The integrator slowly changes power output until zero deviation is achieved. Integral action cannot be faster than process response time or oscillation will occur. Proportional with Integral control is perhaps the most widely used type of control.
  1. Proportional with Derivative (PD), rate action. Derivative moves the proportional band to provide more or less output power in response to rapidly changing temperature. Its effect is to add lead during temperature change. It also reduces overshoot on start-up. Proportional with Derivative control and controllers are not frequently used but have found popularity for controlling servomotors.
  1. Proportional Integral Derivative (PID). This type of control is useful on difficult processes. Its Integral action eliminates offset error, while Derivative action rapidly changes output in response to load changes. Full PID control is surprisingly only used occasionally and, as stated, for ‘difficult’ processes.

Here’s a simplified block diagram of what the PID controller does:

The principle of operation in its most basic form is as follows:

The process value (PV) is subtracted from the setpoint (SP) to create the Error. The error is simply multiplied by one, two, or all the calculated P, I and D actions (depending which ones are turned on). Then the resulting “error  x  control actions” are added together and sent to the controller output.

 

 

Mathematical Model

PID control is named such after its three correcting terms, whose sum constitutes the manipulated variable (MV). The proportional, integral, and 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 :

where

K p  is the proportional gain, a tuning parameter,
K i  is the integral gain, a tuning parameter,
K d  is the derivative gain, a tuning parameter,
is the error (SP is the setpoint, and PV(t) is the process variable),
t  is the time or instantaneous time (the present),
is the variable of integration (takes on values from time 0 to present t ).

The steady state and dynamic behavior of a system can be determined by solving the differential equation representing the system. This may be a long and tedious task, especially when there are many elements in the system. One technique for solving such differential equations uses the Laplace transformation. Laplace transformations, as useful as they are, can only be used for linear differential equations; here the problem is stated in terms of a second variable which allows the problem to solved algebraically. So, by transformation back to the original independent variable, the solution to the original differential equation is obtained. Equivalently, the Laplace transfer function of the PID controller is:

Where  s  is the complex frequency.

Proportional term

The proportional term produces an output value that is proportional to the current error value. The proportional response can be adjusted by multiplying the error by a constant Kp, called the proportional gain constant.

The proportional term is given by

Response of PV to step change of SP vs time, for three values of Kp (Ki and Kd held constant)

A high proportional gain results in a large change in the output for a given change in the error. If the proportional gain is too high, the system can become unstable. In contrast, a small gain results in a small output response to a large input error, and a less responsive or less sensitive controller. If the proportional gain is too low, the control action may be too small when responding to system disturbances. Tuning theory and industrial practice indicate that the proportional term should contribute the bulk of the output change.

Steady-state error

The steady-state error is the difference between the desired final output and the actual one. Because a non-zero error is required to drive it, a proportional controller generally operates with a steady-state error. Steady-state error (SSE) is proportional to the process gain and inversely proportional to proportional gain. SSE may be mitigated by adding a compensating bias term to the setpoint AND output, or corrected dynamically by adding an integral term.

Integral term

The contribution from the integral term is proportional to both the magnitude of the error and the duration of the error. The integral in a PID controller is the sum of the instantaneous error over time and gives the accumulated offset that should have been corrected previously. The accumulated error is then multiplied by the integral gain (Ki) and added to the controller output.

The integral term is given by:

Response of PV to step change of SP vs time, for three values of Ki (Kp and Kd held constant)

The integral term accelerates the movement of the process towards setpoint and eliminates the residual steady-state error that occurs with a pure proportional controller. However, since the integral term responds to accumulated errors from the past, it can cause the present value to overshoot the setpoint value.

Derivative term

The derivative of the process error is calculated by determining the slope of the error over time and multiplying this rate of change by the derivative gain Kd. The magnitude of the contribution of the derivative term to the overall control action is termed the derivative gain, Kd.

The derivative term is given by

Response of PV to step change of SP vs time, for three values of Kd (Kp and Ki held constant)

Derivative action predicts system behavior and thus improves settling time and stability of the system. An ideal derivative is not causal, so that implementations of PID controllers include an additional low-pass filtering for the derivative term to limit the high-frequency gain and noise. Derivative action is seldom used in practice because of its variable impact on system stability in real-world applications.