Current Sensor Fault Diagnosis Based on a Sliding Mode Observer for PMSM Driven Systems

This paper proposes a current sensor fault detection method based on a sliding mode observer for the torque closed-loop control system of interior permanent magnet synchronous motors. First, a sliding mode observer based on the extended flux linkage is built to simplify the motor model, which effectively eliminates the phenomenon of salient poles and the dependence on the direct axis inductance parameter, and can also be used for real-time calculation of feedback torque. Then a sliding mode current observer is constructed in αβ coordinates to generate the fault residuals of the phase current sensors. The method can accurately identify abrupt gain faults and slow-variation offset faults in real time in faulty sensors, and the generated residuals of the designed fault detection system are not affected by the unknown input, the structure of the observer, and the theoretical derivation and the stability proof process are concise and simple. The RT-LAB real-time simulation is used to build a simulation model of the hardware in the loop. The simulation and experimental results demonstrate the feasibility and effectiveness of the proposed method.


Introduction
Permanent magnet synchronous motors (PMSMs) can efficiently satisfy the requirements of railway vehicles, including power quality, energy consumption and control characteristics thanks to their high efficiency, high ratio of torque to weight, high power density and faster response [1][2][3]. Germany, France, Japan and other countries have successively developed PMSM traction driven systems. Recently the first high-speed train equipped with a permanent magnet traction system came off the assembly line in CSR Qingdao Sifang Co., Ltd. Permanent magnet synchronous traction systems have taken the lead as the future of rail traction drive development [4,5]. However, due to China's vast territory and large trains' operation span, permanent magnet synchronous traction systems are susceptible to the influence of the external environment that leads to fault risks, which could directly result in system torque performance deterioration and seriously affect the safe operation of trains. Therefore, it's very important to carry out research of online condition monitoring for permanent magnet synchronous traction motors to reduce the risk of faults.
A typical PMSM driven system requires at least two alternating-current sensors, and failure of either one or the two will lead to performance degradation [6], so increasing concerns about sensor faults have led some researchers to focus their efforts on developing sensor fault diagnosis methods. However, most of the previous studies focus on inverter faults or motor body faults [7][8][9][10][11][12][13][14][15], and hardly any research on sensor fault diagnosis of PMSM can be found. Current, position and dc-link voltage sensor fault diagnosis for a PMSM driven system are studied in [16], but its current sensor fault diagnosis method is offline. A nonlinear parity relation method for diagnosis of additive faults for virtual sensors for d-q axis currents is studied in [17]; it can identify the faults appearing in the phase current sensors through abnormal changes in the d-q axis currents, but this method cannot provide specific information about which phase current sensor is faulty. A fault diagnosis structure of position and phase current sensors faults of a PMSM driven system is studied in [18]; the method is based on two interconnected observers: an Extended Kalman Filter and a Model Reference Adaptive System observer. Current, position and dc-link voltage sensor fault diagnosis for a PMSM driven system based on an Extended Kalman Filter is studied in [6], but the performance based on the Extended Kalman Filter algorithm will deteriorate at low speed, will be affected to a certain extent by parameter changes and is not sensitive to slow-variation faults. An adaptive observer method for detection and isolation of abrupt gain faults and offset faults for phase current sensors is studied in [19,20], but they did not consider the slow-variation faults which are difficult to observe, and only give the fault residuals of αβ axis virtual current sensors, then detect the phase sensor faults through logical judgments, but this easily causes misjudgments because the threshold is set larger, and the motor model adopted by the tmethod has serious salient features which are inconvenient for the observation of PMSM status.
Therefore, on the basis of literature [19,20], a current sensor fault detection method is proposed for a torque closed-loop control system of an interior PMSM based on a sliding mode control method due to its good robustness to parameter perturbation, external disturbances and inaccurate mathematical models [21,22]. First a sliding mode observer based on the extended flux linkage is designed to simplify the motor model, which effectively eliminates the phenomenon of salient poles and the dependence of the direct axis inductance parameter, and can also be used for online calculation of feedback torque. Then a sliding mode current observer is constructed in αβ coordinates to generate fault residuals of the phase current sensors. The method can accurately identify abrupt gain faults and slow-variation offset faults in real-time. The RT-LAB real-time simulation is used to build a simulation model of the hardware in the loop. The simulation and experimental results demonstrate the feasibility and effectiveness of this method.

Mathematical Mode of the IPMSM
The voltage and flux equations for IPMSM in the rotating dq-reference frame are as follows [23]: In Equations (1) and (2), Rs is the stator resistance, Ld and Lq are the d and q axis stator inductances, ud and uq are the d and q axis stator voltages, id and iq are the d and q axis stator currents, ψr is the permanent magnet flux linkage, ψd and ψq are the d and q axis stator fluxes: ω is the electrical rotor speed, and D is the differential operator.
By using coordinate inversion, the voltage Equation (1) in the stationary reference αβ frame are transformed to be: where L1 = (Ld + Lq)/2; L2 = (Ld − Lq)/2; uα and uβ are the α and β axis stator voltages, iα and iβ are the α and β axis stator currents, θ is the electrical rotor angular position. Items with 2θ in Equation (3) show the salient features of IPMSM, and it is inconvenient for the observation of the PMSM status. In order to eliminate the salient pole phenomenon, the voltage Equation (1) can be rewritten as: where: is the extended flux linkage in the rotating dq-reference frame, the inductance matrix of Equation (4) is a symmetric matrix, and only contains Rs and Lq. By using coordinate inversion, the voltage Equation (4) in the stationary reference αβ frame are transformed to be: where uαβ is the voltage vector defined as uαβ = [uα uβ] T , iαβ is the current vector defined as uαβ = [uα uβ] T , iαβ is the current vector defined as iαβ = [iα iβ] T , ψext,αβ is the extended flux linkage vector in the stationary reference αβ frame and is given by: Equation (5) can be rewritten as: According to the Equation (6), Equation (8) can be obtained [24]: The electromagnetic torque equation can be described as: where J is the vector defined as , ψs is the stator flux linkage vector, np is the number of pole pairs.

SMO Design Based on Extended Flux Linkage
According to Equations (7) and (8), a state space representation can be described as follows [24]: where ψext,αβ is the state variable, y1 is the output vector. The sliding mode observer based on extended flux linkage is designed as: reaching law based on constant switching control is larger, in order to make the approach speed and the change of the state vector of the system associated in reaching the sliding mode switching surface movement phase, the absolute value of state error is used as switching control item in the observer to reduce the chattering and improve the dynamic response speed of the system. K|eext,αβ|sgn(eext,αβ) is designed as the sliding mode switching control function of the variable rate reaching law, K is the matrix of sliding mode gain defined as   , k1 > 0 and k2 > 0 are pending values. eext,αβ is the ) sgn (  )  sgn(   ,  ,  1  ,  ,  ,  2  ,  ,  ,  ,  ,  2   β  β  α  β  β  α  α  β  β  β   ω  ψ  ω  ωψ  ψ  ψ   ext  ext  ext  ext  ext  ext  ext  ext  ext  ext   e  e  k  e  e  e  k  e  s  −  −  = The design goal of the observer is to make the observation error converge to zero by selecting the appropriate k1 and k2.
Proof: Select a non-negative Lyapunov function which can be expressed as: According to Equations (12) and (13), then: Based on the Lyapunov stability theory, the designed sliding mode observer is proved to be asymptotically stable. After the state of the system reaches the sliding mode surface, eext,αβ = 0, then: According to Equations (10) and (16), an observation of the stator flux linkage based on the stator voltage model can be obtained as follows: Then put Equation (17) into Equation (9), an observation of the electromagnetic torque can be gotten as the following: Despite the observation of the extended flux linkage may be influenced by q axis inductance, the study found that the observed stator flux linkage through our scheme is not influenced by dq axis inductance. The stator flux linkage of Equation (17) both retained the robustness of the voltage model method, and overcame the pure integral problems of the voltage model method. Then the electromagnetic torque observation of Equation (18) is also not influenced by dq axis inductance and variation of the permanent magnet flux linkage, thus the accuracy of the torque observation can be ensured [24].

Fault Residual Generation Based on SMO
According to Equation (5), the state space model of PMSM can be rewritten as: where: Therefore the equation of motor model with the system uncertainties in the case of sensor fault can be described as follows: where: fs is the sensor fault vector of αβ axis stator current defined as fs is the unknown disturbances of system and is a bounded function.
Because the current iα and iβ are practically calculated from phase currents iabc. In the case of only two current sensors (assumed to be 'a' and 'b' phase), according to literatures [19,20]: The effects of the stator αβ axis current sensor fault fsα and fsβ are related to the errors in phase 'a' and 'b' current sensors outputs fa and fb as follows: where: v is the sliding mode correction control signal, and ρ > 0.
The state error equation can be described as: A non-negative Lyapunov function is given by: Then: Ae  e  d  e  e  Ae  e   Dd  e  e   e  D  e  Ae  e  d  v  D  e  Ae  e   d  v  D  Ae  e  e  d  v  D  Ae  e  e  e  e  V   T  T   T  T  T  T  T   T  T  T  T   )  (  2  2  2  2  2   2  2 Due to the fact A is a symmetric negative definite matrix and if we select ρ > 0, then 0 ≤ V  . Based on the Lyapunov stability theory, e converges to zero exponentially. When the unknown input disturbance d(x,u,t) is bounded, the sliding mode variable structure observer will generate a special sliding mode motion with the nonlinear discontinuous v. Therefore, the system with unknown input is robust on the sliding surface. If the unknown input satisfy the 'matching condition', then the invariance of these systems to uncertainties is much more robust than robustness [25].
rαβ(t) is the fault residual defined as: According to Equation (29): when no sensor faults occur, that is, fa = 0 and fb = 0，the residual signals ra = 0 and rb = 0. When fa ≠ 0, the residual signal ra = −fa. When fb ≠ 0, the residual signal rb = −fb. That is, when sensor faults occur, the residual signal jumps to negative sensor fault value, the residual deviates from the zero values. The fault diagnosis decision rules are described in Table 1, Where: '1' represents ri ≠ 0, '0' represents ri = 0.

Simulations and Analysis
In this section, simulation results are given based on a sliding mode observer for phase current sensor fault diagnosis. General structure of the simulation setup is shown in Figure 1. In this diagram, the PMSM is controlled by a SVPWM Voltage Source Inverter using a torque closed-loop control strategy and control scheme of i * d = 0. The parameters of the interior PMSM in this simulation are listed in Table 2. The reference rotor speed and torque are set at 200 rad/s and 500 Nm, respectively. It is assumed that the unknown input disturbance d of the system is a random noise, which maximum value is 10 and minimum value is −10.
To weaken the chattering of the status variable motion trajectory, the successive approximation function can be used instead of the sign function sgn(·) in the simulation. Three cases are discussed:

(1) No fault condition
To evaluate the robustness of the designed SMO, the stator resistance is changed from 0.02 Ω to 0.04 Ω at t = 0.2 s, and the torque is changed from 500 Nm to 1000 Nm at 0.3 s. The observation of extended flux linkage is shown in Figure 2. It is insensitive to the variation of stator resistance and torque. The torque calculation value which is obtained by the extend flux linkage is shown in Figure 3. The phase currents are shown in Figure 4, the actual value and the observation of the stator α and β axis currents are shown in Figures 5 and 6, the amplitude of the current is correspondingly larger due to the increase of the torque at t = 0.2 s, the phase current and the stator αβ axis currents are insensitive to the stator resistance variation, and the system has good robustness, the observation of stator αβ axis currents can rapidly track the actual value with high precision. The current residuals in phase 'a' and in phase 'b' are respectively shown in Figures 7 and 8. Furthermore, in order to illustrate the function of sliding mode observer, we introduce signal v at t = 0.1 s.         From Figures 7 and 8, residual is larger when t < 0.1 s since the random noise is introduced as the unknown input signal. Then, we must select a larger failure-detection threshold, which may eliminate the detection sensitivity for glitches. However, if t > 0.1 s, the disturbance cannot influence the residual since v is introduced. Thus, the residual approximates zero, and it is easy to detect the small amplitude faults.  That is, a negative 0.5 times abrupt gain error is applied to the phase 'b' current sensor at t = 0.1 s. The torque is changed from 500 Nm to 1000 Nm at 0.3 s. The observation of extended flux linkage and the torque calculation value are respectively shown in Figures 9 and 10. The phase currents, the actual value and the observation of the stator α and β axis currents are shown in Figures 11-13, respectively. The current residuals in phase 'a' and in phase 'b' are respectively shown in Figures 14 and 15. As shown in the following figures, when an abrupt gain fault is imposed, the amplitude of the extended flux linkage increases slightly, the abrupt gain sensor fault produces electromagnetic torque equiamplitude oscillation, the originally balanced current becomes unbalanced, the amplitude of the current in phase 'a' and phase 'c' increases, the measured current in the b-phase current sensor decreases.   When the torque increases, the amplitude of the current increases at 0.3 s. To the actual value, the observation of the stator β axis current decreases, the residual ra is closed to zero and the residual rb is deviated from zero. This suggests that there is no fault on phase 'a' current sensor and the faulty phase 'b' current sensor is identified.
(3) Abrupt offset fault on phase b current sensor and slow-variation offset fault on phase a current sensor The sensor fault equations can be described as: That is, the current sensor faults are built by adding abrupt offset current of amplitude fb = −30 to the phase 'b' current sensor at t = 0.1 s and slow-variation offset current of amplitude fa = −1.5e 7t to the phase 'a' current sensor at t = 0.

Hardware-In-The-Loop Experiment and Its Results
To verify the fault diagnosis algorithm based on sliding mode observer, a real-time RT-LAB hardware-in-the-loop system was built and is shown in Figure 23; the RT-LAB platform is shown in Figure 24. It contains a TMS320F2812 DSP controller and RT-LAB OP5600 real-time simulation model (inverter and PMSM). The models of control object (inverter and PMSM) are compiled and then downloaded into the OP5600, and the designed controller model is converted into 'C' code and then downloaded into the DSP controller. The analog output signals, such as current signal and position signal of the motor, are collected and then converted to signals with the amplitude of ±10 V, after this, completing the corresponding control algorithm, while six-channel PWM pulses are exported and then sent to the real-time simulation model, the hardware-in-the-loop system of PMSM can be achieved. In this system, the PWM carrier frequency is set at 5 KHz, and the sampling period is set at 20 μs，the parameters of the interior PMSM are listed in Table 2     (a) (torque: 500 Nm/div; residual: 30 A/div; t: 50 ms/div); (b) (current: 150 A/div; t: 50 ms/div); (c) (current: 75 A/div; t: 50 ms/div).
The zooms of experimental electromagnetic torque response, residuals, actual and observing stator currents responses, phase currents responses when no fault is applied to the phase current sensors are shown in Figure 25, respectively. The zooms of experimental electromagnetic torque response, residuals, actual and observing stator currents responses, phase currents responses when an abrupt gain fault is applied to the phase 'b' current sensor are shown in Figure 26, respectively. The zooms of experimental electromagnetic torque response, residuals, actual and observing stator currents responses, phase currents responses when an abrupt offset fault and a slow-variation offset fault are applied to the phase 'b' and phase 'a' currents sensors are shown in Figure 27, respectively. By comparing the simulation results and experimental waveforms under different circumstances, the designed observer can accurately identify the stator currents, effectively identify the faulty sensor for abrupt gain fault and slow-variation offset fault, and is robust to motor parameter changes. The observer structure is concise, and the system has good dynamic performance and high real-time performance.

Conclusions
An efficient current sensor fault diagnosis algorithm has been presented for the torque closed-loop control system of an interior PMSM using a double observer. First, a sliding mode observer based on the extended flux linkage is designed. It can simplify the motor model, eliminate the salient pole phenomenon and the direct axis inductance dependence, and is used for real-time calculation of the feedback torque. Then a sliding mode current observer is designed in αβ coordinates to generate fault residuals. With the essential feature of sliding mode variable structure technology, being completely insensitive to unknown input disturbances, the generated residuals of the designed fault detection system are not affected by the unknown input, but still maintain high sensitivity to the fault signals. The RT-LAB real-time simulation is used to build a simulation model of hardware in the loop, and the simulation and experimental results show that the method can efficiently identify faulty sensors with abrupt gain faults and slow-variation offset faults. The feasibility and effectiveness of the proposed method are demonstrated. Further research work is being carried out to design a fault tolerant control algorithm to preserve the performance for a faulty PMSM.