# Parameter Estimation of Permanent Magnet Synchronous Motor Using Orthogonal Projection and Recursive Least Squares Combinatorial Algorithm

Authors: Iman Yousefi; Mahmood Ghanbari
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

This paper presents parameter estimation of Permanent Magnet Synchronous Motor (PMSM) using a combinatorial algorithm. Nonlinear fourth-order space state model of PMSM is selected. This model is rewritten to the linear regression form without linearization. Noise is imposed to the system in order to provide a real condition, and then combinatorial Orthogonal Projection Algorithm and Recursive Least Squares (OPA&RLS) method is applied in the linear regression form to the system. Results of this method are compared to the Orthogonal Projection Algorithm (OPA) and Recursive Least Squares (RLS) methods to validate the feasibility of the proposed method. Simulation results validate the efficacy of the proposed algorithm.


---

## Body

## 1. Introduction

Permanent Magnet Synchronous Motor (PMSM) is a good choice to use in robotics industries, electric vehicles, petrochemical industries, sea, and so forth due to large torque to inertia ratio and high power density [1–5] and is a serious opponent to the induction motor [6, 7]. Regarding widespread application of such motors, design of high speed and high accuracy controllers is of great concern for engineers [8]. The selected model and knowing the parameters of the system are important factors in design of such controllers. The pertaining model has to be accurate enough to define the physical process of the system [4]. PMSM is a nonlinear system. If the linearization in the operating point by choosing improper nonlinear model does not provide appropriate dynamics, the speed and response speed of the controller would be slowed down [9]. Sensitivity of the machine’s parameter depends on various factors such as high temperature, mechanical vibrations, loading condition, increase in the service time of the motor, and environmental factors that would cause parametric uncertainty [3, 8, 10] and has considerable effect on the static and dynamic performance of the system [11]. Robustness to parametric uncertainty has to be imposed by correct estimation of PMSM parameters. Generally, there are two kinds of estimation to find out unknown parameters: online and offline estimation. Offline estimation is carried out when machine is not performing but online estimation is carried out when machine is operating and in steady-state [12]. Online estimation is a very important necessity for such systems. Extended Kalman Filter, Model-Reference method, Recursive Least Squares method, neural networks, adaptive algorithms, and decoupling control algorithms are of the online methods to estimate the parameters of PMSM [2, 10, 13–19].In this paper, we have presented combinatorial estimation methods, that is, Orthogonal Projection Algorithm (OPA) and Recursive Least Squares (RLS). OPA is presented well in [20] to estimate the parameters of PMSM which is very efficient for noise-free systems. The combinatorial OPA&RLS method would be a good candidate for systems with high noise which are more like real systems. This method can be very helpful for online estimation. In this paper, a nonlinear fourth-order PMSM model is chosen and load angle is selected as accessible output, and voltages vd, vq are selected as input (framed voltages of Park transformation). This nonlinear model is rewritten to linear regression form without linearization or simplification. Both estimators can be applied independently but the combinatorial method has the features of both methods. OPA leaps quickly toward the aim parameter with each estimation it does and after that RLS adapts the estimated parameter to the real parameter due to its robustness toward noise.Section2 describes state space model transformation of PMSM. In Section 3, the proposed estimator is presented. Simulation results are illustrated in Section 4 and finally the paper is concluded in Section 5.


## 2. Transforming the Nonlinear Model to Linear Regression Form

To achieve high performance for PMSM, the fourth-order state space model of the system is selected under Park transformation [21–23]:(1)x˙=Ax+Bu+fx,x=x1x2x3x4T=δωeiqidT,u=u1u2T=vqvdT,A=0100001.5pλfJ00--λfpLq--RLq0000-RLd,B=00001Lq001Ld,f=01.5pLd-LqiqidJ-LdpωeidLqLqpωeiqLd.System inputs are vd, vq Park transformation voltages, iq, id, ωe, and δ state variables of the system which are rotor angular position, rotor angular speed, and Park transformation currents, respectively.Physical parameters of the system areR stator resistance, p pole-pairs, λf magnet flux linkage, J inertia coefficient, and Ld, Lq direct and quadrature inductances of Park transformation, respectively.The aim of this section is to transform the nonlinear state space model of PMSM to the linear regression form without linearization or simplification techniques. As the linear regression form is expressed in terms of an output, the pertaining output is rewritten in terms of state variables. The selected output is power angleδ=x1.Equation (3) is obtained by considering id, iq according to (2) [24] and discretization based on x˙=x(t+Ts)-x(t)/Ts in which Ts is the sampling time. Consider(2)id=imcos⁡δ=imcos⁡x1,iq=imsin⁡δ=imsin⁡x1,(3)x1k+Ts=x1k+Tsx2k,x2k+Ts=x2k+Ts1.5PλfJx3k+Ts1.5Ld-LqJx3kx4k,x3k+Ts=Ts-λfPLqx2k+Ts-RLqimsinx1k+TsLqu1k+Ts-pLdLqimcosx1kx2k+imsinx1k,x4k+Ts=imcosx1k+Ts-RLdimcosx1k+TsLdu2+TsPLqLdimsinx1kx2k.Rewriting (3) to the linear regression form is needed in a way that  x1 is written in terms of all state variables. After applying estimator on linear regression form and estimation of the parameters, complicated nonlinear equations have to be solved to obtain physical parameters (R, p, λf, J, Lq, and Ld). To solve this problem, two linear regression forms are required by a heuristic method and defining new variables in (3) and (2). Therefore, physical parameters can be solved from linear regression without solving nonlinear equation.


### 2.1. Model Number 1

The second state variable of (3) can be rewritten by using (2) as below:(4)x2k+Ts=x2k+Ts1.5PλfJx3k+Ts1.5Ld-LqJim22sin⁡2x1k.By shifting forward in (4) and putting x3k+1 in it from (3) and substituting Ts=1,(5)x2k+2=x2k+1+1.5Ld-Lqim22Jsin⁡2x1k+1+1.5PλfJ-λfPLqx2k+1.5PλfJ-RLqsin⁡x1k+1.5PλfLqJu1k+1.5PλfJ-pLdLqcos⁡x1kx2k+1.5PλfimJsin⁡x1t.Equation (5) is rewritten in terms of load angle by using the relation between the first and second state variables:(6)x1k+3-x1k+2=x1k+2-x1k+1+1.5PλfJ-λfPLqx1k+1-x1k+1.5PλfJ-RLqsin⁡x1k+1.5PλfLqJ·u1k+1.5PλfJ-pLdLqcos⁡x1k·x1k+1-x1k+1.5PλfimJsin⁡x1t+1.5Ld-Lqim22Jsin⁡2x1k+1.The above equation is rewritten to the below form by defining new variables:(7)y1k=A1y11+A2y12+A3y13+A4y14+A5y15(8)A1=1.5PλfJ-λfPLq,A2=1.5PλfJ-RLq+1.5PλfimJ,A3=1.5PλfLqJ,A4=1.5PλfJ-pLdLq,A5=1.5Ld-Lqim22J,y11=x1k+1-x1k,y12=sinx1k,y13=u1k,y14=cosx1kx1k+1-x1k,y15=sin⁡2x1k+1,y1k=x1k+3-2x1k+2+x1k+1.Finally a nonlinear model of PMSM is written to common linear regression form considering (7) without any linearization in which A1,…,A7 are factors that are obtained from multiplying physical parameters of the system and y11,…,y15 are variables that are composed of nonlinear functions, input, and output.Equation (7) can be written to the linear regression matrix.In the following equation,ϕ1 is estimator vector for the first regression form and θ1 parameter vector related to this form:(9)y1k=ϕ1Tθ1,(10)ϕ1=y11y12y13y14y15T,θ1=A1A2A3A4A5.


### 2.2. Model Number 2

The second state variable of (3) can be rewritten by using (2) as below:(11)x2k+Ts=x2k+Ts1.5PλfimJsin⁡x1t+Ts1.5Ld-LqimJsin⁡x1kx4t.By shifting forward in (11) and putting x3k+1 in it from (3) and substituting Ts=1,(12)x2k+2=x2k+1+1.5PλfimJsin⁡x1k+1+1.5Ld-Lqim2Jsin⁡x1k+1·cos⁡x1t+1.5Ld-LqimLdJu2+1.5Ld-Lqim2J-RLd·sin⁡x1k+1cos⁡x1t+1.5Ld-Lqim2JPLqLd·sin⁡x1k+1sin⁡x1kx2k.Equation (12) is rewritten in terms of load angle by using the relation between the first and second state variables:(13)x1k+3-x1k+2=x1k+2-x1k+1+1.5PλfimJsin⁡x1k+1+1.5Ld-Lqim2Jsin⁡x1k+1cos⁡x1k+1.5Ld-LqimLdJsin⁡x1k+1u2+1.5Ld-Lqim2J-RLdsin⁡x1k+1·cos⁡x1k+1.5Ld-Lqim2JPLqLd·sin⁡x1k+1sin⁡x1kx1k+1-x1k.The above equation is rewritten to the below form by defining new variables:(14)y2k=B1y21+B2y22+B3y23+B4y24,(15)B1=1.5PλfimJ,B2=1.5Ld-Lqim2J1+-RLd,B3=1.5Ld-LqimLdJ,B4=1.5Ld-Lqim2JPLqLd,y2k=x1k+3-2x1k+2+x1k+1,y21=sin⁡x1k+1,y22=sin⁡x1k+1cos⁡x1k,y23=sin⁡x1k+1u2k,y24=sin⁡x1k+1sin⁡x1kx1k+1-x1k.Finally a nonlinear model of PMSM is written to common linear regression form like form number 1 considering equation (14) without any linearization in which B1,…,B7 are factors that are embedded in the physical parameters of the system and y21,…,y24 are variables that are composed of nonlinear functions, input, and output.Equation (14) can be written to the linear regression matrix like form number 1:(16)y2k=ϕ2Tθ2,(17)ϕ2=y21y22y23y24T,θ2=B1B2B3B4.In (13), ϕ2 is estimator vector and θ2 parameter vector related to form number 2.


## 2.1. Model Number 1

The second state variable of (3) can be rewritten by using (2) as below:(4)x2k+Ts=x2k+Ts1.5PλfJx3k+Ts1.5Ld-LqJim22sin⁡2x1k.By shifting forward in (4) and putting x3k+1 in it from (3) and substituting Ts=1,(5)x2k+2=x2k+1+1.5Ld-Lqim22Jsin⁡2x1k+1+1.5PλfJ-λfPLqx2k+1.5PλfJ-RLqsin⁡x1k+1.5PλfLqJu1k+1.5PλfJ-pLdLqcos⁡x1kx2k+1.5PλfimJsin⁡x1t.Equation (5) is rewritten in terms of load angle by using the relation between the first and second state variables:(6)x1k+3-x1k+2=x1k+2-x1k+1+1.5PλfJ-λfPLqx1k+1-x1k+1.5PλfJ-RLqsin⁡x1k+1.5PλfLqJ·u1k+1.5PλfJ-pLdLqcos⁡x1k·x1k+1-x1k+1.5PλfimJsin⁡x1t+1.5Ld-Lqim22Jsin⁡2x1k+1.The above equation is rewritten to the below form by defining new variables:(7)y1k=A1y11+A2y12+A3y13+A4y14+A5y15(8)A1=1.5PλfJ-λfPLq,A2=1.5PλfJ-RLq+1.5PλfimJ,A3=1.5PλfLqJ,A4=1.5PλfJ-pLdLq,A5=1.5Ld-Lqim22J,y11=x1k+1-x1k,y12=sinx1k,y13=u1k,y14=cosx1kx1k+1-x1k,y15=sin⁡2x1k+1,y1k=x1k+3-2x1k+2+x1k+1.Finally a nonlinear model of PMSM is written to common linear regression form considering (7) without any linearization in which A1,…,A7 are factors that are obtained from multiplying physical parameters of the system and y11,…,y15 are variables that are composed of nonlinear functions, input, and output.Equation (7) can be written to the linear regression matrix.In the following equation,ϕ1 is estimator vector for the first regression form and θ1 parameter vector related to this form:(9)y1k=ϕ1Tθ1,(10)ϕ1=y11y12y13y14y15T,θ1=A1A2A3A4A5.


## 2.2. Model Number 2

The second state variable of (3) can be rewritten by using (2) as below:(11)x2k+Ts=x2k+Ts1.5PλfimJsin⁡x1t+Ts1.5Ld-LqimJsin⁡x1kx4t.By shifting forward in (11) and putting x3k+1 in it from (3) and substituting Ts=1,(12)x2k+2=x2k+1+1.5PλfimJsin⁡x1k+1+1.5Ld-Lqim2Jsin⁡x1k+1·cos⁡x1t+1.5Ld-LqimLdJu2+1.5Ld-Lqim2J-RLd·sin⁡x1k+1cos⁡x1t+1.5Ld-Lqim2JPLqLd·sin⁡x1k+1sin⁡x1kx2k.Equation (12) is rewritten in terms of load angle by using the relation between the first and second state variables:(13)x1k+3-x1k+2=x1k+2-x1k+1+1.5PλfimJsin⁡x1k+1+1.5Ld-Lqim2Jsin⁡x1k+1cos⁡x1k+1.5Ld-LqimLdJsin⁡x1k+1u2+1.5Ld-Lqim2J-RLdsin⁡x1k+1·cos⁡x1k+1.5Ld-Lqim2JPLqLd·sin⁡x1k+1sin⁡x1kx1k+1-x1k.The above equation is rewritten to the below form by defining new variables:(14)y2k=B1y21+B2y22+B3y23+B4y24,(15)B1=1.5PλfimJ,B2=1.5Ld-Lqim2J1+-RLd,B3=1.5Ld-LqimLdJ,B4=1.5Ld-Lqim2JPLqLd,y2k=x1k+3-2x1k+2+x1k+1,y21=sin⁡x1k+1,y22=sin⁡x1k+1cos⁡x1k,y23=sin⁡x1k+1u2k,y24=sin⁡x1k+1sin⁡x1kx1k+1-x1k.Finally a nonlinear model of PMSM is written to common linear regression form like form number 1 considering equation (14) without any linearization in which B1,…,B7 are factors that are embedded in the physical parameters of the system and y21,…,y24 are variables that are composed of nonlinear functions, input, and output.Equation (14) can be written to the linear regression matrix like form number 1:(16)y2k=ϕ2Tθ2,(17)ϕ2=y21y22y23y24T,θ2=B1B2B3B4.In (13), ϕ2 is estimator vector and θ2 parameter vector related to form number 2.


## 3. OPA and RLS Estimator

RLS is a powerful tool in system identification which is robust against noise, while OPA is an interesting method with high convergence speed with poor performance in noisy environment [25, 26]. Both advantages of these two methods can be used simultaneously if they are combined. Reference [27] is a good reference to understand the efficacy of the combinatorial method which was applied on synchronous generator and good results were obtained. The aim of this paper is to estimate the physical parameter of the PMSM using OPA&RLS method in noisy environment with arbitrary initial values of physical parameters. It is noted that nonlinear PMSM system is extremely sensitive to physical parameters variations; hence estimation of parameters of such systems is very important by this algorithm.Estimation process is started with orthogonal projection and orthogonal base vectors of estimator that are in the same dimension with the number of parameters (subspace of OPA estimation method) which are produced [20, 25, 26]. After producing estimation subspace, RLS is used and last estimation of parameters in OPA method is applied to it which is a good initial estimation for RLS to increase the convergence speed. Then, RLS continues the estimation process with a good accuracy to achieve physical parameters. Stages of the combinatorial algorithm are given in the following:Stage zero: OPA is started witht=0 and ε=0 and selection of initial parameters θ0 and P0 covariance identity matrix.Stage one: a step is added tot (t=t+1) and estimator vector ϕt-1 is calculated.Stage two: if the estimator vector of this stage is not linearly dependent on the estimator vector of the previous stage (ϕt-1Tpt-1ϕt-1≠0), we return to stage three; otherwise previous values of parameters are substituted (pt=pt-1, θ^t=θ^t-1) and we go to stage one.Stage three:θt and pt are obtained after recursive equation of (18).Stage four: if the rank of estimator matrix is equal to the number of parameters (RankΦ=dimθ), then OPA is finished in tOPA and we go to stage five; otherwise we return to stage one.Stage five: to start the estimation with RLS method,ε=1 and θtOPA are considered as initial estimation.Stage six: a step is added tot (t=t+1) and estimator vector ϕt-1 is calculated.Stage seven:θt and pt are updated using (18).Stage eight: if the stop condition is not met, we return to stage six. Consider the following:(18)θ^t=θ^t-1+Pt-1·ϕt-1ε+ϕt-1T·Pt-1·ϕt-1·yt-θ^t-1T·ϕt-1,Pt=Pt-1+Pt-1·ϕt-1·ϕt-1T·Pt-1ε+ϕt-1T·Pt-1·ϕt-1.


## 4. Simulation

To validate the efficiency and accuracy of the combinatorial OPA&RLS method, the proposed method is implemented on a PMSM with specifications of Table1 [23].Table 1
Parameters of the understudy system [23].
R
L
q
L
d
λ
f
j
p
2.87 Ω
9 mH
7 mH
0.175 mWb
8 gm2
4The signal (PRBS) is applied to the input of system for data production to identify and excite the dynamics and a noise withSNR=15 is added to simulate a real condition for output of the system (load angle) which is shown in Figure 2 (amplitude and output). Simulation is performed in MATLAB software.To show the superiority of the proposed method, it is compared to OPA and RLS estimator. The criteria for evaluation are the speed and accuracy estimator in converging to the real parameters in a way that the second norm of parameter estimation error vector (L2) is minimized:(19)L2=θ-θ^2.These criteria are evaluated and compared for the three methods, that is, OPA, RLS, and OPA&RLS methods, for both linear regression forms from the second part with the same initial estimation and stop condition.This criterion is shown in Figure1 for RLS and OPA&RLS methods. It is shown that this criterion is first decreased for OPA method with respect to speed which shows quick convergence toward objective parameters but after that this trend is not preserved and system would oscillate and diverges due to noise. It is shown from Figure 1 that the second norm of factors estimation error for RLS is descending but its slope is slight (low) which requires too many samples for parameters convergence. However, it is prominent that, in OPA&RLS method, parameters would leap greatly toward the objective parameters with a quick decrease in initial samples and after that it has a proper trend until the convergence to real parameters and appropriate estimation which is very proper for noisy condition. This is because both features of RLS and OPA are used in a single algorithm.Figure 1
Second norm of parameters estimation error in OPA.Figure 2
The figure shows output of real condition and estimated model and their difference. As shown, estimated and real output.As discussed in Section2, to avoid nonlinear complicated calculation for estimating physical parameters, two regression forms are defined according to (9) and (13). Now, the values of physical parameters are calculated with simple mathematics and given in Table 2.Table 2
Comparison between the convergence of OPA and RLS and OPA&RLS methods with the same condition.
R
L
q
L
d
λ
f
j
p
Time
Real
2.875
9
7
0.175
8
4
—
OPA
−0.264
−0.331
8.1717
0.1547
−0.495
−0.180
20
RLS
1.4925
7.1954
7.7590
0.1911
7.8661
3.2461
20
OPA&RLS
2.897
9.0650
6.9981
0.1744
8.006
4.012
20Figure2 shows output of real condition and estimated model and their difference. As shown, estimated and real output are alike with agreeable accuracy.One of the criteria for evaluating the error of estimation is the normalized residue criterion according to (20) [28, 29]. Here, this criterion is calculated and is given in Table 3. It is observed that the proposed method is superior with respect to other methods. Consider the following:(20)JdB=10log⁡∑1Nyt-y^t2∑1Nyt2.Table 3
Investigation of normalized residue in three algorithms.
The normalized residual
OPA method
12.023 (dB)
RLS method
3.023 (dB)
OPA&RLS method
−37.56 (dB)


## 5. Conclusion

In this paper a new combinatorial method of Orthogonal Projection Algorithm and Recursive Least Squares (OPA&RLS) for parameter estimation of PMSM in noise-covered environment is proposed. To avoid solving complicated nonlinear equation, two linear regression forms of fourth-order state space PMSM were rewritten and OPA&RLS estimator was compared to OPA and RLS estimators. Speed and accuracy of convergence were investigated in three algorithms and it was shown that OPA&RLS method has better results with respect to the two single methods. The proposed algorithm can be applied to any linear or nonlinear system where state space model of the system is rewritten to linear regression form. It is also verified that this method is very appropriate for online estimation.



---

*Source: 418207-2015-07-22.xml*