A New Robust Direct Torque Control Based on a Genetic Algorithm for a Doubly-Fed Induction Motor: Experimental Validation

: The parametric variation of nonlinear systems remains a signiﬁcant drawback of automatic system controllers. The Proportional–Integral(PI) and Proportional–Integral–Derivative (PID) are the most commonly used controllers in industrial control systems. However, with the evolution of these systems, such controllers have become insufﬁcient to compete with the complexity of the systems. This problem can be solved with the help of artiﬁcial intelligence, and especially with the use of optimization algorithms, which allow for variable gains in PID controllers that adapt to parametric variation. This article presents an analytical and experimental study of the Direct Torque Control (DTC) of a Doubly-Fed Induction Motor (DFIM). The speed adaptation of the DFIM is achieved using a PID controller, which is characterized by overshoots in the speed and ripples in the electromagnetic torque. The Genetic Algorithm (GA) within the DTC shows very good robustness in speed and torque by reducing torque ripples and suppressing overshoots. The simulation of the GA-DTC hybrid control in MATLAB/Simulink conﬁrms the improvement offered by this strategy. The validation and implementation of this strategy on the dSPACE DS1104 board are in good agreement with the simulation results and theoretical analysis.


Introduction
Since the 1960s, with the application of the first power electronic components and the progressive rise of computing, the generation systems mentioned above have been progressively replaced by static converters. The latter, as they become more elaborate and gain more sophisticated control options, ensure progressive control of all electrical machines [1].
For high-power drives, there is a unique solution that employs an alternative machine operating in a rather special mode [2]. This is the DFIM with a wound rotor, offering several power supply configurations [3][4][5], with the best power supply configuration being the one where the machine is connected by two inverters, which allows the machine to be driven at overspeed, and ensures good performance at very low speeds for operation erence setpoints of speed and load torque. Figure 1 illustrates the configuration of the proposed GA-DTC; the details of the proposed control system are described in the body of the article. The organizational structure of this article is presented as follows: Section 2 describes the DFIM model in stationary frame; Sections 3 and 4 are devoted to the description of the DTC and the proposed GA-DTC strategy; Section 5 is focused on the simulation of the GA-DTC using MATLAB/Simulink, and the elaboration of the results; Section 6 is devoted to the discussion and comparison of some studies on DFIMs and describing the real implementation of the adopted GA-DTC strategy; finally, Section 7 presents the conclusions and planned future work.

α, β Model of a DFIM
It is possible to derive the mathematical model from the three-phase model by going through the Concordia hypotheses while neglecting the slot effect of the DFIM, the core loss, the saturation, etc., in a stationary reference frame. As seen in Equations (1)-(5), the DFIM model may be stated as follows: • Stator voltage components: • Rotor voltage components: = . + + .
= . + − . (2) • Stator flux components: The organizational structure of this article is presented as follows: Section 2 describes the DFIM model in stationary frame; Sections 3 and 4 are devoted to the description of the DTC and the proposed GA-DTC strategy; Section 5 is focused on the simulation of the GA-DTC using MATLAB/Simulink, and the elaboration of the results; Section 6 is devoted to the discussion and comparison of some studies on DFIMs and describing the real implementation of the adopted GA-DTC strategy; finally, Section 7 presents the conclusions and planned future work.

Direct Torque Control
DTC entails directly manipulating the motor torque and fluxes via the control sequences applied to the voltage source inverter switches [20,21]. This choice is based on the utilization of hysteresis controllers whose function is to control the state of the system-specifically, the amplitude of the fluxes (stator and rotor) and the electromagnetic torque. It is a matter of keeping these quantities within specified error limits; the outputs of the hysteresis regulators, when combined with information about the flux position, determine the optimal voltage vectors. These vectors enable the inverter VSI to reach seven distinct phase-plane positions, which correspond to the inverter output voltage vector's eight sequences [1,8].

Control Scheme
The fundamental technique of DTC of a DFIM has two parallel control channels: fluxes and torque. These are managed through three hysteresis regulators: two for stator and rotor fluxes, and the third for torque. In the first mode, the reference fluxes are direct inputs, while in the second, the reference torque (i.e., speed controller output) is the input. Estimation and regulation blocks calculate signals such as the developed torque, the flux magnitudes, and the vector sector of the fluxes. Hysteresis controllers provide digital outputs from estimated and reference values. The outputs of these controllers, combined with the main position, are used as switching table inputs to regulate the VSIs. The DFIM receives the output voltages from the inverters [1,5,8].

Block of Signal Estimation
The stator and rotor (α, β) fluxes' magnitudes can be evaluated as follows [5,8]: The developed torque can be evaluated as follows [5]: The sectors of the fluxes are divided into six sectors, each covering an angle π/3 andrepresented in a complex two-dimensional plane. The location of the space vector of fluxes in the complex plane can be represented as follows [5,8]: Each sector angle is represented by a number, which is utilized to identify the voltage vector.

Hysteresis Regulators
The calculated torque and flux values are compared to their respective references. To maintain the torque and flux values within their permissible limits, appropriate commands are generated: ∆ψ s = ∆ψ r = 1 for an increase in flux, and ∆ψ s = ∆ψ r = −1 for a decrease [5,6].
To enlarge the torque, ∆T e = 1; to reduce the torque, ∆T e = −1; to maintain it constant, ∆T e = 0. A three-level regulator is utilized for managing the torque; meanwhile, a two-level regulator is used for the flux [6]: Table   Table 1 illustrates the hysteresis comparator outputs with sector numbers. The hysteresis output voltage vectors and sector numbers are shown. The table shows the switch positions required to produce the necessary vector.

Inverters Switching
A VSI drives the DFIM model by DTC. The inverter's main function is to convert control signals into voltage signals for the motor. (S a , S b , and S c ) control the inverter states. Six switches are used for the three phases. Each phase contains two switches, which are in opposite positions [5,6,8].
When S a is 1, S a is off. When S a is 0, S a is on. The other switches can be controlled in the same way. The VSI's output voltage vector is as follows [5]: where V DC is the DC voltage.

PID Optimization by GA
Genetic Algorithms (GAs) are used to solve commercial and research challenges by computationally simulating natural selection. Gas were created by J. Holland in the 1960s and 1970s [28] to examine the impacts of mate selection, reproduction, mutation, and genetic information transfer. Constrained by their environment, various species (and individuals within species) strive to generate the fittest progeny. In the domain of genetic algorithms, the fittest potential solutions develop to produce even more optimal ones [29,30]. PID controllers are known for their robustness in linear systems, but this robustness is limited in the nonlinear case due to parametric variation. The GA optimizes the KP, KI, and KD parameters to generate optimal values for the PID regulator. Figure 2 shows the simplified structure of the GA optimization method.

PID Optimization by GA
Genetic Algorithms (GAs) are used to solve commercial and research challenges by computationally simulating natural selection. Gas were created by J. Holland in the 1960s and 1970s [28] to examine the impacts of mate selection, reproduction, mutation, and genetic information transfer. Constrained by their environment, various species (and individuals within species) strive to generate the fittest progeny. In the domain of genetic algorithms, the fittest potential solutions develop to produce even more optimal ones [29,30].
PID controllers are known for their robustness in linear systems, but this robustness is limited in the nonlinear case due to parametric variation. The GA optimizes the KP, KI, and KD parameters to generate optimal values for the PID regulator. Figure 2 shows the simplified structure of the GA optimization method. GAs are a subclass of evolutionary algorithms that use evolutionary-biology-inspired techniques such as selection, crossover, and mutation [29,31]. Section 4.1 presents descriptions of the GA sequences of operations.

GA Parameters and Operators
Gas are based on three essential steps, where each step is characterized by its own configuration parameters; the steps and parameters are described by the following axes:

Chromosome Coding
A GA's design begins with the binary coding of solutions in the form of chromosomes, which are a collection of genes or bits [32]. The main difference between GAs and other search optimization techniques is that GAs use coding methods. A GA generally uses binary coding [33,34]. It is impossible to say which coding method is optimal, as it depends on the situation. Real numbers are easier to work with, but only for specific situations. Before determining the coefficients of the PID controller, the performance limits of the PID controller must be specified. The approach created defines the lower GAs are a subclass of evolutionary algorithms that use evolutionary-biology-inspired techniques such as selection, crossover, and mutation [29,31]. Section 4.1 presents descriptions of the GA sequences of operations.

GA Parameters and Operators
Gas are based on three essential steps, where each step is characterized by its own configuration parameters; the steps and parameters are described by the following axes:

Chromosome Coding
A GA's design begins with the binary coding of solutions in the form of chromosomes, which are a collection of genes or bits [32]. The main difference between GAs and other search optimization techniques is that GAs use coding methods. A GA generally uses binary coding [33,34]. It is impossible to say which coding method is optimal, as it depends on the situation. Real numbers are easier to work with, but only for specific situations. Before determining the coefficients of the PID controller, the performance limits of the PID controller must be specified. The approach created defines the lower limit at zero PID coefficients. A GA does not work alone on an encoding problem. Therefore, the incorrect encoding format affects the GA's results. In this study, the PID parameters are encoded as a single chromosome, where each parameter is seen as a gene [32].

Assignment of the First Population
The GA performs a search from many places to find the optimal resolution. To ensure that these initial values are established correctly, it is crucial to assign the first values for the points. Population one is usually produced randomly to represent the search space as a whole. Some research implies that the first population is produced using heuristics [33].

Learning of the Regulator Gains by the GA
The GA parameters greatly influence the results of the GA. There have been numerous experiments to establish the optimal control settings [31]. The Pittsburgh learning approach was employed in this project [32]. This strategy is successful in genetic fuzzy systems. Using this technology, the PID controller coefficients are stored on a single chromosome. In Figure 3, the resulting chromosomal structure is shown.

Learning of the Regulator Gains by the GA
The GA parameters greatly influence the results of the GA. There have been numerous experiments to establish the optimal control settings [31]. The Pittsburgh learning approach was employed in this project [32]. This strategy is successful in genetic fuzzy systems. Using this technology, the PID controller coefficients are stored on a single chromosome. In Figure 3, the resulting chromosomal structure is shown.

Fitness
The choice of cost functions used to assess each gene's eligibility is essential in the GA process. In some publications [35,36], performance indices are used as cost functions. In [35], the authors compare three cost functions separately and in a weighted combination: Integral Time Absolute Error (ITAE), Integral Absolute Error (IAE), and Integral Square Error (ISE). Because the latter is more effective than the other cost functions in terms of performance, the ISE is used in this work to increase the performance of the GA [37].
The operating principle of the GA seeks to maximize or minimize a function; in our case study, the fitness function was maximized, i.e., the minimization of the ISE that-

Fitness
The choice of cost functions used to assess each gene's eligibility is essential in the GA process. In some publications [35,36], performance indices are used as cost functions. In [35], the authors compare three cost functions separately and in a weighted combination: Integral Time Absolute Error (ITAE), Integral Absolute Error (IAE), and Integral Square Error (ISE). Because the latter is more effective than the other cost functions in terms of performance, the ISE is used in this work to increase the performance of the GA [37].
The operating principle of the GA seeks to maximize or minimize a function; in our case study, the fitness function was maximized, i.e., the minimization of the ISE thatpresents the error corrected by the PID corrector; these parameters were generated by the GA to make it converge to zero as much as possible [35,37].

Initialization of Populations
In a population, individuals each solve an issue. Other studies have tried to develop population size parameters. Sometimes, small solution sizes result in inferior solutions. However, obtaining a large size takes far too long. Robertson used up to 8000 people to classify difficulties [33,38]. Grefenstette said between 10 and 160 people is optimal, while Odeyato said between 100 and 400 [39]. The GA is unable to identify the intended result for small values of the population, yet the population as a whole takes a long time to compute. As a consequence, the best experiment was run and n = 20 was chosen as the population size.

Selection Operator
In general, the selection operator refers to how the chromosomes are selected. It is possible to consider the fitness function to be a means of measuring how fit a particular chromosome is, and the fitter the chromosome, the greater the likelihood that it will be selected to spread its genes. Three critical selection techniques exist: Stochastic Sampling with Replacement Selection (SSRS) (or Roulette Wheel), Universal Stochastic Sampling (USS), and Tournament Selection (TS) [40]. The selection procedure utilized in this method was TS, as it provided the desired results after performing several experimental tests on the global system.

Crossover Operator
To accomplish this, the crossover operator selects a locus at random and exchanges subsequences to the left and right of that locus across two chromosomes (i.e., parent genes) that were selected during the selection process, to provide the children who inherit combined features with the good genes of one parent. Using binary representation, for example, two strings 11111111 and 00000000 might be crossed over at the sixth locus in one another, resulting in the production of two new offspring-11111000 and 00000111, respectively-using binary representation [41]. To avoid crossbreeding, the chance of crossbreeding must be chosen between 0.6 and 0.99 [40]. The probability value of the crossover operator was chosen to be 0.8 in this case.

Mutation Operator
The mutation operator modifies the bits or digits at a specific locus on a chromosome in a random manner; however, this occurs with a very small probability in most cases with a probability P m . For example, upon crossover, the 11111000 child string could be changed at locus two to become the 10111000 child string. Mutation adds new knowledge to the genetic pool, and prevents the population from converging too quickly to a local optimum in a given environment; [0.001, 0.01] [42] is the range in which this number must fall. The probability P m value is set to 0.001, since this is the most likely.
Considering the evolutionary rules of the GA method, a flow chart summarizing the sequence of implementation of the algorithm is shown in Figure 4. The execution steps are also addressed as follows (Algorithm 1):
Step 2. Randomly generate the regulator gains.
Step 3. Apply the DTC control.
Step 4. Evaluate the fitness function instantaneously.
Step 6. Move to the selection operation.
Step 7. Move to the crossover operation.
Step 8. Move to the mutation operation.
Step 10. Update the optimal individual and repeat Step 3 until the maximum number of iterations is fulfilled.
Step 11. Save the optimal solutions. End
Step 2.Randomly generate the regulator gains.
Step 3. Apply the DTC control.
Step 4. Evaluate the fitness function instantaneously.    A simulation of the theoretically given approach was performed using MATLAB/Simulink. The PID controller parameter values optimized by the GA fell within certain variation ranges, as shown in Table 2. Tables A1 and A2 in the Appendix A show the overall system configuration. The system is also subject to speed and torque reference conditions. The machine used for the two strategies is 1.5 kW, and they are subjected to the conditions of simulation to arrive at a valid comparison. The procedures for implementing the reference instructions are organized as follows: The overall system consisting of the controls-whether DTC or GA-DTC coupled with a DFIM-is subject to speed and torque references:

1.
A speed step of 157 rad/s is applied from 0.7 s to 2.35 s, and then the setpoint begins to decrease in the form of an affine function of negative slope down to −157 rad/s, which presents the opposite direction of rotation. This speed remains constant up to 4.65 s, and then the motor is stopped. 2.
During the speed variation, a load torque is applied to the system, which starts with a nominal load torque step of 10 Nm at 1.1-2.1 s, and then the motor remains idle until the instant 3.05-4.25 s, when a negative load torque is applied, which follows the direction of machine rotation.
After several attempts to generate the gains from the PID controllers, the algorithm ultimately converged to its optimum, giving optimal gains that gave the best results for machine performance under DTC. Controller gains from the DTC were generated by the standard synthesis method using the Bode and Nyquist diagrams. Finally, Table 3 illustrates the gains synthesized by the conventional method for the DTC, as well as the optimal optimizer gains by the GA algorithm.   The speed of the DTC control is represented in red, showing reference tracking throughout the reference setpoint, but representing a speed overshoot value of 60.14 rad/s, as shown in Figure 6a, and the response rejoins its reference, marking a response time of 61.1 ms and an undershoot of 9.826 ms due to the application of the nominal load at the instant of 1.25 s. The response speed is directly linked to its reference, marking a rejection time of 84 ms, as shown in Figure 6b. This response represents an almost-complete reference tracking during the decrease in speed and reversal of the speed rotation, as shown in Figure 6c, but one can notice overshoot and undershoot peaks due to instantaneous speed variation and the sudden application of load torque. According to Figure 6, the response speed of the GA-DTC (in blue) shows absolute tracking of the reference without overshoot and without static error, regardless of the variation in the reference and the load torque,  notice overshoot and undershoot peaks due to instantaneous speed variation and the sudden application of load torque. According to Figure 6, the response speed of the GA-DTC (in blue) shows absolute tracking of the reference without overshoot and without static error, regardless of the variation in the reference and the load torque, marking several improvements in the DTC speed performance, such as response time, overshoot, reject time, and undershoot, with remarkable rates of 18.66%, 100%, 81.07%, and 51.86%, respectively. The torque dynamics of the two controls are illustrated in Figure 7. The two responses show a follow-up of the reference setpoint of the fully complete load torque throughout the reference. The responses represent a starting torque of up to 15 Nm, which is normal because of the current demands at the start of rotation and at the sudden instants of increasing speed, whether loaded or unloaded. One can see that the undershoot in the torque presented by the DTC is corrected by the proposed GA-DTC, and is eliminated during the instants 0.7s and 4.65s, so one can observe that the DTC presents torque ripples of 2.445 Nm and 2.05 Nm for the GA-DTC, marking an improvement of 16.16%, knowing that the torque ripples are the essential factor determining the life of the DFIM. For example if in our case the motor is predicted to stop working after 10 years with the use of DTC, the lifetime will expand at a rate of 16.16%, i.e., the machine will stop working after 11.616 years, with an addition of 1.616 years as a result ofusing the GA-DTC.   The torque dynamics of the two controls are illustrated in Figure 7. The two responses show a follow-up of the reference setpoint of the fully complete load torque throughout the reference. The responses represent a starting torque of up to 15 Nm, which is normal because of the current demands at the start of rotation and at the sudden instants of increasing speed, whether loaded or unloaded. One can see that the undershoot in the torque presented by the DTC is corrected by the proposed GA-DTC, and is eliminated during the instants 0.7s and 4.65s, so one can observe that the DTC presents torque ripples of 2.445 Nm and 2.05 Nm for the GA-DTC, marking an improvement of 16.16%, knowing that the torque ripples are the essential factor determining the life of the DFIM. For example if in our case the motor is predicted to stop working after 10 years with the use of DTC, the lifetime will expand at a rate of 16.16%, i.e., the machine will stop working after 11.616 years, with an addition of 1.616 years as a result ofusing the GA-DTC.            .57% for the stator and rotor currents, respectively, generating ripples in the torque of 2.445Nm. It is known that the harmonics have an influence on the torque ripples. If the THD rate is high, we will see more ripples in the torque, decreasing the motor's lifetime. Figures 12, 13 and 14a,b illustrate the stator and rotor currents and their THDs, which determine the harmonic rate in the case of the proposed GA-DTC. It should be noted that the currents are of a sinusoidal form, which is less harmonious compared to the DTC, presenting with THD values of 4.17% and 3.95% for the stator and rotor currents, respectively, generating ripples in the torque of 2.05Nm.This marks improvements in the THDs, reaching 60.17% and 47.82%, respectively, increasing the motor's lifetime. Figures 11a,b and 15a,b show the stator and rotor voltages delivered by the voltage inverters; from the first view it can be noted that the voltages are of the two-level type. Figures 11 and 12 of the DTC are rich in pulses that present undesired harmonics, which occur as torque ripples, increasing the mechanical vibrations of the machine. From Figure  15a,b of the GA-DTC control, it can be seen that the voltages have fewer pulses, allowing   9 and 10a,b illustrate the stator and rotor currents and their THDs, which determine the harmonic rate in the case of the use of the DTC. It should be noted that the currents are of sinusoidal form, which are harmonics of the THD values of 10.47% and 7.57% for the stator and rotor currents, respectively, generating ripples in the torque of 2.445Nm. It is known that the harmonics have an influence on the torque ripples. If the THD rate is high, we will see more ripples in the torque, decreasing the motor's lifetime. Figures 12, 13 and 14a,b illustrate the stator and rotor currents and their THDs, which determine the harmonic rate in the case of the proposed GA-DTC. It should be noted that the currents are of a sinusoidal form, which is less harmonious compared to the DTC, presenting with THD values of 4.17% and 3.95% for the stator and rotor currents, respectively, generating ripples in the torque of 2.05Nm.This marks improvements in the THDs, reaching 60.17% and 47.82%, respectively, increasing the motor's lifetime. Figures 11a,b and 15a,b show the stator and rotor voltages delivered by the voltage inverters; from the first view it can be noted that the voltages are of the two-level type. Figures 11 and 12 of the DTC are rich in pulses that present undesired harmonics, which occur as torque ripples, increasing the mechanical vibrations of the machine. From Figure  15a,b of the GA-DTC control, it can be seen that the voltages have fewer pulses, allowing voltages close to the ideal voltages, and reducing the torque ripples.  Figure 16 shows the stator and rotor flux characteristics of conventional DTC and GA-DTC, which enhance the flux amplitudes by 29.7% and 24.32%, respectively, when compared to their respective values in Table 4.  Figure 16 shows the stator and rotor flux characteristics of conventional DTC GA-DTC, which enhance the flux amplitudes by 29.7% and 24.32%, respectively, compared to their respective values in Table 4. When opposed to a classic DTC, the DFIM with GA-DTC reaches its refe torque value in a far shorter amount of time. Furthermore, the torque is carefully lated in cases where the load fluctuates significantly. In terms of response time, as se Figure 7, the proposed DTC based on GA provides a satisfactory response in term speed, attaining the target speed with minimal response time and without overs Furthermore, in the case of a rapid change in load, the speed can be managed slowly Finally, based on the results of the entire study, the suggested method outperf the classic DTC. Motor control with low torque ripples may be achieved by usin approach suggested in this paper.

Rotor currents (A)
With respect to the previously stated assumptions, as well as the various pe mances presented in Table 4, the GA-DTC proposed in this article achieves its stated by showing its resilience and robustness to speed, fluxes, and torque ripples, as w currents and THDs.
The DTC enhanced by using GA allows the DFIM to be controlled more rel under a wider range of operating conditions than previously possible. Due to the fac the GA-DTC method adjusts to the machine's parametric fluctuation, it is supposed an optimal solution for variable-speed drive applications, as shown above.

Performances
Characteristics DTC GA-DTC Improvements

Practical Validation
Implementing a realistic solution allows us to evaluate the performance o GA-DTC nonlinear robust control, and to validate the necessary improvements. DS1104 "R&D" control board, manufactured by dSPACE and specifically designed

Practical Validation
Implementing a realistic solution allows us to evaluate the performance of th GA-DTC nonlinear robust control, and to validate the necessary improvements. Th DS1104 "R&D" control board, manufactured by dSPACE and specifically designed fo research and development purposes, serves as the basis of the control system. To link  The speed of the DTC control is represented in red, showing reference tracking throughout the reference setpoint, but representing a speed overshoot value of 60.14 rad/s, as shown in Figure 6a, and the response rejoins its reference, marking a response time of 61.1 ms and an undershoot of 9.826 ms due to the application of the nominal load at the instant of 1.25 s. The response speed is directly linked to its reference, marking a rejection time of 84 ms, as shown in Figure 6b. This response represents an almost-complete reference tracking during the decrease in speed and reversal of the speed rotation, as shown in Figure 6c, but one can notice overshoot and undershoot peaks due to instantaneous speed variation and the sudden application of load torque. According to Figure 6, the response speed of the GA-DTC (in blue) shows absolute tracking of the reference without overshoot and without static error, regardless of the variation in the reference and the load torque, marking several improvements in the DTC speed performance, such as response time, overshoot, reject time, and undershoot, with remarkable rates of 18.66%, 100%, 81.07%, and 51.86%, respectively.
The torque dynamics of the two controls are illustrated in Figure 7. The two responses show a follow-up of the reference setpoint of the fully complete load torque throughout the reference. The responses represent a starting torque of up to 15 Nm, which is normal because of the current demands at the start of rotation and at the sudden instants of increasing speed, whether loaded or unloaded. One can see that the undershoot in the torque presented by the DTC is corrected by the proposed GA-DTC, and is eliminated during the instants 0.7 s and 4.65 s, so one can observe that the DTC presents torque ripples of 2.445 Nm and 2.05 Nm for the GA-DTC, marking an improvement of 16.16%, knowing that the torque ripples are the essential factor determining the life of the DFIM. For example if in our case the motor is predicted to stop working after 10 years with the use of DTC, the lifetime will expand at a rate of 16.16%, i.e., the machine will stop working after 11.616 years, with an addition of 1.616 years as a result ofusing the GA-DTC. Figures 8, 9 and 10a,b illustrate the stator and rotor currents and their THDs, which determine the harmonic rate in the case of the use of the DTC. It should be noted that the currents are of sinusoidal form, which are harmonics of the THD values of 10.47% and 7.57% for the stator and rotor currents, respectively, generating ripples in the torque of 2.445 Nm. It is known that the harmonics have an influence on the torque ripples. If the THD rate is high, we will see more ripples in the torque, decreasing the motor's lifetime. Figures 12, 13 and 14a,b illustrate the stator and rotor currents and their THDs, which determine the harmonic rate in the case of the proposed GA-DTC. It should be noted that the currents are of a sinusoidal form, which is less harmonious compared to the DTC, presenting with THD values of 4.17% and 3.95% for the stator and rotor currents, respectively, generating ripples in the torque of 2.05 Nm. This marks improvements in the THDs, reaching 60.17% and 47.82%, respectively, increasing the motor's lifetime. Figures 11a,b and 15a,b show the stator and rotor voltages delivered by the voltage inverters; from the first view it can be noted that the voltages are of the two-level type. Figures 11 and 12 of the DTC are rich in pulses that present undesired harmonics, which occur as torque ripples, increasing the mechanical vibrations of the machine. From Figure 15a,b of the GA-DTC control, it can be seen that the voltages have fewer pulses, allowing voltages close to the ideal voltages, and reducing the torque ripples. Figure 16 shows the stator and rotor flux characteristics of conventional DTC and GA-DTC, which enhance the flux amplitudes by 29.7% and 24.32%, respectively, when compared to their respective values in Table 4.
When opposed to a classic DTC, the DFIM with GA-DTC reaches its reference torque value in a far shorter amount of time. Furthermore, the torque is carefully regulated in cases where the load fluctuates significantly. In terms of response time, as seen in Figure 7, the proposed DTC based on GA provides a satisfactory response in terms of speed, attaining the target speed with minimal response time and without overshoot. Furthermore, in the case of a rapid change in load, the speed can be managed slowly.
Finally, based on the results of the entire study, the suggested method outperforms the classic DTC. Motor control with low torque ripples may be achieved by using the approach suggested in this paper.
With respect to the previously stated assumptions, as well as the various performances presented in Table 4, the GA-DTC proposed in this article achieves its stated goal by showing its resilience and robustness to speed, fluxes, and torque ripples, as well as currents and THDs. The DTC enhanced by using GA allows the DFIM to be controlled more reliably under a wider range of operating conditions than previously possible. Due to the fact that the GA-DTC method adjusts to the machine's parametric fluctuation, it is supposed to be an optimal solution for variable-speed drive applications, as shown above.

Discussion and Comparison
A number of techniques for controlling the motor at different speeds and torques have been described in the technical literature for the DFIM. As an example, consider the FOC control developed by [6], which is very sensitive to variations in the parameters of the motor. The torque ripples of this strategy are 2.5 Nm, and the response time is 0.56 s. In [43,44], the authors employed the SMC-also known as the chattering phenomena-which limits the robustness of this technique in terms of performance. This method has a torque ripple of 2.5 Nm and a response time of 0.19 s. Because of the drawbacks of the controls outlined above, DTC emerges as the most suited option, and artificial intelligence approaches are among the strategies used to strengthen its resilience. As shown in Table 5, the suggested GA-DTC method enables us to achieve the highest feasible level of performance. The performance of several techniques used in the DFIM is shown in the following table: The histograms shown in Figures 17 and 18 illustrate the response time of speed and the amplitudes of the torque ripples produced by each approach. On the basis of Figure 17, one can conclude that the fastest controller is the proposed GA-DTC, while on the basis of Figure 18, one can conclude that the proposed strategy is the one with the least amount of ripples.

Practical Validation
Implementing a realistic solution allows us to evaluate the performance of the GA-DTC nonlinear robust control, and to validate the necessary improvements. The DS1104 "R&D" control board, manufactured by dSPACE and specifically designed for research and development purposes, serves as the basis of the control system. To link between the simulation and the DS1104 board, the Real-Time Interface (RTI) library is installed on the computer, and it is housed inside a physical system as an electrical device on the dSPACE board, which transfers the signals from simulation environment to the real system. The physical system of the board, including the RTI interface, takes care of the application and administration, and generates 0-5V TTL (PWM) logic signals. Suitable isolation of the TTL-CMOS control boards with a supply voltage of 0/15 V is required to operate the inverter IGBTs in conjunction with the TMS320F240 slave DSP. On the computer, a part contains emulating software (MATLAB) that enables the designers to design real-time applications using blocks that have been expressly placed in the Toolbox RTI library, which is included in the software section. The Toolbox RTI library includes blocks specific to the "Real-Time Interface" (RTI) Toolbox and its components. In addition, the RTI allows the adjustment of inputs and outputs through the use of a graphical user interface.
The "R&D DS1104" board is equipped with the Real-Time Workbench (RTW) tool, which is used to compile and transform the source code into an .sdf file. Using a computer loaded with the "ControlDesk" software, the source code that was created and converted to an .sdf file is loaded and executed. This is also used to develop designer interfaces and perform real-time controls, thus archiving programs in fully compatible "Matlab-Simulink" files and allowing observation and real-time monitoring of the system and the evolution of calculated and measured data, among other applications. When creating graphical designer interface prototypes, the following are the main procedures to follow: 1. First of all, the control system is designed using the Simulink modeling program. 2. It is necessary to simulate the system in order to generate several control results, in order to know the control validity. 3. Generation of the .sdf file using the RTI interface. 4 interfaces and perform real-time controls, thus archiving programs in fully compatible "Matlab-Simulink" files and allowing observation and real-time monitoring of the sys tem and the evolution of calculated and measured data, among other applications. When creating graphical designer interface prototypes, the following are the main procedures to follow: 1. First of all, the control system is designed using the Simulink modeling program. 2. It is necessary to simulate the system in order to generate several control results, in order to know the control validity. 3. Generation of the .sdf file using the RTI interface. 4. When the global model is run in real time, the DS1104 R&D board is used through the ControlDesk environment with a processor (MPC8240) operating at a clock fre quency equal to 250 MHz. An image of the experimental setup and a diagram showing the link between the DS1104 R&D Board and the DFIM are shown in Fig  ures 19 and 20, respectively. In order to perform the experimental test, the contro board and the RTW tool are used together. Figure 19. Image of the test bench. Figure 19. Image of the test bench. Figure 19. Image of the test bench.

Figure 20.
Global structure of the test bench. Figure 20. Global structure of the test bench.

Results and Interpretation
It is possible to validate the objectives previously set by the experiment on dSPACE DS1104 by testing the system's behavior under various working conditions after applying a variable-speed signal in both directions to the proposed GA-DTC and DFIM, either at zero charge or at full charge, using 10 Nm and −10 Nm as the parameters. Figure 21a,b, as well as  show that the results of the simulations and experiments are identical. When the speed rapidly changes in both directions, the transition from 0 to 157 rad/s and from −157 rad/s to 0 occurs quickly and without exceeding the limit (Figure 21a). When applying a variable torque, temporary changes in the reference values cause the appearance of peaks in the speed profiles, and the stator and rotor currents have a sinusoidal form that varies with the charge (Figures 22 and 23). As shown in the figures, there is excellent agreement between the results of the simulation and the results obtained on the ground during these applications.

Results and Interpretation
It is possible to validate the objectives previously set by the experiment on dSPACE DS1104 by testing the system's behavior under various working conditions after applying a variable-speed signal in both directions to the proposed GA-DTC and DFIM, either at zero charge or at full charge, using 10Nm and −10Nm as the parameters. Figure 21a,b, as well as  show that the results of the simulations and experiments are identical. When the speed rapidly changes in both directions, the transition from 0 to 157 rad/s and from −157 rad/s to 0 occurs quickly and without exceeding the limit (Figure 21a). When applying a variable torque, temporary changes in the reference values cause the appearance of peaks in the speed profiles, and the stator and rotor currents have a sinusoidal form that varies with the charge (Figures 22 and 23). As shown in the figures, there is excellent agreement between the results of the simulation and the results obtained on the ground during these applications.     Figure 21a,b show the speed response at variable setpoints (from 0 rad/s to 157 rad/s, and from −157 rad/s to 0 rad/s), as shown in the previous figure. Generally speaking, the response times are reasonable (in simulation and in practice). Furthermore, it is important to point out that the speed is set to the specified values, with good dynamic behavior and no detectable exceedances. In addition, there are no static errors, despite the  Figure 21a,b show the speed response at variable setpoints (from 0 rad/s to 157 rad/s, and from −157 rad/s to 0 rad/s), as shown in the previous figure. Generally speaking, the response times are reasonable (in simulation and in practice). Furthermore, it is important to point out that the speed is set to the specified values, with good dynamic behavior and no detectable exceedances. In addition, there are no static errors, despite the fact that there is a slight increase in torque ripples in practice as a result of the measurement noise and the machine's parameters, as illustrated in Figure 24. Figure 25a,b show the control pulses delivered by the switching tables of the GA-DTC, which are delivered to control the inverters of the DFIM at variable frequencies. It can be seen that the pulses are in the form of a variable-frequency pulse train, to control the inverters and the DFIM according to the variation of the speed and load. fact that there is a slight increase in torque ripples in practice as a result of the measurement noise and the machine's parameters, as illustrated in Figure 24. Figure 25a,b show the control pulses delivered by the switching tables of the GA-DTC, which are delivered to control the inverters of the DFIM at variable frequencies. It can be seen that the pulses are in the form of a variable-frequency pulse train, to control the inverters and the DFIM according to the variation of the speed and load.
The circular flux curves of the stator and rotor are shown in Figure 26, which demonstrates that the fluxes are maintained within a specified range determined by the hysteresis comparator's range. The results obtained are consistent with those obtained as a result of simulating the situation.   The circular flux curves of the stator and rotor are shown in Figure 26, which demonstrates that the fluxes are maintained within a specified range determined by the hysteresis comparator's range. The results obtained are consistent with those obtained as a result of simulating the situation. Figure 26a,b show the stator and rotor voltages delivered by the voltage inverters, respectively; at first glance, the voltages appear to be similar to the voltages found by simulation, indicating that they are harmonized with fewer harmonics than the classical DTC.  Figure 26a,b show the stator and rotor voltages delivered by the voltage inverters, respectively; at first glance, the voltages appear to be similar to the voltages found by simulation, indicating that they are harmonized with fewer harmonics than the classical DTC.
Finally, we can summarize the advantages and disadvantages of using optimization algorithms such as the GA used in this study, as follows: Advantages: -Allows an optimal reference monitoring profile. Finally, we can summarize the advantages and disadvantages of using optimization algorithms such as the GA used in this study, as follows: Advantages: -Allows an optimal reference monitoring profile. -Adaptation with a sudden change in front of a system's internal and external disturbances. -Rapid optimization of the gains of a regulator such as the PID -Can be used as an estimator of parameters sensitive to physical variations.

Disadvantages:
-Convergence of solutions towards local solutions. - Estimates of the parameters of the genetic algorithm, such as the population size and the number of iterations; requires more than two weeks to have a reduced execution time with optimal gains.

Conclusions
A Genetic-Algorithm-based PID optimization algorithm for DTC applied to a DFIM was developed. This configuration was simulated in MATLAB/Simulink and practically validated using a dSPACE DS1104testboard. This study shows an enhancement of the dynamics of classic DTC via optimizing and updating the PID coefficients KP, KI, and KD in each interval to adapt to the system nonlinearity. The proposed GA-DTC control demonstrated significant improvements in speed overshoot and rejection time, fluxes and torque ripples, and current THD. The following items highlight the improvements made to the DFIM's performance:

•
Reducing the speed overshoot, with and without load torque.

•
Reducing the disturbance rejection time by 81.07%.

•
Minimizing the ripples of the stator and rotor fluxes, as well as torque ripples, with improvements of 29.71%, 24.32%, and 16.16%, respectively. • Acceptable enhancements in the current THDs, by 60.17% and 47.82%, respectively.

•
The practical validation findings obtained using ControlDesk confirmed the simulated results obtained via MATLAB/Simulink.
A significant improvement was shown in the proposed technique in the form of faster response, fewer ripples, and higher precision and robustness, confirming the achievement of the targets outlined earlier in this paper.
With a view to advancing the technological research conducted in the laboratory, our research team has chosen to undertake the following tasks as part of its future work:

•
Validation of ANN-DTC for DFIMs using a dSPACE board.

•
Elaboration of the review of the techniques applied to DFIMs.

Conflicts of Interest:
The authors declare no conflict of interest.
Appendix A