Smart Systems for Industrial Applications. Группа авторов
Чтение книги онлайн.
Читать онлайн книгу Smart Systems for Industrial Applications - Группа авторов страница 22
2.5.1.1 Initialization
This is the initial phase in which a set of individuals are produced. Every individual is a solution to the problem and they are characterized by set of parameters called as genes. They are combined to form chromosome (Figure 2.3).
2.5.1.2 Fitness Function
Fitness function is the most crucial part of the algorithm. The capability of an individual entity to race with other entities is determined using fitness function. Fitness score is bestowed to every individual and the possibility for the selection of an individual for reproduction is entirely based on this score. It is the function that the algorithm optimizes. The word fitness is taken from evolutionary theory. Fitness is the word coined from evolutionary theory.
2.5.1.3 Evaluation and Selection
Population generation is followed by evaluation. It is the process in which the fitness level of the newly generated off springs is estimated using a fitness function. The inferior individuals are eradicated during selection and the best individual proceeds to the next generation.
Figure 2.4 Crossover procedure.
2.5.1.4 Crossover
The most important phase of GA is crossover. For every mating parent, a crossover point is randomly selected from the genes. Figure 2.4 illustrates the crossover procedure. The procedure has three steps. First step is the selection of parents from the population. Crossover points are further selected. In Figure 2.4, the crossover points are shown as dotted lines. After the crossover points are selected, their values are exchanged to obtain a new offspring.
2.5.1.5 Mutation
Mutation is the process in which the values of gene are altered. The gene to be mutated are curtained by the mutation parameter. Mutation results in the generation of novel features in the offspring. Occasionally, the feature may lead the offspring to be poor or superior. Figure 2.5 exhibits the mutation phase.
Figure 2.5 Mutation.
2.5.2 GA Parameter Tuning
GA execution involves tuning of three parameters, namely, crossover probability, mutation probability, and the number of optimal generations. The population evolution depends on crossover and mutation whereas number of generations are chosen such that the solution is an optimal one. Studies had been carried out with crossover probability ranging between 0.2 and 0.1. Its corresponding mutation probability is taken as 0.4, and hence, maximum fitness is reached. Figures 2.6 and 2.7 show the results of GA tuning.
Figure 2.6 Fitness with crossover probabilities.
Figure 2.7 Fitness with mutation probabilities.
2.6 Simulation Results and Discussion
2.6.1 MATLAB Genetic Algorithm Tool Box
MPLAB established by Microchip Technology is an exclusive integrated software setting for the improvement of applications in PIC microcontrollers. MPLABX is the state-of-the art edition of MPLAB, developed on the Net Beans platform. They support project management, code editing, debugging, and programming of Microchip 8-bit PIC and AVR (including ATMEGA) microcontrollers, 16-bit PIC24 and dsPIC microcontrollers, as well as 32-bit SAM (ARM) and PIC32 (MIPS) microcontroller (Figure 2.8).
GA finds its extensive application in control engineering. MATLAB has an integrated GA toolbox which helps the control engineers to apply genetic search methods effectively. Figure 2.9 is the GA toolbox in finding solution to control system design problems.
2.6.2 Simulation Results
A high level matrix language containing M file with MATLAB code is developed to set the five parameters for position control of the piston. The software is analyzed for different values of reference input and the characteristics graph are taken down with the gain of Kp, Ki, and Kd.
Figure 2.8 Flowchart of genetic algorithm.
2.6.2.1 Reference = 500 (Error)
When the reference value is set as 500 and the Kp, Ki, and Kd values are taken manually (10, 0.5, and 3) without using GA, then the output will be coming as follows. Figures 2.10, 2.11 and 2.12 shows the control error, control action and system output.
Figure 2.9 Genetic algorithm tool box.
Figure 2.10 Control error.