Kalman Filtering Applied to Induction Motor State Estimation

This chapter presents a full definition and explanation of Kalman filtering theory, precisely the filter stochastic algorithm. After the definition, a concrete example of application is explained. The simulated example concerns an extended Kalman filter applied to machine state and speed estimation. A full observation of an induction motor state variables and mechanical speed will be presented and discussed in details. A comparison between extended Kalman filtering and adaptive Luenberger state observation will be highlighted and discussed in detail with many figures. In conclusion, the chapter is ended by listing the Kalman filtering main advantages and recent advances in the scientific literature.


Introduction
Kalman filtering is an algorithm that employs a series of observations over time, containing noise and other inaccuracies, and generates approximations of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe, as in [1].
The Kalman filter is a state observer which detects the presence of measurement noises as well as uncertainties about an unknown dynamic state system, this system is generally assimilated to state noise by stochastic algorithms tending to minimise the variance of the estimation error, as described in [2].
The Kalman filter is suitable for recursive linear filtering of discrete data. It provides an estimation of a state vector or a parameter and its error covariance and variance matrix that contain information about the accuracy of its state variables, as in [3]. The natural presence of noise when an induction machine is driven by an inverter represents a strong argument for the choice of this kind of observers. Its characteristics will relate to the observation of the speed and the components of the rotor fluxes. The only needed measurements are the stator currents. Some state variables will be provided directly by the control law. Thus, the stator voltages will be considered as inputs for the filter. Table 1 shows a technical comparison between the adaptive observer and the stochastic filter.

Induction motor parts, features and mathematical model 2.1 Induction motor parts and features
Induction motors are the most commonly used electrical machines, they are cheaper, rugged and easier to maintain compared to other alternatives. It has two main parts: stator and rotor, stator is a stationary part and rotor is the rotating part. Stator is made by stacking thin slotted highly permeable steel lamination inside a steel or cast iron frame, winding passes through slots of stator. When a three phase AC current passes through it, something very interesting happens. It produces a rotating magnetic field, the speed of rotation of a magnetic field is known as synchronous speed.
It is called an induction motor because electricity is inducted in rotor by magnetic induction rather than direct electric connection. To collapse such electric magnetic induction, to aid such electromagnetic induction, insulated iron core lamina are packed inside the rotor, such small slices of iron make sure that Eddy current losses are minimal. And this is another big advantage of three phase induction motors.
The parts of a squirrel cage induction motor are shown in Figure 1.

Induction motor mathematical model
The induction motor has many state space mathematical models; each model is expressed by assuming a certain state vector. The modelling of AC machines is based mainly on the work of G. Kron, who gave birth to the concept of generalised machine as described in [4]. Park's model is a special case of this concept. It is often used for the synthesis of control laws and estimators. Described by a non-linear algebradifferential system, Park's model reflects the dynamic behaviour of the electrical and electromagnetic modes of the asynchronous machine. It admits several classes of state  representations. These model classes depend directly on the control objectives (torque, speed, position), the nature of the power source of the work repository and the choice of state vector components (flux or currents, stator or rotor). In this chapter, the mathematical model of the machine in use is described in the stator fixed reference frame (α, β) (stationary frame) by assuming the stator currents and the rotor fluxes as state variables: Where X, U and Y are the state vector, the input vector and the output vector, respectively: With: The rotor motion is expressed by: Where J is the motor inertia, T em is the electromagnetic torque, T L is the load torque, and f is the friction coefficient. Figure 2 shows the state space mathematical model of an induction motor.

Standard Kalman filter
In this chapter, the process to be observed is an induction motor. Its state is composed of stator currents and rotor fluxes in α-β reference frame, the motor model and its components are shown in Figure 3. The motor model is defined by a discrete time linear state model composed of two additional terms for taking into account discrete state noise W k and discrete state measurement V k .
The addition of noise is necessary, since the noise-free equations (deterministic model) define an ideal system. A more realistic model (stochastic model) is obtained by adding the noise vectors. Some assumptions are made about discrete noises: they are white, Gaussian, their average is zero and they are correlated neither with each other nor with the state variables. These properties derive the following equations: E represents the expectation value operator. The implementation of the Kalman filter algorithm requires two phases, the first one is a prediction phase which consists in determining the prediction vector X kþ1|k from the process state equations and also the previous values of the estimated states X k|k at time k. In addition, the predicted state covariance matrix P is also obtained before the new measurements are made, for this purpose the mathematical model and also the covariance matrix Q of the system are used.
The second phase then consists of the correction. It consists in correcting the prediction vector by the measurement vector by adding a correction term K Á  Y ÀŶ À Á to the predicted states X kþ1|k obtained in the first phase. This correction term is a weighted difference between the actual output vector Y and the predicted output vectorŶ. Thus, the predicted state estimate and also its covariance matrix are corrected by a feedback correction system to obtain the estimate of the state vector X kþ1|k at the present moment k þ 1. Figure 4 below shows the principle of the standard Kalman filter.
Where K denotes the gain matrix of the Kalman filter, P is the estimation error covariance matrix, Q and R are, respectively, the covariance matrices of the state and the measurement noises. The gain matrix K is chosen so as to minimise the variance of the estimation error. This minimization will focus on the diagonal elements of the estimation matrix. Thus, the Kalman filter algorithm uses on one hand the knowledge of the process to predict the state vector, and on other hand the actual measurements to correct the predicted vector. The standard Kalman filter previously described allows estimation of the state of a linear system. If we want to estimate an additional parameter outside the state vector, as the rotational speed of an induction motor, one solution is to extend the estimated state vector to the speed of rotation. The model then becomes non-linear and in this case, the extended Kalman filter is required.

The extended Kalman filter
The extended Kalman filter performs an estimation of the state of a non-linear process. It allows in particular to add, to the state vector, another variable that we wish to estimate. This filter is widely used for estimating the various quantities of the induction machine, such as: rotor speed, load torque, electrical and mechanical parameters. Given that the extended Kalman filter is only the application of the standard Kalman filter previously described in the case of a non-linear system, it is then necessary to perform a linearization of this system at each step around the operating point defined in the previous step. Let the non-linear model of the system to be observed defined by the following equation of state: Such as: Where f and h are non-linear functions, X e k designates the extended state vector, X k and Θ k are considered, respectively, as the main state vector and the parameter vector (composed of parameters and unknown inputs to be estimated). These parameters vary very little with respect to other quantities, for that reason we put Θ kþ1 ¼ Θ k . The following discrete augmented state model is constructed: A d , B d and C d are, respectively, the state, the input and the discrete output matrices. I is the identity matrix.
The implementation of the extended Kalman filter algorithm to the discrete nonlinear system requires the execution of the following steps: • Initialization of the states X 0|0 , the parameters Θ 0|0 and the covariance matrices P 0|0 , Q and R • Prediction of the states and the parameters • Prediction of error covariance matrix F k is the gradient matrix defined as follows: • Calculation of Kalman gain H k is the gradient matrix defined as follows: • Estimation of the states and the parameters • Estimate of the error covariance matrix • Update matrices at instant k ¼ k þ 1

Induction machine extended model
The continuous model of the induction machine extended to the electrical rotational speed is represented by a non-linear system of state equations: In which: (29)

Discretization of the continuous model
The previous model of the induction machine must be discretized for the implementation of the extended Kalman filter. If quasi-constant control voltages are assumed over a sampling period T s as in [5], the discrete augmented state model can be approximated by: The matrices of this model are obtained by a limited development in Taylor series of order one: This leads to: (32)

Implementation of the extended Kalman filter to the induction machine discrete system
The application of the extended Kalman filter to the discrete system of the induction machine, taking into account the presence of state noise W k and measurement noise V k . This leads to the following expressions: With: Similarly, the linearization matrix H k is written as follows: In the determination of the initial covariance matrix P 0|0 , it is generally limited to the choice of elements on the diagonal. These elements are chosen in such a way that they correspond to the uncertainty about estimates of initial state variables.

Choice of covariance matrices Q and R
It is via these matrices that the various measured, predicted and estimated states will pass. Their goals are to minimise the errors associated with approximate modelling and the presence of noise on the measurements. This is the most difficult point of applying the Kalman filter to observation. The matrix Q linked to the noises tainting the state, allows adjusting the estimated quality of the modelling and discretization. A strong value of Q gives a high value of the gain K stimulating the importance of the modelling and the dynamics of the filter. A high value of Q can, however, create an instability of the observation. The matrix R regulates the weight of the measurements. A high value indicates a great uncertainty of the measurement. On the other hand, a low value makes it possible to give a significant weight to the measurement.

The reference recursive recipe (RRR) method for the EKF
We can consider the choice of the Kalman filter calibration matrices Q and R, as well as the initial values of the estimated state vector X e 0|0 and the matrix P 0|0 , as degrees of freedom of the Kalman filter. The following steps explain the recursive or iterative RRR algorithm for the EKF [6]: • Given the system model and the measurements, the first filter pass through the data of EKF is carried out using guess values of X e 0|0 , P 0|0 , Θ, R and Q.
• The RTS smoother is used backwards to get smoothed state and covariance estimates.
• If X e 0|0 is unknown, then the smoothed state values can be used as the initial state values.
• The estimated smoothed P 0|0 is scaled up by the number of time points N and further all elements except the diagonal terms corresponding to the parameters are set to zero. Due to the effect of statistical percolation effect, the estimated R and Q will in general be full. But, only the diagonal terms in Q need to be used in the basic state equations and not in the parameter states. Only the diagonal terms in R need to be used in the measurement equations. These are summarised as below. The quadrant on the upper left denotes the state, the bottom right the parameter states, and the others the cross terms. • Then, the filter is run again using the above updates of X e 0|0 , P 0|0 , Θ, Q and R till statistical equilibrium is reached. Figure 5 illustrates the state space mathematical model of the observer.

Simulation results
In this section, an extended Kalman filter is implemented in an induction motor vector control scheme. The EKF is designed to observe the motor states: the d-q stator phase current components i ds , i qs , the d-q rotor flux components ϕ dr , ϕ qr and the mechanical speed ω r . The control law and the observer are implemented in MatLab/Simulink software. A load torque of +10 N Á m is applied at t 1 =0:6s and removed at t 2 =1:6s in order to show the system robustness against the external perturbation. Table A1 lists the parameters of the machine used in simulation.
The torque reference T * em is generated by the speed controller, while the stator voltage references V * ds and V * qs are generated by the stator current controllers.
The observed speedΩ r and rotor fluxφ r are served for speed and flux regulators [7,8]. The coordinate transformation generates the abc components needed by the PWM modulator. The slip frequency is delivered by an integrator, this slip is the most important parameter for the indirect vector schemes. it depends on the observed rotor flux generated by the EKF observer. Figures 6-19 illustrate a performance comparison between the two observers: EKF in the left and ALO in the right. Figure 7 shows the speed response according to the step speed reference of +100 rad=s. Both observers show good dynamic at starting up and the speed regulation loop rejects the applied load disturbance quickly. The two observers kept the same fast speed response since the same PI speed controller is used for both speed loops, there is no difference in the transient response. The system response time is very quick and does not exceed 0:2s, the sufficient time to achieve the permanent regime. Figure 8 shows the rotor flux response, it achieves the reference which is 1 Wb very quickly. Even the step speed reference starts at 0:2 s, the rotor flux response is independent to the speed application. It must reach the reference very rapidly at the starting up. Then, Figure 9 shows the torque responses with the load application. At           the beginning, the speed controller operates the system at the physical limit since the step reference is the hardest for most control processes.
Until now, no apparent difference in the performance of the two observers, Figures 11-19 will reveal this difference. Figures 11 and 12 illustrate, respectively, the observed stator current components i ds and i qs . We can notice clearly the   superiority of the EKF, no fluctuations seen around the reference. EKF uses a series of measurements containing noise and other inaccuracies contrary to ALO that employs only free noise measurements. Figures 13 and 14 illustrate, respectively, the observed rotor flux components ϕ dr and ϕ qr . No fluctuations seen around the reference for both observers, only a small static error of observation. Finally, Figures 15-19 illustrate the static error of all the observed components: the machine state parameters, the rotor flux and the mechanical speed.
All the quantities observed by the EKF are filtered and precise, the EKF is a very good observer for the systems that present any kind of noise. It will exploit the noise in order to estimate the quantity. The process of observation of the EKF is given in two stages, prediction and filtering. The prediction stage is aimed to obtain the next predicted states and predicted state-error covariance, while in the filtering stage, the next estimated states is obtained as the sum of the next predicted states and a correction term.

Conclusions
All the closed-loop observers are classified as deterministic observers, they can be easily corrupted by measuring noise and require parameter adaptation algorithms. The Kalman filter observer has high convergence rate and good disturbance rejection, which can take into account the model uncertainties, random disturbances, computational inaccuracies and measurement errors. These properties are the advantages of extended Kalman filters over other estimation methods. For these reasons, it had wide application in sensorless control in spite of its computational complexity. For non-linear problems Kalman filtering can overcome this difficulty by using a linearized approximation, where, the stochastic continuous time system must be expressed in the discrete form in order to fit with the structure of the EKF. The process of observation of the EKF is given in two stages, prediction and filtering. The prediction stage is aimed to obtain the next predicted states and predicted state-error covariance, while in the filtering stage, the next estimated states is obtained as the sum of the next predicted states and a correction term.
However, the high degree of complexity of EKF structure and the high system orders cause a higher computational requirement (the sampling time). Thus, additional challenges and problems are introduced, such as the reduction of dynamic performance and the increase of harmonics. Nevertheless, the development of new processors technology (DSPs and FPGA) solves this problem due to the powerful calculations processing.
Recently, different works have been conducted to improve the effectiveness and the performance of the sensorless EKF for IM drive control. A bi-input EKF estimator, which deals with the estimation of the whole state of the machine together with stator and rotor resistances is presented. Another multi-model EKFs are proposed in order to improve EKF performance under different noise conditions. Then, a Kalman filter estimator has been designed for DTC controlled induction motor drives.