Controller (Notes)
Controller (Notes)
Controller (Notes)
(s) = Y (s)K
m
) of the process
and converts its values into the signal, often into an electrical, pneumatic or hydraulic signals
which are comparable with the desired output
Y (s) signal. It is only then, that the error signal
E(s) (=
Y (s) Y
(s)) is created, on which the control strategy D(s) is applied. Also, the
output signal U
(s) of the control strategy D(s) is very often incompatible with the input or
manipulated variable U(s) of the process. Actuators are used to provide this compatibility.
Consequently, the sensors are devices that convert physical quantities of the output variable
into a usable signal proportional to it. On the other side, actuators are devices that convert a
signal into the physical quantities of the input variable into the process or plant.
Figure 6.5: Practical realisation of an automatic controller
Lets take a car cruising controller the task of which is to keep the speed of the car
constant and stable whatever the conditions. The desired output
Y (s) is usually an electric
signal proportional to the required speed of the car. The actual speed of the car is measured
by a sensor called tachometer that converts the angular speed of the wheels, hence the linear
speed of the car, into an electric signal Y
s +
1+K
c
(6.3)
It is evident from equation (6.3) that the overall amplication of the system is K
c
, but also the
pole of the system is shifted from original position s
1
= 1/ to new position s
1
= (1+K
c
)/.
As a consequence, if K
c
> 0, the pole is placed further from the imaginary j axis in s-plane,
hence reducing the time constant of the system, and improving the overall response (faster
system). For K
c
< 0, the response is slower as the pole is closer to the imaginary j axis and
the system may even become unstable for K
c
< 1 as the pole would be in the right-hand side
of the s-plane.
Figure 6.7 shows the time domain impulse response of the rst order system H(s) =
1
s+1
without the controller (K
c
= 0) and the system with proportional controller and gain K
c
= 4.
102CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
Figure 6.6: Proportional controller with the rst-order system
Figure 6.7: Response of the rst order system for two dierent gains Kc of the proportional
controller
The response of the closed-loop system with proportional controller to the unity step
input function ( y(t) = 1
Y (s) = 1/s), can be obtained in the following way. Applying the
partial-fraction expansion to the equation (6.3) we get:
Y (s) =
Y (s)
D(s)H(s)
1 +D(s)H(s)
=
K
c
s
_
s +
K
c
+1
_ =
K
1
s
+
K
2
s +
K
c
+1
(6.4)
Using the partial-fraction expansion it is not dicult to obtain the coecients as K
1
=
K
c
K
c
+1
and K
1
=
K
c
K
c
+1
, hence the equation (6.4) becomes:
Y (s) =
K
c
K
c
+1
s
K
c
K
c
+1
s +
K
c
+1
(6.5)
So, the time-domain response is from the Laplace transform table:
y(t) =
K
c
K
c
+ 1
_
1 e
t(K
c
+1)
_
(6.6)
6.2. AUTOMATIC CONTROLLERS 103
For t , the system output with proportional controller will never reach the expected output
y(t) = 1. Instead, it will reach the level that follows from equation (6.6) and which is:
y() =
K
c
K
c
+ 1
(6.7)
hence the steady state error is
e(t) = y(t) y(t)|
t
=
K
c
K
c
+ 1
(6.8)
So, the proportional controller introduces a steady state error which is proportional to the gain
K
c
. For K
c
= 1, the steady-state error is as high as 50%, as shown in Figure 6.8, and it decreases
as K
c
increases: higher the proportional controller gain K
c
, lover the steady-state error. This is
the main disadvantage of introducing a proportional controller.
Figure 6.8: Steady-state error with the proportional controller
Similarly, for the proportional controller applied to a second-order system (Figure 6.9),
the overall transfer function is
G(s) =
D(s)H(s)
1 +D(s)H(s)
=
K
c
2
n
s
2
+ 2
n
s +
2
n
(K
c
+ 1)
(6.9)
Figure 6.9: The second-order system with proportional controller
Eectively, the proportional controller changes the natural frequency of the second-order
system from
n
to
n
=
n
K
c
+ 1, while maintaining the same damping ratio. Consequently,
104CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
the increase in K
c
, improves the response (faster system) and, similarly to the rst-order system,
reduces the steady state error as long as K
c
> 0.
6.2.4 Proportional-Integral Controller
The integral controller (Figure 6.10) produces the output signal u(t) (pressure in the case of
pneumatic controller, current or voltage in the case of electronic controller) that is proportional
to the integral of the error e(t) (= y(t) y(t)) as
u(t) =
K
c
T
i
_
e(t)dt D(s) =
U(s)
E(s)
=
K
c
T
i
s
(6.10)
where u(t) is the output of the controller (input to the process or plant), K
c
is the gain or
sensitivity, e(t) is the error signal, T
i
is the integral time, and 1/T
i
is a measure of the speed
of response and is referred to as the reset time. The primary virtue of this controller is that it
Figure 6.10: The integral-proportional controller
can provide a nite value of control signal u(t) with no error signal e(t). This is because, as an
integrator, this controller does not take into account only the current value of the error e(t), but
also the past history of the e(t) values. To support this theory, lets look into the response of
this controller u(t) to the step function of error signal e(t). For e(t) =
_
1 t0
0 t<0
, in the s-domain
it becomes E(s) =
1
s
, then from equation (6.8) the controller output signal is
U(s) = E(s)
K
c
T
i
s
=
K
c
T
i
s
2
(6.11)
and concomitant time response is
u(t) =
K
c
T
i
t (6.12)
So, even if the error signal e(t) seizes to exist (e(t) = 0), the output of the controller u(t) will
not be zero but the value achieved in previous time which depends on the previous history of
values. Consequently, this controller tends to remove a steady state error e(t) by forcing the
process to rectify it.
Example 6.1 Lets take the rst-order process as shown in Figure 6.11. The overall transfer
function is easily found to be
G(s) =
D(s)H(s)
1 +D(s)H(s)
=
K
c
T
i
s
2
+
1
s +
K
c
Y
i
(6.13)
6.2. AUTOMATIC CONTROLLERS 105
which, according to the equation of general format for a second order transfer function
(Chapter 4) gives the damping ratio =
1
2
T
i
K
c
and natural frequency
n
=
_
K
c
T
i
. Also,
overall transfer function (6.13) is the second-order transfer function with the time response
to unity step input function given as
g(t) = 1
1
_
1
2
e
n
t
sin
_
t
n
_
1
2
arctg
_
_
1
2
__
(6.14)
If the time approaches innity (t ), the steady state error in the system response is zero
since e() = y() y() = 0. Note that the steady state error for the rst order system
with proportional controller and unity step input function, according to the equation (6.8),
was 50%. So, the introduction of the integral controller removes the steady state error and
this is the main usage of the proportional-integral controller.
Figure 6.11: Proportional-Integral controller in action
Figure 6.12 shows the response of the rst-order system (H(s) =
1
s+1
) with the proportional-
integral controller (D(s) =
8
2s
) to the unity step input function (blue curve) in comparison
with the response of the rst-order system without controller (red curve). It is apparent
that the introduction of the integral controller changes the response similar to that of the
second-order system, but more importantly removes the steady state error (e() = 0).
6.2.5 Proportional-Derivative Controller
Derivative controller has the time domain form
u(t) = T
D
de(t)
dt
(6.15)
Therefore, the s-domain transfer function of this controller becomes
D(s) =
U(s)
E(s)
= T
D
s (6.16)
where T
D
is called derivative time.
The derivative controller is always used in conjunction with proportional and/or integral
controller to increase the damping and generally improves the stability of the system. In practice,
pure derivative controller is not practical to implement for the reason that if the error e(t)
remains constant, the output of the derivative controller u(t) would be zero (derivative of a
constant function is zero), so the control action would not take place. Proportional or integral
106CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
Figure 6.12: Response of the rst-order system with the proportional-integral controller and
unity step input function
term is therefore needed to provide a control signal at this time. Consequently, the practical
proportional-derivative controller has the form
D(s) = K
c
+K
c
T
D
s = K
c
(1 +T
D
s) (6.17)
where K
c
is the proportional gain. With the derivative controller the corrections depend on
the rate of change of the error signal e(t). As a result, the derivative controller performs an
anticipatory response.
Example 6.2 Lets take the example of an electrical circuitry as given in Figure 6.13 with
the capacitor voltage being the output variable (y(t) = u
C
(t)) and source voltage being the
input variable (u(t)). The transfer function has the form
U
C
(s)
U(s)
=
1
CL
s
2
+
R
L
s +
1
CL
(6.18)
which for C = 100 [F], L = 1000 [H] and R = 6 [k] gives the transfer function of the form
U
C
(s)
U(s)
=
10
s
2
+ 6s + 10
(6.19)
with natural frequency
n
=
10 = 3.16 [
rad
s
], the damping ratio =
6
2
10
= 0.95, and
pole location s
1,2
= 3 j, as shown in Figure 6.15. Applying the proportional-derivative
controller with this plant, as shown in Figure 6.14, the overall transfer function is obtained
as
G(s) =
Y (s)
Y (s)
=
D(s)H(s)
1 +D(s)H(s)
=
10K
c
(1 +T
D
s)
s
2
+s (6 + 10K
c
T
D
) + 10 (1 +K
c
)
(6.20)
which for K
c
= T
D
= 1 becomes
G(s) =
10 (s + 1)
s
2
+ 16s + 20
(6.21)
6.2. AUTOMATIC CONTROLLERS 107
Figure 6.13: An electronic circuit
with two real poles s
1,2
= 8 6.6, the damping ratio = 1.79 and natural frequency
n
= 4.47. The increase in the damping ratio from original = 0.95 to = 1.79 indicates
that the stability of the system has improved. This is supported by the pole positions, which
for the closed-loop system have moved further from the imaginary j axis, hence improved
the stability of the system, as indicated in Figure 6.15. Also the introduced zero in equation
Figure 6.14: Proportional-derivative controller in action
(6.21) contributes to better system performance, but this will be the topic of further and
advanced control in the follow-on module.
The system response to the unity step input function is shown in Figure 6.16, where the
red curve is response of the system without controller (open-loop system), the blue graph is
response of the system with derivative-proportional controller with K
c
= 1 and T
i
= 1, and
the green graph is the response of the system with derivative-proportional controller with
K
c
= 10 and T
i
= 1. It is evident that proportional-derivative controller also introduces the
steady state error, which decreases as the proportional gain K
c
increases. The reason for
the existence of the steady state error is similar as to that of proportional only controller;
it does not have the integral part that would take into account previous values of the error
e(t).
Also, it is evident from Figure 6.16 that derivative action improves the system response
by making it much faster, still maintaining the system stability. This is the main advantage
of introducing the derivative action.
6.2.6 Proportional-Integral-Derivative (PID) Controller
For control over steady-state and transient errors we can combine all three control strategies
we have discussed in this Chapter to get proportional-integral-derivative (PID) control as a
linear combination of proportional, integral and derivative action. Normally, all three gain
constants are adjustable. The PID combination is often able to provide an acceptable degree
of error (steady state error) together with acceptable stability and damping. More precisely,
PID controllers are so eective that PID control is a standard in processing and some other
108CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
Figure 6.15: Pole location of the second-order system
industries.
The time response of the PID controller is
u(t) = K
c
_
e(t) +
1
T
i
_
e(t)dt +T
D
de(t)
dt
_
(6.22)
or in s-domain
U(s) = E(s)K
c
_
1 +
1
T
i
s
+T
D
s
_
(6.23)
which gives the controller transfer function as
D(s) =
U(s)
E(s)
= K
c
_
1 +
1
T
i
s
+T
D
s
_
(6.24)
The complete control system is shown in Figure 6.17.
Example 6.3 Taking the rst order system of the form
H(s) =
1
s + 1
(6.25)
the response of the system with PID controller is shown in Figure 6.18 where the red curve
is response of the system without controller (open-loop system), the blue graph is response
of the system with PID controller with K
c
= 5, T
D
= 0.1 and T
i
= 0.5, and the green graph
is the response of the system with derivative-proportional controller with K
c
= 1, T
D
= 0.1
and T
i
= 0.5. It is evident that PID controller removes the steady state error and that the
system is faster than the open-loop system without controller.
6.2. AUTOMATIC CONTROLLERS 109
Figure 6.16: Response of the system with derivative-proportional controller
Figure 6.17: PID control strategy
6.2.7 Tuning PID Controllers
To design a particular control loop, the engineer has to adjust the constants K
c
, T
i
and T
D
to provide an acceptable performance of the closed loop system. This process is called tuning
the controller. The criteria for tuning is based on the ideas presented earlier in this Chapter;
increasing K
c
and
1
T
i
tends to reduce system errors but may aect the system stability, while
increasing T
D
improves stability. To develop a controller that will meet steady-state and tran-
sient specications, together with appropriate stability of the system, is a daunting task as it
requires a complete knowledge of the system and its mathematical model. This is mainly based
on the system analysis in the frequency (s) domain, as you will see during the follow-on module.
Sophisticated methods are available to develop and in particular to tune the gain con-
stants K
c
, T
i
and T
D
of a PID controller for a particular process. One of the most popular
methods today is Ziegler-Nichols method, which recognises that the step response of a process
contains sucient information about the system for most practical cases. The step response of
any system has a general form as shown in Figure 6.19, and is called the process reaction curve.
This curve can be generated by experimental data from the step input function applied on the
110CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
Figure 6.18: Response of a rst-order system with PID controller
process or plant, but in many cases it can be recorded from a normal operation of the process
as the step input is a very often occurred type of inputs. The S-shape of the process reaction
Figure 6.19: Process reaction curve
curve is characteristic of many high-order systems, but it may be approximated by a rst-order
transfer function and associated delay as
H(s) =
Y (s)
U(s)
=
Ke
s
s + 1
(6.26)
where the all constants can be determined from the system response as shown in Figure 6.19. If
the tangent is drawn at the inection point of the reaction curve, then the slope of the line is
R =
K
(6.27)
6.2. AUTOMATIC CONTROLLERS 111
and the intersection of the tangent line with the time axis denes the time delay L = . Ziegler
and Nichols approached the tuning problem in such a way that the decay ratio is to be approx-
imately 0.25 which means that the exponential decay to the impulse input achieves a quarter
value after one period of oscillation, as shown in Figure 6.20. This roughly corresponds to
= 0.21 for a second-order system which was fount to be a good compromise between quick
response and appropriate stability margins (how far the poles are from the imaginary j axis)
for a system with delays.
Figure 6.20: Quarter decay ratio
Simulation of the above requirements provided the PID parameters as shown in Table
6.1.
Type of Controller Optimum Gain
Proportional K
c
=
1
RL
Proportional-integral K
c
=
0.9
RL
T
i
=
L
0.3
Proportional-integral-derivative K
c
=
1.2
RL
T
i
= 2L
T
D
= 0.5L
Table 6.1: Ziegler-Nichols tuning for the PID controller and decay ratio of 0.25
112CHAPTER 6. ANALYSIS AND DESIGN OF CONTROL SYSTEMS IN TIME DOMAIN
Example 18
Lets take a rst-order system with delay = 2 [s] of the form
H(s) =
e
2s
5s + 1
(6.28)
The system time response to the unity step input function is shown in Figure 21. From the
Figure 6.21: Response of the rst order system with delay to the unity step input function
response we can nd that L = 3, = 5, K = 1 and consequently R =
K