# Sensorless Speed Control of Permanent Magnet Synchronous Motors by Neural Network Algorithm

Authors: Ming-Shyan Wang; Ika Noer Syamsiana; Feng-Chi Lin
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

The sliding mode control has the merits with respect to the variation of the disturbance and robustness. In this paper, the sensorless sliding-mode observer with least mean squared error approach for permanent magnet synchronous motor (PMSM) to detect the rotor position by counter electromotive force and then compute motor speed is designed and implemented. In addition, the neural network control is also used to compensate the PI gain tuning to increase the speed accuracy without regarding the errors of the current measurement and motor noise. In this paper, a digital signal processor TMS320F2812 utilizes its high-speed ADC module to get current feedback information and thus to estimate the rotor position and takes advantage of the built-in modules to achieve SVPWM current control so that the senseless speed control will be accomplished. The correctness and effectiveness of the proposed control system will be verified from the experimental results.


---

## Body

## 1. Introduction

Nowadays, the permanent magnet synchronous motor (PMSM) is more widely applied than before in the servo control systems. For servo control systems, their excellent performance comes from using position sensors for feedback control. However, the disadvantages of shaft sensors limit the applications, such as system cost increasing, motor size, and reliability decreasing in applications such as air conditioner compressors, where the environment is highly humid and hot. As a result, extensive research has been conducted on overcoming these difficulties by eliminating the position sensors in servomotor systems [1].Two kinds of sensorless control methods are popularly used in servo control systems, fundamental model based method and saliency based method. Fundamental model based method uses observers, such as back electromotive force (EMF) observer and flux linkage observer, to estimate the rotor position. Meanwhile, the saliency based method consists of continuous signal injection and transient voltage vector injection [2]. Some authors proposed to estimate speed and position of PMSM by back-EMF or flux linkage but it is hard at low speed operation and standstill because back EMF amplitude is approaching zero. Other references compared several methods and recommended continuous signal injection method for low operating speed because of its simple hardware configuration. However, the torque ripple and acoustic noise by continuous signal injection are larger than other methods.A flux linkage estimation method [3] is developed by first measuring the stator line-to-line voltages and stator phase current to obtain the back EMF space vector. This vector in turn is used to yield the angle of the flux linkage vector. However, it is affected by integrator drift in low speed and its accuracy is highly sensitive to parameter variation. Another observer based method [4] is presented that removes the dependency on mechanical parameters; however there is still the need for an electrical model of the machine. The tracking control problem is addressed for a sensorless PMSM with unknown constant load torque. Assuming that only stator currents and voltages are available for feedback, a novel sixth order nonlinear adaptive control algorithm is designed for the PMSM [5]. However, the proposed control algorithm is tested just by simulation. A high-speed sliding-mode observer [6] is proposed for PMSM, which estimates the rotor position and the angular velocity from the back EMF. Carrier-signal-injection-based control methods [7] are proposed for sensorless control. Fundamental pulse width modulation excitation is used to improve sensorless control of a permanent magnet machine [8]. No additional signal injection or separate test vectors are required. However, modification is needed when narrow PWM voltage vectors occur.Recently, artificial neural networks (ANNs) have attracted much attention to their possible use in a wide range of engineering applications like power electronics or motor drives [9–15]. The use of ANNs is motivated by their useful features, like having a parallel distributed architecture, being able to identify nonlinear system dynamics, and having the ability to learn, generalize, and adapt. All of these features justify the use of ANNs for motor drive applications, including sensorless control.This paper presents a neural network based approach to the sensorless control of the PMSM. The basic premise of the method is that an ANN provides a very efficient mapping structure for the nonlinear PMSM. By measuring the phase currents and applying them as inputs to the estimator by least mean squares, the rotor angle is estimated, thereby facilitating the elimination of the rotor position sensor. An NN with back propagation algorithm is considered to compensate the PI gains for speed control.The paper is organized as follows for further discussion. Section2 introduces system description including PMSM modeling, neural network with LMS compensation for rotor angle estimation, and speed control by ANN. Section 3 consists of simulation by Matlab/Simulink and experiments. Finally, a conclusion is given in Section 4.


## 2. Servo System Design

There are three parts for the proposed servo control system design, PMSM modeling, sliding-mode observer (SMO) with LMS approach, and PI speed control compensated by neural networks.


### 2.1. PMSM Modeling

By Park and Clarke transformations, the voltage equations of PMSM from the stationary a-b-c frame to theα-β frame and the rotating d-q frame will be given as [9–15]
(1)[vαvβ]=[Rs+ddtLs00Rs+ddtLs][iαiβ]+[eαeβ],[vdvq]=[Rs+ddtLs-ωrLsωrLsRs+ddtLs][idiq]+[0ωrλf],
where vd,vq are d- and q-axis voltages; id,iq are d- and q-axis currents; λf is flux linkage due to the permanent magnets; ωr is the electric speed; and Rs and Ls are the resistance and inductance. The α- and β-axis back EMFs are given as
(2)eα=-λfωrsinθ,eβ=λfωrcos⁡θ.The use of the Park transformation implies using the rotor position. However, the actual rotor position is not known in a sensorless application and needs to be estimated. Figure1 shows the block diagram of sensorless PMSM control system, which will be simulated by Matlab/Simulink and experimented to verify the design.Figure 1
Block diagram of the proposed control system.


### 2.2. Sliding-Mode Observer with LMS Approach

Control systems with sliding-mode control (SMC) may have better performance of smaller settling time, less or no overshoot, and faster tracking ability. In addition, sliding-mode observer (SMO) can provide information of rotor position and speed estimation. The dynamic equations of SMO are given as follows:(3)ddti^α=-RsLsi^α+1Lsνα-1Lsk*(i^α-iα),ddti^β=-RsLsi^β+1Lsνβ-1Lsk*(i^β-iβ),
where i^α and i^β are the estimated variables of iα and iβ and k is observer gain. The sliding vector for the system is
(4)Sn=[sα,sβ]T=[i^α-iα,i^β-iβ]T,
and the defined Lyapunov function is
(5)V=12SnTSn=12(sα2+sβ2).
The observer gain k will be designed to satisfy Lyapunov’s stability theorem, V˙<0, as the system trajectory approaches to the sliding hyperplane, Sn=0. As a result, we have
(6)e^α=k*i-α,e^β=k*i-β
and the estimated rotor angle is
(7)θ^=-tan-1(e^αe^β).In order to compensate the rotor position estimation error due to the process of motor speed tracking and noise, an adaptive linear element neural network (NN) structure shown in Figure2 with least mean square approach is adopted. Artificial NNs are similar to biological NNs in the sense that they are based on the same principle of operation based on highly parallel structure and acquiring knowledge through a learning process [16]. The building blocks of an ANN are simple computational nodes, called neurons. They are connected into a network structure by weighted connections, much like the synaptic connections in the human brain. Although the components of an NN are simple and few, the structure and type of these networks vary greatly, determined by the ever increasing interest in this research field.Figure 2
Structure of adaptive linear element neural network.In Figure2, x1,x2,…,xn are input variables, wk1,wk2,…,wkn are weights, bk is the bias, Δe-=(e1+e2+e3+⋯+en)/n is averaged error, and d(k) is the reference angle from the speed command, respectively. If the estimated error at time instant k is e(k), by LMS approach, we have the follow equations [9–16]:
(8)∂e2(k)∂w1,j=2e(k)∂e(k)∂w1,jj=1,2,…,n,∂e2(k)∂bk=2e(k)∂e(k)∂bk,w(k+1)-w(k)=Δw=2αe(k)xn(k),b(k+1)-b(k)=Δb=2αe(k),w(k+1)=w(k)+2αe(k)xn(k),b(k+1)=b(k)+2αe(k),
where α is the learning rate.


### 2.3. PI Speed Control Compensated by Neural Networks

The proportional-integral (PI) control is first considered in the system,(9)Gs(s)=Ksp+Ksis,
where Ksp and Ksi are the proportional gain and integral gain, respectively. PI controller is widely used in the industrial applications. However, it cannot cope with the load variation or parameter variation well. In the paper, the ANN with back propagation algorithm is utilized to compensate the PI control quantity as shown in Figure 1.The output of thejth neuron at the nth layer is calculated as
(10)yjn=f(netjn),netjn=∑iwjinyin-1+bjn.The error function is defined as(11)E=12∑k(dk-yk)2.The conjugated gradient method is considered to find the minimum value of the error function (11).


## 2.1. PMSM Modeling

By Park and Clarke transformations, the voltage equations of PMSM from the stationary a-b-c frame to theα-β frame and the rotating d-q frame will be given as [9–15]
(1)[vαvβ]=[Rs+ddtLs00Rs+ddtLs][iαiβ]+[eαeβ],[vdvq]=[Rs+ddtLs-ωrLsωrLsRs+ddtLs][idiq]+[0ωrλf],
where vd,vq are d- and q-axis voltages; id,iq are d- and q-axis currents; λf is flux linkage due to the permanent magnets; ωr is the electric speed; and Rs and Ls are the resistance and inductance. The α- and β-axis back EMFs are given as
(2)eα=-λfωrsinθ,eβ=λfωrcos⁡θ.The use of the Park transformation implies using the rotor position. However, the actual rotor position is not known in a sensorless application and needs to be estimated. Figure1 shows the block diagram of sensorless PMSM control system, which will be simulated by Matlab/Simulink and experimented to verify the design.Figure 1
Block diagram of the proposed control system.


## 2.2. Sliding-Mode Observer with LMS Approach

Control systems with sliding-mode control (SMC) may have better performance of smaller settling time, less or no overshoot, and faster tracking ability. In addition, sliding-mode observer (SMO) can provide information of rotor position and speed estimation. The dynamic equations of SMO are given as follows:(3)ddti^α=-RsLsi^α+1Lsνα-1Lsk*(i^α-iα),ddti^β=-RsLsi^β+1Lsνβ-1Lsk*(i^β-iβ),
where i^α and i^β are the estimated variables of iα and iβ and k is observer gain. The sliding vector for the system is
(4)Sn=[sα,sβ]T=[i^α-iα,i^β-iβ]T,
and the defined Lyapunov function is
(5)V=12SnTSn=12(sα2+sβ2).
The observer gain k will be designed to satisfy Lyapunov’s stability theorem, V˙<0, as the system trajectory approaches to the sliding hyperplane, Sn=0. As a result, we have
(6)e^α=k*i-α,e^β=k*i-β
and the estimated rotor angle is
(7)θ^=-tan-1(e^αe^β).In order to compensate the rotor position estimation error due to the process of motor speed tracking and noise, an adaptive linear element neural network (NN) structure shown in Figure2 with least mean square approach is adopted. Artificial NNs are similar to biological NNs in the sense that they are based on the same principle of operation based on highly parallel structure and acquiring knowledge through a learning process [16]. The building blocks of an ANN are simple computational nodes, called neurons. They are connected into a network structure by weighted connections, much like the synaptic connections in the human brain. Although the components of an NN are simple and few, the structure and type of these networks vary greatly, determined by the ever increasing interest in this research field.Figure 2
Structure of adaptive linear element neural network.In Figure2, x1,x2,…,xn are input variables, wk1,wk2,…,wkn are weights, bk is the bias, Δe-=(e1+e2+e3+⋯+en)/n is averaged error, and d(k) is the reference angle from the speed command, respectively. If the estimated error at time instant k is e(k), by LMS approach, we have the follow equations [9–16]:
(8)∂e2(k)∂w1,j=2e(k)∂e(k)∂w1,jj=1,2,…,n,∂e2(k)∂bk=2e(k)∂e(k)∂bk,w(k+1)-w(k)=Δw=2αe(k)xn(k),b(k+1)-b(k)=Δb=2αe(k),w(k+1)=w(k)+2αe(k)xn(k),b(k+1)=b(k)+2αe(k),
where α is the learning rate.


## 2.3. PI Speed Control Compensated by Neural Networks

The proportional-integral (PI) control is first considered in the system,(9)Gs(s)=Ksp+Ksis,
where Ksp and Ksi are the proportional gain and integral gain, respectively. PI controller is widely used in the industrial applications. However, it cannot cope with the load variation or parameter variation well. In the paper, the ANN with back propagation algorithm is utilized to compensate the PI control quantity as shown in Figure 1.The output of thejth neuron at the nth layer is calculated as
(10)yjn=f(netjn),netjn=∑iwjinyin-1+bjn.The error function is defined as(11)E=12∑k(dk-yk)2.The conjugated gradient method is considered to find the minimum value of the error function (11).


## 3. Simulation and Experimental Results

The system simulation is programmed by Matlab/Simulink. The parameters of PMSM 8CB75 are listed in Table1. After training, the chosen topology that gives good performance with minimal resources is a 2-hidden-neuron structure for the speed estimating neural network. The activation functions in the hidden layers of the networks are hyperbolic tangent sigmoid functions and those of the output layer are purely linear transfer functions. The values of these weights are given as input layer to hidden layer weights: {837.4172,-126.4659}, hidden layer to output layer weights: {-0.614,0.6713}, hidden neurons’ thresholds: {12.5996,8.3947}, and output neuron’s threshold: 0.6560. The final mean squared error of 3.83267*10-17 is reached after 20 training epochs for the neural networks. The gain constants of PI control are Ksp=1.2 and Ksi=1.5, respectively. These parameters are applied to the simulation and experimentation.Table 1
Parameters of PMSM Sinano 8CB75.
Parameters
Unit
Value
P
W
750
V
V
149.4
T
N·m
2.931
I
A
3.4
N
Rpm
3000
K
N·m/A
0.776
J
Kg·cm2
2.449
R
Ω
3.27
L
mH
10.2Figures3 and 4 display the rotor angle estimation with SMO and with SMO plus LMS at the motor speed of 100 rpm, respectively. It is easy to find the accuracy of little difference by simulation. However, for experimentation, the great difference between the estimated values can be shown in Figures 5 and 6. One of the reasons is lack of estimation of initial rotor position, which is our next research topic. As a result, there are no complete triangle position waveforms from zero degree to 360 degrees in the figures. In addition, the step speed responses of 200 rpm without and with NN compensation are depicted in Figures 7 and 8. The latter has better performance of less overshoot and settling time. For experimentation, the no-load speed responses of 200 rpm without (a) and with NN compensation (b) and the speed errors (c) (blue for no compensation) are displayed in Figure 9. Simultaneously, the step speed responses of 200 rpm with 1 kg disc load are shown in Figure 10. The speed responses without compensation display both the computing errors and the noise during motor rotation. The one by NN control has almost no overshoot, very short settling time, and zero steady-state error. The speed step responses of 100-150-100 rpm without (a) and with NN compensation (b) under loading of 1 kg disc are shown in Figure 11. The effectiveness of the proposed algorithm shows more clearly.Figure 3
The estimated rotor angle with SMO at speed of 100 rpm by simulation.Figure 4
The estimated rotor angle with SMO and LMS at speed of 100 rpm by simulation.Figure 5
The real estimated rotor angle with SMO at speed of 100 rpm.Figure 6
The real estimated rotor angle with SMO and LMS at speed of 100 rpm.Figure 7
The speed response of 200 rpm without compensation by simulation.Figure 8
The speed response of 200 rpm with NN compensation by simulation.The no-load speed responses of 200 rpm without (a) and with NN compensation (b) and the speed errors (c) (blue for no compensation).
(a)
(b)
(c)The speed responses of 200 rpm without (a) and with NN compensation (b) and the speed errors (c) (blue for no compensation) under loading of 1 kg disc.
(a)
(b)
(c)The speed responses of 100-150-100 rpm without (a) and with NN compensation (b) under loading of 1 kg disc.
(a)
(b)


## 4. Conclusions

This paper proposes a sensorless control system for PMSM by presenting an approach based on neural networks to compensate both the estimated position error and PI control gains. The suggested method is useful for applications to reduce cost. The simulation and experimental results show that the controlled system is capable of estimating rotor angle and motor speed within acceptable limits for many applications.



---

*Source: 321892-2014-09-25.xml*