32
Aerospace Power & Electronics Simulation Workshop 2004 Controller Tuning for DC Motor Speed Control Using Genetic Algorithms Saurabh Jain Dan Simon September 21, 2004

Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

Aerospace Power & Electronics Simulation Workshop 2004

Controller Tuning for DC Motor Speed Control Using

Genetic Algorithms

Saurabh Jain Dan Simon

September 21, 2004

Page 2: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

2Aerospace Power & Electronics Simulation Workshop 2004

Presentation Overview

Purpose of researchSolution strategyIntroduction to Genetic Algorithms (GA’s)

Concept of GAsBasic AlgorithmRepresentation

Simplorer and Matlab implementationConclusions and future work

Page 3: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

3Aerospace Power & Electronics Simulation Workshop 2004

Purpose of research

To investigate a new method (Diploid GA) of motor controlTo use Simplorer to evaluate design performanceTo consider a broad optimization function for parameter evaluation

Page 4: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

4Aerospace Power & Electronics Simulation Workshop 2004

Problem Statement

Speed Control of DC MotorsController tuning (finding Kp & Ki)

Aerospace ApplicationsFlywheel energy storageFlight control trim surfacesHydraulicsFansThrust vector controlFuel pumps

Page 5: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

5Aerospace Power & Electronics Simulation Workshop 2004

Presentation Overview

Purpose of researchSolution strategyIntroduction to Genetic Algorithms (GA’s)

Concept of GAsBasic AlgorithmRepresentation

Simplorer and Matlab implementationConclusions and future work

Page 6: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

6Aerospace Power & Electronics Simulation Workshop 2004

Solution Strategy

Spe

edS

peed

Motion Profile

Page 7: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

7Aerospace Power & Electronics Simulation Workshop 2004

Optimization function I

Minimize Overshoots

Page 8: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

8Aerospace Power & Electronics Simulation Workshop 2004

Optimization function II

1 1 2 3 41 2max ( ) ( )s t a m m m ms tc s tc

F w i t k O k O k O k O= + + + +

( ( ), ( ))s mF i t O tφ=

min ormax 1/s sF F

is the maximum overshoot

is the rotor current

are the weighting factorsik

mO

ai

Page 9: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

9Aerospace Power & Electronics Simulation Workshop 2004

Presentation Overview

Purpose of researchSolution strategyIntroduction to Genetic Algorithms (GA’s)

Concept of GAsBasic AlgorithmRepresentation

Simplorer and Matlab implementationConclusions and future work

Page 10: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

10Aerospace Power & Electronics Simulation Workshop 2004

Introduction to GAs

Genetic algorithms (GA’s) are a technique to solve problems which need optimizationGA’s are a subclass of Evolutionary Computing

GA’s are based on Darwin’stheory of evolution

Page 11: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

11Aerospace Power & Electronics Simulation Workshop 2004

Concept of GAs IMost often one is looking for the best solution in a specific subset of solutionsThis subset is called the search space (or state space)Every point in the search space is a possible solutionTherefore every point has a fitness value, depending on the problem definitionGA’s are used to search thesearch space for the bestsolution, e.g. a minimum

Difficulties are the local minima and the startingpoint of the search

0 100 200 300 400 500 600 700 800 900 10000

0.5

1

1.5

2

2.5

Page 12: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

12Aerospace Power & Electronics Simulation Workshop 2004

Concept of GAs II

Starting with a subset of n randomly chosen solutions from the search space (i.e. chromosomes). This is the population

This population is used to produce a next generation of individuals by reproduction

Individuals with higher fitness have more chance to reproduce (i.e. natural selection)

Page 13: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

13Aerospace Power & Electronics Simulation Workshop 2004

The Basic Algorithm0 START : Create random population of n

chromosomes1 FITNESS : Evaluate fitness f(x) of each

chromosome in the population2 NEW POPULATION

0 SELECTION : Based on f(x)1 RECOMBINATION : Cross-over chromosomes2 MUTATION : Mutate chromosomes3 ACCEPTATION : Reject or accept new one

3 REPLACE : Replace old with new population: the new generation

4 TEST : Test problem criterium5 LOOP : Continue step 1 – 4 until criterium is

satisfied

Page 14: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

14Aerospace Power & Electronics Simulation Workshop 2004

Representation IGenetic information is stored in the chromosomesEach chromosome is build of DNAThe chromosome is divided in parts: genesGenes code for propertiesThe posibilities of the genes for one property is called: alleleEvery gene has an unique position on the chromosome: locus

Page 15: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

15Aerospace Power & Electronics Simulation Workshop 2004

Types of GAs

Haploid GAsEasy to useLess Computation

Diploid GAsGood for Dynamic EnvironmentsMore Diversity

Page 16: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

16Aerospace Power & Electronics Simulation Workshop 2004

Representation IIThe entire combination of genes is called genotypeA genotype develops to a phenotypeAlleles can be either dominant or recessiveDominant alleles will always express from the genotype to the phenotypeRecessive alleles can survive in the population for many generations, without being expressed

Page 17: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

17Aerospace Power & Electronics Simulation Workshop 2004

Cell Division

Page 18: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

18Aerospace Power & Electronics Simulation Workshop 2004

Genetic Operators

Meiosis

Selection

Next Population

Mutation

Page 19: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

19Aerospace Power & Electronics Simulation Workshop 2004

Haploid Reproduction

3.7

3.9

4.3

Haploid adults

fusion

meiosis

“crossover” P’

diploid“zygote”

haploidchild

HA

PLO

ID

Page 20: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

20Aerospace Power & Electronics Simulation Workshop 2004

Diploid Reproduction

Page 21: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

21Aerospace Power & Electronics Simulation Workshop 2004

Presentation Overview

Purpose of researchSolution strategyIntroduction to Genetic Algorithms (GA’s)

Concept of GAsBasic AlgorithmRepresentation

Simplorer and Matlab implementationConclusions and future work

Page 22: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

22Aerospace Power & Electronics Simulation Workshop 2004

Simplorer and Matlab implementation: Matlab Processing

Page 23: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

23Aerospace Power & Electronics Simulation Workshop 2004

Simplorer and Matlab implementation: Simplorer Processing

Page 24: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

24Aerospace Power & Electronics Simulation Workshop 2004

Simplorer Model

xn

POW

CONSTDivisorMUL

CONSTSet_Point_Speed_rpm

NEG GAIN

P_Control

I

I_Control Controller

LIMIT

NEG

Control_Out

GAIN

Measured_Iamps

GAINMeasured_Hz

M

MOS1

MOS2

MOS3

MOS4

D1

D2

D3

D4

E

DCMOTOR

D5

NEG

SiM2SiMSIMPLORER Link InterfaceSiM2SiM

SIM2SIM1

P := P

I := I

OVERSHOOT

INTEGRAL

OVERSHOOT

INTEGRAL

Count1_Reset

Count1_Enable

PI_SET_STATETRANS2

EQUBL

LOAD_TORQUE

TRANS3

TRANS4

TRANS5 TRANS6

EQUBL

TRIGGER

TRANS1TERMINATION_STATE

MEASURE

CONDITION

CONST

CONST1

EQUBLTRIGGER1

EVENT

Igain

Pgain

Igain

Pgain

CONDITION.VAL := CONDITION.VALTRIGGER.VAL[0] := TRIGGER.VAL[0]

IA

LOAD

GAIN

GAIN1

D

DIFF

CALC

e:=m c²

PROBE21

CONST

CONST2

CONST

CONST3

CALC

e:=m c²

PROBE22EVENT1

CONST

IMAX

CONST

RIMAX

CONST

CONST4

IAE

TF := TF

OVERSHOOT

OVERSHOOT1

OVERSHOOT OVERSHOOT2

OVERSHOOT

OVERSHOOT3

EQUBL

O_SUM

CLR

Q2

Q3

Q1

Q0

Binary

CLK

CLK

AND2

Q=>BS

CLR

Q2

Q3

Q1

Q0

Binary

CLK

DAC

VAL[3:0]INPUT

RESET_CLK

DAC1

CONST

AND2B1

DAC

VAL[3:0]INPUT

DAC2

Q=>BS

Q=>BS

GA

IN

GA

IN

Count3_Reset

Count3_Enable

Count4_Reset

Count4_Ebable Simulink_Trigger

Load_Torque

TRANS9

Load_Torque

TRANS10

CLR

Q2

Q3

Q1

Q0

Binary

DAC

VAL[3:0]INPUT

DAC3

CLR

Q2

Q3

Q1

Q0

Binary

DAC

VAL[3:0]INPUT

DAC4

GAIN

GAIN Q=>BS

Q=>BS

AND2

AND2

CLK

Q=>BS

CLK

Q=>BS

GAIN

GAIN

EQU

TIMERST := ST

Page 25: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

25Aerospace Power & Electronics Simulation Workshop 2004

Functional Blocks

Page 26: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

26Aerospace Power & Electronics Simulation Workshop 2004

State Flow

Page 27: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

27Aerospace Power & Electronics Simulation Workshop 2004

Simulink Model

Page 28: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

28Aerospace Power & Electronics Simulation Workshop 2004

Simulation Results

Plot of Population Average Fitness and Maximum fitness in each generation vs Number of Generations

Parameters

Population Size 200Max Generations 150

Mea

n fit

ness

Page 29: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

29Aerospace Power & Electronics Simulation Workshop 2004

Simulation ResultsR

espo

nse

Page 30: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

30Aerospace Power & Electronics Simulation Workshop 2004

Simulations Results

Page 31: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

31Aerospace Power & Electronics Simulation Workshop 2004

Simulation Results

Page 32: Controller Tuning for DC Motor Speed Control Using Genetic ...Saurabh Jain Dan Simon September 21, 2004 Aerospace Power & Electronics Simulation Workshop 2004 2 Presentation Overview

32Aerospace Power & Electronics Simulation Workshop 2004

Conclusions and Future work

Considering the optimization criteria we have achieved satisfactory results. Longer GA runs are expected to perform even betterThis can be expanded to encompass more parameters from the systemReal time implementation (on-line tuning)Comparison with other tuning methods / haploid GA’s