Вы находитесь на странице: 1из 35

Batch Members D.V.Kiran Priya(09981A0209) B.Sarat Chandra Prabhu(09981A0202) P.Venkat Rao(09981A0227) V.

Sri Ram(08981A0264

POSITION CONTROL OF DC MOTOR USING GENETIC ALGORITHM BASED PID CONTROLLER


PROJECT GUIDE B. KUMARA SWAMY

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 traction.

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 control.

ADVANTAGES OF POSITION CONTROL OVER SPEED CONTROL


Always uses a feedback of real position. In speed control, the response is not very fast whereas in position control the rate of response is fast. Accuracy can be increased by using a controller in position control.

POSITION CONTROL SYSTEM


Position control system is a closed loop control system whose output is the desired angular 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.

BLOCK DIAGRAM OF POSITION CONTROL OF DC MOTOR

CONTROLLERS
Proportional Controllers. Integral Controllers. Proportional-Plus-Integral Controllers. Proportional-Plus-Derivative Controllers. Proportional-Plus-Integral-Plus-Derivative Controllers.

PID CONTROLLER
For control over steady state and transient errors we use a PID controller. The transfer function of a PID controller is given as, D(S)=Kp+K/s+KdS

In order to get acceptable performance the constants Kp, Kd and Ki must be adjusted. This adjustment process is called tuning the controller

TUNING METHODS OF PID CONTROLLER


1) 2) 3) 4) 5) Trial and Error Process Reaction Curve Cohen-Coon Method Ziegler and Nichols method Genetic algorithm method

ZIEGLER AND NICHOLAS METHOD


In 1942 Ziegler and Nichols described simple mathematical Procedures for tuning PID controllers. Ziegler-Nichols formulae for specifying the controllers are based on plant step responses. There are generally two methods in tuning the PID controller First method uses two parameters i.e. delay time and time constant to determine the characteristics.

Second method uses ultimate gain and ultimate period of oscillation to determine the characteristics.

GENETIC ALGORITHM METHOD


Genetic Algorithms (GAs) are the most widely known evolutionary search algorithms. GA is a stochastic global adaptive search optimization technique based on the mechanisms of natural selection. By using the fitness function and genetic algorithm process optimal parameters of a PID controller can be obtained.

FLOW CHART OF GENETIC ALGORITHM GENERATION


Basically, GA consists of three main stages: Selection Reproduction Evaluation Replacement

CONVERSION OF DC MOTOR INTO A MODEL

OUTPUT ANGULAR DISPLACEMENT VS. TIME

Angular Displacement vs. Time

POSITION CONTROL SYSTEM

PROCEDURE (ZIEGLER-NICHOLS METHOD)


First the PID controller is made such that it operates as only a P controller. The values of gain Kp is decided where continuous oscillations are obtained. This Kp is taken as Ku (Ultimate gain) which is used for further calculations of the PID parameters. The response is observed and the period of oscillation is noted, this value is taken as Pu (Ultimate period of oscillation)

PID PARAMETERS CALCULATION


KU = 20.28 PU = 0.145 Controller P KP = 11.929 KI = 164.537 KD = 0.215752 PI PID Kc Ku/2 Ku/2.2 Ku/1.7 Ti Pu/1.2 Pu/2 Td Pu/8

RESPONSE AFTER INSERTING A PID CONTROLLER

TRANSFER FUNCTION OF THE SYSTEM


Transfer Function with PID using Ziegler Nichols Method 0.2592 2 + 14.32 + 197.4 0.00077 4 + 0.0539 3 + 1.7 2 + 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)

Time Domain Specifications (Zn)


Rise Time: 0.0786 Settling Time: 1.3741 Overshoot: 60.3943 Peak: 1.6039 Peak Time: 0.2220

STATE SPACE ANALYSIS


For the considered system we find the state space matrices which are used to find the Kp Ki and Kd values by using the genetic algorithm method which will be discussed further.

FITNESS FUNCTION
Genetic Algorithm is an iterative process where the operation is made on a set of individuals each time. These individual values are nothing but the values that are best suited for the best results. Fitness function is the main function which is the base of the Genetic Algorithm, all the 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 generations are made from those obtained best fittest value.

MATLAB FITNESS FUNCTION


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

GA TOOLBOX
GA tool box is obtained by typing gatool in the command window in the Matlab.

GA TOOLBOX
In order to solve a problem using the GA Toolbox we need to give certain inputs to it, they are 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 genetic algorithm process.

The final best values are displayed in the box named Final Point below the result panel.

SELECTION
Selection of the initial individuals in the GA toolbox is done by something called the random number generator which is present in the Matlab. GA mainly runs on the basis of the fitness values obtained after each iteration and the reproduction is done based on those individual fitness values to create best offspring's. 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)

REPRODUCTION
After obtaining the fitness values of the first generation we need to reproduce these values of 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

EVALUATION AND REPLACEMENT


After setting up all these values in the GA toolbox we need to finally fix the number of generations till the algorithm must run before obtaining the best fittest value of each individual. After each iteration the parents are replaced with the newly generated children and the process goes on. This is called as replacement. The total number of generations the GA runs will come into this context, in our project we took Generations 100 (Default)

PLOT FUNCTIONS
GA toolbox also specifies certain plots for visual understanding of the process that is going on, the following is the plot we took in our project.

OBTAINED PID PARAMETERS


As said earlier, the random number generator used in GA cannot predict the number which is given as the initial value of the individual. So, the toolbox is run for many number of times till the best values with desired response is obtained.

The values we have obtained are as follows,


Kp = 15.295365240419484 Ki = 165.6372567960566

Kd = 0.21415197220282672

STEP RESPONSE FOR GA METHOD

COMPARISON OF THE TWO METHODS


Ziegler Nichols Method
Rise time Settling time Overshoot Peak Peak time : : : : : 0.0786 1.3741 60.3943% 1.6039 0.2220

Genetic Algorithm Method


Rise time Settling time Overshoot Peak Peak time : : : : : 0.0699 0.8138 52.4331% 1.5243 0.2014

COMBINED STEP RESPONSE OF BOTH THE METHODS

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 much more effective than the Ziegler Nichols method.

THANK YOU

QUERIES ??

Вам также может понравиться