Design of PI Controller for PMSM using Chaos Particle Swarm Optimization Algorithm

The proportional-integral-derivative (PID) controller parameters tuning is critical for improving the performance of permanent magnet synchronous motor (PMSM) systems. To improve the performance of particle swarm optimization (PSO) in the PID parameters tuning, the chaos particle swarm optimization (CPSO) is adopted to tune PI parameters in this work. The PMSM vector control system is selected as the research object, and its speed loop PI controller using CPSO algorithm is implemented. The optimal PI controller parameters are obtained using the CPSO algorithm with ten iterations. The simulation is conducted using MATLAB/Simulink to evaluate to the PI controller performance. Four performance indicators including overshoot, rise time, peak time and ITAE are used to evaluate the PI controller with CPSO, and the results suggest that the CPSO algorithm has better performance and stability compared with other tuning methods.


Introduction
The permanent magnet synchronous motor (PMSM) has the advantages of high efficiency, high power density, high torque inertia ratio, low noise, and maintenance-free [1], and has been widely used in electric vehicles, aerospace and robotics etc. Its control research is therefore receiving increasing attention [2]. Since its introduction, the PID controller has been widely used in various fields of modern industry because of its simple structure and excellent performance. Considering the performance of the PID controller is closely related to the PID parameters [3], it is therefore critical to study the tuning technique of PID parameters.
With the development of swarm intelligence algorithm, researchers have used it for parameter tuning of PID controllers. Ouyang [4] used differential evolution (DE), genetic algorithm (GA) and PSO to optimize the gain of the position domain of PID controller to improve the contour tracking performance of robot manipulator. Wang [5] proposed a hydro-generator excitation controller based on PSO and fuzzy PID. The initial parameters of the controller were determined by the PSO and the ICMME 2019 IOP Conf. Series: Materials Science and Engineering 717 (2020) 012021 IOP Publishing doi:10.1088/1757-899X/717/1/012021 2 system was dynamically controlled by the FAPID. In addition, compared with the traditional PID and fuzzy PID control, the simulation results demonstrate that the fuzzy adaptive PID based on PSO algorithm had faster response speed and smaller overshoot. Jaafar [6] proposed a PID control method for a high nonlinear double pendulum bridge crane without payload motion feedback signal. Using the improved PSO algorithm, the optimal parameters of the PID controller were achieved according to the vertical distance oscillation and potential energy of the crane. Compared with the conventionally adopted PSO algorithm based on horizontal distance, this method achieved high performance for the less complicated controller.
In the evolutionary computational method, the PSO algorithm has robustness in solving continuous nonlinear optimization problems [7]. Compared with other methods, PSO method can produce high-quality solutions with less computational time and has stable convergence characteristics. However, the initial particle quality of the PSO algorithm is unstable, and it is easy to fall into local extremum during the iterative process [8]. In order to solve the shortcoming of PSO, a modified PSO algorithm based on chaos theory for PID tuning based on PMSM is proposed in this work. The tuning effect of the modified PSO algorithm on the parameters of the PI controller has been analyzed with the MATLAB/Simulink and the result indicates that this algorithm is effective for tuning the PI controller parameters of the PMSM servo system.

Mathematical Model of PMSM
The mathematical model of PMSM in rotor reference frame can be expressed as follows [9]: Where, u d and u q are the voltage in the q-axe and d-axe; i d and i q are the q-axe and d-axe current; R is stator resistance per phase; ψ f is armature flux linkage due to rotor magnets; L d and L q are quadrature and direct axis stator self-inductance in rotor reference frames; Te is the electromagnetic torque; T L is the Load Torque; ω e is electrical rotor speed; ω m is mechanical rotor speed.
In the surface-mount PMSM, the stator self-inductance satisfies L d =L q =L s , and therefore the electromagnetic torque equation is:

Chaos particle swarm optimization algorithm
In a D dimensional search space, the position of particle i is represented as Where, t is the iteration number; w is the inertia weight; r 1 and r 2 are uniformly distributed random numbers with range [0,1]; c 1 and c 2 are called cognitive and social acceleration coefficients respectively. In the PSO algorithm, an evaluation function is selected to calculate the quality of particles' position. The Integrated time and absolute error (ITAE) are used as the fitness function in the paper, which is defined as: Logistic equation is a typical chaotic system, which is expressed as [11]: ( 1) ( )[1 ( )] z t + = μz t -z t (8) Where, z∈[0,1](z(0)≠0, 0.25, 0.50, 0.75, 1), μ is the control parameter and usually set to 4. In the process of particle swarm initialization, chaos initialization can generate a large number of ordered chaotic particles and improve the quality of initial particles. Aiming at the problem that particles are easily trapped in local extremum in PSO algorithm, chaos disturbance is added in the search process to make particle jump out of local extremum and realize global optimization [12].
Chaos theory mainly includes chaos initialization and chaos disturbance. The process of CPSO is as follows: (1) Initialize the particle's position and velocity with the chaos, and the initial groups are selected according to the principle of fitness-best selection.
(2) Add a disturbance Δx to its existing position of each particle to produce a new particle. Calculate the fitness value of the new and old particle, and select the particle with better performance to form a new particle group.
(3) Update the individual extremum and the global extremum to obtain corresponding particle.
(5) Detect convergence condition. If the termination condition is satisfied, the iteration is terminated and the optimal solution is output. Otherwise, return (2).

Design of Speed Loop PI Controller Based on CPSO Algorithm
PMSM has speed control, torque control and position control. Speed control is the most common control method in servo systems. The performance of the system is determined by the speed loop. Therefore, CPSO algorithm is adopted to set the PI parameters of the speed loop in the paper. The process of tuning the speed loop PI parameters using CPSO algorithm is shown in Figure 1.

Adding chaotic perturbation
The PI parameter is set to the position of particle  The number of the chaotic particles and iterations are set at 100 and 30, and the reference speed is predetermined at 1000 r/min. According to the parameter optimization process of PI controller using CPSO, the fitness curve is shown in Figure 3(a), and the optimization curve of proportional coefficient K p and integral coefficient K i is shown in Figure 3  The results suggests that the system obtains the best parameter at the 10th iteration, before reaching the maximum number of iterations. As shown in Figure 3(b) and (c), the parameters set by CPSO algorithm are K p =0.21 and K i =0.97.
In order to verify the performance of the PI CPSO algorithm, the performance of the PMSM system using different tuning methods is compared. The traditional PI controller has been manually debugged with the parameters of K p = 0.14 and K i = 7. After optimization by PSO algorithm, the PI controller parameters are determined at K p = 0.18 and K i = 3.95. The parameters of the PI controller obtained by the CPSO algorithm are K p =0.21 and K i =0.97, respectively. The speed response curve corresponding to two different parameters of the PI controller in two cases is shown in Figure 4.  Figure 4, it is difficult to obtain satisfactory results by manual tuning, and the amount of overshoot is large. The PI controller parameters obtained by PSO algorithm have less overshoot than manual tuning, and the system based on PSO algorithm has faster response speed. Compared with PSO algorithm, CPSO algorithm has improved substantially in response to speed and overshoot indicating that the CPSO algorithm is effective for tuning the PI controller parameters of the PMSM servo system.
In order to quantify the performance difference of the three methods, the CPSO algorithm, the PSO algorithm and the manual tuning are compared from the following aspects, overshoot (σ p ), rise time (t r ), peak time (t p ), and integral of error and time (ITEA) ( Table 1).

Conclusion
In this paper, the CPSO, a modified PSO algorithm based on chaos theory, has been developed to mitigate premature convergence problem of conventional PSO. The CPSO is applied to tuning the PI controller parameter for tuning the PMSM system. For validating CPSO, its performance is compared with conventional PSO and manual tuning method. The simulation results suggest that the CPSO algorithm can improve the tuning efficiency. In addition, the PMSM servo system based on CPSO algorithm has achieved better performance.