Hardware in the Loop Simulation of Control Optimal of DC Motor Base on Modified Quantum-Behaved Particle Swarm Optimization

Proportional, Integral, Dervative (PID) controller is a simple and very reliable controller, but to determine the optimal control system parameters on the PID controller (Kp, Ki, and Kd) is not easy. This paper aims to determine the optimal parameters of the PID controller using Modified Quantum Behave Particle Swarm Optimization (MQPSO) to regulate the speed control of a DC motor. MQPSO is a method that has particle search behavior that is more detailed than its predecessor methods, namely Particle Swarm Optimization (PSO) and Quantum-Behaved Particle Swarm Optimization (QPSO). The test is done through Software In the Loop Simulation (SILS) by representing a DC motor in the transfer function, after the optimal control parameters are obtained then applied to the Hardware In the Loop Simulation (HILS) test using the actual DC motor. The test results show that the PID controller that has been optimized using MQPSO results in achieving DC motor response under steady conditions and is faster than the PID controller that is optimized using Ziegler-Nichols (ZN), PSO and QPSO. The completion time obtained by MQPSO is 41.0201 ms, which is also faster than using QPSO 42.8276 ms, PSO 43.7008 ms and ZN 61.8571ms.


Introduction.
DC motors are widely used in the world of industry because of the torque characteristics are linear with respect to speed, accuracy in operation and has a high efficiency, of course, takes control system to achieve the position or the desired speed and the Proportional, Integral, Derivative (PID) controller is very popular in use today as a control system that is reliable on the linear system [1], [2]. However, the optimum working of the PID control is determined by the optimal parameters, but this is not an easy job, so that the necessary of a methods for optimizing PID controller parameters. Many papers have discussed various optimization methods, ranging from setting speed control dc motor which still uses the classical methods of Ziegler-Nichols (ZN) [3] up to the discussion of behavior based optimization method, which claimed to be more optimal, among others, the use of PSO to optimize the parameters of PID controllers [4] more optimal than using Imperialist Competitive Algorithm (ICA) [5], Firefly Algorithm [6], Bacterial Foraging (BF) Technique [7] etc. Meanwhile PSO is considered too fast to achieve convergence of local-optimal are not ensure the achievement of the global-optimal, then used the Quantum behaved Particle Swarm Optimization (QPSO) as the development of PSO method with the addition of theorem of quantum mechanics which guarantees global convergence [8], [9]. In its development, QPSO experiencing modification to the calculation of global attractor making it more effective and efficient in achieving convergence, hereinafter called the Modified Quantum behaved Particle Swarm Optimization (MQPSO) [10]- [12]. In this paper developed the optimal PID control system to regulate the speed a DC motor using MQPSO through testing software in the loop Simulation (SILS), where the characteristics of DC motor expressed in transfer function subsequently test results of SILS is verified using a DC motor through testing Hardware in the loop Simulations ( HILS). Performance the test results compared with the results of optimization using ZN, PSO and QPSO stated in Integral Squared Error (ISE) in order to obtain the optimal control system is most effective.

Modeling Control System
PID control system has three kinds of action control, namely; Proportional (P), Integral (I) and Derivative (D). Each controller action has a certain advantage. The 'Proportional' (P) controller action is to accelerate reaching rise time, the controller action of 'Integral' (I) has the advantage to minimize the error, and the controller action 'Derivative' (D) has an advantage able to reduce overshoot. Therefore, in order to produce output with a high rise time and a small error, it can combine all three actions of the controller became the PID controller action [1]. PID controller will produce the output of the signal MV (manipulated variable) which is the result of the calculation of the output of each control action. The equation can be written in the time domain as follows. (1) Where, In the planning process of simulation control system must be known in advance the characteristics of the transfer function of the DC motor that will be controlled. the DC motor model determined by the System Identification Toolbox in MATLAB [13] with Fit to Estimation (FTE) amounted to 91.71% so that got Transfer Function as in equation 2.
(2) Figure 1. SILS of Optimization the DC motor control system using PID Transfer function of the DC motor that has been obtained is used as a plant of PID control system, the next perform optimization on the control system to determine PID parameters such as Figure 1, 3 hereinafter called SILS. The optimal control system parameters have been obtained i.e.; Kp, Ki and Kd, then applied to the PID control system to conducted of testing through HILS such as system built in Figure 2. Figure 2. HILS of the DC motor control system using PID The control system that was built consists of input of unit step, PID control, the DC motor and rotary encoder. Output of the rotary encoder is fed back to be compared with the input so as to produce an error which then controlled by PID.

PID-MQPSO Optimization
The MQPSO algorithm used because the value of the global optimum in the QPSO can be searched if the iteration approach the infinite values. In its application the value of total iterations are real numbers and can not be replaced by an infinite numeral. This will result in a search capability of the global value of QPSO limited according to the number of iterations. Therefore the QPSO modified where mbest value which is the average value of pbest replaced with gbest to generate a more specific search [11], [12] so the calculation of the particle positions of MQPSO as equation 3: (3) In this paper the expansion-contraction coefficient α has a value of 1.2 and linearly down to 0.5. This resulted in a process of variation between x (t) and x (t + 1) in the initial iteration will produce a great diversity and the longer become increasingly smaller. In this search process resulted MQPSO perform a search globally in early of iteration, and the longer the search locally performed.

(4)
Application of modifications to the QPSO algorithm produces a more detailed search process. This is shown by the fitness value of MQPSO smaller than QPSO algorithm and PSO.

Simulation Results
Testing the models of optimal control system on DC motors using the input of unit step, starting with tuning PID control method ZN. This method is done by mathematical calculation of the value of Kp, Ki and Kd based on the observation of the response of the DC motor will then be compared with the tuning of control parameters using PSO system, QPSO and MQPSO. At the ZN method, determination of the value of the gain (k), time constant (Т), and dead time (θ) can be calculated by finding the time using the method of Ziegler-Nichols reaction curve [3], and was obtained θ = 0.0361ms; Т = 0.0646ms; k = 1.53, the next step is the determination of the value of Kp, Ki and Kd conducted based on Ziegler-Nichols  In Figure 3 shows the fitness value rate of optimization process of PSO, QPSO, and MQPSO. Based on the above data it can be seen that the PSO generate the initial fitness values of 1.7119 and reached convergence on third iteration with the fitness value of 1.7803. Meanwhile, QPSO generate the initial fitness value 1.6778 and achieve convergence at the 12th iteration with the fitness value of 1.5807. Compared with both the optimization algorithm, MQPSO generate the initial fitness value 1.2523 and reached convergence at the 22nd iterations with the fitness value of 1.2477. This indicates that the MQPSO algorithm is more efficient than the PSO and QPSO with achieving fitness value which is much smaller.   The step response of the Ziegler-Nichols method has the slowest response compared with other of tuning methods as shown in Figure 4. Whereas, the optimization algorithm which produces the most rapid response is MQPSO, then QPSO and the latter is a conventional PSO. The reliability of the controller are optimized by MQPSO can be seen in Figure 5. At the moment after of dc motor has reached a steady speed subsequently loaded with dc generator then there will be a decrease in speed and subsequently return to stability. Similarly, when the load is removed then there will be an increase in speed and furthermore return to stability, this means that the controller has been working to maintain his speed on the setting point well.

Conclusion
Based on the results of the design and testing of PID control system on a of dc motor which is optimized using MQPSO, it can be concluded that the algorithm MQPSO proven can be applied to optimize PID control system well to control the speed of the dc motor with a fitness value amounting to 1.2477, smaller than the methods; ZN, PSO, and QPSO, respectively 5.4467, 1.7083, and 1.5807. PID which is optimized with MQPSO method produces the fastest settling time amounting to 4.10201 ms while Z-N, PSO, and QPSO respectively 6.18571 ms, 4.37008 ms and 4.28276 ms.