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

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


**Abstract:** This paper describes the modeling and control of a high-power wind energy conversion system (WECS) using a variable speed doubly fed induction generator (DFIG) with the application of an MPPT method to obtain the maximum power from the system. We applied metaheuristic algorithms such as particle swarm optimization algorithms (PSO), Harris hawk optimization (HHO), and salp swarm algorithm (SSA) to optimize the speed sensor. The simulation results indicated that the MPPT method with the proposed optimized sensor could generate optimum rotor speed to achieve maximum power output. The simulation was developed using Matlab/Simulink.

**Keywords:** WECS-DFIG system; control design; metaheuristic algorithms (PSO, HHO and SSA algorithm)

#### **1. Introduction**

In recent decades, environmental pollution has been increasing, which is worrying, and conventional energy resources are being consumed rapidly, so the world has been turning to renewable energy resources (RES) [1,2]. RES can cover the entire energy needs of the world. There are many renewable energy resources such as solar, hydroelectric, biomass and wind energy, that have a positive impact [3]. Recently, there has been a serious shortage of power generated by conventional resources, so wind power, with its advantages of low cost and clean energy, is the best choice to meet society's energy needs. Multiple generators may be used with wind turbines, such as DFIG and permanent magnet synchronous generators (PMSG). DFIG is preferred in this area because it has significant advantages [4]. Variable speed wind turbine (VSWT)-based DFIG is superior to others, in addition to its high performance, due to the light weight, low cost, and small capacity of the converters [2–5]. To ensure high performance and achieve maximum performance, it is necessary to use an MPPT method [5]. Several types of MPPT methods have been applied to extract maximum power from WECS, such as maximum speed ratio (TSR), and disturbance and observation (D&O). In this study, we are interested in speed servo control, which consists of adjusting the electromagnetic torque of the generator in order to fix the mechanical speed to a reference speed that allows maximum power to be obtained from the turbine, based on the TSR technique extract.

#### **2. Modeling of the WECS**

The wind turbine absorbs the kinetic energy of the wind and converts it into torque, which turns the rotor blades. Three factors determine the relationship between the wind energy and the mechanical energy recovered by the rotor: the density of the air, the surface area swept by the rotor, and the wind speed. Air density and wind speed are

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

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

Published: 11 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/).

climatological parameters that depend on site-dependent climatological parameters [6]. The power coefficient Cp characterizes the aerodynamic efficiency of the system (Figure 1). It depends on the characteristics of the turbine (blade dimensions, speed ratio and blade tip angle). We used an empirically approximated expression for a wind turbine using the DFIG-type generator defined as follows [7]:

$$\mathcal{C}\_p = \left[ 0.5176 \left( \frac{116}{\lambda'} \right) - 0.4\beta - 5 \right] \exp\left( \frac{-21}{\lambda'} \right) + 0.0068\lambda \tag{1}$$

with:

$$
\lambda' = \frac{1}{\lambda + 0.08\beta} - \frac{0.035}{\beta^3 + 1} \tag{2}
$$

**Figure 1.** Power coefficient as a function of the speed ratio (λ) and stall angle (β).

In order to obtain the maximum power from the turbine (Figure 1), *Cp* and *λ* must have the optimal value for *λ* = 8.1 and *Cp* = 0.48. The mechanical power of the wind turbine and the aerodynamic torque is directly determined by:

$$P\_t = 0.5 \mathbb{C}\_p(\lambda, \beta) \rho \tau R^2 V^3 \text{ and } \mathbb{C}\_{ncr} = \frac{P\_t}{\Omega\_t} \tag{3}$$

The gearbox is the connection between the turbine and the generator. It is used to match the highest speed of the generator to the slowest speed of the turbine. The figure below clarifies the structure of the wind energy conversion system (see Figure 2), and it is often modeled by the following two equations:

$$\mathbf{C}\_{l} = \frac{\Omega\_{mcr}}{\mathbf{G}} \text{ and } \quad \mathbf{C}\_{\mathcal{S}} = \frac{\Omega\_{acr}}{\mathbf{G}} \tag{4}$$

**Figure 2.** Structure of the wind energy conversion plant.

Modeling of the mechanical transmission can be represented as follows:

$$J\frac{d\Omega\_{\text{\\_\\_\text{\\_}}}}{dt} = \mathbb{C}\_{\text{mcc}} = \mathbb{C}\_{\text{\\_}} - \mathbb{C}\_{\text{em}} - \mathbb{C}\_{f} \tag{5}$$

The diagram block of the turbine of a horizontal axis variable speed wind turbine is shown in the following figure (Figure 3):

#### *The MPPT of the Proposed Wind Energy System*

The power absorbed by the wind turbine can be maximized by adjusting the coefficient *Cp*. This coefficient depends on the speed of the generator. It possible to maximize this output using a variable speed wind turbine. It is, therefore, necessary to develop control strategies to maximize the generated electric power (thus, torque) by adjusting the speed of the turbine to its reference value regardless of the wind speed reference value considered as a disturbance variable [8]. The MPPT proposed in this work is the one with known airfoil properties with a control of the speed (the *Cp* is the one previously defined). This control structure consists of adjusting the torque appearing on the shaft of the Caer turbine in order to fix its speed to a reference value. In order to achieve this, the use of speed control (PI control) is absolutely necessary. The turbine speed reference is that which corresponds to the optimum value of the speed ratio *Cpmax* (=0, constant), which allows the maximum value of *Cp* to be obtained. Then we can write:

$$
\Omega\_{ref} = \frac{\lambda\_{Cpmax} V}{R} \tag{6}
$$

The installation shown in the figure below (Figure 4) represents the implementation of the MPPT with the wind turbine.

**Figure 4.** Principle of the MPPT proposed for the wind system.

#### **3. DFIG Modeling**

The DFIG is a machine that has excelled with its vector control. It is widely used in the wind turbine industry for variable speed wind turbines for various reasons such as the reduction of stress on the mechanical parts, the reduction of noise, and the possibility of controlling active and reactive power. The DFIG model in the *d-q* reference frame [7] is given by:

$$\begin{cases} \mathbf{V\_{sd}} = \mathbf{R\_{s}i\_{sd}} + \frac{\mathbf{d}}{\mathrm{d}\mathbf{f}} \boldsymbol{\varphi\_{\mathrm{sd}}} - \mathbf{w\_{s}} \boldsymbol{\varphi\_{\mathrm{sq}}} \\ \mathbf{V\_{s\mathrm{q}}} = \mathbf{R\_{s}i\_{\mathrm{sq}}} + \frac{\mathbf{d}}{\mathrm{d}\mathbf{f}} \boldsymbol{\varphi\_{\mathrm{sq}}} - \mathbf{w\_{s}} \boldsymbol{\varphi\_{\mathrm{sd}}} \\ \mathbf{V\_{rd}} = \mathbf{R\_{r}i\_{rd}} + \frac{\mathbf{d}}{\mathrm{d}\mathbf{f}} \boldsymbol{\varphi\_{\mathrm{rd}}} - (\mathbf{w\_{s}} - \mathbf{w\_{r}}) \boldsymbol{\varphi\_{\mathrm{rq}}} \\ \mathbf{V\_{r\mathrm{q}}} = \mathbf{R\_{r}i\_{r\mathrm{q}}} + \frac{\mathbf{d}}{\mathrm{d}\mathbf{f}} \boldsymbol{\varphi\_{\mathrm{rq}}} - (\mathbf{w\_{s}} - \mathbf{w\_{r}}) \boldsymbol{\varphi\_{\mathrm{rd}}} \\ \mathbf{C\_{e\mathrm{m}}} = \frac{3}{2} \mathbf{P} \frac{\mathbf{l\_{m}}}{\mathbf{L\_{s}}} \left( \boldsymbol{\varphi\_{\mathrm{qs}}} \mathbf{i\_{dr}} - \boldsymbol{\varphi\_{\mathrm{ds}}} \mathbf{i\_{d}} \mathbf{r} \right) \end{cases} \tag{7}$$

#### **4. Proposed Optimization Algorithm**

Metaheuristics are optimization procedures that make it possible to obtain an approximate value of the optimal solution in a reasonable amount of time. The goal is to solve a set of problems in different areas without having to change the basic principle of the algorithm of the method. In our work, we propose three metaheuristic algorithms—particle swarm optimization (PSO), Harris hawks optimization (HHO), and the salp swarm algorithm (SSA)—to see which is best in relation to our system.

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

PSO is an optimization algorithm based on an evolutionary computational technique. The basic PSO was developed from swarming research such as fish flocking and bird flocking. After first being introduced in 1995, a modified PSO was introduced in 1998 to improve the performance of the original PSO. In PSO, social behavior is modeled by a mathematical equation that allows the particles to be guided during their displacement process [9–15]. The movement of a particle is influenced by three components: the inertial component, the cognitive component, and the social component. Figure 5 shows a flowchart of the method.

**Figure 5.** Flowchart of PSO.

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

The cooperative hunting behavior of Harris hawks has inspired the HHO algorithm and has been mathematically modeled [11–14]. This algorithm is a population-based algorithm, which was inspired by nature and can be investigated under three main sections of exploration, the transition from exploration to exploitation, along with actual exploitation [14]. The flowchart of the HHO algorithm is shown in Figure 6. The exploration phase of the algorithm mimics the searching behavior of the hawks for prey. This is also the first stage of the algorithm. The mathematical model for this stage has a relation as given in Equation (8) [15]:

$$\mathbf{x}(\tau+1) = \begin{cases} \mathbf{x}\_{\mathcal{I}}(\tau) - r\_1 |\mathbf{x}\_{\mathcal{I}}(\tau) - 2r\_2 \mathbf{x}(\tau)| for k \ge 0.5\\ \left(\mathbf{x}\_{\mathcal{P}}(\tau) - \mathbf{x}\_{\mathcal{M}}(\tau)\right) - r\_3 (L\_{\mathcal{B}} + r\_4 (\boldsymbol{\mu}\_{\mathcal{B}} - L\_{\mathcal{B}})) for k < 0.5 \end{cases} \tag{8}$$

where *K*,*r*1,*r*2,*r*<sup>3</sup> and *r*<sup>4</sup> are random numbers that have a range of [0, 1]. *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 numbers of *r*1,*r*2, *r*<sup>3</sup> and *r*<sup>4</sup> are updated in each iteration. *UB* and *LB* are the search space's upper and lower bounds, respectively. *xr*(*τ*) and *xm* represent a randomly selected hawk in the available population and the average position of the population of hawks, respectively.

**Figure 6.** Flowchart of HHO.

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

SSA is one of the random population-based algorithms suggested by Mirjalili [12]. SSA simulates the swarming mechanism of salps when foraging in oceans. In heavy oceans, salps usually shape a swarm known as a salp chain. In the SSA algorithm, the leader is the salp at the front of the chain, and the remainder of salps are called followers. As with other swarm-based techniques, the position of the salps is defined in an s-dimensional search space, where s is the number of variables in a given problem. Therefore, the position of all salps is stored in a two-dimensional matrix called z. It is also assumed that there is a food source called P in the search space as the swarm's target. The mathematical model for SSA is given as follows: The leader salp can change position by using the next equation [12–14]:

$$z\_{\mathfrak{n}}^1 = \begin{cases} P\_{\mathfrak{n}} + r\_1 \left( (\mathcal{U}\_{\mathfrak{n}} - l\_{\mathfrak{n}}) r\_2 + l\_{\mathfrak{n}} \right) & r\_3 \ge 0 \\\ P\_{\mathfrak{n}} - r\_1 \left( (\mathcal{U}\_{\mathfrak{n}} - l\_{\mathfrak{n}}) r\_2 + l\_{\mathfrak{n}} \right) & r\_3 < 0 \end{cases} \tag{9}$$

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

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

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


The coefficient *r*<sup>1</sup> is the essential parameter in SSA because it provides a balance between exploration and exploitation capabilities. To change the position of the followers, the next equations are utilized [16]:

$$z\_n^m = \frac{1}{2}\varepsilon\boldsymbol{\epsilon}^2 + \upsilon\_0\boldsymbol{\epsilon} \tag{11}$$

The flowchart of this algorithm is given as follows in Figure 7:

**Figure 7.** Flowchart of SSA.

#### **5. Results and Discussion**

In the simulation, the analysis was carried out in Matlab/Simulink. We present the results obtained for the dual-feed asynchronous generator (DFIG) with the application of the metaheuristic algorithm to optimize the parameters of the speed controller that provides the maximum power of the wind turbine; Figure 7 represents the block diagram used for the controller with the implementation of the applied optimization algorithms (Figure 8), which is widely used in the literature to evaluate the performance of PID controller design [13–15]. Rather than evaluating these error criteria as the objective alone, Zwe-Lee Gaing's study showed that objective combinations of these error criteria, which include eight factors, are a better way to form a common goal [15,16]. Many researchers use the method presented there. Four indices are commonly used to represent system performance: square integral error (ISE), absolute integral error (IAE), absolute temporal integral error (ITAE), and square temporal integral error (ITSE). They are defined as follows:

$$\begin{array}{l} IAE = \int |e(t)| dt \\ ITAE = \int t. |e(t)| dt \\ ISE = \int e(t)^2 dt \\ ITSE = \int t. |e(t)^2| dt \end{array} \tag{12}$$

**Figure 8.** The block diagram of the implementation of the optimization algorithm for the speed turbine control.

The table below (Table 2) presents the different parameters obtained through the optimization, showing the best results for each algorithm after several tests.


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

The colored values in the table are the best for minimum error for each algorithm used. The following figures show the evolution of various system parameters as a function of time for an average wind speed of 12 m/s and zero setting angle.

Table 2 presents the figures obtained by the most powerful algorithm, the SSA. We note that the SSA algorithm provided the optimal power coefficient Cp = 0.49 with a stall angle *β* = 0 (Figure 9) and a speed ratio *λ* = 8.1 as shown in Figure 10. Figure 11 shows the speed curve plotted with the reference speed, showing a minimum error of <sup>3</sup> <sup>×</sup> <sup>10</sup>−<sup>3</sup> and a stabilization time of 1.0274 <sup>×</sup> <sup>10</sup><sup>5</sup> s, where Figures <sup>12</sup> and <sup>13</sup> represent, respectively, the active and reactive power stabilizing at 100 s.

**Figure 9.** Power coefficient (with SSA).

**Figure 10.** Speed ratio (with SSA).

**Figure 11.** Mechanical speed (with SSA).

**Figure 12.** Variation of the stator active power (with SSA).

**Figure 13.** Variation of the stator reactive power (with SSA).

#### **6. Conclusions**

We proposed a full modeling of the VS-WECS in this paper. The system was based on a 1.5 MW DFIG, and the modeling and simulation of the wind turbine conversion chain were performed with a control architecture (MPPT) that maximized energy efficiency. Therefore, we played, on the one hand, on the efficiency of the conversion chain, and on the other hand, on the quality of the reactive power. To extract maximum power, we used a PI speed controller optimized with metaheuristic algorithms (PSO, HHO and SSA). The results obtained with the salp swarm approach (SSA) confirmed the effectiveness of our approach (stability and minimization of the wind turbine speed error). In future work, we will investigate the application of our approach to optimize a grid-connected wind farm.

**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.
