Fixed point implementation of Kalman filtering for AC drives : a case study using TMS 320 F 24 x DSP

The real-time digital implementation of the Kalman filter requires a very fast signal processor specialised and optimised to perform complex mathematical calculations and manipulate a large amount of data. In fact, the algorithm is computationally intensive, and all of the steps involved require vector and/or matrix operation. In this paper the analysis of an actual fixed point implementation of the Kalman filter is discussed based on a last generation μC DSP (TMS320F240). The considered case study refers to rotor speed and position estimation in AC drives when using low resolution position transducers. It is shown that the adopted processor is suitable for an efficient and relatively simple implementation of the filter allowing to increase the resolution in speed calculation with respect to the classical differentiation solution. Introduction As known, the Kalman filter is an optimal recursive algorithm which provides the minimum variance state estimation for a time-varying linear system. It is able to tolerate system modelling and measurement errors, which are considered as noise processes in the state estimation. It processes all available measurements regardless of their precision, to provide a quick and accurate estimate of the variables of interest, also achieving a fast convergence. Its extension to non-linear systems, the Extended Kalman Filter (EKF), does not assure the minimum variance estimate and no convergence proof can be given. Nevertheless, the approach behaves well in most situations, as demonstrated by numerous applications (e.g. [1][2]). For a straightforward application of this algorithm, the non-linear discrete-time state equations of the system are written in the following form: ( ) ( ) k k k k k k k k , , , , v u x h y w u x f x + = + = + k k 1 R vv í Q ww w T T = = = = ) E( ) cov( ) E( ) cov( (1) where xk is the system state vector, yk is the system output, uk is the system input, wk and vk are zeromean white Gaussian additive noises with covariance Q and R, respectively (independent from the system state xk). The vector wk takes into account the system disturbances and model inaccuracies, while v represents the measurement noise. A block diagram of the EKF for the system (1) is given in Fig. 1 together with the list of the steps of a recursive implementation [3]. The filter provides a first estimate of x ( x ~ , prediction) based on the model equations supposing that the model noise is zero. Then the measurements and noise models are used to generate the sub-optimal estimate x̂ . P ~ and P̂ are, respectively, the prediction and the estimation error covariance matrices. In the following sections a brief review of the basic applications of the EKF to the estimation of the state variables of electrical drives is reported. I) ) , ~ ( ~ ) , ˆ ( ~ u x h y u x f = x = x x x x f F ˆ ) ( = ∂ ∂ = x x x x h H ˆ ) ( = ∂ ∂ = II) Q F P F P + = T ˆ ~ III) [ ] 1 T T ~ ~ − + = R H P H H P K IV) ) ~ ( ~ ˆ y y K x = x − + V) P KH P P ~ ~ ˆ − = y x̂ u