You are on page 1of 39

Introduction

Dynamical System

PID control

PID control - Simple tuning methods


Ulf Holmberg

Experiment

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Tank process

Tank with level control


Two connected tanks
Pump for in-flow of water
Level measurements
Valve for out-flow (disturbance)

Experiment

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

Open-loop system
System
u

Actuator

Control object

Sensor

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

Controller

System

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


stead of pump voltage

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

Time constant and stationary gain


u(t)

y (t)
Kp

Step

Step response

1
t

System

ExampleStove plate
u(t) power to stove plate
y (t) temperature on plate

Time constant T
Stationary gain Kp

Introduction

Dynamical System

PID control

Experiment

Time constant and stationary gain


u(t)

y (t)
Kp u

Step

Step response

u
t

System

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

System

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

System

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

System

t
Au
L T

Step response model from experiment:


T Time constant
Kp Stationary gain
L Dead-time
A see figure

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

Self-oscillation model

Ku

System

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

y
Tu

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

PID structure
r

Controller

System

r reference, set-point (SP)


y output, measured signal to be regulated
e = r y control error

PID-controller:
P
e

I
D

Introduction

Dynamical System

PID control

Experiment

P-controller

e(t)

u(t)
Ke0
e0
t e

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

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
t

1
Ti

I-del

I-part
surface under e(t) so far
becomes as big as constant error e0 in time Ti
used to eliminate remaining error

Ti

Introduction

Dynamical System

PID control

Experiment

D-part (derivator)
e(t)

D-del

t e

D-part
slope on e(t)
used to damp oscillations

Td de
dt

D-del

Introduction

Dynamical System

PID control

PID-controller structure

Control signal = P + I + D
1
u(t) = K [e(t) +
Ti

e(s)ds + Td

Three parameters to tune K , Ti and Td

de(t)
]
dt

Experiment

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Ziegler-Nichols step response method

Measure A and L from step response


Tp expected time constant for closed-loop system

Controller
P
PI
PID

K
1/A
0.9/A
1.2/A

Ti

Td

3L
2L

L/2

Tp
4L
5.7L
3.4L

Experiment

Introduction

Dynamical System

PID control

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

Experiment

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
P
PI
PID

K
Ti
Td
Tp
0.5Ku
Tu
0.4Ku 0.8Tu
1.4Tu
0.6Ku 0.5Tu 0.125Tu 0.85Tu

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

Step response
Step response model for the left tank
10

5.4

5.3

5.2

Estimated from figure:

5.1

Au = 0.1, u = 0.5

5
6

A = 1/5

4.9
5
4.8

L=3

4
4.7
3

4.6

4.5
0

100

200

300

20

30

40

50

60

Introduction

Dynamical System

PID control

Experiment

P-control of the left tank

Valve opens/closes
r, y
3

Ziegler-Nichols P-control

2.5

K = 1/A = 5
0

20

40

60

80

100

120

140

160

180

Stationary error after valve

opening even if offset is used

0
0

20

40

60

80

100

120

140

160

180

Introduction

Dynamical System

PID control

Experiment

PI-control of the left tank

Valve opens/closes
r, y

Ziegler-Nichols PI-control

K = 0.9/A = 4.5

2.5
0

50

100

150

200

Ti = 3L = 9
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

Valve opens/closes

Ziegler-Nichols PID-control

r, y
3.2

K = 1.2/A = 6

Ti = 2L = 6

2.8
2.6

Td = L/2 = 1.5

2.4
0

50

100

150

200

No stationary error after valve

disturbance
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 (brvrde) och y (rvrde)

Ultimate gain and period

3
2

Ku = 15 (from tuning)

Tu = 10 (from figure)

0
0

20

40

60

80

100

Z-N PID-tuning:

u (styrsignal)
10

K = 0.6Ku = 8
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

50

100

150

200

250

u
10

0
0

200

250

Introduction

Dynamical System

PID control

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

Experiment

Introduction

Dynamical System

PID control

Experiment

Step response
Step response model for the right tank
4.7
8

Roughly estimated (bad


precision!):

4.6
7

4.5

Au 0.2, u = 0.5

4.4

A = 2/5

4.3

L 10

4.2
4

From larger figure:


Au = 0.15, L = 8

4.1
3

3.9
0

100

200

300

400

30

40

50

60

70

Introduction

Dynamical System

PID control

Experiment

PI-control of the right tank

Valve opens/closes
r, y

Ziegler-Nichols PI-control

K = 0.9/A = 2.25

2
0

100

200

300

Disturbance eliminated in 60s


(Compare Tp = 5.7L = 57s)

0
0

Ti = 3L = 30

100

200

300

Introduction

Dynamical System

PID control

Experiment

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

Valve opens/closes
r, y
6

Ziegler-Nichols PID-control

K = 1.2/A = 3

Ti = 2L = 20

3
0

100

200

300

u
10

Td = L/2 = 5

Disturbance eliminated i 40s


(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)
Tu = 25 (from figure)

4.7
0

20

40

60

80

100

Z-N PID-tuning:

K = 0.6Ku = 6
Ti = 0.5Tu 13
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

3
0

50

100

150

200

250

50

100

150

200

250

u
10

0
0

You might also like