# Optimized Luenberger Observer-Based PMSM Sensorless Control by PSO

Authors: Rongfu Luo; Zenghui Wang; Yanxia Sun
Journal: Modelling and Simulation in Engineering
 (2022)

---

## Abstract

In the real applications, we found that it is difficult to achieve good control performance through manually tuning proportional–integral (PI) parameters of phase locked loop (PLL) and speed-loop of Luenberger observer (LO) for the PMSM sensorless control system. Therefore, this paper is to use the particle swarm optimization (PSO) algorithm to optimize the PI parameters of PLL and speed-loop of Luenberger observer of the system. Firstly, the ranges of PLL parameters are obtained by analyzing the PLL subsystem stability. Then, the ranges of PI parameters of PLL and speed-loop are set based on theoretical estimation and empirical values. The control system model is realized in MATLAB/Simulink that considers the constraints such as the saturation. The integral time absolute error is the objective function, and the PSO with different topologies is used to optimize the PI parameters. The simulation and experimental results show that the proposed method is feasible, and the optimized parameters can effectively improve the precision of position estimation and speed estimation. Moreover, the simulations and experiments are carried out to verify the robustness of the proposed method, and the results show that the optimized system can achieve good performance when there are uncertainties or disturbances.


---

## Body

## 1. Introduction

The advantages of permanent magnet synchronous motor (PMSM) include high efficiency, high power density, and small size [1–4]. With the development of science and technology, customers, who need higher quality productions and many products, put forward higher requirements for motor control and energy efficiency, which cause the widespread adoption of PMSM in industries like home appliance, industrial engineering, and autoindustry. The field-oriented control (FOC) technology is widely used to control PMSM. In the FOC system, it is necessary to obtain the information of rotor position and speed. In order to obtain the rotor position, some position sensors (such as Hall sensor, photoelectric encoder, and rotary converter) are used to detect the rotor position of the motor. However, the sensor increases the complexity and cost of control systems and reduces the reliability of the system [4]. In order to solve the series of problems caused the position sensors, researchers have proposed the sensorless control technology for PMSM. The research and application of this technology is of great significance and has gradually become one of the hottest fields of motor control, and this kind of control method is called sensorless control [5].In general, the main methods of sensorless control of PMSM include high frequency injection (HFI), model reference adaptive system (MRAS), flux linkage observer (FLO), extended Kalman filter (EKF), sliding mode observer (SMO), and Luenberger observer (LO). HFI has good control performance on the sensorless low-speed operation [6–8]. However, this method has a poor effect on the recognition of the hidden pole motors besides causing additional noise [9]. MRAS has been used in references [10, 11], but it is dependent on motor parameters excessively [12]. FLO was used in [13, 14], but it has issues of DC offset and harmonics. EKF is good at dynamic performance and anti-interference ability [15, 16], but this algorithm is complex [1, 9]. SMO is simple, and it has good robustness [17–20], but it has discontinuous switch control, which can cause system chattering [9]. Especially when it runs at low speed, SMO can cause huge torque ripple. LO uses the classical theory of the geometric property of linear (and stationary) systems known as observability [21–23] to estimate the internal states of the system based on the input and output values of the system. It is simple and not chattering and has good robustness [21], but there is division operation in the arctangent function, which can cause larger estimation error of rotor position and speed [19]. It was verified that PLL algorithm can efficiently improve estimation accuracy of rotor position and speed without division operation [2, 20], but it is difficult to tune the PI parameters of PLL [1].To achieve good control performance of PMSM sensorless control, this paper proposes to use PSO algorithm to optimize PI parameters of PLL and speed-loop. This method can reduce the parameter tuning difficulty and the deviation of PLL and speed-loop effectively, besides improving the speed performance of PMSM sensorless control. The main contributions of this paper are(1)
this study proposed to use PSO algorithm to optimize the PI parameters of PLL and speed-loop of the Luenberger observer-based PMSM sensorless control system, which can reduce the parameters tuning challenges(2)
the optimized PI parameters based on the simulation model of PMSM sensorless control system have been applied to the physical system, and it shows that they can improve the performance of position estimation and speed estimation(3)
simulations and experiments have been used to verify the robustness of the proposed method, and the results show that the optimized system has good performance when there are uncertainties or disturbances(4)
it is found that the random topology of PSO can achieve better performance than the ring topology and global topologyThe rest of this paper is arranged as follows. Section2 gives a brief description of the Luenberger observer-based PMSM sensorless control. A new application for the PSO-optimized PMSM sensorless control system is described in Section 3. In Section 4, the system simulation and experiment are given to verify the performance of the proposed method, and the results are investigated based on some comparisons. Finally, Section 5 gives the conclusion of this study.


## 2. Luenberger Observer Based on PMSM Sensorless Control System

The PMSM sensorless control system using Luenberger observer is shown in Figure1. The whole control system is comprised of space vector pulse width modulation (SVPWM), three-phase full bridge inverter circuit, Luenberger observer, and speed and position estimator. The details of Figure 1 are described in the following subsections.Figure 1
Block diagram of PMSM sensorless control system based on LO.


### 2.1. Mathematical Model of PMSM

This paper uses the stationary stator coordinate system of PMSM as shown in Figure2. The axes A, B, and C refer to three-phase stationary stator coordinates. Each electric angle is 120°. The axes α and β refer to two-phase stationary stator coordinates. The vector diagram between two-phase stationary stator coordinates and two-phase rotating rotor coordinates is shown as Figure 3. The axes d and q refer to two-phase rotating rotor coordinates. According to rotor field-orientated control, d is the axis where the rotor locates, and the axis q gets ahead 90° of the axis d in an anticlockwise direction. The axis d and q rotate at rotor angular speed ωr in an anticlockwise direction.Figure 2
Stationary stator coordinate.Figure 3
Vector diagram.According to Figures2 and 3, it comes up with the voltage equations that PMSM works under ABC three-phase coordinates.
(1)ua=Ria+dψadt,ub=Rib+dψbdt,uc=Ric+dψcdt.Here,R is the stator winding resistance; ia, ib, and ic are three-phase current of ABC; ua,ub, and uc are three-phase voltage of ABC; ψa, ψb, and ψc are three-phase stator flux linkage of ABC.The three-phase stator flux linkage equations of PMSM are(2)ψa=Lia+ψfa,ψb=Lib+ψfb,ψc=Lic+ψfc.Here,L is the stator winding inductance; ψfa, ψfb, and ψfc are the flux linkages that the permanent magnet makes on the stator winding.The stator voltage equations that PMSM works under the stationaryα-β coordinates are
(3)Ldiαdt=uα−eα−Riα,Ldiβdt=uβ−eβ−Riβ.The back EMF equations that PMSM works under the stationaryα−β coordinates are
(4)eα=−Ψfωrsinθ,eβ=Ψfωrcosθ.Here,iα, iβ, uα, and uβ are the stator current and voltage of α-β axis; Ψf is the flux linkage of rotor permanent magnet;ωr is the electrical angle speed of the rotor;θis the electrical angle of the rotor.The voltage equations that PMSM works underd and q coordinates are as follows:
(5)ud=Rid+dψddt−Ψqωr,uq=Riq+dψqdt−Ψdωr,where ud and uq are the stator voltage on the axis d and q, respectively, id and iq are the stator current on the axis d and q, respectively, and ψd and ψq are the stator flux linkage component on the axis d and q, respectively.The stator flux linkage component on the axisd and q can be described by
(6)ψd=Ψf+Ldid,ψq=Lqiq.The equation of electromagnetic torque is(7)Te=32PΨfiq+Ld−Lqidiq.Here,P is the pole-pairs number of the motor.


### 2.2. Mathematical Model of Luenberger Observer of PMSM

The basic structure of Luenberger observer is shown in Figure4. According to the mathematical model of PMSM, we usually use the voltage and current of the PMSM, which could be measured easily, as the inputs to restructure its states. In Figure 4, a feedback control is introduced, and the feedback signal is the comparison of the estimated current with the actual one. It makes the estimated value be close to the actual value infinitely.Figure 4
Basic structure of the traditional Luenberger observer.In Figure4, iα, iβ, uα, and uβ are the stator current and voltage of α-β axis; i^α and i^β are the estimated currents of α-β axis, respectively; e^α and e^β are the estimated back EMFs of the α-β axis, respectively.In the block diagram of Figure4, x=eαeβT, u=uαuβT, and y=iαiβT.According to Figure4, we can obtain the following equations:
(8)ẋ=Ax+Bu,y=Cx,(9)x^̇=Ax^+Bu−Ky−y^,y^=Cx^.Substitutingx, u, and y into equations (8) and (9), we can design the PMSM mathematical model of the Luenberger observer as follows:
(10)Ldi^αdt=uα−e^α−Riα+Ke1iα−i^α,Ldi^βdt=uβ−e^β−Riβ+Ke1iβ−i^β,e^α=−Ke2iα−i^α,e^β=−Ke2iβ−i^β.Here,Ke1 and Ke2 are the gains of the Luenberger observer.After back EMF of Luenberger observer being estimated, the position angle of the rotor can be obtained directly by using the function below.(11)θ^e=Arctan−e^αe^β.Here,θ^e refers to the estimated rotor electrical angle.According to equations (4) and (11), the following function can be obtained.
(12)ω^r=e∧α2+e∧β2Ψf.Here,ω^r refers to the estimated electrical angle speed.According to equation (11), the arctangent function is used to calculate rotor electrical angle. In practice, there are lots of harmonics and noise in the control system due to the nonlinearity of the inverter. Therefore, the division operation in the arctangent function causes larger estimation error of rotor position and speed [19].Another method for rotor position and speed estimation is using PLL, which can efficiently avoid the noise made by arctangent function, and the specific block diagram is shown in Figure5 (we call this method as “2021 LO”). The whole control system is comprised of SVPWM, three-phase full bridge inverter circuit, Luenberger observer, and phase locked loop.Figure 5
Block diagram of PMSM sensorless control system based on 2021 LO.PLL is used to obtain the position and speed due to the excellent tracking performance on frequency and phase of PLL. The generic PLL block diagram is shown in Figure6.Figure 6
Block diagram of the PLL architecture.According to Figure6, the following function can be obtained
(13)∆e=−e^a∗cosθ^−e^β∗sinθ^=Ψf∗ω^r∗sinθ^e−θ^.In Figure6, ω^ refers to the estimated rotor speed by the PLL, and θ^ refers to the estimated rotor position angle by the PLL.Whenθ^e−θ^<π/8, the following function can be used.
(14)sinθ^e−θ^≈θ^e−θ^.According to equation (14), Figure 6 can be equivalent to Figure 7.Figure 7
Equivalent diagram of the PLL.According to Figure7, the closed loop transfer function and error transfer function of phase locked loop can be obtained, respectively, as below:
(15)G1s=θ^sθ^es=sKp+Kis2+sKp+Ki,(16)G2s=∆esθ^es=s2s2+sKp+Ki.Here,K=Ψfω^r. Since K is in the outside of the closed-loop system, it does not affect the stability of the PLL.SinceKp>0,Ki>0, (15) and (16) are both minimum phase system. So, the stability of (15) and (16) is determined by their poles.The characteristic equation of (15) and (16) is
(17)s2+sKp+Ki=0.Hence, the poles of (15) and (16) are
(18)s1,2=−Kp±Kp2−4Ki2.SinceKp>0 and Ki>0, s1,2<0 if Kp2−4Ki>0, and the real parts of s1,2 are negative if Kp2−4Ki>0.Hence, for allKp>0,Ki>0, (15) and (16) are stable.As rotor position is a ramp function, the steady-state error of rotor position and speed estimation system by phase locked loop can be obtained as(19)∆e∞=lims⟶0s∗∆es=lims⟶0ss2+sKp+Ki=0.Equation (19) shows that actual rotor position can be estimated by the PLL, and the PLL has a low pass filtering characteristic, which can perform secondary filtering on the back EMF to obtain the rotor position. Because the performance of phase-locked loop is determined by Kp and Ki, we found that it is very complex to calculate the value of Kp and Ki based on the analytical solution. In order to improve the estimating performance of position and speed, PSO can be used to optimize PI parameters of PLL and speed-loop in PMSM sensorless control system based on the 2021 LO. It can also improve estimated precision of position and speed and performance of dynamic response.


## 2.1. Mathematical Model of PMSM

This paper uses the stationary stator coordinate system of PMSM as shown in Figure2. The axes A, B, and C refer to three-phase stationary stator coordinates. Each electric angle is 120°. The axes α and β refer to two-phase stationary stator coordinates. The vector diagram between two-phase stationary stator coordinates and two-phase rotating rotor coordinates is shown as Figure 3. The axes d and q refer to two-phase rotating rotor coordinates. According to rotor field-orientated control, d is the axis where the rotor locates, and the axis q gets ahead 90° of the axis d in an anticlockwise direction. The axis d and q rotate at rotor angular speed ωr in an anticlockwise direction.Figure 2
Stationary stator coordinate.Figure 3
Vector diagram.According to Figures2 and 3, it comes up with the voltage equations that PMSM works under ABC three-phase coordinates.
(1)ua=Ria+dψadt,ub=Rib+dψbdt,uc=Ric+dψcdt.Here,R is the stator winding resistance; ia, ib, and ic are three-phase current of ABC; ua,ub, and uc are three-phase voltage of ABC; ψa, ψb, and ψc are three-phase stator flux linkage of ABC.The three-phase stator flux linkage equations of PMSM are(2)ψa=Lia+ψfa,ψb=Lib+ψfb,ψc=Lic+ψfc.Here,L is the stator winding inductance; ψfa, ψfb, and ψfc are the flux linkages that the permanent magnet makes on the stator winding.The stator voltage equations that PMSM works under the stationaryα-β coordinates are
(3)Ldiαdt=uα−eα−Riα,Ldiβdt=uβ−eβ−Riβ.The back EMF equations that PMSM works under the stationaryα−β coordinates are
(4)eα=−Ψfωrsinθ,eβ=Ψfωrcosθ.Here,iα, iβ, uα, and uβ are the stator current and voltage of α-β axis; Ψf is the flux linkage of rotor permanent magnet;ωr is the electrical angle speed of the rotor;θis the electrical angle of the rotor.The voltage equations that PMSM works underd and q coordinates are as follows:
(5)ud=Rid+dψddt−Ψqωr,uq=Riq+dψqdt−Ψdωr,where ud and uq are the stator voltage on the axis d and q, respectively, id and iq are the stator current on the axis d and q, respectively, and ψd and ψq are the stator flux linkage component on the axis d and q, respectively.The stator flux linkage component on the axisd and q can be described by
(6)ψd=Ψf+Ldid,ψq=Lqiq.The equation of electromagnetic torque is(7)Te=32PΨfiq+Ld−Lqidiq.Here,P is the pole-pairs number of the motor.


## 2.2. Mathematical Model of Luenberger Observer of PMSM

The basic structure of Luenberger observer is shown in Figure4. According to the mathematical model of PMSM, we usually use the voltage and current of the PMSM, which could be measured easily, as the inputs to restructure its states. In Figure 4, a feedback control is introduced, and the feedback signal is the comparison of the estimated current with the actual one. It makes the estimated value be close to the actual value infinitely.Figure 4
Basic structure of the traditional Luenberger observer.In Figure4, iα, iβ, uα, and uβ are the stator current and voltage of α-β axis; i^α and i^β are the estimated currents of α-β axis, respectively; e^α and e^β are the estimated back EMFs of the α-β axis, respectively.In the block diagram of Figure4, x=eαeβT, u=uαuβT, and y=iαiβT.According to Figure4, we can obtain the following equations:
(8)ẋ=Ax+Bu,y=Cx,(9)x^̇=Ax^+Bu−Ky−y^,y^=Cx^.Substitutingx, u, and y into equations (8) and (9), we can design the PMSM mathematical model of the Luenberger observer as follows:
(10)Ldi^αdt=uα−e^α−Riα+Ke1iα−i^α,Ldi^βdt=uβ−e^β−Riβ+Ke1iβ−i^β,e^α=−Ke2iα−i^α,e^β=−Ke2iβ−i^β.Here,Ke1 and Ke2 are the gains of the Luenberger observer.After back EMF of Luenberger observer being estimated, the position angle of the rotor can be obtained directly by using the function below.(11)θ^e=Arctan−e^αe^β.Here,θ^e refers to the estimated rotor electrical angle.According to equations (4) and (11), the following function can be obtained.
(12)ω^r=e∧α2+e∧β2Ψf.Here,ω^r refers to the estimated electrical angle speed.According to equation (11), the arctangent function is used to calculate rotor electrical angle. In practice, there are lots of harmonics and noise in the control system due to the nonlinearity of the inverter. Therefore, the division operation in the arctangent function causes larger estimation error of rotor position and speed [19].Another method for rotor position and speed estimation is using PLL, which can efficiently avoid the noise made by arctangent function, and the specific block diagram is shown in Figure5 (we call this method as “2021 LO”). The whole control system is comprised of SVPWM, three-phase full bridge inverter circuit, Luenberger observer, and phase locked loop.Figure 5
Block diagram of PMSM sensorless control system based on 2021 LO.PLL is used to obtain the position and speed due to the excellent tracking performance on frequency and phase of PLL. The generic PLL block diagram is shown in Figure6.Figure 6
Block diagram of the PLL architecture.According to Figure6, the following function can be obtained
(13)∆e=−e^a∗cosθ^−e^β∗sinθ^=Ψf∗ω^r∗sinθ^e−θ^.In Figure6, ω^ refers to the estimated rotor speed by the PLL, and θ^ refers to the estimated rotor position angle by the PLL.Whenθ^e−θ^<π/8, the following function can be used.
(14)sinθ^e−θ^≈θ^e−θ^.According to equation (14), Figure 6 can be equivalent to Figure 7.Figure 7
Equivalent diagram of the PLL.According to Figure7, the closed loop transfer function and error transfer function of phase locked loop can be obtained, respectively, as below:
(15)G1s=θ^sθ^es=sKp+Kis2+sKp+Ki,(16)G2s=∆esθ^es=s2s2+sKp+Ki.Here,K=Ψfω^r. Since K is in the outside of the closed-loop system, it does not affect the stability of the PLL.SinceKp>0,Ki>0, (15) and (16) are both minimum phase system. So, the stability of (15) and (16) is determined by their poles.The characteristic equation of (15) and (16) is
(17)s2+sKp+Ki=0.Hence, the poles of (15) and (16) are
(18)s1,2=−Kp±Kp2−4Ki2.SinceKp>0 and Ki>0, s1,2<0 if Kp2−4Ki>0, and the real parts of s1,2 are negative if Kp2−4Ki>0.Hence, for allKp>0,Ki>0, (15) and (16) are stable.As rotor position is a ramp function, the steady-state error of rotor position and speed estimation system by phase locked loop can be obtained as(19)∆e∞=lims⟶0s∗∆es=lims⟶0ss2+sKp+Ki=0.Equation (19) shows that actual rotor position can be estimated by the PLL, and the PLL has a low pass filtering characteristic, which can perform secondary filtering on the back EMF to obtain the rotor position. Because the performance of phase-locked loop is determined by Kp and Ki, we found that it is very complex to calculate the value of Kp and Ki based on the analytical solution. In order to improve the estimating performance of position and speed, PSO can be used to optimize PI parameters of PLL and speed-loop in PMSM sensorless control system based on the 2021 LO. It can also improve estimated precision of position and speed and performance of dynamic response.


## 3. Optimizing PMSM Sensorless Control System

In practice, the load is often fluctuant when the PMSM is used, and it can cause maladjustment or overshooting of rotation speed if the parameters of PI controllers are not properly tuned. It is hard to meet the requirements in high precision rotation speed control. Hence, it is necessary to optimize the PI values of speed-loop in PMSM sensorless control system and improve the performance of speed control. The specific block diagram of the proposed system is shown in Figure8. The following two subsections show how to apply PSO to the Luenberger observer-based PMSM sensorless control system.Figure 8
Block diagram of optimized PMSM sensorless control system by PSO.


### 3.1. Introduction of PSO

PSO was put forward by Oubelaid et al. [24]. The information of every particle in the particle swarm is iterated and updated constantly. In every iteration, it can calculate the optimal values of individual particle and all the particles (pbest and gbest). After calculating the pbest and gbest, every particle adjusts its flight speed and location. The formulas of speed and location updating of particles are
(20)uijt+1=uijt+c1r1pbestijt−xijt+c2r2gbestijt−xijt,xijt+1=xijt+uijt.In the equations,uijt refers to velocity of particle i in j dimension after t times’ iteration; xijt refers to location of particle i in j dimension after t times’ iteration; c1 and c2 are learning factors in particle swarm; r1 and r2 refer to two random numbers in (0, 1).The topology of the particles plays important role for the optimization performance, and there are several kinds of topologies such as ring topology, global topology (also called full connection topology), and random topology (it is the default set of the standard PSO 2007 [25]). The ring topology means that each particle only has two fixed neighbors, the global topology is the above described one and its formula is (20), and the random topology means that the topology of particles are not fixed and is dynamically changed according to preset condition(s).


### 3.2. PSO-Based PMSM Sensorless Control System

In this paper, the optimization of the PI parameters of PLL and speed-loop is realized using the standard PSO 2007 [25]. Firstly, we need to select the objective function. In order to get a good control performance, the absolute value of speed difference between the target setting value and estimating value of observer should be small enough. The objective function is
(21)Track_errt=ωtt−ω^rt.Here,Track_errt is the speed difference between the target setting value and estimating value of observer at time t, and ωtt is the target setting speed in time t.In consideration of the system’s tuning time should be small, we use the ITAE (integral time absolute error) as the evaluation function. Its continuous state function is (22), and its discrete state function is (23).
(22)FITAE=∫0tTrackerrtdt.Since the fixed-step solver ode3 is used to simulate the control system, we can use the following equation as the objective function which is similar to (22).
(23)F=∑i=0nTrack_errk.The variables to be optimized include 4 parameters,Kp and Ki of PLL and Kp and Ki of speed-loop. We label them as PLL_Kp, PLL_Ki, n_Kp, and n_Ki.


## 3.1. Introduction of PSO

PSO was put forward by Oubelaid et al. [24]. The information of every particle in the particle swarm is iterated and updated constantly. In every iteration, it can calculate the optimal values of individual particle and all the particles (pbest and gbest). After calculating the pbest and gbest, every particle adjusts its flight speed and location. The formulas of speed and location updating of particles are
(20)uijt+1=uijt+c1r1pbestijt−xijt+c2r2gbestijt−xijt,xijt+1=xijt+uijt.In the equations,uijt refers to velocity of particle i in j dimension after t times’ iteration; xijt refers to location of particle i in j dimension after t times’ iteration; c1 and c2 are learning factors in particle swarm; r1 and r2 refer to two random numbers in (0, 1).The topology of the particles plays important role for the optimization performance, and there are several kinds of topologies such as ring topology, global topology (also called full connection topology), and random topology (it is the default set of the standard PSO 2007 [25]). The ring topology means that each particle only has two fixed neighbors, the global topology is the above described one and its formula is (20), and the random topology means that the topology of particles are not fixed and is dynamically changed according to preset condition(s).


## 3.2. PSO-Based PMSM Sensorless Control System

In this paper, the optimization of the PI parameters of PLL and speed-loop is realized using the standard PSO 2007 [25]. Firstly, we need to select the objective function. In order to get a good control performance, the absolute value of speed difference between the target setting value and estimating value of observer should be small enough. The objective function is
(21)Track_errt=ωtt−ω^rt.Here,Track_errt is the speed difference between the target setting value and estimating value of observer at time t, and ωtt is the target setting speed in time t.In consideration of the system’s tuning time should be small, we use the ITAE (integral time absolute error) as the evaluation function. Its continuous state function is (22), and its discrete state function is (23).
(22)FITAE=∫0tTrackerrtdt.Since the fixed-step solver ode3 is used to simulate the control system, we can use the following equation as the objective function which is similar to (22).
(23)F=∑i=0nTrack_errk.The variables to be optimized include 4 parameters,Kp and Ki of PLL and Kp and Ki of speed-loop. We label them as PLL_Kp, PLL_Ki, n_Kp, and n_Ki.


## 4. Simulation of System and Experimental Verification

In order to verify the feasibility and performance of the proposed control system, simulations and experiments are carried out. The parameters of PMSM, PSO, the 2021 LO, and the LO are shown in Tables1–4.Table 1
PMSM parameters.
ParametersValuesRated voltage310VDCNumber of poles8 polesPhase resistance (Rs)2.875 ohmsPhase inductance (Ls)8.5 mHRotor flux linkages (Ψf)0.175 WbTable 2
Parameters of PSO.
ParametersSizeIterationsC1 C2Search spacePLL_KpPLL_Kin_Kpn_KiValues41000.8100-200010000-600000.2-50.1-10Table 3
PI parameters of 2021 LO [26, 27].
ParametersPLL_KpPLL_Kin_Kpn_KiValues50020000.147Table 4
PI parameters of LO [27].
Parametersn_Kpn_KiValues0.147


### 4.1. Construct Simulation Model

According to the above analysis, the simulation model of PSO-based PMSM sensorless control system is shown in Figure9 realized in MATLAB/Simulink. The whole simulation model is comprised of PMSM, SVPWM, three-phase full bridge inverter circuit, Luenberger observer, phase locked loop, and PSO. Here, PSO is used to optimize the whole system by calling the simulation file.Figure 9
Simulink/MATLAB model of PSO-based PMSM sensorless control.


### 4.2. Comparative Analysis of PSO with Different Topologies

The parameters of PMSM in this simulation are shown in Table1. According to foregoing analysis, the PLL is stable when both the value of PLL_Kp and PLL_Ki are greater than zero, but the range is too big. According to theoretical estimation [26] and experience in engineering application [27], the variable search spaces and PSO parameter set are given in Table 2, and the flowchart of PSO algorithm optimization is given in Figure 10. The whole simulation time is 0.1 second, and the target speed is 1000 RPM. When the time is at 0.05 second, we increase the load to 2 Nm. After 98 iterations of PSO, we got the optimal parameters of PI shown in Table 5. Track_err is convergent and close to zero. The value of evaluation function is 3.7386e+06.Figure 10
Flowchart for PSO algorithm optimization.Table 5
PI parameters of proposed method.
ParametersPLL_KpPLL_Kin_Kpn_KiValues1212429700.58230.4127In order to find which topology can achieve better optimization performance, we did comparisons among the ring topology, global topology, and the standard PSO 2007 (random topology). In the same condition, we simulated 10 times for each topology, and the results are shown in Table6. From Table 6, we can conclude that the ITAE of standard PSO 2007 (the random topology) is better or smaller than that of the PSO with ring topology and global topology, but the computational time of ring topology is better than standard PSO and global topology, since there are fewer neighbors and less comparisons for the ring topology.Table 6
Comparison of standard PSO 2007 with different topologies.
DescriptionRing topologyStandard PSO 2007All topologyMin. ITAE3.7345e+063.7349e+063.7367e+06Max. ITAE3.7651e+063.7464e+063.8265e+06Mean ITAE3.7426e+063.7412e+063.7548e+06Mean computational time (s)545.92549.34565.12


### 4.3. Simulation and Analysis of PMSM Performance

According to the simulation result of Subsection4.2, we used the optimal parameters of PI by standard PSO 2007 (shown in Table 5) to verify the quantitative performance of the proposed method. LO [23] and 2021 LO [2] are compared with the proposed method based on the simulations. In the simulations, the same PMSM model and same simulation conditions were used.
(1)
Comparison of speed curveThe simulation results are shown in Figure11. We can conclude that PSO has obvious advantages in speed dynamic performance.
(2)
Comparison of control performanceFigure 11
Comparison of speed curve.The simulation comparisons are based on the maximum speed overshoot, transient time and ITAE, and they are shown in Table7. From Table 7, we can conclude that the performance of PMSM has been improved significantly using the proposed method.Table 7
Comparison of optimization performance.
TypeSpeed overshoot (%)Transient time (ms)ITAELO18.8%432.7648e+072021 LO20.8%426.6414e+06Proposed method5.3%113.7386e+06Speedovershoot=max.speedovershoot/targetsettingspeed−1∗100%. Transient time: set the error is 2%.


### 4.4. Comparative Analysis of Simulation Results of PMSM Sensorless Control System

According to the simulation results of Subsection4.2, the PI parameters optimized by PSO were applied to the simulation model of PMSM sensorless control system. The performance of PMSM was compared with the LO and the 2021 LO. The simulation condition is same as Subsection 4.2.Figures12–14 show the back EMF waveforms using the LO, the 2021 LO and the proposed method, respectively. These waveforms are perfect sine waves of three back EMF. The start and operation processes of PMSM are quite stable, which build a good foundation for the accurate estimations of the rotor position and speed. This proves that there is no obvious difference on back EMF performances of these three observers under this simulation condition.Figure 12
BEMF waveforms using the LO.Figure 13
BEMF waveforms using 2021 LO.Figure 14
BEMF waveforms using the proposed method.Figures15–17 show the estimated position and the actual position waveforms for the LO, the 2021 LO, and the proposed method. From Figures 15–17, it can be found that the position angle deviation of proposed method between estimation and actual position is smaller than other two methods.Figure 15
Results of estimated position using the LO.Figure 16
Results of estimated position using the 2021 LO.Figure 17
Results of estimated position using the proposed method.Figures18–20 show the position estimation errors using the LO, the 2021 LO, and the proposed method, respectively. Comparing these waveforms, we can get the following:
(a)
The position estimation errors of the LO, the 2021 LO, and the proposed method are 2.9° (about 0.051 rad), 2.18° (about 0.038 rad), and 1.58° (about 0.0275 rad), respectively, when start up(b)
The position estimation errors are 2.5° (about 0.0436 rad), 1.8° (about 0.0314 rad), and 1.2° (about 0.0209 rad), respectively, in steady stateFigure 18
Position estimation errors using LO.Figure 19
Position estimation errors using 2021 LO.Figure 20
Position estimation errors using proposed method.It shows that the position estimation error of PMSM is smaller using the proposed method than that of other two methods.Figures21–23 show the estimated speed and actual speed about the LO, the 2021 LO, and the proposed method, respectively. It showed that compared with the proposed method, the speed overshoot of PMSM is bigger by using the LO and the 2021 LO, and the time from start to steady state is longer.Figure 21
Estimated speed and actual speed for LO.Figure 22
Estimated speed and actual speed for 2021 LO.Figure 23
Estimated speed and actual speed for proposed method.Figures24–26 show the speed estimation error using the LO, the 2021 LO, and the proposed method, respectively. Comparing these waveforms, it shows that the proposed method is better than the LO and the 2021 LO of the error of speed estimation when start-up, and the speed error is about ±0.1 RPM when in steady state.Figure 24
Speed estimation error using the LO.Figure 25
Speed estimation error using the 2021 LO.Figure 26
Speed estimation error using the proposed method.Table8 lists the simulation data on the accuracy of estimated position and estimated speed, and it can be found that the proposed method can achieve better performance than other two methods.Table 8
Performance comparison of PMSM sensorless control system.
ItemDescriptionLO2021 LOProposed method1Error for estimated position and actual position when start up2.9°2.18°1.58°2Error for estimated position and actual position at stable running2.5°1.8°1.2°3Error for estimated speed and actual speed when start up27 RPM35 RPM17 RPM4Error for estimated speed and actual speed at stable running±1 RPM±0.1 RPM±0.1 RPM


### 4.5. Robustness Analysis of PMSM Sensorless Control Based on Simulations

In practice, the robustness is important for a control system. In order to verify the robustness of the optimized PMSM system, the work performance on no-load and full-load is to be verified based on two cases.Case 1.
The whole simulation time is 0.1 second. Firstly, we set the PMSM running at 1000 RPM without load, and then, the 2 Nm load is applied to the system att=0.05 second. The simulation results are shown in Figure 26, which shows the waveform of speed appeared fluctuations, but it goes stably immediately.Case 2.
The whole simulation time is 0.1 second. Firstly, we set the PMSM running at the 1000 RPM with full load 2 Nm. Whent=0.05 second, the load and speed are changed to 1 Nm (50% of load torque changes) and 500 RPM (50% of speed changes), respectively. Simulation results of speed and speed estimation error are shown in Figures 27 and 28, respectively. The simulation results showed that the speed fluctuates slightly and then be stabilized quickly when the speed and torque are changed.Figure 27
Estimated speed and actual speed for proposed method at Case2.Figure 28
Speed estimation error for proposed method at Case2.According to the simulation results above, it proves that the control system has good robustness and dynamic response.


### 4.6. Experimental Results and Analysis

It is important to verify the proposed PSO optimization method using physical system. Here, using STM32F030 MCU as its main control chip and writing the software code in C language, a PMSM sensorless control system is designed. The parameters of PMSM are same as Table1. Experimental platform is shown in Figure 29.Figure 29
Experimental installation.In order to verify the accuracy of speed, 2 Nm loads are applied to the PMSM by hysteresis dynamometer when speed running at 1000 RPM, and the phase current waveform, torque, and speed are shown in Figure30. The waveforms show that the phase current presents a perfect sine wave, and the motor speed is stabilized at about 1000.05 RPM. It shows that the speed results of experiment are consistent with the simulation results.Figure 30
Phase current waveform, torque, and speed measurement for proposed method.To verify the robustness of optimized PMSM system, two experimental cases are carried out.Case 1.
In order to verify the robustness of the PMSM physical system, 2 Nm loads are applied to PMSM by hysteresis dynamometer after the speed stabilizes at 1000 RPM without load, and the test data is shown in Figure31. These phase currents are perfect sine waves. The current changes very smoothly, without abnormal fluctuations when the load is applied to the PMSM system.Case 2.
In order to verify the robustness of PMSM physical system under full load condition, the load and speed are changed to 1 Nm and 500 RPM, respectively, after PMSM system becomes stable with a speed of 1000 RPM and a 2 Nm load. The test data is shown in Figure32. The waveform shows that the current changes very smoothly, without abnormal fluctuations when the test condition changes.Figure 31
Phase current waveform for proposed method.Figure 32
Phase current waveform, torque, and speed measurement for proposed method.According to the above experiments, it proves that experimental results are consistent with the simulation results, and the optimized PMSM system has good stability and robustness. Because of the limited resources, the rotor position angle and speed overshoot are not obtained in the experiment. According to equations (4) and (13), the speed is proportional to the position angle. Combined with the speed testing data above, it can be deduced that the position angle is consistent to the simulation data.


## 4.1. Construct Simulation Model

According to the above analysis, the simulation model of PSO-based PMSM sensorless control system is shown in Figure9 realized in MATLAB/Simulink. The whole simulation model is comprised of PMSM, SVPWM, three-phase full bridge inverter circuit, Luenberger observer, phase locked loop, and PSO. Here, PSO is used to optimize the whole system by calling the simulation file.Figure 9
Simulink/MATLAB model of PSO-based PMSM sensorless control.


## 4.2. Comparative Analysis of PSO with Different Topologies

The parameters of PMSM in this simulation are shown in Table1. According to foregoing analysis, the PLL is stable when both the value of PLL_Kp and PLL_Ki are greater than zero, but the range is too big. According to theoretical estimation [26] and experience in engineering application [27], the variable search spaces and PSO parameter set are given in Table 2, and the flowchart of PSO algorithm optimization is given in Figure 10. The whole simulation time is 0.1 second, and the target speed is 1000 RPM. When the time is at 0.05 second, we increase the load to 2 Nm. After 98 iterations of PSO, we got the optimal parameters of PI shown in Table 5. Track_err is convergent and close to zero. The value of evaluation function is 3.7386e+06.Figure 10
Flowchart for PSO algorithm optimization.Table 5
PI parameters of proposed method.
ParametersPLL_KpPLL_Kin_Kpn_KiValues1212429700.58230.4127In order to find which topology can achieve better optimization performance, we did comparisons among the ring topology, global topology, and the standard PSO 2007 (random topology). In the same condition, we simulated 10 times for each topology, and the results are shown in Table6. From Table 6, we can conclude that the ITAE of standard PSO 2007 (the random topology) is better or smaller than that of the PSO with ring topology and global topology, but the computational time of ring topology is better than standard PSO and global topology, since there are fewer neighbors and less comparisons for the ring topology.Table 6
Comparison of standard PSO 2007 with different topologies.
DescriptionRing topologyStandard PSO 2007All topologyMin. ITAE3.7345e+063.7349e+063.7367e+06Max. ITAE3.7651e+063.7464e+063.8265e+06Mean ITAE3.7426e+063.7412e+063.7548e+06Mean computational time (s)545.92549.34565.12


## 4.3. Simulation and Analysis of PMSM Performance

According to the simulation result of Subsection4.2, we used the optimal parameters of PI by standard PSO 2007 (shown in Table 5) to verify the quantitative performance of the proposed method. LO [23] and 2021 LO [2] are compared with the proposed method based on the simulations. In the simulations, the same PMSM model and same simulation conditions were used.
(1)
Comparison of speed curveThe simulation results are shown in Figure11. We can conclude that PSO has obvious advantages in speed dynamic performance.
(2)
Comparison of control performanceFigure 11
Comparison of speed curve.The simulation comparisons are based on the maximum speed overshoot, transient time and ITAE, and they are shown in Table7. From Table 7, we can conclude that the performance of PMSM has been improved significantly using the proposed method.Table 7
Comparison of optimization performance.
TypeSpeed overshoot (%)Transient time (ms)ITAELO18.8%432.7648e+072021 LO20.8%426.6414e+06Proposed method5.3%113.7386e+06Speedovershoot=max.speedovershoot/targetsettingspeed−1∗100%. Transient time: set the error is 2%.


## 4.4. Comparative Analysis of Simulation Results of PMSM Sensorless Control System

According to the simulation results of Subsection4.2, the PI parameters optimized by PSO were applied to the simulation model of PMSM sensorless control system. The performance of PMSM was compared with the LO and the 2021 LO. The simulation condition is same as Subsection 4.2.Figures12–14 show the back EMF waveforms using the LO, the 2021 LO and the proposed method, respectively. These waveforms are perfect sine waves of three back EMF. The start and operation processes of PMSM are quite stable, which build a good foundation for the accurate estimations of the rotor position and speed. This proves that there is no obvious difference on back EMF performances of these three observers under this simulation condition.Figure 12
BEMF waveforms using the LO.Figure 13
BEMF waveforms using 2021 LO.Figure 14
BEMF waveforms using the proposed method.Figures15–17 show the estimated position and the actual position waveforms for the LO, the 2021 LO, and the proposed method. From Figures 15–17, it can be found that the position angle deviation of proposed method between estimation and actual position is smaller than other two methods.Figure 15
Results of estimated position using the LO.Figure 16
Results of estimated position using the 2021 LO.Figure 17
Results of estimated position using the proposed method.Figures18–20 show the position estimation errors using the LO, the 2021 LO, and the proposed method, respectively. Comparing these waveforms, we can get the following:
(a)
The position estimation errors of the LO, the 2021 LO, and the proposed method are 2.9° (about 0.051 rad), 2.18° (about 0.038 rad), and 1.58° (about 0.0275 rad), respectively, when start up(b)
The position estimation errors are 2.5° (about 0.0436 rad), 1.8° (about 0.0314 rad), and 1.2° (about 0.0209 rad), respectively, in steady stateFigure 18
Position estimation errors using LO.Figure 19
Position estimation errors using 2021 LO.Figure 20
Position estimation errors using proposed method.It shows that the position estimation error of PMSM is smaller using the proposed method than that of other two methods.Figures21–23 show the estimated speed and actual speed about the LO, the 2021 LO, and the proposed method, respectively. It showed that compared with the proposed method, the speed overshoot of PMSM is bigger by using the LO and the 2021 LO, and the time from start to steady state is longer.Figure 21
Estimated speed and actual speed for LO.Figure 22
Estimated speed and actual speed for 2021 LO.Figure 23
Estimated speed and actual speed for proposed method.Figures24–26 show the speed estimation error using the LO, the 2021 LO, and the proposed method, respectively. Comparing these waveforms, it shows that the proposed method is better than the LO and the 2021 LO of the error of speed estimation when start-up, and the speed error is about ±0.1 RPM when in steady state.Figure 24
Speed estimation error using the LO.Figure 25
Speed estimation error using the 2021 LO.Figure 26
Speed estimation error using the proposed method.Table8 lists the simulation data on the accuracy of estimated position and estimated speed, and it can be found that the proposed method can achieve better performance than other two methods.Table 8
Performance comparison of PMSM sensorless control system.
ItemDescriptionLO2021 LOProposed method1Error for estimated position and actual position when start up2.9°2.18°1.58°2Error for estimated position and actual position at stable running2.5°1.8°1.2°3Error for estimated speed and actual speed when start up27 RPM35 RPM17 RPM4Error for estimated speed and actual speed at stable running±1 RPM±0.1 RPM±0.1 RPM


## 4.5. Robustness Analysis of PMSM Sensorless Control Based on Simulations

In practice, the robustness is important for a control system. In order to verify the robustness of the optimized PMSM system, the work performance on no-load and full-load is to be verified based on two cases.Case 1.
The whole simulation time is 0.1 second. Firstly, we set the PMSM running at 1000 RPM without load, and then, the 2 Nm load is applied to the system att=0.05 second. The simulation results are shown in Figure 26, which shows the waveform of speed appeared fluctuations, but it goes stably immediately.Case 2.
The whole simulation time is 0.1 second. Firstly, we set the PMSM running at the 1000 RPM with full load 2 Nm. Whent=0.05 second, the load and speed are changed to 1 Nm (50% of load torque changes) and 500 RPM (50% of speed changes), respectively. Simulation results of speed and speed estimation error are shown in Figures 27 and 28, respectively. The simulation results showed that the speed fluctuates slightly and then be stabilized quickly when the speed and torque are changed.Figure 27
Estimated speed and actual speed for proposed method at Case2.Figure 28
Speed estimation error for proposed method at Case2.According to the simulation results above, it proves that the control system has good robustness and dynamic response.


## 4.6. Experimental Results and Analysis

It is important to verify the proposed PSO optimization method using physical system. Here, using STM32F030 MCU as its main control chip and writing the software code in C language, a PMSM sensorless control system is designed. The parameters of PMSM are same as Table1. Experimental platform is shown in Figure 29.Figure 29
Experimental installation.In order to verify the accuracy of speed, 2 Nm loads are applied to the PMSM by hysteresis dynamometer when speed running at 1000 RPM, and the phase current waveform, torque, and speed are shown in Figure30. The waveforms show that the phase current presents a perfect sine wave, and the motor speed is stabilized at about 1000.05 RPM. It shows that the speed results of experiment are consistent with the simulation results.Figure 30
Phase current waveform, torque, and speed measurement for proposed method.To verify the robustness of optimized PMSM system, two experimental cases are carried out.Case 1.
In order to verify the robustness of the PMSM physical system, 2 Nm loads are applied to PMSM by hysteresis dynamometer after the speed stabilizes at 1000 RPM without load, and the test data is shown in Figure31. These phase currents are perfect sine waves. The current changes very smoothly, without abnormal fluctuations when the load is applied to the PMSM system.Case 2.
In order to verify the robustness of PMSM physical system under full load condition, the load and speed are changed to 1 Nm and 500 RPM, respectively, after PMSM system becomes stable with a speed of 1000 RPM and a 2 Nm load. The test data is shown in Figure32. The waveform shows that the current changes very smoothly, without abnormal fluctuations when the test condition changes.Figure 31
Phase current waveform for proposed method.Figure 32
Phase current waveform, torque, and speed measurement for proposed method.According to the above experiments, it proves that experimental results are consistent with the simulation results, and the optimized PMSM system has good stability and robustness. Because of the limited resources, the rotor position angle and speed overshoot are not obtained in the experiment. According to equations (4) and (13), the speed is proportional to the position angle. Combined with the speed testing data above, it can be deduced that the position angle is consistent to the simulation data.


## 5. Conclusion

This paper proposed to use the PSO algorithm to optimize the PI parameters of PLL and the speed-loop of the Luenberger observer-based PMSM sensorless control system. The simulation results in MATLAB/Simulink showed that the PSO algorithm can reduce the parameter tuning difficulty of PLL and speed loop effectively. Then, we applied the optimized PI parameters to the Simulink model of PMSM sensorless control system and physical system. The simulation results and experimental results showed that the proposed method can improve performance of position estimation and speed estimation. Moreover, the PSO with different topologies was tested, and it was found that the random topology of PSO can achieve better performance than the ring topology and global topology. Finally, simulations and experiments have been used to verify the robustness of the proposed method, and the results show that the optimized system has good performance when there are uncertainties or disturbances. Since the system model is based on MATLAB/Simulink, it is difficult to convert it to the codes, which can be run in the microcontroller of the experimental system. In the future, we will simplify the system model and the PSO algorithm, so the proposed method can real-time tune the system parameters.



---

*Source: 3328719-2022-08-22.xml*