Next Article in Journal
Kairos: Exploring a Virtual Botanical Garden through Point Clouds
Next Article in Special Issue
Direct Torque Control for Series-Winding PMSM with Zero-Sequence Current Suppression Capability
Previous Article in Journal
Improving the Detection and Positioning of Camouflaged Objects in YOLOv8
Previous Article in Special Issue
A Fixed-Point Position Observation Algorithm and System-on-Chip Design Suitable for Sensorless Control of High-Speed Permanent Magnet Synchronous Motor
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Speed Estimation Strategy for Closed-Loop Control of PMSM Based on PSO Optimized KF Series Algorithms

1
School of Automation, Wuhan University of Technology, Wuhan 430070, China
2
School of Power and Mechanical Engineering, Wuhan University, Wuhan 430072, China
*
Authors to whom correspondence should be addressed.
Electronics 2023, 12(20), 4215; https://doi.org/10.3390/electronics12204215
Submission received: 9 September 2023 / Revised: 5 October 2023 / Accepted: 10 October 2023 / Published: 11 October 2023
(This article belongs to the Special Issue Advances in Control for Permanent Magnet Synchronous Motor (PMSM))

Abstract

:
In this paper, solving the problem of the noise covariance matrix parameters tuning of the extended Kalman filter (EKF) and unscented Kalman filter algorithms (UKF) is difficult. A speed estimation strategy for a permanent magnet synchronous motor (PMSM) based on particle swarm optimization (PSO) optimized Kalman filter (KF) series algorithms is proposed. By using MATLAB/Simulink, in this paper, 20 effective simulation experiments on the noise covariance matrix parameter optimization process are conducted to obtain the optimal covariance matrix parameters of the extended Kalman filter and unscented Kalman filter. Moreover, EKF, PSO-EKF, UKF, and PSO-UKF are also compared to verify the effectiveness of the particle swarm optimization algorithm in optimizing the systems using the extended Kalman filter and unscented Kalman filter. For the error of speed estimation, taking 4000 rpm as a reference, the system using PSO-EKF has improved by 2.125% compared to that using EKF, and the system applying PSO-UKF has improved by 0.55% compared to the system applying UKF. For the error of electrical angle estimation, taking the system errors of original algorithms as references, the system adopting PSO-EKF has decreased by 60% compared to that adopting EKF, and the system using PSO-UKF has decreased by 47% compared to the system using UKF.

1. Introduction

A permanent magnet synchronous motor (PMSM) has the advantages of high efficiency, high reliability, high power density, and high torque density [1,2]. Thus, PMSM is widely used in the electric automobile industry. One of the most typical applications of PMSM is Tesla’s Model 3. The PMSM control system is a strongly coupled nonlinear system, and the unknown disturbances and time-varying parameters bring difficult problems to the system control [3], and thus for these difficulties, many control strategies for PMSMs have been developed [4]. For example, speed regulation strategies like field-oriented control (FOC), which is used for the speed control of PMSM made the control process easier to understand and realize. Parameter identification algorithms for PMSM are used for motor condition monitoring and control performance improvement. The sensorless control algorithm, which can also be considered a parameter identification algorithm, is designed to address the problems caused by rotor position sensors. In motor speed control, it is often necessary to obtain the motor speed information to form a stable and reliable closed-loop control, but position sensors mounted on the rotor shaft will undoubtedly increase the size and manufacturing cost of the motor, and also reduce the reliability of the motor control system and bring continuous noise [5]. This paper is going to talk about an optimized sensorless control strategy based on the Kalman filter series algorithm.
The Kalman filter (KF) is a recursive computational method developed on the basis of linear minimum variance estimation, but it is only for linear systems. For nonlinear systems, two improved Kalman filter algorithms have been proposed. One is an extended Kalman filter, and the other is an unscented Kalman filter.
The extended Kalman filter (EKF) and unscented Kalman filter (UKF) are widely used in parameter identification and sensorless control of induction motors [6,7,8,9]. The selection of the noise covariance matrices Q and R directly affects the estimation accuracy of the KF series algorithm [10]. The trial-and-error method is the most common method of noise matrix tuning, but it always requires a lot of time and effort to reach a good result [11]. S.Bolognani et al. [12] used a matrix parameter rectification algorithm based on theoretical analysis instead of the conventional experimental method and obtained a normalized QR matrix that is suitable for most of the PMSM control systems. The key feature of this method is the combined normalization of both the controlled system model and the EKF algorithm. It can perform well in most PMSM control systems where parameters vary in a narrow range. However, it may not achieve the best performance in certain PMSM control systems that lack flexibility. Anbang Wang et al. [13] tuned the covariance matrix based on the ant colony algorithm (ACA) and achieved good estimation results under lower speed motor conditions. The reference RPM and estimated RPM of EKF are the input parameters of ACA. The diagonal elements of Q and R matrices are set to the output. At the 955 rpm operating condition, the steady-state error and the overshoot of actual speed are both lower than 0.5%. It is worth noting that the ACA is well known for its local convergence because of the pheromone produced by ants. Menekse Aydin et al. [14] in the study of sensorless control methods for induction motors analyzed the role of diagonal elements of the noise covariance matrix for the motor control system and accordingly used a fuzzy control algorithm for noise matrix optimization. However, the creation of a fuzzy system is even more complicated than covariance matrix tuning by the trial-and-error method, which goes against its original purpose.
The above optimization algorithms will either greatly increase the complexity of the algorithm, increasing the load on the computational chip in practical applications, or the optimization effect will only be reflected in the low-speed operating conditions of the motor. Particle swarm optimization (PSO) is well known for its strong global search capability, simple computation, and fast convergence [15]. It is a parameter optimization algorithm that simulates the foraging of a flock of birds and has the advantages of fast convergence, few parameters, and a simple algorithm [16]. It is because of the mentioned advantages of the particle swarm algorithm that the PSO algorithm has been widely used for the parameter optimization of various scenarios in the past ten years. In order to achieve significant optimization effects without making the algorithm too complicated, this paper adopts PSO to optimize the noise covariance matrices to obtain better rotor position estimation.
In this paper, firstly, how to select the mathematical model of PMSM when using the KF series algorithms is described in detail, and the state space equation is given for the following formula derivations of EKF and UKF. Secondly, the formulas and processes of the EKF and UKF are presented in this paper. Then, the algorithm flow of PSO to optimize the covariance matrices of EKF and UKF is presented, and the control system framework based on the PSO algorithm is proposed. Finally, this article presents the simulation results of the process of optimizing the EKF and UKF matrix parameters by PSO. The obtained optimal matrix parameters are substituted into the actual system and compared with the system using original KF series algorithms, which proves the feasibility and effectiveness of the PSO-based optimization of the covariance matrices.

2. Selection of PMSM Mathematical Model for KF

PMSM is a nonlinear and strong coupling system, to perform well in the PMSM control system, the first and most important thing is to choose appropriate mathematical models. The mathematical models contain the voltage equation, flux equation, etc. Transforming the mathematical equations may help simplify the analysis of the PMSM model. The stator voltage equation and flux equation are given by Equation (1) and Equation (2), respectively.
u A = R i A + λ A d i A d t u B = R i B + λ B d i B d t u C = R i C + λ C d i C d t
λ A = L A A i A + M A B i B + M A C i C + λ cos θ e λ B = M B A i A + L B B i B + M B C i C + λ cos ( θ e 2 π 3 ) λ C = M C A i A + M C B i B + L C C i C + λ cos ( θ e + 2 π 3 )
In the above equations, u A , u B and u C are the voltage variables in the three-phase stationary coordinates. i A , i B and i C are the current variables in the three-phase rest frame. R represents the stator resistance. λ A , λ B and λ C denote the flux linkage in the three-phase rest frame. L A A represents the self-inductance of A-phase winding. M A B is the mutual inductance between B-phase winding and A-phase winding. λ is the flux linkage of the motor’s permanent magnet. θ e is denoted as the electrical angle of the motor.
The three-phase windings of an ideal motor are symmetrical. From this, the values of self-inductance of each phase are symmetry, and the values of mutual inductance between each phase are also equivalent. L and M are used for representing the self-inductance and mutual inductance, respectively.
From Equations (1) and (2), it is easy to demonstrate the following equation:
u A = R i A + ( L M ) d i A d t ω e λ cos θ e u B = R i B + ( L M ) d i B d t ω e λ cos ( θ e 2 π 3 ) u C = R i C + ( L M ) d i C d t ω e λ cos ( θ e 4 π 3 )
The equations of Equation (3) are rarely used directly, and the transformed equation is usually used for the control of the PMSM system. The number of variables can be reduced by Park or Clarke transformation for the sake of convenience of study. Thus, the transformed fundamental wave mathematical model of PMSM can be divided into two types: the mathematical model in the synchronous rotating coordinate system and the one in the stationary coordinate system [17].
EKF and UKF are state observers relying on the fundamental wave mathematical model of the motor [18,19], and the complexity of the application of the KF series algorithm is determined by the selection of the mathematical model of the PMSM. Before choosing an appropriate mathematical model, the algorithm procedure of the KF series algorithm should be discussed first.
The prediction of the KF series algorithm is based on updating state variables through state equations. Since the measured values of stator voltage and current are required as input variables by the KF series algorithm, if the mathematical model in the synchronous rotating frame is used as the state equation of the KF series algorithm, the measured values must undergo a coordinate transformation. This undoubtedly will increase the complexity for the algorithm to compute as well as exacerbate the nonlinearity of the model. Therefore, in order to facilitate the study, the voltage equation under the two-phase stationary coordinate system is a good choice for the KF series algorithm. For the example of the surface-mounted PMSM, let us apply the Clarke transformation to Equation (3) and replace ( L M ) with L s , the two-phase voltage equation in the stationary frame can be obtained as follows.
u α = R i α + L s d i α d t ω e λ sin θ e u β = R i β + L s d i β d t + ω e λ cos θ e
In Equation (4), u α and u β are the voltages in the two-phase stationary coordinate system. i α and i β are the currents in the stationary coordinate system. L s denotes the stator inductance. And ω e is the electric angular velocity of the rotor.
The equation of motion of PMSM is given as Equation (5).
d ω e d t = p J ( T e T l B ω e p )
where p is the pole pairs of PMSM, J denotes the inertia, and B represents the damping factor.
However, because of the large inertia of the motor and the sufficiently short sampling time of the observer, the motor speed can be approximated to be constant between the two sample points. Thus, the equation of the motor’s state of motion is then shown in Equation (6).
d ω e d t = 0 d θ e d t = ω e
From this, based on the selected mathematical model, the state equation of PMSM can be established as:
x ˙ = f ( x ) + B u y = H x
where x = i α , i β , ω e , θ e T is the state variable, u = u α , u β T is the input to the state equation, and y = i α , i β T is the observed variable. The state function f ( x ) , the input matrix B , and the observation matrix H are characterized as follows.
f ( x ) = R L s i α + ω e λ L s sin θ e R L s i β ω e λ L s cos θ e 0 ω e
B = 1 / L s 0 0 0 0 1 / L s 0 0 T
H = 1 0 0 0 0 1 0 0

3. Extended Kalman Filter and Unscented Kalman Filter

3.1. Extended Kalman Filter

The extended Kalman filtering algorithm is a state observer algorithm applied to a nonlinear model, which is also an application of the Kalman filtering algorithm to a nonlinear model with a Taylor expansion that ignores higher-order terms [20,21]. In the extended Kalman filter algorithm, the nonlinear system should be linearized with Taylor expansion before using the KF procedure.
The algorithm logic of EKF is simple and easy to implement, and the algorithm is stable and does not tend to crash, for which it is widely used in industry. w and v in the EKF denote the process noise and the observation noise of the system, respectively, and their covariance matrices are Q and R , respectively. The state space equation of the PMSM considering the noise is shown in Equation (11).
x ˙ = f ( x ) + B u + w y = H x + v
Let T s be the sampling time and denote the moment of T s , 2 T s , , k T s , by 1 , 2 , , k , . The discretization of Equation (12) is as follows.
x k + 1 = x k + [ f ( x k ) + B u k + w k ] T s y k + 1 = H x k + 1 + v k + 1
From this, Equation (12) can be linearized at the point x ^ k as
x k + 1 = x ^ k + 1 + A k ( x k x ^ k ) + w k T s y k + 1 = H x k + 1 + v k + 1
where x ^ k + 1 is a priori estimate and A k is the transition matrix, which are characterized as follows.
x ^ k + 1 = f ( x ^ k ) + B u k
A k = I + F ( x k ) T s
where x ^ k denotes a posteriori estimate of the previous moment, I is the identity matrix, and F ( x k ) means the Jacobian matrix of f ( x k ) .
F ( x k ) = R L s 0 λ L s sin θ e ω e λ L s cos θ e 0 R L s λ L s cos θ e ω e λ L s sin θ e 0 0 0 0 0 0 1 0
After these processes, the nonlinear state equation of PMSM has been linearized, so the KF procedure can be applied. The algorithm can be divided into five steps in one complete iteration. The algorithm flow of the EKF is shown in Figure 1.
In the first step, the posteriori estimate x ^ k 1 is substituted into Equation (7) to obtain the priori estimate x ^ k .
In the second step, the priori error covariance matrix is computed.
P k = A k P k 1 A k + T s 2 Q
In the third step, calculate the Kalman gain.
K k = P k H T H P k H T + R
In the fourth step, calculate the posteriori estimate and update the state variables.
x ^ k = x ^ k + K k ( y k H x ^ k )
In the fifth step, update the posteriori error covariance matrix.
P k = ( I K k H ) P k

3.2. Unscented Kalman Filter

The unscented Kalman filter also uses the idea of the Kalman filter, but what is unlike EKF is that this algorithm uses probabilistic methods to approximate the probability distribution density of a nonlinear function [22]. It has better performance for estimation accuracy than EKF.
Unscented transformation (UT) is the key to UKF. Consider a nonlinear function given by Equation (21).
y = f ( x )
where x is an n-dimensional random variable that follows a normal distribution. The mathematical expectation and variance are E ( x ) and P x x . According to the sampling rules that ensure the same expectation and variance, obtain a set of sigma sample points. Substitute the sigma sampling points one by one into Equation (21) for the calculation to obtain the nonlinear function value point set of y . Expectation and variance of nonlinear function can be obtained through the point set by weighting. Thus, the nonlinear system can be approximately estimated.
Based on the discrete state equation, Equation (12), for n-dimensional random variable x k at moment k, there are 2n + 1 sigma sample points after sampling. The sampling rules of UT are shown as follows.
x k , 1 = E ( X k ) x k , i = E ( X k ) + U c o l ( i ) x k , i + n = E ( X k ) U c o l ( i ) , i = 1 , 2 , , n
where U c o l ( i ) represents the vector in i-th column. The upper triangular matrix U can be determined by Equation (23) through Cholesky factorization.
( n + λ ) P x x , k = U T U
P x x , k is the covariance matrix of x k at moment k. λ is a factor that determines the distribution of sigma points. The smaller λ , the closer the distribution of sigma points is to the E ( X k ) . λ is defined as follows.
λ = α 2 ( n + κ ) n
The constant α is usually set to a small positive number. For the constant κ , assigning a value of 0 is sufficient. These two parameters are combined in λ to make matrix ( n + λ ) P x x , k a positive semidefinite matrix [23]. Some papers declare that β = 2 is optimal for normal distribution [24]. The weight factors of expectations and variances are defined by Equation (25) and Equation (26), respectively.
W i m = λ n + λ , i = 0 W i m = 1 2 ( n + λ ) , i 0
W i c = λ n + λ + 1 + β α 2 , i = 0 W i c = 1 2 ( n + λ ) , i 0
In the above equations, W i m denotes the weight value to obtain expectation, and W i c represents the weight value for obtaining the covariance matrix.
According to Equation (12), estimated sigma points of x k + 1 can be characterized as follows.
x k + 1 , i = ( f ( x k , i ) + B u k ) T s + x k , i
Then, the estimated expectation vector and variance matrix can be estimated by Equation (28).
E ( X k + 1 ) = i = 0 2 n W i m x k + 1 , i P x x , k + 1 = i = 0 2 n W i c ( x k + 1 , i E ( X k + 1 ) ) ( x k + 1 , i E ( X k + 1 ) ) T + T s 2 Q
E ( X k + 1 ) and P x x , k + 1 denotes the estimated expectation vector and covariance matrix of x k + 1 . Repeat the previous work, and generate the new sigma point of x k + 1 represented by x k + 1 , i . Then, the estimated sigma points of the measurement variable y k + 1 can be obtained by Equation (29).
y k + 1 , i = H x k + 1 , i
In the same way, the expectation vector and covariance matrix of y k + 1 is characterized as follows.
E ( Y k + 1 ) = i = 0 2 n W i m y k + 1 , i P y y , k + 1 = i = 0 2 n W i c ( y k + 1 , i E ( Y k + 1 ) ) ( y k + 1 , i E ( Y k + 1 ) ) T + R
And the Kalman gain can be defined by Equation (31).
K k = P x y , k + 1 P y y , k + 1 1
P x y , k + 1 denotes the covariance between x k + 1 and y k + 1 , which can be determined by Equation (32).
P x y , k + 1 = i = 0 2 n W i c ( x k + 1 , i E ( X k + 1 ) ) ( y k + 1 , i E ( Y k + 1 ) ) T
The posteriori estimated value x ^ k + 1 can be obtained by the following equation.
x ^ k = x ^ k + K k ( y k H x ^ k )
The posteriori estimated covariance matrix of x k + 1 , which can be used in the next iteration of the UKF calculation, is shown as follows.
P x x , k + 1 = P x x , k + 1 K k P x y , k + 1 K k T
Therefore, the flowchart of UKF is given in Figure 2.

4. Optimized PMSM Sensorless Control System Based on PSO

4.1. PSO-Based Optimization of Noise Covariance Matrix

In the EKF- or UKF-based PMSM sensorless control, the tuning of the diagonal elements of the noise covariance matrices Q and R is very time-consuming and labor-intensive work. The noise covariance matrix varies for different PMSM control systems with different working conditions. In different PMSM control systems, the Q and R diagonal element parameters of the KF series algorithm need to be adjusted in order to ensure the best estimation effect. Therefore, after transplanting the KF series algorithm to another induction motor control system, the parameters need to be adjusted until the system works well.
The KF series algorithm involves numerous matrix calculations and complicated computational processes [25], while the PSO algorithm is used to find the covariance matrices that achieve the best performance without increasing the complexity of the algorithm and the computational difficulty. At the same time, it greatly increases the portability of the KF series algorithm in different PMSM sensorless control systems.
The key iterative equations of PSO mainly include the position update formula and velocity update formula, as shown in Equation (16) and Equation (17), respectively [26].
x i d k = x i d k 1 + v i d k 1
v i d k = ω v i d k 1 + c 1 r 1 ( p b e s t x i d k 1 ) + c 2 r 2 ( g b e s t x i d k 1 )
where x i d k is the position of the i-th particle of the k-th generation, v i d k denotes the velocity of the ith particle of the k-th generation. ω presents the inertia factor. c 1 is the individual learning factor, as well as c 2 is the social learning factor. p b e s t is the individual best position and g b e s t is the global best position; r 1 and r 2 are random numbers between 0 and 1.
The convergence speed and the ability to jump out of the local optimum depend on parameters ω , c 1 , and c 2 [27]. The larger the inertia factor ω , the easier it is for the particle to jump out of the local optimum, and the better it is for global search. On the contrary, the smaller the inertia factor, the more accurate the search and the faster the convergence. PSO with a large ω always tends to search for a bigger space, which is what we need in the early iteration. Therefore, the method of linearly decreasing the weight of the inertia factor, bringing more search space in the early stage and higher search accuracy in the later stage, can better balance the rationality and search ability of PSO.
ω k = ω + ( ω 0 ω ) T max k T max
Equation (37) describes the process of updating the inertia factor ω k with the iteration times. ω 0 and ω are the initial and final values of the inertia factor, respectively. T max denotes the maximum number of iterations. k means the current stage of iterations.
The individual learning factor c 1 and social learning factor c 2 are the weights of individual experience and social experience in the motion of particles, respectively. A small c 2 means particles tend to get stuck at locally optimal values, and a small c 1 means there is no social connection between individuals [28]. Usually, the values of A and B are taken from 1 to 2.
The absolute value of the error between the EKF posteriori estimate and the real actual value is selected as the particle fitness function, the equation is shown as Equation (38), and the flow of the PSO algorithm for optimization of EKF is shown in Figure 3.
f i t n e s s = ω ^ e ω e

4.2. PMSM Sensorless Control System

This paper aims to verify the effectiveness of the PSO algorithm by constructing a permanent magnet synchronous motor sensorless control system for simulation tests, as shown in Figure 4. The system adopts FOC as the speed control strategy and applies EKF or UKF to provide speed feedback for the speed closed-loop of this system.
The solid part of the figure shows the model part of the PMSM sensorless control system, which consists of an automatic speed regulator (ASR), automatic current regulator (ACR), Park and Clarke transformations, space vector pulse width modulation (SVPWM), three-phase inverter, permanent magnet synchronous motor, and RPM estimation algorithm module. The RPM estimation algorithm module can be an EKF or UKF algorithm module.
The dashed line part is the optimization process of obtaining optimal covariance matrix elements by the PSO algorithm. In this process, a photoelectric encoder or other speed sensor is mounted on the motor shaft to measure the real angular velocity of PMSM for comparison purposes. The absolute error between the real angular velocity and the estimated angular velocity is taken as the fitness input of the PSO block diagram to determine the effectiveness of covariance matrix elements. Based on the fitness value, the PSO optimizes and updates the noise covariance matrices Q and R until the optimal matrix diagonal elements are obtained. This part is only implemented during the process of PSO-based matrix parameter optimization.

5. Simulation Verification

To verify the effect of the PSO-optimized EKF algorithm in the PMSM sensorless control model, the simulation model is established in the MATLAB/Simulink environment. The PSO-based EKF optimization algorithm is implemented by the S-function module. The system simulation time is 1.8 s, and the sampling time of the S-function is set to 1 us. The simulation parameters of the PMSM control system, PSO algorithm, and UKF algorithm are shown in Table 1, Table 2, and Table 3, respectively.

5.1. Covariance Matrix Optimization of EKF

It is most common to consider the noise covariance matrices Q and R as diagonal matrices. The matrix sizes of Q and R are 4 × 4 and 2 × 2, respectively.
Q = d i a g q 1 , q 2 , q 3 , q 4 , R = d i a g r 1 , r 2
where the element q 1 is equal to q 2 , as well as r 1 is equal to r 2 , generally. Thus, there are in total four diagonal elements to be optimized. From this, the dimension of the particles is set to be 4, and the approximate search space of the particles can be derived from the experience and experiments. It is worth noting that the motor should be operated under constant load and uniform speed operating conditions for a better optimizing performance of PSO. This is because the motor control system has a large change in state variables during acceleration and deceleration, which will affect the estimation effect of the KF series algorithm. In the process of PSO, the performance of KF series algorithm cannot be simply approximated as being influenced by the particle position of the PSO algorithm.
From this, the constant load of the motor is set to be 5 N·m, the given speed is 4000 rpm. The motor reaches a stable speed in about 0.3 s, so the S-function module is set to perform the PSO-based optimization of the EKF matrix parameters in 0.31 s. In order to eliminate the impact of sensitivity and contingency caused by the initialization of the PSO algorithm on parameter optimization results, 20 experiments were conducted for the optimization of covariance matrices of EKF and UKF, respectively.
In the following figures, the most effective experiments of optimization based on PSO for EKF and UKF are shown, respectively. The comparisons of the waveforms of the real rotational speed and the estimated rotational speed of PSO-EKF and PSO-UKF are shown in Figure 5, and the values of the fitness function are shown in Figure 6.
The results of the separate 20 effective experiments are shown by Table 4. The following test items vary in each parameter optimization experiment, but all converge to the best results. It is worth noting that there are two or three sets of parameters that achieved approximate optimal performance in both the PSO-EKF and PSO-UKF experiments. This means the results from the PSO algorithm always tend to be the best. Thus, the obtained optimal parameters are much more convincing. And this can also be proved by the means, which approach the optimal value. Select the parameters from the best performing experiments. The optimal EKF matrix parameters obtained from PSO optimization are Q = diag[3.48, 3.48, 0.57, 0.01] and R = diag[0.22, 0.22]. The optimal covariance matrices of UKF are Q = diag[3.75, 3.75, 0.27,0] and R = diag[0.62, 0.62].

5.2. Comparative Analysis

The comparison simulation results of EKF, PSO-EKF, UKF, and PSO-UKF are obtained by experiments based on the above optimal covariance matrices. The EKF matrix parameters obtained from the trial-and-error method are Q = diag[1,1, 1.2, 0.02] and R = diag[0.2, 0.2]. And the matrices in the same way for UKF are Q = diag[2.4, 2.4, 1,0] and R = diag[0.2, 0.2].
The comparison of waveforms, between PSO-optimized and unoptimized PMSM sensorless control system, of RPM, RPM estimation error, and angle estimation error are shown in Figure 7, Figure 8, and Figure 9, respectively.
Under stabilized motor operating conditions, it can be known that the relative error of the RPM estimation of the PMSM sensorless control with PSO-EKF is within 0.625%, and the absolute error of the electrical angle estimation is within 0.2 rad. The relative error of the RPM estimation of the PMSM sensorless control system with EKF is within 2.75%, and the absolute error of the electrical angle estimation is within 0.5 rad. Due to the intrinsic excellence of the UKF algorithm, it performs much better than EKF. The relative error of the RPM estimation of the optimized PMSM sensorless control is within 0.2%, and the absolute error in the system is within 0.018 rad. In the PMSM sensorless control system with EKF, the relative error of the RPM estimation is within 0.75%, and the absolute error of the electrical angle estimation is within 0.034 rad. The comparison results are shown in Table 5.
As a result, particle swarm optimization is a nice algorithm that can be used in matrix parameter optimization of the KF series algorithms. It achieves significant results when compared to the algorithms using a trial-and-error method.

6. Conclusions

In this paper, for the problem that the noise covariance matrix is difficult to rectify in the EKF- or UKF-based PMSM sensorless control system, a speed estimation strategy for PMSM based on PSO-optimized KF series algorithms is proposed. It can be concluded that:
(1) A novel process for the tuning of matrices Q and R has been described in detail. It takes less time and effort than the trial-and-error but achieves better results. The PSO can be used to optimize the covariance matrix elements of both EKF and UKF. According to the above 20 effective experiments, the simulation results in these simulation experiments converge to the optimal values in the case that the initialization parameters (e.g., inertia factor ω , learning factor c 1 and c 2 ) of PSO are set reasonably. This shows that the optimal covariance matrix elements are easily obtained by the PSO algorithm.
(2) From the comparative simulation experiments, the PSO-based optimized PMSM sensorless control strategy has a significant improvement over the original algorithm. For the error of RPM estimation, taking the stable running speed of the motor as a reference, the system using PSO-EKF has improved by 2.125% compared to that using EKF, and the system applying PSO-UKF has improved by 0.55% compared to the system applying UKF. For the error of electrical angle estimation, the system adopting PSO-EKF has decreased by 0.3 rad compared to that adopting EKF, and the system using PSO-UKF has decreased by 0.016 rad compared to the system using UKF.
(3) The problem of local convergence may exist in the application of PSO, and the optimal estimation effect should be obtained through certain time simulation experiments. Thus, the improved PSO algorithm and other better parameter optimization algorithms can be further investigated for PMSM sensorless control with KF series algorithms.

Author Contributions

Conceptualization, T.X. and Y.S.; methodology, X.X.; software, W.L.; validation, T.X., Z.G. and X.W.; formal analysis, R.Z.; investigation, Y.C.; data curation, T.X.; writing—original draft preparation, T.X.; writing—review and editing, X.X.; supervision, X.X.; project administration, F.Z.; funding acquisition, F.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the National Key Research and Development Program of China under Grant No. 2020YFB1709700, entitled “Key Technologies Research and Development of Intelligent Operation and Maintenance for High-Security Equipment”.

Data Availability Statement

The raw/processed data cannot be shared at this time. Due to the nature of this research, participants of this study did not agree for their data to be shared publicly.

Acknowledgments

The authors gratefully acknowledge the support of the National Key Research and Development Program of China (Grant No. 2020YFB1709700).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Termizi, M.S.; Lazi, J.M.; Ibrahim, Z.; Talib, M.H.N.; Aziz, M.J.A.; Ayob, S.M. Sensorless PMSM drives using Extended Kalman Filter (EKF). In Proceedings of the 2017 IEEE Conference on Energy Conversion (CENCON), Kuala Lumpur, Malaysia, 30–31 October 2017; pp. 145–150. [Google Scholar] [CrossRef]
  2. Anh, H.P.H.; Khanh, P.Q.; Van Kien, C. Advanced PMSM Machine Parameter Identification Using Modified Jaya Algorithm. In Proceedings of the 2019 International Conference on System Science and Engineering (ICSSE), Dong Hoi, Vietnam, 20–21 July 2019; pp. 445–450. [Google Scholar] [CrossRef]
  3. Wang, T.; Wang, J.; Guan, W.; Liu, C.; Chen, Y.; Chen, Z.; Luo, G. Data-Driven Based Hybrid Predictive Model for the PMSM Drive System. In Proceedings of the 2023 IEEE International Conference on Predictive Control of Electrical Drives and Power Electronics (PRECEDE), Wuhan, China, 16–19 June 2023; pp. 1–6. [Google Scholar] [CrossRef]
  4. Wan, Q.; Wang, H.; Sun, X. Position Tracking Control for PMSM System Based on Continuous Sliding Mode Control and Sliding Mode Observer. In Proceedings of the 2022 41st Chinese Control Conference (CCC), Hefei, China, 25–27 July 2022; pp. 2917–2922. [Google Scholar] [CrossRef]
  5. Boussak, M. Implementation and experimental investigation of sensorless speed control with initial rotor position estimation for interior permanent magnet synchronous motor drive. IEEE Trans. Power Electron. 2005, 20, 1413–1422. [Google Scholar] [CrossRef]
  6. Dai, Y.; Ye, C.; Zhao, S.; Yu, D.; Dian, R. EKF for Three-Vector Model Predictive Current Control of PMSM. In Proceedings of the 2020 IEEE 1st China International Youth Conference on Electrical Engineering (CIYCEE), Wuhan, China, 1–4 November 2020; pp. 1–6. [Google Scholar] [CrossRef]
  7. Bendjedia, B.; Chouireb, S. Comparative Study Between Sensorless Vector Control of PMSM Drives based on MRAS, SMO and EKF Observers. In Proceedings of the 2023 International Conference on Advances in Electronics, Control and Communication Systems (ICAECCS), Blida, Algeria, 25–26 October 2023; pp. 1–6. [Google Scholar] [CrossRef]
  8. Yang, Z.; Yan, Z.; Lu, Y.; Wang, W.; Yu, L.; Geng, Y. Double DOF Strategy for Continuous-Wave Pulse Generator based on Extended Kalman Filter and Adaptive Linear Active Disturbance Rejection Control. IEEE Trans. Power Electron. 2022, 37, 1382–1393. [Google Scholar] [CrossRef]
  9. Jiang, Z.; Gao, W. UD Decomposition Based Adaptive UKF for Nonlinear Estimation of States and Parameters. In Proceedings of the 2021 40th Chinese Control Conference (CCC), Shanghai, China, 26–28 July 2021; pp. 1332–1337. [Google Scholar] [CrossRef]
  10. Saleh, S.; El-Wakeel, A.S.; Noureldin, A. 5G-Enabled Vehicle Positioning Using EKF With Dynamic Covariance Matrix Tuning. IEEE Can. J. Electr. Comput. Eng. 2022, 45, 192–198. [Google Scholar] [CrossRef]
  11. Zerdali, E. A Comparative Study on Adaptive EKF Observers for State and Parameter Estimation of Induction Motor. IEEE Trans. Energy Convers. 2020, 35, 1443–1452. [Google Scholar] [CrossRef]
  12. Bolognani, S.; Tubiana, L.; Zigliotto, M. Extended Kalman filter tuning in sensorless PMSM drives. IEEE Trans. Ind. Appl. 2003, 39, 1741–1747. [Google Scholar] [CrossRef]
  13. Wang, A.; Wang, Q.; Hu, C.; Qian, Z.; Ju, L.; Liu, J. An EKF for PMSM sensorless control based on noise model identification using Ant Colony Algorithm. In Proceedings of the 2009 International Conference on Electrical Machines and Systems, Tokyo, Japan, 15–18 November 2009; pp. 1–4. [Google Scholar] [CrossRef]
  14. Aydin, M.; Gokasan, M.; Bogosyan, S. Fuzzy based parameter tuning of EKF observers for sensorless control of Induction Motors. In Proceedings of the 2014 International Symposium on Power Electronics, Electrical Drives, Automation and Motion, Ischia, Italy, 18–20 June 2014; pp. 1174–1179. [Google Scholar] [CrossRef]
  15. Zaini, F.A.; Sulaima, M.F.; Razak, I.A.W.A.; Zulkafli, N.I.; Mokhlis, H. A Review on the Applications of PSO-Based Algorithm in Demand Side Management: Challenges and Opportunities. IEEE Access 2023, 11, 53373–53400. [Google Scholar] [CrossRef]
  16. Celik, H.; Yigit, T. Field-Oriented Control of the PMSM with 2-DOF PI Controller Tuned by Using PSO. In Proceedings of the 2018 International Conference on Artificial Intelligence and Data Processing (IDAP), Malatya, Turkey, 28–30 September 2018; pp. 1–4. [Google Scholar] [CrossRef]
  17. Adel, M.M.; Ahmed, W.A.; Taha, M.; Saleh, A.A. Enhanced Sensorless Field Oriented Controlled PMSM Drive Using Fractional Calculus and PSO Technique. In Proceedings of the 2020 International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM), Sorrento, Italy, 24–26 June 2020; pp. 5–10. [Google Scholar] [CrossRef]
  18. Zwerger, T.; Mercorelli, P. Using a Bivariate Polynomial in an EKF for State and Inductance Estimations in the Presence of Saturation Effects to Adaptively Control a PMSM. IEEE Access 2022, 10, 111545–111553. [Google Scholar] [CrossRef]
  19. Ning, X.; Wang, F.; Fang, J. An Implicit UKF for Satellite Stellar Refraction Navigation System. IEEE Trans. Aerosp. Electron. Syst. 2017, 53, 1489–1503. [Google Scholar] [CrossRef]
  20. Liu, Z.; Feng, G.; Han, Y. Extended-Kalman-Filter-Based Magnet Flux Linkage and Inductance Estimation for PMSM Considering Magnetic Saturation. In Proceedings of the 2021 36th Youth Academic Annual Conference of Chinese Association of Automation (YAC), Nanchang, China, 28–30 May 2021; pp. 430–435. [Google Scholar] [CrossRef]
  21. Hu, F.; Wu, G. Distributed Error Correction of EKF Algorithm in Multi-Sensor Fusion Localization Model. IEEE Access 2020, 8, 93211–93218. [Google Scholar] [CrossRef]
  22. Liu, J.; Chen, X.; Wang, J. Strong Tracking UKF-Based Hybrid Algorithm and Its Application to Initial Alignment of Rotating SINS with Large Misalignment Angles. IEEE Trans. Ind. Electron. 2023, 70, 8334–8343. [Google Scholar] [CrossRef]
  23. Hai, N.; Zhao, Q.; Wan, Q. UKF algorithm based on optimized weighting data fusion. In Proceedings of the IET International Radar Conference 2015, Hangzhou, China, 14–16 October 2015; pp. 1–4. [Google Scholar] [CrossRef]
  24. Moon, C.; Park, J.S.; Kwon, Y.A.; Kennel, R.M. Unscented transformnations of UKF for sensorless speed control of PMSM. In Proceedings of the TENCON 2015—2015 IEEE Region 10 Conference, Macao, China, 1–4 November 2015; pp. 1–4. [Google Scholar] [CrossRef]
  25. Li, R.; Cai, X.; Yao, Z.; Chen, L.; Wang, J. Injection Signal Detection Based on PSO-Optimized Extended Kalman Filter. In Proceedings of the 2023 4th International Conference on Electronic Communication and Artificial Intelligence (ICECAI), Guangzhou, China, 12–14 May 2023; pp. 27–31. [Google Scholar] [CrossRef]
  26. Qian, G.; Wang, Y.; Jian, M. Estimation of Doppler Parameters Based on PSO for BFSAR Ship Target Imaging. IEEE Geosci. Remote Sens. Lett. 2023, 20, 4002605. [Google Scholar] [CrossRef]
  27. Zouari, M.; Baklouti, N.; Sanchez-Medina, J.; Kammoun, H.M.; Ben Ayed, M.; Alimi, A.M. PSO-Based Adaptive Hierarchical Interval Type-2 Fuzzy Knowledge Representation System (PSO-AHIT2FKRS) for Travel Route Guidance. IEEE Trans. Intell. Transp. Syst. 2022, 23, 804–818. [Google Scholar] [CrossRef]
  28. Shami, T.M.; El-Saleh, A.A.; Alswaitti, M.; Al-Tashi, Q.; Summakieh, M.A.; Mirjalili, S. Particle Swarm Optimization: A Comprehensive Survey. IEEE Access 2022, 10, 10031–10061. [Google Scholar] [CrossRef]
Figure 1. EKF algorithm flowchart.
Figure 1. EKF algorithm flowchart.
Electronics 12 04215 g001
Figure 2. UKF algorithm flowchart.
Figure 2. UKF algorithm flowchart.
Electronics 12 04215 g002
Figure 3. PSO algorithm flowchart.
Figure 3. PSO algorithm flowchart.
Electronics 12 04215 g003
Figure 4. Block diagram of PMSM sensorless control system.
Figure 4. Block diagram of PMSM sensorless control system.
Electronics 12 04215 g004
Figure 5. RPM Comparison.
Figure 5. RPM Comparison.
Electronics 12 04215 g005
Figure 6. Fitness value.
Figure 6. Fitness value.
Electronics 12 04215 g006
Figure 7. RPM estimation comparison.
Figure 7. RPM estimation comparison.
Electronics 12 04215 g007
Figure 8. RPM estimation error comparison.
Figure 8. RPM estimation error comparison.
Electronics 12 04215 g008
Figure 9. Electrical angle estimation error comparison.
Figure 9. Electrical angle estimation error comparison.
Electronics 12 04215 g009
Table 1. Control system parameter.
Table 1. Control system parameter.
ParameterValueUnits
Pole pairs4none
Stator resistance0.025Ω
Stator inductance0.00047H
Flux linkage0.062Wb
Inertial0.01kg·m2
Proportional gain of ASR6.5none
Integral gain of ASR0.13none
Id proportional gain of ACR10none
Id integral gain of ACR0.4none
Iq proportional gain of ACR20none
Iq integral gain of ACR0.2none
Table 2. Key parameter of PSO algorithm.
Table 2. Key parameter of PSO algorithm.
ParameterValue
Inertia factor ω Time-varying and reference to Equation (37)
Individual learning factor c 1 1.4
Social learning factor c 2 1.4
Number of particles n50
Table 3. Key parameter of UKF algorithm.
Table 3. Key parameter of UKF algorithm.
ParameterValue
α 0.001
β 2
κ 0
Table 4. Results of experiments.
Table 4. Results of experiments.
ExperimentsItemsValueUnits
PSO-EKFNumber of experiments20times
Optimal error of RPM estimation0.75%
Worst error of RPM estimation2.12%
Average error of RPM estimation0.97%
Optimal error of angle estimation0.2rad
Worst error of angle estimation2rad
Average error of RPM estimation0.52rad
PSO-UKFNumber of experiments20times
Optimal error of RPM estimation0.5%
Worst error of RPM estimation2.25%
Average error of RPM estimation0.88%
Optimal error of angle estimation0.02rad
Worst error of angle estimation0.13rad
Average error of RPM estimation0.06rad
Table 5. Results of comparisons.
Table 5. Results of comparisons.
AlgorithmItemsValueUnits
PSO-EKFMaximum error of RPM estimation25rpm
Maximum error of electrical angle estimation0.2rad
EKFMaximum error of RPM estimation110rpm
Maximum error of electrical angle estimation0.5rad
PSO-UKFMaximum error of RPM estimation8rpm
Maximum error of electrical angle estimation0.018rad
UKFMaximum error of RPM estimation30rpm
Maximum error of electrical angle estimation0.034rad
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Xie, T.; Xu, X.; Yuan, F.; Song, Y.; Lei, W.; Zhao, R.; Chang, Y.; Wu, X.; Gan, Z.; Zhang, F. Speed Estimation Strategy for Closed-Loop Control of PMSM Based on PSO Optimized KF Series Algorithms. Electronics 2023, 12, 4215. https://doi.org/10.3390/electronics12204215

AMA Style

Xie T, Xu X, Yuan F, Song Y, Lei W, Zhao R, Chang Y, Wu X, Gan Z, Zhang F. Speed Estimation Strategy for Closed-Loop Control of PMSM Based on PSO Optimized KF Series Algorithms. Electronics. 2023; 12(20):4215. https://doi.org/10.3390/electronics12204215

Chicago/Turabian Style

Xie, Tunzhen, Xianglian Xu, Fang Yuan, Yuanqing Song, Wenyang Lei, Ruiqing Zhao, Yating Chang, Xinrui Wu, Ziqi Gan, and Fangqing Zhang. 2023. "Speed Estimation Strategy for Closed-Loop Control of PMSM Based on PSO Optimized KF Series Algorithms" Electronics 12, no. 20: 4215. https://doi.org/10.3390/electronics12204215

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop