0% found this document useful (0 votes)
19 views

Lecture 13 H

The document discusses the Ziegler-Nichols tuning rules for PID controllers. It provides an overview of PID controllers and their applications. The three terms in a PID controller include: proportional (P), integral (I), and derivative (D). The Ziegler-Nichols tuning rules provide a method for selecting PID control parameters to achieve a desired response for a given system. Examples are given of P, PI, PD, and PID controllers applied to mechanical systems with uncertainties and disturbances.

Uploaded by

Andrés Ramírez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Lecture 13 H

The document discusses the Ziegler-Nichols tuning rules for PID controllers. It provides an overview of PID controllers and their applications. The three terms in a PID controller include: proportional (P), integral (I), and derivative (D). The Ziegler-Nichols tuning rules provide a method for selecting PID control parameters to achieve a desired response for a given system. Examples are given of P, PI, PD, and PID controllers applied to mechanical systems with uncertainties and disturbances.

Uploaded by

Andrés Ramírez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Three-term controller Ziegler-Nichols tuning rules Summary

Basics of Automation and Control I


Lecture 13: PID controllers

Paweł Malczyk

Division of Theory of Machines and Robots


Institute of Aeronautics and Applied Mechanics
Faculty of Power and Aeronautical Engineering
Warsaw University of Technology

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 1 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Outline

1 Three-term controller

2 Ziegler-Nichols tuning rules

3 Summary

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 2 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Three-term controller

1 Three-term controller
Introduction
Basic control functions
P controller
PI controller
PD controller
PID controller

2 Ziegler-Nichols tuning rules

3 Summary

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 3 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Introduction

Fig. 1: Block diagram of a process with feedback controller

1 The three-term controller, i.e. proportional-integral-derivative (PID)


controller, is a control loop feedback mechanism widely used in many
industrial control systems.
2 PID controllers appear in many different forms: as stand-alone
controllers, as part of hierarchical, distributed control systems and built
into embedded components.
3 By tuning the three parameters in the PID controller algorithm, the
controller can provide control action designed for specific process
requirements (benign process dynamics, moderate performance).

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 4 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Basic control functions

Fig. 2: Block diagram of feedback control system with ideal PID controller
*
The input/output relation for an ideal PID controller :
[ ∫ ]
1 t de(t)
u(t) = kp e(t) + e(τ )dτ + Td =
Ti 0 dt
∫ t (1)
de(t)
= kp e(t) + ki e(τ )dτ + kd
0 dt
e(t) = r(t) − y(t) – error signal, u(t) – control signal,
kp – proportional gain, Ti – integral time, Td – derivative time,
kp
ki = Ti – integral gain, kd = kp Td – derivative gain.
* Modified versions of the PID controller are used in practical applications.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 5 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Basic control functions


Ideal PID controller:

[ ∫ t ]
1 de(t)
u(t) = kp e(t) + e(τ )dτ + Td
Ti 0
dt
( ) (2)
U(s) 1
→ C(s) = = kp 1 + + Td s
E(s) Ti s

Fig. 3: Block diagram of ideal PID controller


• P controller (Ti = ∞, Td = 0)
C(s) = kp (3)

• PI controller (Td = 0)
( )
1
C(s) = kp 1 + (4)
Ti s
• PD controller (Ti = ∞)
C(s) = kp (1 + Td s) (5)
Fig. 4: PID interpretation
→ Gentle introduction to PID controllers: https://www.youtube.com/watch?v=4Y7zG48uHRo.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 6 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Mechanical system

Ns N
Fig. 5: Układ mechaniczny. Stałe fizyczne: m = 1 kg, b = 2 m,k =5 m
Goal: choose a control force f(t) (in N) such that the mass will stop at the
desired position (say 1 m from equilibrium).
Y(s) 1
Plant tranfer function G(s) = F(s) = ms2 +bs+k .
Reference signal (desired position): r(t) = yd · 1(t) (yd = 1 m).
In steady-state the force f(t) need to balance the spring force, i.e.:
f = k · yd · 1(t), then
1
yss = lim y(t) = lim sY(s) = lim sG(s)F(s) = lim sG(s)kyd = G(0)kyd = yd
t→∞ s→0 s→0 s→0 s
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 7 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Mechanical system with disturbance

Ns N m
Fig. 6: Mechanical system. Physical constants: m = 1 kg, b = 2 m,k =5 m , and g = 10
s2

Y(s) 1
Plant transfer function G(s) = F(s) = ms2 +bs+k .
Disturbance – gravity force: d(t) = −mg · 1(t).
Reference signal (desired position): r(t) = yd · 1(t) (yd = 1 m).
In steady-state the force f(t) need to balance the sum of spring force and
the gravity force, i.e.: u = (k · yd + mg) · 1(t).
Assumption: perfect knowledge of parameters and disturbance...

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 8 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Mechanical system with parametric uncertainty


True values: m, b, k.
Estimated params: m, b, k.
Real parameters and
disturbance signals are
usually unknown. Fig. 7: Mechanical system with parametric uncertainty

Control signal: u = (k · yd + mg) · 1(t).


Input signal: f = (kyd + (m − m)g) · 1(t).
Steady-state response:
1 1
yss = lim y(t) = lim sY(s) = lim sG(s)(kyd +(m−m)g) = (kyd +(m−m)g)
t→∞ s→0 s→0 s k
Error signal:
1 1
ess = yss − yss = yd − (kyd + (m − m)g) = ((k − k)yd + (m − m)g)
k k
The greater the uncertainty is, the greater the steady-state error is.
Transient-response is not controlled. Open-loop control is sensitive to
parametric uncertainty.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 9 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Proportional control

Fig. 8: Feedback control system

Assumption: u(t) = kp (r(t) − y(t)) – force proportional to the error.


Open-loop transfer function: L(s) = C(s)G(s).
Y(s) L(s) kp
Closed-loop transfer function: T(s) = R(s) = 1+L(s) = ms2 +bs+k+kp .
kp – virtual spring coefficient.
Let us calculate the response y(t) and steady-state error e(t).

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 10 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Proportional control

Fig. 9: Feedback control system


The response: Y(s) = T(s)R(s) + G(s)S(s)D(s).
Sensitivity function:
1 ms2 + bs + k
S(s) = =
1 + L(s) ms2 + bs + k + kp
Load disturbance sensitivity function:
1
W(s) = G(s)S(s) = 2
ms + bs + k + kp
Reference signal: r(t) = yd · 1(t) → R(s) = ysd
Disturbance: d(t) = −mg · 1(t) → D(s) = − mg s .
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 11 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Proportional control

Fig. 10: Feedback control system


Steady-state response:
yd mg
yss = lim y(t) = lim sY(s) = lim s(T(s) + W(s)(− )) =
t→∞ s→0 s s→0 s
kp 1
= yd T(0) − mgW(0) = yd − mg
k + kp k + kp

kp
If kp → ∞, then k+kp → 1 and 1
k+kp → 0. In consequence: yss = yd .
Conclusion:
→ disturbance rejection (even unknown) and trajectory tracking.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 12 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

P controller

Fig. 11: P controller, C(s) = kp

Effects of P controller
Proportional term, P, causes a corrective control actuation proportional
to the error.
The system with P controller will usually have nonzero steady-state errors.
As kp increases, then the static position error decreases.
As kp increases, the stability margins decrease and the system may
become unstable.
As kp increases, the BW (as well as overshoot and settling time) increases.
It is difficult to ensure both good transient response accuracy and steady-
state performance.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 13 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

P controller
kp=30
40 1.4
30
1.2
20
Magnitude (dB) 10 1 r(t)
0 0.8

y(t)
-10
-20 0.6 kp=30
kp=25
-30 0.4 kp=20
-40 kp=15
0.2
-50
-60 0
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
kp=30
0 30
25
-30
20
Phase (deg)

-60 15
10

u(t)
-90 G
C 5 kp=15
-120 L 0 kp=20
S -5 kp=25
-150 T kp=30
-10
-180 -15
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t

Fig. 12: P controller characteristics


 Comment 1
If kp ↗, then Mp ↗, tp ↘, ts ↗, ess ↘, stability issues.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 14 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

P controller

kp=30
40 1.4
30
1.2
20
10 1 r(t)
Magnitude (dB)

0
0.8

y(t)
-10
0.6 kp=30
-20
kp=25
-30 G
0.4 kp=20
C
-40 L kp=15
S 0.2
-50 T
-60 0
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
Fig. 13: P controller characteristics

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 15 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PI controller

( 1
)
Fig. 14: PI controller, C(s) = kp 1 + Ti s

Effects of PI controller
The integral term, I, gives a correction proportional to the integral of the
error.
PI largely reduces the steady-state errors (compared to P controller).
It may cause the closed loop system less stable (or even unstable).
PI may slow down the transient response.
Filtering out high-frequency noise.
Windup - interaction of integral action and saturations.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 16 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PI controller
kp=30, Ti=1 kp=30
80 1.6
60 1.4
1.2
Magnitude (dB)
40 1
20 0.8
0.6

y(t)
0
0.4 Ti=1
-20 0.2 Ti=5
-40 0 Ti=10
-0.2
-60 G C L S T Ti=100
-0.4
-80 -0.6
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
kp=30, Ti=1 kp=30
0 30
25
-30 20
Phase (deg)

-60 15
10

u(t)
-90 G 5
C 0 Ti=1
-120 L -5 Ti=5
S -10 Ti=10
-150 T Ti=100
-15
-180 -20
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t

Fig. 15: PI controller characteristics


 Comment 2
If Ti ↘, then Mp ↗, ts ↗, ↘, ess ↘.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 17 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PI controller

kp=30, Ti=1 kp=30


80 1.6
G 1.4
60 C
L 1.2
40 S 1
T
Magnitude (dB)

20 0.8
0.6

y(t)
0
0.4
-20 0.2

-40 0 Ti=1
-0.2 Ti=5
-60 Ti=10
-0.4 Ti=100
-80 -0.6
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
Fig. 16: PI controller characteristics

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 18 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PD controller

Fig. 17: PD controller, C(s) = kp (1 + Td s)


Effects of PD controller
The derivative term, D, gives a predictive capability yielding a control
action proportional to the rate of change of the error.
Derivative action tends to have a stabilizing effect.
PD controller adds damping and reduces maximum overshoot.
It improves the transient response (decreases rise and settling time).
PD controller improves relative stability (increases gain and phase
margins).
Possibly accentuating noise at higher frequencies.
Filtered version of the PD (or PID) controller is used due to derivative kick,
then, C(s) = kp (1 + Td s Td 1 ). Typical values of N are 8 to 20.
N s+1
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 19 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PD controller
kp=30, Td=0.1 kp=30
80 1.4
G C L S T 1.2
60
1
Magnitude (dB) 40 0.8
20 0.6

y(t)
0.4
0 0.2 Td=0
0 Td=0.01
-20
-0.2 Td=0.05
-40 Td=0.1
-0.4
-60 -0.6
10-2 10-1 100 101 102 103 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
kp=30, Td=0.1 kp=30
120 30
90 25
60 20
Phase (deg)

30 15
0
10

u(t)
-30 G
C 5 Td=0
-60
-90 L 0 Td=0.01
-120 S -5 Td=0.05
-150 T -10 Td=0.1
-180 -15
10-2 10-1 100 101 102 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t

Fig. 18: PD controller characteristics


 Comment 3
If Td ↗, then Mp ↘, tp ∼↗, ts ↘.
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 20 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PD controller

kp=30, Td=0.1 kp=30


80 1.4
G
1.2
60 C
L 1
S
40 0.8
T
Magnitude (dB)

0.6
20

y(t)
0.4
0
0.2

-20 0
Td=0
-0.2 Td=0.01
-40 Td=0.05
-0.4 Td=0.1
-60 -0.6
10-2 10-1 100 101 102 103 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
Fig. 19: PD controller characteristics

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 21 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PID controller

( 1
)
Fig. 20: PID controller, C(s) = kp 1 + Ti s + Td s

Effects of PID controller


The features of each of the PI and PD controllers are utilized.
Improves both steady-state errors as well as transient response
specifications.
The PID controller algorithm involves three separate constant parameters
that need to be tuned.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 22 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PID controller
kp=30, Td=0.1, Ti=1 kp=30, Td=0.1, Ti=1
80 1.4
60 1.2
Magnitude (dB)

40 1
20
0.8

y(t)
0
0.6
-20
-40 0.4
y(t)
-60 G C L S T 0.2 r(t)
-80 0
10-3 10-2 10-1 100 101 102 103 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
kp=30, Td=0.1, Ti=1 kp=30, Td=0.1, Ti=1
120 50
90
60 40
Phase (deg)

30 30
0
-30 u(t) 20
-60
-90 10
-120 0
-150 G C L S T u(t)
-180 -10
10-3 10-2 10-1 10 0
10 1
10 2
10 3 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t

Fig. 21: PID controller characteristics


© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 23 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PID controller

kp=30, Td=0.1, Ti=1 kp=30, Td=0.1, Ti=1


80 1.4

60 1.2

40
1
Magnitude (dB)

20
0.8

y(t)
0
0.6
-20
0.4
-40

-60 0.2 y(t)


G C L S T r(t)
-80 0
10-3 10-2 10-1 100 101 102 103 0 1 2 3 4 5 6 7 8 9 10
Frequency (rad/sec) t
Fig. 22: PID controller characteristics

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 24 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

PID controllers

Fig. 23: Ideal P, PI, PD and PID controllers


1 PID controllers are applicable to many control problems, and often
perform satisfactorily.
2 Ideal PID are linear controllers with constant coefficients.
3 There are many variations of PID controllers associated with practical
control applications (e.g. preventing from integrator windup).
© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 25 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Ziegler-Nichols tuning rules

1 Three-term controller

2 Ziegler-Nichols tuning rules


Introduction
First method
Second method
Comments
Example

3 Summary

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 26 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Introduction

Fig. 24: Ideal PID controller and plant

If a mathematical model of the plant is known, then it is possible to


design the PID controller that will meet the transient and steady-state
specifications of the closed-loop system.
If the mathematical model cannot be easily obtained, one should select
the controller parameters experimentally, which known as a process of
controller tuning.
Experimental Ziegler and Nichols tuning rules for PID controllers as a
starting point for fine tuning.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 27 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

First method
Experimental response of the plant due to
Y(s)
a unit-step input. The transfer function U(s)
may be approximated by
Y(s) Ke−τ s
G(s) =
= (6)
U(s) Ts + 1
T – time constant, τ – delay, K – gain.
 Comment 4
The controller parameters are designed to
result in 25% amplitude decay ratio in one Fig. 25: S-shaped response of a closed-loop
system due to a unit-step input. The plant
period. involves neither integrators nor dominant
complex conjugate closed-loop poles
Ziegler-Nichols tuning rule based on a step response of a plant
Type kp Ti Td
P T
Kτ ∞ 0
T τ
PI 0.9 Kτ 0.3 0
T
PID 1.2 Kτ 2τ 0.5τ

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 28 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Second method

Fig. 26: Closed-loop system with P controller and sustained oscillation with period Tcr

1. Set Ti = ∞, Td = 0 and increase kp Ziegler-Nichols tuning rule based


from 0 to a critical value kcr , where the on a critical period Tcr
output exhibits sustained oscillations. Type kp Ti Td
2. Find the critical period Tcr . P 0.5kcr ∞ 0
1
3. Select the parameters kp , Ti and Td PI 0.45kcr 1.2 Tcr 0
according to the table. PID 0.6kcr 0.5Tcr 0.125Tcr

 Comment 5 The controller parameters are designed to result in 25%


amplitude decay ratio in one period.
 Comment 6 One can use Nyquist plot to find kcr , and Tcr .

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 29 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Comments

1 Ziegler-Nichols tuning rules (and other tuning rules) have been widely
used in process control systems.
2 The plant dynamics may be known or may be not precisely known.
3 Experience has shown that the Z-N rules provide acceptable closed-loop
response for many systems.
4 The empirical PID tuning strategies are only starting points in the process
to obtain the right controller.
5 Tuning method (by Astrom & Hagglund) based on relay feedback is
available.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 30 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Example

 Example 1 Consider the control system shown in the Fig. 27. The process
Y(s) 1
has transfer function G(s) = U(s) = (Ts+1) 2 . Apply the Ziegler-Nichols tuning

rule to determine the constants of the P, PI, and PID controller.

Fig. 27: Liquid-level control system

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 31 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Example
Ke−τ s
Process model G(s) = Ts+1 .
1.2
K=1 1.1
1
τ = t1 = 12.72sec 0.9

T = t3 − t1 = 122.737sec 0.8
0.7
0.6
Type kp Ti Td 0.5
P T
Kτ ∞ 0 0.4
T τ 0.3
PI 0.9 Kτ 0.3 0
0.2
T
PID 1.2 Kτ 2τ 0.5τ 0.1
0
Type kp Ti Td
−0.1
P 9.6491 ∞ 0 −0.2
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300
PI 8.6842 42.3576 0
PID 11.579 25.44 6.36 Fig. 28: Process reaction curve

( )
1
CP (s) = 9.6491, CPI (s) = 8.6842 1 + ,
42.3576s
( )
1
CPID (s) = 11.579 1 + + 6.36s
25.44s

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 32 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Example
1.8 20
1.6 P 18 P
PI 16 PI
1.4 14
1.2 PID 12 PID
10
1 8
0.8 6
4
0.6 2
0.4 0
0.2 −2
−4
0 −6
0 50 100 150 200 250 300 0 50 100 150 200 250 300

0.2 0.1
P P
0.15 PI PI
PID 0.075 PID
0.1
0.05
0.05
0.025
0

−0.05 0
0 50 100 150 200 250 300 0 50 100 150 200 250 300

Fig. 29: Closed loop system responses for various controllers

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 33 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Review questions

1 What is the main objective of introducing proportional control, integral control or derivative
control?
2 What is a P, PI, PD, PID controller? Write the input-output relation, unit-step response and
Bode plots.
3 Give the effects of P, PI, PD and PID controllers on the feedback control system performance.
4 Formulate and comment on the two Ziegler-Nichols tuning rules for a PID controller. Discuss
the range of applicability of both methods.

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 34 / 35
Three-term controller Ziegler-Nichols tuning rules Summary

Summary

1 Three-term controller

2 Ziegler-Nichols tuning rules

3 Summary

© Paweł Malczyk. Basics of Automation and Control I Lecture 13: PID controllers 35 / 35

You might also like