automatic synthesis using genetic programming of improved pid tuning rules matthew j. streeter...

27
Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California [email protected] Martin A. Keane Econometrics, Inc. Chicago, Illinois [email protected] John R. Koza Stanford University Stanford, California [email protected] ICONS 2003, Faro Portugal, April 8-11

Post on 18-Dec-2015

232 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules

Matthew J. StreeterGenetic Programming, Inc.Mountain View, California

[email protected]

Martin A. KeaneEconometrics, Inc.

Chicago, [email protected]

John R. KozaStanford UniversityStanford, California [email protected]

ICONS 2003, Faro Portugal, April 8-11

Page 2: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Outline

• Overview of Genetic Programming (GP)

• Controller Synthesis using GP

• Improved PID Tuning Rules

Page 3: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Overview of Genetic Programming (GP)

Page 4: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Overview of GP

• Breed computer programs to solve problems

• Programs represented as trees in style of LISP language

• Programs can create anything (e.g., controller, equation, controller+equations)

Page 5: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Pseudo-code for GP

1) Create initial random population

2) Evaluate fitness

3) Select fitter individuals to reproduce

4) Apply reproduction operations (crossover, mutation) to create new population

5) Return to 2 and repeat until solution found

Page 6: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Random initial population

• Function set: {+, *, /, -}

• Terminal set: {A, B, C}

+ +

*

1

2

+

*

A B

C

(1) Choose “+” (2) Choose “*” (3-5) Choose “A”, “B”, “C”

Page 7: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Fitness evaluation

• 4 random equations shown

• Fitness is shaded areaTarget curve

(x2+x+1)

Page 8: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Crossover

• Subtrees are swapped to create offspring

0.234Z + X – 0.789

X 0.789

0.234 Z

*

+

ZY(Y + 0.314Z)

Z Y

*

0.314 Z

*Y

+

*1 1

2 25 5

8 9

3 34 46 7 76

X 0.789

+

0.314 Z

*Y

+

Y + 0.314Z + X – 0.789

Z Y

*

*

0.234 Z

*

0.234Z Y2

Pickedsubtree

Parents

Offspring

Pickedsubtree

Page 9: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Controller Synthesis Using GP

• Program tree directly represents control block diagram

• Special functions for internal feedback / takeoff points

• Fitness measured in terms of ITAE, sensitivity, stability

Page 10: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Control problems solved

• Control of two and three lag plants, non-minimal phase plant, three lag plant w/ 5 second delay

• Parameterized controllers for three lag plant with variable internal gain, . . .

• Parameterized controllers for broad families of plants

Page 11: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Improved PID Tuning Rules

Page 12: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Basis for Comparison: the Åström-Hägglund controller

• Applied dominant pole design to 16 plants from 4 representative families of plants

• Used curve-fitting to obtain generalized solution

• Equations are expressed in terms of ultimate gain (Ku) and ultimate period (Tu)

Page 13: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

The Åström-Hägglund controller

0.56 0.12+ 2

0.25*Ku KueEquation 1 (b):

Equation 2 (Kp) :

1.6 1.2+

20.72* *

Ku KuuK e

Equation 3 (Ki):

Equation 4 (Kd):

1.6 1.2+ 2

1.3 0.38+ 2

0.72* *

0.59* *

Ku Kuu

Ku Kuu

K e

T e

1.6 1.2 1.4 0.56+ +

2 20.108* * * *

K Ku uK Ku uu uK T e e

Page 14: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Experiment 1: Evolving tuning rules from scratch

• 4-branch program representing 4 equations (for K, Ki, Kd, and b) in terms of Ku & Tu

• Different from other GP work in that we are evolving tuning, not topology

• Fitness in terms of ITAE, sensitivity, stability

Page 15: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Function & terminal sets

• Function set: {+, *, -, /, EXP, LOG, POW}

• Terminal set: {KU, TU, }

Page 16: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Fitness measure

• ITAE penalty for setpoint & disturbance rejection

• Penalty for minimum sensor noise attenuation (sensitivity)

• Penalty for maximum sensitivity to noise (stability)

• Evaluation on 30 plants (superset of A-H’s 16 plants)

• Controllers simulated using SPICE

Page 17: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Reference signal

Disturbance signal

1.0 1.0

10-3 10-3

-10-6 10-6

1.0 -0.6

-1.0 0.0

0.0 1.0

Six combinations of reference and

disturbance signal heights

22

20

10

10

0

)()10()(

u

u

u

u

u

T

T

Ttu

T

T

t

CdtteTtBdttet

• Penalty is given by:

• B and C are normalizing factors

Fitness measure: ITAE penalty

Page 18: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Fitness measure: stability penalty

• 0 reference signal, 1 V noise signal

• Maximum sensitivity is maximum amplitude of noise signal + plant response

• Penalty is 0 if Ms < 1.5

2(Ms-1.5) if 1.5 Ms 2.0

20(Ms-1.0) is Ms > 2.0

Page 19: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Fitness measure: sensitivity penalty

• 0 reference signal, 1 V noise signal

• Amin is minimum attenuation of plant response

• Penalty is 0 if Amin > 40 db

(40-Amin)/10 if 20 db Amin 40 db

2+(20-Amin) if Amin < 20 db

Page 20: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Experimental setup

• 1000 node Beowulf cluster with 350 MHz Pentium II processors

• Island model with asynchronous subpopulations

• Population size: 100,000

• 70% crossover, 20% constant mutation, 9% cloning, 1% subtree mutation

Page 21: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Åström-Hägglund equations

K Ki

Kd b

Page 22: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Evolved equations

K Ki

Kd b

Page 23: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Experiment 1: Conclusions

• Evolved tuning rules are better on average than A-H, but not uniformly better

• Dominant pole design provides optimal solution for individual plants

• Maybe we can improve on A-H curve-fitting

Page 24: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Experiment 2: Evolving increments to A-H equations

• Same program structure, fitness measure, etc.

• Values of evolved equations are now added to A-H equations

Page 25: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Evolved adjustments to A-H equations

K Ki

Kd b

Page 26: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Results

• 91.6% of setpoint ITAE of Åström-Hägglund (89.7% out-of-sample)

• 96.2% of disturbance rejection ITAE of A-H (95.6% OOS)

• 99.5% of 1/(minimum attenuation) of A-H (99.5% OOS)

• 98.5% of maximum sensitivity of A-H (98.5% OOS)

Page 27: Automatic Synthesis Using Genetic Programming of Improved PID Tuning Rules Matthew J. Streeter Genetic Programming, Inc. Mountain View, California mjs@tmolp.com

Conclusions

• Evolved controller is slightly better than Åström-Hägglund

• Not much room for improvement (in terms of our fitness measure) with PID topology

• We have gotten better results evolving tuning+topology (also bootstrapping on A-H)