Comparative Analysis Between Unscented and Extended Kalman Filters for PMSG Inter-Turn Fault Detection*

This paper investigates the detection of inter-turn phase faults in Permanent Magnet Synchronous Generators (PMSGs) using the Unscented Kalman Filter (UKF) compared to the Extended Kalman Filter (EKF). PMSGs are subject to several faults such as bearing, eccentricity, demagnetization, short circuit, and inter-turn faults. Accurate and early detection of the fault type is crucial for robust operation. Several techniques can detect these faults. UKF and EKF are presented here as one of the model-based fault diagnosis techniques. In the presented simulation, a comparison between the UKF and EKF estimation response of the fault has been shown. Both techniques have provided the ability to detect the inter-turn fault with the proposed PMSG fault model. However, the difference between the estimation response accuracy and speed plays an important role to decide the most effective technique.


I. INTRODUCTION
Permanent Magnet Synchronous Motors (PMSMs) and Generators (PMSGs) have high efficiency, high power density, rigid structure, and mature control systems making them a valuable choice for modern industrial applications and renewable energy applications [1], [2]. Wind turbines, wave energy, tidal energy, and marine shaft generator system applications depend heavily on PMSG [3]- [5]. Also, PMSMs have been used in different applications such as propulsion systems [6], electric vehicles [7], and starter generators [8].
As with most electrical machines, PMSGs suffer from the possibility of faults that affect the reliability of the system operation. Faults in PMSG are divided into three types: Mechanical faults [9]- [11], electrical faults [12], and demagnetization faults [1]. Based on [14] and [15], mechanical faults represent almost 50% of the total faults. Also, stator electrical faults represent about 30 % to 40 % of the total faults in the machines [16]. One of the stator faults that cannot be detected by conventional protection devices is the stator interturn fault. Particularly in the case of PMSG, the fault current circulates inside the machine without a major disruption to the output load current. Therefore, it can cause mechanical and electrical unbalances. This research focuses on the fault detection of the PMSG stator inter-turn fault because it shapes more than a third of the total faults in the PMSG. Detection of the stator inter-turn fault can be performed using several fault detection techniques. These techniques are divided into three types: signal-based techniques, knowledge-based techniques, and model-based techniques [15]. Signal-based techniques detect the fault symptoms by analysing the measured signal such as voltage, current, speed, etc. Signal-based techniques have the advantage of easy determination of the fault as they do not require a specific mathematical model of the system. However, they suffer from inaccuracy and time delay resulting from analysing the set of the measured data. The Wavelet Transform [13], [17], and Hilbert-Hang Transform [18] have been used to analyse the voltage and current signals on detecting the stator inter-turn fault. Knowledge-based techniques such as Neural Network [19], Fuzzy logic [20], and Particle Swarm Optimization [21] can be also used to detect the stator inter-turn fault and give acceptable results. However, they require a set of previously measured data for the fault for the initial tuning process which may not exist in some cases.
The model-based techniques are the best fault detection techniques when the fault model is priory provided. In [22], the state-space model in the presence of stator inter-turn fault of PMSG was presented and the Extended Kalman Filter (EKF) technique was used for fault detection. Also, the Recursive Least Square method for fault detection was introduced in [23]. These techniques offer a fast-dynamic response for fault detection resulting in fast action. However, if the system is highly non-linear, they cannot give a precise estimation value for the estimated parameters in all operating points. In [24], a comparison between the EKF and the UKF techniques is introduced in estimating the stator inter-turn fault in the PMSG. This paper will concentrate on studying the difference between UKF and EKF as model-based fault detection algorithms for the detection of stator inter-turn faults in the PMSG considering the measurement' noise, in contrast to the free noise case in [24].
The rest of the paper is organised as follows: Section II presents the faulty model of the PMSG. The EKF and UKF equations are introduced in Section III. A discussion for the simulation results of the studied algorithms is presented in Section IV followed by the conclusion in Section V.

II. FAULTY PMSG STATE SPACE MODEL
The faulty model of PMSG based on the dq-frame was presented in [22]. The presence of the inter-turn fault is represented as an added impedance / in the PMSG circuit model. Thus, the current is partially deflected requiring the addition of another term to the stator voltage equations, depending on the fault's location. The general equations for stator voltage in case of the fault can be expressed as follows: and represent the output voltage and the current of the machine in the dq-frame, is the electrical angular velocity, Rs is the stator winding resistance, and are the machine inductance in the dq-frame, is the stator rotor flux and is the derivative operator.
In the normal situation, the internal current is equal to the output current . Therefore, the short circuit current appears in the equation / due to the existence of an internal short circuit at any of the machine phases as shown in Fig. 1. The fault impedance value is relative to the short circuit turns ratio at any phase ⁄ and phase location angle θ / . The machine equations state-space model can be expressed as: where

III. FAULT DIAGNOSIS PROCEDURES
The UKF is a modified version of the EKF where the time and measurement matrices are updated in the mathematical state-space model. In both UKF and EKF, the state-space model could be extended by the estimated parameters , if the estimated parameters are not included in the model states.

a) Model Extension and Discretization
The faulty PMSG state-space model after extending the states is written as: where / , / and / represent the estimated parameters ( ) for detecting the percentage and the location of the fault. The model can be discretized using the first-order Taylor expansion at a sampling time , for the discrete recursive process of the UKF. The discretized model is defined as: where The EKF is an optimal estimator that works recursively to estimate the parameters that it is hard to measure in nonlinear systems [24]. The first step in the EKF technique is linearizing the state-space model matrices using the Jacobian linearization as mentioned in the following equation: F represents the linearized state equation and H represents the output equation of the system. In this framework, the equations of the EKF can be divided into two groups: the prediction phase and the correction phase. The prediction phase calculates the value of the estimated parameters X based on the initial values of the error covariance matrix P , and weighing matrices Q and R as presented in the following equations: After that, the new estimated states | and covariance matrix P | are calculated based on the Kalman gain K in the correction phase such as: The process continues recursively returning to the prediction phase for the calculation of the estimated parameter for the next sample.

c) Unscented Kalman Filter
The UKF works with the concept of calculating the sigma point instead of using the Jacobian matrix for linearizing the non-linear model as in EKF [25]. The first step is the initialization of the parameters based on the initial values of the states and the covariance matrix P such as [26]: where is the state's dimension and = ( + ) − , is tuned to be equal to 1, and is set to zero. The second step is calculating the sigma points of the states X based on (13) and expressed as: = ∑ X , | where and are weighting factors and they are equal to 1 2( + ) ⁄ . As in EKF, the prediction phase is the next step for calculating the new covariance matrix P , expressed as: Finally, the measurement update equations where the Kalman gain was calculated for the correction of the next state estimation and covariance matrix P , is expressed as: where P and P represent the covariance of the posterior sigma points of and and expressed as:

d) Tuning of the Covariance Matrix
The tuning of the weighing matrices Q and R is very important for the UKF and EKF estimation response. They affect the speed and accuracy of the estimated parameter. Based on [27], Q and R matrices are expressed as: where m and n are the states and the estimated parameter vectors dimensions, and are the noise variance of the input and output signals [2]. The ratio q λ q x ⁄ should be tuned to fulfil the suitable dynamic response required for the estimation of the parameters and it is equal to: where τ is the evaluation time constant. It is a factor that can be used to set the value of q λ q x ⁄ . Applying (30) to (31), the Q and R are calculated and used for the estimated parameters / , / , / to achieve the required suitable response in different operating conditions. The online fault detection monitoring block diagram for the PMSG based on UKF and EKF techniques is illustrated in Fig. 2.

a) UKF and EKF Estimation Response in the Noise-free Case
The machine was first simulated in a healthy state with a load current of 0.75 A (RMS) and an operating frequency of 30 Hz. At t = 0.5 Sec, a stator inter-turn fault was implemented in the PMSG equations causing a change in the total internal current of the machine. The estimated internal current in the healthy and faulty states of short circuit turns ratio varies from 5 % to 20 % are shown in Fig. 3. The estimated RMS value of the internal current reaches 1.9 A in the case of / = 5 %, which is 2.5 times the load current at the normal operation.
After that, the current reached 5.3 A at 20 % short circuit turns ratio. It is 7 times the healthy state current value.    Although the 20 % inter-turn fault increases the circulating current inside the machine 7 times the normal value, this translates to a 15.26 % increase to the instantaneous output phase current by 0.17A as illustrated in Fig. 4. Therefore, this might be undetected by the traditional protective devices. Consequently, the temperature of the machine will increase leading to other faults or a complete failure of the machine.
In Fig. 5, the estimated short circuit turns ratio for phase A using UKF and EKF is shown for the imposed fault. The UKF shows an accurate estimation for all proposed fault values with unnoticeable error with fast estimation response compared to the required time for the fast isolation. It reached the steady-state after 0.03 Sec at τ = 5 mSec, which is slightly less than one cycle of 30 Hz. Besides, both techniques were evaluated at different values of / as listed in  (31), changing the value of τ is followed by a change in the value of the Q matrix. The increase in τ is followed by decreasing the estimation time response. However, a better filtering effect on the estimated parameter is observed. The estimation response for the UKF based on different values of τ is shown in Fig. 6.

b) UKF and EKF Estimation Response in the Case of Measurement Noise
A measurement noise of 0.3 variance value is added to simulate the input signal to the state-space model. Fig. 7 shows the load current of phase A after adding noise. The Current (A) estimation response in both techniques was affected by the imposed noise as shown in Fig. 8. Consequently, the estimation error increases with the increase of the added noise. For this purpose, the evaluation time constant τ of the estimated parameter should be tuned to give an acceptable estimation response. Fig. 9 shows the relation between the UKF estimation response error and the / at various values of τ. The increase in the value of τ provides less estimation error, especially at the lower values of / . However, the increase in the τ value is followed by a slower response in the parameter estimation. Similarly, Fig. 10 presents the relation between the EKF estimation response error and the value of / at different values of τ. In general, the EKF estimation response has more errors than UKF as stated in the previous section. This makes the variation in the estimated error with changing τ value is very small.    a) The estimated internal current.
b) The estimated short circuit turns ratio. Fig. 11. The UKF estimation response with the load change from 0.75 A to 3 A.
a) The estimated internal current.
b) The estimated short circuit turns ratio. Fig. 12. The UKF estimation response with the frequency change from 20 Hz to 50 Hz.

c) UKF Estimation Response with Frequency and Load Change
In this case, the noise-free condition is considered. Fig.  11b shows the UKF estimation response for the / in phase A with a step change of the load current of 0.75 A every 1 sec at a constant frequency of 30 Hz as shown in Fig. 11a. The UKF technique shows a constant estimation response with the  S/C turns ratio (%) load change at different / values. The same response was noticed through the frequency change condition in Fig. 12b. The frequency was changed from 20 Hz to 50 Hz by a step of 10 Hz every 1 Sec at a constant load of 0.75 A as shown in Fig. 12a.

V. CONCLUSION
The paper has presented a fault detection system for PMSG stator inter-turn fault using the UKF and EKF techniques in the presence of the measurement's noise. The model of the faulty machine was introduced as a part of the estimation parameters procedure. Certain PMSG machine parameters have been used to simulate the performance of both techniques. The results have shown an accurate and fast estimation in the case of the UKF technique. Under the same assumptions, the EKF technique presented a higher estimation error. It increased proportionally with the increase of the short circuit fault ratio. Besides, the UKF technique has provided a robust estimation with various fault values at different operating load current and frequency. Also, studying the estimation time response with the change of the evaluation time constant of the fault has illustrated the direct relation between them. The practical implementation of the proposed results will be considered in future work.