# Optimizing Power Flow in Photovoltaic-Hybrid Energy Storage Systems: A PSO and DPSO Approach for PI Controller Tuning

Samira Heroual, Belkacem Belabbas, Yasser Diab, Mohamed Metwally Mahmoud, Tayeb Allaoui, Naima Benabdallah

<figure><img src="image_1.png" /></figure>

## ► To cite this version:

Samira Heroual, Belkacem Belabbas, Yasser Diab, Mohamed Metwally Mahmoud, Tayeb Allaoui, et al. Optimizing Power Flow in Photovoltaic-Hybrid Energy Storage Systems: A PSO and DPSO Approach for PI Controller Tuning. International Transactions on Electrical Energy Systems, 2025, 2025 (1), 10.1155/etep/9958218. [hal-05224307](https://hal.science/hal-05224307v1)

HAL Id: hal-05224307

https://hal.science/hal-05224307v1

Submitted on 26 Aug 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research Article

# Optimizing Power Flow in Photovoltaic-Hybrid Energy Storage Systems: A PSO and DPSO Approach for PI Controller Tuning

Samira Heroual ID,<fnref n="1" /> Belkacem Belabbas ID,<fnref n="1" /> Yasser Diab ID,<fnref n="2" />

Mohamed Metwally Mahmoud ID,<fnref n="3" /> Tayeb Allaoui ID,<fnref n="1" /> and Naima Benabdallah ID,<fnref n="1" />

Correspondence should be addressed to Samira Heroual; samira.heroual@univ-tiaret.dz and Yasser Diab; yasser.diab@univ-nantes.fr

Received 25 April 2024; Accepted 12 February 2025

Academic Editor: Sujin Bureerat

Copyright © 2025 Samira Heroual et al. International Transactions on Electrical Energy Systems published by John Wiley & Sons Ltd. This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.

This paper focuses on developing power management strategies for hybrid energy storage systems (HESSs) combining batteries and supercapacitors (SCs) with photovoltaic (PV) systems. The proposed control scheme is based on proportional-integral (PI) controllers optimized with particle swarm optimization (PSO) and duplicate particle swarm optimization (DPSO) algorithms. The aim is to reduce peak current and the energy management system's response time while enhancing the system's stability during the charging and discharging of the HSS under various operating conditions. A comparative study with other tuning methods is presented to demonstrate the effectiveness of the proposed DPSO algorithm in particle duplication, population diversity, and the convergence speed toward the global optimum, enhancing the overall system's performance. The results demonstrate the feasibility and robustness of the PI - DPSO in providing quick and accurate responses even under variable load, variable solar irradiations, and variable temperature, thus enhancing the dynamic response of the SC and reducing battery stress, resulting in a longer lifespan for the HESS.

**Keywords:** duplicate particle swarm optimization; energy stability; hybrid energy storage system; photovoltaic systems optimization; power management and control; proportional-integrator

## 1. Introduction

1.1. Background. Renewable energy sources (RESs) have the potential to reduce greenhouse gas emissions and enhance the wellbeing of the Earth by reducing global dependence on fossil fuels. Electricity generation from solar and wind energy sources has experienced an unprecedented growth in recent years [1].

However, solar and wind energy sources are not continuously available and exhibit variable and intermittent energy patterns over different timeframes, which poses a serious challenge to electric power system operator in maintaining a reliable electricity supply [2]. As a result, the

need for an energy storage system (ESS) has become increasingly crucial in addressing the issue of supply-demand imbalance over various durations. ESS can help mitigate power fluctuations caused by intermittency of RES, such as wind and solar. ESS are designed to improve the quality and stability of electricity before it is delivered to the load. However, a single ESS has limited capacity to meet all the requirements of a specific application. Therefore, a viable solution is to combine two or more ESS to create a composite hybrid energy storage system (HESS) [3].

The power-sharing control of these various ESS is essential for their integration to exploit of their complementary qualities to achieve a good balance between energy

<footnote n="1">¹Department of Electrical Engineering, Laboratory of L2GEGI, Ibn Khaldoun University, Tiaret, Algeria</footnote>

<footnote n="2">²Nantes Atlantique Electrical Energy Research Institute, IREENA-UR 4642, Nantes University, Saint-Nazaire 44600, France</footnote>

<footnote n="3">³Electrical Engineering Department, Faculty of Energy Engineering, Aswan University, Aswan 81528, Egypt</footnote>
density and extended lifecycle [4–6]. The most common forms of energy storage are electrical, mechanical, and chemical. One of the most critical chemical storage systems is lithium (Li) batteries, known for their high energy density but low power density, resulting in low charge/discharge rates. Supercapacitor (SC) are incorporated into the system to overcome this issue because they have a high power density and can undergo many charge/discharge cycles [7–9].

A HESS configuration with a battery and SC offers fast response, high power and energy ratings, short and long discharging durations, and a fast response. Furthermore, SC helps smooth peak demands and supports the battery during short backup periods [10, 11]. The HESS is interfaced with a bidirectional converter to ensure a two-way power flow [12].

**1.2. Literature Review.** Several researchers have proposed different control strategies applied to battery/SC. These works are briefly outlined in Table 1.

**1.3. Research Gap and Motivation.** Considering the instantaneous variation of both the load and the photovoltaic (PV) plant, as well as the imperative need for a quick response time of the SC to ensure system stability under various operating conditions, relying on conventional methods based on pole placement (PP) for tuning proportional-integral (PI) controllers proves insufficient, resulting in several drawbacks, including a large initial overshoot, sensitivity to controller gains ($K_p$ and $K_i$), and sluggish response to unexpected disturbances. Furthermore, using heuristic approaches like particle swarm optimization (PSO) to improve PI controller settings might finally lead to a local optimum in a high-dimensional environment. This approach has an impoverished convergence rate during the iterative procedure and also in terms of performance.

**1.4. Contribution.** This paper proposes a new PSO algorithm called duplicate particle swarm optimization (DPSO). This algorithm serves as a heuristic approach to fine-tuning the parameters of a PI controller. The primary focus of this algorithm is to reduce the peak current and effectively address the response time challenges associated with the SCs. The potential benefits of DPSO in ensuring the system's stability under different operational conditions are discussed. In addition, it is also motivated by its ability to efficiently explore the search space through particle duplication, which can be advantageous for addressing complex problems such as PI optimization, which is demonstrated. In this innovative approach, DPSO is tailored to address the specific challenges associated with the control of static converters in energy storage systems. The algorithm's unique features, particularly particle duplication, are leveraged to enhance the efficiency and effectiveness of optimizing PI controllers. This approach is expected to bring improvements in system performance, including enhanced stability, more precise control, and potentially increased energy efficiency.

By applying DPSO to PI controller optimization in the realm of static converters, the authors aim to push the boundaries of conventional control strategies. The outcome of this novel application is anticipated to contribute to advancements in the design and operation of energy storage systems, fostering improvements in overall system performance and reliability. One of the best features of DPSO is that it gives the PI controller a great robustness to unexpected disturbances providing quick responses under various operating conditions.

A comparative study with other tuning methods (PP_PSO) is presented to provide empirical evidence on the superiority of the proposed PP_PSO controller in enhancing the performance of the overall system. This comparative study serves to demonstrate the feasibility and effectiveness of the DPSO algorithm introduced to optimize the PI controller, resulting in improved system performance and robustness. In addition, the proposed control scheme can also improve power quality by minimizing the ripples of the power, which can harm sensitive loads, thereby improving power quality.

**1.5. Paper Organization.** This paper is organized as follows: Section 2 is dedicated to the system description and modeling. Section 3 deals with the EM of the HESS. The HESS control system is explained in detail in Section 4. The design steps of the proposed control strategy are developed in Section 5. Section 6 addresses the sensitivity analysis and the convergence of the PSO and DPSO. Section 7 presents the simulation model and analyzes the results obtained. Finally, Section 8 summarizes the conclusions of the study.

## 2. Description of the System

Figure 1 shows the schematic design of the system employed in this study, which includes a PV system linked to a HESS via a bidirectional converter in addition to their parameters presented in Tables A1, A2, A3, and A4. The PV generator is linked to a DC/DC converter, and a maximum power point tracking (MPPT) controller based on the Perturb and Observe (P & O) algorithm is utilized to extract the maximum PV energy.

The batteries are used to store the excess of PV power for later use when needed. In addition, SC are used because of their ability to absorb and deliver power quickly. An PM algorithm determines the reference currents for either the battery or the SC. The battery's reference currents are regulated using a PI controller. In contrast, the SC reference currents are determined from a PI control loop whose parameters $K_{P\_SC}$ and $K_{i\_SC}$ are optimized based on PP, PSO, and DPSO algorithms.

**2.1. PV Array Model.** The PV cell model used in this study is depicted in Figure 2. For a more detailed understanding of the modeling of this solar cell, please refer to [35, 36].

**2.2. HESS.** The HESS incorporates two power sources: a Li battery and an SC.
<table><caption>TABLE 1: Literature review.</caption><thead><tr><td>Authors</td><td>Year</td><td>Major findings</td></tr></thead><tbody><tr><td>Rocabert et al. [13]</td><td>2018</td><td>This work focuses on the integration of electrochemical batteries with supercapacitors for grid-supporting applications. The wide range of SC working voltage requires a power conversion step to integrate the ESS into a common DC bus, which is why it was suggested a power control loop distributing power flow for optimized performance and grid-frequency support, typically involving a battery bank; however, the power control indicates a slow dynamic response consequently decrease lifespan of the overall system</td></tr><tr><td>Jaarsveld and Rupert [14]</td><td>2020</td><td>The research presented an intelligent control system for the HESS such as a battery-supercapacitor using the fuzzy logic controller (FLC) approach. However, this approach is sensitive to changes in the model and data parameters and requires a precise system model</td></tr><tr><td>Augustine, Mishra, and Lakshminarasamma [15]</td><td>2020</td><td>In this research, the authors combined an adaptive droop-based load sharing, maximum power point tracking, and energy management method for photovoltaic (PV)-based DC microgrid systems. It proposes a proportional droop index technique and generates adaptive virtual resistance Rdroop, allowing PV converters to function in either MPP or load-sharing mode. The unified control scheme addresses challenges in stabilizing the DC grid voltage, although it acknowledges the complexity of the design process</td></tr><tr><td>Khalid [16]</td><td>2019</td><td>This study discusses the major benefits of integrating batteries with SC and highlights their possible uses in microgrid systems. Also, this work is extensive and will serve as a foundation for future research in energy storage technologies and microgrid applications</td></tr><tr><td>Xie Liu and Yang [17]</td><td>2020</td><td>This paper presents the new topoie of the converter to ensure the exchange of power between hybrid electric vehicle energy storage connected to the grid system. The proposed control strategies focus on extending the life of the electrochemical battery by directing power fluctuations to the SC, accompanied by related current control strategies</td></tr><tr><td>Ravada and Tummuru [18]</td><td>2020</td><td>This study describes a nonlinear control mechanism for a PV, battery, and supercapacitor-based DC microgrid. Conventional linear control schemes have been based on a single operating point and supercapacitor voltage regulation. The suggested structure employs an interconnection damping assessment-passivity based controller (IDA-PBC) as an outside loop controller and a finite control set-model predictive control (FCS-MPC) as an internal current controller. The control structure is digitally friendly and overcomes the constraints of linear PI control systems</td></tr><tr><td>Guentri et al. [19]</td><td>2021</td><td>This work focuses on the EM and control of a PV system with HESS, which combines battery and SC. The control tactics may incorporate are based on conventional and metaheuristic methods, recognizing their shortcomings in terms of performance measures like overshoot and rising time</td></tr></tbody></table>
<table><caption>TABLE 1: Continued.</caption><thead><tr><th>Authors</th><th>Year</th><th>Major findings</th></tr></thead><tbody><tr><td>Zamani, Barakati, and Yousofi-Darmian [20]</td><td>2022</td><td>The gases Brownian motion optimization (GBMO) technique was used by the authors to optimize a fractional order PI controller based on filtering. A search strategy with a high accuracy and pace of convergence was introduced by GBMO. The controller is made to regulate an operational HESS in a remote region power supply system that is mostly powered by wind. Nevertheless, the control technique is computationally difficult and time-consuming, making it unsuitable for real-time application</td></tr><tr><td>Siyuan, Qiufan [21]<br>Srinivas, Udaya [22]<br>Katnapally et al. [23]</td><td>2021<br>2022<br>2021</td><td>In these works, a model predictive control (MPC) and a basic PI control are employed to regulate the HESS. However, MPC uses a discrete-time model of the system to anticipate the best solution in the next instant, with the present system state serving as the beginning value. The suggested control technique extends battery life by directing power surges to the SC and managing charge-discharge current. Although MPC can increase system performance by anticipating future behavior, it is computationally complex and time-consuming</td></tr><tr><td>Shafi et al. [24]</td><td>2023</td><td>This research describes an artificial neural network (ANN)-based technique for estimating hybrid wind-solar resources and power generation by comparing wind speed and sun radiation with real-time data. Temperature, humidity, air pressure, solar radiation, ideal angle, and goal values are all factors considered by the model. To decrease error, it employs a normalization function as well as an iterative strategy that includes the Levenberg-Marquardt. However, the ANN model does not provide optimal and efficient system performance</td></tr><tr><td>Zdiri et al. [25]</td><td>2022</td><td>This work suggested a sliding-mode control strategy based on artificial neural networks (ANN) for a hybrid PV-battery-SC system. In order to improve the performance and lifespan of the storage system and prevent the complete disconnection of the load during abrupt fluctuations additionally, the DC bus voltage was rapidly regulated, which increased the battery's lifespan and ensured the PV system's continuous flow</td></tr><tr><td>Narasimhulu et al. [26]</td><td>2022</td><td>The goal of the work is to increase battery responsiveness, particularly during overload situations, by designing EM control algorithms that combine ANN with the Aquila optimizer algorithm (AOA). There are four main hunting methods that AOA is known to use, and each offers several unique benefits over the others. Many Aquila are adept in switching between several hunting strategies quickly and effectively, depending on the situation. In conclusion, behind humans, this hawk is perhaps the second-most intelligent and proficient predator. This circumstance served as the main impetus for the proposed AOA. A simulation environment was used to replicate similar tasks. Because it also reduces high-speed dynamic battery charging and discharging currents, the hybrid ANN-AOA technique maximizes benefits while restricting battery discharge current</td></tr></tbody></table>
<table><caption>TABLE 1: Continued.</caption><thead><tr><td>Authors</td><td>Year</td><td>Major findings</td></tr></thead><tbody><tr><td>Mohamed and Zyodulla [27]</td><td>2023</td><td>The authors suggested a PV-battery-fuel cell system control strategy. The approach uses the phasor feasible alternative from advanced power systems to provide design assessment. The control strategy uses a genetic algorithm (GA) and an adaptive neurofuzzy inference system (ANFIS) in this approach. While GA was created to address stability and power quality problems inside the microgrid, ANFIS is utilized to gather system data in electrical power and give dynamic frequency response. These controls' primary disadvantages, however, are their high computational costs, challenging parameter setting, and essential solution representation</td></tr><tr><td>Fareesa and S.Reddy [28]</td><td>2023</td><td>This study provided an optimal sizing and control that depends on PSO-GA to reduce oscillations in wind power energy and to discover the ideal power and energy capacity of the HESS. PSO outperforms GA in terms of the convergence rate, overfitting, and local optimum. Furthermore, the PSO outperformed the GA since it runs both global and local searches at the same time, whereas the GA concentrates just on global searches. The study places insufficient attention on the control side of the entire system</td></tr><tr><td>Bacha et al. [29]</td><td>2024</td><td>This study focuses on simulating a stand-alone hybrid system made up of PV, wind turbines, a storage system, and a diesel generator. This research employs optimization algorithms to address practical issues linked to the integration of renewable energy sources into the distribution system. The goal is to establish the appropriate size to minimize power costs and assure the availability of electricity at cheaper and more dependable prices in far rural locations</td></tr><tr><td>Santosh and Raghuwanshi [30]</td><td>2023</td><td>In this work, flamingo swarm intelligence algorithms are used to simulate and optimize hybrid renewable energy systems with storage. The ideal energy system is built utilizing a revolutionary flamingo swarm intelligence algorithm (FSIA) that takes into account the least amount of technical factors, such as the risk of load loss, economic factors (cost of electricity [COE] with net present cost (NPC)), and environmental factors [CO2 aspects]). To improve energy independence in green buildings, an optimum economic analysis of a hybrid solar system with ESS is conducted using PSO</td></tr><tr><td>Srilakshmi et al. [31]</td><td>2024</td><td>Using a shunt active power filter powered by solar energy and energy storage systems to address power quality issues caused by power electronic devices and nonlinear loads. The system makes use of a five-level reduced-switch voltage source converter and a neural network-based reference signal generation approach. The system's purpose is to stabilize the voltage across the DC bus capacitor, reduce overall harmonic distortion, improve power factor, and maintain power management under changing irradiation and load conditions. The system's effectiveness is evaluated using three test scenarios</td></tr><tr><td>Vijayan et al. [32]</td><td>2022</td><td>In this work, the authors recommend an ideal PI-controller-based HESS for a DC microgrid that may effectively employ renewable energy sources. To demonstrate their effectiveness, the model makes use of the PI controller and PSO method</td></tr></tbody></table>
<table><caption>TABLE 1: Continued.</caption><thead><tr><td>Authors</td><td>Year</td><td>Major findings</td></tr></thead><tbody><tr><td>Annamalaichamy et al. [33]</td><td>2024</td><td>The paper offers a shunt active power filter (SAPF) with a multilayer cascaded H-bridge inverter that use P-Q theory to reduce harmonics in current power systems. The system's voltage controllers are a PI and an FLC. The proposed aggregated PWM signal-switching circuit balances individual capacitor voltages while minimizing overall harmonic distortion. Simulation and prototype findings demonstrate that the aggregated PWM system outperforms the PI controller. Suggests a relay-based automated tuning solution for the predictive PI control system. The procedure entails finding process models using typical relay feedback testing and calculating the eventual benefit. The first order plus dead-time model is used to build and improve the controller's dynamic component. The ultimate loop gain is established by relay feedback experiments. The controller gain is adjusted to meet the user-specified gain margin criteria. The method's auto-tuning capability makes it suited for industrial process control application.</td></tr><tr><td>Arun et al.[34]</td><td>2024</td><td></td></tr></tbody></table>
<figure><img src="image_3.png" /><figcaption>FIGURE 1: PV system with HESS components.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>FIGURE 2: PV cell circuit model.</figcaption></figure>
### 2.2.1. Battery.
The Li-ion battery works by using a chemical process to transform electrical energy. Li ions are reversibly exchanged between a positive and negative electrode during cycles of charge and discharge in this process. Despite having a comparatively low power density, this battery type is renowned for its high energy density [37].

Figure 3 illustrates the equivalent electrical circuit model of a Li-ion battery [38]. This model includes several main components, open-circuit voltage $U_{OC}$, resistors ($R_0$ and $R_{Th}$) representing ohmic resistance and polarization resistance, respectively, and capacitance ($C_{th}$) describing the battery's transient response of the battery during charge and discharge.

A detailed description of the characteristics of this battery can be found in [38].

### 2.2.2. SC.
SCs have a higher power density than batteries, making them more efficient and durable in terms of charge-discharge cycles [39].

Figure 4 illustrates the equivalent electrical circuit of the SC.

Here, $C_1$ corresponds to the Helmholtz capacitance, $C_2$ corresponds to the diffuse capacitance, $R_1$ and $R_L$ represent the leakage resistances, and $R_2$ represents the time-dependent resistance between the Helmholtz and diffuse capacitances. Further details on these parameter values can be found in [40, 41].

### 2.3. DC-DC Bidirectional Converter.
The buck-boost converter for the battery is shown in Figure 5, while the converter for the SCs is shown in Figure 6. These converters serve to adjust the voltage level according to the system requirements [42].

PV systems connect to the high-voltage DC bus through a bidirectional converter, this allows the load power supply to be controlled to meet the required power demand [43, 44].

The converter consists of the electrical energy storage voltage (EESV), an inductor $L$, a capacitor $C$, and switches ($S_1, S_2$) for the battery, and $S_3, S_4$ for the SC. The values of these parameters are described in detail in [44].

The bidirectional converter allows power transfer in both directions, allowing energy to flow from the load to the ESS and vice versa [45].

The buck-boost converter operates in two modes.

When the storage system (battery/SC) is in charging mode, in this case, the converter works in the buck mode as follows:

$$D = \frac{V_{dc}}{VESS} \qquad (1)$$

When the storage system (battery/SC) is in discharge mode, in this case, the converter operates in the boost mode as follows:

$$D = 1 - \frac{VESS}{V_{dc}} \qquad (2)$$

<figure><img src="image_5.png" /><figcaption>FIGURE 3: Equivalent electrical circuit of a lithium-ion battery.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>FIGURE 4: Equivalent electrical circuit model of a SC.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>FIGURE 5: Circuit for the buck-boost converter of the battery.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>FIGURE 6: Circuit for the buck-boost converter of the SC.</figcaption></figure>

## 3. Energy Management for HESS

Figure 7 illustrates the EM implemented within the control block, which aims to reduce the stress on the battery caused by frequent charging and discharging.

* If ($P_{pv} < P_L$), this indicates that the PV power is insufficient to meet the immediate load requirement, the State of Charge (SOC) of the SC starts to decrease (discharging mode) to quickly compensate for the peak of the transient power in this situation. This relieves the battery of the stress caused by these peaks and allows it to compensate for any steady drift between the supply and load powers.
<figure><img src="image_9.png" /><figcaption>FIGURE 7: EM of HESS.</figcaption></figure>

* If ($P_{pv} > P_{L}$), this indicates that the maximum PV power was accurately tracked, considering the irradiance surrounding the PV array. This implies that the PV system is capable of handling the load power. Consequently, SC begin to charge because batteries alone are insufficient for storing the excess of power for a short period. Although SC serve as secondary storage devices, they are crucial in ensuring the efficient and smooth operation of the PV-HESS under any operating conditions.

## 4. Control of HESS

Figure 8 illustrates the HESS control system. A PI controller regulates the DC bus. This controller calculates the reference current for the DC bus while ensuring that the DC link voltage ($V_{dc}$) remains at the desired level ($V_{dc\_ref}$).

The EM system generates reference currents using two PI controllers. These controllers regulate the bidirectional converter that connects the batteries and the SC, allowing for charging and discharging. These reference currents are critical in keeping the DC bus voltage stable despite the fluctuating power of the PV and load.

The EM compares the nominal current of the battery ($I_{bat\_n}$) with its reference current ($I_{bat\_ref}$). If ($I_{bat\_ref} \le I_{bat\_n}$) is verified, in this case, the batteries charge energy. Otherwise, the transient part is received by the SC.

This condition aims to reduce the stress placed on the battery during charging/discharge cycles, increasing its life expectancy.

The voltage error is given by

$$ \Delta V = V_{dc\_ref} - V_{dc}. \quad (3) $$

The transfer function of DC link ($V_{dc}$) is given by

$$ \frac{V_{dc}}{I_{dc}} = \frac{1}{C_s}. \quad (4) $$

The transfer function of the battery is given by

$$ G_{bat}(s) = \frac{I_{bat}}{D_{bat}} = \frac{V_{bat}C_s + 2V_{bat}}{R.L_{bat}C_s^2 + L_{bat}s + (1 - D_{bat})^2}. \quad (5) $$

The transfer function of the SC is given by

$$ G_{sc}(s) = \frac{I_{sc}}{D_{sc}} = \frac{V_{sc}C_s + 2.V_{sc}}{R.L_{sc}.C.s^2 + L_{sc}.s + (1 - D_{sc})^2}. \quad (6) $$

The total current supplied by the HESS, which includes both battery and SC is

$$ \Delta I = I_{bat\_ref} + I_{sc\_ref} = I_{PV} - I_{L}. \quad (7) $$

The actual battery current ($I_{bat}$) compared with ($I_{bat\_ref}$).

The duty ratio ($D$) is generated by the PI controller and is used to control the switching operation of the battery converter. However, since the battery alone cannot meet the total power requirements [19], SC provides the additional remaining power.

The reference current for the SC is provided in the following:

$$ I_{sc\_ref} = \frac{P_{bat\_comp}}{V_{sc}} = (\Delta I - I_{bat}) \frac{V_{bat}}{V_{sc}}. \quad (8) $$

As with batteries, the actual supercapacitor current ($I_{sc}$) is compared with a reference value ($I_{sc\_ref}$), and the difference is used to generate the duty ratio for the PI
<figure><img src="image_10.png" /><figcaption>FIGURE 8: Control system of the HESS.</figcaption></figure>

controller. The PWM generator then uses this duty ratio to produce switching pulses for the SC converter [46].

## 5. Proposed Control Methods

In this work, the PI controller employed in the PV-HESS system was adjusted using three different approaches: PP, PSO, and DPSO, as described in the following sections.

### 5.1. PP Optimization Application to PI Controller Tuning.
PP, also called full-state feedback, is a technique used to control various closed-loop parameters such as overshoot, peak time, rising time, and settling time [45, 47-49].

These parameters are then used to calculate the relative damping (δ) and frequency (ω) of the closed-loop characteristic polynomial. The closed-loop transfer function can be expressed as follows [50-52]:

$$G_{pp} = \frac{D(1 - D)}{LCs^2 + (L/R)s + (1 - D)^2} \quad (9)$$

The transfer function of the PI controller is given by

$$G_{pi\_pp}(s) = \frac{K_p(1 + sT_i)}{T_i} \quad (10)$$

The closed-loop transfer function of the system is

$$H(S) = \frac{G_{pi\_pp}(s)G_{pp}(s)}{1 + G_{pi\_pp}(s)G_{pp}(s)} \quad (11)$$

The characteristic equation is as follows:

$$1 + G_{pi\_pp}(s)G_{pp}(s) = 0, \quad (12)$$

$$1 + \frac{K_p(1 + sT_i)}{T_i} \frac{D(1 - D)}{LCs^2 + (L/R)s + (1 - D)^2} = 0, \quad (13)$$

$$\text{LCTis}^3 + \frac{L}{R}T_i s + T_i(1 - D)^2 + K_p(1 + sT_i)(1 + sT_i) = 0. \quad (14)$$

A third-order reference model generally provides a good approximation of the closed-loop system.
$$ (s + \alpha\omega)(s^2 + 2\xi\omega s + \omega^2) = 0, \qquad (15) $$

$$ s^3 + 2\xi\omega s^2 + \omega^2 s + \alpha\omega s^2 + 2\alpha\xi\omega s + \alpha\omega^3 = 0, \qquad (16) $$

$$ s^3 + (2\xi\omega + \alpha\omega)s^2 + (\omega^2 + 2\alpha\xi\omega)s + \alpha\omega^3 = 0. \qquad (17) $$

Subsequently, the PI controller parameters $K_p$ and $T_I$ are calculated by making Equation(14) with the denominator of equation (17) gives

$$ \begin{cases} LCT_i = 1, \\ K_p D(1 - D) = \alpha\omega^3. \end{cases} \qquad (18) $$

Solving for the PI controller parameters $K_p$ and $T_I$ gives

$$ \begin{cases} K_p = \frac{\alpha\omega^3}{D(1 - D)_I}, \\ T_I = \frac{1}{LC}. \end{cases} \qquad (19) $$

5.2. PI Controller Tuning Using PSO. In PSO, each individual strives to utilize information from other competitors to adjust their speed.

The particles are assumed to be randomly distributed across the search space and are characterized by their velocity and location. Each particle retains a memory of its ideal position. When the previous best position of all individual particles is considered, both the velocity and the movement are controlled.

As the swarm progresses, the particles move toward the optimal solution and converge toward the locations that are close to the global optimum.

However, the constraints of particle swarm have a low convergence rate in the iterative process with weak local search ability [53–55].

The flowchart of Figure 9 illustrates the PSO algorithm with the parameters depicted in Table A5. In this work, the PI controller parameters $K_p$ and $T_I$ were optimized using a PSO algorithm developed to attain optimal performance.

The implementation of PSO algorithm in MATLAB is based on the following steps:

1. Definition of PSO parameters:

* Number of variables (Var = 2).

* Population size (N);

* Upper bound (ub);

* Lower bound (lb);

* Inertia weight (ω);

* Individual and social cognitive (c);

* Number of iterations (T).

2. Selection of velocity and position

a. Velocity

$$ V_m^n = (w \times V_m^n) + (c \times \text{rand} \times (X_p^n - X_m^n)) + (\times \text{rand} \times (X_{g_n} - X_m^n)). \qquad (20) $$

b. Position

$$ X_m^n = X_m^n - V_m^n. \qquad (21) $$

With: m = 1: Particles; n = 1: Var

c. Elite particle with equation (22)

$$ \alpha(t) = 0.1 + \frac{N - i}{N - 1} (0.5 - 0.1). \qquad (22) $$

Where rand is a randomly generated number in the range [0, 1].

3. The fitness function is used to determine and minimize the fitness value of each particle as follows:

$$ f_f = \int_0^t |e| dt. \qquad (23) $$

4. Update both the global optimal solution and the individual optimal solution.

5. Determine the parameters for the PI controller.

6. If the overall ideal solution has been reached, stop iterating.

Figure 10 shows the connection between the proposed algorithm and the Simulink model. With reference to Figure 10, the input of the PI controller for a supercapacitor is the error between the actual current ($I_{sc}$) and the reference current ($I_{sc\_ref}$) and the output is the duty cycle ($D_{sc}$) of the converter. However, this supercapacitor is defined by a transfer function that is a crucial element of the PSO metaheuristic algorithm's code executed in MATLAB. The process of PSO begins with the initialization of the initial population of particles with initial positions and velocities. It evaluates the objective function at each particle location and determines the best function value and the best position to find the optimal gains of the regulator, and finally, this value is applied in the controller PI connected with SC.
<figure><img src="image_11.png" /><figcaption>FIGURE 9: Flowchart of the PSO algorithm for optimizing the PI gains.</figcaption></figure>

5.3. PI Controller Tuning Using DPSO. The primary challenge with classic PSO is its susceptibility to getting trapped in local extreme domains. To overcome this limitation, this paper employs the DPSO [56], a modified version of the conventional PSO, which is known to enhance the optimization performance.

The algorithm starts with an ensemble, which is a collection of swarms that represent potential solutions to the optimization problem. These entities, called particles, navigate within the search area. The movement of the particles is guided by three equations, which represent the elite, velocity, and position in an iterative process.

The elite particle represents the best position of an individual randomly selected from the population. The flowchart of Figure 11 illustrates the DPSO algorithm.

As the swarming progresses, particles move toward the optimal solution, converging toward the global optimum [29].

The main advantages of DPSO are as follows:

a. Good at preventing early convergence, which improves its ability to deal with more complicated systems.

b. Convergence is reduced when computing is distributed.

c. Able to minimize the objective function better than PSO.

d. Can run continuously and adapt to changes in real time.

The steps for the implementation of DPSO as a MATLAB script are as follows [57]:

1. Definition of DPSO parameters:

* Number of variables (Var = 2).

* Population size (N);

* Upper bound (ub);
<figure><img src="image_12.png" /><figcaption>FIGURE 10: Implementation of the PSO algorithm in Simulink.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>FIGURE 11: The flowchart of the DPSO control system.</figcaption></figure>
* Lower bound (lb);

* Inertia weight (w);

* Individual and social cognitive (c);

* Number of iterations (T).

2. Initialize velocity and position equations (20) and (21).

3. Define the previous best position ($p_{best}$), and the best fitness value ($g_{best}$).

4. Define elite particle $\alpha(t)$

$$ \alpha(t) = 0.1 + \frac{N-i}{N-1} (0.5 - 0.1). \quad (24) $$

N denotes the maximum number of iterations.

Starting with the algorithm elite percentage $\alpha(t) = 50\%$ and gradually reducing it to $\alpha(t) = 10\%$.

5. Duplicate $\alpha(t)$.

6. Update $\alpha(t)$, velocity and position.

7. Any particle with a negative value or a value greater than the nominal controller gain value will be eliminated and replaced randomly in the search space.

With reference to Figure 12, the input of the PI controller for a SC is the error between the actual current ($I_{sc}$) and the reference current ($I_{sc\_ref}$) and the output is the duty cycle ($D\_sc$) of the converter. However, this SC is characterized by a transfer function it is considered a basic part of the code of the new metaheuristic algorithm type DPSO is treated in MATLAB software which begins by creating the initial particles, and population and assigning them initial position and velocities. Also, it evaluates the objective function with the elite particle at each particle location and determines the best function value and the best position to find the optimal gains of the regulator, and finally, the values of DPSO as mentioned in Table A6 are applied in the controller PI connected with SC.

## 6. Sensitivity Analysis and Convergence of PSO and DPSO

This study aims to assess and compare the sensitivity and convergence of PSO and DPSO concerning different values of the parameters such as number of iterations, swarm size ($N$), inertia weight, and acceleration coefficients as described in the following.

### 6.1. Sensitivity Analysis Result: Swarm Size (N).
Tables 2 and 3 show the sensitivity analysis result with respect to swarm size ($N$) for PSO and DPSO algorithms. As expected, the results of Table 2 showed that PSO was most sensitive to the swarm size ($N$) with low convergence to the best particle, demonstrates the weak possibility of PSO particles finding the global minimum with a minimum value of function objective. Additionally, when different populations are

expanded, DPSO performs more effectively and efficiently with a high convergence rate and is less sensitive than PSO, as shown in Table 3.

### 6.2. Sensitivity Analysis and Convergence Result—Maximum Number of Iterations.
Tables 4 and 5 show the sensitivity analysis results for PSO and DPSO algorithms with respect to the maximum number of iterations equal to 1000. The maximum number of iterations substantially impacts the probability of the swarm approaching the global minimum. A small iteration would not provide particles enough time to explore the design space, whereas a high iteration would increase the computing load. This investigation examines the performance of PSO and DPSO with various iterations.

The maximum Iteration is contingent upon the type of optimization problem in hand. A high number of iterations increases the processing needs, whereas a low value reduces the likelihood of finding a global solution. The maximum iteration in this paper is varied in the interval [0, 1000]. The sensitivity analysis results are shown in the table. Increasing the number of iterations had an impact on the objective function of PSO and DPSO. It can be observed that between iterations 100 and 1000 similar statistical performance was achieved with PSO algorithm.

Figure 13 shows a comparison of the rate of convergence between PSO and DPSO, indicating and demonstrating the effectiveness of having a minimum value of function objective to describe the best particle and optimal gain of the PI controller as compared to PSO which failed to achieve the appropriate function and best global particle which indicates its weakness. Furthermore, Figure 13 illustrates the performance of these two algorithms in terms of accuracy and how close is the converged solution is to the global optimum. When the number of iterations increases, the accuracy of PSO decreases, which indicates that PSO is not always able to find the optimal solution at each iteration on a medium and large scale. It is seen that the DPSO algorithm is superior in terms of the objective function to reach the optimal solution with a value of 10. This value demonstrates that DPSO is more accurate than PSO.

#### 6.2.1. Sensibility and Convergence With Inertia Weight (W).
The inertia weight improved particle search efficiency by balancing global and local searches. Table 6 presents the sensitivity analysis PSO algorithm with various inertia weights (W) of the swarm; it is observed that when the value of inertia weight increases, the objective function decreases with a lower value, which leads to the weakness in getting the optimal and best gains.

Although DPSO is not sensitive to the variation of inertia weight as shown in Table 7, it has the ability and effectiveness to reach the minimum value of the objective function leading to good convergence and good robustness of the algorithm.
<figure><img src="image_14.png" /><figcaption>FIGURE 12: Implementation of the DPSO algorithm in Simulink.</figcaption></figure>

<table><caption>TABLE 2: Sensitivity analysis result: swarm size (N) for the PSO algorithm.</caption><thead><tr><th>N</th><th>Max of the objective function</th><th>Best of the objective function</th></tr></thead><tbody><tr><td>55</td><td>263.64</td><td>263.2</td></tr><tr><td>80</td><td>405.6845</td><td>405.6815</td></tr><tr><td>110</td><td>264</td><td>238</td></tr></tbody></table>

<table><caption>TABLE 3: Sensitivity analysis result: swarm size (N) for DPSO optimization.</caption><thead><tr><th>N</th><th>Max of the objective function</th><th>Best of the objective function</th></tr></thead><tbody><tr><td>55</td><td>330</td><td>10</td></tr><tr><td>80</td><td>270</td><td>10</td></tr><tr><td>110</td><td>270</td><td>10</td></tr></tbody></table>

<table><caption>TABLE 4: Sensitivity analysis result: maximum number of iterations for the PSO algorithm.</caption><thead><tr><th>Iteration</th><th>Max of the objective function</th><th>Best of the objective function</th></tr></thead><tbody><tr><td>10</td><td>270</td><td>218</td></tr><tr><td>50</td><td>270</td><td>218</td></tr><tr><td>100</td><td>270</td><td>200</td></tr><tr><td>200</td><td>270</td><td>200</td></tr><tr><td>300</td><td>270</td><td>200</td></tr><tr><td>400</td><td>270</td><td>200</td></tr><tr><td>500</td><td>270</td><td>200</td></tr><tr><td>600</td><td>270</td><td>200</td></tr><tr><td>700</td><td>270</td><td>200</td></tr><tr><td>800</td><td>270</td><td>200</td></tr><tr><td>900</td><td>270</td><td>200</td></tr><tr><td>1000</td><td>270</td><td>200</td></tr></tbody></table>

6.2.2. *Sensitivity Analysis and Convergence Result—Individual and Social Cognitive (c)*. Changing the term (c) can cause particles to move to unwanted places.

<table><caption>TABLE 5: Sensitivity analysis result: maximum number of iterations for DPSO optimization.</caption><thead><tr><th>Iteration</th><th>Max of the objective function</th><th>Best of the objective function</th></tr></thead><tbody><tr><td>10</td><td>272</td><td>200</td></tr><tr><td>50</td><td>272</td><td>200</td></tr><tr><td>100</td><td>272</td><td>200</td></tr><tr><td>200</td><td>272</td><td>200</td></tr><tr><td>300</td><td>272</td><td>10</td></tr><tr><td>400</td><td>272</td><td>10</td></tr><tr><td>500</td><td>272</td><td>10</td></tr><tr><td>600</td><td>272</td><td>10</td></tr><tr><td>700</td><td>272</td><td>10</td></tr><tr><td>800</td><td>272</td><td>10</td></tr><tr><td>900</td><td>272</td><td>10</td></tr><tr><td>1000</td><td>272</td><td>10</td></tr></tbody></table>

Therefore, the acceleration coefficient limitations are crucial in the implementation of the PSO algorithm. Table 8 shows the significant sensitivity of PSO with respect to the value of (c) and also the low converge rate of PSO with various individual and social cognitive (c) parameters, which demonstrates the lack of ability and weakness of the algorithm.

Table 9 illustrates the variation of individual and social cognitive value (c), and as expected, the DPSO is not sensitive to these variations and is able to reach the minimum and best value of the objective function.

## 7. Results and Discussion

The overall system and its control scheme are implemented in MATLAB/Simulink and Sim Power Systems toolbox as depicted in Figure 14. The system parameters, including the gains of the PI controllers based on PP, PSO, and DPSO, are provided in the Appendix. Three simulation scenarios were considered to assess the performance of the proposed control scheme.
<figure><img src="image_15.png" /><figcaption>FIGURE 13: Comparison of PSO and DPSO convergence under the maximum value of iterations.</figcaption></figure>

<table><caption>TABLE 6: Sensitivity analysis result: inertia weight (W) for the PSO algorithm.</caption><thead><tr><td>W</td><td>Max of the objective function</td><td>Best of the objective function</td></tr></thead><tbody><tr><td>0.4</td><td>298</td><td>200</td></tr><tr><td>0.8</td><td>265</td><td>240</td></tr><tr><td>1.2</td><td>265.2</td><td>263.9</td></tr></tbody></table>

<table><caption>TABLE 7: Sensitivity analysis result: inertia weight (W) for DPSO optimization.</caption><thead><tr><td>W</td><td>Max of the objective function</td><td>Best of the objective function</td></tr></thead><tbody><tr><td>0.4</td><td>270</td><td>10</td></tr><tr><td>0.8</td><td>270</td><td>10</td></tr><tr><td>1.2</td><td>270</td><td>10</td></tr></tbody></table>

<table><caption>TABLE 8: Sensitivity analysis result: individual and social cognitive (c) for the PSO algorithm.</caption><thead><tr><td>W</td><td>Max of the objective function</td><td>Best of the objective function</td></tr></thead><tbody><tr><td>0.75</td><td>298</td><td>200</td></tr><tr><td>1.5</td><td>265</td><td>240</td></tr><tr><td>3.5</td><td>265.2</td><td>263.9</td></tr></tbody></table>

### 7.1. Scenario 1: Variable Solar Irradiance.
This simulation was performed with a constant load of 500W. The irradiance is initially set at 0W/m². It is then increased to 1000W/m² from t = 0.4s and then reduced to 400W/m² at t = 1.4s and maintained at this value until t = 2s.

The power generated by the PV system is presented in Figure 15, which shows that the power produced by the PV system is directly linked to the solar irradiation profile, thus

<table><caption>TABLE 9: Sensitivity analysis result: individual and social cognitive (c) for DPSO optimization.</caption><thead><tr><td>c</td><td>Max of the objective function</td><td>Best of the objective function</td></tr></thead><tbody><tr><td>0.75</td><td>265</td><td>240</td></tr><tr><td>1.5</td><td>265</td><td>219</td></tr><tr><td>3.5</td><td>265</td><td>219</td></tr></tbody></table>

highlighting the significant impact of the irradiation level on the energy production of the PV system.

The power generated by the PV system can be divided into three intervals.

* From $t = 0s$ to $t = 0.4s$, corresponding to an irradiation level of 0W/m², the PV power is also 0W. In this case, as illustrated in Figure 15, the battery responds immediately by providing the power required by the load, ensuring the stability of the energy system.

* From $t = 0.4s$ to $t = 1.2s$, as the irradiation reaches its nominal value of 1000W/m², the PV system produces power equal to its nominal capacity. Consequently, the PV system fully satisfies the load's power demand and any surplus of power will be stored in the battery.

* From $t = 1.2s$ to $t = 2s$, the power generated by the PV system is lower than the load power requirement, and this depends on the level of irradiation. To maintain continuous energy supply and meet the load's power demand, the battery promptly compensates for the power deficit of the PV system.

To enhance the battery's lifespan, an SC is employed in combination with the battery. This step helps to reduce the stress on the battery by compensating for any delays in its charging or discharging process. Figure 16 shows the SC power profile under variable solar irradiance, which is controlled by a PI controller optimized using three different methods, namely, PP, PSO, and DPSO.

After analyzing the three scenarios discussed in the previous section, which examine the battery's SOC and discharge concerning the power generated by the PV system and the power required by the load, it is clear that the SC system plays a vital role during the transient state. This refers to the period during which the battery is storing or releasing energy. The SC system has a faster response time compared with the battery. Among the different approaches, the DPSO approach stands out for its superior response time compared with PP and PSO. These findings contribute to ensuring that the battery operates effectively during transient conditions while minimizing its stress.

### 7.2. Scenario 2: Variable Load.
In this scenario, it is assumed that the PV system operates at a constant irradiance level of 1000W/m².

Figure 17 illustrates the profiles of the power generated by the PV system, the variations in the charging power requirements, as well as the evolution of the energy stored in the battery. It is clearly observable that the power produced by the PV system remains relatively constant.
<figure><img src="image_16.png" /><figcaption>FIGURE 14: Simulink model of the studied system (PV-HESS) and the proposed control scheme.</figcaption></figure>

By analyzing the power required by the load, the power generated by the PV system, and the energy stored in the battery, three distinct intervals can be distinguished.

* Between $t = 0s$ and $t = 1s$, the power generated by the PV system exceeds the load demand. The excess power is sent to the battery during this period, thereby maintaining the balance.

* From $t = 1s$ to $t = 1.5s$, the power generated by the PV system is not enough to meet the load power requirement. To maintain a stable energy supply and fulfill the demand of the load, the battery promptly compensates for the power deficit of the PV system.

* Between $t = 1.5s$ and $t = 2s$, the power generated by the PV system consistently remains below the load power requirement. Consequently, the battery supplies power to the load, ensuring a stable energy balance between the power generation of the PV system and the power consumption of the load.

A comparison of the SC with the three different approaches, namely, PP, PSO, and DPSO, is shown in Figure 18. This shows that SC plays an important role during the transitional phase, especially when the battery starts discharging. It is worth noting that the DPSO approach outperforms the PI with the PP and PSO methods in terms of performance.
<figure><img src="image_17.png" /><figcaption>FIGURE 15: Responses of power in Scenario 1: PV, load, and battery.</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>FIGURE 16: SCs charging/discharging power in Scenario 1 using different methods (PP, PSO, and DPSO).</figcaption></figure>

For a more thorough stability analysis, we compared the performance of the three proposed techniques in terms of transient response characteristics, namely, settling time, undershoot and overshoot, and rise time, under fluctuating load conditions.

### 7.3. Scenario 3: Evaluation of the SOC Consumption Under Different Temperatures.
To comprehensively assess the efficiency and reliability of the PV_HESS, we have examined the impact changing weather conditions, specifically varying temperatures.

<figure><img src="image_19.png" /><figcaption>FIGURE 17: Responses of power in Scenario 2: PV, load, and battery.</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>FIGURE 18: SCs charging/discharging power in Scenario 2 using different methods (PP, PSO, and DPSO).</figcaption></figure>

Figures 19 and 20 present the battery SOC with PP, PSO, and DPSO controllers under two different temperature scenarios, respectively. A comparative analysis was conducted through simulations spanning 2 s to evaluate the system's performance.

The results confirm that the PI controller fine-tuned by DPSO exhibits more efficient SOC utilization of batteries under diverse operating temperatures (0, 20) when compared with its PSO and PP.

This thorough investigation into the battery SOC usage at varying temperatures demonstrates the superior effectiveness of the DPSO-tuned PI controller, establishing its
<figure><img src="image_21.png" /><figcaption>FIGURE 19: SOC of battery in the PV-HESS system using various controllers for temperature 0.</figcaption></figure>

<figure><img src="image_22.png" /><figcaption>FIGURE 20: SOC of battery in the PV-HESS system using various controllers for temperatures 20.</figcaption></figure>

<table><caption>TABLE 10: Evaluation of PI tuned by the dynamic performance parameters of the PP, PSO, and DPSO controllers.</caption><thead><tr><td>PI</td><td>Rise time</td><td>Peak overshoot in (%)</td><td>Settling time in (ms)</td></tr></thead><tbody><tr><td>Pole Placement</td><td>1.85 × 10<sup>-4</sup></td><td>37.3</td><td>2.35</td></tr><tr><td>PSO</td><td>4.1 × 10<sup>-4</sup></td><td>8.45</td><td>2.29</td></tr><tr><td>DPSO</td><td>5.013 × 10<sup>-4</sup></td><td>8.02</td><td>2.10</td></tr></tbody></table>
<table><caption>TABLE 11: Test of robustness of the PP, PSO, and DPSO controllers.</caption><thead><tr><th>Tunnig approaches</th><th>30%</th><th>60%</th></tr></thead><tbody><tr><td>Pole Placement</td><td>Unstable</td><td>Unstable</td></tr><tr><td>PSO</td><td>Stable</td><td>Unstable</td></tr><tr><td>DPSO</td><td>Sable</td><td>Stable</td></tr></tbody></table>

prowess in optimizing battery performance across a spectrum of environmental conditions.

The results show that integrating a supercapacitor with a battery reduced battery SOC fluctuations by minimizing peak currents and extending the battery life and performance.

### 7.4. Statistical Analysis of the PP-, PSO-, and DPSO-Optimized PI Controllers.
After analyzing the results obtained, a comparative study of the performances of the algorithms used to select the best, as indicated in Table 10.

These results highlight that all PI controller designs based on heuristic methods exhibited zero steady-state error. In contrast, the DPSO tuning method demonstrated superior performance by significantly reducing the peak overshoot and settling time.

### 7.5. Robustness Tests of the PP-, PSO-, and DPSO-Optimized PI Controllers.
In this section, the robustness of the algorithms is assessed under 30% and 60% abrupt changes in the load. The results obtained are summarized in Table 11. It has been observed that the DPSO algorithm was able to maintain stability of the system in the face of this variation, unlike PP and PSO algorithms.

## 8. Conclusion

This paper presents various optimization techniques including classical PP, PSO, and DPSO for tuning the gains of the PI controller of the SC current. The performance of these controllers is evaluated under different solar irradiation and load conditions. Several simulation scenarios are presented to analyze the system response. The results indicate that the DPSO-based PI control technique demonstrates superior performance in terms of settling time, overshoot, and rise-time accuracy with no sensitivity for the PI controller gains and with fast response to unexpected disturbances such as load variation, solar irradiation, and changes in the temperature, thus enhancing the dynamic response of the SC and reducing battery stress, resulting in a longer lifespan for HESS. This study possesses limitations, indicating potential areas for additional exploration, such as adaptive methodologies, whereby hybrid algorithms may provide the requisite dynamic response and improve the lifespan of the storage devices. These advancements might increase DPSO efficiency, scalability, and application in a variety of sectors, from real-time control systems to machine learning, thus proposing validation of the present research findings by comparison with results obtained from virtual simulations with experimental results in real time.

# Appendix A: Parameters of the Studied System

<table><caption>TABLE A1: Parameters of the PV cell (Model: WU-120).</caption><tr><td>P<sub>PV</sub></td><td>W</td><td>120.7</td></tr><tr><td>V<sub>oc,n</sub></td><td>V</td><td>21</td></tr><tr><td>I<sub>sc,n</sub></td><td>A</td><td>8</td></tr><tr><td>I<sub>mp</sub></td><td>A</td><td>7.1</td></tr><tr><td>R<sub>p</sub></td><td>Ω</td><td>31.6334</td></tr><tr><td>R<sub>s</sub></td><td>Ω</td><td>0.196</td></tr><tr><td>K<sub>V</sub></td><td>V/K</td><td>-0.358</td></tr><tr><td>K<sub>I</sub></td><td>A/K</td><td>0.052</td></tr><tr><td>N<sub>s</sub></td><td>—</td><td>72</td></tr></table>

<table><caption>TABLE A2: Parameters of the battery.</caption><tr><td>P<sub>n</sub></td><td>W</td><td>780</td></tr><tr><td>I<sub>n</sub></td><td>A</td><td>32.5</td></tr><tr><td>V<sub>n</sub></td><td>V</td><td>24</td></tr><tr><td>C</td><td>Ah</td><td>14</td></tr><tr><td>soc</td><td>%</td><td>50</td></tr><tr><td>R</td><td>Ω</td><td>12.6609</td></tr></table>

<table><caption>TABLE A3: Parameters of the SC.</caption><tr><td>P<sub>n</sub></td><td>W</td><td>640</td></tr><tr><td>I<sub>n</sub></td><td>A</td><td>20</td></tr><tr><td>V<sub>n</sub></td><td>V</td><td>32</td></tr><tr><td>V<sub>i</sub></td><td>V</td><td>32</td></tr><tr><td>C</td><td>F</td><td>29</td></tr><tr><td>N<sub>s</sub></td><td>—</td><td>1.1</td></tr><tr><td>N<sub>p</sub></td><td>—</td><td>1.1</td></tr><tr><td>C</td><td>(Celsius)</td><td>25</td></tr></table>

<table><caption>TABLE A4: Parameters of the DC link.</caption><tr><td>C</td><td>F</td><td>300.10<sup>-6</sup></td></tr><tr><td>P</td><td>W</td><td>500</td></tr><tr><td>V<sub>dc</sub></td><td>V</td><td>50</td></tr></table>

<table><caption>TABLE A5: Parameters of the PSO algorithm.</caption><tr><td>W</td><td>/</td><td>0.7</td></tr><tr><td>Var</td><td>/</td><td>2</td></tr><tr><td>Particles</td><td>/</td><td>20</td></tr><tr><td>c</td><td>/</td><td>2</td></tr><tr><td>Iteration</td><td>/</td><td>100</td></tr></table>

<table><caption>TABLE A6: PI controller parameters are optimized with different methods.</caption><thead><tr><th>PI</th><th>K<sub>P_SC</sub></th><th>K<sub>I_SC</sub></th></tr></thead><tbody><tr><td>Pole Placement</td><td>0.53</td><td>2098</td></tr><tr><td>PSO</td><td>3.2563</td><td>1.6749</td></tr><tr><td>DPSO</td><td>0.0203</td><td>2.3104</td></tr></tbody></table>
# Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

# Conflicts of Interest

The authors declare no conflicts of interest.

# Author Contributions

Samira Heroual conceived the main idea of the research, developed the study objectives, and formulated the hypotheses.

Belkacem Belabbas contributed significantly to the writing of the manuscript, providing important corrections, as well as detailed analyses and in-depth discussions on the results obtained.

Yasser Diab played a key role in enriching the text, particularly in the sections relating to results and interpretation of data. He also took charge of the submission of the manuscript and the management of exchanges with the editor.

Mohamed Metwally Mahmoud ensured the final editing of the text, ensuring its coherence and overall fluidity.

Tayeb Allaoui supervised the development of the study, ensuring that it was carried out by the objectives set.

Naima Benabdallah supervised the editing and improvement of figures and tables, ensuring their clarity and relevance within the article.

# Funding

The authors wish to express their sincere gratitude to the Ministry of Higher Education and Scientific Research of Algeria for its indispensable financial support in completing this study. This work would not have been possible without the valuable assistance of the L2GEGI laboratory at the University of Tiaret, Algeria, to which the authors also extend their thanks. In addition, they would like to express their deep gratitude to the Nantes University, France, whose financial support was crucial for the successful completion of this research. The authors warmly thank this institution for its trust and unwavering commitment to scientific research.

# Acknowledgments

The authors would like to express their deep gratitude to the University of Tiaret, Algeria, for its valuable support. They would also like to thank the Researcher Support Project of the University of Nantes, for their essential contribution to the completion of this work.

# References

[1] T. S. Le, T. N. Nguyen, T. D. Ngo, D. K. Bui, and T. Ngoc, "Optimal Sizing of Renewable Energy Storage: A Techno-Economic Analysis of Hydrogen, Battery and Hybrid Systems Considering Degradation and Seasonal Storage," Applied Energy 336 (2023): 120817, https://doi.org/10.1016/j.apenergy.2023.120817.

[2] O. Krishan and S. Suhag, "A Novel Control Strategy for a Hybrid Energy Storage System in a Grid-Independent Hybrid Renewable Energy System," International Transactions on Electrical Energy Systems 30, no. 4 (2020): 12262, https://doi.org/10.1002/2050-7038.12262.

[3] M. Senapati, C. Pradhan, P. Nayak, and S. Samantaray, "Lagrange Interpolating Polynomial-Based Deloading Control Scheme for Variable Speed Wind Turbines," International Transactions on Electrical Energy Systems 29, no. 5 (2019): e2824, https://doi.org/10.1002/2050-7038.2824.

[4] H. Assem, T. Azib, F. Bouchafaa, C. Laarouci, N. Belhaouas, and A. Hadj Arab, "Adaptive Fuzzy Logic-Based Control and Management of Photovoltaic Systems With Battery Storage," International Transactions on Electrical Energy Systems 2023 (2023): 1-18, https://doi.org/10.1155/2023/9065061.

[5] M. M. Rana, M. Uddin, M. R. Sarkar, et al., "Applications of Energy Storage Systems in Power Grids With and Without Integration of Renewable Energy: A Comprehensive Review," Journal of Energy Storage 68 (2023): 107811, https://doi.org/10.1016/j.est.2023.107811.

[6] P. Chittaranjan, "Coordinated Power Management and Control of Standalone PV-Hybrid System With Modified IWO-Based MPPT," IEEE Systems Journal 15, no. 3 (2020): 3585-3596.

[7] C. Pradhan, M. K. Senapati, N. K. Ntiakoh, and R. K. Calay, "Roach Infestation Optimization MPPT Algorithm for Solar Photovoltaic System," Electronics 11, no. 6 (2022): 927, https://doi.org/10.3390/electronics11060927.

[8] M. K. Senapati, C. Pradhan, S. R. Samantaray, and P. K. Nayak, "Improved Power Management Control Strategy for Renewable Energy-Based DC Micro-Grid With Energy Storage Integration," IET Generation, Transmission & Distribution 13, no. 6 (2019): 838-849, https://doi.org/10.1049/iet-gtd.2018.5019.

[9] Z. Cabrane and M. Ouassaid, "Two Proposed Control Algorithms for the Management of Supercapacitors-Batteries Combination in Photovoltaic Energy Storage," 6th International Conference on Renewable and Sustainable Energy (IRSEC) (2018).

[10] C. Muhammed Reşit, et al., "Hakan. A Study of the Design of Lithium Batteries and Supercapacitors for Hybrid Energy Storage Systems," Energy Storage 5, no. 1 (2023): e386.

[11] A. Lahyani and P. Vene, "Combination of Batteries/Supercapacitors in an Uninterruptible Power Supply (UPS)," IEEE Transactions on Power Electronics 28, no. 4 (2013): 1509-1522.

[12] R. Gugulothu, B. Nagu, D. Pullaguram, and B. C. Babu, "Optimal Coordinated Energy Management Strategy for Standalone Solar Photovoltaic System With Hybrid Energy Storage," Journal of Energy Storage 67 (2023): 107628, https://doi.org/10.1016/j.est.2023.107628.

[13] J. Rocabert, R. Capó-Misut, R. S. Munoz-Aguilar, J. I. Candela, and P. Rodriguez, "Control of Energy Storage System Integrating Electrochemical Batteries and Supercapacitors for Grid-Connected Applications," IEEE Transactions on Industry Applications 55, no. 2 (2019): 1853-1862, https://doi.org/10.1109/tia.2018.2873534.

[14] M. J. van Jaarsveld and R. Gouws, "An Active Hybrid Energy Storage System Utilising a Fuzzy Logic Rule-Based Control Strategy," World Electric Vehicle Journal 11, no. 2 (2020): 34, https://doi.org/10.3390/wevj11020034.

[15] S. Augustine, M. K. Mishra, and N. Lakshminarasamma, "A Unified Control Scheme for a Standalone Solar PV Low Voltage
DC Microgrid System With HESS," *IEEE Journal of Emerging and Selected Topics in Power Electronics* 8, no. 2 (2020): 1351-1360, https://doi.org/10.1109/jestpe.2019.2916421.

[16] M. Khalid, "A Review on the Selected Applications of Battery-Supercapacitor Hybrid Energy Storage Systems for Micro-grids," *Energies* 12, no. 23 (2019): 4559, https://doi.org/10.3390/en12234559.

[17] S. Xie Liu and L. Yang, "Analysis Modeling and Implementation of a Switching Bidirectional Buck-Boost Converter Based on Hybrid Electric Vehicle Energy Storage for the V2G System," *IEEE Access* 8 (2020): 65868-65879.

[18] B. Ravada and N. Tummuru, "Control of a Supercapacitor-Battery-PV Based Stand-Alone DC-Microgrid," *IEEE Transactions on Energy Conversion* 35, no. 3 (2020): 1268-1277, https://doi.org/10.1109/tec.2020.2982425.

[19] H. Guentri, T. Allaoui, M. Mekki, and M. Denai, "Power Management and Control of a Photovoltaic System With Hybrid Battery-Supercapacitor Energy Storage Based on Heuristics Methods," *Journal of Energy Storage* 39 (2021): 102578, https://doi.org/10.1016/j.est.2021.102578.

[20] A. Zamani, S. M. Barakati, and S. Yousofi-Darmian, "Design of a Fractional Order PID Controller Using GBMO Algorithm for Load-Frequency Control With Governor Saturation Consideration," *ISA Transactions* 64 (2016): 56-66, https://doi.org/10.1016/j.isatra.2016.04.021.

[21] C. Siyuan and Y. Qiufan, "A Model Predictive Control Method for Hybrid Energy Storage Systems," *CSEE Journal of Power and Energy Systems* 7, no. 2 (2020): 329-338.

[22] P. Srinivas and M. Udaya, "A Comparative Analysis of PI and Predictive Control Strategy for HESS-Based Bidirectional DC-DC Converter for DC Microgrid Applications," in *Next-Generation Smart Grids: Modeling, Control, and Optimization* (Singapore: Springer Nature Singapore, 2022), 181-220.

[23] A. Katnapally, U. B. Manthati, A. Chirayarukil Raveendran, and S. Punna, "A Predictive Power Management Scheme for Hybrid Energy Storage System in Electric Vehicle," *International Journal of Circuit Theory and Applications* 49, no. 11 (2021): 3864-3878, https://doi.org/10.1002/cta.3119.

[24] I. Shafi, H. Khan, M. S. Farooq, et al., "An Artificial Neural Network-Based Approach for Real-Time Hybrid Wind-Solar Resource Assessment and Power Estimation," *Energies* 16, no. 10 (2023): 4171, https://doi.org/10.3390/en16104171.

[25] M. A. Zdiri, T. Guesmi, B. M. Alshammari, et al., "Design and Analysis of Sliding-Mode Artificial Neural Network Control Strategy for Hybrid PV-Battery-Supercapacitor System," *Energies* 15, no. 11 (2022): 4099, https://doi.org/10.3390/en15114099.

[26] N. Narasimhulu, R. S. R. Krishnam Naidu, P. Falkowski-Gilski, P. B. Divakarachari, and U. Roy, "Energy Management for PV Powered Hybrid Storage System in Electric Vehicles Using Artificial Neural Network and Aquila Optimizer Algorithm," *Energies* 15, no. 22 (2022): 8540, https://doi.org/10.3390/en15228540.

[27] K. Mohamed and Y. Zyodulla, "Enhancing Microgrid Performance Through Integration of Hybrid Energy Storage System: ANFIS and GA Approaches," *International Journal of Electrical Engineering and Sustainability* (2023): 38-48.

[28] F. Fareesa and S. Reddy, "A Hybrid Energy Storage System Using GA and PSO for Islanded Microgrid Applications," *Energy Storage* 5, no. 7 (2023): e460.

[29] B. Bacha, H. Ghobbane, H. Dahmani, A. Betka, A. Toumi, and A. Chouder, "Optimal Sizing of a Hybrid Microgrid System Using Solar, Wind, Diesel, and Battery Energy Storage to Alleviate Energy Poverty in a Rural Area of Biskra, Algeria,"

*Journal of Energy Storage* 84 (2024): 110651, https://doi.org/10.1016/j.est.2024.110651.

[30] R. Santosh and S. Raghuwanshi, "Modeling and Optimization of Hybrid Renewable Energy With Storage System Using Flamingo Swarm Intelligence Algorithms," *Energy Storage* 5, no. 7 (2023): e470.

[31] K. Srilakshmi, A. Kumar, K. Kondreddi, T. M. Krishna, P. K. Balachandran, and G. Gatto, "Design of Solar and Energy Storage Systems Fed Reduced Switch Multilevel Converter With Flower Pollination Optimization," *Journal of Energy Storage* 99 (2024): 113324, https://doi.org/10.1016/j.est.2024.113324.

[32] M. Vijayan, R. R. Udumula, T. Mahto, et al., "Optimal PI-Controller-Based Hybrid Energy Storage System in DC Microgrid," *Sustainability* 14, no. 22 (2022): 14666, https://doi.org/10.3390/su142214666.

[33] A. Annamalaichamy, P. David, P. Balachandran, and I. Colak, "Performance Evaluation of PI and FLC Controller for Shunt Active Power Filters," *Electrical Engineering* 107, no. 1 (2024): 1235-1252, https://doi.org/10.1007/s00202-024-02546-x.

[34] R. Arun, R. Muniraj, N. Karuppiah, B. Kumar, and K. Murugaperumal, "Automated Approach to Design Predictive PI Control Scheme for Gain Margin Specification," *International Journal of System Assurance Engineering and Management* 15, no. 6 (2024): 2230-2237, https://doi.org/10.1007/s13198-023-02238-y.

[35] B. Belabbas, T. Allaoui, M. Tadjine, and M. Denai, "Power Management and Control Strategies for Off-Grid Hybrid Power Systems With Renewable Energies and Storage," *Energy Systems* 10, no. 2 (2019): 355-384, https://doi.org/10.1007/s12667-017-0251-y.

[36] M. K. Senapati, C. Pradhan, and R. K. Calay, "A Computational Intelligence Based Maximum Power Point Tracking for Photovoltaic Power Generation System With Small-Signal Analysis," *Optimal Control Applications and Methods* 44, no. 2 (2023): 617-636, https://doi.org/10.1002/oca.2798.

[37] N. Phonphan and P. Khamphakdi, "Home Energy Management System Based on Photovoltaic-Battery Hybrid Power System," in *International Conference on Power, Energy, and Innovations (ICPEI)* (2020).

[38] H. Qusay and J. Marek, "An Analysis of Photovoltaic/supercapacitor Energy System to Improve Self-Consumption and Self-Sufficiency," *Journal of Energy Storage Energy Reports* 8 (2022): 680-695.

[39] H. Xu, et al. M. Shen, "The Control of Lithium-Ion Batteries and Supercapacitors in Hybrid Energy Storage Systems for Electric Vehicles: A Review," *International Journal of Energy Research* 45, no. 15 (2021): 20524-20544, https://doi.org/10.1002/er.7150.

[40] D. Arindam, "A Comprehensive Review of Batteries and Supercapacitors: Development and Challenges Since Their Inception," *Energy Storage* (2023).

[41] H. Alhumade, H. Rezk, M. Louzazni, I. A. Moujdin, and S. Al-Shahrani, "Advanced Energy Advanced Energy Management Strategy of Photovoltaic/Pemfc/Lithium-Ion Batteries/Supercapacitors Hybrid Renewable Power System Using White Shark Optimizer," *Sensors* 23, no. 3 (2023): 1534, https://doi.org/10.3390/s23031534.

[42] M. Şahin, F. Blaabjerg, and A. Sangwongwanch, "Modelling of Supercapacitors Based on Simplified Equivalent Circuit," *CPSS Transactions on Power Electronics and Applications* 6, no. 1 (March 2021): 31-39, https://doi.org/10.24295/cpsstpea.2021.00003.

[43] Z. Gholami, R. Ildarabadi, H. Heydari-Doostabad, M. Monfared, and T. O'Donnell, "Bidirectional Wide Range
and High Voltage Gain Buck-Boost DC-DC Converter for EV
Chargers Empowering V2GG2V Applications," *IET Power
Electronics* 17, no. 2 (2024): 230–250, https://doi.org/10.1049/
pel2.12630.

[44] B. Mohamad, “A Bidirectional High Voltage DC-DC Topology for Energy Storage Systems in a Microgrid,” *IET Power Electronics* (2023).

[45] Q. Xu, N. Vafamand, L. Chen, T. Dragicevic, L. Xie, and F. Blaabjerg, "Review on Advanced Control Technologies for Bidirectional DC/DC Converters in DC Microgrids," *IEEE Journal of Emerging and Selected Topics in Power Electronics* 9, no. 2 (2021): 1205-1221, https://doi.org/10.1109/jestpe.2020.2978064.

[46] A. L. Attar and G. Houssein, “DC-DC Converters: Modeling and Control Strategies,” in *Power Electronics Converters and Their Control for Renewable Energy Applications* (Academic Press, 2023), 77–91.

[47] S. Sharma and S. Jain, “Speed Control of the Mobile Robotic System Using PI, PID, and Pole Placement Controller,” in *IEEE 1st International Conference on Power Electronics, Intelligent Control, and Energy Systems (ICPEICES)* (2016).

[48] S. Arof, N. M. Noor, M. F. Alias, E. Noorsal, P. Mawby, and H. Arof, “Digital Proportional Integral Derivative (PID) Controller for Closed-Loop Direct Current Control of an Electric Vehicle Traction Tuned Using Pole Placement,” *Advanced Structured Materials* 2 (2020): 73–89, https://doi.org/10.1007/978-3-030-46036-5_8.

[49] K. Halder, S. Das, and A. Gupta, “Time-Delay Handling in Dominant Pole Placement With PID Controllers to Obtain Stability Regions Using Random Sampling,” *International Journal of Control* 94, no. 12 (2021): 3384–3405, https://doi.org/10.1080/00207179.2020.1764110.

[50] Y. Li, J. Bi, W. Han, and W. Tan, “Tuning of PID/PIDD2 Controllers for Integrating Processes With Robustness Specification,” *ISA Transactions* 140 (2023): 224–236, https://doi.org/10.1016/j.isatra.2023.05.015.

[51] W. Nie, Z. Wu, C. Luo, and S. Zhang, *A Tuning Method for PID Controller Parameters Based on Particle Swarm Optimization (PSO)* (Shanghai, China: Chinese Automation Congress (CAC), 2020).

[52] D. Trapani, P. Marocco, D. Ferrero, K. B. Lindberg, K. Sundseth, and M. Santarelli, “The Potential of Hydrogen-Battery Storage Systems for a Sustainable Renewable-Based Electrification of Remote Islands in Norway,” *Journal of Energy Storage* 75 (2024): 109482, https://doi.org/10.1016/j.est.2023.109482.

[53] S. Daud, “Multi Control Adaptive Fractional Order PID Control Approach for PV/Wind Connected Grid System,” *International Transactions on Electrical Energy Systems* 31, no. 4 (2021): e12809.

[54] P Saini, R. Kumar, and P. K. Juneja, “Design of the PI Controller for the Consistency of Stock in the Paper Machine Headbox Using Particle Swarm Optimisation (PSO),” in *International Conference on Innovative Sustainable Computational Technologies (CISCT)* (2019).

[55] Z. Zhang, X. Cheng, Z. Xing, and Z. Wang, “Energy Management Strategy Optimization for Hybrid Energy Storage System of Tram Based on Competitive Particle Swarm Algorithms,” *Journal of Energy Storage* 75 (2024): 109698, https://doi.org/10.1016/j.est.2023.109698.

[56] C. Haipeng, “Optimal Energy Management Strategy for an Islanded Microgrid With Hybrid Energy Storage,” *Journal of Electrical Engineering & Technology* 16 (2024): 1313–1325.

[57] S. Labdai, B. Hemici, L. Nezli, N. Bounar, A. Boulkroune, and L. Chrifi-Alaoui, “Control of a DFIG Based WECS With Optimized PI Controllers Via a Duplicate PSO Algorithm,” in *2019 International Conference on Control, Automation and Diagnosis (ICCAD)* (Grenoble, France, 2019), 1–6, https://doi.org/10.1109/iccad46983.2019.9037879.