Sensorless Direct Torque Control of Surface-Mounted Permanent Magnet Synchronous Motors with Nonlinear Kalman Filtering

: The demand for sensorless control of surface-mounted permanent magnet synchronous motor drives has grown rapidly. Among various sensorless control techniques developed, Matsui’s current model-based approach and the extended Kalman ﬁlter approach have gained much attention. However, the performance of these control methods can be severely worsened or may even become unstable under strong disturbances or sensing failures. This paper presents a comparative study of the extended Kalman ﬁlter, the resilient extended Kalman ﬁlter, and the unscented Kalman ﬁlter-based sensorless direct torque and ﬂux control approaches for the surface-mounted permanent magnet synchronous motor drives. Computer simulation studies and hardware implementation results have shown the efﬁciency and superior performance of the resilient extended Kalman ﬁlter and the unscented Kalman ﬁlter over the traditional extended Kalman ﬁlter for sensorless direct torque control applications.


Introduction
Over the past decades, there has been a rapid increase in the deployment of surface-mounted permanent magnet synchronous motors (SPMSM) in industrial and commercial applications, such as wind energy conversion systems, hybrid electric vehicles, robotics, home appliances, etc. Adjustable speed SPM drives offer many distinct advantages including large torque to weight ratio, wide constant-power operating range, high efficiency and reliability, etc.
A wide variety of adjustable-speed control techniques have been studied in literature for permanent magnet AC motors. Among them, field oriented control (FOC) for SPMSM drives has reached industrial application maturity. FOC requires coordinate transforms and space-vector pulse width modulation (SVPWM), through which the flux and torque of AC machines are controlled independently [1][2][3][4][5]. In order to eliminate these requirements, direct torque control (DTC) was proposed as a powerful alternative [6,7]. The advantages of DTC include fast dynamic responses, elimination of coordinate transforms and SVPWM. DTC also has minor disadvantages, in comparison with FOC, including: difficulties to control torque and flux at relatively low speed, variable switching frequency, larger harmonics, larger noise level and ripples at low speed range. Despite the aforementioned shortcomings, DTC is also a feasible solution for commercial permanent magnet AC drives.
DTC is in nature "sensorless", as rotor position is not required for performing coordinate transform [6,7]. However, it relies on the information of stator flux vector. Especially, at relatively low speed range, due to inaccurate estimation of flux vector, DTC suffers from the performance degradation. Sensorless estimation of stator flux and rotor speed has to be designed to preserve the advantages of direct torque control. For traditional DTC, stator flux linkage (λ s ) is estimated through integrating stator induced voltage over time.
Even minor dc offsets in voltage or current signals accumulated by integration will form a substantial disturbance. Hence, traditional estimation of λ s contains large and noisy ripples [8][9][10].
To improve the estimation of stator flux linkage, various estimators have been developed including the back-emf integration methods such as low-pass filtering [11][12][13], and stabilizing the integrator with a PI-corrector or current offset methods [14][15][16][17]. However, these approaches are not designed for real-time estimation. The sliding mode observer (SMO) is developed for providing real-time state estimates for permanent magnet synchronous motors in [18][19][20]. However, higher-order derivatives presented in SMO are not desirable for hardware implementations. The extended Kalman filter (EKF) is a popular approach for sensorless control scheme. However, the performance of EKF deteriorates or may even become unstable under measurement failure conditions [21][22][23][24][25][26][27].
To improve EKF performance under external disturbances, noise and measurement failures, this paper presents a comparative study of the extended Kalman filter (EKF), the resilient extended Kalman filter (REKF), and the unscented Kalman filter (UKF)-based sensorless direct torque control approaches for SPMSM drives. Computer simulation studies and hardware implementation results have shown the efficiency and superior performance of the resilient extended Kalman filter and the unscented Kalman filter over the traditional extended Kalman filter for sensorless direct torque control applications. This paper is organized as follows: Section 2 presents the dynamics of surface-mounted permanent magnet synchronous motors. Section 3 provides the overall control scheme of direct torque control. Section 4 presents the traditional extended Kalman filtering, the resilient extended Kalman filter and the unscented Kalman filter for nonlinear estimation. Computer simulation results and hardware implementation results are illustrated in Section 5. Finally, conclusions are summarized in Section 6.

Dynamics of Surface-Mounted Permanent Magnet Synchronous Motors
Applying Park's transform, the surface-mounted permanent magnet synchronous motors (SPMSM) can be modeled as follows: It should be noted that the direct and quadrature axis stator inductance are the same for SPMSM, i.e., L d = L q = L s , as no rotor saliency exists.
Equivalently, the current frame of reference model can be reached as follows: Energies 2018, 11, 969 3 of 19 The developed electromechanical torque is Note that the mechanical and electrical angular velocities are related by The mechanical dynamics can be summarized as Applying (8) and (9), we have and The external torque load τ l is also considered as state variable, which is assumed to be constant over a brief period of sampling time T s , i.e., we have The continuous-time SPMSM state space model can be written as follows: where we have and Notice that subscript c represents continuous-time signals.
Applying Euler's discretization, the discrete-time system model can be reached as follows: where T s is the sampling time.
Based on Jacobian matrices computation, a linear-time-invariant discrete-time state space model can be reached as follows: where we have Similarly, The measurement equation can be expressed as: and

Direct Torque Control
Direct Torque control (DTC) was proposed by I. Takahashi for controlling induction motors in the mid 1980s [6,7]. The main feature of DTC is to apply appropriate voltage space vectors for voltage source inverter (VSI) from a predefined switching table. Voltage vectors with their position in space is shown in Figure 1. The six voltage space-vectors (V 1 − V 6 ) divides the space domain into six equal-area sectors. Either V 0 or V 7 can be used to represent a null vector at the origin. As DTC does not rely on pulse-width-modulation for generating the inverter voltage vectors, it requires less computational time with a reduced structure. The overall scheme of the sensorless direct torque control with nonlinear Kalman filtering is shown in Figure 2. The desired stator flux λ re f and torque τ re f are compared with the estimated stator flux λ est and torque τ est in the hysteresis flux and torque controllers, respectively. The flux controller is a two-level hysteresis comparator, whereas the torque controller is a three-level hysteresis comparator. The flux and torque hysteresis comparators are illustrated in Figure 3. The digitized output signal of the flux controller are defined based on where 2H λ is the flux tolerance band. The digitized output signal of the torque controller are defined based on where 2H τ is the torque tolerance band. The stator flux sector index N is obtained from the computed angular position Together with digitized variables dλ and dτ est , a digital address for accessing an EPROM or EEPROM can be created. Hence, the appropriate voltage space-vector can be selected, which is governed by the switching rules in Table 1. Hence, the voltage source inverter can produce the desired three-phase voltages for controlling rotation.

Nonlinear Estimation
First, we revisit the traditional extended Kalman filter [28,29]. Over the past 40 years, EKF has been the most widely used nonlinear estimation technique for various industrial applications [30][31][32]. In order to provide a more reliable nonlinear estimation against external disturbances, noise, bad data and measurement failures, we propose the unscented Kalman filter (UKF) and the resilient extended Kalman filter (REKF)-based sensorless DTC technique for permanent magnet synchronous motors.

Extended Kalman Filter
Consider the discrete-time nonlinear system dynamics and measurement equation given as follows: The extended Kalman filter estimation consists two steps: time update and measurement update. First, define the following Jacobian matrices: For time update, we compute the priori covariance and priori state estimate x where V k is the covariance matrix of process noise v k at time step k.x − is the priori state estimate and P − k is the priori covariance matrix. The measurement update can be summarized as follows wherex + k is the posteriori state estimate; P + k is the posteriori covariance matrix.

Resilient Extended Kalman Filter
Consider the discrete-time nonlinear stochastic system model and measurement equations as follows [33]: where x k ∈ R n state vector v k ∈ R n system noise y k ∈ R p measurement vector w i k ∈ R measurement noise in each phasor measurement unit and w k = [w 1 k , w 2 k , ..., w p k ] T f , h differentiable non-linear vector functions The mean of initial state . The process and measurement noises, v k and w k , are white, zero mean, uncorrelated with each other and with x o , and have covariance V k and W k , respectively.
The scalar binary Bernoulli distributed random variables γ i k are with mean π i and variance π i (1 − π i ) whose possible outcomes 0,1 are defined as Prob(γ i k = 1) = π i and Prob(γ i k = 0) = 1 − π i . The formulation involves hard measurement failures, where the sensor either works properly or fails to provide reliable estimation.
By denoting the measurement equation can be written as Our goal is to estimate the state vector x k based on our knowledge of system dynamics and the availability of the noisy measurement y k under the effect of sensor failures. The following discrete time nonlinear Luenberger observer is considered in this work.
Although the filter gain should be K k , due to computational or tuning uncertainties, it is erroneously implemented as K k + ∆ k . The termΓ k is defined as K k is the feedback gain with additive uncertainty ∆ k . The uncertainty ∆ k , is assumed to have zero mean, bounded second moment and be uncorrelated with initial state, process and measurement noises, i.e., The resilient extended Kalman filter is defined as follows:

Computation of Jacobian matrices
3. For time steps k = 1, 2, 3, ..., the estimator propagates by calculating the feedback gain from an upper bound on the local estimation error covariance to be used in updating the state estimate aŝ

Unscented Kalman Filter
Consider the following system and measurement equations [34][35][36][37][38]. where . The process and measurement noise are white Gaussian noise (WGN), which can be expressed as v k ∼ (0, V k ), w k ∼ (0, W k ). The initial state variables obey normal distribution withx o and P o . The size of the sigma points is x k = 2n + 1, from which the UKF can be implemented using the following steps: 2. Define sigma points χ (s) k and weights s for s = 1, · · · , 2n as follows: The weighing coefficients are determined by where the weight must agree 2n ∑ s=0 s = 1.
and ( √ nP k ) s is s th row or column of the matrix square root of nP k .

Process Update
The priori mean and covariance of the estimated valuex − k+1 can be obtained using the transformed sigma points as follows:

Output Covariance Update
The predicted measurement isŷ

Cross-correlation Update
The cross-correlation P xy is determined by 6. Measurement Update The final measurement update can be performed using normal Kalman filter equations as: The Kalman gain K k can be written as follows: The posteriori covariance matrix P k+1 and the estimated state variablex k+1 can be expressed as follows: x

Computer Simulation Studies and Hardware Implementations
Computer simulation studies and Texas Instrument TMS320F28335 DSP processor implementations have been developed to show the efficiency of proposed sensorless direct torque control approach. The testing SPMSM parameters are summarized in Table 2. The hardware implementation is shown in Figure 4.  The final reference speed of SPMSM motor is set to be 400 mechanical rad/s. An external load of 1.5 Nm is applied at 0.5 s. Figures 5-8 show rotor speed, developed torque, stator flux, quadrature-axis stator current estimation comparisons, respectively. Figures in the first, second and third row show EKF, REKF and UKF estimation results, respectively. The first column figures are nonlinear estimation results under sensing failure condition. The second column figures are nonlinear estimation results without sensing failures. Note that EKF, UKF and REKF all converge to the real-state values. However, since the EKF uses first-order linearization to update the covariance of the state, it shows more estimation error compared with REKF and UKF.
Without measurement failures, the estimation error comparisons of EKF, UKF and REKF are summarized in Tables 3-5. In comparison with EKF and REKF, UKF shows superior accuracy in torque, speed, and current estimation, under the condition that all sensors work properly. Under no sensing failure condition, UKF tracks the real state variables more closely with less ripples, since it relies on the unscented transformation to characterize the probability density function, without linearization involved. EKF truncates Taylor series of the mean at the first term, its prediction error of the mean value is in the second and higher order terms. EKF truncates at the first term of the covariance matrix, therefore, it is correct up to the second order with errors in fourth order term and above. UKF does not truncate any terms of the Taylor series, but uses sigma points through nonlinear transformation to decide the mean and covariance.  Under the sensing failure condition, computer simulations are conducted based on the assumption that each sensor has 5% failure rate. Scalar binary random variables following Bernoulli distribution are generated for the measurements in order to produce random sensing failures. In another word, the sensor either works properly or fail to provide true measurements with a probability of 5%. In this case, the resilient extended Kalman filter provides more reliable state estimation with greater accuracy compared to EKF and UKF, since the resilient extended Kalman filter is designed to handle measurement failures. Hence, REKF is a more robust nonlinear estimation approach.

Conclusions
Direct torque control combines the benefits of direct flux and torque control into an adjustable speed drive, which does not require pulse-width-modulation or coordinate transforms. The paper presented a comparative study of sensorless direct torque control approaches of surface-mounted permanent magnet synchronous motors with the unscented Kalman filter (UKF), the resilient extended Kalman filter (REKF), and the extended Kalman filter (EKF). As demonstrated by simulation and implementation results, EKF, REKF, and UKF all track the state variables effectively. However, REKF is a preferred estimation method when sensors randomly fail to provide accurate measurements; whereas UKF is a superior method in state variables estimation when all sensors provide accurate measurements.
Author Contributions: All authors contributed equally in the presented research, and all authors approved the final manuscript.

Conflicts of Interest:
The authors declare no conflicts of interest. τ e , τ l , τ est , τ re f electrical, load, estimated, and reference torques γ s computed angular position dλ est , dτ est digitized variables for flux and torque controller H λ , H τ flux and torque tolerance bands P − k , x − k priori covariance and priori state estimate P k+1 posteriori covariance matrix x k+1 estimated state variable K k Kalman gain v k , w k process and measurement noise V k , W k covariance matrix of process and measurement noise v, w at the k th time step γ i k scalar binary random variables following the Bernoulli-distribution ∆ k additive uncertainty in Kalman gain P xy cross-correlation matrix χ (s) k sigma points s weighing coefficients