On FPGA Implementation of a Continuous-Discrete Time Observer for Sensorless Induction Machine using Simulink HDL Coder

This paper deals with the design of a continuousdiscrete time high gain observer (CDHGO) for sensorless control of an induction machine (IM). Only two weakly sampled stator current measurements are used to achieve a real-time estimation of the rotor flux, the mechanical speed and the load torque. The feasibility of implementing our algorithm on the FPGA target is discussed in term of the best word format choice for internal variables and in term of making up for problems attached with complex bloc diagram VHDL conversion. Before an eventual implementation on the Virtex FPGA board, a validation of the proposed observer is performed through the ModelSim software where we show that the waveforms of estimates bring closer the true ones. Keywords—Hig gain observer; FPGA; HDL coder


I. INTRODUCTION
Due to their reliability, their low cost and their simple maintenance, induction motors (IM) remain the most used electric actuators in many industrial application (Hoisting cranes, roller conveyors, elevators, pumping...).In high performance IM drive systems, resolvers or encoders are usually required to determine the rotor position.Nonetheless, these sensors present several hindrances such as signal conditioning requirement, presence of noise measurement, increase of the installation cost and reduction of the total system robustness.To cope with such problem, many research efforts have been made in the last two decades to substitute the speed sensors by computational solutions.Therefore, the so called "speed sensorless control" is becoming standard solution in the area of induction machine drives despite of the persistent problems associated with it [1].
From only stator voltage and current measurements, different theoretical approaches of the nonlinear observers are exploited and experimentally carried out for providing an estimation of the mechanical speed, the rotor flux and the load torque.The extended Kalman filter (EKF) is one of the most famous algorithms used in speed sensorless IM drives and the lack of its theoretical justification is recently resolved under some assumptions in [2].After providing a convergence analysis in the mean square sense, the authors have validated experimentally the implementation of the EKF algorithm in the stochastic environment.The technique of sliding mode observer (SMO) is used in [3] for jointly recovering the rotor flux, the mechanical speed and the load torque.It is shown that the flux and speed estimations are sensible to the stator resistance.The model reference adaptive system (MRAS) scheme based sensorless indirect stator flux oriented controlled IM drive is more recently proposed in [4].The experimental results confirm that the estimated rotor speed converges to the real value despite of the large variations of the inertia moment.In [5], an adaptive backstepping observer (BO) for speed and rotor flux Backstepping control of IM drives is experimentally tested using the DSpace DS1104 board.The adaptation mechanism designed has contributed to reduce the sensitivity of the system performances against the abrupt change of the rotor constant time.The interconnected high gain observer (HGO) characterised by its simple implementation and its few number of design parameters have been applied in sensorless control IM in [6].The applicability of the designed observer has been showed through the experimental robustness tests w.r.t the parameters variations.
In the majority cases, the implementation of the previous nonlinear observer algorithms has been eventually achieved through two digital supports: The software solution (DSP and microcontrollers) and the hardware solutions (FPGA).If the use of the DSP (software digital controllers) present the feature of design flexibility, attractive cost and ability to implement complex tasks, such selection remains limited in some industrial drive applications because of their fixed internal architecture which leads to fully serialize the treatment.On the other hand, field programmable gate arrays (FPGAs) are showed by several recent research studies as good candidates to achieve high control performances in industrial control applications [7], [8], [9].Not only because that their specific architecture offers a significant integration density but also, due to the possibility to exploit the inherent algorithm parallelism.Such the feature can considerably reduce the execution time of the algorithm computing.
Among the solutions for fast prototyping high performance control algorithms, Simulink HDL (Hardware Description Language) Coder is a suitable software to generate HDL codes (VHDL or Verilog) from fixed point Simulink models [10].By exploiting its model blocks, users have to build the Simulink model with provided library to generate HDL codes which facilitate the implementation of complex control systems that require dedicated multipliers and computing units.
It is well-known that the digital implementation of nonlinear observers when using continuous-time measurements requires a fast sampling processes and large memory which may increase the cost and reduce the reliability.
In the contrast, using a relatively slow sampling process involves a degradation in the stability and the convergence properties of the state estimation error.By considering the availability of the output measurements only at the sampling instants, there have been several theoretical continuous-discrete nonlinear observer (CDNO) design approaches investigated in the last couple decades [11], [12], [13].However, there are almost no work for the hardware implementation of the CDNO and a correspondent detail.This paper deals with the feasibility study of a continuousdiscrete time observer implementation on the FPGA board.The objective is to provide an estimation of the induction machine states through only two sampled currents measurement.We attempt to alleviate the necessary computational time by increasing the sample time and after that cancelling the request of a very fast A\D converter and a high computation hardware.The remainder of the paper is organised as follows.
In the next section, we specify the class of nonlinear systems that correspond to the CDHGO design.In the third section, we detailed the induction machine model and the appropriate change of coordinates which allows reconstruct the IM state variables.We highlight in the fourth section our methodology and the steps to implement the underlying observer.Finally, the last section is devoted to illustrate some results obtained through ModelSim software.

II. CONTINUOUS-DISCRETE TIME OBSERVER DESIGN
We consider the nonlinear systems which are diffeomorphic to the following bloc triangular form [14].
Where, z ∈ R n is the whole state vector and z i ∈ R p for i ∈ [1, q].u(t) ∈ U a compact subset of R m and y ∈ R p denote respectively the input and output of the system.Output measurements are supposed available only at the sampling time with respect the following condition: The function ϕ(.) have a triangular structure and each ϕ i (.) for i ∈ [1, q] is globally Lipschitz with respect to z uniformly in u.The (t) signal is considered as an unknown function denoting the system uncertainties.
A3.The unknown function ε(t) is essentially bounded, i.e. ε(t) ≤?δ.The continuous-discrete observer that only uses the sampled time measurements is given by: with: θ is the sole synthesis parameter of the proposed observer.S is the explicit matrix solution of the algebraic Lyapunov equation: S + A T S + SA + C T C = 0. K 1 is the first element of the matrix K, where K ∈ R pqxp is the rectangular matrix gain which is chosen such that Theorem [14], [15] Consider the system (1) subject to assumptions A1, A2 and A3.Then, for every u ∈ U , for every θ > θ 0 , there exists χ θ > 0, N θ (τ m , τ M ) > 0 such that if the upper bound of the sampling partition diameter τ M is chosen with τ M < χ θ , then for every x(0) ∈ R n , we have: e(t) ≤ λθ q−1 e η θ t e(0) +N θ (τ m , τ M )δ with 0 < τ m < τ k = t k+1 − t k < τ M and e(t) = ẑ − z.More detailed proof for estimation error convergence is illustrated in [14].

III. OBSERVER SYNTHESIS OF THE IM MODEL
The induction machine model can be represented in the fixed reference frame attached to the stator by the following expression: where • u αs , u βs , I αs , I βs , Ψ αr and Ψ βr are respectively, the stator voltages, the stator currents and the rotor fluxes, • R s , R r are stator (resp.rotor) per-phase resistances, • L s , L r are stator (resp.rotor) per-phase inductances and M is the mutual inductance, • ω, T L , J and p denote respectively the mechanical speed, the load torque, the motor moment of inertia and the number of pairs of poles, • ε T L is an unknown real value.
The main goal consists in achieving the estimation of the state variables of the IM such as angular speed, rotor flux and the load torque.Only both sampled stator currents and the voltage supplies are used in the continuous-discrete HGO for reconstructing the state of the system.In such design, we assume that the stage operation of the IM is so far to unobservability neighbourhood (for more detail see observability analysis in [17]).We introduce the following notations: , where: So, the IM model can be written under the following standart form: with f (.) can be easily deduced from (3), B T 1 = [0 1×5 1] and ¯ (t) = T L .Now, in order to transform system (3) into the considered class (1), we propose the following Lipschitzian diffeomorphism: where Φ k for k = 1, 2, 3 are defined as follows: The time derivative of the above states allows us to have : The nonlinear functions b(.) and ϕ k (.) ∈ R 2 , k = 1, 2, 3 are defined as follows: Thereafter, the IM model ( 3) can be written in the form (1) as follows: So, we can adapt a continuous-discrete observer in the zcoordinate as given in (2).When, using the inverse transformation x = φ −1 (z) and considering the new variable r such as r = F (ω)Ψ, the observer can be re-written in the original coordinates as the following form: The flux estimate can be easily reconstructed from the expression of r i.e.Ψ = 1 K F (ω) −1 r.Now, the load torque estimation and its derivative is obtained by another HGO which is designed and placed in cascade according to (9):

IV. SIMULATION RESULTS
To highlight the performance of the CDHGO w.r.t to the CHGO, we compared the estimates of both algorithm with a weak sample time choice (T e = 5. 10 −3 s).The estimation results of the mechanical speed and load torque are illustrated in Fig. 1 whereas reconstruction of the stator currents and the rotor flux is given in Fig. 2. Note that the first curve of all figure legends represents the state variables of IM given by the underlying model.The second signals refers to continuous HGO (CHGO) algorithm where the third one results from the CDHGO routine.We recall that the sole measurements signals used in both observer algorithms (i.e. the stator currents) are only available at the sample instant.We can show that the CDHGO performs well the reconstruction of the output signal (Fig. 2 graph a and  b) whereas the current estimate waveforms is not perfectly sinusoidal in the case of CHGO.Such observation is also visible for the rotor flux estimation.In Fig. 1, whether for mechanical speed or load torque, we can remark that the CHGO presents many oscillations even in the steady state regime.In contrary, in spite of some overshoots showed at the transient, the application of CDHGO achieves a quite estimation of these inaccessible states.

V. IMPLEMENTATION METHODOLOGY AND VALIDATION
The evaluation of the proposed observer in such AC drive application is achieved using an experimental setup shown in Fig. 3.It consists of an induction machine supplied by a voltage source inverter (VSI) and it is associated with a load and an incremental encoder.The system works without a speed sensor, while only the inverter input voltage and output currents are measured.The VHDL code is generated with HDL coder from Matlab-Simulink.The specification of the word format for the observer design is directly tuning with the fixed point toolbox.It is worth noticing that some inversion module of the observer algorithm are replaced by lookup table method which can alleviate the computational time [16].The switching signals of the inverter are provided by the FPGA Virtex board.These PWM (pulse width modulation) control signals are generated by the triangular waveform modulator.Note that the frequency of triangular signal is constrained by the switching time of power switches accommodated in the three phases inverter.In our case, we have specified the PWM frequency at 2Khz.The two sampled stator current measurements are provided by the ADC (analogue digital converter) with 12-bit resolution.In order to perform experimentally the underlying continuoustime high gain observer, the implementation has required the development of several tasks.In the first step, we used the solver with the variable-step (ode45).In this case, all blocs such as the adder, the gain, the multiplier and so on are configured in the default way.It means that we adopted the double precision format to obtain acceptable results with low ripple and best accuracy.In the second step, we switched to the discrete solver.So, a particular attention has been taking in the choice of each couple (W, F ) 2 for all internal variables.Then, a VHDL file is generated using the HDL Coder Toolbox.Finally, in order to validate our observer design we have exploited the ModelSim software.At this stage, we have taking int account the size of the allowed resources that is indicated by the ISE software and this though and optimisation of the couple (W, F ).
The characteristics of the involved IM are given as follows:

VI. CONCLUSION
The FPGA implementation of a CDHGO with less knowledge as possible of output measurements is studied in this paper.Precisely, for an induction motor application, we have focus at the estimation of the rotor flux, the mechanical speed and the load torque by using only the two weakly sampled stator currents.After a comparison with the continuous version of the HGO algorithm when the sample frequency is imperfect, the sampled output observer design shows the best reconstruction 2 W:Word length, F: Fractional part of the original output signal as well as more realistic estimation of the missing states.Driving profit from the advanced Matlab Simulink tools such as HDL Coder and Fixed point toolbox, the implementation of the nonlinear observer is achieved and validation results are obtained through ModelSim soft-ware.Now, with the success of the CDHGO implementation, it is possible to use a lower cost digital hardware that can works with a relatively low sample frequency.

22kgm 2 .
After several simulation, we have choose the both HGO design parameters as follows: θ 1 = 800 and θ 2 = 200.The sample time T e is specified as 5 10 −3 s.To illustrate the performance of the designed observer, a step load torque is applied at 0.25s with the value T L = 10N m.Both CDHGO algorithm and IM discrete model (by using Euler approximation of (3)) are implemented in Virtex FPGA board and the comparison is carried out between the estimated states and the true ones.The curves obtained by ModelSim software for each estimated state are illustrated in Fig.4.The graphs (a) (b) (c) and (d) correspond respectively to α component of the rotor flux, β component of the rotor flux, mechanical speed and the load torque.In all graphs, the first curve represent the true state, where the second refers to CDHGO estimates.We can show that despite some overshoots at the transient, each component of the estimated flux track well the true one.Moreover, a good agreement can be recorded from the mechanical speed and the load torque in one side and these estimates in the other side.