A PI controller optimized with modified differential evolution algorithm for speed control of BLDC motor

ABSTRACT In this paper, a proportional integral (PI) controller that optimized with the modified different evolutional (DE) algorithm is proposed for speed control of brushless direct-current (BLDC) motor. The parameters of PI controller are tuned by the modified DE algorithm which based on adaptive mutation factor, multivariable fitness function and the starting rule for the modified algorithm. The performances of proposed controller, the conventional PI controller and the PI controller optimized with standard DE controller (PI-SDE controller) are investigated and compared in simulation. Also, the proposed controller is compared with other optimization controller in this study. The simulation results and the experimental verification show that the proposed controller leads to the smaller overshoot, less setting time and rising time compared to other controllers in this study. The results also show that the proposed controller can accelerate the response speed of BLDC motor, strengthen the robustness and guarantee motor runs smoothly as well as precisely. This work indicates the distinguished performance of proposed controller for the speed control of BLDC motor.


Introduction
Brushless direct-current (BLDC) motors have famous speed versus torque characteristics, high power density, long operating life, noiseless operation and excellent control properties [1,2]. Due to these merits, BLDC motors have been widely used in the industries and different control methods were presented to control the speed of BLDC motor.
Proportional-integral-derivative (PID) controller is well known for its simplicity, clear functionality, and effectiveness, which has been commonly adopted in industrial control systems [3]. Generally, PID controller is used for the speed closed-loop control of BLDC motor in practical application. However, BLDC motor is a multivariable and strong coupling nonlinear system, the conventional PID controller using in this system always have deficiencies. It's so sensitive to the system uncertainties that the control performance can be seriously degraded under parameter variations [4,5]. Moreover, the conventional PID controller is also difficult to adjust the high precision and rapid speed system dynamic performance as well as static performance [6].
Recently, some modern intelligence algorithms have been studied to control motors and always showed better performance than the conventional PID controller. K. Premkumar et al. (2016) [7] studied a fuzzy proportional derivative (PD) controller optimized with bat algorithm for speed control of BLDC motor. In their work, the bat algorithm optimized fuzzy PD controller was compared with particle swarm, cuckoo search algorithm optimized fuzzy PID controller and fuzzy PID controller. It was proven that bat optimized fuzzy PD controller has superior performance than the other controllers considered. S. Bouallegue et al. (2012) [8] presented a PID-type fuzzy logic controller tuning based on particle swarm optimization (PSO). The performance of PSO-tuned PID-type fuzzy logic controller was compared with that of the fuzzy PID controller tuning based on genetic algorithm optimization. And the simulation results showed that their proposed controller has better performance for the speed control of DC motor in term of robustness and efficiency. Bharat Bhushan et al. (2011) [9] introduced a bacterial foraging algorithm (BFA) based speed controller for DC motor, and the performance of BFA based controller was studied in MATLAB. It was shown that the BFA based speed controller works effectively for tracking the desired trajectory with less computational time. A hybrid controller for the control of permanent magnet synchronous motor which includes neural network PID and conventional PID controller was researched by Bingyang Luo et al. (2017) [10]. The high stability and reliability of conventional PID were combined with the strong adaptive ability and robustness of neural network. As their results revealed, the speed response of the hybrid controller was faster than that of the single control strategy. Moreover. the recovery ability and robustness on the condition of sudden disturbance of hybrid controller were also stronger.
Previous works have demonstrated the prospect of intelligence algorithms for the motor control. In this paper, a proportional integral (PI) controller optimized with modified differential evolution (DE) algorithm was proposed for the better speed control of BLDC motor. The modified DE algorithm is designed with more varied individuals and bigger search space for the minimization problems, which enables the proposed controller more accurately and effectively for the speed control. The control parameters of PI controller are tuned by modified DE algorithm based on the speed error, the overshoot and the setting time of system. To investigate the performance of proposed controller, detailed simulations were conducted on different conditions. Meanwhile, the simulation results of proposed controller were compared with that of the conventional PI controller and standard DE based PI controller. The paper is organized as follows: section 2 introduces the model of BLDC motor, the standard DE algorithm and the proposed modified DE algorithm are described detailly in section 3, section 4 presents the proposed controller, the performance of the proposed controller is investigated in MATLAB/Simulink and the results are discussed in section 5, section 6 shows the experimental verification, then section 7 concludes the paper.

The control system of BLDC motor
The working principle of BLDC motor could be described as follows: electronic commutation controller receives the position signal of rotor by position sensors, and control the inverter bridge to change the power-up state of windings [11,12]. The continuous commutating will produce a rotating magnet at the stator windings and then drive the rotor to move. The BLDC motor in this paper has three stator windings connecting in star model and a permanent magnet rotor, driving by the model of three-phase six-step and two-phase breakover with 120 electrical angle. Figure 1 shows the BLDC motor control system [13].

Mathematical model of BLDC motor
From motor voltage equation U = Ri + L di dt + E, the voltage equation of BLDC motor can be characterized by the following equation where, u a , u b , u c were the stator phase voltage, R a , R b , R c were the stators phase resistance, i a , i b , i c were stators phase current, L aa , L bb , L cc were winding self-induction of three-phase stators, L ab , L bc , L ba , L ac , L ca , L cb were mutual inductance between three-phase stators winding, E a , E b , E c were the back electromotive force (EMF) of three-phase stators.
As the resistance of each stator is equal, and the structure of three stator windings is totally symmetrical, so there are equations: For a three-phase star winding motor, there is an equation: From (2) ∼ (5), the voltage equation (1) can be rewritten as: The torque equation of BLDC motor is described as: where, T e is the electromagnetic torque, ω is the motor mechanical angular velocity. The motion equation of BLDC motor can be written as: where, T L is load torque, J is rotation inertia, B v is viscous frictional coefficient.

Standard DE algorithm
DE algorithm is an evolutionary algorithm based on the differential mutation, greedy principle and realcoded. The excellent properties of differential evolution algorithm, such as compact structure, high convergence characteristic, simple yet powerful and straightforward features, make it attractive for parameter optimization [13]. Similar to other evolution algorithms, the DE algorithm includes three operations, which are mutation, crossover and selection, for the global optimization over continuous spaces with only a few parameters. Furthermore, DE algorithm iterates generation by generation until the termination conditions have been met by operating on each individual [14][15][16]. Figure 2 shows the procedure of DE algorithm and the specific descriptions are as follows.
The standard DE starts with initializing a population of target individuals, and each individual represents a potential solution. Suppose the range of population is [x i,min , x i,max ], then the individuals are generated randomly within this range. Equation (9) shows the individuals and the initialization method is described in Equation (10).
where, P G is the population, G represents the times of iteration, and M is number of individuals. X j,G is an individual of N-dimensional vector and j represents the index of the individual.
where, X ij,0 is the element of initial individual, rand (0,1) is a random number between 0 and 1.
The fitness of individual that calculated by individual fitness function is used to estimate the quality of individuals [17]. Usually, it is also a termination condition for DE algorithm. The DE algorithm ends when the fitness is satisfied, or proceeds to the next iteration.
The DE algorithm performs the mutation according to Equation (11). As Equation (11) shows, a mutant individual is generated based on three individuals that randomly selected from previous population, and the weighted difference is added between two individuals [18]. If an element of a mutant individual goes off the search space, then the value of this element is regenerated. Here, it should be noted that the individuals must be difference from each other, thus the number of individuals (M) is at least four [19,20].
where, V j,G+1 is the mutant individual. X r1,G , X r2j,G , and X r3,G are three individuals selected from population randomly. F is a real parameter, called mutation factor. After the mutation, the operation of crossover is designed to enhance the diversity of population. For DE algorithm, Binomial crossover is the commonly used scheme, which can be expressed as Equation (12) [21,22]. The crossover is performed on each of elements whenever a randomly generated number between 0 and 1 is less than or equal to a pre-fixed parameter. From the crossover operation of the standard DE algorithm, it can be seen that a mutant individual is used to enhance the perturbation of a target individual to avoid premature convergence to non-global local optima selection [23][24][25][26].
where, U j,G+1 is the trial individual after operation of crossover. U ij,G+1 , V ij,G+1 are elements in individuals of U j,G+1 and V j , G+1 respectively. rand (0,1) is a random number between 0 and 1, rand(i) is a random number ranging from 1 to N, and CR is a per-fixed parameter, called the crossover factor.
To decide whether or not the trial individual U j,G should be a member of the next generation, a one to one greedy selection strategy is adapted in DE algorithm. The fitness value of each individual is evaluated for the selection. If the trial individual U j,G+1 yields a better fitness value than X j,G , then U j,G+1 is selected for the next generation. Otherwise, the source individual is retained. For minimization problems, the selection scheme is designed as follows: where, f (U j,G+1 ), f (X j,G ) are the fitness functions of U j,G+1 and X j,G respectively. DE algorithm takes the operations of mutation, crossover, selection and calculate the fitness value of each individual repeatedly. However, the algorithm would not end until the termination condition is met or the iterations is reached [27].

Modified differential evolution algorithm
For standard DE algorithm, the mutation factor (F) and crossover factor (CR) are invariant constants that chosen by previous experience. Specifically, the range of F is from 0 to 2, and CR is in the range of 0 and 1 generally [28][29][30]. As F and CR are the primary control parameters of DE algorithm, it has already been reported that the suitable values of these parameters may result DE algorithm enjoy a superior performance. S. Das et al. (2005) [31] suggested decreasing F from 1.0 to 0.5 linearly, which encourages the individuals to sample diverse zones of the search space during the early stages. The mutation factor decayed during later stages helps DE algorithm to explore a relatively small space in which the suspected global optimum lies. J. Zhang et al. (2009) [32] proposed a JADE algorithm. In their algorithm, the F for each individual is sampled from a Cauchy probability distribution with a mean µ F and the CR is sampled from a normal distribution with a mean µ CR . However, the means µ F and µ CR are updated in each generation based on their previous records of success. S.M. Elsayed et al. (2013) [33] presented a variant of DE with an adaptive parameter control scheme. They defined two sets of values for F and CR, and each trial individual is generated by combination of the parameters randomly. Then, if a trial individual is successfully selected for the next generation, the value of corresponding parameters is increased by one. While the top half of the performing combinations is selected, their corresponding parameters are set to 0, and the others are discarded.
In this paper, the modified DE algorithm is originated from the study of Aronb Ghosh. Aronb Ghosh et al. (2011) supported a fitness-base adaption scheme for the parameters of F and CR [34]. Equation (14) shows the scheme for F. where, f is the fitness function and F max = 0.8. It's clear from Equation (14) that the F for each individual is related to its fitness value. Aronb Ghosh et al. also compared their modified DE algorithm with other DE algorithms, and the results indicated that the DE algorithm with their scheme for parameters had superior performance for most of the tested problem. Here, we propose a fitness-base adaption scheme for F, which is shown in Equation (15). While the CR is designed as a constant value of 0.6.
where, f (X j ) is the fitness function of X j , and F max = 0.8. Figure 3 shows the variation of F with the fitness function. Obviously, the proposed scheme for F is applicable for the minimization problems. When f (X j ) is great, the great value of F enhances the diversity of individuals and enlarges the search space. However, the little value of F guarantees the DE algorithm to search a small space in which the global optimum lies. Moreover, it should be note that the proposed modified DE algorithm is designed to optimize the conventional PI controller for the speed control of BLDC motor.

The conventional PI controller
The PI controller is a simplified PID controller, which removes the derivative control. The letter P, I stand for proportion and integral. Figure 4 shows the structure  of the convention PID controller, and the output of a conventional PID controller can be described as the following equation: where, u(t) is the output of PID controller, Kp is proportional gain, Ki is integral gain, e(t) is the speed error.
In modern control systems, for the sake of reliability, the continuous PID controller should not be applied directly and a discrete processing is needed [35]. Then the digital conventional PID controller can be expressed as: where, e(k) is the error at the time of k.

The proposed controller
As mentioned above, the proposed controller is a conventional PI controller optimized with modified DE algorithm. Figure 5 describes the structure of proposed controller. The inputs of modified DE algorithm are the speed error ("e") and the speed of BLDC motor ("s"), while the outputs are variables of Kp 1 and Ki 1 . The parameters of PI controller, which are Kp and Ki, are tuned by the modified DE algorithm according to the real-time system. The fitness function of DE algorithm is the criterion to evaluate the quality of individuals during evolution. A suitable fitness function is the basis of modified DE algorithm applied to control systems. However, it is difficult to meet the requirements that the response, stability, and robustness of the speed control for BLDC motor according to the speed error [36]. To optimize the dynamic and static characteristics of BLDC motor, a fitness function that contains multiple system parameters needs to be established. Here, the fitness function for the proposed modified DE algorithm is designed and shown as follows: where, ω 1 , ω 2 , ω 3 are weight coefficients that ω 1 is 10.0, ω 2 is 5.0 and ω 3 is 0.1, σ is the overshoot, t s is the setting time and e(k) is the speed error at the moment of k. The overshoot, settling time and error of the speed are contained in this fitness function. While the requirements for the speed response, stability and accuracy could be changed by adjusting the value of weights. The weight for overshoot tends to be increased if a small overshoot is required, and when the rapid speed response is required, the weight for setting time should be augmented. The value of fitness function is expected to be minimum by the modified DE algorithm, which leads to good speed control of BLDC motor. However, the difference of parent and offspring is subtle after numbers of iterations and the individual is close to the optimal, so the proposed modified DE algorithm is also optimized with the rule as follows: If f > f U , then the modified DE algorithm works; If −0.12 ≤ f < 0 for the first time and after five more iterations, or G = 50, then the modified DE algorithm ends.
where, f U is the threshold of fitness function that f U is 1.2 and f is the derivative of fitness function.

Simulation results
In this section, the performances of three controllers, which are the proposed controller, PI controller optimized with the standard DE algorithm (PI-SDE controller) and the conventional PI controller, for the speed control of BLDC motor are researched respectively and compared. The simulations are conducted on different operating conditions such as sudden/gradual change in load, start with different load, varying set speed in MATLAB/Simulink. Here, the proportional gain and integral gain of the conventional PI controller are 0.011 and 28, respectively. Table 1 shows the parameters of the proposed modified DE algorithm and the standard DE algorithm. Figure 6 shows the Simulink model of BLDC motor. In the simulation model, the proposed controller was used to control the speed of BLDC motor, the load torque was controlled by a Lookup Table function module, and the stator current, rotor speed and electromagnetic torque were observed by using Scope modules. The Simulink model of proposed controller is shown

Sudden change in load
The performance of proposed controller, PI-SDE controller and the conventional PI controller for the speed control of BLDC motor are investigated respectively and compared on the condition of sudden application and removal of load. The set speed of BLDC motor is 3000 rpm, during the time from 0 to 0.2 s, the motor is running with no load, then a step load of 5 Nm is applied at the time of 0.2 s, and is suddenly removed at the time of 0.4 s. Figure 8 shows the speed response curve and the simulation results are exhibited in Table 2.
During the starting of BLDC motor, the overshoot is 2.47%, the setting time is 0.031 s and the rising time is 0.014 s with the proposed controller. While the overshoot is 6.83% with the setting time of 0.045 s as well as the rising time of 0.016 s as the PI-SDE controller using for the speed control during the starting. And for that of the conventional PI controller, the overshoot is 7.37%, the setting time is 0.055 s with the rising time of 0.015 s. When the sudden load is applied, the overshoot is −3.70% and the setting time is 0.020 s with the proposed controller. However, the overshoots of PI-SDE controller and conventional PI controller are −4.03%, −4.87% with the setting times are 0.039 s and 0.043 s respectively. Similarly, when the load is removed suddenly, the proposed controller also shows good performance with a small overshoot of 3.67% and a short setting time of 0.035 s. While the PI-SDE controller leads to a greater overshoot of 4.03% and a longer setting time of 0.040 s, thus the conventional PI controller leads to the greatest overshoot of 4.83% as well as the longest setting time of 0.044 s. Meanwhile, the proposed controller and the PI-SDE controller also eliminate the steady state error which is 2 rpm with the conventional PI controller when the load is suddenly changed. From the results, it's clear that the proposed controller has best performance for the speed control of BLDC motor on the condition of sudden change in load, and the performance of PI-SDE controller is better than that of the conventional PI controller.  Figure 9. Speed response curve of BLDC motor of gradual application and removal of load. Figure 9 shows the speed response of BLDC motor with the proposed controller, PI controller optimized with the standard DE algorithm and the conventional PI controller on the condition of gradual change in load. From 0 to 0.1 s, the motor runs without any load, then from 0.1 s to 0.2 s, the load linearly increases from 0 Nm to 3 Nm, and maintains during the time from 0.2 s to 0.3 s. However, the load linearly decreases from 3 Nm back to 0 Nm start at the time of 0.3 s and end at the time of 0.4 s. Table 3 shows the results of three controllers for the speed control of BLDC motor. From the results, the proposed controller shows the better performance than the other two controllers for the speed control of BLDC motor. Specifically, the overshoot is −0.43% with the proposed controller while the load increases linearly, and −0.47% with the PI-SDE controller as well as −0.97% for that of the conventional PI controller. As  the load decreases, the results are also expected, that the overshoot is smallest with the proposed controller and the conventional PI controller leads to the greatest overshoot.

Starting characteristics
The starting characteristics of BLDC motor with the two controllers is investigated in Simulink by starting on four different loads, which are 0%, 30%, 70% and 100% of full load. The simulation results are shown in Figure 10 and Table 4. The simulations of BLDC motor start without load with these controllers have been researched in section 5.1. Here, the results are  Figure 11. Speed response curve of BLDC motor when speed changes suddenly, (a) speed changes suddenly from 3000 rpm to 1500 rpm, (b) speed changes suddenly from 1500 rpm to 3000 rpm. indicate that the outstanding performance of proposed controller for the speed control of BLDC motor while the motor starts with different loads. Figure 11 presents the speed response of BLDC motor with different controller on the condition of sudden change in speed. There are two schemes which are designed as following: As shown in Figure 11, the proposed controller exhibits a better performance when the speed of BLDC motor is changed in a sudden. It also can be found that the speed response of the system is faster and smoother with the proposed controller in both simulation experiments. Table 5 lists the results of simulation conducted with the Scheme 1, and the results of the other simulation were shown in Table 6. Table 5 shows that the overshoots of both controllers increase significantly as the speed decreases from 3000 rpm to 1500 rpm suddenly, specifically, the overshoot is −11.33% with conventional PI controller, −7.38% with PI-SDE controller and −7.33% with the proposed controller. The overshoot, settling time and rising time at the starting speed of 1500 rpm are less than these at the starting speed of 3000 rpm. From Table 6, the overshoot is 3.47% at the starting speed of 1500 rpm and 3.54% when the speed suddenly changes with conventional PI controller. While the overshoot Figure 12. Experimental setup of speed control for BLDC motor. is 1.67% at the starting and 3.26% when the speed changes. For the proposed controller, the overshoot is 1.65% at the starting speed of 1500 rpm and 1.57% on the condition of speed changes from 1500 rpm to 3000 rpm suddenly. The settling time and rising time with the proposed controller are obviously less than these with the other two controllers. For example, the setting time is 0.022 s and the rising time is 0.012 s with the proposed controller at the starting speed of 1500 rpm. However, the setting time is 0.044 s with the rising time of 0.014 s as the PI-SDE controller is used, and the setting time of 0.048 s as well as rising time of 0.015 s for the conventional PI controller. The results also demonstrate the distinguished performance of proposed controller for speed control of BLDC motor.

Experimental verification
Experiments are conducted and the results are provided in this section to verify the performance of proposed controller. As Figure 12 shows, the speed control of BLDC motor, which the rated parameters are 3000 rpm, 24 V, 210 W and 0.7 N•M respectively, is implemented based on STM32. The rotor position of BLDC motor is  measured by Hall sensor, and the rotor position is then converted into actual speed by derivative algorithm. The output of Hall sensor and the phase voltage waveform are detected by an oscilloscope. A hysteresis brake is connected with BLDC motor by coupling to provide the load for the tests. To prove the validity of the proposed controller, the performances of conventional PI controller and fuzzy PID controller, which is a well-known optimization controller, are taken into consideration as the comparison. The details of fuzzy PID controller are designed from R. Arulmozhiyal's work [37]. Figure 13 (a) and (b) show the phase voltage waveform and output of Hall sensor respectively at the speed of 1500 rpm, while (c) depicts the speed response curve on the condition that the BLDC motor starts at 1500 rpm and the speed suddenly change from 1500 rpm to 3000 rpm without any load. It's clear that the rotor speed with proposed controller increases to track the set speed and reach the stability more rapidly than which with the conventional PI controller as well as that with fuzzy PID controller when the set speed changes suddenly. While the performance of fuzzy PID controller is slightly better than that of conventional PI controller according to Figure 13(c). The speed response characteristic with load changes suddenly at the speed of 1500 rpm is depicted in Figure 14. when the load is applied suddenly, the speed decreases lightly and recovers quickly. Specifically, the proposed controller lead to less overshoot and shorter setting time than the other two controllers, which means the good robustness of proposed controller. The experimental results indicate the speed response with proposed controller is faster than that with fuzzy PID controller as well as the conventional PI controller. Also, it can be seen from Figure 13(c) and Figure 14 that the proposed controller leads to shorter rising time, less setting time and less overshoot that the other two controllers during the starting. While the fuzzy PID controller does not show visibly better performance than conventional PI controller, which may be due to the inappropriate fuzzy parameters. From the experimentation studies, it is proved that the proposed controller has excellent performance for the speed control of BLDC motor, which could accelerate the response speed of BLDC motor, strengthen the robustness and guarantee motor runs smoothly as well as precisely.

Conclusion
The paper presented a PI controller optimized with the modified DE algorithm for the speed control of BLDC motor. The modified DE algorithm is based on adaptive mutation factor, multivariable fitness function and the rule for starting in real time. Simulations for the speed control of BLDC motor were conducted on different conditions in MATLAB/Simulink, and performance of the proposed controller was compared with the conventional PI controller and the PI-SDE controller. The simulation results indicated that the proposed controller for the speed control of BLDC motor has better performance than the conventional PI controller as well as the PI controller optimized with standard DE algorithm. Furthermore, the experiments were taken to validate the performance of proposed speed control algorithm by comparing with conventional PI controller as well as Fuzzy PID controller. From the results, it was easy to reach the conclusion that the proposed controller could accelerate the response speed of the motor and strengthen the robustness of the system. However, the values of threshold of fitness function (f U ) and weight coefficients (ω 1 , ω 2 , ω 3 ) need to be set deliberately, which always need necessary tests or empirical data to determine these values. In this paper, we provided an effective speed controller for BLDC motor, and we expect this work can advise researchers to work on the speed control of BLDC motor.

Disclosure statement
No potential conflict of interest was reported by the authors.