AUTOMATIC Controllers and PID Controllers
AUTOMATIC Controllers and PID Controllers
An automatic controller compares the actual value of the plant output with the reference input
(desired value), determines the deviation, and produces a control signal that will reduce the deviation
to zero or to a small value.
The manner in which the automatic controller produces the control signal is called the control
action.
1
KI
G C (s ) K P KDs
s
The controller provides a proportional term, an integration term and a derivative term. The equation
for the output in the time domain is
d e (t)
u (t) K P
e (t) K I e (t) d t K D
dt
The three mode controller is also called a PID controller because it contains a proportional, an
integral and a derivative term. The transfer function of the derivative term is actually
KDs
G d (s)
ds1
but d is usually much smaller than the time constants of the process itself, so it may be neglected.
Setting K D
= 0, then we have the proportional plus integral (PI) controller.
KI
G c (s ) K P
s
When K I
= 0, we have
G c (s) K P
KDs
As described earlier, a Controller is provided to modify the error signal for better control actions.
2
Figure 2; Block diagram representing a PID parameters
It is the most commonly used in many industrial processes. The popularity of PID controllers can be
attributed partly to their good performance in a wide range of operating conditions and partly to their
functional simplicity, which allows engineers to operate them in a simple, straight forward manner.
A PID controller calculates an error value as the difference between a measured process variable and
a desired set point. The controller attempts to minimize the steady state error by adjusting the
process control inputs. The three parameters can be interpreted in terms of time i.e. the present error,
accumulation of past errors and prediction of future errors based on current rate of change.
As shown in Figure 1;
𝐊𝐈
A PID has a transfer function; Gc (s) = Kp + + KDs. …………………………………. (i)
𝒔
Where; GC (s) – Controller output.
KP – Proportional gain, tuning parameter.
KI - Integral gain, tuning parameter.
KD - Derivative parameter, tuning parameter.
s - Laplace operator.
To implement such a controller, three parameters must be determined for the given process:
Proportional gain KP, integral gain KI and derivative gain KD. By tuning the three parameters the
controller can provide control action designed for specific requirements. An application example is
as shown in figure 2 below.
3
Figure 3; Application of a PID controller on a plant (Load.)
The response of the controller can be described in terms of the responsiveness of the controller to an
error, the degree to which the controller overshoots the set point and the degree of system oscillation.
Set point is the reference value.
The equation for the output in the time domain is given by;
𝒅ɛ (𝒕)
u(t) = KP ɛ(t) + KI ɛ(𝒕)𝒅𝒕 + KD . ………………………………… (ii)
𝒅𝒕
Where;
u – Control signal.
Equation (ii), shows that the control signal is thus a sum of three terms, the P-term which is
proportional to the error; the I-term which is proportional to the integral of the error; D-term which
is proportional to the derivative of the error. The controller parameters are KP, KI, and KD as
described in equation (i).
𝐊
Gc (s) = Kp + 𝒔𝐈 ………………………………………………. (iii),
This is called Proportional plus Integral (PI) controller
4
2.2 HOW PID LOOP WORKS.
As discussed above, PID is an acronym for Proportion, Integral and Derivative. Considering a
control loop of error, ɛ, the sum of error under each of the terms is given as;
𝒅𝒆 (𝒕)
KD 𝒅𝒕 , for the derivative term.
Error can be positive or negative.
The three controller components create output based on measured error of the process being
regulated. If a control loop functions properly, any changes in error caused by set point changes or
process disturbances are quickly eliminated by the combination of the three factors P, I, and D.
The output of the proportional factor is the product of gain, KP and measured error, ɛ. Hence it
implies that a larger proportional gain or error means a greater output from the proportional factor.
Setting the proportional gain too high causes a controller to repeatedly overshoot the set point hence
oscillation.
The limitation is that when the error is too small, loop output becomes negligible thus even when the
proportional loop reaches steady state, there is still error. The larger the proportional gain the smaller
the steady state error. But the larger the proportional gain the more likely the loop is to become
unstable. This leads to an inevitable steady state error known as offset.
This is meant to eliminate steady state offset. Integral action guarantees that the process output
agrees with the reference in steady state.
The limitation is that it strongly contributes to controller output overshoot past the target set point.
The shorter the integral time the more aggressively the integral term works.
This is the least understood and used of the three factors. Most of the PIDs in use are of PI loops.
However, this does not mean that it is not used. The proportional corrects instances of error, the
integral corrects accumulation of error, and the derivative corrects present error versus error the last
time it was checked.
The derivative looks at the rate of change of error i.e. Δɛ. The more error changes or the longer the
derivative time, the larger the derivative factor becomes. It is meant to counter the effect of
overshoot caused by P and I factors.
When the error is large, the P and I will push the controller output. This controller response makes
error change quickly which in turn causes the derivative to counter the P and I. A well used
derivative allows for more aggressive proportional and integral factors.
5
2.3 FUNCTIONING OF CONTROLLERS:
The PID controller looks at the current value of an error, ɛ the integral of the error over a time
interval ɛ , and the rate of change of the error, Δɛ to determine how much of a correction to apply.
The controller continues to apply the correction until change is seen on the feedback. The PID
controller is meant to force the feedback match a set point.
Causes of errors:
Tuning refers to the adjustment of control parameters, (gain/proportional band, integral gain/reset,
derivative gain/rate) to optimum values for a target response. It is part of loop design, required if the
system oscillates too much, responds too slowly, has steady-state error, or is unstable. However, one
must check the hardware first as it could be the problem not the controller.
There are several methods of tuning a PID loop depending on whether the loop can be taken offline
for tuning and the system response speed.
a) Subjecting the system to a step change in input, measuring output as a function of time and
using this response to determine control parameters.
b) The Ziegler-Nichols method; this involves setting I and D gains to Zero and then increasing
P gain until the loop output starts to oscillate.
c) Use of optimization software. This can be done even offline. The software packages gather
data, develop process models, suggest optimal tuning, and even develop tuning.
d) Tuning by feel. This is an online method which is erratic, not repeatable and can be
inefficient.
e) Cohen-Coon method, an offline method modified from the Ziegler-Nicholas approach. It
involves some math and good for first order process. Under manual mode, wait until the
process is at a steady state before introducing a step change in the input. From the
measurements based on the step test, evaluate the process parameters.
We will discuss extensively on tuning, design using Matlab and domain description.
Frequently, the performance characteristics of a control system are specified in terms of the transient
response to a unit-step input, since it is easy to generate and is sufficiently drastic. (If the response to
a step input is known, it is mathematically possible to compute the response to any input.)
The transient response of a system to a unit-step input depends on the initial conditions. For
convenience in comparing transient responses of various systems, it is a common practice to use the
standard initial condition that the system is at rest initially with the output and all time derivatives
thereof zero. Then the response characteristics of many systems can be easily compared.
The transient response of a practical control system often exhibits damped oscillations before
reaching steady state. In specifying the transient-response characteristics of a control system to a
unit-step input, it is common to specify the following:
Delay time, td
Rise time, tr
Peak time, tp
Maximum overshoot, Mp
Settling time, ts
7
Figure 4: Domain performance specifications.
Rise time (tr)- The time taken for response to raise from 0% to 100% for the very first time is rise
time.
Delay time (td) - The time taken for response to reach (half the final value) 50% of final value for
the very first time is delay time.
Peak time (tp) - The time taken for the response to reach the peak value for the first time is peak
time. (or the time required for the response to reach the first peak of the overshoot.)
Maximum Overshoot - Peak overshoot is defined as the ratio of maximum peak value measured
from the maximum value to final value.
Settling time (ts) - Settling time is defined as the time taken by the response to reach and stay within
specified error. Usually 2 - 5%.
Transient response - The transient response is the response of the system when the system changes
from one state to another.
Steady state - The steady state response is the response of the system when it approaches infinity.
Steady state error - The steady state error is defined as the value of error as time tends to infinity.
The time-domain specifications just given are quite important, since most control systems are time-
domain systems; i.e. they must exhibit acceptable time responses. (This means that, the control
system must be modified until the transient response is satisfactory.)