BLDC MOTOR : MODELING AND OPTIMIZATION SPEED CONTROL USING FIREFLY ALGORITHM

BLDC motor applications used in various forms in instrumentation, robotics, household, and transportation. One application of transportation equipment used as a propeller of electric bicycle vehicles. The value of the bicycle vehicle adjusted to the speed set, the amount that has determined. The purpose used in this study is to improve the efficiency of the regulation of BLDC motors on electric bicycles. Indicators of increasing performance are increasingly steady-state errors, and transient response required. The method used in this research is to do mathematical modeling in the form of transfer and optimization function equations. The model used is the model with the structure of the transfer function, while the optimization method used in this study is the Ziegler-Nichols method and firefly algorithm. The firefly algorithm is used in this study to obtain optimal Kp, Ki, and Kd values. The results showed that the firefly algorithm achieved better performance compared to the Ziegler-Nichols method.


INTRODUCTION
Indonesia has the energy needs to drive the economy in the industrial sector is estimated to remain dominant from 2016 to 2050. In 2015 it was determined that the final energy demand would increase from 35.5% in 2016 to 46.8% in 2050. The transportation sector is very complicated because its growth influenced by various areas such as agriculture, construction, commercial, industrial industry, as well as population growth and levels of public welfare [1].
With the increasing population growth, the growing use of fuel oil (BBM) used to drive vehicles, and this causes air pollution and global warming. From the experience of the incident, that vehicles with fossil fuels cost more and cause infection, so the need for more environmentally-friendly electric vehicles is needed, one of which is an electric bicycle. The advantage of using electric bikes is more efficient for homemakers, students, and workers to move at close range, such as to the campus or the market. It should be noted that long-distance travel presents a different problem: gasoline and dead vehicles tend to be more efficient and less pollution per kilometer as distance increases and a different set of alternative transportation solutions must be considered. A short trip in a petrol-engined car is very polluting and is a good target for switching to a bicycle [2].
Electric bikes composed several parts, namely battery storage, driver controller, and BLDC motors. Brushless DC Motor (BLDC) is a three-phase AC synchronous motor consisting of rotors and stators. The rotor is a moving part and is made of a permanent magnet, while the stator is an immovable part made of a 3 phase coil. In setting the BLDC motor as an electric bicycle mover, it is necessary to know the characteristics of the variables as a function of time under transient conditions and steady-state error by identifying the system to get a mathematical model [3].
There are several systems identification methods to get mathematical models, namely modeling with an experimental approach and modeling in theory. Theoretical modeling is obtained through data that has been provided by the factory, while modeling experimentally is done through the process of taking input and output data. The approach to the experiment divided into two, namely parametric and non-parametric. In the parametric approach, there are several structural models used, namely Auto Regressive with external input (ARX), Auto Regressive Moving Avarage with external input (ARMAX), Output error (OE), and Box-Jenkins (BJ) [4].
After obtaining the next stage mathematical model is to optimize the BLDC motor speed control through tuning with a Proportional Integral Derivative (PID) controller. The PID controller tuning process is still conventional, so the results are not optimal. Therefore, artificial intelligence-based methods developed to improve the performance of BLDC motor speed control to be more optimal. The intelligence method used in this study is the firefly algorithm.

MATERIAL AND METHOD
BLDC motor as an electric bicycle drive modeled through system identification by taking input and output data. Input and output data took through experiments in the BLDC motor speed control system. A block diagram for optimizing a BLDC motor speed control system using the firefly algorithm showed in Figure 1.  In this study, the time domain criteria used to evaluate the PID controller by tuning a set of control parameters P, I, and D so that it can produce better response and will result in the minimization of performance criteria in the time domain. These performance criteria in the time domain include overshoot, rise time, settling time, and steady-state error.

System Identification
The mathematical model of a BLDC motor obtained through system identification by taking input and output data [5]. Input and output data collected through experiments through the creation of instrumentation systems on the BLDC motor speed control system [6]. The BLDC motor used in this study has a 350-watt power specification with a maximum rotating speed of 400 rpm.  In Figure 2. shows the system identification process for BLDC motor hardware by placing several sensors to retrieve input and output data. Input and output data obtained are then analyzed using the system identification toolbox found in the Matlab program. The function structure model chosen is the transfer function model. Therefore, in identifying systems for BLDC motors, the hardware is designed to obtain input and output data. Measurements by placing several sensors to get input data in the form of pulse width modulation (PWM) value, voltage, and for data output that is the motor rotational speed in units of rpm. The equation model of the transfer function in system identification is explained as follows [7]: The characteristics of the system described as follows ( ) = 0 + 1 ( )+ 2 ( ) 2 +⋯+ ( )

Optimization Using PID Controller
The design of Proportional Integral Derivative (PID) control includes three parameters, namely Proportional gain (Kp), Integral gain (Ki), and Derivative gain (Kd). In general, the PID controller transfer function is as follows [8]: The conventional method in determining the parameters of the PID controller is a heuristic method called the Ziegler-Nichols method. This method looks for the Ku and Pu values first, then by using the Ziegler-Nichols assessment table, the Kp, Ki, and Kd constants will be obtained [9]. Whereas in the closed-loop system, the proportional gain value (Kp) is continuously increased from 0 to the critical value Kp, so that the output oscillates continuously with the same amplitude until it is stable when the essential importance of Kp is equal to the amount of the ultimate gain (My). In addition to determining the ultimate gain value (Ku), the value of the ultimate period (Tu) is also sought from the system output that reaches the condition that is continuously oscillating. In the closed-loop system, the Ziegler-Nichols method Ku value is called the Kcr value while the Tu value is called the Pcr value[10].

Optimization Using Firefly Algorithm
Optimization is finding the maximum or minimum value of an objective function that corresponds to a variable defined within a certain time span. Optimism can also be defined as a search for a set of variables that produces the best value of one or more objective functions. There are several optimization methods in finding the best value, one of which is the firefly algorithm. The fireflies algorithm is one of the parts of the metaheuristic algorithm that is inspired by the flashing behavior of fireflies that makes other fireflies nearby are interested. This algorithm is determined based on each firefly observed from its position point, that is when the fireflies try to move towards a light source that is brighter than itself. This algorithm is based on the following rules: 1. That all fireflies are unisex animals, so a firefly will be attracted to other fireflies by not caring about their sex. 2. Interest between fireflies depends on the level of brightness of the light, where fireflies that are dimmer will go to fireflies with brighter light levels. But if there is nothing brighter, fireflies will move randomly. 3. The level of explanation of fireflies is determined by the conditions of the objective function.
The firefly algorithm which shows that fireflies with the brightest light intensity so that the firmer fires that are dimmer will approach will be formulated in the following equation [11]: Where: Ii : light intensity of the fireflies I : 1,2,.....n f(x) : objective function In the adjacent fireflies, there will be an interesting attraction symbolized by beta (β). The attractiveness of fireflies is proportional to the intensity of the light seen by nearby fireflies using the following equation: Where: β : attractiveness value β 0 : Value of the attraction of fireflies γ : Light absorption coefficient r : distance The distance between the two fireflies i and j, which is represented by x i and x j is the distance difference in the coordinates of the location of the fireflies i against fireflies j which is formulated using equation 6. In Table 1, the parameter value of the firefly algorithm is used to optimize the BLDC motor speed control system. Parameter values include the number of fireflies, maximum iteration, alpha, beta, and gamma.
With planned Firefly Algorithm parameters are:

RESULTS AND DISCUSSION
The results and discussion for optimizing the BLDC motor speed control system are divided into several results and discussion, namely identification of the system to get a mathematical model in the form of a laplace equation with the selected model structure of the transfer function, after obtaining a mathematical equation then an optimization is carried out with the Ziegler-Nichols PID control method , and finally the results are compared with optimization using firefly algorithm.

System Identification
Mathematical equation for BLDC motor modeling is obtained through system identification using the structure of the transfer function model. The system identification results for input and output data are shown in Figure 3. The data in Figure 3 shows the input data in the form of a current with a total data sampling of 25 data, with a current range of 0 -5 amperes with the output data of the motor rotational speed of 0-400 rpm.
The results of system identification using the structure of the transfer function model for the value of pole 3 and zero 1, then the laplace equation is obtained as follows 8.86 + 0.9537 3 + 1.069 2 + 5.199 + 0.5215

Optimization Using Ziegler-Nichols Method
The mathematical model obtained as a result of the identification of the system is then optimized using the Ziegler-Nichols method to get the values of Kp, Ki, and Kd. From the optimization process using the Ziegler-Nichols method, the Nyquis graph diagram is obtained as shown in Figure 4. After getting the critical gain from the previous step, the next step is to calculate the parameter values for the P, I, and D gain based on the Ziegler-Nichols Table 3.

Optimization Using Firefly Algorithm
In testing for tuning the PID controller parameters using the firefly algorithm in the BLDC motor speed control system, shown in Figure 6. The parameter tuning result value for the PID controller with the Firefly algorithm is Kp_ff is 14.86, Ki_ff is 2.41, Kd_ff is 0.09, and ITAE value is 143.89. The graph shows that using firefly algorithm optimization can improve the performance of BLDC motor speed control compared to using PID control.

RESULT
Optimization of BLDC motor speed control is done by first modeling through system identification. The result of system identification using the structure of the transfer function model is obtained by the plant model for the BLDC motor. Mathematical models in the form of laplace equations are used as a basis for optimizing the Ziegler-Nichols PID controller and Algorithma Firefly. The optimization results show that the optimization of PID parameters by using firefly algorithm produces more optimal performance compared to using optimization with conventional controllers.