0% found this document useful (0 votes)
8 views42 pages

Introduction to PID Control Systems

Uploaded by

haopengchen233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views42 pages

Introduction to PID Control Systems

Uploaded by

haopengchen233
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Part I: Introduction to PID Control Systems

Liuping Wang

School of Engineering
Royal Melbourne Institute of Technology University
Australia

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 1 / 42


Outline

1 Introduction to feedback control systems

2 Introduction to PID controllers

3 PI Controllers

4 PID Controllers

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 2 / 42


Introduction to feedback control systems

Outline

1 Introduction to feedback control systems

2 Introduction to PID controllers

3 PI Controllers

4 PID Controllers

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 3 / 42


Introduction to feedback control systems

How a Control System Works-I

To illustrate how in a general sense a computer controlled system works, a room


temperature control is used as an example.
Suppose that in a cold environment, appropriate room temperature is maintained
through heating.
The heating elements are from an oil furnace. The input to control the room
temperature is the fuel injection rate to the furnace and the output is room
temperature. The control objective is to maintain the room temperature at 19C o .
The assumption is that the measurement and control action are synchronized in
terms of a sequence of time intervals. The intervals between two executions are
assumed to be the same, and it is called the sampling interval ∆t.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 4 / 42


Introduction to feedback control systems

How a Control System Works- II

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 5 / 42


Introduction to feedback control systems

How a Control System Works- III

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 6 / 42


Introduction to feedback control systems

Design and Implementation of Control Systems-I

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 7 / 42


Introduction to feedback control systems

Design and Implementation of Control Systems-II

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 8 / 42


Introduction to feedback control systems

Design and Implementation of Control Systems-III

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 9 / 42


Introduction to PID controllers

Outline

1 Introduction to feedback control systems

2 Introduction to PID controllers

3 PI Controllers

4 PID Controllers

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 10 / 42


Introduction to 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)).

r (t) +  e(t) u(t) y (t)


- - Kc - Plant -

−6

Figure 1: Proportional Feedback Control System


Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 11 / 42
Introduction to PID controllers

Applications of Proportional Controller

Because the controller only involves one parameter to be determined, it is


possible to choose Kc without detailed information about the plant.
Because of its simplicity, the proportional controller is often used in the cases
when the system dynamics is unknown, the system is unstable and the required
control performance in steady-state operation is not demanding.
Use of proportional controller is common in the design of cascaded control
systems.
The limitation of a simple proportional controller is that the steady-state error of
the closed-loop control system will not be completely eliminated.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 12 / 42


Introduction to PID controllers

Example of Proportional Control

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 13 / 42


Introduction to PID controllers

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 .

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 14 / 42


Introduction to PID controllers

Solution II

The Laplace transfer function of the output, Y (s), is


0.3Kc 0.3Kc
Y (s) = R(s) = . (5)
s + 1 + 0.3Kc s(s + 1 + 0.3Kc )

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

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 15 / 42


Introduction to PID controllers

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)

Figure 2: Closed-loop step response of proportional control system

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 16 / 42


PI Controllers

Outline

1 Introduction to feedback control systems

2 Introduction to PID controllers

3 PI Controllers

4 PID Controllers

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 17 / 42


PI Controllers

Proportional Plus Integral Controller

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 18 / 42


PI Controllers

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?

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 19 / 42


PI Controllers

Laplace transform of the control signal


The Laplace transform of the controller output is
Kc
U(s) = Kc E(s) + E(s) (8)
τI s
with E(s) being the Laplace transform of the error signal e(t). With this, the Laplace
transfer function of the PI controller is expressed as
U(s) Kc (τI s + 1)
C(s) = = (9)
E(s) τI s

r (t)  e(t)
+ y (t)
- - Kc (τI s+1) u(t)- Plant -
 τI s
−6

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 20 / 42


PI Controllers

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).

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 21 / 42


PI Controllers

Solution I

We calculate the closed-loop transfer function between the reference signal


Y (s) C(s)G(s)
= (11)
R(s) 1 + C(s)G(s)

With C(s) given in (9) and G(s) in (10), we have


Y (s) 0.3Kc τI s + 0.3Kc
= (12)
R(s) τI s2 + τI (1 + 0.3Kc )s + 0.3Kc
The closed-loop poles of this system are determined by the solutions of the
polynomial equation,
τI s2 + τI (1 + 0.3Kc )s + 0.3Kc = 0 (13)
r
1 + 0.3Kc 1 1.2Kc
s1,2 = − ± (1 + 0.3Kc )2 − (14)
2 2 τI

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 22 / 42


PI Controllers

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

Applying the final value theorem, we calculate


0.3Kc τI s + 0.3Kc 1
lim y (t) = lim s ×
t→∞ s→0 τI s2 + τI (1 + 0.3Kc )s + 0.3Kc s
0.3Kc
= = 1. (15)
0.3Kc
where the steady-state value is equal to the reference signal, and it is independent of
the value of integral time constant τI .

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 24 / 42


PI Controllers

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)

Figure 4: Closed-loop step response of PI control system

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 25 / 42


PI Controllers

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

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 26 / 42


PI Controllers

Diagram

R(s)  + 
U(s) Y (s)
- - Kc - - Plant -
+  
τI s

6
− 6−

Kc 

Figure 5: Alternative PI controller structure

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 27 / 42


PI Controllers

Example

Assume that the plant is described by the transfer function


1
G(s) = (18)
s(s + 1)3
and the PI controller has the parameters: Kc = 0.56, τI = 8. Find the closed-loop
transfer function between the reference signal R(s) and the output signal Y (s) for the
original PI controller structure (see Figure 3) and the alternative PI controller structure
(see Figure 5), and compare their closed-loop step responses.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 28 / 42


PI Controllers

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)

Figure 6: Closed-loop step response of PI control system. Structure 1: the


response from the original structure; Structure 2: response from the
alternative structure.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 29 / 42


PID Controllers

Outline

1 Introduction to feedback control systems

2 Introduction to PID controllers

3 PI Controllers

4 PID Controllers

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 30 / 42


PID Controllers

Ideal 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

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 31 / 42


PID Controllers

Practical PID controllers I

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?

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 32 / 42


PID Controllers

Practical PID controllers II

Firstly, in order to avoid the problem caused by a step reference trajectory


change, the derivative action is only implemented on the output signal y (t).
Q: Why differentiation of a step signal causes problem?
Secondly, in order to avoid amplification of the measurement noise, a derivative
filter is in a companionship with the derivative term Kc τD s.
A commonly used derivative filter:
1
FD (s) = (21)
βτD s + 1
where β is typically chosen to be 0.1. β is chosen to be larger if the
measurement noise is severe.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 33 / 42


PID Controllers

Practical PID controllers III

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

where yf (t) is the filtered output response using (21).

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 34 / 42


PID Controllers

Laplace transform of control signal


In Laplace transform, the control signal is expressed as
Kc Kc τ D s
U(s) = Kc (R(s) − Y (s)) + (R(s) − Y (s)) − Y (s)
τI s βτD s + 1
1 Kc τ D s
= Kc (1 + )(R(s) − Y (s)) − Y (s) (23)
τI s βτD s + 1

R(s)  + U(s) Y (s)


- - Kc (1 + 1
) - - Plant -
+ τI s

6
− 6−

Kc τD s 
βτD s+1

Figure 7: PID controller structure

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 35 / 42


PID Controllers

Putting Proportional Control on Output

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

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 36 / 42


PID Controllers

Diagram

R(s)  + U(s) Y (s)


- - Kc - - Plant -
+ τI s

6
− 6−

Kc (τD (β+1)s+1) 
βτD s+1

Figure 8: Alternative PID controller structure

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 37 / 42


PID Controllers

Example

Suppose that the plant is described by the transfer function


1
G(s) = (26)
s(s + 1)3
and the PI part of the controller has the parameters: Kc = 0.56, τI = 8. Choosing
τD = 0.1 and 1, find the closed-loop transfer function for the PID control system shown
in Figure 7 and simulate its closed-loop performance. Also, find the closed-loop
transfer function of the PID control system shown in Figure 8 and simulate its
closed-loop step performance.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 38 / 42


PID Controllers

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 39 / 42


PID Controllers

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)

Figure 9: Step responses of PID control system (Kc = 0.56, τI = 8,


τD = 0.1, 1)

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 40 / 42


PID Controllers

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.

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 41 / 42


PID Controllers

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)

Liuping Wang (RMIT) Part I: Introduction to PID Control Systems 42 / 42

You might also like