PID Controller Tuning

42
PID Controller Tuning Comparison of classical tuning methods By Ahmad Taan 1 University of Jordan, Department of Mechatronics Engineering, 2014

Transcript of PID Controller Tuning

Page 1: PID Controller Tuning

University of Jordan, Department of Mechatronics Engineering, 2014

PID Controller TuningComparison of classical tuning methods

By Ahmad Taan

1

Page 2: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 2

Content

Introduction

Objectives

Closed-loop Methods Ziegler-Nichols Closed-loop Tyreus-Luyben Damped Oscillation

Open-loop Methods Ziegler-Nichols Open-loop C-H-R Cohen-Coon Ciancone-Marlin Minimum Error Integral

Simulation and Results

GUI Description

Page 3: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 3

Introduction

PID tuning is to find the optimum Kp, Ki and Kd for the controller.

Control objective > Setpoint tracking, Disturbance rejection

Actions > Instantaneous proportional action, Reset integral action, Rate derivative action

Optimum criteria > Depends on application and system requirements

Page 4: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 4

Introduction

Conceptual real-world example

Driver(PID)

Car mechanism(Process)

Crosswind

Front wheels angle Car position

Driver’s eyes

(Feedback)

Desired position

Page 5: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 5

Introduction

PID configuration

𝐾 𝑝𝑒(𝑡)

𝐾 𝑖∫𝑒(𝑡)𝑑𝑡

𝐾 𝑑

d𝑒(𝑡)𝑑𝑡

SP

PV

Controller outpute(t)

Page 6: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 6

Introduction

Many tuning methods have been proposed for PID controllers each of which has its advantages and disadvantages. So, no one can be considered the best for all purposes.

Closed-loop methods tune the PID while it is attached to the loop while in open-loop methods the process is estimated using a FOPDT model

A comparison of the most popular methods is to be done

Simulation will be implemented for 1st, 2nd and 3rd-order processes, some of which are lag-dominant and the others are dead-time dominant.

IAE as criterion (which adds up the time and amplitude weight of the error)

Page 7: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 7

Objectives

Compare studied tuning methods for performance and robustness

Develop a GUI to do the comparison automatically for a given process model

Page 8: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 8

Closed-loop methods

Ziegler-Nichols Closed-loop

Tyreus-Luyben

Damped Oscillation

PID Process

D

C PV

Feedback

SP

Tuning

Page 9: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 9

Open-loop methods

Ziegler-Nichols Open-loop

C-H-R

Cohen-Coon

Ciancone-Marlin

Minimum Error IntegralPID Process

D

PV

Tuning

Page 10: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 10

Ziegler-Nichols Closed-loop

decay ratio as design criterion (stability condition)

Trial-and-error procedure to find and

Drives the process into marginal stability

Performs well when (lag dominant)

Performs very poorly for (dead-time dominant)

Fast recovery from disturbance but leads to oscillatory response

Not applicable to open-loop-unstable processes

Some processes do not have ultimate gain

Page 11: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 11

Ziegler-Nichols Closed-loop

Controller

P - -

PI -

PID

Procedure:

Set and to 0

Increase till sustained oscillation and find and

Use the correlations in the table below

Page 12: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 12

Tyreus-Luyben

An improvement for Ziegler-Nichols closed-loop to make response less oscillatory

More robust to imprecise model

Gives better disturbance response

Procedure:

Same procedure as Ziegler-Nichols closed-loop

Controller

PI -

PID

Page 13: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 13

Damped Oscillation

Another improvement for Ziegler-Nichols closed-loop

Solves the problem of marginal stability

Can be used with open-loop-unstable processes

0 10 20 30 40 50 60 70 800

0.2

0.4

0.6

0.8

1

1.2

4:1

Page 14: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 14

Damped Oscillation

Controller

PI -

PID

Procedure:[1]

Set and to 0

Increase till damping ratio is maintained and find only

Use the correlations in the table below to find and

Adjust till damping ratio is maintained again

[1] Liptak, Bela G., and Kriszta Venczel. Instrument Engineers' Handbook: Process Control 4 thed, Volume Two.

Page 15: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 15

Ziegler-Nichols Open-loop

¼ decay ratio as design criterion

Performs well when (lag dominant)

Performs very poorly for (dead-time dominant)

Fast recovery from disturbance but leads to oscillatory response

Page 16: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 16

Ziegler-Nichols Open-loop

Procedure:

The process dynamics is modeled by a first order plus dead time model

0

0.5

1

1.5

2

2.5

𝜏𝑚

𝑡𝑑

𝐾𝑚

Page 17: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 17

Ziegler-Nichols Open-loop

PID parameters are calculated from the table below

Controller

P - -

PI -

PID

Page 18: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 18

C-H-R

A modification of Ziegler-Nichols Open-loop

Aims to find the “quickest response with 0% overshoot” or “quickest response with 20% overshoot”

Tuning for setpoint responses differs from load disturbance responses

Page 19: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 19

C-H-R

Setpoint

Controller

0% overshoot

P- -

PI-

PID

Disturbance

P - -PI

4 -

PID

20% overshoot

- -

-

- -2.3 -

Procedure:

Same as Ziegler-Nichols Open-loop

Page 20: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 20

Cohen-Coon

Second in popularity after Ziegler-Nichols tuning rules

¼ decay ratio has considered as design criterion for this method

More robust

Applicable to wider range of (i.e. > 2)

PD rules available

Page 21: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 21

Cohen-Coon

Procedure:[1]

The process reaction curve is obtained by an open loop test and the FOPDT model is estimated as follows:

0

0.5

1

1.5

2

2.5

𝑡1

0 .632 𝑦 𝑠𝑠

𝑡 20 .283 𝑦𝑠𝑠

[1] Smith,C.A., A.B. Copripio; “Principles and Practice of Automatic Process Control”, John Wiley & Sons,1985

Page 22: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 22

Cohen-Coon

Controller

P

- -

PI

-

PD

-

PID

PID parameters are calculated from the table

Page 23: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 23

Ciancone-Marlin

Design criteria:

Minimization of IAE

Assumption of ±25% change in the process model parameters

A set of graphs are used for the tuning

Tuning for setpoint responses differs from load disturbance responses

Page 24: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 24

Ciancone-Marlin

Procedure:

Estimate the process with FOPDT as for Cohen-Coon method

Calculate the ratio

From the appropriate graph determine the values (, , )

Do the calculation to find the PID parameters

Page 25: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 25

Ciancone-Marlin

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

0 0.2 0.4 0.6 0.8 10.5

0.7

0.9

1.1

1.3

1.5

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

setp

oin

tD

istu

rbance

Page 26: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 26

Ciancone-Marlin

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 10

0.05

0.1

0.15

0.2

0.25

0 0.2 0.4 0.6 0.8 10

0.05

0.1

0.15

0.2

0.25

setp

oin

tD

istu

rbance

Page 27: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 27

Minimum Error Integral

Considers the entire closed loop response not like the ¼-decay tuning methods which considers only the first two peaks

Less oscillations in response than ¼-decay

Performs well when (lag dominant)

Performs very poorly for (dead-time dominant)

Tuning for setpoint responses differs from load disturbance responses

Different error integrals can be used (IAE, ISE, ITAE, ITSE)

Page 28: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 28

Minimum Error Integral

Procedure:

Estimate the process with FOPDT as for Cohen-Coon method

Use the appropriate table to find the PID parameters

Page 29: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 29

Minimum Error Integral

Error integral IAE ITAE

PI Controller

3PID Controller

Setpoint tracking table

Page 30: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 30

Minimum Error Integral

Error integral

IST IAE ITAE

P Controller 49PI Controller

859

PID Controller

749

56

Disturbance rejection table

Page 31: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 31

Simulation and Results

Simulation performed for two purposes:

Performance Assessment

Robustness Assessment

Simulation for two response objectives:

Set point tracking

Disturbance rejection

Page 32: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 32

Simulation and Results

Test cases include processes of:

Dead-time dominant (

Lag dominant

In-between cases

Complex poles

Unstable process

1.

Page 33: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 33

Simulation Example (Closed-loop)

Method

Ziegler-Nichols Closed-loop

0.63 0.24 0

Tyreus-Luyben 0.44 0.06 0

Damped Oscillation 0.76 0.28 0

Method IAE ITAE ISE

Ziegler-Nichols Closed-loop

4.287635 21.66082 2.14574

Tyreus-Luyben 16.21587 326.41346.60062

9

Damped Oscillation 3.657051 16.387961.93091

4

MethodOvershoo

tRise time

Settling time

Ziegler-Nichols Closed-loop

0 9.41773 20.10063

Tyreus-Luyben 0 41.5833 78.08328

Damped Oscillation 0 1.14425 17.86827

Page 34: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 34

Simulation Example (Open-loop)

Method

Ziegler-Nichols Open-loop

0.38 0.096 0

C-H-R 0.26 0.50 0Cohen-Coon 0.46 0.59 0

Ciancone-Marlin 0.65 0.61 0

Minimum Error Integral

0.36 0.19 0Method IAE ITAE ISE

Ziegler-Nichols Open-loop

10.62439 133.38774.67203

2

C-H-R 2.534889 4.2159791.91689

1

Cohen-Coon 2.234633.37898

81.6872

13

Ciancone-Marlin 2.31806 4.3374861.62383

8Minimum Error

Integral5.443972 29.46653

2.827566

Page 35: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 35

Robustness Assessment Example

Method

Ziegler-Nichols Closed-loop

7.38 5.13 0

Tyreus-Luyben 5.13 1.35 0Damped

Oscillation8.26 4.36 0

Method∆

%Overshoot

∆%Rise time

∆%Settling

timeZiegler-Nichols

Closed-loop2.53E+46 0.005528  

Tyreus-Luyben 0.780894 0.021236 0.222945Damped

Oscillation7.51E+58 0.002601  

Method ∆%IAE ∆%ITAE ∆%ISE

Ziegler-Nichols Closed-loop

65535 65535 65535

Tyreus-Luyben 0.578426 1.141222 0.534852Damped

Oscillation65535 65535 65535

---- After process parameters change

___ With original process parameters

Only Tyreus Luyben method could preserve the system stability in this example

Page 36: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 36

Results

MethodExample 1 Example 2 Example 3 Example 4 Example 5 Example 6Set. Dis. Set. Dis. Set. Dis. Set. Dis. Set. Dis. Set. Dis.

ZN-Closed - - 0.445789 0.283633 4.287635 4.173887 - - 2.220379 0.30278 13.41728 13.1761

Tyreus-Luyben - - 1.102981 1.070794 16.21587 15.8735 - - 1.180371 0.735662 50.61003 49.72932

Damped Oscillation - - 0.612071 0.236871 3.657051 3.591137 5.435811 0.227883 2.036804 0.273401 12.38092 12.11599

ZN-Open - - 0.477394 0.283206 10.62439 10.40774 6.652971 0.659678 2.429928 0.313117 16.09085 15.75623

C-H-R - - 0.421681 0.25155 2.534889 9.219109 4.185609 1.19549 1.174634 0.444315 6.268245 14.07367

Cohen-Coon - - 0.903723 0.290855 2.23463 2.054926 6.597632 1.828374 1.629527 0.386198 6.621596 6.228913

Ciancone-Marlin - - 0.595529 0.316686 2.31806 2.235919 10.79177 4.51365 2.417798 1.027116 7.183998 6.603842

Minimum Integral E. - - 0.426224 0.264112 5.443972 3.585999 5.563018 1.75844 1.204237 0.367181 14.60711 10.23431Method

Example 7 Example 8 Example 9 Example 10 Example 11 AverageSet. Dis. Set. Dis. Set. Dis. Set. Dis. Set. Dis. Set. Dis.

ZN-Closed 121.105 33.93362 24.0696 13.75189 19.49302 38.61412 - - - - 26.434 14.8908

Tyreus-Luyben 82.82336 75.37933 19.84668 36.28508 74.32392 145.8678 - - - - 35.1576 46.42

Damped Oscillation 74.90803 33.03475 18.32106 13.56714 17.76392 34.84851 0.8825 4.247397 2.4965 0.5507 13.849 10.269

ZN-Open 203.0636 48.10066 41.21583 19.02999 20.80098 40.49981 - - - - 37.669 16.8813

C-H-R 71.53518 62.488 15.79547 23.05193 10.29351 35.97429 - - - - 14.026 18.337

Cohen-Coon 82.23544 40.9686 18.73435 17.27418 11.04538 19.81969 - - - - 16.25 11.106

Ciancone-Marlin 72.66559 54.42106 17.36664 24.75492 10.93768 21.3825 - - - - 15.5346 14.4069

Minimum Integral E. 61.47353 37.4164 14.01516 15.94768 17.36168 29.64329 - - - - 15.0118 12.402

Performance assessment

Page 37: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 37

Results

MethodExample 12 Example 13 Example 14 Average

Set. Dis. Set. Dis. Set. Dis. Set. Dis.

ZN-Closed 0.30377 0.000776 - - 0.485444 0.391874 0.3946 0.1963

Tyreus-Luyben 0.013379 0.003065 0.578426 0.008142 0.027758 0.000149 0.2065 0.003785

Damped Oscillation 0.325173 0.164803 - - 0.322041 0.132218 0.3236 0.1485

ZN-Open 0.283954 0.000466 - - - - 0.283954 0.00466

C-H-R - 0.128355 0.619157 - 0.220264 - 0.4197 0.128355

Cohen-Coon - - - 0.903723 - 0.148872 - 0.52629

Ciancone-Marlin 0.004346 0.012664 0.009255 0.595529 0.01106 0.001862 0.00822 0.20335

Minimum Integral E. 0.293021 - 0.295112 0.426224 0.165632 0.101298 0.2512 0.26376

Robustness assessment

Page 38: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 38

GUI Description

Page 39: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 39

GUI Description

Page 40: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 40

GUI Description

Page 41: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 41

GUI Description

Page 42: PID Controller Tuning

April 15, 2023University of Jordan, Department of Mechatronics Engineering, 2014 42

GUI Description