A Particle Swarm Optimization (PSO)

7 downloads 288605 Views 724KB Size Report
The Basic PSO algorithm consists of the velocity: □ ..and position: .... Deals well with complex, dynamic, poorly defined problems that AI has problems with.
A Particle Swarm Optimization (PSO) Primer With Applications Brian Birge

Overview p

Introduction

p

Theory

p

Applications

p

Computational Intelligence

p

Summary

Introduction p

Subset of Evolutionary Computation n n n n

p

Behaviorally Inspired n

p

Genetic Algorithms Evolutionary Programming Evolution Strategies Genetic Programming

Developed out of attempts to model bird flocks and fish schools

Emergence n

Complex behavior from simple rules

Theory - Qualitative Details p p

PSO Algorithm in a nutshell Searches Hyperspace of Problem for Optimum n

Define problem to search p p

n

Initialize Population p p

n n n

How many dimensions? Solution criteria? Random initial positions Random initial velocities

Determine Global Best Position Determine Personal Best Position Update Velocity and Position Equations

Theory - Equations p

The Basic PSO algorithm consists of the velocity:

vi ( k + 1) = vi ( k ) + γ 1i ( pi − xi ( k ) ) + γ 2i ( G − xi ( k ) )

p

..and position: p p p p p p

p

xi ( k + 1) = xi ( k ) + vi ( k + 1)

i – particle index k – discrete time index v – velocity of ith particle x – position of ith particle p – best position found by ith particle (personal best) G – best position found by swarm (global best, best of personal bests) γ1,2 – random numbers on the interval [0,1] applied to ith particle

Theory - Equations .. p

The Common PSO Algorithm

vi ( k +1) = φ ( k ) vi ( k ) + α1 γ1i ( pi − xi ( k ) ) +α2 γ 2i ( G − xi ( k ) )  p p

p

φ - Inertia function α1,2 – Acceleration constants

As training progresses using a decreasing linear inertia function, the influence of past velocity becomes smaller.

Applications p

PSOt – A Matlab Toolbox

p

Function Optimization

p

Neural Net Training n

p

Replacing Standard Backpropagation with PSO

Engineering Examples

Applications - PSOt, A Matlab Toolbox p

Matlab: scientific computing language run in interpreter mode on a wide variety of operating systems.

p

Toolbox: Suite of Matlab ‘plug-in’ programs developed by third parties.

p

The PSOt includes: n n

Standalone MISO function optimizer Neural Net Toolbox ‘plug-in’ for training

Applications – Function Optimization

1 0.8 0.6 0.4

p

Example: Schaffer’s ‘f6’ function

0.2 0 20 10

20 10

0

>> pso('f6',2,[-100,100;-100,100],0)

0

-10

-10 -20

20 Pos dimension 2

PSO: 1/2000 iterations, GBest = 0.499643. PSO: 26/2000 iterations, GBest = 0.0858499. PSO: 51/2000 iterations, GBest = 0.00197516. PSO: 76/2000 iterations, GBest = 0.00197516. PSO: 89/2000 iterations, GBest = 0.00197516.

-20

0

-20

-40 -10 0

-5

0

5 10 15 20 Pos dimension 1 PSO: 2 dimensional prob search, Gbestval=0.0019752

25

ans = -4.400531404313024e-002 4.527939759978006e-003 1.975158000277422e-003

Gbest value

10

-1

10

-2

10

-3

10

0

10

20

30

40 epoch

50

60

70

80

Applications – Artificial Neural Network Training TRAINPSO: 100/1000 epochs, gbest SSE = 0.428059141 mv = 4, iwt = 0.8537691795 . . . TRAINPSO: 225/1000 epochs, gbest SSE = 0.04639357585 mv = 4, iwt = 0.7953969313 TRAINPSO: 250/1000 epochs, gbest SSE = 0.04454761798 mv = 4, iwt = 0.7837224817 ********* Reached Goal ******** TRAINPSO: 256/1000 epochs, gbest SSE = 0.01641486174 mv = 4, iwt = 0.7809206137 ********* end of training ********

mv=4 inertia wt=0.78092, 9 dimensions, GbestVal= 0.01641486174

1

10

0

10 gbest

Example of finding a neural net approximation to XOR

-1

10

-2

10

0

50

100

150 epoch

200

250

300

2

4

6 4 2

pos dim 9

p

0

-2 -4 -10

-8

-6

-4 -2 pos dim 1

0

Applications – Engineering Examples p

Human Tremor Analysis n n

PSO used to evolve neural network weights Neural network distinguishes between p p

n n n

Subjects with Parkinson’s Disease, Essential Tremor Normal Subjects

60 input, 12 hidden neurons, 2 outputs 100% success with generalization Very fast human tremor classification with very small computational hit.

Applications – Engineering Examples.. p

Ingredient Mix Optimization n

n

p

Refers to a mixture of ingredients used to grow production strains of micro-organisms that naturally secrete or manufacture something of interest. PSO provided optimized ingredient mix much better than then current state of the art

Battery Pack State of Charge Estimation n n n

PSO used in conjunction with Backpropagation Important in development of electric and hybrid vehicle technology PSO used to optimize training set for neural network in addition to training.

Computational Intelligence p

Artificial Intelligence n

p

Computational Intelligence n

p

Practical adaptation concepts, paradigms, algorithms, and implementations that enable or facilitate appropriate actions (intelligent behavior) in complex and changing environments.

CI is different than AI n

p

A name for a paradigm in which people attempt to elicit intelligence from machines.

Deals well with complex, dynamic, poorly defined problems that AI has problems with.

Examples n n n

Neuro-Fuzzy controllers ‘Alternatively’ trained neural nets Evolution of Fuzzy-Expert Systems using PSO

Summary PSO is inspired but not based on animal behavior. p A few simple rules result in complex action, i.e. Emergence. p PSO is simple to code and has small computational cost. p Successful in application to wide range of engineering and computer science problems. p

References p

Birge, B., 2003, PSOt, A Particle Swarm Optimization Toolbox for Matlab, IEEE Swarm Intelligence Symposium Proceedings, April 24-26

p

Eberhart, R., Simpson, P., Dobbins, R., 1996, Computational Intelligence PC Tools, Academic Press, Inc., pp. 212-223.

p

Haykin, S., 1999, Neural Networks, a Comprehensive Foundation, Second Edition, Prentice-Hall

p

Houck, C., Joines, J., and Kay M., 1995, A Genetic Algorithm for Function Optimization: A Matlab Implementation, ACM Transactions on Mathematical Software, Submitted 1996

p

Kennedy, J., Eberhart, R., 1995, Particle Swarm Optimization, from Proc. IEEE Int’l. Conf. on Neural Networks (Perth, Australia), IEEE Service Center, Piscataway, NJ, IV: 1942-1948

p

Kennedy, J., Eberhart, R., Shi, Y., 2001, Swarm Intelligence, Academic Press, Inc.