Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Introduction Dynamical System PID control Experiment

PID control - Simple tuning methods

Ulf Holmberg
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Tank process

• Tank with level control


• Two connected tanks
• Pump for in-flow of water
• Level measurements
• Valve for out-flow (disturbance)
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Open-loop system

System

u Actuator Control object Sensor y

• u control signal (pump voltage)


• Actuator (tubes to pump, power amplifier , in-flow)
• Control object (level in Tank with in- and out-flow)
• Sensors (pressure sensors, tubes, elektronics)
• y output (measurement of water level)
Introduction Dynamical System PID control Experiment

Closed-loop system

+ e u
r Controller System y

Give reference (set-point of water level in tank) r to controller in


stead of pump voltage
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Time constant and stationary gain

u(t) y (t)
Step response
Kp
Step
1

t u System y t
T

Example–Stove plate
• Time constant T
• u(t) power to stove plate
• Stationary gain Kp
• y (t) temperature on plate
Introduction Dynamical System PID control Experiment

Time constant and stationary gain

u(t) y (t)
Step response
Kp ∆u
Step
∆u

t u System y t
T

• Step response size proportional to step size


• Start step from equilibrium
Introduction Dynamical System PID control Experiment

Dead-time (time delay)


u(t) y (t)
Step response
Kp
Step
1

t u System y t

L T
Example – roll transport time

Dead-time (time delay, lag) L


Introduction Dynamical System PID control Experiment

Step response model


u(t) y (t)
Step response
Kp
Step
1

t u System y t
A

L T
Step response model from unit step:
• T Time constant
• Kp Stationary gain
• L Dead-time
• A see measure above
Introduction Dynamical System PID control Experiment

Step response model


u(t) y (t)
Step response
Kp ∆u
Step
∆u

t u System y t
A∆u

L T
Step response model from experiment:
• T Time constant
• Kp Stationary gain
• L Dead-time
• A see figure
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Self-oscillation model

+ e u
r Ku System y
− Tu

Experiment
• P-control (closed-loop system!)
• Crank up gain to self-oscillation
• Reference-step starts oscillation
Self-oscillation model
• Ultimate gain Ku
• Ultimate period Tu
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

PID structure
+ e u
r Controller System y

• r reference, set-point (SP)


• y output, measured signal to be regulated
• e = r − y control error
PID-controller:
P

e I + u

D
Introduction Dynamical System PID control Experiment

P-controller

e(t) u(t)

Ke0
e0
t e K u t

Control signal Proportional to control error


Introduction Dynamical System PID control Experiment

P-controller with offset

e(t) u(t)
Ke0

u0
e0 u0 Offset
t e K + u t

Control signal Proportional to error plus ’offset’


Example: speed control of car
u0 given gas at control-start
Introduction Dynamical System PID control Experiment

I-part (integrator)

e(t) I-del

e0 e0

1
R
t e Ti e I-del t
Ti

I-part
• ∝ surface under e(t) so far
• becomes as big as constant error e0 in time Ti
• used to eliminate remaining error
Introduction Dynamical System PID control Experiment

D-part (derivator)

e(t) D-del

t e Td de
dt D-del t

D-part
• ∝ slope on e(t)
• used to damp oscillations
Introduction Dynamical System PID control Experiment

PID-controller structure

Control signal = P + I + D
Z t
1 de(t)
u(t) = K [e(t) + e(s)ds + Td ]
Ti dt

Three parameters to tune K , Ti and Td


Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Ziegler-Nichols step response method

• Measure A and L from step response


• Tp expected time constant for closed-loop system

Controller K Ti Td Tp
P 1/A 4L
PI 0.9/A 3L 5.7L
PID 1.2/A 2L L/2 3.4L
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Ziegler-Nichols self-oscillation method

• Measure ultimate gain Ku and period Tu from experiment


• Tp expected time constant for closed-loop system

Controller K Ti Td Tp
P 0.5Ku Tu
PI 0.4Ku 0.8Tu 1.4Tu
PID 0.6Ku 0.5Tu 0.125Tu 0.85Tu
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Step response

Step response model for the left tank


10
5.4

9 5.3

8 5.2

7
5.1 Estimated from figure:
6
5
• A∆u = 0.1, ∆u = 0.5
5
4.9
⇒ A = 1/5
4.8

4
• L=3
4.7

3 4.6

2 4.5
0 100 200 300 20 30 40 50 60
Introduction Dynamical System PID control Experiment

P-control of the left tank

r, y
Valve opens/closes
3

2.5
Ziegler-Nichols P-control
• K = 1/A = 5
0 20 40 60 80 100 120 140 160 180

u • Stationary error after valve


4 opening even if offset is used
2

0
0 20 40 60 80 100 120 140 160 180
Introduction Dynamical System PID control Experiment

PI-control of the left tank

r, y
Valve opens/closes

3
Ziegler-Nichols PI-control
2.5
• K = 0.9/A = 4.5
0 50 100 150 200 • Ti = 3L = 9
u

4
• No stationary error after valve
disturbance
2

0
0 50 100 150 200
Introduction Dynamical System PID control Experiment

PID-control of the left tank

r, y
Valve opens/closes Ziegler-Nichols PID-control
3.2

3
• K = 1.2/A = 6
2.8 • Ti = 2L = 6
2.6

2.4
• Td = L/2 = 1.5
0 50 100 150 200

u • No stationary error after valve


disturbance
5
• Fast and damped
• Noisier control signal
0 50 100 150 200
Introduction Dynamical System PID control Experiment

Self-oscillation experiment

Self-oscillation model for the left tank


r (bˆ¶rvˆ⁄rde) och y (ˆ⁄rvˆ⁄rde)

3
Ultimate gain and period
2
• Ku = 15 (from tuning)
1
• Tu = 10 (from figure)
0
0 20 40 60 80 100

u (styrsignal)
Z-N PID-tuning:
10

K = 0.6Ku = 8
5 Ti = 0.5Tu = 5
Td = 0.125Tu = 1.25
0
0 20 40 60 80 100 120
Introduction Dynamical System PID control Experiment

Ziegler-Nichols PID from self-oscillation model


t, y

0
0 50 100 150 200 250

u
10

0
0 50 100 150 200 250
Introduction Dynamical System PID control Experiment

PID control
Introduction
Lab processes
Control System
Dynamical System
Step response model
Self-oscillation model
PID control
PID structure
Step response method (Ziegler-Nichols)
Self-oscillation method (Ziegler-Nichols)
Experiment
Level control in a tank
Level control of two connected tanks
Introduction Dynamical System PID control Experiment

Step response

Step response model for the right tank


4.7
8
4.6
Roughly estimated (bad
7
4.5 precision!):
6 4.4 • A∆u ≈ 0.2, ∆u = 0.5
5
4.3 ⇒ A = 2/5
4.2 • L ≈ 10
4
4.1
From larger figure:
3
4 A∆u = 0.15, L = 8
2 3.9
0 100 200 300 400 30 40 50 60 70
Introduction Dynamical System PID control Experiment

PI-control of the right tank

r, y
Valve opens/closes

3
Ziegler-Nichols PI-control
2
• K = 0.9/A = 2.25
0 100 200 300 • Ti = 3L = 30
u

3
Disturbance eliminated in 60s
2
(Compare Tp = 5.7L = 57s)
1

0
0 100 200 300
Introduction Dynamical System PID control Experiment

PID-control of the right tank (step response tuning)

r, y
Valve opens/closes
6

Ziegler-Nichols PID-control
5

4
• K = 1.2/A = 3
3
• Ti = 2L = 20
0 100 200 300

u • Td = L/2 = 5
10

Disturbance eliminated i 40s


5
(Compare Tp = 3.4L = 34s)
0
0 100 200 300
Introduction Dynamical System PID control Experiment

Self-oscillation experiment

Self-oscillation model for the right tank


y

4.9
Ultimate gain and period
4.8
• Ku = 10 (from tuning)
4.7
• Tu = 25 (from figure)
0 20 40 60 80 100

u
Z-N PID-tuning:
3

K = 0.6Ku = 6
2
Ti = 0.5Tu ≈ 13
1
Td = 0.125Tu ≈ 3
0
0 20 40 60 80 100
Introduction Dynamical System PID control Experiment

PID-control of the right tank (self-oscillation tuning)


r, y
5

Valve opens/closes
4

0 50 100 150 200 250

u
10

0
0 50 100 150 200 250

You might also like