A novel FPGA ‐ Based Bi input ‐ reduced order extended Kalman filter for speed ‐ sensorless direct torque control of induction motor with constant switching frequency controller

This study proposes an FPGA ‐ based hardware in the loop (HIL) emulator for speed ‐ sensorless of induction motor (IM) constant switching frequency controller ‐ based direct torque control (CSFC ‐ DTC) with a novel bi input ‐ reduced order extended Kalman filter (BI ‐ ROEKF). The full precision single floating point numbers in the IEEE 754 standard are used during the implementation of the HIL emulator which contains closed ‐ loop speed ‐ sensorless drive system of IM on the Xilinx Virtex XC5VLX ‐ 110T ML506 FPGA board. In this HIL emulator of speed ‐ sensorless IM drive system, stator stationary axis components of stator flux, rotor mechanical angular speed, load torque, stator and rotor resistances are estimated with the novel BI ‐ ROEKF which is proposed for the first time in the literature. The proposed BI ‐ ROEKF is created by applying two different non ‐ linear and linear system input functions obtained from two different IM models to the single reduced order extended Kalman filter (ROEKF) algorithm. Thus, the order and the computational burden of the EKF are reduced. The HIL emulator of the speed ‐ sensorless drive system of IM is implemented on FPGA using the advantage of hand ‐ written VHDL on getting an optimal logical design to reduce the sampling time which directly effects the estimation performance of the model ‐ based estimator like the novel BI ‐ ROEKF and hence the control performance of drive system. The estimation performance of the novel BI ‐ ROEKF is tested with speed ‐ sensorless CSFC ‐ DTC IM drive system under different challenging scenarios in HIL emulator. Thus, the control and the implementation performances of digitalised emulator are tested. Finally, the estimation and control performance results and the execution time of the each part of the proposed HIL emulator of the speed ‐ sensorless BI ‐ ROEKF ‐ based CSFC ‐ DTC of the IM are presented.


| INTRODUCTION
Induction motors (IMs) are widely used in industrial applications because they have stable, simple and robust structure, they can be produced with low cost and they have the ability to work in a wide speed range [1]. The field oriented control (FOC) and the direct torque control (DTC) methods are proposed in the literature o provide decoupled control of flux and torque in the IM as in the external excited direct current motors. The fact that the DTC has a simple structure, provides high dynamic control performance and robustness against parameter changes of the IM compared to the FOC makes it preferrable in industrial applications where the dynamic control of IM is required [2]. However, using the hysteresis torque and flux comparators in the conventional DTC (CDTC) causes the following problems [3]: Recently, studies in which the simultaneous estimation of R s and R r are performed using various estimators different from EKF-based estimator have a great interest in the literature. In [27], R s and R r are estimated with reactive power-based MRAS with rotor flux (|φ → r | and θ r ). The proposed estimator is tested under various speed and load torque conditions and it is claimed that the exact estimations of R s and R r are obtained. However, the estimated value of R r is different from the reference value. The estimated values of R r converge to its nominal value and this is shown in all graphical representation. Also, two independent MRAS-based structures should be used for the simultaneous estimations of R s and R r . Because of this, the proposed estimators have heavy computational burden. In addition, the robustness of the proposed MRAS-based estimator is weakened due to the fact that the coefficients of the PI controllers used in adaptation mechanisms can vary depending on the operating conditions. An adaptive observer based on the first-order approximation of the error dynamics is proposed in [28] for the simultaneous estimations of R s and R r . The known signals form the regressors of the adopted IM model. The estimation performance is impressive at steady-state operation of IM, but in transient state the estimation performance is deteriorated and this degrades the control performance. As a solution to this situation, it is suggested by the authors to suspend the estimation of R s and R r in transient-state. Instead of this suggestion, a more impressive solution can be provided by reducing the T of the drive system, which is too high (250 μs), by implementing the proposed estimator on an FPGA.
As it can be understood from here, the fact that the computational burdens of the deterministic-based estimators become heavier with the increase in the number of estimated states/parameters and the estimation performances are limited due to the fact that they offer deterministic-based approach to the parameter changes, the reason why the stochastic-based estimators such as EKF are preferred more in the literature.
In the literature, there are some studies in which R s and R r are estimated simultaneously by the EKF-based estimators [29][30][31][32][33][34][35]. In Ref. [29], −αβ components of stator current (i sα , i sβ ), − αβ components of rotor flux (φ rα and φ rβ ), ω m , t L , R r , and R s are estimated with a single EKF. To overcome the problem in the simultaneous estimation of R s and R r , R s is defined as a state in the IM model using the thermal dynamic model of R s . However, the order of the proposed EKF is increased and consequently the computational burden of the EKF is also increased. Also there is no result about the operation of IM at low speed and rated speed under rated t L . In [30], i sα , i sβ , φ rα , φ rβ , R r , and R s are estimated with augmented EKF and ω m of the IM is measured by a speed sensor. The proposed augmented EKF-based drive system of the IM is implemented on DSP with 100 μs sampling time (execution time) (T). The given estimation results of the proposed augmented EKF have fluctuations and also there is no result about the speed control. i sα , i sβ , R r , and R s are estimated with the required motor flux −αβ components by a single EKF in [31,32]. The proposed EKF-based estimators are tested in Matlab/Simulink in simulation in these studies and m is obtained from the speed sensor for the dynamic control of the IM. However, it is unpredictable that the real-time implementations of the proposed EKF-based driver systems are achieved in how much sampling time. The authors in [33] propose an adaptation mechanism for the estimation of R s and R r in addition to EKF which is used for the estimations of the other necessary states for dynamic control of the IM. There are high fluctuations and parasites in the estimation results. Also no result is obtained regarding the estimation of R r and the influence of t L variations 186 -INAN on the estimation and control performances. In [34], R s and R r are estimated simultaneously by an adaptive EKF in which the adaptation mechanism is derived using Kalman-Yakubovich Lemma approximation. The estimation results have some ripples and there is no result about the effect of t L variations. Although no information cannot be found about the sampling time in the study, it is clear that the proposed estimator has a heavy computational burden. In [35], in addition to core resistance R c , stator leakage resistance L ls , rotor leakage resistance L lr , and magnetising inductance L m , R s and R r are estimated simultaneously with an EKF-based estimator. However, in the proposed estimation method, parameter estimation is performed by applying a voltage signal to only one phase of the IM at standstill, and there is no clear statement that real-time parameter changes can be estimated with this proposed method.
In the literature, different EKF-based estimator structures named as switching-EKF, braided-EKF, and bi input-EKF (BI-EKF) which are derived using two different IM models that are proposed to increase the number of estimated parameters including R s and R r while reducing the computational burden of the EKF algorithm [15,[36][37][38][39]. In the switching-EKF estimator two different EKF algorithms which inputs are derived from two different IM models are operated switchingly over each nxT or T time [36]. Different from the switching-EKF, in the braided-EKF two different EKF algorithms are operated switchingly over each T time [37]. In [15,38,39], the BI-EKF is proposed to reduce the computational burdens of the switching-EKF and the braided-EKF by switching the inputs which obtained from two different IM models to single EKF algorithm over each nxT or T time. The switching-EKF, braided-EKF, and BI-EKF have heavy computational burdens due to their fullorder structures. This leads to the realization of the proposed studies in real-time with high sampling times, and also, it is difficult to determine the system and measurement covariance matrices (Q and R, respectively), because of having full-order structure of proposed EKF-based estimator.
To improve the drawbacks of the full-order EKF like computational burden and complexity which are particularly important in discrete real-time applications which are implemented on hardware or microcontroller-based digital platform, reduced order EKF (ROEKF) is proposed [3,[40][41][42]. In [3] it is claimed that the ROEKF is less preferred compared to the full-order EKF because the accuracy of the ROEKF is not reliable and stable. But this claimed can be rebutted by implementing the ROEKF with less T and determining the Q covariance matrix easily and exactly because its size is smaller than the Q covariance matrix of the full-order EKF.
Although the ROEKF method has less computational burden than the full-order EKF, the matrix operations it contains cause the solution algorithm to have a complex structure. If the ROEKF is used on a drive system of an IM to provide the sensorless control of the IM, the complexity of the control system increase. As a result of the complexity of the control system, T of the system is prolonged. Due to this delays occur in the control loop and the control bandwidth is adversely affected [43]. As a result of increase in T, it is not possible to converge the drive systems which are implemented on digital microcontroller-based platforms in discrete-time to the continuous-time system. In this case, estimation and control performances of the observers and the drive systems are reduced. The realization of the control and estimation algorithms with low T is very limited with DSP-based processors which have sequential processing capability [44,45]. Therefore, FPGAs which are proposed as an alternative to DSP-based processors with their parallel processing capability and fast system response, are preferred in applications where the control and estimator algorithms should be performed with low T. In the FPGA-based industrial applications, system generator toolboxes like hardware description language (HDL) coder and Xilinx System Generator which are embedded in Matlab Simulink and require to pay registration charge for licence key are usually used to generate automatically the HDL commands for FPGA hardware synthesis [46]. These tools have excellent performance in generating HDL codes for digital design beside the handwritten HDL code in the manner of time spent [47,48]. However, handwritten HDL coding always stands out in terms of area constraint, power consumption, operating speed, and getting good control performance [5,47,49,50]. Also usage of the system generator tools causes problems on implementation with floating point format because of the area constraint. When this problem is encountered, the precision of the floating point numbers should be reduced, and this situation negatively affects the sensitivity of the system. In cases where a high precision system is desired to be obtained without decreasing the sensitivity of the system, IEEE 754 32 bit single floating point number format is preferred due to its high sensitivity. To implement a high sensitivity control system with a single floating point number format, handwritten HDL codes should be preferred while designing the hardware source of FPGA. In this case, to obtain the optimum resource consumption, T, and flexible programmable feature, VHDL is generally used [5]. Therefore, in this study, the whole drive system is designed on the FPGA with VHDL in single floating point number format.
When the current literature is examined, it is observed that the degree and therefore the computational burden of the EKFbased estimator which are proposed for the speed-sensorless control of IM increase with the increasing the number of the estimated states/parameters. In this case, depending on the processing capability of the DSP or FPGA-based digital platforms used for the implementation of the proposed driver systems, the execution time of the algorithms and therefore T increase. The increase in T affects the performance of EKF and consequently the control system negatively. In this study, the ROEKF structure is used to decrease the level of EKF. In addition, to increase the number of estimated states and parameters, the well-known bi input method in which the inputs obtained from two different IM models are switched to a single ROEKF algorithm at each periodic cycle or T is used. The main contribution of the proposed BI-ROEKF estimator is to increase the number of estimated states and parameters as well as to reduce the calculation burden of the EKF. To show how T of the novel BI-ROEKF estimator can be reduced and to test the estimation performance, the proposed BI-ROEKF is implemented on FPGA with the CSFC-DTC method and thus an  emulator which contains the BI-ROEKF based speed-sensorless CDFC-DTC of IM is realized. Using the novel BI-ROEKF, −αβ components of the stator flux (φ sα and φ sβ ), ω m , t L , R r , and R s which exact knowledge are important for the speed-sensorless drive system of the IM are estimated simultaneously. In this way, estimations of high number of states/parameters is accomplished with low T and also the estimation and control performances are improved. This study is the first in the literature with all the features mentioned above. Furthermore, by using the CSFC method, the problems occurs due to the variable switching frequency in the CDTC method is solved. The BI-ROEKF-based speed-sensorless CSFC-DTC of the IM is implemented on Xilinx Virtex XC5VLX-110T ML506 FPGA with VHDL and the VHDL comments is generated and compiled on ISE Design Suite which is provided to the user by Xilinx for free. The estimation performance of the BI-ROEKF is tested with a CSFC-DTC drive system of the IM in hardware in the loop (HIL) simulation as an emulator. At the end of the study, it is proved that the proposed novel BI-ROEKF has high estimation performance and thus the speed-sensorless CSFC-DTC drive system of the IM has high dynamic control performance.
Herein, the sections are organised as follows: after the introduction presented in Section 1, details of the stator fluxbased extended models of IM are given in Section 2. Section 3 gives the detailed information about the convergence analysis of the ROEKF, while the design process of BI-ROEKF on FPGA is presented in Section 4. The HIL estimation results of FPGA-based emulator are illustrated in Section 5. Finally, the conclusion and recommendations for future studies are presented in Section 6.

| STATOR FLUX-BASED IM MODEL
The time-dependent differential expressions of the dynamic stator flux-based model of the IM in the αβ− stator stationary reference frame, the motion equation, and the induced torque (t e ) are given in the following equations:  |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl }  |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl } |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl } The generalized state space form of the stator flux-based IM model which is used in BI-ROEKF to estimate φ sα , φ sβ , ω m , t L , R s , and R r given as follows: • Model r s : IM model which is used for the estimations of φ sα , φ sβ , ω m , t L , and R s 188 - where, x i is the extended state vector and it can be separated in two different components as x 1i and x 2i . x 1i is the estimated state vector and x 2i is the directly measured state vector. f i is the non-linear function of states and inputs. A i is the system matrix. B is the input matrix. w i is the process noise. v i is the measurement noise. H i is the measurement matrix. h i is the non-linear functions of the outputs. z i is the measurement vector. i defines which model it belongs to. Model rs symbolises the IM model which used to estimate φ sα , φ sβ , ω m , t L , and R s as a part of the proposed BI-ROEKF, and also Model rr symbolises the IM model which used to estimate φ sα , φ sβ , ω m , t L , and R r as a part of the proposed BI-ROEKF. The detailed representation of IM models called as Model rs and Model rr are given in (9)- (12) and also these parameters of the IM model are given in Table 1. In (1)- (6) and (9) m =ðL s L r Þ is the leakage or coupling factor. L m is the mutual inductance. L s is the stator self-inductance. L r is the rotor self-inductance referred to the stator side. j L and β L are total inertia and viscous friction of IM and load, respectively. p p is the pole pair. T is the sampling time.

| CONVERGENCE ANALYSIS OF THE ROEKF
In this section, the convergence analysis of ROEKF algorithm is performed with the Lyapunov approach as indicated in the proposed studies in [51,52]. Here, α k and β k time-varying matrices are used to evaluate the propagation errors caused by the first order linearisation and to determine the sufficient cases in which the estimation errors asymptotically converge to zero [52].
The general equations of the ROEKF algorithm are given as follows: 1. Linearisation step 3. Measurement update step  6  6  6  6  6  6  6  6  6  6  4   3   7  7  7  7  7  7  7  7  7  7  5 |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl }  |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl fflffl } |ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl {zffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl ffl } where, F is the linear function of states and inputs. Q is the covariance matrix of system noise, namely the modelling error. R is the covariance matrix of output noise, namely measurement noise. P and P − are the covariance matrices of state estimation error and extrapolation error, respectively. K is the Kalman gain. e is the output prediction error. x is the extended state vector and it can be separated in two different components as x 1 and x 2 . x 1 is the estimated state vector and x 2 is the directly measured state vector. c ð:Þ defines the estimated value of state.
In the following convergence analysis, it is shown that the selections of Q k and R k+1 have an important role to improve the convergence of the ROEKF. In the followings, all subscripts used in the theoretical calculations reflect the estimated index. e x kþ1 and e x kþ1=k namely state estimation error vector and state prediction error vector, respectively and e x kþ1 and e x kþ1=k are given as follows: The Lyapunov function which is used as a candidate function is: The first aim of the convergence analysis is to demonstrate in which condition V k+1 is a decreasing sequence and the second one is to define the limitations of ROEKF under the first order approximation. In the linear case, when e k+1 and e x kþ1=k approximate the following forms: The approximation mentioned above is valid if b x kþ1=k and b x k have neighbourhood with x k+1 and x k , respectively. In cases other this approximation, divergence problem occurs in the ROEKF. To correct this approximation α k+1 and β k unknown time varying diagonal matrices are introduced. Also, for each row of output error prediction component e ik+1 and for each row of state error prediction component e x jkþ1=k are defined. Under this approximation, r ik+1 and o jk residues exist because of the first order linearisation and r ik+1 and o jk are given as follows: (26) and (27) can be arranged as the following form: The relationship between r ik+1 and a k+1 and also o jk and b jk are given in (30) and (31): If e ik and e x jkþ1=k are written in the first approximation, the signal vector can be obtained as follows: The following form is obtained by subtracting the both sides of (18) from x k+1 : Also, using (17) and (20), (35) and (36) are obtained as follows: By substituting (35) into (36) and also (34) into (23), respectively, the quadratic form of V k+1 is obtained and given in the following equation: After that, (36) is substituted into (37): In (38), V k+1/k is defined as follows: 190 -INAN V k+1 is rewritten as follows using (32) and (33): In addition to this V k+1/k can be defined in the following form: or The meaning of decreasing sequence is: Sufficient conditions for achieving the inequality given in (44) should be as follows: Sufficient conditions for the convergence of the ROEKF are proved with Lemma1 and Lemma2.

Lemma1
If it is assumed that each α ik+1 satisfies the following condition: 1 − ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi 1 − Δ kþ1 p ≤ α ikþ1 ≤ 1 þ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi 1 − Δ kþ1 p ð47Þ where λ max (.) defines the maximum eigenvalue of (.). (45) is verified as follows by choosing R k+1 such that Δ k+1 ≤ 1 under assumption (47): with Lemma2 If it is assumed that F k is reversible and each β jk satisfies the following case: where λ min (.) defines the minimum eigenvalue of (.). After the assumption that F k is reversible, (46) is rearranged as follows: Therefore, as understood from (54), (46) is verified under the assumption (52). For more detailed explanations of the proofs of Lemma1 and Lemma2 assumptions, the proposed studies in [42,43] can be examined.

| IMPLEMENTATION OF THE BI-ROEKF ALGORITHM ON FPGA
In this study, for the estimations of φ sα , φ sβ , ω m , t L , R s , and R r a novel BI-ROEKF-based estimator which is shown in Figure 1 is proposed and this estimator is implemented on a Xilinx Virtex XC5VLX-110T ML506 FPGA board with VHDL due to reduce the sampling time. To design the proposed novel BI-ROEKF algorithm with low sampling time on the FPGA, the equations of the ROEKF and the IM models which are used as inputs for ROEKF are simplified by considering the following cases: � In the matrix operations which should be applied to calculate the equations of the ROEKF algorithm given in (16)- (20), the operations with zero in multiplication, subtraction, and addition and also the operations with one value in multiplication of the matrices are eliminated. � Similar expressions in the equations are calculated once and stored in the local variables and reused in sequential and concurrent operations when necessary. This approach is used especially in the calculations of IM model ( (9) and (12)) and the linear and non-linear inputs ((13)-(15)) of the ROEKF algorithm obtained from the IM models. � All the arithmetic operations which can be calculated concurrently in all matrix operations are applied considering the memory boundary of the FPGA.
� If the arithmetic operations of the ROEKF equations have to be performed sequentially, sequential matrix operations in different equations of the ROEKF are performed concurrently considering the memory boundary of the FPGA to implement the proposed novel BI-ROEKF estimator with low sampling time.
In the BI-ROEKF structure which is implemented on the FPGA considering the above-mentioned cases, switching operations are performed to update the estimated states and parameters, the linear and non-linear functions of the inputs (F i and f i ) which are obtained from two different IM models named as Model r s and Model r r , and the covariance matrices of the estimation errors (P) to the ROEKF algorithm as seen in Figure 1. Switching operation is performed in each execution cycle. Here, Model r r -based ROEKF estimator operates at the first of the two sampling times (T ), while the Model r s -based ROEKF estimator operates in the next execution cycle. Thus, the switching operation period is 2xT.
In the proposed BI-ROEKF-based estimator, R s is assumed to be a fixed parameter for Model r r -based ROEKF and R r is estimated with φ sα , φ sβ , ω m , and t L simultaneously while R r is considered as a constant for a Model r s -based ROEKF and R s is estimated with φ sα , φ sβ , ω m , and t L in the other execution cycle.

| HIL SIMULATION RESULTS OF THE EMULATOR
The estimation performance of the proposed BI-ROEKF estimator is tested with the speed-sensorless CSFC-DTC of IM in FPGA-based emulator. The BI-ROEKF-based speedsensorless CSFC-DTC of IM which is implemented on FPGA is seen in Figure 2. The whole drive system is implemented with VHDL on Xilinx Virtex XC5VLX-110T ML506 FPGA board.
The velocity controller which is used in the CSFC-DTC system shown in Figure 2 is PID type controller. Also, a twolevel hysteresis flux comparator and the CSFC are used to determine the switching conditions of the inverter with the help of the switching table. In the speed-sensorless drive system of IM, the CSFC which is proposed in [3] and seen in Figure 3 is used instead of three-level hysteresis torque comparator to make the CDTC more robust by driving the inverter at constant switching frequency.
In Figure 3, the torque controller is a conventional PI type controller and it is used to regulate the torque error. The K p and K i coefficients of the PI controller are determined by considering the design limitations defined in [53] as stated in [3]. In addition, to produce switching signals at constant switching frequency in CSFC, two triangular wave generators with the same frequency and 180°phase differences with each other are F I G U R E 1 Implementation of BI-ROEKF algorithm on FPGA 192 -INAN used as upper and lower carrier signals (T up and T low ). The periods and the magnitude of the triangular wave generators are suggested to be taken as 8 times the sampling time (D T = 8xT) and 100 units, respectively, to obtain the optimum bandwidth of the torque control loop as determined in [53]. In this study T is determined as 8.36 μs. According to this, D T and frequency of the triangular wave generator (f T ) is calculated as D T = 8xT = 8 � 8.36 � 10 −6 = 66.88 μs and f T = 14,952 Hz, respectively, as mentioned in [53]. The torque control loop proposed in [3,53,54] is given in Figure 4.
In the CSFC, the switching signals (t e k ) are obtained by comparing the regulated torque error (t e r ) with the T up and T low carrier signals as indicated in (55). As a result, the switching signals are generated at constant frequency by CSFC with a pattern similar to the obtained from the hysteresis moment comparator.

1;
t e r ≥ T up 0; T low < t e r < T up −1; t e r ⩽ T up 8 < : ð55Þ where, d(t) is the average value of the t e k for a triangular waveform with the D T . In the torque control loop, it is aimed to derive the transfer function between t e (t) and d(t) in frequency domain as shown in Figure 4. Due to this, the averaged and linearised positive and negative torque slopes in −αβ stator stationary reference frame is used and they are given as follows while the jφ → s j ¼ φ sα under two assumptions as −β component of the stator voltage is zero and the angle between the stator and rotor flux vectors (load angle) are negligibly small: where, ω slip is the slip angular frequency, ω r is the rotor angular frequency, τ rs = (τ r + τ s )/(τ r τ s ), τ r = L r /R r is the rotor time constant, and τ s = L s /R s is the stator time constant. F I G U R E 2 BI-ROEKF-based speed-sensorless CSFC-DTC drive system of IM  Under the assumptions that the jφ → s j and jφ → r j are constant while the IM is operating under rated speed, (57) and (58) can be arranged as follows:

F I G U R E 4 Torque control loop
where ω e is angular synchronous frequency, A t = 1/(στ rs ), The transfer function and the steady-state equations are generated using the averaged function which is obtained from (59) and (60). The transfer function and steady-state equation between t e (s) and d(s) are obtained as the following forms: To obtain the higher control performance from the torque control loop depends on the correct determination of the coefficients K p and K i of the PI controller. The correct values of the coefficients are selected using the linearised and averaged torque control loop. With the purpose of the correct definition of the coefficients K p and K i as mentioned in [44], the following conditions must be satisfied for the positive and negative torque slopes obtained from (59) and (60), respectively: The K p and K i is determined as 193 and 39,159, respectively, considering the operation of the induction motor at zero rotor speed and rated speed as mentioned in [53].
To implement the BI-ROEKF algorithm, the F i and f i functions obtained from two different IM models are switched to a single ROEKF algorithm. As a result, a ROEKF algorithm operates at each cycle after switching and both ROEKF have different P, Q, and R covariance matrices. The initial conditions of P (P 0 ) and the coefficients of Q and R covariance matrices of Model r s and Model r r -based ROEKFs are determined by trial-and-error method and these values are given as follows: � The P 0 , Q, and R covariance matrices of Model r s : P 0 rs ¼ diagð 10 10 10 10 10 Þ; � The P 0 , Q, and R covariance matrices of Model r r : P 0 rr ¼ diagð 10 10 10 10 10 Þ; The timing requirements to implement each component of the novel BI-ROEKF-based CSFC-DTC IM drive system emulator on FPGA are given in Table 2. Table 2 gives knowledge about the execution time of each component and the total execution time of the emulator of the IM drive system which is taken as the sampling time of the IM drive system emulator. Thus, one cycle of the proposed emulator takes 8.36 μs. In this execution time, implementation of reference inputs component, CSFC-DTC component, IM model component, the component that f(x 1,k , x 2,k , u k ), h(x 1,k , x 2,k , u k ), and z k+1 and first order Taylor series approximations F k+1/k and H k+1/k matrices are calculated concurrently, the component which contains the calculation of the ROEKF equations take 0.21 μs, 1.73 μs, 0.67 μs, 0.64 μs, and 5.11 μs, respectively. In addition the memory and logic cell numbers of the FPGA are taken into consideration while the proposed drive system emulator is implemented and the number of consumed resources and their ratios are given in the Table 3.
The estimation performance of the proposed BI-ROEKF is tested with CSFC-DTC drive system of IM under six different scenarios which contains challenge variations of the IM states and parameters.

| Scenario 1: starting up the IM to the rated speed and step-like variations of t L , R r , and R s at rated speed
In this scenario, IM is starting up to the rated speed (n m = 1000 rpm) under rated t L (t L = 20 N.m). While the IM is operating at n m = 1000 rpm, t L is decreased to t L = 10 N.m at 3. s. Also R r and R s are simultaneously increased to 2xR r and 2xR s , respectively, at 4. s, while the IM is operating at n m = 1000 rpm under t L = 10 N.m. After that, t L is increased to 0.5xR r and 0.5xR s and increased to their rated value in the time intervals of 5 < t < 8 s and 5 < t < 7 s, respectively. Figures 9 and 10 represent the estimation results and errors of the proposed BI-ROEKF estimator and also the control performance of the novel BI-ROEKF-based speed-sensorless CSFC-DTC of the IM.
5.4 | Scenario 4: starting up the IM to the rated speed and step-like decrease and increase of R r and R s , respectively, at zero speed In this scenario, opposite step-like variations are made on R r and R s while the IM is operating at zero speed under noload as in the second and third scenarios. In the time interval of 0 < t < 3 s, the IM is accelerated to its rated speed (n m = 1000 rpm) from the zero speed under rated load torque, after which the speed command of the IM is set to zero at 3. s and the IM begins to operate at zero speed under no-load named as dc condition at 4. s. R r is decreased to 0.5 R r and R s is increased to 2x R s simultaneously at 5. s, while the IM is operating in dc condition. Then, R r and R s are set to their rated values at 7. s and 8. s, respectively. The estimation and control performance of the novel BI-ROEKF and the IM drive system are shown in Figure 11 with the errors shown in Figure 12.  Figures 15 and 16 speed control of the IM is not affected significantly by the error in t L estimation. While the IM is operating at n m = 1000 rpm under rated t L with 2xj L value, R r and R s are simultaneously increased to 2xR r and 2xR s , respectively at 5. s. After that R s and j L are decreased to their rated value at 7. s simultaneously while R r is kept as 2xR r . j L variation causes a ripple in the estimated states and parameters but their values converge rapidly to their real values. At the end of the scenario, R r is decreased to its rated value under rated values of other states and parameters. It is clearly understood from the Figures 15 and 16, the novel BI-ROEKF is robust to j L variations. Although the step-like changes of j L causes an error only in t L estimation at start-up of IM, the estimations of other states/parameters remain insensitive to these changes. Also, variations of j L does not cause deterioration in speed control performance of CSFC-DTC of IM. The switching operation, which is a feature of the BI technique, starts at 0.5. s in all scenarios. Before the switching operation, only Model r s -based ROEKF operates and it starts to estimation operation under zero initial conditions of the estimated states and parameters except b R r .

|
Only the initial condition of b R r is set to b R r ¼ 1:265 Ω (half of the rated R r ) different from the other estimated states and parameters. Although the incorrect initial condition of b R r is a constant for Model r s -based ROEKF, it is seen from the Figures 5-16 that the estimation performance of Model r s -based ROEKF is quite high. The BI-ROEKF estimator starts to operate when the switching operation begins. The step-like variations of t L , R r , and R s and the linear changes of the speed reference are estimated accurately by the novel BI-ROEKF. In Figures 5-16 it is seen that, some peaks and ripples occur on b t L , b R r , and b R s but these errors converge very quickly to zero. Estimation results show that the parameter and state changes generated at both the rated speed and the dc condition are defined as the most challenging conditions that include the zero speed or zero stator frequency operation of the IM that are estimated with high performance by the proposed novel BI-ROEKF. The implementation of the proposed novel BI-ROEKF algorithm with low sampling time using the parallel processing ability of the FPGA provides this high estimation performance. Also, the FPGA implementation of the proposed BI-ROEKF algorithm in discrete-time with low sampling time allows the discrete-time system to converge to the continuous-time system, which makes it easier to determine the values of the Q and R matrices contained in the EKF. Furthermore, the estimation performance of the proposed BI-ROEKF directly affects the control performance of the speed-sensorless CSFC-DTC of IM. Due to this, the CSFC-DTF-based drive system of