Artificial Neural Based Speed and Flux Estimators for Induction Machine Drives with Matlab/Simulink

In this paper, an Artificial Neural Network (ANN) for accurate estimation of the speed and flux for induction motor (IM) drives has been presented for industrial applications such as electric vehicles (EVs). Two ANN estimators have been designed, one for the rotor speed estimation and the other for the stator and rotor flux estimation. The input training data has been collected based on the currents and voltage data, while the output training data of the speed and stator and rotor fluxes has been established based on the measured speed and flux estimator-based mathematical model of the IM. The designed ANN estimators can overcome the problem of the parameter’s variations and drift integration problems. Matlab/Simulink has been used to develop and test the ANN estimators. The results prove the ANN estimators’ effectiveness under various operation conditions.


Introduction
In recent years, the principle of vector-control for induction motors (IMs) has become very popular since the ability to control precise motor torque enables high-performance motor drive systems to be designed, such as electric vehicles (EVs) [1][2][3][4]. In conjunction with the low cost and ease of maintenance due to the robustness of the structure, reliability, and high-performance of the IM, this has led to replacing direct current (DC) machines with IMs in many applications in the last few years. Such advantages have determined the significant creation of electrical drives for all relevant aspects, with the IM as the execution component: starting, braking, speed-reversal, and speed change [2]. AC drives require extensive advanced control techniques, often more expensive but more reliable [5].
Dynamic operation of the IM drive plays an important role in the general system performance [6,7]. In many IM applications, vector-control is the most widely used technique owing to its high rendering for controlling IMs [8]. The vector-control theory for IMs, is based on acquiring the phase and magnitude of voltages or currents. That control is carried out based on the transformations of Clarke and Park, which are responsible for producing torque and flux, respectively. IMs works like a separately excited DC-motor in which two independent orthogonal variables control the torque and flux, namely armature and field currents, respectively [4,9]. This characteristic leads to an unfavorable coupling of electromagnetic torque and flux, resulting in the complexity and difficulty of using IM controllers. Via field-oriented control (FOC), this issue would be solved. The basic concept of vector control is that the torque and flux are regulated in a separable manner through vector control, and the action of a DC-motor is reproducing. The most direct way of achieving field orientation is to split the stator current into two appropriate elements and control them separately. The first element is selected to generate an MMF wave spatially in phase with the rotor-flux-density; this element is related directly to the rotor-flux-amplitude and is the flux-producing-current component. Also, the second element is selected for generating the MMF wave spatially in quadrature with rotor-flux-density; this element is equivalent to motor torque and is referred to as a torque-producing-current component.
Blaschke and Hasse proposed the FOC-based direct field orientation control (DFOC) [7,10]. With DFOC, two Hall-effect sensors are mounting in the air-gap to get rotor flux based on air-gap measurements. The DFOC's block diagram for the IM drive is displayed in Figure 1. Since it is impracticable to sense rotor flux directly, some rotor-flux-orientation (RFO) computation has to be done for extracting the desirable information from a directly sensed signal. The essence of these computations for terminal voltage and current sensing is demonstrated in Figure 1. The stator and rotor resistance variation may affect the performance of the DFOC method at low speed. There is an undesirable dip in speed at the instant of resistance deviation, but the restoring time of this dip occurs in a short time. The rotor-flux amplitude rises to compensate for the excess voltage drops on the stator and rotor windings. In general, DFOC offers poor dynamic performance when stator and rotor resistance increase [11][12][13].
Mathematics 2022, 10, x FOR PEER REVIEW 2 of 23 concept of vector control is that the torque and flux are regulated in a separable manner through vector control, and the action of a DC-motor is reproducing. The most direct way of achieving field orientation is to split the stator current into two appropriate elements and control them separately. The first element is selected to generate an MMF wave spatially in phase with the rotor-flux-density; this element is related directly to the rotor-fluxamplitude and is the flux-producing-current component. Also, the second element is selected for generating the MMF wave spatially in quadrature with rotor-flux-density; this element is equivalent to motor torque and is referred to as a torque-producing-current component.
Blaschke and Hasse proposed the FOC-based direct field orientation control (DFOC) [7,10]. With DFOC, two Hall-effect sensors are mounting in the air-gap to get rotor flux based on air-gap measurements. The DFOC's block diagram for the IM drive is displayed in Figure 1. Since it is impracticable to sense rotor flux directly, some rotor-flux-orientation (RFO) computation has to be done for extracting the desirable information from a directly sensed signal. The essence of these computations for terminal voltage and current sensing is demonstrated in Figure 1. The stator and rotor resistance variation may affect the performance of the DFOC method at low speed. There is an undesirable dip in speed at the instant of resistance deviation, but the restoring time of this dip occurs in a short time. The rotor-flux amplitude rises to compensate for the excess voltage drops on the stator and rotor windings. In general, DFOC offers poor dynamic performance when stator and rotor resistance increase [11][12][13].  Most of the reported references concluded that the implementation of the rotational transducers for establishing the speed feedback loop for high dynamic AC drives results in reliability reduction and raises the system cost and implementation. Many sensorless schemes have been introduced in the literature. In the most introduced schemes, the sensitivity to parameter variations, especially the stator resistance, affects the precision of the estimation at a low speed [7,[14][15][16]. The estimation process may suffer instability at a certain speed region, especially at low speeds.
The process of flux estimation is an essential assignment to implement IM drives accurately. The flux estimation is generally based on the currents and voltages associated with the machine models. Problems such as pure integrations, draft, and initial conditions Most of the reported references concluded that the implementation of the rotational transducers for establishing the speed feedback loop for high dynamic AC drives results in reliability reduction and raises the system cost and implementation. Many sensorless schemes have been introduced in the literature. In the most introduced schemes, the sensitivity to parameter variations, especially the stator resistance, affects the precision of the estimation at a low speed [7,[14][15][16]. The estimation process may suffer instability at a certain speed region, especially at low speeds.
The process of flux estimation is an essential assignment to implement IM drives accurately. The flux estimation is generally based on the currents and voltages associated with the machine models. Problems such as pure integrations, draft, and initial conditions may affect the performance and accurate flux estimation [17]. Other issues may be considered based on the possibility of parameter uncertainty. These problems may be solved by applying the low-pass filter, which may overcome the problem of initial conditions and the DC offset of the integration but in a narrow speed range. Parameter estimations, especially the stator resistance, may improve the estimation process at low-speed ranges by increasing the implementation time and cost [7,[14][15][16].
Many control schemes using artificial neural networks have been applied to enhance the performance of AC drives [1,2,5,9,14,15,[18][19][20]. Moreover, the mathematical modelbased control systems may result in low dynamic performance and suffer from parameter variation dependency [17]. So, applying ANN-based schemes can overcome the disadvantages of mathematical model-based control systems. ANNs can introduce many advantages for improving the performance with error tolerance [11,18,21].
ANN has been introduced to overcome the mentioned problems for flux estimation, but the estimator still needs the rotor speed [17]. In Ref. [18], the motor speed has been measured using speed sensors which reduce the system's reliability and increase the cost of the drive system. The elimination of the speed sensor has been presented with reducing the accuracy of the flux estimation in [5,12,16]. ANNs have been utilized in many industrial applications; for example, in [22], ANNs were applied considering the measured data to introduce a model of magnetorheological fluids' relative magnetic permeability. The reported results show the effectiveness of the introduced neural network approaches considering a reduced parameters model [22].
In this paper, to improve the reliability of the flux estimator with the elimination of the speed sensor, two ANN estimators have been designed and implemented. The first is a speed estimator based on the voltage and current measurements. The other one is for flux estimator considering its inputs as the currents and voltages measurements as well as the estimated speed from the first one. ANN-based estimators can overcome the drift problem of pure integrators and enhance the robustness of stator resistance variations. Offline training of the two ANNs has been used to save implementation time. The validation of the overall control scheme with the two ANNs has been achieved using Matlab/Simulink simulation of the IM drive in different operation conditions. The same methodology can be applied for other machine drives and industrial applications.
The article is developed as follows: Section two illustrates the mathematical model of induction motor. The field-oriented vector control of IM has been introduced in Section 3. The methodology of implementing ANN-based speed and flux estimator has been presented in Section 4. The ANN-based speed estimator has been introduced in Section 5. The ANN-based flux estimator has been described in Section 6. The numeric results and discussions are executed in Section 7. The last section contributes to the conclusion of the proposed work.

Mathematical Model of Induction Motor
The mathematical model of induction motor can be represented in the stationary reference frame (α − β) as follows [6]: where i s = i αs i βs T , λ r = λ αr λ βr T , µ s = V αs V βs T ,.
Matrices elements of A 11 , A 12 , A 21 , and A 22 can be defined as the following: The reset matrices elements of Equation (2) can be represented as: B = 1 σL s I, C = I 0 , and I, J denote unit and skew symmetric matrices respectively and can be defined as, The electromagnetic torque can be represented as: The rotor speed ω r can be defined as follows: where k t = 3PL m 2L r . L m , L r , and L s denote magnetizing, rotor self-leakage, and stator selfleakage inductances (H), p denotes d/dt, σ denotes the leakage coefficient and is defined as 1 − L 2 m L s L r and T r = L r R r . Moreover, T l and T e denote load and electromagnetic torques (Nm), R s , R r denote the stator and rotor resistances (Ω), f d denotes friction coefficient and J m denotes a moment of inertia (kg·m 2 ).

Field-Orientation Control Scheme of IM
The field-orientation control can be defined in the d − q synchronous reference frame. The basic of the FOC is based on controlling the rotor flux to be in d − axis while the q − axis component equal to zero. Moreover, the rotor flux λ r can be written as follows [2,7]: where i ds and i qs are orthogonal components of the stator currents in the d − q axis, and the slip-speed ω sl can be controlled as follows: where, T r denotes the rotor time constant and the superscript * denotes the reference value. The electromagnetic torque is stated considering the peak phasor values of i ds and i qs as follows: where P is the pair-pole-number and λ r is the rotor flux. The electromagnetic torque can be expressed as: The rotor-flux-linkages are stated by: The rotor equations in terms of the rotor-flux-linkages are: R r i qr + pλ qr + sω s λ dr = 0, and Mathematics 2022, 10, 1348

of 22
With the application of FOC principle, the rotor-flux-space vector's q − axis component will always remain zero. So, the rotor flux can be written as follows: Therefore, the rotor circuit in Equation (7) can be stated as: Consequently, the rotor currents in Equation (8) would be written as: Generating the reference values of the stator current components i * qs and i * ds can be obtained using the torque-command T * e and rotor-flux-command λ * r values as: where K t = 3PL m 2L r , T r is the rotor-time constant, and p is a differential operator. T * e is the output of the speed controller.

Methodology of ANN Application for Speed and Flux Estimation
Implementing the ANNs speed and flux estimators has the training, testing, and validation stages. This section presents the methodology of the design and implementation of the two parallel ANNs.

Step 1. Collecting Training Data
The training data has been collected by simulation of the direct vector control scheme of Figure 1. The collected data has been achieved by assuming random reference speed and load torque, as shown in Figure 2. The collected data are the measured voltages and currents in αβ. Also, the actual rotor speed has been logged. The data has been saved and exported for training the ANN.
With the application of FOC principle, the rotor-flux-space vector's − component will always remain zero. So, the rotor flux can be written as follows: Therefore, the rotor circuit in Equation (7) can be stated as: Consequently, the rotor currents in Equation (8) would be written as: Generating the reference values of the stator current components * and * can be obtained using the torque-command * and rotor-flux-command * values as: * = 1 * * and * = is the rotor-time constant, and is a differential operator. * is the output of the speed controller.

Methodology of ANN Application for Speed and Flux Estimation
Implementing the ANNs speed and flux estimators has the training, testing, and validation stages. This section presents the methodology of the design and implementation of the two parallel ANNs.

Step 1. Collecting Training Data
The training data has been collected by simulation of the direct vector control scheme of Figure 1. The collected data has been achieved by assuming random reference speed and load torque, as shown in Figure 2. The collected data are the measured voltages and currents in . Also, the actual rotor speed has been logged. The data has been saved and exported for training the ANN.  Figure 3 shows the reference speed, which is assumed to be changed over the simulation time. Moreover, the figure shows that the assumed load torque disturbance has  Figure 3 shows the reference speed, which is assumed to be changed over the simulation time. Moreover, the figure shows that the assumed load torque disturbance has been Mathematics 2022, 10, 1348 6 of 22 randomly changed with the speed variation. The speed and load torque have been assumed to cover a wide range of operating conditions. The simulation time is 250 s. The simulation has been done with a step time of 5 × 10 −3 . So, the size of data points is 50,000 points. Moreover, 25 starting points have been removed from the data set.
Mathematics 2022, 10, x FOR PEER REVIEW 6 of 23 been randomly changed with the speed variation. The speed and load torque have been assumed to cover a wide range of operating conditions. The simulation time is 250 s. The simulation has been done with a step time of 5 × 10 −3 . So, the size of data points is 50,000 points. Moreover, 25 starting points have been removed from the data set. Measurement noise has been injected into the measured signals. The variations of the flux amplitude have been enforced for enriching the learning set. A variation in the stator resistance has been assumed. Moreover, noise in the measured speed has been added to enhance the feed-forward neural network (FFNN) robustness against noise. Figure 3 shows the imposed noise for rotor and stator fluxes, rotor speed, stator currents, and stator resistance. Parameters and data specifications of the tested induction motor have been reported in Table A1.

Step 2. Design ANN
The type of ANN is a very important issue for accurate estimation of the flux and speed. In this paper, each ANN has been designed as a FFNN. The Matlab toolbox has been used for this purpose. One can apply another NN type. The training function has been selected as Levenberg-Marquardt (trainlm). One can note that other training functions may be used. The objective function has been chosen as mean squared error (MSE). One can tune how many hidden layers can be used to accurately estimate the rotor speed. In the paper, the hidden layers are 2, with 10 and 5 neurons for the first and second layers, respectively.

Step 3. Training ANNs
The training of each ANN has been done offline to save the implementation time. The training step has been done by extracting the actual states for speed and flux estimation. Firstly, the ANN-based speed estimation has been trained. The next step, the ANNbased flux estimation, has been trained because it needs the speed as one input data vector. The complete data set has been used for training the ANN. Measurement noise has been injected into the measured signals. The variations of the flux amplitude have been enforced for enriching the learning set. A variation in the stator resistance has been assumed. Moreover, noise in the measured speed has been added to enhance the feed-forward neural network (FFNN) robustness against noise. Figure 3 shows the imposed noise for rotor and stator fluxes, rotor speed, stator currents, and stator resistance. Parameters and data specifications of the tested induction motor have been reported in Table A1.

Step 2. Design ANN
The type of ANN is a very important issue for accurate estimation of the flux and speed. In this paper, each ANN has been designed as a FFNN. The Matlab toolbox has been used for this purpose. One can apply another NN type. The training function has been selected as Levenberg-Marquardt (trainlm). One can note that other training functions may be used. The objective function has been chosen as mean squared error (MSE). One can tune how many hidden layers can be used to accurately estimate the rotor speed. In the paper, the hidden layers are 2, with 10 and 5 neurons for the first and second layers, respectively.

Step 3. Training ANNs
The training of each ANN has been done offline to save the implementation time. The training step has been done by extracting the actual states for speed and flux estimation. Firstly, the ANN-based speed estimation has been trained. The next step, the ANN-based flux estimation, has been trained because it needs the speed as one input data vector. The complete data set has been used for training the ANN.

Step 4. Validation of the ANNs
We should test and validate the ANNs to show their performance and accuracy in this step. The testing should occur with consideration of the value of MSE, Regression.
Moreover, testing the estimated values based on training and other testing data should occur. If the accuracy of ANN is not satisfied, the repeating of steps 2, 3, and 4 should be done.

Step 5. Exporting the Simulink Block for the Two ANNs
After releasing the effectiveness and accuracy of the ANN, exporting the ANN as a Simulink block should be done using the neural network (NN) Matlab Toolbox.
The steps for achieving an accurate estimation of the flux and rotor speed can be implemented as Listing 1 for the speed estimation, while the ANN flux estimator can be implemented in the same manner. This code show that the feed forward ANN has been selected. Moreover, two hidden layers have been used with 10 and 5 neurons, respectively.

Step 4. Validation of the ANNs
We should test and validate the ANNs to show their performance and accuracy in this step. The testing should occur with consideration of the value of MSE, Regression. Moreover, testing the estimated values based on training and other testing data should occur. If the accuracy of ANN is not satisfied, the repeating of steps 2, 3, and 4 should be done.

Step 5. Exporting the Simulink block for the two ANNs
After releasing the effectiveness and accuracy of the ANN, exporting the ANN as a Simulink block should be done using the neural network (NN) Matlab Toolbox.
The steps for achieving an accurate estimation of the flux and rotor speed can be implemented as Code 1 for the speed estimation, while the ANN flux estimator can be implemented in the same manner. This code show that the feed forward ANN has been selected. Moreover, two hidden layers have been used with 10 and 5 neurons, respectively. Listing 1. ANN for speed estimator using NN Matlab toolbox.

ANN Speed Estimator
The input and output data of the ANN speed estimator can be collected during the training by simulating the vector-controlled IM. The construction of the ANN block in Simulink is shown in Figure 4a. Figure 4b presents the implantation of each block in the ANN speed estimator. The ANN-based speed estimator is constructed as a linear timeinvariant dynamic system consisting of a nonlinear neural function approximator through LPFs, as shown in Figure 4b. net_speed.trainFcn = ʹtrainbrʹ; net_speed.divideFcn = 'dividetrain';).

ANN Speed Estimator
The input and output data of the ANN speed estimator can be collected during the training by simulating the vector-controlled IM. The construction of the ANN block in Simulink is shown in Figure 4a. Figure 4b presents the implantation of each block in the ANN speed estimator. The ANN-based speed estimator is constructed as a linear timeinvariant dynamic system consisting of a nonlinear neural function approximator through LPFs, as shown in Figure 4b.

Step 4. Validation of the ANNs
We should test and validate the ANNs to show their performance and accuracy in this step. The testing should occur with consideration of the value of MSE, Regression. Moreover, testing the estimated values based on training and other testing data should occur. If the accuracy of ANN is not satisfied, the repeating of steps 2, 3, and 4 should be done.

Step 5. Exporting the Simulink block for the two ANNs
After releasing the effectiveness and accuracy of the ANN, exporting the ANN as a Simulink block should be done using the neural network (NN) Matlab Toolbox.
The steps for achieving an accurate estimation of the flux and rotor speed can be implemented as Code 1 for the speed estimation, while the ANN flux estimator can be implemented in the same manner. This code show that the feed forward ANN has been selected. Moreover, two hidden layers have been used with 10 and 5 neurons, respectively. Listing 1. ANN for speed estimator using NN Matlab toolbox.

ANN Speed Estimator
The input and output data of the ANN speed estimator can be collected during the training by simulating the vector-controlled IM. The construction of the ANN block in Simulink is shown in Figure 4a. Figure 4b presents the implantation of each block in the ANN speed estimator. The ANN-based speed estimator is constructed as a linear timeinvariant dynamic system consisting of a nonlinear neural function approximator through LPFs, as shown in Figure 4b. 6. Configuration and traning of NN as (net_speed = configure (net_speed, input_signals, out-put_signals)).

8.
Validating and testing the accuracy of the ANN.

9.
Generating the NN as simulink block as (gensim(net_speed,-1);).  The neural network toolbox of Matlab has been used to train, test, and validate the ANN speed estimator. Figure 5 shows implemented NN. The measured speed (which is used for training) and the estimated speed after training the ANN has been shown in Figure 6. The load torque of the motor, which has been applied for getting the training data, is also shown in Figure 6.  The neural network toolbox of Matlab has been used to train, test, and validate the ANN speed estimator. Figure 5 shows implemented NN. The measured speed (which is used for training) and the estimated speed after training the ANN has been shown in Figure 6. The load torque of the motor, which has been applied for getting the training data, is also shown in Figure 6.  The neural network toolbox of Matlab has been used to train, test, and validate the ANN speed estimator. Figure 5 shows implemented NN. The measured speed (which is used for training) and the estimated speed after training the ANN has been shown in Figure 6. The load torque of the motor, which has been applied for getting the training data, is also shown in Figure 6.  The performance of the ANN-based speed estimator considering MSE has been shown in Figure 7. Moreover, the error histogram and the regression between the estimated and actual data have been displayed in Figure 8. The figures show a linear regression between the predicted speed of the ANN-based speed estimator and the measured speed. The performance of the ANN-based speed estimator considering MSE has been shown in Figure 7. Moreover, the error histogram and the regression between the estimated and actual data have been displayed in Figure 8. The figures show a linear regression between the predicted speed of the ANN-based speed estimator and the measured speed.

ANN Flux Estimator
The input data of the ANN flux estimator are based on the measured voltages and currents in − and the rotor speed. The output is the stator and rotor fluxes.
The input and output data can be collected during the training by simulating the vector-controlled IM. The construction of the ANN block in Simulink can be shown in Figure 9. In Figure 10, the implantation of each block in the ANN flux estimator has been presented.
During the implementation of the ANN-based flux estimator, the exhaustive ANNbased flux estimator has been designed in such a linear time-invariant dynamic system. Moreover, the nonlinear neural function approximator has been interconnected among the inputs and the ANN, including the Wiener model. The inputs of the ANN-based flux estimator have been implemented through LPFs, as shown in Figure 10, with choosing the wc1 and wc2 to enhance the overall dynamic response and noise attenuation.
The neural network toolbox of Matlab has been used to train, test, and validate the ANN flux estimator. Figure 11 shows implemented ANN-based flux estimator. Figure 12 shows the input training data of the currents and voltages and the speed with adding

ANN Flux Estimator
The input data of the ANN flux estimator are based on the measured voltages and currents in α − β and the rotor speed. The output is the stator and rotor fluxes.
The input and output data can be collected during the training by simulating the vector-controlled IM. The construction of the ANN block in Simulink can be shown in Figure 9. In Figure 10, the implantation of each block in the ANN flux estimator has been presented.   During the implementation of the ANN-based flux estimator, the exhaustive ANNbased flux estimator has been designed in such a linear time-invariant dynamic system. Moreover, the nonlinear neural function approximator has been interconnected among the inputs and the ANN, including the Wiener model. The inputs of the ANN-based flux estimator have been implemented through LPFs, as shown in Figure 10, with choosing the wc1 and wc2 to enhance the overall dynamic response and noise attenuation.
The neural network toolbox of Matlab has been used to train, test, and validate the ANN flux estimator. Figure 11 shows implemented ANN-based flux estimator. Figure 12 shows the input training data of the currents and voltages and the speed with adding zoomed captures. The measured fluxes (which are used for training) and the estimated fluxes after training the ANN are shown in Figure 13. The errors between the estimated

Results and Discussions
The Matlab package has been used in order to validate the complete control system associated with the ANNs for flux and speed estimation. Figure 14 shows the proposed sensorless vector-controlled induction motor drive-based ANNs for speed and flux estimators. The ANN-based flux and speed estimators have been shown in Figure 14b. Figure  14 has been presented and implemented in Simulink to reference researchers.

Results and Discussions
The Matlab package has been used in order to validate the complete control system associated with the ANNs for flux and speed estimation. Figure 14 shows the proposed sensorless vector-controlled induction motor drive-based ANNs for speed and flux estimators. The ANN-based flux and speed estimators have been shown in Figure 14b. Figure 14 has been presented and implemented in Simulink to reference researchers.

Case 1. Training Rotor Speed and Load Torque
The response of the ANN-based speed and flux estimators has been validated in this section considering 50 s from the training speed and load torque. The speed reference values are shown in Figure 15. Also, the load torque has been changed many times, as shown in Figure 16. The speed reference with the assumed load torque disturbance ensures testing the IM sensorless drive under many operation conditions. Figure 15 shows the study case's reference actual and measured speeds. The reported actual and estimated speeds have the same track, which validates the accuracy of the ANN-based speed estimator. Figure 16 shows the load and electromagnetic torque under such a study case. For further validation of the ANN-based estimators, Figure 17 shows stator currents. Figure 18 shows the actual and estimated rotor fluxes. The zoomed capture of currents and fluxes has also been shown in Figures 17 and 18. The results validate the control system's effectiveness by using the offline ANN speed and flux estimators. Figure 19 demonstrates the successful implementation of vector control principles by visualizing αβ rotor flux components. Figure 19a shows that the αβ rotor flux components formed a circle plot between the estimated and measured rotor flux components. Moreover, Figure 19b shows that a good tracking of the estimated and actual rotor fluxes.  has also been shown in Figures 17 and 18. The results validate the control system's effectiveness by using the offline ANN speed and flux estimators. Figure 19 demonstrates the successful implementation of vector control principles by visualizing rotor flux components. Figure 19a shows that the rotor flux components formed a circle plot between the estimated and measured rotor flux components. Moreover, Figure 19b shows that a good tracking of the estimated and actual rotor fluxes.

Case 2. Speed Reversal
In this case of study, the rotor speed and load torque have been assumed, as shown in Figure 20. This case is not included in the training data set. The speed has been increased from 0 to 50 rps, and the speed is constant in the interval from 1 s to 5 s, then the speed is reversed to 50 rps. The load torque has been stepped to 10 Nm at 2 s. The reference estimated and actual rotor speeds have been shown in Figure 20. The stator current and estimated and actual rotor flux are also shown in the figure. The results prove the effectiveness of the ANN-based speed and flux estimators over the simulation time.

Case 2. Speed Reversal
In this case of study, the rotor speed and load torque have been assumed, as shown in Figure 20. This case is not included in the training data set. The speed has been increased from 0 to 50 rps, and the speed is constant in the interval from 1 s to 5 s, then the speed is reversed to 50 rps. The load torque has been stepped to 10 Nm at 2 s. The reference estimated and actual rotor speeds have been shown in Figure 20

Case 3. Pulse Load Torque Disturbance
The studied case has been implemented to validate the ANN-based speed and flux estimators against load torque disturbance. The load is pulsed from 5 Nm to 9 Nm over 4 s to 8 s. Figure 21 shows the performance of the ANN-based estimators. The presented results validate the accuracy of the fluxes and rotor speed estimations.

Case 3. Pulse Load Torque Disturbance
The studied case has been implemented to validate the ANN-based speed and flux estimators against load torque disturbance. The load is pulsed from 5 Nm to 9 Nm over 4 s to 8 s. Figure 21 shows the performance of the ANN-based estimators. The presented results validate the accuracy of the fluxes and rotor speed estimations.

Case 4. Speed Variation
The studied case has been implemented to validate the ANN-based speed and flux estimators with a gradual rotor speed variation, as shown in Figure 22. Under this case of study, the load is kept constant during the first 2 s and stepped to the double at 2 s. Figure 22 shows the performance of the ANN-based estimators. The presented results validate the accuracy of the fluxes and rotor speed estimations. Moreover, the figure illustrates the good estimation of the estimated and actual rotor flux. Figure 23 validates the high dynamic performance of the vector-controlled IM drive with ANNs speed and flux estimation.

Case 4. Speed Variation
The studied case has been implemented to validate the ANN-based speed and flux estimators with a gradual rotor speed variation, as shown in Figure 22. Under this case of study, the load is kept constant during the first 2 s and stepped to the double at 2 s. Figure  22 shows the performance of the ANN-based estimators. The presented results validate the accuracy of the fluxes and rotor speed estimations. Moreover, the figure illustrates the good estimation of the estimated and actual rotor flux. Figure 23 validates the high dynamic performance of the vector-controlled IM drive with ANNs speed and flux estimation.

Conclusions and Future Directions
Two ANNs for estimating the speed and fluxes of IM drives have been realized and analyzed in this paper. The ANN estimators have been trained based on the data of the currents and voltages as well as the measured speed and fluxes offline to save the implementation time and cost. The validation of the ANN-based estimators has been achieved via MATLAB and Simulink. A successful representation of the training, testing, and validation of the ANN estimators has been presented as a reference for engineers and researchers. The simulation results demonstrate that the ANN-based speed and flux estimators accurately estimate the speed and fluxes. The estimated speed and fluxes have the same track as the actual ones via a wide speed range considering the load torque disturbance. Other advanced ANN estimators can be applied for various AC drives and industrial applications in future work. A limitation of this presented work, the selection of such basic ANN of FFNN is due to hyperparameter optimization with an approximate gradient method that may not be used with Recurrent Neural Network (RNN). In future work, RNNs should be considered and tested, which may lead to improving the effectiveness of the estimation process rather than FFNN. Moreover, real measurements with a speedometer, magnetic field sensor, current sensors, and voltage sensors should be used with the experimental setup up for more validation of ANN estimators.

Acknowledgments:
The current research work is not funded by any organization/foundation.

Conflicts of Interest:
The authors declare no conflict of interest. Non-financial competing interest.