## 2 Mathematical Model of the Hybrid MG System  
The MG under consideration is composed of a solar photovoltaic (PV) array, a proton exchange membrane fuel cell (PEMFC), and the main grid, as shown in Figure 1. These sources are interconnected through a centralized three-phase grid-connected inverter, which serves as the link between the MG and the main grid through a step-up transformer connected between B1 and B2. This configuration is designed to provide reliable power to both residential and industrial loads, as well as to an electric vehicle (EV) charging station. To ensure the stability and quality of power at the EV charging station bus (B4), a DSTATCOM is integrated into the system. The primary function of the DSTATCOM is to enhance the dynamic voltage profile and mitigate transient voltage issues that may arise due to fluctuating load demands or grid disturbances. This addition is crucial in maintaining consistent voltage levels, thereby ensuring the efficient operation of the charging station and the overall microgrid. Figure 1 offers a visual representation of the microgrid's integration with the DSTATCOM at the EV bus, highlighting the interconnectedness of the components and their role in supporting a stable and resilient power supply. Table 2 provides detailed parameters of the electrical equipment used within the system, including specifications for the PV array, PEMFC, inverter, and DSTATCOM.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Ref.** & **Year** & **Control Algorithm** & **RES** \\ \hline
[24] & 2015 & PI-controller tuned by Differential Search Algorithm and Wind-Driven Optimization & - \\
[17] & 2016 & A conjugated gradient back propagation based \(\mathrm{icos}(\varphi)\) NN method was applied. & - \\
[21] & 2016 & ANFIS least-mean-square was applied for compensating the disturbances in the current. & - \\
[23] & 2016 & An adaptive reweighted zero-attracting control was applied to control the & PV \\  & & & D-STATCOM-based PV source. & - \\
[18] & 2017 & A generalized NN algorithm was proposed that combines Gaussian, sigmoidal, and linear & - \\  & & & transfer functions. & \\
[22] & 2019 & An improved Widrow–Hoff algorithm-based adaptive control was proposed. & PV \\
[25] & 2019 & PI-controller tuned by particle swarm and ant colony optimization was used. & - \\
[19] & 2020 & An enhanced MPC-based state-space model was proposed. & - \\
[20] & 2020 & MPC was applied to control a newly developed four-level inverter-based D-STATCOM. & - \\
[28] & 2021 & A FOPID controller optimized using the Black Widow Optimization technique was & PV, wind turbine \\  & & proposed to address and mitigate PQ issues. & - \\
[30] & 2021 & A cascaded PI-FOPID controller, optimized using the Gorilla Troops Optimizer, was introduced to improve the frequency response of a hybrid microgrid system. & PV, wind turbine \\
[16] & 2021 & Type-2 FLC with the recursive least square filter was proposed. & - \\
[29] & 2023 & A cascaded PI-PD controller was designed for a microgrid, with its parameters optimized & PV, wind turbine \\  & & using the Sewing Training-Based Optimization algorithm. & - \\  & & A fractional-order dual closed-loop current decoupling control strategy, based on FOPI & - \\
[26] & 2024 & controllers, was introduced for the suggested fractional-order capacitors and & - \\  & & fractional-order inductors into the conventional integer-order cascaded H-bridge & - \\  & & multilevel STATCOM. & - \\  & & To enhance the overall performance of the DSTATCOM, a detailed comparative analysis of & PV, FC \\ Proposed work & & two cascading controllers, PI-PI and FOPI-FOPI, is presented. & PV, FC \\  & & The WSO-WOA hybrid optimization algorithm is developed for efficient controller tuning. & - \\ \hline \hline \end{tabular}
\end{table}
Table 1: A comparative analysis of the proposed work with existing studies.