Position control of DC motor using Genetic Algorithm based PID controller

27
POSITION CONTROL OF DC MOTOR USING GENETIC ALGOR ITHM BASED PID CONTROLLER PROJECT GUIDE B. KUMARA SWAMY Batch Members D.V.Kiran Priya(09981A0209) B.Sarat Chandra Prabhu(09981A0202) P .Venkat Rao(09981 A0227) V.Sri Ram(08981A0264

Transcript of Position control of DC motor using Genetic Algorithm based PID controller

Page 1: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 1/35

POSITION CONTROL OF DC MOTOR USINGGENETIC ALGORITHM BASED PIDCONTROLLERPROJECT GUIDE

B. KUMARA SWAMY

D.V.

B.Sarat Chan

P.V

Page 2: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 2/35

ADVANTAGES OF DC MOTOR

• Ease of control.

• Quick starting, stopping, reversing and acceleration.

• Delivers high starting torque

• DC motors are conveniently portable and well suited to special applications such as

Page 3: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 3/35

CONTROL OF DC MOTORS

Speed control

Controlling the Dc Motor based on its speed is called speed control.

Flux control method

Armature control method

Voltage control method

o Multiple voltage control

o Ward-Leonard system

Position control

Controlling the position of the rotor to control the motor is called position con

Page 4: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 4/35

ADVANTAGES OF POSITION CONTROL OSPEED CONTROL

• Always uses a feedback of real position.

• In speed control, the response is not very fast whereas in position control the rate of

fast.

• Accuracy can be increased by using a controller in position control.

Page 5: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 5/35

POSITION CONTROL SYSTEM

• Position control system is a closed loop control system whose output is the desired a

 position of the DC motor.

Applications:

1. Machine tool position control system

2. Constant tension control of sheet rolls in paper mills.

3. Control of sheet metal thickness in hot rolling mills.

4. Radar tracking system.

5. Missile guidance systems.

6. Roll stabilization of ships etc. 

Page 6: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 6/35

BLOCK DIAGRAM OF POSITION CONTRODC MOTOR

Page 7: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 7/35

CONTROLLERS

• Proportional Controllers.

• Integral Controllers.

• Proportional-Plus-Integral Controllers.

• Proportional-Plus-Derivative Controllers.

• Proportional-Plus-Integral-Plus-Derivative Controllers.

Page 8: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 8/35

PID CONTROLLER

• For control over steady state and transient errors we use a PID controller. The transf

a PID controller is given as,

D(S)=K  p+K/s+K dS

• In order to get acceptable performance the constants Kp, K d and Ki must be adjuste

adjustment process is called tuning the controller

Page 9: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 9/35

TUNING METHODS OF PID CONTROLL

1) Trial and Error

2) Process Reaction Curve

3) Cohen-Coon Method

4) Ziegler and Nichols method

5) Genetic algorithm method

Page 10: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 10/35

ZIEGLER AND NICHOLAS METHOD

• In 1942 Ziegler and Nichols described simple mathematical Procedures for tuning P

controllers.

• Ziegler-Nichols formulae for specifying the controllers are based on plant step respo

• There are generally two methods in tuning the PID controller

• First method uses two parameters i.e. delay time and time constant to determine

characteristics.

• Second method uses ultimate gain and ultimate period of oscillation to determin

characteristics.

Page 11: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 11/35

GENETIC ALGORITHM METHOD

• Genetic Algorithms (GAs) are the most widely known evolutionary search algorithm

• GA is a stochastic global adaptive search optimization technique based on the mech

natural selection.

• By using the fitness function and genetic algorithm process optimal parameters of a

controller can be obtained.

Page 12: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 12/35

FLOW CHART OF GENETIC ALGORITHGENERATION

• Basically, GA consists of three main stages:

• Selection

• Reproduction

• Evaluation

• Replacement

Page 13: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 13/35

CONVERSION OF DC MOTOR INTO A MO

Page 14: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 14/35

OUTPUT ANGULAR DISPLACEMENT VS.

Angular Displacement vs. Time

Page 15: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 15/35

POSITION CONTROL SYSTEM

Page 16: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 16/35

PROCEDURE (ZIEGLER-NICHOLS METH

• First the PID controller is made such that it operates as only a P controller.

• The values of gain K  p is decided where continuous oscillations are obtained.

• This K  p is taken as K u (Ultimate gain) which is used for further calculations of t

 parameters.

The response is observed and the period of oscillation is noted, this value is tak(Ultimate period of oscillation)

Page 17: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 17/35

PID PARAMETERS CALCULATION

• K U = 20.28

• PU = 0.145

• K P = 11.929

• K I = 164.537

• K D = 0.215752

Controller Kc  Ti 

P Ku/2 -

PI Ku/2.2 Pu/1.2

PID Ku/1.7 Pu/2

Page 18: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 18/35

RESPONSE AFTER INSERTING A PIDCONTROLLER

Page 19: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 19/35

TRANSFER FUNCTION OF THE SYSTE

• Transfer Function with PID using Ziegler Nichols Method

0.2592 + 14.32 + 197.4

0.00077 + 0.0539 + 1.7 + 14.32 + 197.4 

• Matlab coding to find the values of the step response

num1=[0.2592 14.31528 197.448];

• den1=[0.0007 0.0539 1.7002 14.31528 197.448];

• tf1 = tf(num1,den1)

• responseZN = stepoinfo(tf1)

Page 20: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 20/35

Time Domain Specifications (Zn)

• Rise Time: 0.0786

• Settling Time: 1.3741

• Overshoot: 60.3943

• Peak: 1.6039

• Peak Time: 0.2220

Page 21: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 21/35

STATE SPACE ANALYSIS

• For the considered system we find the state space matrices which are used

Kp Ki and Kd values by using the genetic algorithm method which will be disc

further .

Page 22: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 22/35

FITNESS FUNCTION

• Genetic Algorithm is an iterative process where the operation is made on a set of in

time. These individual values are nothing but the values that are best suited for the

• Fitness function is the main function which is the base of the Genetic Algo

calculations are based on the fitness values obtained from the fitness function.

 Fitness function gives the fitness value for each set of individuals and the future gmade from those obtained best fittest value.

Page 23: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 23/35

MATLAB FITNESS FUNCTION

• Using the state space analysis obtained we write the fitness function as follows.

Page 24: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 24/35

GA TOOLBOXGA tool box is obtained by typing

“gatool” in the command window in

the Matlab.

Page 25: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 25/35

GA TOOLBOX

• In order to solve a problem using the “GA Toolbox” we need to give certain inputs t

• Fitness Function

•  Number of unknown variables

• The lower and upper bounds of each of the variables

• After giving these values there will be a start button which is used to start the gen process.

• The final best values are displayed in the box named “Final Point” below the result p

Page 26: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 26/35

SELECTION

• Selection of the initial individuals in the “GA toolbox” is done by something calle

number generator which is present in the Matlab.

• GA mainly runs on the basis of the fitness values obtained after each itera

reproduction is done based on those individual fitness values to create best offspring

In GA toolbox we need to specify the following in this criteria• Fitness scaling –  Rank based

• Selection function –  Roulette wheel

• Population type –  Double Vector

• Population size –  20 (Default)

Page 27: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 27/35

REPRODUCTION

• After obtaining the fitness values of the first generation we need to reproduce th

each individual obtained in the first generation to create offspring's.

• In GA toolbox we need to specify the following in this criteria

• Crossover Fraction –  0.9

Mutation function –  Constrain dependent• Crossover function –  Single Point

Page 28: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 28/35

EVALUATION AND REPLACEMENT

• After setting up all these values in the GA toolbox we need to finally fix th

generations till the algorithm must run before obtaining the best fittest value of each

• After each iteration the parents are replaced with the newly generated children an

goes on. This is called as replacement.

The total number of generations the GA runs will come into this context, in our proj• Generations –  100 (Default)

Page 29: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 29/35

PLOT FUNCTIONS

• GA toolbox also specifies certain plots for visual understanding of the process tha

the following is the plot we took in our project.

Page 30: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 30/35

OBTAINED PID PARAMETERS

• As said earlier, the random number generator used in GA cannot predict the num

given as the initial value of the individual. So, the toolbox is run for many numb

the best values with desired response is obtained.

• The values we have obtained are as follows,

• K  p

 = 15.295365240419484

• K i = 165.6372567960566

• K d = 0.21415197220282672

Page 31: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 31/35

STEP RESPONSE FOR GA METHOD

Page 32: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 32/35

COMPARISON OF THE TWO METHOD

Ziegler Nichols Method Genetic Algorithm M

• Rise time : 0.0786

• Settling time : 1.3741

• Overshoot : 60.3943%

• Peak : 1.6039

• Peak time : 0.2220

• Rise time :

• Settling time :

• Overshoot :

• Peak :

• Peak time :

Page 33: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 33/35

COMBINED STEP RESPONSE OF BOTH METHODS

Page 34: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 34/35

CONCLUSION

• We have controlled the position of the DC Motor successfully.

• We have proved that the Genetic Algorithm method of tuning the PID controller is m

effective than the Ziegler Nichols method.

Page 35: Position control of DC motor using Genetic Algorithm based PID controller

8/14/2019 Position control of DC motor using Genetic Algorithm based PID controller

http://slidepdf.com/reader/full/position-control-of-dc-motor-using-genetic-algorithm-based-pid-controller 35/35

THANK YOU

QUERIES ??