Adaptive Real-Coded Genetic Algorithm for Identifying Motor Systems

In this paper, the main objective is to identify the parameters of motors, which includes a brushless direct current (BLDC) motor and an induction motor. The motor systems are dynamically formulated by the mechanical and electrical equations. The real-coded genetic algorithm (RGA) is adopted to identify all parameters of motors, and the standard genetic algorithm (SRGA) and various adaptive genetic algorithm (ARGAs) are compared in the rotational angular speeds and fitness values, which are the inverse of square differences of angular speeds. From numerical simulations and experimental results, it is found that the SRGA and ARGA are feasible, the ARGA can effectively solve the problems with slow convergent speed and premature phenomenon, and is more accurate in identifying system’s parameters than the SRGA. From the comparisons of the ARGAs in identifying parameters of motors, the best ARGA method is obtained and could be applied to any other mechatronic systems.


Introduction
The mechanical commutator of the brushless direct current (BLDC) motor [1] is replaced by electronic switches, which supply current to the motor windings as a function of the rotor position.A BLDC motor is one of the permanent magnetic synchronous motors, and has advantages of simple structure, product easily, and low cost [2].Due to their favorable electrical and mechanical properties, high starting torque and high efficiency, the BLDC motor are widely used in most servo applications such as actuation, robotics, machine tools, and so on.
Many literatures [3]- [6] have discussed motor operations.For a quality BLDC motor, proper maintenances and applications are important, and inherently more reliable, more efficient, and with current electronics technology, more cost effective than the standard electrical fans and controllers [3].Therefore, the BLDC motor has advantages of high performance, low noise and long lifespan.The conventional dc motor can be represented by the mathematical model.The technicians often wanted to test the performance or measure the parameters of a motor, and the ordinary differential equations of a motor were solved by Runge-Kutta method [4] [5].However, the precise of a BLDC motor requires its accurate parameters, which can be measured or estimated.In order to identify parameters of BLDC motors, the genetic algorithms were used to search for precise parameters [6].
Recently, due to rapid improvements in power devices and microelectronics, the field-oriented control and feedback linearization techniques have increased induction motor drives for high-performance applications possible [7].Induction motors are the most widely used motors in industry because they are simple to build, rugged, reliable and have good self-starting capability.Many advanced algorithms have been investigated to control induction motors, especially the vector control [8].To design controllers, nonlinear motor models must be used for identification and optimization.Several methods have been proposed to tackle the problem of induction machine parameter estimation [9] [10].
Genetic algorithm (GA) is a searching process based on natural selection, and now is used as a tool for searching the large, poorly understood spaces that arise in many application areas of science and engineering [11].In this method, a large set of configurations forms a population with new generations created by selection, crossover and mutation of the current population.It is hoped that this evolution process can increase the fitness value of the population to a near optimal value.However, conventional GA often has slow convergent speed and premature phenomenon in engineering applications.In order to overcome these shortcomings, many researchers have made great efforts to improve the performance [12] [13] by proposing a variety of programs, such as base on the overall fitness value, average square deviation of population and dual species sub-population etc.
In this paper, the real-coded encoding scheme of fixed length to randomly generate the initial population is used by means of roulette wheel.This standard genetic features by use of only three basic genetic operators: selection operator, crossover operator and mutation operator, simplifies the process of genetic evolution, and easy to be understood.However, the fitness value may occur slow convergent speed and premature phenomenon in a traditional real-coded genetic algorithms (RGA) [14], and the adaptive genetic algorithm (ARGA) is proposed to solve the problems and to find a solution near to the maximum optimization of the motor system.This paper is organized as follows.Firstly, the BLDC and induction motors' equations are established.Secondly, the algorithms in the SRGA and ARGAs are presented and discussed.Thirdly, comparisons between the SRGA and ARGA in numerical simulations and experimental results are discussed and it is concluded that the ARGAs are better than SRGA.

Standard Real-Coded Genetic Algorithm (SRGA)
The RGA [15] [16] is an optimization searching algorithm, which simulates evolution mechanism on a computer-based platform in conjunction with natural selection and genetic mechanism.The chromosomes are expressed by vectors and each element of vectors is called a gene.The standard RGA (SRGA) has stationary crossover probability and mutation probability in the evolutional process.If the crossover probability and mutation probability are stationary values, the individual will be lack of diversity in each generation.

Adaptive Real-Coded Genetic Algorithm (ARGA)
It is important that crossover probability and mutation probability are set for genetic algorithms, the improper settings will cause falling into local optimum algorithms in search and the premature convergence.Therefore, an efficient method for a fast setting is essential.For this point, a mechanism to adjust the crossover probability and mutation probability according to the algorithmic performance is considered [17].In this paper, the multi-method ARGA for parameters' identification of the electrical fan system will be employed.

Method 1 of ARGA
In Equations ( 4) and ( 5), the crossover probability will be reduced to preserve excellent chromosomes; on the contrary it will be added to evolutionary excellent chromosomes.And then, the mutation probability will be reduced to preserve excellent chromosomes; on the contrary it will increase the diversity of the population and avoid to falling into local optimum [18].The overall structure of method 1 of ARGA can be described as follows.
A. Encoding: The parameters of the BLDC motor and induction motor are composed by real-coded values.

B. Initialization:
A collection of individuals is referred to as a population.A population size of 100 is used to generate final segmentation boundaries.

C. Fitness function:
The fitness function is adopted as follows.
( ) ( ) where n is the total number of sampling point, ( ) ω are the rotation speeds by using the identified and assigned parameters in Equations ( 14) and (15), respectively.D. Selection: In this stage, the expected time of an individual being selected for recombination is proportional to its fitness value relative to the rest of the population.This operation is to achieve a mating pool with the fittest individuals selected according to a probabilistic rule that allows these individuals to be mated into new populations.The selection is carried out by using the roulette wheel method.

E. Crossover and Mutation:
The crossover is the breeding of two parents to produce a single child, who has features from both parents and thus may be better or worse than either parent according to the objective function.The primary purpose of mutation is to introduce variation and help bring back some essential genetic traits, and also to avoid the premature convergence of entire feasible space caused by some super chromosomes [19].
To reduce the premature convergence and improve convergence rate of the SRGA, the adaptive probabilities of crossover and mutation are presented in the ARGA.The probabilities of crossover c P and mutation m P are respectively given as follows.c n = [20] are taken.From Equations (2) and (3), it is known that the adaptive c P and m P vary with fitness functions.The c P and m P increase when the population tends to get stuck at a local optimum and decrease when the population is scattered in the solution space.

Method 2 of ARGA
The GAs have been extensively used in different domains as a type of robust optimization method.However, the GA to demonstrate a more serious question is a premature convergence problem, less capable local optimization, the late slow convergence and can't guarantee convergence to the global optimal solution and so on.In recent years, many researches [21] [22] try to improve genetic algorithms, such as improving the encoding scheme, fitness function, genetic operator design.For this reason, the ARGA is proposed with the crossover probability c P and mutation probability m P as follows.
( )( ) ) where, max f is the best individual fitness, f ′ is the better individual fitness in every group, avg f is the average fitness, and f is every individual fitness in current generation.The 1 c P means fixed maximal cross proba- bility;  [24] are taken.As a result, the adaptive c P and m P are able to provide the optimum c P and m P targets at a certain solu- tion.The improved chromosome crossover and mutation operators ensure the convergence of the GA more than the diversity of population [25] [26].

Method 3 of ARGA
An important problem in usage of the RGA is premature convergence, and the searching process may trap in a local optimum before the global optimum is found.This section employs an ARGA which adjusts mutation probability dynamically based on average square deviation (ASD) of population fitness value, which shows the population diversity to solve the premature problem.From compared analysis, it is shown the proposed ARGA efficiently avoid the premature problem [27].Premature convergence can also be blamed in [28] by avoiding the loss of critical alleles due to selection and the schemata disruption due to crossover.
The selection operation reduces the diversity of population, the crossover operation does not decrease the diversity of population, and the mutation operation can advance the diversity.Mainly, all these issues produce two effects, the lack of diversity in the population and a disproportionate exploitation or exploration relationship, cause the premature problem [29].When the ASD becomes smaller or less, it shows that many individuals are becoming as the same, so the mutation probability should be increased to advance the diversity of population for getting global optimal solutions.A. Selection operator: The selection is carried out using the roulette wheel method in this paper.B. Crossover operator: The crossover operation does not decrease the diversity of population, and the crossover probability is fixed.C. Mutation operator: This section employs an adaptive method to adjust mutation probability dynamically based on the ASD value.When the ASD decreasing, mutation probability will be increased to advance the population diversity.The relationship between mutation probability and ASD is given as follows.
where max f is the maximum individual fitness, a M is mutation probability originally, and ASD t is the ASD of population in the th t generation, and is described as: ( ) where i t f is the fitness value of the th i individual of the th t generation, v f is the average fitness of the th t generation, and N is the number of population.

Method 4 of ARGA
In this section, a new GA with two species is proposed for the ARGA.The dual-specie GA composes of two sub-populations that constitute of same size individuals.The sub-populations have different characteristics, such as crossover probability and mutation operator.In one sub-population, the parents with higher similarity are cross with higher probability, and mutate with general mutation operator.In the other sub-population, the parents with smaller similarity are cross with higher probability and mutate with big mutation probability.Therefore, the new algorithm can obtain good exploitation and exploration ability [30].
Multi-population GA [31]- [33] is an extension of traditional single population GA by dividing a population into several isolated sub-populations, within which the evolution proceeds and individuals are allowed to migrate from one sub-population to another [34], and the flow chart is shown as follows (Figure 1).B. Crossover operator: The crossover probability is correlated with parents' similarity.The similarity between two individuals is defined as: , where i x and i y are two individuals, ( ) C. Mutation operator: Mutation1 is the normal mutation which proceeds with constant probability.Mutation 2 needs to have ability to robustly explore the solution space and to escape from local peak.The probability of mutation 2 is adaptive mutation probability, and the probability value 2 m P is considerably large and correlate with 1 m P and the diversity of two sub-populations.The 2 m P is defined as: where max1 f and max 2 f are the maximal fitness values;

Examples
The different four ARGAs will be applied to the BLDC and induction motors.At first, it is needed to show the governing equations of the motor system, and find out what are parameters to be identified.

Equation of a BLDC Motor
The BLDC motor [35] is one kind of permanent magnet synchronous motor, and has permanent magnets on the rotor and trapezoidal-shape back EMF.The BLDC motor employs a dc power supply switched to the stator phase windings of the motor by power devices, and the switching sequence is determined from the rotor position.The phase current of BLDC motor, in typically rectangular shape, is synchronized with the back EMF to produce constant torque at a constant speed.
A commonly used second-order linear model for a BLDC motor [36] can be expressed mathematically as d d where a L is armature inductance, a i is motor armature current, a R is resistance, b K is back-EMF constant, ω is angular speed of the motor shaft, a v is armature voltage: m J is inertia of the motor, m B is viscous damping coefficient, f T is the frictional torque, and t K is torque constant of the motor.In Equations ( 14) and ( 15), a the rotational speed and electric current are the state variables and the electrical voltage is an input.

Equation of an Induction Motor
The field-oriented induction motor drive can be applied for high-performance industrial applications, and the controllers implemented in induction motor drives are generally based on the system mathematical model.The parameter identification in a rotation rotor is very useful in monitoring and testing a high-power induction motor drive, and then its performance depends heavily on the motor parameters [37] [38].In the decoupling condition, main parametric uncertainties of induction motors are the mechanical parameters and load torque disturbances, which are slowly time-varying in general [39].Measurements of the rotational angular speeds and input electrical voltages are required for the system identification procedure [40].Model-based methods of rotation-speed estimation are characterized by their simplicity, but sensitivity to parameter variations is considered as the major problem [41].
The complete electrical and mechanical models [42] are combined, and its electro-mechanical equation can be expressed as follows: where ds i is the d-axis stator current, qs i is the q-axis stator current, dr λ is the d-axis rotor flux linkage, qr λ is the q-axis rotor flux linkage, r ω is the angular speed of the rotor, s R is the stator resistance, s L is the sta- tor inductance, r R is the rotor resistance, r L is the rotor inductance, e ω is the electrical angular speed, p n is the number of pole pairs, m L is the magnetizing inductance, m B is the motor damping coefficient, m J is the motor moment inertia, ds v is the d-axis stator voltage, qs v flux linkage is the q-axis stator voltage and L T is the load torque.In equation ( 16), the rotational angular speed, electric currents and flux linkages are the state variables and the electrical voltages ( ) , ds qs v v are the inputs.

For the BLDC Motor
In the numerical simulations, the input voltage is defined as follows: where ( ) ω and 1 ω represent the minimum and maximum frequencies, respectively.0 V and 1 V are the base voltage and bias amplitude.1 T is the time for increasing voltage and p T is the total time.In this paper,  In order to investigate the ARGAs, compare them and find the best one for system identification of the electrical fan, the parameters  14) and ( 15) and using the electrical input voltages (17,18), the rotation speed is obtained as shown in Figure 2(b).
From the electrical input voltages and rotation output speed, by using the ARGAs and SRGA the identified parameters and fitness values can be obtained as shown in Table 1.It is seen that the fitness value is largest for method 1 of ARGA, and is smallest for the SRGA.The errors of rotation speeds, which are solved by using the assigned parameters and identified parameters as shown in Table 1, are shown in Figure 2(c).It is seen that the errors of rotation speeds are smaller by the ARGAs than that by the SRGA.The fitness values of the ARGAs and SRGA are compared in Figure 2(d), it is seen that the fitness value of multi-ARGA are not only larger than SRGA, but also the errors of rotation speed are smaller in Figure 2(c).
From comparisons in Figure 2(d), it is demonstrated that the ARGAs are more efficient to identify system's parameters than the SRGA in generation numbers.It means that the ARGAs do not fall into local optimum and prevent the premature convergence, and the fitness values of ARGAs are bigger than the SRGA.The number simulations are compared,and the fitness value of method 1 of ARGA is 2.54.It is the biggest value than the other ARGAs.Moreover, its error percentages are small not only in parameters but also in the rotation speeds.That means that the method 1 of ARGA is the best algorithm to identify system's parameters.

For the Induction Motor
In an induction motor, any vector in a rotating coordinate can be described as follows: e e e j j j s as bs cs ds qs According to Euler's formula, the three-phase part can be rewritten as: Therefore, the relation formula can be obtained as follows: The stator transformation formula between the three-phase coordinate and d-q axis is shown as follows: ds as qs bs If there is a voltage amplitude ( ) m v t with a frequency f , the three-phase voltage is The input electrical voltages ( ) The input voltage is with alternative current (AC) and is shown as Equation (24).If the fixed frequency is defined as 50 Hz f = , its amplitude ( ) where ( ) ω and 1 ω represent the minimum and maximum frequencies, respectively.0 v and 1 v are the base voltage and bias amplitude, respectively.1 t is the total time for increasing voltage and p t is the total time for input voltages.In this paper, ( ) From the electrical input voltages and rotational output speed, the identified parameters and fitness values by using the ARGAs and SRGA can also be obtained and shown in Table 2.It is seen that the fitness value is the biggest one for method 1 of ARGA, and is the smallest one for the SRGA.The errors of rotation speeds, which are solved by using the assigned parameters and identified parameters as shown in Table 2, are compared in Figure 3(c).It is seen that the errors of rotation speeds are smaller by the ARGAs than that by the SRGA.The  fitness values of the ARGAs and SRGA are compared in Figure 3(d), it is seen that the fitness values of AR-GAs are not only larger than the SRGA, but also the errors of rotation speed are smaller in Figure 3(c).
From comparisons in Figure 3(d), it is demonstrated that the ARGAs are more efficient to identify system's parameters than the SRGA in generation numbers.It means that the ARGAs do not fall into local optimum and prevent the premature convergence, and the fitness values of ARGAs are bigger than the SRGA.The fitness value of method 1 of ARGA is the biggest one in all the ARGAs.Moreover, its error percentages are smaller not only in parameters but also in the rotation speeds.It means that the method 1 of ARGA is the best algorithm among the four ARGAs.

For the BLDC Motor
In experiments, the electrical input voltage and rotation output speed of a real motor are to be measured, and the ARGAs are to be employed to obtain system's parameters.Figure 4 shows the experimental setup, where the computer command is transformed by the driver to a BLDC fan.The input DC voltage and the rotation speed is measured and transformed by the D/A card to computer for the identification computation.The desktop computer edits C language to control microchips, and the inverter will give signal to power supplier, which drives electric fan.At first, the voltage is controlled into the microchips, and the voltage frequency is converted as a sinusoidal function.Secondly, the system is stimulated by the voltage frequency, and the signals of the rotation speeds can be obtained by inverter, and the data is the target to be identify by the ARGAs.At last, the identifiable parameters are substituted into Equations ( 14) and ( 15) to obtain the rotation speeds by C language.

Comparisons between the Experimental and Identified Results
In experimental results, three different input voltages are given to the BLDC motor for system's identification.From numerical simulations, the method1 of ARGA, which not only accurately search for parameters, but also has small generation number inquick convergence, is the best method to identify parameters, and is also applied to the experimental system.
In order to compare experimental results, three different input voltages are employed by hand.The input voltages are ascendant before 1.5 sec and the stable after 1.5 sec, and shown in Figure 5

Comparisons of Identified Parameters
The feasible domains and identified parameters by method1 of ARGA are shown in Table 3.For the three different input voltages, the identified parameters are little different, and the rotation speeds are analogous as show in Figure 5(b).It is noted that the wide feasible domains may affect the identified values of system parameters, and their settings need numerical experience for rapid convergence.It is concluded that the identified parameters will be better if the feasible domains are smaller.

For the Induction Motor
The electrical input voltages and rotation output speeds of a real induction motor are measured, and the ARGAs are employed to identify system's parameters in experiments.The experimental setup is shown in Figure 6, where the computer command is transformed by the driver to the induction motor.The input AC voltages and the rotation speeds are measured and transformed by the D/A card to numerical computation.The induction motor is three-phase with the rated specifications: 220 V, 60 Hz, 7 A, and 1720 rpm.

Comparisons between the Experimental and Identified Results
The input voltages are given to the induction motor for system's identification in experimental results.From numerical simulations, the method 1 of ARGA, which not only accurately search for parameters but also has small generation number in quick convergence, is the best method to identify parameters, and is also applied to the experimental identification.
In order to obtain experimental results, 0 90 V  26) and ( 27) as the input AC voltages and shown in Figure 7(a).It is seen the rotation speeds of the induction motor obtained from LabVIEW are low before 10 sec, and the induction is unstable during this interval.Therefore, the identification is performed after 10 sec when the system is stable.In order to validate the identified parameters by the SRGA and ARGA in Equation ( 16), the input voltage as an exponential function in experiments is taken as follows: ( ) ( ) where 5 α = and V = 95, 150, 210 V, respectively.The input voltages The electric currents ( ) , ds qs i i can also be obtained from (16), and the input electrical current s i can be ob- tained by ( )

Comparisons of Identified Parameters
The feasible domains and the identified parameters between the SRGA and method 1 of ARGA are compared in Table 4.It is seen the identified parameters are similar in experiments.However, the fitness value of the ARGA is bigger than the SRGA, and it means the ARGA parameters are more accurate and correct.For the convergence in generations, the ARGA converges at the 53thgeneration, and is faster than the SRGA.

Conclusion
This paper attempts to improve crossover and mutation operators in the traditional genetic algorithm by the adaptive technique.Effectiveness of the algorithm in identifying system's parameters is verified by the BLDC motor and induction motor.It is found that the SRGA and ARGA methods are feasible to system identification.The results show that the ARGA is found to have the faster convergence and the larger fitness value than the SRGA.In numerical simulations, the ARGAs with the identified parameters' errors percentages are less than 5% with respect to the assigned parameters.In this paper, method 1 of ARGA is found to be the best one to identify parameters of the BLDC and induction motors, and some experimental results are also compared.

P
are fixed maximal and mutation prob- abilities, respectively.In this paper, 1

Figure 1 .
Figure 1.The GA of the dual-populations.For the dual-population GA, one has the following operators: A. Selection operator: The proposed algorithm establishes two separate sub-populations by random initialization, and then carries on evolution inside single sub-population and migration between two sub-populations.Here, the roulette selection is employed.B.Crossover operator: The crossover probability is correlated with parents' similarity.The similarity between two individuals is defined as: fitness values of population 1 and population 2, respectively.
input voltage is shown in Figure 2(a).

Figure 2 .
Figure 2. The comparisons of the ARGAs and SRGA.(a) The input voltage; (b) The rotation speed; (c) The errors of rotation speeds between the assigned and identified parameters; (d) The fitness values.
assigned.The input voltage is shown in Figure3(a).In order to investigate the ARGAs for system identification of the electrical fan, the parameters Substituting these parameters into Equation (16) and using the electrical input voltages(26,27), the rotation speeds are obtained and shown in Figure 3(b).

Figure 3 .
Figure 3.The comparisons of the ARGAs and SRGA.(a) The input voltage; (b) The rotation speed; (c) The errors of rotation speeds between the assigned and identified parameters; (d) The fitness values.

Figure 5 .
Figure 5. (a) The input voltages; (b) The comparisons in rotation speeds; (c) The errors of rotation speeds; (d) The convergences of the fitness values for three different input voltages.curves of the experimental and identified speeds are compared.In Figure 5(b), the identified rotation speeds are approximate with the experimental rotation speeds.The error percentages of rotation speeds are very small when the voltages are stable.The identified and experimental parameters are very approximate.The speed errors of the identified speeds with respect to the experimental ones are shown in Figure 5(c).For the BLDC motor system, the fitness values with respect to total number of generations is shown in Figure 5(d) and all the fitness values converge near the 650 th generation.

Figure 7 (Figure 7 .
Figure 7. (a) The input voltages; (b) The comparisons in rotation speeds; (c) The errors of rotation speeds; (d) The convergences of the fitness values for the SRGA and ARGA.centages are very small, and the errors of the ARGA are smaller than the SRGA.The fitness value with respect to total number of generations is shown in Figure7(d).The SRGA converges near the 200 th generation.It is seen that the ARGA has faster convergence near the 50 th generation and higher fitness value.In order to validate the identified parameters by the SRGA and ARGA in Equation (16), the input voltage as an exponential function in experiments is taken as follows: obtained, and then substituting the electrical voltages into(16), the rotation speeds are obtained.The rotation speeds for these three voltages are shown in Figures8(b)-(d), respectively.
19), and shown in Figures9(a)-(c) for different voltages.It is seen that the electric currents by the SRGA and ARGA are similar, and the ARGA are better than SRGA.

Figure 9 .
Figure 9. (a) The electric current for the input voltage 95 V; (b) The electric current for the input voltage 150 V; (c) The electric current for the input voltage 210 V.

Table 1 .
The assigned and identified parameters of a BLDC motor by numerical simulations.

Table 2 .
The assigned and identified parameters of an induction motor by numerical simulations.

Table 3 .
The identified parameters of a BLDC motor for different input voltages.