*Proceeding Paper* **Optimization of a Speed Controller of a DFIM with Metaheuristic Algorithms †**

**Chetioui Lotfi 1,\*, Zennir Youcef 2, Arabi Marwa 2, Horst Schulte 3, Bendib Riad <sup>2</sup> and Mechhoud El-Arkam <sup>2</sup>**


**Abstract:** This study proposes a control architecture based on iterative stochastic algorithms to control the doubly-fed induction machine (DFIM), often used in wind systems. We briefly present the modeling of this machine. We describe in more detail the control architecture based on indirect vector control by flux orientation (IFOC). This control architecture is optimized with the application of iterative stochastic algorithms applied to the speed controller. The optimization algorithms used were Particle Swarm Optimization (PSO), Harris Hawk Optimization (HHO) and Salp Swarm Algorithm (SSA). A comparative study under Matlab/Simulink between the different results obtained clearly shows the effectiveness of our approach.

**Keywords:** doubly-fed induction machine; IFOC-PI controller; meta-heuristic algorithms

#### **1. Introduction**

In the field of electrical energy, the world is trying to reduce its dependence on fossil fuels, which are characterized by both high greenhouse gas emissions and volatile prices. The electricity industry strives to diversify its energy mix, especially with clean and renewable energy from geothermal, biomass, solar and wind [1]. One of the current research priorities is the generation of electrical energy with the help of doubly-fed asynchronous machines using wind energy as the driving force. Integrated into a wind power system, the DFIM enables operation over a wide range of wind speeds and obtaining the maximum possible power for each wind speed. Its stator circuit is directly connected to the power grid. A second circuit on the rotor is also connected to the grid, but via power converters [2]. Because less rotor power is transferred, the cost of the converters is reduced compared to a variable speed wind turbine powered by converters on the stator. This is the main reason why this machine is used for high power generation. A second reason is the possibility of adjusting the voltage at the connection point of this machine.

The aim of this work is to improve the rotor speed control of the DFIM machine by using different meta-heuristic optimization algorithms. To achieve this goal, the work is organized as follows: an introduction and then a mathematical model of the whole, then the vector control, the optimization of the parameters of the machine's speed controller with the meta-heuristic algorithms (PSO, HHO, SSA) of the simulation results in the Matlab/Simulink environment and finally a conclusion.

#### **2. Modeling Machine and Control Design**

The model of our system (DFIM) in the *d-q* reference [3] is as follows:

$$\mathbf{V}\_{\rm sd} = \mathbf{R}\_{\rm s} \mathbf{i}\_{\rm sd} + \frac{\mathbf{d}}{\mathbf{d}t} \boldsymbol{\varphi}\_{\rm sd} - \mathbf{w}\_{\rm s} \boldsymbol{\varphi}\_{\rm sd} \tag{1}$$

**Citation:** Lotfi, C.; Youcef, Z.; Marwa, A.; Schulte, H.; Riad, B.; El-Arkam, M. Optimization of a Speed Controller of a DFIM with Metaheuristic Algorithms. *Eng. Proc.* **2023**, *29*, 13. https:// doi.org/10.3390/engproc2023029013

Academic Editors: Abdelmadjid Recioui, Hamid Bentarzi and Fatma Zohra Dekhandji

Published: 16 January 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

$$\mathbf{V\_{sq}} = \mathbf{R\_s}\mathbf{i\_{sq}} + \frac{\mathbf{d}}{\mathbf{d}\mathbf{t}}\boldsymbol{\varrho\_{sq}} - \mathbf{w\_s}\boldsymbol{\varrho\_{sd}}\tag{2}$$

$$\mathbf{V\_{rd}} = \mathbf{R\_{r}i\_{rd}} + \frac{\mathbf{d}}{\mathbf{d}t} \boldsymbol{\varphi\_{rd}} - (\mathbf{w\_{s}} - \mathbf{w\_{r}}) \boldsymbol{\varphi\_{rq}} \tag{3}$$

$$\mathbf{V\_{rq}} = \mathbf{R\_r}\mathbf{i\_{rq}} + \frac{\mathbf{d}}{\mathbf{d}t}\boldsymbol{\varphi}\_{\mathbf{rq}} - (\mathbf{w\_s} - \mathbf{w\_r})\boldsymbol{\varphi}\_{\mathbf{rd}}\tag{4}$$

$$
\boldsymbol{\varphi}\_{\text{sd}} = \mathbf{L}\_{\text{s}} \mathbf{i}\_{\text{sd}} + \mathbf{L}\_{\text{m}} \mathbf{I}\_{\text{rd}} \tag{5}
$$

$$
\boldsymbol{\uprho}\_{\text{sd}} = \mathbf{L}\_{\text{s}} \mathbf{i}\_{\text{sd}} + \mathbf{L}\_{\text{m}} \mathbf{I}\_{\text{rd}} \tag{6}
$$

$$
\boldsymbol{\varphi}\_{\rm rd} = \mathbf{L}\_{\rm rd} \mathbf{i}\_{\rm rd} + \mathbf{L}\_{\rm rd} \mathbf{I}\_{\rm rd} \tag{7}
$$

$$\mathbf{q}\_{\rm rq} = \mathbf{L}\_{\rm r}\mathbf{i}\_{\rm rd} + \mathbf{L}\_{\rm m}\mathbf{l}\_{\rm rd} \tag{8}$$

$$\mathbf{P\_s} = \frac{3}{2} \left( \mathbf{V\_{sd}} \mathbf{i\_{sd}} + \mathbf{V\_{sq}} \mathbf{i\_{sq}} \right) \tag{9}$$

$$\mathbf{Q}\_{\rm s} = \frac{3}{2} \left( \mathbf{V}\_{\rm sq} \mathbf{i}\_{\rm sd} - \mathbf{V}\_{\rm sd} \mathbf{i}\_{\rm sq} \right) \tag{10}$$

$$P\_{\mathbf{r}} = \frac{3}{2} \left( \mathbf{V\_{rd}} \mathbf{i\_{rd}} + \mathbf{V\_{rq}} \mathbf{i\_{rq}} \right) \tag{11}$$

$$\mathbf{Q\_{r}} = \frac{3}{2} \left( \mathbf{V\_{r}} \mathbf{i\_{rd}} - \mathbf{V\_{rd}} \right) \tag{12}$$

$$\mathbf{C\_{em}} = \frac{3}{2} \mathbf{p} \frac{\mathbf{L\_m}}{\mathbf{L\_s}} \left( \boldsymbol{\varphi}\_{\rm qs} \mathbf{i\_{dr}} - \boldsymbol{\varphi}\_{\rm dq} \mathbf{i\_{dr}} \right) \tag{13}$$

We applied an IFOC control method [4] to the DFIM and the Figure 1 illustrates the block diagram of control and in Figures 2 and 3, we illustrated the control diagram of current Is and speed Ω respectively.

**Figure 1.** Block diagram of control.

**Figure 2.** Control diagram of Is.

**Figure 3.** Control diagram of speed.

With Is is Isd or Isq and Vs is Vsd or Vsq.

With: *<sup>k</sup>*<sup>2</sup> <sup>=</sup> <sup>1</sup> *Rs* + *L*<sup>2</sup> *m Lr Rr* , <sup>=</sup> *<sup>σ</sup>Ls Rs* + *L*<sup>2</sup> *m Lr Rr* , *kp*<sup>2</sup> <sup>=</sup> <sup>2</sup>*σω*0*<sup>T</sup>* <sup>−</sup> <sup>1</sup> *K*2 , *ki*<sup>2</sup> <sup>=</sup> *<sup>ω</sup>*<sup>0</sup> 2*T K*2 , *kp*<sup>1</sup> <sup>=</sup> <sup>4</sup>*<sup>j</sup> Ts*, *ki*<sup>1</sup> <sup>=</sup> <sup>4</sup>*<sup>j</sup> Ts*<sup>2</sup> , <sup>Ω</sup> : speed.

#### **3. Proposed Optimization Algorithm**

The optimization with iterative stochastic algorithms is an approach to finding the best solution to complex problems by minimizing one or more fitness functions [5]. These techniques are applied in various engineering fields. In the literature, we have different methods of optimization such as combinatorial optimization, nonlinear programming and linear programming. These methods are designed to solve a wide range of optimization engineering problems [6]. The heuristics and meta-heuristics optimization techniques are classified as exact methods and approximation or stochastic methods. Exact methods are used for combinatorial optimization problems [7]. They are also classified according to the formulation of the graphs, i.e., the arc-node formulation, the path formulation, the arcbased formulation and the spanning tree formulation [8]. The other optimization methods based on approximate methods can be divided into two types: heuristic algorithms and meta-heuristic algorithms. Heuristic algorithms obtain their approximate solutions with a certain acceptable temporal and spatial complexity. In the literature [9], there are different heuristic strategies successfully applied to many problems, such as Genetic Algorithm (GA), Ant Colony Optimization (ACO), Simulated Annealing (SA), Particle Swarm Optimization (PSO), Gray Wolf Optimization (GWO), etc. [9].

#### *3.1. Particle Swarm Optimization (PSO)*

This optimization algorithm is based on a stochastic evolutionary calculation technique. The basic version of this algorithm is inspired by phenomenal biology from research on swarms such as schools of fish and flocks of birds [10–16]. Another modified version of this algorithm was introduced in 1998 to improve the performance of the basic version. In the principle of function of the PSO algorithm, the social behavior is modeled by a mathematical equation making it possible to guide the particles during their process of displacement [11–16]. The movement of a particle is influenced by three parameters: the inertia component, the cognitive component and the social component. Each parameter reflects a part of the equation, Figure 4 represents the flowchart of the algorithm.

#### *3.2. Harris Hawks Optimization (HHO)*

The principle of The Harris Hawk Optimization algorithm (HHO) is inspired by cooperative hunting behavior. This principle, which is based on the population and which is inspired by nature, has been modeled by a mathematical model [12–17]. Its principle goes through three phases: the exploration phase, the phase of the transition from exploration to exploitation and the last phase is the actual exploitation. A flowchart representing the principle of this algorithm is illustrated in the following figure (Figure 5). The first phase of the algorithm is the exploration phase. This phase of the algorithm mimics the search behavior of hawks for prey. The mathematical model of this step is illustrated by the following equations [13–19]:

$$\mathbf{x}(\tau+1) = \begin{cases} \mathbf{x}\_r(\tau) - r\_1|\mathbf{x}\_r(\tau) - 2r\_2\mathbf{x}(\tau)|fork \ge 0.5\\ \left(\mathbf{x}\_p(\tau) - \mathbf{x}\_m(\tau)\right) - r\_3(L\_B + r\_4(\mu\_B - L\_B))fork < 0.5 \end{cases} \tag{14}$$

where *K*,*r*1,*r*2,*r*<sup>3</sup> and *r*<sup>4</sup> are random parameters. *xp*(*τ*) stands for the prey's position whereas the current and the next positions of the hawk are shown by *x*(*τ*) and *x*(*τ* + 1), respectively. The random parameters are updated in each iteration. *UB* and *LB* are the search space bounds. *xr*(*τ*) refers to a randomly selected hawk and *xm* refers to the average position of the population of hawks.

**Figure 4.** Flowchart of PSO.

#### *3.3. Salp Swarm Algorithm (SSA)*

The SSA algorithm simulates the swarming principle of salps when they are feeding in the oceans [14]. Salps usually form a swarm called a salp chain, the leader of the group is the salp at the top of the chain and any remaining salps are called followers. This algorithm follows the same principle of the other algorithms, i.e., the position of the salps is defined in a search space of s dimensions, where s is the number of variables in a given problem. Hence, the position of all salps is stored in a two-dimensional matrix called z. We also assumed that there was a food source called P in the search space and that this was the swarm's target. The mathematical model that models the principle of this algorithm is given as follows: The head salp can change position using the following equation [11–14]:

$$z\_n^1 = \begin{cases} P\_n + r\_1((lI\_n - l\_n)r\_2 + l\_n) & r\_3 \ge 0 \\ P\_n - r\_1((lI\_n - l\_n)r\_2 + l\_n) & r\_3 < 0 \end{cases} \tag{15}$$

where the meanings of all symbols are shown in Table 1.

$$r\_1 = 2e^- \left(-\frac{4a}{A}\right)^2\tag{16}$$

The coefficient r1 provides a balance between exploration and exploitation capabilities. The variation of the positions of the followers is modeled by the following equation [18,19]:

$$z\_n^{\rm m} = \frac{1}{2}ce^2 + v\_0e\tag{17}$$

**Figure 5.** Flowchart of HHO.

**Table 1.** The meanings of all symbols.


**Table 1.** *Cont.*


The flowchart of this algorithm is given as follows figure (Figure 6):

**Figure 6.** Flowchart of SSA algorithm.

#### **4. Results and Discussions**

The simulation was carried out under MATLAB/SIMULINK. We present the results obtained with the control architecture chosen to control our system (DFIM). We used the different algorithms (PSO, SSA and HHO) to optimize the speed controller parameters [13–15] of the machine shown in Figure 7. In order to obtain the optimal solution, there are several formulas of the object function. Among the formulas (performance indices), we used the

following four formulas: square integral error (ISE), absolute integral error (IAE), Absolute Temporal Integral Error (ITAE) and Square Temporal Integral Error (ITSE). They have defined themselves as follows:

$$\text{IAE} = \int |\mathbf{e}(\mathbf{t})| \text{dt} \tag{18}$$

$$\text{ITAE} = \int \text{t} |\mathbf{e}(\mathbf{t})| \text{dt} \tag{19}$$

$$\text{ISE} = \int \mathbf{e}(\mathbf{t})^2 \mathbf{d}\mathbf{t} \tag{20}$$

$$\text{ITSE} = \int \text{t.} \left| \mathbf{e}(\mathbf{t})^2 \right| \mathbf{d}\mathbf{t} \tag{21}$$

**Figure 7.** The control block diagram of speed.

The different simulation results obtained with this algorithm are illustrated in the following table (Table 2):


**Table 2.** The different results obtained by optimization.

The values colored in yellow in each function are the best for a minimum error.

The curves below represent the characteristics of the machine, such as torque, current and speed, with the different algorithms applied.

The curves presented represent the results obtained by the various algorithms applied with a resisting torque (Cr = 0 (Nm)). In Figure 8, we note that the torque is stabilized at a value equal to 0.1 (s) and for the currents shown in Figures 9 and 10, we note that the currents are stable from 0.08 s. According to the speed curve obtained by the different algorithms applied (Figure 11), we can observe that the speed curve with the PSO algorithm (Figure 12) is the most efficient for our system, with a minimum error between the machine speed and the reference speed of 4 <sup>×</sup> <sup>10</sup>−4. We can also note a very good rise time of 1.4358 s. for Figure 13. We plotted the speed curve with a resistance torque of 100 (Nm) against 1000 (s) to see the impact of a disturbance on our regulation, noting that the speed curve with the parameters optimized by the algorithm (PSO) quickly returned to its input speed and was less disturbed than the output speed optimized with (HHO) and (SSA).

**Figure 8.** The curve of electromagnetic.

**Figure 9.** The rotor current on the q axis.

**Figure 10.** The rotor current on the d axis.

**Figure 11.** The mechanical speed.

**Figure 12.** The mechanical speed with PSO.

**Figure 13.** The mechanical speed with resistance torque.

#### **5. Conclusions**

In this study, we proposed a control architecture based on meta-heuristic algorithms to control the speed of our system (DFIM), since it is an important parameter to maintain a good energy rounding used in the renewable energies. To obtain optimal PID controller parameters, the meta-heuristic algorithms known as Harris Hawks Optimization (HHO), Particle Swarm Optimization (PSO) and Slap Swarm (SSA) were used. The comparison between the three algorithms used with the analysis of the fitness function was the speed error in our study. The results show that the proposed PSO-based approach can improve the stability performance and minimize the speed control error. In future work, we will apply our control design for the entire wind turbine conversion.

**Author Contributions:** Conceptualization, C.L. and Z.Y.; methodology, C.L.; software, A.M.; validation, Z.Y. and H.S.; formal analysis, C.L., A.M. and Z.Y.; writing—original draft preparation, C.L., A.M., Z.Y., M.E.-A., B.R. and H.S.; writing—review, C.L., Z.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
