PID control - Simple tuning methods - h H

Introduction Dynamical System PID control Experiment PID control - Simple tuning methods Ulf Holmberg...

4 downloads 719 Views 2MB Size
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

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

r

+

e −

Controller

u

System

y

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

u

System

y

T

Example–Stove plate • u(t) power to stove plate • y (t) temperature on plate

• Time constant T • Stationary gain Kp

t

Introduction

Dynamical System

PID control

Experiment

Time constant and stationary gain u(t)

y (t) Kp ∆u

Step

Step response

∆u t

u

System

y

• Step response size proportional to step size • Start step from equilibrium

T

t

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

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

r

+

e −

Ku

u

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

+

e −

Controller

u

y

System

• r reference, set-point (SP) • y output, measured signal to be regulated • e = r − y control error

PID-controller: P e

I D

+

u

Introduction

Dynamical System

PID control

Experiment

P-controller

e(t)

u(t) Ke0 e0 t e

K

u

Control signal Proportional to control error

t

Introduction

Dynamical System

PID control

Experiment

P-controller with offset

e(t)

u(t)

Ke0

u0 e0

u0 Offset t e

K

+

u

Control signal Proportional to error plus ’offset’

Example: speed control of car u0 given gas at control-start

t

Introduction

Dynamical System

PID control

Experiment

I-part (integrator) e(t)

I-del

e0

e0 t

e

1 Ti

R

e

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

t

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

t

Introduction

Dynamical System

PID control

PID-controller structure

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

Z

t

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

9

5.3

8

5.2

Estimated from figure:

5.1

7

• A∆u = 0.1, ∆u = 0.5

5 6

⇒ A = 1/5

4.9 5 4.8

• L=3

4 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

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

u

opening even if offset is used

4

2

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

3

• K = 0.9/A = 4.5

2.5 0

50

100

150

200

u

4

• 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

3

• Ti = 2L = 6

2.8 2.6

• Td = L/2 = 1.5

2.4 0

50

100

150

200

• No stationary error after valve

u

disturbance • Fast and damped

5

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

Ultimate gain and period

3 2

• Ku = 15 (from tuning)

1

• 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

5

0 0

20

40

60

80

100

120

Introduction

Dynamical System

PID control

Experiment

Ziegler-Nichols PID from self-oscillation model t, y

5

0 0

50

100

150

50

100

150

200

250

u 10

5

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

6

• A∆u ≈ 0.2, ∆u = 0.5

4.4

⇒ A = 2/5

4.3

5

• L ≈ 10

4.2 4

From larger figure: A∆u = 0.15, L = 8

4.1 3

4

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

Valve opens/closes r, y

Ziegler-Nichols PI-control

3

• K = 0.9/A = 2.25

2 0

100

200

300

u

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

3

2

1

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

5

• K = 1.2/A = 3

4

• Ti = 2L = 20

3 0

100

200

300

u 10

• Td = L/2 = 5

Disturbance eliminated i 40s (Compare Tp = 3.4L = 34s)

5

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

u

Z-N PID-tuning:

3

K = 0.6Ku = 6 Ti = 0.5Tu ≈ 13 Td = 0.125Tu ≈ 3

2

1

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

5

0 0