Design of Speed and Current Controllers Based on Online Particle Swarm Optimization Method for IPMSM Drives

. In this paper, a novel online particle swarm optimization method is proposed to design speed and current controllers of vector controlled interior permanent magnet synchronous motor drives considering stator resistance variation. In the proposed drive system, the space vector modulation technique is employed to generate the switching signals for a two-level voltage-source inverter. The nonlinearity of the inverter is also taken into account due to the dead-time, threshold and voltage drop of the switching devices in order to simulate the system in the practical condition. Speed and PI current controller gains are optimized with PSO online, that means single irritation optimization computation can be completed within single sample time. In addition, the fitness function is changed according to the system dynamic and steady states. The proposed optimization algorithm is compared with conventional PI control method in the condition of step speed change and stator resistance variation, showing that the proposed online optimization method has better robustness and dynamic characteristics compared with conventional PI controller design.


Introduction
Proportional-integral (PI) control technique has been widely used in high performance field orientation controlled IPMSM drives. However, fixed PI gains have to be designed based on a precise mathematical model of the drive for guaranteeing certain control performance. It is unavoidable that the uncertainties are caused by parametric variations such as flux linkage or stator resistance and unstructured dynamics in a practical IPMSM drives [1,2].
Thus, to obtain a high dynamic performance for an IPMSM drive, current controllers should be optimized together with speed controller at the same time, because the current controller influences directly the drive dynamics.
There are numerous researches on the applications of computational intelligence techniques to controller parameters design for PMSM [3][4]. Among these, Particle Swarm Optimization [4], first introduced by Kennedy and Eberhart in 1995, is one of the modern heuristic algorithms. Because of its simplicity and computational efficiency, PSO has been widely used to solve a broad range of optimization problems, such as adaptive tuning of controller gains and parameters identification. However, there still exist some problems/limitations with this method on the optimization of controller gains. Firstly, the PSO optimization applications in designing controller gains for PMSM rely on offline precise calculations of responses of PMSM using mathematical model [3]. It makes optimization effectiveness rely on the fixed PMSM model excessively. Secondly, the online PSO for PMSM controller optimization, however only applied to the speed controller gains without considering current controller optimization. It is difficult to achieve high dynamics and robustness for PMSM drive system. Thirdly, much effort has been made on real-time PSO application in parameters identification, and results show effectiveness because parameters of PMSM are changed slowly [3]. This should be incorporated with the optimization process online.
In this paper, a discrete simulation model of IPMSM is set up firstly considering dead-time of inverter to present a real-time simulation condition. Then by measuring speed and current, an online PSO method is applied to design speed and current PI controller parameters for PMSM drives. To achieve good dynamic and steady states performance, different fitness function has been adopted. Numerical simulation test has been carried out with a step speed reference, while the stator resistance is varying. Simulation results show that this online optimization method is model free and has better robustness and faster optimization ability.

Real-Time Simulation Model Of Ipmsm Drive
The IPMSM model in the rotor reference frame is  Similar to other evolutionary algorithms, the PSO algorithm firstly produces initial swarm of particles in search space. Each particle represents a candidate solution to the problem and it has its own position X and velocity V. Each row in the position matrix X shows each particle's position, through which we can acquire the evaluation value of the particle. At each iteration, each particle memorizes and follows the tracks of its personal best (Pbest) and the global best position (Gbest) vectors to update the velocity matrix V.
Known these two best positions, particles can change velocities and positions using the following rules: where j=1, 2, … m; g=1, 2,… n. The superscripts t and t+1 denote the time index of the current and the next iterations respectively. The parameters 1 c and 2 c are called acceleration constant which adjust the maximum step of the particle flight towards Pbest and Gbest position. Usually, parameters 1 according to (8) over the course of the run. In this way, the algorithm can easily escape from local optimal solution in the early iteration stage as well as speed the convergence in the later iteration stage, and increase the reliability of finding the global optimal solution.

Definition of the Evaluation Function
To optimize the overall response of the motor drive, the fitness function is a weighted sum of several performance index based on measurements of the speed and currents outputs. It is shown in (10):  Fig.3 shows the change of fitness value of PSO for IPMSM drives and its decline rate is very fast. In order to test the proposed method in this paper, two different controllers were applied on IPMSM drive, and comparison results between conventional PI controllers and online PSO-PI controllers for IPMSM drives are presented in Fig.4

Conclusion
In this paper, a novel online particle swarm optimization method is proposed to design speed and current PI controllers of vector controlled interior permanent magnet synchronous motor drives, taking into account stator resistance variation. The speed and current controllers are optimized online as PSO update is carried out in each sampling cycle for the position and velocity of particle which represent the performance of the controllers. Furthermore, optimization process does not rely on the preciseness of IPMSM model excessively, because when stator resistance changes within 15%, IPMSM drive system still has a good dynamic and robustness. In addition, the dynamic and steady-state performance of the drive system has been improved by optimization of speed and current controller at the same time.