tuning pid controller

45
Tuning PID Controller Institute of Industrial Control, Zhejiang University, Hangzhou, P. R. China 2013/03/27

Upload: neci

Post on 31-Jan-2016

151 views

Category:

Documents


27 download

DESCRIPTION

Tuning PID Controller. Institute of Industrial Control, Zhejiang University, Hangzhou, P. R. China 20 13/03/27. Single-loop PID Control System. Problem: For an unknown extended controlled process, how to design and tune our PID controller ?. Proportional-Integral-Derivative (PID) Controller. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Tuning PID Controller

Tuning PID Controller

Institute of Industrial Control, Zhejiang University, Hangzhou, P. R.

China

2013/03/27

Page 2: Tuning PID Controller

Single-loop PID Control System

ysp u(t)

+_

ym(t)

++ y(t)MV

DVs

Disturbance Path

Sensor & Transmitter

Final Control Element

Control Path

PIDController

Extended Controlled Process

(广义对象)

Problem: For an unknown extended controlled process, how to design and tune our PID controller ?

Page 3: Tuning PID Controller

Proportional-Integral-Derivative (PID) Controller

00

1 ( )( ) ( ( ) ( ) ) ,

t

c di

de tu t K e t e d T u

T dt

1( ) (1 )c c d

i

G s K T sT s

Td is the derivative time.

Ideal PID Controller

Industrial PID Controller (design and realization ?)

1 1( ) 1

1

dc c

d i

d

T sG s K

T T ssA

The derivative gain Ad = 10.

Page 4: Tuning PID Controller

Problem Discussion

Explain the function of PID controller for a stable controlled process.

Analyze the effect of PID parameter changes on control performances

How can we realize the industrial PID controller in Simulink ?

PID tuning example (See ../PIDControl /PIDLoop.mdl )

Page 5: Tuning PID Controller

Contents Selection of PID Controller Types ( PID

控制器类型选择) Tuning of PID Controller Parameters

(控制器参数整定) Flow Control (流量控制) Level Control (液位控制) Reset Windup and Its Prevention (积分

饱和与防止) Summary

Page 6: Tuning PID Controller

Type Selection of PID Controllers

*1: For some slow processes with long time constants, the derivative action is suggested to use. However, if there exists strong measurement noises, a first-order or average filter should be added.

Please analyze the rule of type selection ?

Controlled Variable

Controller Type

Temperature /

CompositionPID*1

Flow / Pressure

/Liquid-LevelPI

Liquid-Level P

Page 7: Tuning PID Controller

PID Tuning Concept

Process Characteristics

Controller Kc or PB,

Ti ,Td

Page 8: Tuning PID Controller

Offline Tuning Based on Process Parameters: K, T,τ

Step 1: switch the controller to manual mode, change the output of controller in step form, and record input/output data of controller.

Step 2: obtain process characteristics: K, T,τ, from the step response data.

Step 3: set the PID parameters Kc, Ti , Td, and switch the controller to automatic mode.

Step 4: increase or decrease the gain Kc until obtaining the satisfactory response.

Page 9: Tuning PID Controller

0 10 20 30 40 50 60 70 80 90 100

54

56

58

60

62

%

Controller Output

0 10 20 30 40 50 60 70 80 90 10066

68

70

72

74

76

78

80%

Transmitter Output

Simulation of Offline Tuningstep 1: Step Testing

See ../PIDControl/PIDLoop.mdl

Process Fluid

Fuel Oil

T(t)

u(t)

y(t) %, TO

%, CO ysp(t)

Ti (t)

TC27

TT27

Furnace

Page 10: Tuning PID Controller

0 10 20 30 40 50 60 70 80 90 10066

68

70

72

74

76

78

80

%

min

Transmitter Output

Step 2: Obtain Process Para.

Tt O 632.0

OO ttT 283.0632.05.1

,%

,%final initial

final initial

TO TOTOK

CO CO CO

Page 11: Tuning PID Controller

Step 3: Obtain Initial PID Para.

(Ziegler-Nichols Method)

Controller Kc Ti Td

P

PI

PID

1 T

K

0.9 T

K

1.2 T

K

3.33

2.0 0.5

Note: the above method was developed for 0 T

Page 12: Tuning PID Controller

Initial Value

Step 3: Obtain Initial PID Para.

(Lambda Tuning Method)

Controller

Kc Ti Td

P

PI T

PID T τ/2

1 T

K

Note: the above method is not limited by the value of

/T

1 T

K

1 T

K

0

0.2

Page 13: Tuning PID Controller

0 50 100 15059

59.5

60

60.5

61

61.5

62

62.5

63

Time, min

%

Output of Transmitter

Ziegler-Nichols methodLambda tuning methodset point

Simulation Example #1

K = 1.75

T = 6.5,τ= 3.3 min

For PI Controller,

Z-N tuning: Kc = 1.0, Ti = 11 min

Lambda tuning: Kc = 0.56, Ti = 6.5 min

Page 14: Tuning PID Controller

0 50 100 150 20059

59.5

60

60.5

61

61.5

62

62.5

63

Time, min

%

Output of Transmitter

Z-N tuningLambda tuningset point

Simulation Example #2

K = 1.75

T = 6.5,τ= 6.3 min

For PI Controller,

Z-N tuning: Kc = 0.53, Ti = 20.8 min

Lambda tuning: Kc = 0.30, Ti = 6.5 min

Page 15: Tuning PID Controller

Procedure of Online Tuning: Ziegler-Nichols Technique

Step 1: with the controller online (in automatic mode), remove all the reset (Ti = maximum) and derivative (Td = 0) modes. Start with a small Kc value.

Step 2: make a small set point or load change and observe the response of CV.

Step 3: if the response is not continuously oscillatory, increase Kc, or decrease PB, repeat step 2.

Step 4: Repeat step 3 until a continuous oscillatory response is obtained.

Page 16: Tuning PID Controller

0 10 20 30 40 5058

59

60

61

62

63

64

65

66

Time, min

%

Output of Transmitter

set point

Kc = 0.5 Kc = 1

Kc = 2

Kc = 4

Kc = 3.5 Tu

Ti = 6000 min, Td = 0 min

Example of Online Tuning

See ../PIDControl/PIDLoop.mdl

Process Fluid

Fuel Oil

T(t)

u(t)

y(t) %, TO

%, CO ysp(t)

Ti (t)

TC27

TT27

Furnace

Page 17: Tuning PID Controller

Online Tuning: Ziegler-Nichols Technique

Controller

Kc Ti Td

P 0.5Kcu

PI 0.45Kcu Tu /1.2

PID 0.65Kcu Tu /2 Tu /8

The gain that gives these continuous oscillations is the ultimate gain ( 临界增益 ), Kcu. The period of the oscillations is called the ultimate period ( 临界周期 ), Tu. the ultimate gain and the ultimate period are the characteristics of the process being tuned. The following formulas are then applied:

Page 18: Tuning PID Controller

0 20 40 60 80 10059

60

61

62

63

%

Output of Transmitter

0 20 40 60 80 10040

60

80

100

Time, min

%Output of Controller

set point

Inlet temp. drops 5 Cent.

Kcu = 3.4, Tu = 11 min

PID: Kc = 2.2, Ti = 5.5 min, Td = 1.4 min

Online Tuning Result

See ../PIDControl/PIDLoop.mdl

Process Fluid

Fuel Oil

T(t)

u(t)

y(t) %, TO

%, CO ysp(t)

Ti (t)

TC27

TT27

Furnace

Page 19: Tuning PID Controller

0 10 20 30 40 5058

59

60

61

62

63

64

65

66

Time, min

%

Output of Transmitter

set point

Kc = 0.5 Kc = 1

Kc = 2

Kc = 4

Kc = 3.5 Tu

Ti = 6000 min, Td = 0 min

Limitation of Online Tuning

Process Fluid

Fuel Oil

T(t)

u(t)

y(t) %, TO

%, CO ysp(t)

Ti (t)

TC27

TT27

Furnace

Page 20: Tuning PID Controller

Auto-tuning Based on Relay Feedback ( 基于继电反馈的参数自整

定 )

PID

Auto

Tune

uyspControlled

Process+ _

yme(t)

Relay

(+)

Here we suppose the process gain > 0

Page 21: Tuning PID Controller

Relay Feedback Example

)12)(15(

)2exp(0.2

)(

)(

ss

s

sU

sYm

The controlled process can be described as

The amplitude of relay controller is d = ±2.0

PID

Auto

Tune

uyspControlled

Process+ _

yme(t)

Relay

(+)

Page 22: Tuning PID Controller

Response of Relay Feedback

Oscillation period TU & amplitude AY

(振荡周期与幅度) ?

0 5 10 15 20 25 30 35 40 45 5058.5

59

59.5

60

60.5

61

61.5Ym

0 5 10 15 20 25 30 35 40 45 5047

48

49

50

51

52

53U

min

See the detailed results:

../ PIDLoopAutoTuning.mdl

Page 23: Tuning PID Controller

The Ultimate Gain ( 临界增益 ) Kcu Calculation

/4da

YCU A

dK 4

0 5 10 15 20 25 30 35 40 45 5047

48

49

50

51

52

53U

min

经 FT 变换可知,控制输出的一次谐波幅度为

而对应的控制器临界增益为

/4d

Page 24: Tuning PID Controller

Online Z-N Tuning Parameters

Controller

Kc Ti Td

P 0.5Kcu

PI 0.45Kcu Tu /1.2

PID 0.65Kcu Tu /2 Tu /8If we use a PID controller, then we select the following parameters ……

Page 25: Tuning PID Controller

Closed-loop Response of PID Feedback System

0 20 40 60 80 100 120 140

60

65

70

75

Ym

0 20 40 60 80 100 120 14040

60

80

100U

min

Above auto-tuning method can be applied to other controlled processes ?

Page 26: Tuning PID Controller

Characteristics of Flow Loops

Fast dynamic response Zero dead time, which results in an infinite

controller gain in every tuning equation Large measurement noise To decrease the change of control valve, a

PI controller is common used with very small proportional action and a large integral action to approximate an integral controller. (Why?)

Page 27: Tuning PID Controller

0 20 40 60 80 10045

50

55

60

65

%

Output of Transmitter

0 20 40 60 80 1000

20

40

60

Time, min

%

Output of Controller

Kc = 4, Ti =2 minKc = 1, Ti = 0.5 min

Tuning Example of Flow Loops

u(t)

y(t)

% CO

% TOysp(t)

F(t)

FC

See ../PIDControl/FlowLoop.mdl

Please compare the proportional gain with the integral gain

Page 28: Tuning PID Controller

C201

FIC 102

C301

Product

LT201

LC201

LT301

LC301

FC 201 FC 302

Examples of Level Loops

Page 29: Tuning PID Controller

Characteristics of Level Loops

Very often levels are integrating processes

There are two types of possible control objectives when the input flow varies: (1) Tight Level Control;(2) Average Level Control

(“ 液位均匀控制” )

Page 30: Tuning PID Controller

Tight Level Control The objective is to control the level tightly at

set point, and the output flow can be allowed to vary without limitation

If a level process happens to be self-regulated, and it is possible to obtain K, T andτ, the above tuning techniques can be used directly

If a level process is integrating, a PI controller is common used with large proportional action and a very small integral action

Page 31: Tuning PID Controller

Average Level Control The objective is to smooth the output flow

from the tank, which feeds the downstream unit, the level in the tank must be allowed to “float” between a high and a low level

A P controller is common used in Average Level Control with a small proportional gain

Tuning: the gain should be set to be as small as possible, as long as the level changes between a high and a low level for the expected flow deviation from the average flow.

Page 32: Tuning PID Controller

Example of Level Control

See ../PIDControl/ LevelLoop.mdl

u(t) % CO

% TOh(t)

Fi(t)

Fo(t)

A

ysp

y(t)LC41

LT41

Page 33: Tuning PID Controller

Analysis of Average Level Control Systems

Dynamic equation of the controlled process:

where A is the area of the tank.

Suppose

LC

u(t)

y(t)

% CO

% TO

ysp(t)

h(t)

Fi(t)

Fo(t)

A

)()()(

0 tFtFdt

tdhA i

)()(0 tuKtF V

,)()(maxh

thty

Page 34: Tuning PID Controller

Analysis of Average Level Control Systems (cont.)

For a proportional controller, Gc = - Kc,

+-

+Gc

Fi (s)

Fo (s) h(s)ysp

KV

u(s)

sA

1

max

1

h

y(s)

1

1

1)(

)(

max

max

max

sKK

Ah

sAh

KKsAh

KK

sF

sF

VC

VC

VC

i

o

1

11

1

1

)(

)(

max

max

max

sKK

AhKKsAh

KKsAh

sF

sy

VC

VCVCiPlease analyze the above models.

Page 35: Tuning PID Controller

Ysp

Ym

Y

Uman

SW1

e u

PID Man/Auto

0.2

Kv

10

KT

1

10s

Gp

Fo

Fi

DU

Examples of Average Level Control Systems

Please see ../PIDControl/ AverageLevelLoop.mdl

Page 36: Tuning PID Controller

Simulation Results of P-type Average Level Control

0 10 20 30 40 50 60 70 80 90 1009

9.5

10

10.5

11

m3/

hr

Fin, Fout

0 10 20 30 40 50 60 70 80 90 10046

48

50

52

54

time, min

%

Ysp, Ym Kc = -0.5

Fin

Kc = -2.0

Page 37: Tuning PID Controller

Reset Windup Problem

Please see the following simulation example

…/PIDControl/PidLoopwithLimit.mdl

+-

++

d(t)

Controlled Process ym(t)

ysp(t) e(t) uc11C

I

KT s

up

Page 38: Tuning PID Controller

Simulation Result with Reset Windup in a Single-Loop

System

Discussion:

Which difference exists between reset windup and the open or closed status of the control valve completely ?

Page 39: Tuning PID Controller

The Principle of Preventing Reset Windup

Principle: remove the reset or integral action if the control output is beyond the normal operation range.

+-

++

d(t)

A Controlled Process ym(t)

ysp(t)KC

++

1

1

sTI

e(t) uc up

maxmax

maxmin

minmin

)(,

)(),(

)(,

)(

utuifu

utuuiftu

utuifu

tu

c

cc

c

p

Page 40: Tuning PID Controller

0 20 40 60 80 100 120 140 160 180 20055

60

65

70

75

%

Ysp, Ym

0 20 40 60 80 100 120 140 160 180 2000

50

100

150

%

time, min

Uc, Up

Anti-reset Windup Example

Page 41: Tuning PID Controller

Industrial PID Controller

+-

++

d(t)

A Controlled Process ym(t)

ysp(t)

++

1

1

sTI

1

1

sA

TsT

K

D

D

DC

PID Controller

e(t) uc up

KC+

ysp(t)

++

1

1

sTI

Derivative Action First PID Controller

1

1

sA

TsT

D

D

D

e(t) uc up ++

d(t)

A Controlled Process ym(t)

PID1

PID2

Page 42: Tuning PID Controller

Summary Selection of PID Controller Types Tuning of PID Controller Parameters Tuning of PID Controller for Flow Loops Tight / Average Level Control Reset Windup and Its Prevention

Page 43: Tuning PID Controller

Problem Discussion For an unknown stable temperature control

system, can you determine PID parameters in Offline and Online tuning methods ?

Please realize the industrial PID controller in Simulink ?

For the fast flow control loop, show me your tuning principle and explain why.

For the AVERAGE level control loop, show me your tuning principle and explain why.

Explain the existing reason of reset windup and show me your prevention schemes

Page 44: Tuning PID Controller

Exercise 3.1

A controlled process is shown in the Problem 2-1 (p.34) in Automated Continuous Process Control.

(1) calculate its characteristics parameters K, T and τ;

(2) decide on the action of the valve and the controller;

(3) tune your PID controller.

Page 45: Tuning PID Controller

Exercise 3.2

/4da

0 5 10 15 20 25 30 35 40 45 5047

48

49

50

51

52

53U

min

假设 Relay( 继电器法 ) 镇定 PID 参数时,控制器输出如上图所示,信号周期为 Tu, 振幅为 d=2 。证明经傅立叶变换,控制输出的一次谐波幅度为 /4d