Design and Experimental Validation of a Hybrid GWO-PSO Tuned PI Controller for Predictive Direct Power Control in SAPF

Design and Experimental Validation of a Hybrid GWO-PSO Tuned PI Controller for Predictive Direct Power Control in SAPF

Moncef Khitas Hamza Afghoul* Feriel Abdelmalek Djallal Eddine Zabia Lahcene Ziet

LEPCI Laboratory, Electronics department, Faculty of Technology, Setif 1 University- Ferhat ABBAS, Setif 19000, Algeria

LAS Laboratory, Automation and intelligent systems department, Faculty of Technology, Setif 1 University- Ferhat ABBAS, Setif 19000, Algeria

LI3CUB Laboratory, Department of Electrical Engineering, University of Biskra, Biskra 07000, Algeria

Corresponding Author Email: 
hamza.afghoul@univ-setif.dz
Page: 
963-974
|
DOI: 
https://doi.org/10.18280/jesa.580510
Received: 
4 April 2025
|
Revised: 
11 May 2025
|
Accepted: 
22 May 2025
|
Available online: 
31 May 2025
| Citation

© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

This paper presents an optimized proportional–integral (PI) controller enhanced by a hybrid Grey Wolf Optimization–Particle Swarm Optimization (GWO–PSO) algorithm for Predictive Direct Power Control (PDPC) of a Shunt Active Power Filter (SAPF). The proposed GWO–PSO algorithm combines the global search efficiency of Grey Wolf Optimization with the fast convergence of Particle Swarm Optimization to effectively tune the parameters of an anti-windup PI controller. This hybrid tuning approach significantly improves the controller’s dynamic response and harmonic suppression capability under nonlinear and dynamic load conditions. The optimization aims to minimize overshoot in the DC-link voltage, reduce power fluctuations, and ensure compliance with the IEEE 519-2014 harmonic standard. The controller was experimentally validated using a dSPACE 1104 platform. Results demonstrate a reduction in Total Harmonic Distortion (THD) from 4.2% (conventional PI) to 3.8% (proposed method) and an improvement in the DC-link voltage settling time from 33 ms to 30 ms, representing a 9.1% reduction. These outcomes confirm the GWO–PSO-tuned PI controller's effectiveness and practical potential for improving power quality in SAPF systems.

Keywords: 

power quality, THD, GWO, PSO, Shunt Active Power Filter, Predictive Direct Power Control

1. Introduction

Changes in many domains, such as business, industry, and residences, have helped power electronics systems develop much recently [1]. These changes have made nonlinear loads like regulated rectifiers, variable speed drives, and switching power supplies more important. Harmonic distortion is a serious concern with these technologies, even though they make systems more efficient and versatile. This arises because loads do not act in a straight line: the sinusoidal waveforms of currents and voltages in electrical networks are messed up, which makes the powerless good [2]. Bad distortion has repercussions that you cannot see. It changes the voltage and current waveforms, increases power losses, lowers system efficiency, overheats electrical components, and damages sensitive equipment [1].

Harmonics may make equipment break down faster and increase operation and maintenance expenses. This can be a massive concern for utilities and end users, both technically and financially. For this reason, harmonic mitigation must be done in a manner that is always the same, works well, and is of good quality to keep the power supply stable [3]. Two main types of filters may help with harmonic distortion: passive and active power filters (APFs).

Passive filters are easy to use and cheap. They are made up of inductors, resistors, and capacitors. They still cannot adjust to changing working circumstances and are built up to block specific harmonic frequencies [3]. Conversely, APFs, especially Shunt Active Power Filters (SAPFs), have become more reliable and adaptable. By introducing compensating currents to the system, they actively cancel out harmonics across a larger range of frequencies [4]. When the load changes, this occurs. How well a SAPF is significantly regulated impacts how well it works. Proportional-integral (PI) controllers are becoming more popular since they are simple and straightforward [5]. PI controllers keep the system running smoothly by adjusting the proportional and integral gain to bring the real system output closer to the reference signal. It could change how well things operate if you change the settings. If you do not tune your PI controllers appropriately, your system may not be stable, your harmonic correction might not work well, and you could have oscillations you do not want [3].

In complicated and variable places, traditional tuning methods like the Ziegler-Nichols or heuristic methods do not function well. Because of these problems, scientists have been seeking new ways to tune, especially those that employ metaheuristic optimization algorithms (MOAs) [6]. Some of the methods that have worked well for improving PI controller settings include ant lion optimization [6], particle swarm optimization (PSO) [7], and grey wolf optimization (GWO) [8]. They achieve this by looking at significant solution areas and lowering hand-tuning hazards. These approaches also have issues, such as taking too long to converge and being prone to being stuck in a local minimum.

This research suggests adopting a hybrid Grey Wolf Optimizer–Particle Swarm Optimizer (GWO-PSO) method to improve the performance of the PI controller in SAPF systems to solve these problems. The GWO-PSO approach combines the GWO's balance between exploration and exploitation with the PSO's quick convergence. This mixed technique is excellent at finding solutions to challenging nonlinear optimization issues. It also improves global search and lowers the chance of early convergence. GWO-PSO might be a helpful way to fine-tune PI parameters in harmonic compensation applications since it is easy to use, adaptable, and affordable [9].

The SAPF design was implemented as an optimization problem with numerous aims, such as faster response time, maintaining the DC connection's voltage at the reference value, and reducing the electrical voltage THD for the current source. We utilized the GWO-PSO method to solve the problem. The findings were compared to those of past studies to show that the recommended method worked.

The enhanced PDPC approach, PI-GWO-PSO-PDPC, works, as shown by real-time platform execution. Endurance tests in real conditions demonstrated that PI-GWO-PSO is stable and changes with time. The recommended control unit has been proven to speed up reactions, lower overvoltage, and lower DC link voltage. A look at past experiments demonstrates that this new method works.

2. Overview of SAPF Architecture and Control Technique

Modern power systems use SAPFs extensively to reduce harmonic distortions, offset reactive power, and improve general power quality. These filters operate by injecting compensating currents into the grid to offset nonlinear loads. The control algorithms used determine how successful SAPFs are in suppressing harmonics and effectively controlling reactive power [10]. Several control strategies have been presented to maximize SAPF performance.

Using mathematical transformations, conventional methods such as the synchronous reference frame (SRF) technique and the instantaneous reactive power theory (p–q theory) separate harmonic components and provide suitable compensation signals [10, 11]. More complex methods, such as artificial neural networks (ANNs) and fuzzy logic control (FLC) [12, 13], have been investigated to increase adaptation and dynamic responsiveness. Moreover, model predictive control (MPC) has been popular since its switching operation optimization and real-time forecasting powers [6].

Usually including multiple key components, the SAPF system architecture consists of the control algorithm, power supply unit, nonlinear load, and voltage source inverter (VSI). Usually, a setup provides sufficient current compensation utilizing a VSI with pulse-width modulation (PWM). Maintaining the required running power to store VSI energy, a DC-link capacitor, and precision sensing and signal processing circuits track important system variables like voltage and current in real time [12].

This section details the design of each component within the integrated SAPF system. Figure 1 depicts the overall configuration.

Figure 1. Overall system diagram of the studied SAPF configuration

3. Predictive Direct Power Control (PDPC)

Literally, PDPC is a sophisticated control method that aims at quick and exact power compensation. Unlike traditional DPC [14], which depends on hysteresis controllers and switching tables [15], PDPC uses a predictive model of the power system to calculate ideal switching states. This method dramatically lowers switching losses and improves dynamic responsiveness [16]. PDPC means real-time grid voltage, load current, and filter current estimate. One minimizes a cost function to choose the best switching state that preserves power balance and lowers THD [17]. Reduced processing complexity enhanced transient responsiveness and resilience against grid fluctuations define the benefits of PDPC. However, issues like parameter sensitivity and the need for exact system modelling must be resolved to guarantee dependable functioning [6].

4. DC Bus Controller Design

DC bus voltage management is critical to the correct operation of SAPF. The DC voltage control loop provides accurate reference for active power in PDPC and keeps the bus voltage steady at a preset reference value. This study compares the performance of a proposed PI-GWO-PSO controller to existing PI controllers. The investigation focuses on assessing the PI-GWO-PSO controller's efficacy and performance, specifically its impact on the stability and regulation of the DC bus voltage in SAPF.

4.1 Design of standard PI controller

Figure 2 shows the closed-loop representation of the SAPF's DC bus regulation. A reference value ($V_{D C}^*$) is used to compare the measured DC bus voltage ($V_{D C}$). The PI controller receives this error as an input [18]. The instantaneous active power $P^*$ is then produced by $V_{D C}$ multiplying the output of this controller ($I_{s \max }$) by ($V_{D C}$). By ensuring that the DC bus voltage stays within the specified reference value, this control mechanism helps the SAPF to operate steadily and effectively [19,20].

Eq. (1) provides the system's transfer function (TF), and Eq. (2) provides the TF of the PI controller:

$P(s)=\frac{1}{C_{D C} \cdot s}$                      (1)

$C_c(s)=K_{p c}+\frac{K_{i c}}{s}$                      (2)

Figure 3 presents the voltage regulation loop and is given by Eq. (3):

$G(s)=\frac{V_{D C}}{V_{D C}{ }^*}=\frac{\frac{K_{p c}}{C_{D C}}+\frac{K_{i c}}{C_{D C}}}{s^2 \frac{K_{p c}}{C_{D C}} s+\frac{K_{i c}}{C_{D C}}}$                           (3)

When simplifying Eq. (2), Eq. (3) has been gotten which is a second degree:

$G(s)=\frac{V_{D C}}{V_{D C}{ }^*}=\frac{2 \xi \omega_n s+\omega_n^2}{s^2+2 \xi \omega_n s+\omega_n^2}$                 (4)

Figure 2. PI controller-based DC bus architecture

Figure 3 shows the conventional PI controller to maintain the DC bus of the SAPF at a reference value.

Figure 3. Structure of the PI controller integrated into the PDPC algorithm

The gains $k_{p c}$ and $k_{i c}$ are given by the identification of Eqs. (5)-(6). They are given by the following expression:

$k_{p c}=2 . \xi . \omega_n . C_{D C}$                        (5)

$k_{i c}=C_{D C} . \omega^2$                         (6)

4.2 Proposed GWO-PSO

MOAs are intended to search for the best solutions within a specific range. The GWO-PSO hybrid method, a new development, combines the strengths of GWO and PSO to increase exploitation and exploration while searching for optimum solutions. The fundamental goal of this hybrid GWO-PSO approach is to avoid premature convergence and improve accuracy in discovering the global optimal solution, especially in complicated, multi-modal search spaces. The method seeks to balance local refinement and global research using the complementing properties of GWO and PSO, resulting in improved performance in a wide range of optimization tasks.

4.2.1 Grey wolf optimization

Grey wolf optimization algorithm draws inspiration from the hunting strategies exhibited by grey wolves [21]. Grey wolves hold a significant position as apex predators, occupying the uppermost tier of the food chain. Their collective hunting prowess is particularly noteworthy; they are renowned for their adeptness at cooperative group hunting. These groups generally consist of 5 to 12 members on average and can be categorized into four types: alpha $\left(\alpha_{G W O}\right)$, beta $\left(\beta_{G W O}\right)$, delta $\left(\delta_{G W O}\right)$, and omega $\left(\omega_{G W O}\right)$. A distinctive aspect of their behavior is the strict adherence to a well-defined social hierarchy, visually represented in Figure 4.

Figure 4. Hierarchy of GWO

The alpha wolf is pivotal in decision-making concerning hunting, resting locations, wake-up schedules, and other pack-related affairs in the grey wolf hierarchy. The alpha $(\alpha)$ is commanding, dictating the pack's actions and, therefore, earns the "alpha wolf" [6]. Following the alpha is the beta, constituting the next tier in the grey wolf hierarchy. Beta wolves collaborate with the alpha in decision-making and active participation in pack endeavors. The beta $(\beta)$ wolf assumes a dual role as the alpha's advisor and enforcer of pack discipline. They must respect the alpha while leading the lower-ranked members, namely the delta $(\delta)$ and omega $(w)$. Sitting at the lowest rung of the hierarchy, the omega wolf is tasked with a critical function as a scapegoat. While the omega might appear less influential, its absence has been observed to trigger internal conflicts and turmoil within the entire pack. Figure 5 shows the hunting techniques of grey wolves.

Figure 5. Hunting techniques employed by grey wolves [21]

If a wolf does not fall into the alpha, beta, or omega categories, it is referred to as a delta. Delta wolves submit to the authority of the alpha and beta members but wield dominance over omega wolves. The fundamental stages of grey wolf hunting behavior are depicted in Figure 5; Stage (a) encompasses tracking, approach, and pursuit of prey. Subsequent stages (b) through (d) correspond to pursuit, harassment, and the strategic encircling of the prey. The static encounter and attack on the prey are depicted in phase (E) [21].

(1) GWO algorithm's mathematical formulas

The social hierarchy, tracking, encircling, and attacking aspects of the GWO algorithm can be captured through the following mathematical equations [6]:

$\vec{D}=\left|\vec{C} . \vec{X}_p(l)-\vec{X}(l)\right|$                       (7)

$\vec{X}(l+1)=\left|\vec{X}_p(l)-\vec{A} \cdot \vec{D}\right|$                        (8)

where:

$l$:Iteration number.

$\vec{A}$ and $\vec{C}$: Coefficients vectors.

$\vec{X}_p$: The prey's position vector and $\vec{X}$ refers to a position vector for a grey wolf.

$\vec{D}$: The distance between wolves and prey.

$\vec{C}$ and $\vec{A}$ vectors can be expressed by:

$\vec{C}=2 . \vec{r}_1$                        (9)

$\vec{A}=2 . \vec{a} . \vec{r}_2-\vec{a}$                        (10)

where, $\vec{r}_1, \vec{r}_2$ are two randomly generated numbers falling within the range $[0,1]$. These parameters are subject to variation within each iteration. And, $\vec{a}$ commences from 2 and gradually decreases to 0 across the iterations.

$\vec{D}_\alpha, \vec{D}_\beta$ and $\vec{D}_\delta$ representing the separations between wolves' distances of different categories, and the prey, are defined as follows:

$\begin{aligned} & \vec{D}_\alpha=\left|\vec{C}_1 . \vec{X}_\alpha-\vec{X}\right| \\ & \vec{D}_\beta=\left|\vec{C}_2 . \vec{X}_\beta-\vec{X}\right| \\ & \vec{D}_\delta=\left|\vec{C}_3 . \vec{X}_\delta-\vec{X}\right|\end{aligned}$                    (11)

where:

$\vec{D}_\alpha$: Distance between wolves in this category ($\alpha$) and their prey.

$\vec{D}_\beta$: Distance between wolves in this category $(\beta)$ and their prey.

$\vec{D}_\delta$: Distance between wolves in this category ($\delta$)and their prey.

$\vec{C}_1, \vec{C}_2$ and $\vec{C}_3$: Represent coefficient vectors corresponding to the first three best positions $\vec{X}_1, \vec{X}_2$ and $\vec{X}_3$.

$\vec{X}_\alpha, \vec{X}_\beta$ and $\vec{X}_\delta$: Refer to the best, 2nd best, and 3rd best search agents, respectively, within the algorithm.

The first three best positions (solutions) of the grey wolves, denoted as $\vec{X}_1, \vec{X}_2$ and $\vec{X}_3$ are:

$\begin{aligned} & \vec{X}_1=\vec{X}_\alpha-\vec{A}_1 .\left(\vec{D}_\alpha\right) \\ & \vec{X}_2=\vec{X}_\beta-\vec{A}_2 .\left(\vec{D}_\beta\right) \\ & \vec{X}_3=\vec{X}_\delta-\vec{A}_3 .\left(\vec{D}_\delta\right)\end{aligned}$                      (12)

Eq. (13) that updates the positions of the prey for the best search agent's position is expressed as follows:

$\vec{X}(l+1)=\frac{\vec{X}_1+\vec{X}_2+\vec{X}_3}{3}$                         (13)

4.2.2 PSO technique

One of metaheuristic optimization is PSO that uses swarms to find the global optimum. A population-based exploration strategy drives the search. What sets PSO apart is its unique inspiration from bird social behavior. It portrays candidate solutions as particles, each with its position in the search space represented by $x$. Every particle has a velocity $v$, which determines its movement in terms of distance, direction, and step size. In addition to its position and velocity, each particle remembers its best position $\left(P_{\text {best}}\right)$. In contrast, the best position any particle in the swarm reaches is called the global best $\left(G_{\text {best}}\right)$ [22]. PSO’s simplicity stems from its ease of implementation and minimum requirement for parameter adjustment. The particle’s velocity is changed according to specific rules, allowing for fine-tuning its path toward better solutions. This velocity adjustment is crucial in optimization because it helps balance exploration (finding new regions of the solution space) with exploitation (fine-tuning existing potential solutions). PSO is a metaheuristic optimization approach that uses swarms to find the global optimum [7].

PSO’s simplicity stems from its ease of implementation and minimum requirement for parameter adjustment. The particle’s velocity is changed according to specific rules, allowing for fine-tuning its path toward better solutions. This velocity adjustment is crucial in optimization because it helps balance exploration (finding new regions of the solution space) with exploitation (fine-tuning existing potential solutions). The rules for velocity updates are expressed as follows:

$\begin{aligned} & v_i(k+1)=r_1 c_1\left(P_{\text {best }(i)}(k)-x_i(k)\right) \\ & +w v_i(k)++r_2 c_2\left(G_{\text {best }(i)}(k)-x_i(k)\right)\end{aligned}$                       (14)

$x_i(k+1)=x_i(k)+v_i(k+1)$                         (15)

where:

$\omega$: The inertial weight constant regulates the influence of the particle's previous velocity on its current velocity.

$c_1$ and $c_2$: These are the cognitive and social coefficients, respectively. They control the weight given to the particle's personal best $\left(P_{\text {best}}, i\right)$ and the best position among the group ($G_{\text {best}}$) when updating the velocity.

$r_1$ and $r_2$: These are uniformly distributed random variables within the range $[0,1]$, contributing to the stochastic nature of the algorithm.

$P_{\text {best}}, i$: Represents the personal best position of particle $i$.

$G_{\text {best}}$: Represents the best particle position among all members of the swarm.

4.2.3 GWO-PSO

GWO component features three essential agents: Alpha $(\alpha)$, Beta $(\beta)$, and Delta $(\delta)$, which represent the most effective solutions found thus far. These wolves, known as Omega wolves, coordinate the movements of the remaining population and lead the search [7]. The GWO mathematical model updates the locations of all search agents (wolves) based on their relative attraction to $\alpha, \beta$, and $\delta$. This technique helps the GWO strike a balance between exploration and exploitation. The agent’s updated locations are determined using the following Eqs. (11) and (12).

The PSO component updates each agent's velocity depending on its previous velocity and attraction to the newly calculated coordinates $X_1, X_2$ and $X_3$. The formula for updating velocity in PSO is as follows:

  • Velocity update

$\begin{aligned} & v_i(k+1)=w \cdot v_i(k)+C_1 \cdot r_1 \cdot\left(X_1-X_i\right)+ \\ & +C_2 \cdot r_2 \cdot\left(X_2-X_i\right)+C_3 \cdot r_3 \cdot\left(X_3-X_i\right)\end{aligned}$                       (16)

  • Position update

$X_i(k+1)=X_i(k)+v_i(k+1)$                           (17)

This equation adjusts each agent’s position based on the newly estimated velocity. The hybrid method achieves the best balance of exploration and exploitation by combining GWO’s exploitation-driven technique with PSO’s velocity-based exploration.

4.2.4 Anti-windup PI controller tuned by GWO-PSO

The PI-GWO-PSO controller efficiently manages the DC link in the SAPF. However, the anti-windup PI controller's dependence on an accurate mathematical model presents challenges when dealing with system nonlinearities and parameter variations. Consequently, the PI anti-windup controller, designed using conventional methods, struggles to perform optimally across different operating conditions. To address this, the GWO-PSO algorithm is proposed to enhance the anti-windup PI controller's performance. The optimization process focuses on three parameters of the PI-GWO-PSO controller $\left(K_{p c}, K_{i c}\right.$ and $\left.G_a\right)$. The GWO-PSO algorithm aims to solve an objective function that minimizes overall costs, with the study targeting three key objectives: reducing DC link voltage overshoot, minimizing the instantaneous $\left(T H D_i\right)$ of supply current, and controlling the instantaneous error in the DC link voltage loop $(\varepsilon(t))$.

A fitness function evaluates the robustness of the PDPC-SAPF model during its iterative execution, determining the relevance of each search agent until the algorithm reaches the maximum specified iterations. As depicted in Figure 6, the PDPC-SAPF model operates using the closed-loop transfer function of the DC link voltage and the anti-windup PI controller. The number of problem variables corresponds to the initial set of search agents, randomly generated by the GWO-PSO algorithm. In this case, the search agent operates in a three-dimensional space $\left(K_{p c}, K_{i c}\right.$ and $\left.G_a\right)$. With each iteration, the GWO-PSO algorithm adjusts these parameters. After running the PDPC-SAPF model, the fitness function evaluates the parameter values, and the optimal parameters are those that minimize the fitness function.

The study aims to reduce power fluctuations, mitigate over and under-voltages in the DC link, and reduction of $(T H D)$. The ideal PI-GWO-PSO controller gains $\left(K_{p c}, K_{i c}\right.$ and $\left.G_a\right)$ are determined by solving the following equation, which minimizes the fitness function.

  • Minimize F

$J=J_1+J_2+J_3$                      (18)

To reduce the error related to the DC-link voltage in both transient and steady states, the Integral Time Square Error (ITSE) index is utilized to select $J_1$ [6]. The ITSE can be defined as follows:

$J_1=w_1 \int_0^t t .(\varepsilon(t))^2 d t$                         (19)

$J_2$ can be expressed as follows and represents the overshoot in the DC-link voltage that was noticed:

$J_2=w_2 \frac{D_{\max }-D_{\infty}}{D_{\infty}}$                          (20)

where:

$D_{\text {max}}$: Maximum value.

$D_{\infty}$: Final value.

To enhance power quality, The THD of the source current is represented by the formula for $J_3$, which is as follows:

$J_3=w_3 \frac{\sqrt{\sum_{n=2}^{\infty} I_n^2}}{I_f} \times 100$                       (21)

$J_3$ involving the Root Mean Square (RMS) values of $I_s$ for the nth harmonic ($I_n$) and the fundamental ($I_f$).

Different impacts are assigned coefficients, which are the weighting factors $w_1, w_2$ and $w_3$. The relative significance of each impact in the overall assessment is established by these weights. The absolute values of these weights sum together are [6]:

$\left|w_1\right|+\left|w_2\right|+\left|w_3\right|=1$                       (22)

Several investigations revealed that raising the weight allocated to f1 (ITSE) increased overshoot and undershoot. In contrast, increasing the weight provided to f3 (THD) resulted in a significant steady-state inaccuracy and increased overshoot and undershoot.

The proposed GWO-PSO based PI controller is illustrated in Figure 6.

Figure 6. Block diagram of proposed PI-GWO-PSO

The pseudo code of GWO-PSO used to tune the proposed controller of SAPF is listed in Algorithm of Figure 7.

Figure 7. GWO-PSO pseudo-code

Table 1. Key parameters used in the PSO component of the GWO–PSO algorithm

Parameter

Symbol

Value

Rationale

Inertia Weight

$\omega$

0.9 → 0.4

Linearly decreased to balance exploration and exploitation

Cognitive Coefficient

$c_1$  

2

Encourage personal (particle-level) best experience

Social Coefficient

$c_2$

2

Promotes cooperation and swarm intelligence

Swarm Size

/

30

Common default for balance between convergence and computation cost

Maximum Iterations

$\max$_$iter$

100

Sufficient for convergence based on empirical tuning

Velocity Limits

$v \max _{\min }$

±20% of search range

Prevents particles from overshooting solutions

The development of the control parameter $a$ across iterations is analyzed to show how the GWO-PSO algorithm transitions from global exploration to local exploitation. Figure 8 illustrates that the parameter $a$ drops linearly from 2 to 0, promoting exploration in the early phases and gradually favoring exploitation. This behavior is crucial for avoiding premature convergence and ensuring $a$ strong global search capacity during first iterations, which progressively improves solution refinement in later stages.

Figure 8. Evolution of the control parameter $a$ across Iterations in the GWO-PSO algorithm

The parameters for the PSO component of the hybrid GWO-PSO algorithm are carefully chosen to strike a compromise between convergence speed and solution quality. The cognitive and social coefficients ($c_1$ and $c_2$) are both set to 2 , encouraging both individual and group learning. The inertia weight $\omega$ decreases linearly from 0.9 to 0.4 throughout the shift from exploration to exploitation. Table 1 contains details on this and other parameter settings.

Figure 9 depicts the whole workflow for the proposed hybrid GWO-PSO-based PI controller tuning method. The method starts with the initialization phase, which generates a set of candidate solutions at random inside the chosen search space, each representing a combination of and gains. Next, each candidate's performance is assessed using a composite fitness function that incorporates primary potwer quality objectives: overshoot (ITSE), DC-link voltage variation, and THD, with weights $w_2=0.1, w_1=0.6$, and $w_3=0.3$.

Figure 9. Flow diagram of the hybrid GWO–PSO-based PI tuning process

The hybrid GWO-PSO method is then used to update the search agents' locations and velocities based on a combination of exploitation (by the GWO leadership hierarchy) and exploration (via PSO velocity updates). Figure 8 illustrates how the control parameter $a$ declines linearly over repetitions, ensuring a gentle shift from exploration to exploitation.

The iterative procedure continues until a convergence condition is fulfilled. Finally, the best-performing PI parameter set is retrieved and used for real-time control in the SAPF system. This hierarchical tuning method assures that the controller performs reliably and adaptively under dynamic load and nonlinear situations.

5. Experimental Results

Figure 10 depicts the experimental setup for a study involving a SAPF; as illustrated, the setup includes several key components essential for the analysis and implementation of the filter. These components are listed in Table 2 and consist of a PC equipped with dSPACE1104 for control and data acquisition, a three-phase voltage source to simulate the power supply, and an oscilloscope for monitoring electrical signals. The setup also features an RL load to simulate real-world load conditions, a SEMIKRON universal converter that combines rectifier and inverter functionalities, and filtering inductors (L) to smooth out the current. Current and voltage sensors are integrated to measure electrical parameters accurately, and a power analyzer is used to assess the performance and efficiency of the SAPF. This comprehensive setup allows for detailed experimentation and validation of the filter's ability to mitigate harmonic distortions and improve power quality in electrical systems.

Figure 10. Photo of the experimental setup

Table 2. Experimental components specifications

Number

Components Names

1

PC + dSPACE 1104

2

Three-phase voltage source

3

Oscilloscope

4

RL load

5

SEMIKRON Universal Converter (Rectifier + Inverter)

6

Filtering inductors $\left(L_{f_{a, b, c}}\right)$

7

Current sensors

8

Voltage sensors

9

Power Analyzer

5.1 Theoretical analysis of PI-GWO-PSO performance

The PI-GWO-PSO controller’s superior performance, evidenced by reduced THD. This subsection provides a mathematical analysis of how gain tuning enhances the SAPF dynamic response, crediting GWO-PSO’s exploration and exploitation features, and compares its performance with other optimization algorithms and conventional tuning methods.

The GWO-PSO algorithm minimizes the fitness function $J=w_1 f_1+w_2 f_2+w_3 f_3$, where $f_1$ is overshoot, $f_2$ is integral time square error, and $f_3$ is THD. From Eq. (3) the gains $K_p$ and $K_i$ determine the system's damping ratio ($\zeta$) and natural frequency $\left(\omega_n\right)$:

$\left.\omega_n=\sqrt{\frac{K_i}{C_{D C}}}\right), \quad \zeta=\frac{K_p}{2 \sqrt{K_i C_{D C}}}$                      (23)

Optimal $K_p$ increases $\zeta$, reducing overshoot, while $K_i$ adjusts $\omega_n$, speeding up the response to minimize ITSE. The anti-windup gain $G$ mitigates integrator saturation, further reducing overshoot under nonlinear loads.

GWO-PSO's balanced exploration-exploitation optimizes the closed-loop response, enhancing damping and harmonic suppression, making it superior for dynamic SAPF applications.

5.2 Analysis of results

In steady-state conditions, Figure 11 shows the performance of a SAPF managed under steady-state settings utilizing a PDPC technique. The oscilloscope records four color-coded waveforms: blue source voltage $\left(\mathrm{V}_{\mathrm{s}}\right)$, yellow source current $\left(I_s\right)$, pink load current $\left(I_L\right)$, and green filter current $\left(I_f\right)$. The source voltage is constant and almost sinusoidal, suggesting a constant power supply. Minor distortion in the source current reflects the effect of nonlinear loads. Harmonics from nonlinear devices seriously damage the load current; the filter current shows a compensatory waveform that actively suppresses these harmonics. These experimental findings demonstrate that, despite nonlinear loads, the enhanced PDPC approach minimizes harmonic distortion in the current source, thereby improving power quality.

Figure 11. Steady-state experimental results of the SAPF controlled using PDPC

Using Fresnel diagrams to show the phase angle ($\Phi \mathrm{VA}$) between voltage $\left(\mathrm{V}_1\right)$ and current $\left(\mathrm{A}_1\right)$, Figure 12 compares voltage and current phase relationships before and after applying the SAPF, therefore reflecting power factor (PF) and harmonic distortion. With voltage at 23.0 V and current at 3.3 A, the system displays a phase angle of $+16^{\circ}$ before filtering (Figure 12a), suggesting a mostly inductive load and a poor power factor. This leads to higher power losses and poorer efficiency.

Figure 12. Comparative analysis of steady-state voltage and current phases using Fresnel diagrams, a) Before filtering, and b) After plug-in SAPF

Following the SAPF (Figure 12b), the voltage rises slightly to 23.5 V and the current to 3.4 A ; the phase angle falls sharply to $+0.1^{\circ}$, indicating a near-unity PF. This shows how well the SAPF minimizes harmonic distortion and aligns current with voltage. The Fresnel's will show the SAPF's potential to improve power quality by lowering phase angle deviation and thereby adjusting the power factor. These experimental findings demonstrate SAPF's usefulness in applications related to power quality improvement, as they confirm that it increases system performance and energy economy.

Figures 13a and 13b emphasize the effect on power quality improvement of experimental power factor (PF) measurements obtained before and after integrating a SAPF into a three-phase system.

Figure 13. Experimental evaluation of power factor correction via SAPF, a) Before filtering, and b) After plug-in SAPF

Inductive behavior and the existence of reactive power were indicated by somewhat below unity (+0.938,+0.900, and +0.937) power factor values for phases L1, L2, and L3 before SAPF installation (Figure 11a). Corresponding phase angles varied from +15° to +21°, therefore verifying a clear phase shift between voltage and current.

With $\cos (\Phi)$ values nearing +1.000 and phase angles decreasing close to 0°, SAPF activation (Figure 13b) enhanced the power factor substantially to near unity ( +0.996 to +0.995 ). Minimal reactive power was indicated.

These findings show how well SAPF fixes phase shift and power factor, raising system efficiency and quality. This confirms that the SAPF is a dependable means of improving power quality in invaluable applications.

Under three conditions: without filtering, with an SAPF using a PI controller, and with an SAPF using a PI-GWO-PSO controller. Figure 14 compares THD in a three-phase system. Reflecting the degree of waveform distortion by harmonics, THD is a fundamental measure of power quality.

The waveforms reveal significant distortion, suggesting a high THD level before filtering (Figure 14a). Respectively verifying low power quality owing to unfiltered harmonic content, voltage, and current values are +33.6 V and +4.3 A, respectively.

The waveform clearly shows less distortion with the SAPF and PI controller (Figure 14b). The PI controller's modest efficacy in lowering harmonics is evident: voltage falls somewhat to +31.8 V, and current rises to +4.9 A.

The waveform becomes almost sinusoidal with the SAPF and PI-GWO-PSO controller (Figure 14c), suggesting a significant decrease in THD. Rising to +35.5 V and +4.7 A, respectively, voltage and current values highlight the excellent harmonic suppression capability of the PI-GWO-PSO controller.

These experimental findings show that the PI-GWO-PSO controller provides far superior THD reduction even if the PI controller enhances power quality. This emphasizes how well-developed control techniques such as PI-GWO-PSO might improve the dependability and efficiency of power systems. Modern power electronics and the continuous advancement of high-performance active power filters depend on such methods.

Figure 14. Experimental THD results, a) before filtering, b) Plug in SAPF with PI controller, c) Plug in SAPF with PI-GWO-PSO controller

In transient state, Figure 15 shows the transient behavior of a three-phase electrical system subjected to two load change scenarios using both a conventional PI controller and a proposed hybrid PI-GWO-PSO controller. Oscilloscope traces provide a visual analysis of the system's dynamic response.

PI Controller: When the load shifts from a purely resistive (RL) to a resistive-inductive (RL/LR) configuration at around 2 ms and back to RL at approximately 4.2 ms, the DC voltage (blue) remains relatively stable. However, the current (yellow), load current (pink), and filter current (green) exhibit clear oscillations following each transition, which gradually subsides as the system regains a steady state.

Proposed PI-GWO-PSO Controller: Under the same load conditions, the proposed controller significantly reduces oscillations and speeds up stabilization. The DC voltage remains stable throughout, while the current waveforms return to steady state more quickly, indicating better control performance.

The proposed PI-GWO-PSO controller outperforms the traditional PI controller in transient response, offering quicker damping and enhanced system stability during dynamic load changes. These results highlight the controller's potential for improving the performance and reliability of modern power systems, and they encourage further research into intelligent optimization-based control strategies for power electronics applications.

Figure 15. Transient state experimental results for two changes of load, a) PI controller, b) GWO-PSO-PI controller

Comparatively to a standard PI controller, Figure 16 shows the experimental transient response of a SAPF system after a step change in the DC bus voltage reference (Vdc*), thereby evaluating the performance of a suggested advanced controller. Captured on an oscilloscope, the findings show how well each controller controls dynamic changes.

PI Controller (Figure 16a): The blue DC voltage increases rapidly and settles upon the step increase in $V_{D C}^*$. The source current (yellow), load current (pink), and filter current (green) do, however, show clear oscillations. Gradually settling these currents suggests a modest dynamic reaction from the PI controller.

In the same situation, the suggested PI-GWO-PSO controller (Figure 16b) also guarantees a fast DC bus voltage rise and stabilization. However, the transient behavior of the current waveforms is substantially enhanced; oscillations are negligible, and steady state is obtained much quicker, therefore indicating a more responsive and stable system.

Figure 16. Transient state experimental results for a step of $V_{D C}^*$, a) PI controller, b) GWO-PSO-PI controller

In conclusion, this comparison study verified the suggested controller's improved dynamic performance over the conventional PI method. Faster stabilization and lower oscillations point to better management of transient events, which is essential for improving SAPF system dependability and efficiency. These results confirm the need for smart and hybrid control strategies in contemporary power electronics.

Table 3 presents a comprehensive summary of the experimental results comparing the performance of a conventional PI controller and the proposed PI-GWO-PSO (hybrid PI anti-windup controller tuned by GWO-PSO) controller in a SAPF system. The analysis focuses on steady-state and transient-state performance using key performance indicators such as THD, PF, settling time (tr), and overshoot (D) characteristics.

Table 3. Summary of main experimental results

 

Steady State

Transient State

THD (%)

PF

Tr1 (ms)

D1 (%)

Tr2 (ms)

D2 (%)

Tr3 (ms)

D2 (%)

PI

4.2

0.99

33

6

45

6

160

0

GWO-PSO-PI

3.8

0.99

30

3.33

35

3.33

120

0

Figure 17 presents the harmonic spectrum before and after applying the SAPF, measured using a power analyzer in three-phase setup. Before filtering, the harmonic amplitude contributing to the 19.6% THD. With PI-GWO-PSO, this is reduced to THD of 3.9%. PI-GWO-PSO’s tighter gain tuning reduces odd harmonics more effectively, as evidenced in Figure 17.

Figure 17. Harmonic spectrum before and after SAPF turned on, a) Before SAPF on, b) PI controller, c) PI-GWO-PSO

The results comply with IEEE 519-2014 standards for low-voltage systems, which specify a THD limit of 5% and individual odd harmonic limits of 4% for orders 3 to 11. The PI-GWO-PSO controller’s THD (3.9%) and individual harmonics are well below these thresholds, unlike the unfiltered case (19.6% THD). PI-GWO-PSO’s hybrid exploration-exploitation ensures superior suppression by avoiding local minima in gain tuning.

These results indicate that the PI-GWO-PSO controller significantly outperforms the traditional PI controller by minimizing transient distortions, reducing overshoots, and stabilizing the system more rapidly during sudden operating conditions.

The proposed PI-GWO-PSO controller benefits both transient and steady-state settings. It reduces THD by 0.4% in steady state, generating a higher overall power quality and a cleaner current waveform. With a high-power factor of 0.99, both controllers underline the system's efficiency.

The proposed controller provides a transient state analysis:

  • Durations of stabilization and settling provide faster dynamic adaptation.
  • Lowered run-through levels improve control smoothness and reduce the load on system components.
  • Zero-third overshoot is an outstanding achievement showing improved damping and control.

Applications like renewable energy systems, electric motors, and power distribution networks that need real-time performance and rapid recovery from load changes that is, applications depend on these developments specifically.

6. Conclusions

This study has demonstrated the effectiveness of a hybrid GWO-PSO-tuned PI anti-windup (PI-GWO-PSO) controller in enhancing the performance of SAPF systems. Through comprehensive experimental validation, the proposed controller significantly reduced harmonic distortion, improved the power factor and provided a faster transient response compared to a conventional PI controller. These results highlight the potential of integrating metaheuristic optimization techniques with classical control strategies to enhance power quality and improve dynamic system performance.

The analysis emphasizes the crucial role of advanced optimization algorithms, particularly hybrid methods such as GWO-PSO, in overcoming the limitations inherent in traditional controllers in nonlinear and dynamic environments. By effectively minimizing overshoot, reducing THD, and accelerating system stabilization, the proposed approach contributes to the development of more stable, efficient, and reliable modern power systems.

The success of the PI-GWO-PSO controller encourages further research in this domain. Future work may focus on :

  • Enhancing the GWO-PSO algorithm for improved convergence speed and robustness against disturbances.
  • Investigating real-time optimization through online adaptive gain tuning for industrial environment, where the PI controller parameters are adjusted dynamically using a lightweight version of the GWO-PSO algorithm to respond to time-varying operating conditions.
  • Conducting comparative studies with other metaheuristic algorithms such as Whale Optimization Algorithm (WOA), Differential Evolution (DE), or Ant Colony Optimization (ACO).
  • Extending the approach to more complex topologies, including grid-connected renewable energy systems and multi-inverter architectures.

Such advancements would strengthen the role of intelligent and adaptive control strategies in realizing robust, flexible, and high-performance power electronic systems tailored to the evolving demands of smart grids and modern energy applications.

  References

[1] Bighash, E.Z., Sadeghzadeh, S.M., Ebrahimzadeh, E., Blaabjerg, F. (2018). Adaptive-harmonic compensation in residential distribution grid by roof-top PV systems. IEEE Journal of Emerging and Selected Topics in Power Electronics, 6(4): 2098-2108. https://doi.org/10.1109/JESTPE.2018.2792303

[2] Ouchen, S., Benbouzid, M., Blaabjerg, F., Betka, A., Steinhart, H. (2020). Direct power control of shunt active power filter using space vector modulation based on supertwisting sliding mode control. IEEE Journal of Emerging and Selected Topics in Power Electronics, 9(3): 3243-3253. https://doi.org/10.1109/JESTPE.2020.3007900

[3] Afghoul, H., Krim, F., Chikouche, D., Beddar, A. (2016). Robust switched fractional controller for performance improvement of single phase active power filter under unbalanced conditions. Frontiers in Energy, 10: 203-212. https://doi.org/10.1007/s11708-015-0381-7

[4] de Araujo Ribeiro, R.L., Rocha, T.D.O.A., de Sousa, R.M., dos Santos, E.C., Lima, A.M.N. (2014). A robust DC-link voltage control strategy to enhance the performance of shunt active power filters without harmonic detection schemes. IEEE Transactions on Industrial Electronics, 62(2): 803-813. https://doi.org/10.1109/TIE.2014.2345329

[5] Rahmani, S., Hamadi, A., Al-Haddad, K., Dessaint, L.A. (2013). A combination of shunt hybrid power filter and thyristor-controlled reactor for power quality. IEEE Transactions on Industrial Electronics, 61(5): 2152-2164. https://doi.org/10.1109/TIE.2013.2272271

[6] Bekakra, Y., Zellouma, L., Malik, O. (2021). Improved predictive direct power control of shunt active power filter using GWO and ALO–Simulation and experimental study. Ain Shams Engineering Journal, 12(4): 3859-3877. https://doi.org/10.1016/j.asej.2021.04.028

[7] Rafique, W., Khan, A., Almogren, A., Arshad, J., Yousaf, A., et al. (2022). Adaptive fuzzy logic controller for harmonics mitigation using particle swarm optimization. Computers, Materials & Continua, 71(3): 4275-4293. https://doi.org/10.32604/cmc.2022.023588

[8] Abdelmalek, F., Afghoul, H., Krim, F., Zabia, D.E., Krim, S.A., Bouzidi, B.M.N., Boukhdanna, A.E. (2024). Experimental implementation of direct power control for a SAPF with a PI controller tuned using grey wolf optimization. In 2024 International Conference on Advances in Electrical and Communication Technologies (ICAECOT), Setif, Algeria, pp. 1-6. https://doi.org/10.1109/ICAECOT62402.2024.10828779

[9] Singh, N., Singh, S.B. (2017). Hybrid algorithm of particle swarm optimization and grey wolf optimizer for improving convergence performance. Journal of Applied Mathematics, 2017(1): 2030489. https://doi.org/10.1155/2017/2030489

[10] Monfared, M., Golestan, S., Guerrero, J.M. (2013). Analysis, design, and experimental verification of a synchronous reference frame voltage control for single-phase inverters. IEEE Transactions on industrial Electronics, 61(1): 258-269. https://doi.org/10.1109/TIE.2013.2238878

[11] Barva, A.V. (2023). Analysis of SAPF based on p-q and SRF theory for different supply and load conditions. In 2023 International Conference on Power, Instrumentation, Energy and Control (PIECON), Aligarh, India, pp. 1-6. https://doi.org/10.1109/PIECON56912.2023.10085722

[12] Bouafia, A., Krim, F., Gaubert, J.P. (2009). Fuzzy-logic-based switching state selection for direct power control of three-phase PWM rectifier. IEEE Transactions on Industrial Electronics, 56(6): 1984-1992. https://doi.org/10.1109/TIE.2009.2014746

[13] Qasim, M., Khadkikar, V. (2014). Application of artificial neural networks for shunt active power filter control. IEEE Transactions on Industrial Informatics, 10(3): 1765-1774. https://doi.org/10.1109/TII.2014.2322580

[14] Noguchi, T., Tomiki, H., Kondo, S., Takahashi, I. (2002). Direct power control of PWM converter without power-source voltage sensors. IEEE Transactions on Industry Applications, 34(3): 473-479. https://doi.org/10.1109/28.673716

[15] Essoussi, B., Moutabir, A., Bensassi, B., Ouchatti, A., Zahraoui, Y., Benazza, B. (2023). Power quality improvement using a new DPC switching table for a three-phase SAPF. International Journal of Robotics and Control Systems, 3(3): 510-529. https://doi.org/10.31763/ijrcs.v3i3.1042

[16] Afghoul, H., Krim, F., Chikouche, D., Beddar, A. (2015). Design and real time implementation of fuzzy switched controller for single phase active power filter. ISA Transactions, 58: 614-621. https://doi.org/10.1016/j.isatra.2015.07.008

[17] Boopathi, R., Indragandhi, V. (2025). Enhancement of power quality in grid-connected systems using a predictive direct power controlled based PV-interfaced with multilevel inverter shunt active power filter. Scientific Reports, 15(1): 7967. https://doi.org/10.1038/s41598-025-92693-3

[18] Afghoul, H., Chikouche, D., Krim, F., Babes, B., Beddar, A. (2016). Implementation of fractional-order integral-plus-proportional controller to enhance the power quality of an electrical grid. Electric Power Components and Systems, 44(9): 1018-1028. https://doi.org/10.1080/15325008.2016.1147509

[19] Abdelmalek, F., Afghoul, H., Krim, F., Zabia, D.E., Belahcene, T.L., Krim, S.A. (2024). A shunt active power filter’s PI and fuzzy DPC control comparison. AIJR Abstracts, pp. 80-81. https://books.aijr.org/index.php/press/catalog/book/163/chapter/2888.

[20] Umadevi, A., Lakshminarasimman, L., Sakthivel, A. (2023). Optimal design of shunt active power filter for mitigation of interharmonics in grid tied photovoltaic system. Electric Power Systems Research, 220: 109232. https://doi.org/10.1016/j.epsr.2023.109232

[21] Mirjalili, S., Mirjalili, S.M., Lewis, A. (2014). Grey wolf optimizer. Advances in Engineering Software, 69: 46-61. https://doi.org/10.1016/j.advengsoft.2013.12.007

[22] Boudechiche, G., Sarra, M., Aissa, O., Gaubert, J.P., Benlahbib, B., Lashab, A. (2020). Anti-windup FOPID-based DPC for SAPF interconnected to a PV system tuned using PSO algorithm. European Journal of Electrical Engineering, 22(4-5): 313-324. https://doi.org/10.18280/ejee.224-503