Introduction to PID Control Systems
Introduction to PID Control Systems
Liuping Wang
School of Engineering
Royal Melbourne Institute of Technology University
Australia
3 PI Controllers
4 PID Controllers
Outline
3 PI Controllers
4 PID Controllers
Take the output measurement. At the time when the closed-loop control system
is switched on, assuming as t0 , the temperature sensor reads the room
temperature y (t0 ). Then this measurement is read by the computer into its
memory.
Compute feedback error. This temperature measurement at time t0 is compared
with the required room temperature. This comparison generates the feedback
error e(t0 ), which is the error between your desired room temperature and the
actual room temperature.
Compute the controller output. The control algorithm in computer computes a
control signal u(t0 ) based the feedback error e(t0 ) and the history of the
feedback error, depending on the complexity of the control algorithm.
This digital value u(t0 ), through a device called zero-order-hold, is converted into
the analog control signal u(t) (fuel injection rate), where u(t) = u(t0 ),
t0 ≤ t ≤ t0 + ∆t.
This analog signal is the fuel injection rate for the time interval, t0 ≤ t ≤ t0 + ∆t.
The clock ticks to the next sample period, t1 = t0 + ∆t, the temperature sensor
reads the room temperature as y (t1 ), and the entire controlling process repeats
the steps listed.
Understand the plant to be controlled. If the plant is completely new to us, then
we may have to consider the configuration of the control system by choosing
appropriate input and output signals.
Build a dynamic model for the plant to be controlled. This is always one of the
key steps. How well the control system is going to perform strongly depends on
the quality of the dynamic model built for controller design. We may use a
physical model based approach to find the dynamics of the system. Or we may
choose to conduct some experiments and build a dynamic model based on
experimental data from the plant.
Control system design, which is based on the dynamic model obtained. In the
control system design step, we will find the controller parameters and verify
some of the closed-loop characteristics. It is possible for some controllers with
one or two parameters to be determined that the controller parameters can be
tuned trial-by-error, without using a dynamic model.
Simulation of the closed-loop control system. There are soft- ware- in- the- loop
simulation and hardware in-the-loop simulation. Simulations are the necessary
means used to verify the control system designed with the assumptions, and find
the faults and make the necessary corrections. Software in-the-loop-simulation
is the cheapest and safest way to make sure that the control system designed
will lead to bad consequences. Hardware in-the-loop simulation will utilize some
key hardware in the simulation and will bring the simulation steps closer to the
actual control system implementation.
Implementation of the control systems. This may require transferring the
computer codes used in simulation platform to the actual computer language
used in the real-time control system, which matches the existing system, through
either micro-controller, DSP or other computational platforms. Safety jackets will
be implemented in the software to ensure the safety operation of the plant.
Outline
3 PI Controllers
4 PID Controllers
Proportional Controller
With this term proportional, the feedback control signal u(t) is computed in
proportion to the feedback error e(t) with the formulae,
u(t) = Kc e(t) (1)
where Kc is the proportional gain and the feedback error as the difference
between the reference signal r (t) and the output signal y (t) (e(t) = r (t) − y (t)).
The plant is a first order system with the following transfer function,
0.3
G(s) = . (2)
s+1
with proportional controller Kc (Kc > 0). Suppose that the reference signal is a step
signal with amplitude 1 and its transfer function is R(s) = 1s . Find the steady-state
value of the output with respect to the reference signal.
Solution I
The closed-loop control system from the set-point signal to the plant output has the
transfer function,
Y (s) Kc G(s) 0.3Kc
= = (3)
R(s) 1 + Kc G(s) s + 1 + 0.3Kc
With any positive Kc , the closed-loop system is stable where the closed-loop pole is
determined by the solution of the polynomial equation,
s + 1 + 0.3Kc = 0 (4)
which is −1 − 0.3Kc .
Solution II
where R(s) = 1s . Applying the final value theorem to the stable closed-loop system,
we calculate
0.3Kc 0.3Kc
lim y (t) = lim s × = . (6)
t→∞ s→0 s(s + 1 + 0.3Kc ) 1 + 0.3Kc
Solution III
For any value of Kc < ∞, limt→∞ y (t) 6= 1, i.e. not equal to the desired value at the
steady state response. Figure 2 shows the closed-loop step response with the
proportional controller Kc = 8 and Kc = 80, respectively. It is seen that with the
increase of the proportional gain, the closed-loop response speed increases and the
steady-state value becomes closer to the desired value 1.
0.8
0.6
Kc=8
0.4 Kc=80
0.2
0
0 0.5 1 1.5 2
Time (sec)
Outline
3 PI Controllers
4 PID Controllers
Proportional plus Integral (PI) Controller is the most widely used controller
among PID controllers.
With the integral action, the steady-state error that had existed with the
proportional control system will be completely eliminated.
The output of the PI controller is calculated using
Kc t
Z
u(t) = Kc e(t) + e(τ )dτ (7)
τI 0
where e(t) = r (t) − y (t) is the error signal between the setpoint r (t) and the
output y (t), Kc is the proportional gain, and τI is the integral time constant.
Signs of Kc and τI
The parameter τI is always positive, and its value is inversely proportional to the
effect of the integral action taken by the PI controller. A smaller τI will result in a
stronger effect of the integral term.
The parameter Kc has the same sign as the steady-state gain of the plant to be
controlled. Its value is proportional to the effect of the proportional action taken
by the PI controller. A larger Kc will result in a stronger effect of the proportional
term.
Q: What is steady-state gain of a plant?
r (t) e(t)
+ y (t)
- - Kc (τI s+1) u(t)- Plant -
τI s
−6
Example
Assume that the plant is a first order system with the transfer function
0.3
G(s) = (10)
s+1
the PI controller has the proportional gain Kc = 8, and the integral time constant
τI = 3 and 0.5 respectively. Examine the locations of the closed-loop poles. With the
set-point signal r (t) as a unit step signal, find the steady-state value of the closed-loop
output y (t).
Solution I
Solution II
If the quantity
1.2Kc
(1 + 0.3Kc )2 − =0
τI
then there are two identical real poles located at s1,2 = − 1+0.3K
2
c
. If the quantity,
1.2Kc
(1 + 0.3Kc )2 − >0
τI
then there are two real poles located at
r
1 + 0.3Kc 1 1.2Kc
s1,2 = − ± (1 + 0.3Kc )2 −
2 2 τI
If the quantity,
1.2Kc
(1 + 0.3Kc )2 − <0
τI
then there are two complex poles located at
r
1 + 0.3Kc 1 1.2Kc
s1,2 = − ±j − (1 + 0.3Kc )2
2 2 τI
The closed-loop system is stable as long as Kc is positive and 0 < τI < ∞.
Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 23 / 42
PI Controllers
Solution III
Solution IV
Figure 4 shows the closed-loop step response with τI = 3 and τI = 0.5, respectively. It
is seen that as τI reduces, the closed-loop response speed becomes faster.
Nevertheless, the steady-state responses with both τI values are equal to one.
1.5
0.5 tauI=0.5
tauI=3
0
−0.5
−1
0 20 40 60
Time (sec)
Alternative PI Structure
This small change is to put the proportional control on the output signal y (t), instead
of the feedback error e(t) = r (t) − y (t).
Kc t
Z
u(t) = −Kc y (t) + (r (τ ) − y (τ ))dτ (16)
τI 0
Applying Laplace transform to this equation leads to the Laplace transform of the
controller output in relation to the reference signal and the output as
Kc
U(s) = −Kc Y (s) + (R(s) − Y (s)) (17)
τI s
Diagram
R(s) +
U(s) Y (s)
- - Kc - - Plant -
+
τI s
6
− 6−
Kc
Example
Results
Detailed solution can be found in Example 1.3 of the lecture notes.
1
structure 1
structure 2
0
−1
0 20 40 60
Time (sec)
Outline
3 PI Controllers
4 PID Controllers
A PID controller consists of three terms: proportional (P), integral (I) and derivative
(D). The output u(t) of a PID controller is the sum of of the three terms,
Kc t
Z
de(t)
u(t) = Kc e(t) + e(τ )dτ + Kc τD (19)
τI 0 dt
where e(t) = r (t) − y (t) is the feedback error signal between the reference signal r (t)
and the output y (t), and τD is the derivative gain. The Laplace transfer function of the
PID controller is
U(s) 1
= Kc (1 + + τD s) (20)
E(s) τI s
Almost without exception, the derivative term is changed from the original form
Kc τD s in the implementations.
This is because the derivative term Kc τD ( drdt(t) − dydt(t) ) is not realizable in a
practical implementation and the differentiation of the output signal y (t) leading
to amplification of measurement noise.
Q: Why is that?
With the derivative filter FD (s), a typical PID control output is calculated as
Kc t
Z
dyf (t)
u(t) = Kc (r (t) − y (t)) + (r (τ ) − y (τ ))dτ − Kc τD (22)
τI 0 dt
Kc τD s
βτD s+1
To avoid the overshoot in output response to a set-point change, the proportional term
in the PID controller may also be implemented on the plant output. In this case, the
control signal is calculated using
Kc t
Z
dy (t)
u(t) = −Kc y (t) + (r (τ ) − y (τ ))dτ − Kc τD f (24)
τI 0 dt
Accordingly, the Laplace transform of the control signal is expressed as
Kc Kc τ D s
U(s) = −Kc Y (s) + (R(s) − Y (s)) − Y (s)
τI s βτD s + 1
Kc Kc (τD (β + 1)s + 1)
= (R(s) − Y (s)) − Y (s) (25)
τI s βτD s + 1
Diagram
Kc (τD (β+1)s+1)
βτD s+1
Example
Solution I
The control signal from Figure 7 has the Laplace transform given by Equation (23).
Substituting U(s) into the following equation,
1
Y (s) = U(s) (27)
s(s + 1)3
re-grouping and re-arranging lead to the closed-loop transfer function
Y (s) Kc (τI s + 1)(βτD s + 1)
= (28)
R(s) τI s2 (s + 1)3 (βτD s + 1) + Kc (τI s + 1)(βτD s + 1) + Kc τI τD s2
There are two zeros in the closed-loop transfer function: − τ1I caused by the integral
control, and − βτ1 caused by the derivative control. With a small β value, the large
D
effect from the derivative term comes from the term Kc τI τD s2 in the denominator of the
closed-loop transfer function.
Solution II
Figure 9 shows the closed-loop step responses for τD = 0.1 and τD = 1 respectively.
With the increase of τD , the oscillation in the closed-loop response has been reduced.
However, there is a large overshoot in the output response.
tauD=0.1
tauD=1
0
−1
0 20 40 60
Time (sec)
Solution III
To reduce the overshoot, we calculate the closed-loop transfer function by using the
Laplace transform of the controller output using the alternative structure. The
closed-loop transfer function is
Y (s) Kc (βτD s + 1)
= (29)
R(s) τI s2 (s + 1)3 (βτD s + 1) + Kc (τI s + 1)(βτD s + 1) + Kc τI τD s2
With this implementation, the denominator of the closed-loop transfer function is the
same, however, there is only one zero at − βτ1 D caused by the derivative control.
Solution IV
Figure 10 shows the closed-loop step responses with PID controller. In comparison
with the responses from the previous case, it is seen that the overshoot in the
closed-loop responses have been eliminated.
tauD=0.1
0 tauD=1
−1
0 20 40 60
Time (sec)
Figure 10: Step responses of PID control system with alternative structure
(Kc = 0.56, τI = 8, τD = 0.1, 1)