Optimized PI based fuzzy controller for power quality assessment in autonomous microgrid using novel hybrid bio-inspired optimization technique Authors: Suresh Govindasamy, Jaisiva Selvaraj, Rathinam Angamuthu, Tefera Mekonnen Azerefegn Published: 2026 ABSTRACT AbstractThe increasing penetration of nonlinear loads (NLLs) in three-phase distribution systems introduces significant harmonic distortion, leading to degraded power quality (PQ), increased losses, and potential voltage instability. To overcome these challenges, this paper proposes an enhanced shunt active power filter (SAPF) control strategy based on a hybrid Sand Cat Swarm Zebra Optimization tuned Second-Order Generalized Integrator with Fuzzy Logic Controller (SCS-ZO). The proposed approach effectively identifies phase angle variations, extracts fundamental signal components, and regulates compensating signals under dynamic operating conditions. The Second-Order Generalized Integrator (SOGI) module ensures accurate signal decomposition, while the fuzzy logic controller (FLC) provides robust voltage regulation and fast dynamic response. Furthermore, the hybrid Sand Cat Swarm Zebra Optimization optimization algorithm is employed to optimally tune controller parameters, improving convergence speed and overall system performance. The proposed controller is evaluated using a MATLAB/Simulink-based three-phase microgrid under balanced, unbalanced, and nonlinear load conditions. The results demonstrate that the proposed SCS-ZO significantly improves power quality by effectively mitigating harmonics, voltage fluctuations, and other disturbances, thereby enhancing system stability and reliability.Keywords: Micro grid, Power quality, Fuzzy controller, Voltage regulation, OptimizationSubject terms: Energy science and technology, Engineering Introduction Within a stable 3-phase framework, the distributed system manifests Total Harmonic Distortion (THD) for both progressive and destructive orders1. This intricate 3-phase model, which incorporates Non-Linear Loads (NLL), gives rise to third-order current harmonics13. These currents, inherently unable to disperse, undergo mathematical amplification, intensifying the substantial current flow along the neutral line and thereby contributing to issues associated with neutral current2. These loaded components are integrated into a 3-phase, 4-line distribution system besieged by pronounced PQ challenges3. These challenges encompass deficiencies in voltage regulation, escalated reactive power levels, unwarranted neutral current, and imbalances in load4. Consequently, there exists a compelling need for a judicious management approach aimed at minimizing dominant harmonics to a level below 5%9. Numerous control methodologies have been put forth in the literature with the objective of mitigating voltage flickers, swells, and harmonics12. These approaches encompass instantaneous reactive PQ control5, Fryze current compensation, and Synchronous Reference Frame (SRF) techniques11. However, these strategies carry specific drawbacks, including bulkiness and susceptibility to noise within the supply model6. The primary objective of power injection is to augment the efficacy and excellence of the distributed network7. Among the excess of techniques available, the SOGI has emerged as a best approach in the literature for estimating grid parameters due to its minimal computational demands and straightforward implementation8. By filtering the quadrature-phase and in-phase forms for its input, SOGI estimates the frequency, amplitude, and phase of its signal10. The estimated quantities by SOGI exhibit oscillatory waves in the presence of harmonics, Alternate Current (AC) offset, and inter-THD, elucidating the low-signal modeling of estimation dynamics for SOGI11. Several optimization-based and intelligent control strategies have been investigated recently, such as SOGI-Fuzzy-PI controllers, Better Bat Search Algorithm with the Moth Flame Optimization (IBSMFO), and Walrus Optimization with Multi-Functional Recurrent Fuzzy Neural Network (MFRFNN), which have shown improvements in harmonic mitigation and power quality regulation. These methods still have several significant drawbacks, though, including poor robustness in dynamic operating environments, complicated parameter tuning, and slow convergence rates. Moreover, although they are effective at adjusting parameters, hybrid and nature-inspired algorithms like Zebra Optimization Algorithm (ZOA) and Sand Cat Swarm Optimization (SCSO) suffer from limitations like early convergence, difficulty handling collisions in big datasets, and inconsistent performance under changing load or grid failures. However, the majority of the current hybrid methods are based on the weakly coupled sequential or parallel combinations, which restrict the effective exchange of information between constituent algorithms. This drives the necessity of a hybrid approach that is closely-knit and interacts on the update level. Due to its inability to adequately suppress current and voltage harmonics, current controllers suffer from a larger reactive power burden and reduced steady-state performance, especially when dealing with unbalanced and nonlinear load circumstances14. Intelligent control methods for enhancing microgrid power quality have been the focus of recent research; mainly depend on computationally demanding Convolutional Neural Network (CNN) models13, which could lead to longer processing times and more complex hardware. Similar to this15, face difficulties implementing the Convolutional Neural Network- Long Short-Term Memory (CNN–LSTM)-based DSTATCOM in real-time because of the high computational load and possible latency, which impair responsiveness in dynamic microgrid environments. Furthermore, most metaheuristic methods need a lot of processing, which limits their use for real-time power quality control in contemporary microgrid settings. Despite the extensive development of control strategies for power quality (PQ) enhancement in microgrid systems, several critical technical limitations remain unresolved. Existing methods such as SRF-based controllers, PI/FLC hybrids, and optimization-assisted controllers have demonstrated effectiveness in harmonic mitigation; however, they suffer from three fundamental challenges: Inadequate dynamic adaptability under rapidly varying nonlinear and unbalanced load conditions, leading to residual harmonics and voltage instability. Inadequate dynamic adaptability under rapidly varying nonlinear and unbalanced load conditions, leading to residual harmonics and voltage instability. Suboptimal parameter tuning mechanisms, where conventional and hybrid metaheuristic algorithms exhibit slow convergence, premature stagnation, or weak coordination between exploration and exploitation phases. Suboptimal parameter tuning mechanisms, where conventional and hybrid metaheuristic algorithms exhibit slow convergence, premature stagnation, or weak coordination between exploration and exploitation phases. Limited integration between signal extraction and control layers, where SOGI-based structures, although efficient in fundamental component extraction, show performance degradation in the presence of distorted grid conditions, DC offsets, and inter-harmonics. Limited integration between signal extraction and control layers, where SOGI-based structures, although efficient in fundamental component extraction, show performance degradation in the presence of distorted grid conditions, DC offsets, and inter-harmonics. Furthermore, most existing hybrid optimization frameworks are designed using loosely coupled or sequential architectures, which restrict real-time information exchange between constituent algorithms, thereby limiting their effectiveness in achieving global optimal solutions. At the same time, advanced intelligent approaches such as CNN or deep learning-based controllers introduce high computational complexity, making them less suitable for real-time microgrid applications. To address these limitations, this paper proposes a tightly integrated hybrid optimization-driven SOGI-FLC framework, where the SCSO and ZOA are combined at the position update level, enabling continuous interaction between exploration and exploitation processes. This hybrid SCS-ZO algorithm is employed to optimally tune the parameters of the SOGI-FLC controller, thereby enhancing harmonic suppression, improving voltage stability, and accelerating convergence under dynamic microgrid conditions. Contributions: The key contributions of the manuscript are, The SOGI-FLC functions as a voltage controller for the microgrids, specifically engineered to deliver rapid responses and precise outcomes.The integration of SOGI with FLC achieves effective voltage regulation and harmonic reduction, contributing to enhanced power quality. The SOGI-FLC functions as a voltage controller for the microgrids, specifically engineered to deliver rapid responses and precise outcomes.The integration of SOGI with FLC achieves effective voltage regulation and harmonic reduction, contributing to enhanced power quality. The SOGI filter, as designed, demonstrates satisfactory validation in both steady-state and dynamic situations, presenting a straightforward digital implementation. The SOGI filter, as designed, demonstrates satisfactory validation in both steady-state and dynamic situations, presenting a straightforward digital implementation. The SCS-ZO algorithm is implemented to fine-tune the scaling elements of the SOGI-FLC, resulting in expedited convergence and, consequently, an improvement in microgrid power quality. The SCS-ZO algorithm is implemented to fine-tune the scaling elements of the SOGI-FLC, resulting in expedited convergence and, consequently, an improvement in microgrid power quality. The hybridization of SCSO and ZOA not only enhances the efficiency of the tuning process, but also significantly reduces computational complexity while ensuring the attainment of the best fitness. The hybridization of SCSO and ZOA not only enhances the efficiency of the tuning process, but also significantly reduces computational complexity while ensuring the attainment of the best fitness. Organization: The manuscript is organized as: The performances of the existing methods are surveyed in Section "Literature review". Section "Proposed topology of power quality enhancement in microgrid" presents an elaboration of the newly introduced scheme, with detailed simulation results expounded upon in Section "Results and discussions". Additionally, Section "Conclusion" serves the conclusion of the proposed approach. Literature review Numerous studies have previously explored the foundation for controlling microgrid systems using various approaches and methods. The findings and limitations from recent literature are reviewed below, and the issues are outlined in Table 1. Table 1Evaluation of existing approaches in enhancing microgrid power quality.Author citationControllerVoltage controlPower compensationMeritsLimitationsAl Thaiban A M et al.16WOA- MFRFNN* Robust voltage regulation under load and renewable fluctuations* Complex computational structureRajesh P et al.17IBSMFO* Improved dynamic voltage and power response* Requires precise synchronization among hybrid sourcesShravani C and Narasimham R L et al.18SCSO* Effective THD reduction and harmonic compensation* Complex controller tuning * Possible convergence issues with variable inputsCelik D et al.19ST-SMC×* Effectively diminishes THD* Difficult in implementation* Slow convergenceSivakumar N et al.20DBN- DMO* High accuracy in voltage and current control* Reduced THD with intelligent optimization* High computational demand for DBN trainingBudiman FN et al.21OHPF×* Significantly reduced the computational burden, resulting in a more efficient and streamlined computational process* Not analyzed important power indicesChoudhury S et al.22PI* Improved dynamic voltage response* Low convergence rateSahoo GK et al.23PI×* The diminishing of Total Harmonic Distortion (THD) and the boosting of active and reactive power control are achieved* Lack of detailingtechniqueBabu N et al.24FLPID×* Enhanced rejection of DC offset is achieved* High computational burden* Difficult in implementationPazhanimuthu C et al.25SOGI* Attained an improved stability* Low compensation for long-term voltage interruptionsGiurgi GI et al.26SOGI-FL-PI××* The fluctuations have been successfully diminished* Not vigorous* Not flexible* More oscillations in dynamic load conditionsNarayanan V, and Singh B27SOGI-FLL-WDCRC×* Voltage swells have been encountered, implying occurrences of elevated voltage levels beyond the normal range* High computational complexityKanagaraj N et al.28AF-SOGI* THD level have been controlled effectively* Maximum computational complexity* Reactive power demandYadav, S.K. and Yadav, K.B36.FOPID-PI with ASM-WHO* Improved convergence, enhanced power quality* High computational complexityYadav, S.K. and Yadav, K.B37.FOPIC with HS-CS* Better THD reduction, improved stability* High computational cost Evaluation of existing approaches in enhancing microgrid power quality. * Difficult in implementation * Slow convergence * High accuracy in voltage and current control * Reduced THD with intelligent optimization * High computational burden * Difficult in implementation * Not vigorous * Not flexible * More oscillations in dynamic load conditions * Maximum computational complexity * Reactive power demand Existing strategies Various methodologies for the control of microgrid systems have been investigated in recent studies, each presenting unique approaches to address specific challenges. For microgrid systems, a new Fractional Order-Active Disturbance Rejection Controller (FOADRC) control approach was suggested by Al Thaiban A M et al.16 to improve power quality. With the help of the Walrus Optimization Algorithm (WOA), the controller parameters are efficiently adjusted. For adaptive regulation in a variety of scenarios, the Multi-Functional Recurrent Fuzzy Neural Network (MFRFNN) forecasts control parameters. The technique improves the voltage profile in a variety of situations, including sag, swell, imbalance, and fault circumstances, and it dramatically lowers THD. In order to maintain the power quality of renewable energy sources (RES) in microgrid systems, Rajesh P et al.17 suggests a novel control strategy. The suggested approach was known as the IBSMFO method since it combines the Better Bat Search Algorithm with the Moth Flame Optimization (MFO) Algorithm. Mutation was used to alter bats search behavior function, such as crossover. Here, search behavior has been controlled by MFO with the goal of lowering the error function. The goal was to demonstrate how the suggested method enhances power quality in relation to the fluctuation of active and reactive power. MFO is the best way to lower the power variation while still achieving the goal. Additionally, the daily and weekly data forecasts for grid power prices, electrical loads, and environmental characteristics are used to minimize the operational costs of RESs. In order to improve power quality in microgrid distribution systems, Shravani C and Narasimham R L et al.18 suggested a synergistic Unified Power Quality Conditioner (UPQC) application. The suggested sand cat swarm optimization method serves as the foundation for the Sand Cat Swarm Optimization (SCSO) technology. The main objectives of the suggested approach are to maximize UPQC, control power flow, and reduce harmonic distortion in the voltage and current waveforms. Celik D et al.19 employed a phase angle vector model Phase-Locked Loop (PLL) and linear kalman filter for robust estimation of harmonics and disturbances in grid voltage and NLL current signals. However, practical implementation challenges arose due to difficulties in accurately estimating noise covariance matrices. Sivakumar N et al.20 suggested a deep belief network (DBN)-based control scheme optimization for improving power quality in a microgrid cluster linked to a RES. This improves the reliability of the power sources by controlling the available energy within the cluster rather of concentrating it around the utility grid. To further improve the quality of the power supplies, a DBN model based on Improved Dwarf Mongoose Optimization (DWO) was suggested for inverter regulation. This model generates optimal pulse-width modulated signals. Budiman FN et al.21 suggested an Optimal Harmonic Power Flow (OHPF) approach for daily development in a grid-integrated microgrid. The framework combined optimization and harmonic power flow, assessing PQ through THD, voltage magnitude, and voltage unbalance parameter. A non-iterative Demand Side Management (DSM) scheme was suggested for PQ control, integrated as load constraints in the OHPF optimization. These constraints allow flexible DSM performances like load detaching and interphase load transmission. Additionally, penalty functions were incorporated to limit voltage magnitude and voltage THD. However, the study did not analyze PQ catalogues,like individual harmonic distortioncurrent to demonstrate efficiency. Choudhury S et al.22 had presented energy controlling approaches and PQenhancementapproaches for a Microgrid system integrating Battery, Super Capacitor and Fuel Cell technologies. To optimize energy management and enhance power quality, the researchers suggested a Modified Water Wave Optimization (MWWO) scheme with adaptive population extent and wavelength parameter. The MWWO approach effectively adjusted the factors of the Proportional Integral (PI) controller to ensure robust and dynamic system operation. However, a drawback of this suggested approach was its lower convergence rate. Sahoo GK et al.23 suggested a Prairie Dog Optimization (PDO) approach tailored for Hybrid Renewable Energy Systems (HRESs) involving PV, fuel cell (FC), and battery components in the Simulink/MATLAB framework. The suggested PDO technique optimizes the PI controller gain parameters, effectively addressing load demand and alleviating PQ issues. The MG model, implemented to tackle planned PQ challenges, like oscillatory transient, swell, unbalanced load, and notch circumstances, showcased the PDO controller’s response. However, the suggested method fell short in addressing additional real-world issues, whether discrete or continuous. SOGI-fuzzy based approaches In 2020, a demonstration was conducted by Babu N et al.24 on the improvement of PQ in a grid-securedPV distribution network. This was achieved using a Shunt Active Power Filter (SAPF) with the FLCintegrator. The constant maintenance of the DC-link voltage during transient situations allowed the Fuzzy Logic Proportional Integral Derivative (FLPID) to balance power between DC and AC components. Harmonic reduction was achieved by effectively separating Fuel cell (FC) from partial grid voltages using Multi Complex Coefficient Filter (MCCF), and further decreasing current harmonics was accomplished by extracting FCs from nonlinear loads with SOGI-FLC. However, potential drawbacks, including implementation difficulty and increased computational burden, were acknowledged. In 2021, the determination of phase angle variations in a 3-phase system with nonlinear and single-phase loads for a series hybrid active power filter was undertaken by Pazhanimuthu C et al.25 through the utilization of a SOGI controller. This system, inclusive of a solar PV component, effectively addressed voltage interruptions, reducing THD, voltage disturbances, and neutral current problems. Nevertheless, the SOGI controller encountered challenges in compensating for persistent voltage disruptions. In 2022, the development of a SOGI-based Fuzzy Logic Proportional-Integral (SOGI-FL-PI) controller for PV energy conversion performance under varying temperature and irradiance conditions was carried out by Giurgi GI et al.26. While achieving superior performance and maximizing PV panel power generation, the technique was noted for its lack of robustness and flexibility, exhibiting more oscillations in dynamic load conditions. Narayanan V, and Singh B27 suggested an enhanced Second-Order Generalized Integrator-Frequency Locked Loop With DC-Offset Rejection Capacity (SOGI-FLL-WDCRC) filter for AC microgrids, addressing grid pollution and power quality issues arising from nonlinear loads. This filter precisely estimates progressive sequence modules, phase angle, and frequency in irregular grid voltages. It enables maximum-quality grid currents and unified synchronization, even under irregular conditions. Additionally, it mines the weight module of nonlinear load currents in dynamic circumstances, facilitating the generation of precise reference source currents. This enhances the efficiency of the voltage source converter, ensuring the delivery of high-quality power by diminishing load harmonics, reactive power, and unbalanced modules. Kanagaraj N et al.28suggested a smart grid application using a Static Compensator (STATCOM) to boost power quality and flow in the distribution system. This model employed a quasi-Z-Source Inverter (qZSI) with STATCOM in a three-phase four-wire distribution module. The compensator circuit, combining a qZSI and a PV module, was used for switching. The suggested compensator was controlled by adaptive frequency fixed-SOGI, and FLC was employed for optimizing PI controller parameters. Notably, the source current’s THD was lower compared to conventional STATCOM techniques. Yadav, S.K. and Yadav, K.B36. proposes a hybrid renewable energy storage system with Unified Power Quality Conditioner (UPQC) based on an optimized collateral Fractional Order Proportional-Integral-Derivative- Proportional-Integral controller using the Amplified Slime Mould-Wildebeest Herd Optimization algorithm (ASM-. MATLAB validation is a methodology that includes validation under voltage disturbances. There are better convergence and power quality. Limitations consist of the computational complexity, simulation based only validation, and poor performance of real time experimental validation in general. To address the problem of power quality, Yadav, S.K. and Yadav, K.B37. introduces an Hybrid Seagull Optimization—Chicken Swarm Optimization (HS-CS) optimised FOPIC-UPQC in Hybrid Energy Storage System (HESS)-integrated systems. Hybrid Seagull and Chicken Swarm with MATLAB validation is used as methodology. The strengths are enhanced Total Harmonic Distortion (THD) suppression and stability. Limitations include high computational cost, complexity of the algorithms and absence of real-time experimental validation. The research was prompted by the following research gaps: Operation problems: Operational challenges include current and voltage harmonics, and so the reactive power burdens on the customer side of the distributed system when integrating a grid-connected controller with NLL. Operation problems: Operational challenges include current and voltage harmonics, and so the reactive power burdens on the customer side of the distributed system when integrating a grid-connected controller with NLL. Power quality problems: Power quality issues arise from various control strategies exhibiting inadequate steady-state performance, sluggish convergence, and increased oscillations during dynamic load conditions. Power quality problems: Power quality issues arise from various control strategies exhibiting inadequate steady-state performance, sluggish convergence, and increased oscillations during dynamic load conditions. Proposed topology of power quality enhancement in microgrid The introduced SOGI controller in Fig. 1 incorporates a harmonic-producing load in the microgrid system. The proposed system’s three-phase utility grid is interconnected with residential, linear, and nonlinear demands. The constant maintenance of the reference voltage for the DC bus is ensured by the FLC. The computation of the three-phase reference currents is carried out utilizing the SCS-ZO technique. Switching signals for the Voltage Source Inverter are received from the hysteresis controller. Block diagram of introduced topology. The insulator of harmonics acts as an impedance element between the NLL and the power source. To align the phase and amplitude values with the primary input signal for the SOGI, the output signal comprises two sinusoidal waveforms with 90° phase shifts. In the Point of Common Coupling (PCC), the input voltage signal is monitored. Harmonic voltages are introduced and manipulated by adding or subtracting them from the source voltage to ensure that the NLL maintains a stable sinusoidal voltage. The SOGI controller, analogous to a resistor with high impedance at all unwanted harmonic frequencies and zero impedance at the Fundamental Frequency (FF) component, prevents all NLL harmonics from entering the FF. Consequently, the NLL and the power source are effectively isolated from these harmonics. The harmonic current flows within the microgrid supply without triggering harmonic resonance, creating a more stable and efficient microgrid operation25. Figure 2 illustrates a pictorialdepiction of the Simulink diagram illustrating the introduced SOGI-FLC in the microgrid system.Unlike conventional power systems, where microgrids are strategically placed to transport load currents, in the microgrid context, the SOGI controller is positioned adjacent to the NLL to impede harmonics from entering the microgrid. This setup ensures that there is no direct transfer of current harmonics between the source and the nonlinear load or vice versa. Simulink diagram of introduced topology. Modelling of microgrid Microgrid (MG) model consist of PV, battery and VSI. The DC bus, which consists of necessary components like solar panels, battery energy storage systems, and various DC loads, controls the output and consumption of DC electricity. The PV system, which converts solar energy into electrical power, provides a direct power supply to the DC bus. The BESS is crucial to energy management because it stores excess power when solar power production surpasses demand and releases stored power when generation is not available, ensuring a steady balance between supply and consumption. The AC bus provides AC loads by delivering power at the standard AC frequency and voltage needed for a range of devices. VSI can be used to convert the DC power from the DC bus to AC. It regulates the AC side voltage and frequency to guarantee a continuous and efficient power flow. The VSI is crucial to the stability and efficient operation of the MG because it transforms DC into AC and synchronizes it with the demands of the AC bus, even though it only allows one-way power transfer from DC to AC. PV model PV directly converts sunlight into electrical power by utilizing semiconductor technology. An MG can use solar energy, a clean and renewable resource, by integrating PV cells. These cells, which function mostly throughout the day, enhance the MG’s energy mix and meet times of high demand. By lowering reliance on non-renewable energy sources, the PV system improves the MG’s environmental profile. where, I represent the cell current, represent the photocurrent, q represent the charge, V represent the cell voltage, T represent the temperature, represent the PV resistance at series and represent the PV resistance at parallel. The DC–DC converter in a PV system is easy to model. The duty cycle is the primary factor influencing the output current and voltage. In order to ensure effective power transmission from the PV system, the converter controls the output voltage and current by varying the duty cycle. The MG uses the perturb and observe (P & O) approach for maximum power point tracking (MPPT). The technique was chosen due to its ease of use and capacity to effectively maximize power output from renewable energy sources in the face of changing environmental circumstances. The P & O algorithm is nevertheless a dependable and practical way to maintain the MG’s optimal energy generation, even while steady-state oscillations are possible. Battery model As the active center of the MG, BES offers a way to store extra energy for later use. The BES effectively absorbs extra electricity during times of high output, such windy or sunny weather. To guarantee a steady supply of electricity, this stored energy is then used during periods of high demand or when renewable energy sources become intermittent. By smoothly releasing stored energy, the BES also contributes significantly to the MG’s resilience by providing a quick reaction to power shortages and disruptions. The modelling of battery is expressed in the following equations: where, I is the cell’s current rate, is the electrical resistance, and the terminal voltage of the cell and the open-circuit voltage of the cell and the voltage drop across the polarization circuit is represent by . The voltage terminal and the level of charge are two essential parameters for determining a battery’s condition. where, Q represent the battery capacity, B represent the exponential capacity, represent the charging current and represent the internal resistance of the battery. VSI model A VSI is an essential part of MGs since it transforms DC power from sources like solar panels or batteries into AC electricity that can be used by AC loads or transferred to the grid. A DC supply, switching components, and an LC/LCL filter are all included in the analogous circuit that VSI modeling replicates. Under a range of loads, PWM regulates the AC output to provide steady power supply. Grid interaction, filter design, switching effects, and control systems like PI and MPC provide voltage and frequency stability while managing load variations and disruptions. The voltage in abc frame are given by where, t stands for time, ω for angular frequency and for peak voltage. As is common in a balanced three-phase system, these equations explain the three-phase voltages in the ABC frame, with each phase voltage offset. The abc frame’s currents are expressed as where, represent the peak current θ represent the phase angle. Space vector current is expressed as where, and represent the real and imaginary part. To convert the abc frame to the frame, the transformation matrix can be written as The following matrix can be used to express the conversion from the abc frame to the frame: Within the two-axis reference frame, this matrix efficiently converts the three-phase currents , , and into their corresponding α and β components. Structure of SOGI-FLC Figure 3 illustrates the fundamental architecture of the SOGI-FLC. At the core of the SOGI-FLC is its primary component, the second-order adaptive filter, or SOGI. This pivotal block assumes the responsibility of meticulously generating filtered in-phase and quadrature phase components () and (), derived from a supplied input voltage. The second block, known as the FLC controller, plays a crucial role in accurately estimating the operating frequency that the SOGI block will employ. In essence, the two blocks work in tandem within the SOGI-FLC framework, with the adaptive filter extracting relevant components and the FLC controller ensuring precise frequency estimation to optimize the system’s performance. Circuit diagram of SOGI-FLC. Reference voltage generation The microgrid’s compensation process relies on the injection of Reference Voltage (RV), making it an essential requirement for effective operation. The microgrid, utilizing the SOGI, receives the RV. The SOGI controller comprises two loops: the initial loop extracts voltages to determine the injected RV, while the subsequent loop ensures that the filter effectively meets the RV requirements. To extract orthogonal outputs from the input signal with precise amplitudes, the nominal frequency is set to the frequency of the SOGI, as expressed in Eq. 1. where, signifies the angular frequency. The SOGI function as a band-pass filter with limitless gain due to the phase difference between the two sine waves and . The controller produces the required reference compensation voltage for phase “a” as outlined in Eq. (11). where,, and represent the Source Reference Voltage (SRV), reference compensation voltage, and the load voltage, respectively. The computation of the reference compensation voltage requires the use of Source Reference Current (SRC).The device’s supply voltage is approximated symmetrically through the use of a SOGI controller. To regulate the terminal voltage, the supply voltage is assessed with the Reference Voltage, and any deviation is conveyed to the FLC. A square voltage is introduced to the output for reactive voltage adjustment. In cases where the supply voltage deviates from the Reference Voltage, the FLC controller is notified of the error, facilitating control over the terminal voltage. The output is incorporated for reactive voltage control through square voltage. The controlled SRV is formulated using Eq. (12), involving the reversal of output voltages . To create the injected reference voltage for phase ‘a,’ the source voltage is linked with the actual source voltage. Subsequently, to produce the SRV , the injected reference voltage is further evaluated against the injected voltage . The FLC with SCS-ZO generates the needed gate pulses for the microgird using the output29. Modelling of PI controller The control signal shows proportionality with both the error signal as well as with integral of the error signal. Mathematical representation of proportional integral controller is given as: where e(t) represents the error signal, m(t) represents the control signal, represents the proportional gain, represents the integral gain. Figure 4 shows the structure of PI controller. PI Controller. Fuzzy with SCS-ZO based voltage control and power quality enhancement The FLC in Fig. 5 precisely determines the hysteresis bandwidth. The primary advantage is controllability and excellent steady-state and dynamic performance within the designated hysteresis bandwidth, resulting in a smooth frequency shift and enhancing the efficiency and reliability of the microgrid. The controller output is evaluated under both ideal and distorted voltage conditions. When the voltage tends to exceed the lower band during the consideration of phase ‘a,’ the upper switch is activated. As the linearly increasing voltage reaches the upper band, the lower switch is turned ON. Subsequently, the voltage descends linearly until it reaches the lower band again. Fuzzy logic controller. The switching intervals, denoted as and , are provided in the following equations, (14) and (15). where, and denote the expanding and dropping voltages, and represents the capacitance of the SAPF. Regarding the Hysteresis Bandwidth (HB), the switching intervals are expressed in the following equations, (16) and (17). where, the modulation frequency is , and the corresponding switching intervals are and .The modulation frequency, from which the Hysteresis Bandwidth (HB) is derived, can be calculated using Eq. (19). In this context, the AC-side capacitor voltage and the supply voltage are represented as and , respectively. signifies the slope of the RV signal, and the inductance is denoted as L. The correlation among , and enables the modulation of the adaptive hysteresis bandwidth30.The variation among the actual current and the reference current passing via each phase of the Voltage Source Inverter (VSI) is the error signal, expressed in Eq. (20). This research introduces the following specifications for the controller: AThree FLC sets with Gaussian and bell membership rules, denoted as P (Positive), N (Negative), and Z (Zero), are established for each of the two inputs. Three FLC sets with Gaussian and bell membership rules, denoted as P (Positive), N (Negative), and Z (Zero), are established for each of the two inputs. BTo tailor the output, five FLC groups with triangle membership rule N, LN (Low Negative), Z, LP (Low Positive), and P are employed. To tailor the output, five FLC groups with triangle membership rule N, LN (Low Negative), Z, LP (Low Positive), and P are employed. CThe defuzzification method employed is the centroid method. The defuzzification method employed is the centroid method. If both (e and ∂ e is N), (result is N) If both (e and ∂ e is N), (result is N) If both (e and ∂ e is P), (result is P) If both (e and ∂ e is P), (result is P) If both (e and ∂ e is Z), (result is Z) If both (e and ∂ e is Z), (result is Z) If (e is N and ∂ e is Z), (result is LN) If (e is N and ∂ e is Z), (result is LN) If (e is N and ∂ e is P), (result is Z) If (e is N and ∂ e is P), (result is Z) If (e is P and ∂ e is N), (result is Z) If (e is P and ∂ e is N), (result is Z) If (e is P and ∂ e is Z), (result is LP) If (e is P and ∂ e is Z), (result is LP) If (e is Z and ∂ e is N), (result is LN) If (e is Z and ∂ e is N), (result is LN) If (e is Z and ∂ e is P), (result is LP) If (e is Z and ∂ e is P), (result is LP) A unit delay block is employed to determine the signal (∂ e), an additional signal alongside the error signal. The signals are downsized to smaller magnitudes using scaling elements and (∂ e) directed into the saturation structure. The saturation block controls the maximum and minimum boundaries of the signal, maintaining values within the range of −1 to 1. When the parameters of the input signal fall within the limits set by the saturation block, the input signal remains unchanged. However, if the input signal exceeds these limits, it is truncated at either the upper or lower bounds. FLC utilize the outcome of this block as their input. The switching pulse signals for the VSI are generated by the output signals from the FLC. By comparing the FLC’s output with a carrier signal, switching signals are generated31.The scaling elements, denoted as and (∂ e), undergo tuning through the application of the introduced SCS-ZO algorithm. The SCS-ZO algorithm adaptively tunes the FLC parameters, including membership function limits, scaling factors, and rule sensitivity, to enhance controller responsiveness under varying nonlinear load conditions. The dynamic adjustment of input and output gains minimizes steady-state error and accelerates transient recovery, enabling faster harmonic suppression and stable DC-link voltage regulation. Furthermore, the SOGI filter gains have been fine-tuned to achieve improved synchronization with the fundamental grid frequency, ensuring accurate in-phase and quadrature signal extraction even under distorted voltage conditions. The optimal gain selection minimizes phase angle deviation and improves harmonic isolation at the Point of Common Coupling, while the hysteresis bandwidth, linked to the instantaneous error signal, ensures smoother switching, reduced current ripple, and consistent harmonic elimination under dynamic load changes. Hybrid optimization algorithm for parameter tuning In the initial exploration phase of the Zebra Optimization Algorithm (ZOA), the derived position deviates from the introduced conceptual framework. This misalignment leads to suboptimal global solutions and an inability to rectify constraints within the components of the introduced PQ improvement model. Consequently, a refinement process is implemented to enhance the accuracy of the position value obtained during the exploration phase. For the Sand Cat Swarm Optimization (SCSO) algorithm, collisions present a significant challenge, particularly when dealing with extensive or real-time data. These collisions unfavorably affect the approach’s performance, hindering its ability to yield optimal results. To overcome these challenges, a novel mechanism for PQ improvement, named SCS-ZO, is introduced. This innovative approach involves the hybridization of the ZOA32 and the SCSO algorithm33, as illustrated in Fig. 6. Flowchart of proposed SCS-ZO algorithm. This hybridization aims tune and (∂ e) of the FLC to leverage the strengths of both algorithms and mitigate their respective limitations in order to boost the overall performance of the PQ improvement model. It is important to note that the proposed SCS-ZO is not a simple sequential or parallel combination of ZOA and SCSO. In sequential method, the result of one algorithm would be the input of the other algorithm and in parallel method, the two algorithms would be run independently and the best solution would be chosen or averaged. Conversely, the suggested approach combines both algorithms on the position update level. In particular, both ZOA and SCSO strategies are used to update candidate solutions, and a disparity-based fusion mechanism is used to integrate the position updates of the candidate solutions into a single solution. The synergistic interaction between exploration (ZOA) and exploitation (SCSO) behaviors in every iteration facilitates ongoing exchange of information between these two behaviors, leading to enhanced convergence stability and preventing early local maxima. The fitness function is demonstrated in Eq. (20). The fitness function is derived from the final position update equation of the hybrid SCO-ZO optimization algorithm. To elucidate, the following explanation outlines the specifics of this equation. The fitness function in (21) was extended to incorporate weighted indices of THD, voltage deviation, and tracking error, creating a balanced multi-objective optimization framework. The hybrid SCS–ZO mechanism combines ZO and SCSO at the position update level using an adaptive fusion strategy. The final position is computed as: This formulation ensures a dynamic balance between exploration and exploitation, improving convergence and solution accuracy. The position update equation of ZO is presented in Eq. (23). where, represents the zebra’s updated statuswith respect to the next phase, denotes its dimensional parameter. The variables t and T represent the iteration count and the highest number of iterations, respectively. The constant R is set to 0.01. denotes the probability of selecting one of dual randomly generated approaches within the interval 0 to 1. az signifies the zebra’s condition under attack, and represents its dimensional parameter.Similarly, Eq. (24) provides the position update formula during both the exploration and exploitation phases of SCSO. In this context, , ,, and represent the best solution, best-candidate, present, and random positions, respectively. The transition and sensitivity range between exploration and exploitation are denoted as R and . When values are evenly distributed, R achieves balance, ensuring appropriate operations in both phases to meet the demands of the problem. Essentially, R falls within the random range of , with decreasing linearly from 2 to 0 across iterations. When R is confined to the range [−1, 1], it allows the sand cat to position itself anywhere between its present location and the hunting spot. In the SCSO algorithm, if R is fewer than or similar to 1, search agents are compelled to exploit; otherwise, they are obligated to explore and seek prey during the exploration stage. The varying radii of individual cats aid them in evading local optimization traps, proving effective in pursuing prey during the exploitation stage. The algorithm’s balanced behavior and its exploration of alternative local zones in the global space lead to rapid convergence, making it well-suited for addressing upper-dimensional and multi-objective issues. The computation of the disparity between two positions is determined by employing Eq. (25). where, and denote the updated position of the PO and TSO algorithms, respectively. The disparity between these two values is used to calculate the final position update, denoted as in Eq. (26). This fusion of position updates distinguishes the proposed hybrid model from conventional hybrid metaheuristics, where algorithms are either executed in sequence or combined only at the final solution level. Here, the interaction occurs during the iterative search process itself, leading to a more adaptive and balanced optimization trajectory. Table 2 illustrates the pseudo code of SCS-ZO Algorithm. Table 2Pseudo code of SCS-ZO Algorithm. Pseudo code of SCS-ZO Algorithm. The fitness function is achieved through the aforementioned position update equation. Consequently, the proposed method adeptly adjusts the scaling elements, thereby leading to an enhancement in PQ within the connected microgrid employing SOGI-Fuzzy control. Results and discussions Here, the simulation outcomes stemming from the implementation of the SAPF control technique, aiming at proficient voltage regulation and harmonic reduction is discussed. The MATLAB/Simulink toolbox serves as the medium to interface the newly introduced controller with both sensitive and NLL for a comprehensive performance assessment, conducted under both balanced and unbalanced conditions. The effectiveness of the introduced SCS-ZO in the context of SOGI-FLC is systematically evaluated through a comparative analysis with contemporary traditional algorithms, namely Honey Badger Algorithm (HBA)34, Wild Horse Optimization (WHO)35, SCSO, and ZOA. The substantiation of the proposed approach is evident from the figures presented below. The evaluation settings and dataset characteristics utilized to train and evaluate the proposed SCS-ZO controller under three operating conditions such as balanced, unbalanced, and distorted (nonlinear) loads are shown in Table 3. The datasets contain power, voltage, and current signals that were captured during a variety of real-time operating conditions. Phase deviations and voltage sags/swells are simulated by unbalanced conditions (140–150 V), whereas balanced conditions (145–150 V) indicate steady, linear loads. Harmonic-rich disturbances and transient fluctuations are included in the distorted or nonlinear load category (100–150 V). In order to guarantee thorough learning, training accounted for 70% of the entire data, validation (15%) was utilized to adjust the SCS-ZO optimization settings, and testing (15%) was conducted using invisible disturbances. Voltage sags (10–25%), swells (10–20%), harmonics up to the 13th order, and transient events like switching and abrupt load changes are all included in the dataset. The controller was trained to achieve rapid settling under dynamic situations, minimize THD, and maintain voltage regulation. In a variety of microgrid scenarios, the dataset guarantees that the SCS-ZO controller achieves high accuracy, robustness, and flexibility by encompassing both normal and extreme operational states. Table 3Dataset characteristics and evaluation parameters for training and testing of SCS-ZO controller.ConditionVoltage (V)Current (A)THD (%)Phase deviation (°)Disturbance typesController targetsBalanced voltage145–150 V0–50 A0–5% ± 2°Minimal harmonics; no voltage sags/swells; balanced loadTHD minimization, voltage regulation, fast settlingUnbalanced voltage140–150 V0–50 A0–10% ± 5–10°Phase imbalance, mild voltage sags/swells, harmonicsTHD minimization, voltage regulation, settling timeDistorted/nonlinear load100–150 V0–50 A5–15% ± 5–10°Harmonics, voltage sags/swells, unbalanced loadTHD minimization, voltage regulation, settling time Dataset characteristics and evaluation parameters for training and testing of SCS-ZO controller. To evaluate the robustness and adaptability of the proposed SCS-ZO controller, simulations were carried out for three distinct operating scenarios of the microgrid system: (i) balanced voltage condition, (ii) unbalanced voltage condition, and (iii) distorted/nonlinear load condition. Each scenario was analyzed in terms of voltage stability, harmonic suppression, and overall power quality improvement. Balanced voltage condition This case represents the standard operating scenario with linear loads and minimal disturbances. In Fig. 7, the proposed SCS-ZO controller maintains stable voltage (145–150 V) across all three phases, achieves THD reduction to 2.11%, and exhibits fast settling time of 0.07s. Compared to existing methods existing methods such as HBA, WHO, SCSO, ZOA, the proposed controller demonstrates superior harmonic suppression and voltage stability. Analysis of balanced voltage condition. Unbalanced voltage condition This case simulates phase imbalances, mild voltage sags/swells, and uneven loading across phases. Figure 8 shows the analysis of unbalanced voltage condition. The proposed controller effectively stabilizes voltage within 145–150 V, reduces THD to 2.50%, and quickly adapts to phase deviations with a settling time of 0.08 s. Traditional algorithms such as SCSO and ZOA exhibit initial voltage drops or rises, indicating slower dynamic response and reduced harmonic compensation. Analysis of unbalanced voltage condition. Distorted/nonlinear load condition This case represents realistic operating conditions with nonlinear loads, harmonics, and transient events (voltage sags, swells, and sudden load switching). Figure 9 shows the analysis of distorted/nonlinear load condition. The SCS-ZO demonstrates robust performance, maintaining voltage within 140–150 V, achieving THD of 2.85%, and fast settling (0.09 s) even under extreme disturbances. Existing methods such as HBA, WHO, SCSO, ZOA show larger voltage deviations and higher THD values, highlighting the effectiveness of the proposed hybrid controller under severe operating conditions. Analysis of distorted/nonlinear load condition. The quantitative evaluation of the system parameters related to these three operating scenarios is shown in the following figures. The effectiveness of the proposed SCS-ZO model is compared to traditional algorithms like HBA, WHO, SCSO, and ZOA by analyzing parameters like battery voltage, fuel voltage, load current, and load voltage. Figure 10 uses the voltage profiles of the battery as the comparison of five methods including HBA method, WHO method, SCSO method, ZOA method and the proposed SCS-ZO model. Each procedure starts with an initial voltage of more than 50 V. The HBA and WHO models have more pronounced voltages with some specific fluctuation whereas the SCSO and ZOA models have moderate performance with similar trends. The suggested SCS-ZO model, in contrast, exhibits a more dynamic and stable voltage profile, with considerably lesser oscillations and enhanced steady-state performance. All processes stabilize after 270 s, but the proposed solution has a higher voltage regulation and low deviation, which is a sign of increased stability in the system and a good way to control the energy. It is important to note that the relatively lower voltage profile does not indicate reduced performance; rather, it reflects controlled voltage regulation that avoids overvoltage stress, minimizes fluctuations, and ensures efficient and safe battery operation. Evaluation of battery voltage. Figure 11 illustrates the fitness value of the approaches, signifying improved model performance over time. The introduced algorithm stabilizes at a higher fitness level after around 3 iterations compared to traditional algorithms, indicating successful convergence to a robust solution. Evaluation of fitness curve. Figure 12 shows the fuel consumption while using the approaches with respect to time (in seconds) for five different algorithms, such as HBA, WHO, SCSO, ZOA, and the Proposed SCS-ZO model. All five models start with the same initial fuel consumption of 60 g. However, the fuel consumption of each model decreases over time at different rates. The HBA model has the slowest rate of decrease, followed by the WHO model, the conventional SCS-ZO model, the ZOA model, and the Proposed SCS-ZO model. After 350 s, the HBA model has the highest fuel consumption of 50 g, followed by the WHO model of 40 g, the conventional SCS-ZO model of 30 g, the ZOA model of 20 g, and the SCS-ZO model of 10 g. This indicates that the introduced SCS-ZO model has the highest fuel efficiency, compared to other four models. Evaluation of fuel consumption. Figure 13 shows the dynamic fuel voltage behaviour of various controllers operating under dynamic conditions. The suggested SCS-ZO model shows a better dynamic regulation and efficient energy management due to faster adaptation to changes in the load and the ability to stabilize the system more easily. The measured change in voltage is not an indication of a positive change in the magnitude of fuel voltage but of highly responsive controllers. Evaluation of fuel voltage. Figure 14 shows that the load line current of the HBA increases steadily over time. In particular, the current keeps going up until it reaches the highest point around 0.1 s. After that, the load line current levels off and stays constant. This suggests that the system eventually settles into a stable and steady state. The observed pattern in the load line current of the HBA indicates a dynamic improvement in its performance, leading to a sustained period of stability. Figure 15 illustrates the load line current of SCSO as a function of time. The graph depicts a continuous increase in the load line current of SCSO as time progresses, reaching a maximum value before gradual decrease. Notably, the peak load line current surpasses the steady-state value. Comparatively, the load line current graph of SCSO bears resemblance to that of HBA, yet the peak and steady-state values for SCSO are notably higher than those observed in HBA. This observation implies that SCSO has the capacity to deliver a greater current than HBA, suggesting a potential advantage in terms of current output. The graphical representation in Fig. 16 represents the load line current of WHO demonstrates a progressive increase over time, attaining a peak value before gradual decline. Significantly, this peak load line current exceeds the corresponding steady-state value, indicating a distinct moment of heightened current flow during the observation period. The load line current graph of ZOA in Fig. 17 shows that the load line current increases over time, reaches a peak value, and then decreases slowly over time. The superior value of the load line current is higher than the fixed state value. The comparison of the load line current graphs for HBA, WHO, SCSO, and ZOA reveals that SCSO has the highest current, fastest response, and is suitable for high power applications. Conversely, ZOA has the lowest current, slowest response, and is ideal for low power applications. HBA and WHO fall in between with intermediate capabilities. Ultimately, the selection of fuel cell belongs to the specific application needs for current output, response time, and operating conditions. The load line current in Fig. 18, ranging between approximately −20 A and 20 A over a 0.12-s interval, displays variations indicative of evolving load or system conditions. Notably, the SCS-ZO system demonstrates superior performance in managing these current fluctuations. Despite oscillating around a zero-mean value, with both positive and negative excursions, the SCS-ZO system showcases stability and efficient control. Load line current of HBA. Load line current of SCSO. Load line current of WHO. Load line current of ZOA. Load line current of SCS-ZO model. The load line voltage of the HBA in Fig. 19 remains constant at 150 V for the entire time period. This means that the HBA is able to maintain its voltage under load for at least 0.1 s. The figure also shows that the load line voltage of the HBA is very stable, with no significant fluctuations. This indicates that the HBA is able to regulate its voltage well, even under load. The load line voltage of the SCSO in Fig. 20 is initially 150 V, but it quickly drops to around 145 V within the first 0.05 s. After that, the voltage remains relatively constant at around 145 V for the rest of the time period. This indicates that the SCSO can maintain a high voltage under load for at least 0.1 s, but it does experience a slight initial voltage drop. The load line voltage of the WHO in Fig. 21 remains constant at 150 V for the entire time period. This means that the WHO is able to maintain its voltage under load for at least 0.1 s. The load line voltage of the ZOA in Fig. 22 increases rapidly within the first 0.05 s, from 100 to 145 V. After that, the voltage remains relatively constant at around 145 V for the rest of the time period. The voltage range of the load line in Fig. 23 fluctuates between approximately −100 V and 100 V over a time span of 0.12 s, indicating dynamic changes in load or system conditions. Notably, the SCS-ZO system demonstrates superior performance in managing these voltage fluctuations. Load line voltage of HBA. Load line voltage of SCSO. Load line voltage of WHO. Load line voltage of ZOA. Load line voltage of SCS-ZO model. Figure 24 shows that the apparent power of the load increases rapidly at first 130 iterations, but then it starts to level off. The initial increase in apparent power is due to the inrush current, which is a high current that flows into the load when it is first turned on. The inrush current is caused by the charging of the capacitors in the load. The apparent power of the load levels off after a while because the inrush current decreases and the load reach its steady state operating condition. The steady state apparent power of the load is the power that is required to operate the load under normal conditions. Evaluation of apparent power using proposed approach. Figure 25 illustrates the relationship between the voltage of a supercapacitor and time. Initially, there is a decline in the supercapacitor’s voltage, but subsequently, there is a noticeable upturn. Importantly, the proposed model demonstrates a more favourable range compared to conventional methods. Evaluation of super capacitor voltage. Figure 26 shows the THD percentage comparison of different controllers under balanced, unbalanced, and distorted load conditions. The proposed SCS-ZO achieves the lowest THD values of 2.11, 2.50, and 2.85%, outperforming HBA, WHO, SCSO, and ZOA, demonstrating superior harmonic suppression and enhanced power quality performance. Table 4 shows the performance comparison of proposed with existing methods. It achieves the lowest THD, stable voltage range (145–150 V), and fastest settling time, demonstrating superior harmonic suppression, voltage stability, and dynamic adaptability across all operating scenarios. In the context of the SOGI-Fuzzy based microgrid system, power quality enhancement was achieved by the introduced SCS-ZO algorithm, surpassing the performance of several traditional approaches. Analysis oh THD. Table 4Performance comparison of proposed with existing methods.ConditionControllerTHD (%)Voltage range (V)Settling time (s)RemarksBalanced voltageHBA4.731500.10Stable voltage, moderate THDWHO4.851500.12Stable voltage, slightly higher THDSCSO5.20145–1500.08Initial drop to 145 V, then stableZOA5.101450.09Initial rise from 100 to 145 VProposed SCS-ZO2.11145–1500.07Best harmonic suppression, stable voltageUnbalanced voltageHBA5.10145–1500.11Handles moderate phase imbalanceWHO5.25145–1500.13Slightly higher THD under unbalanced loadSCSO5.50140–1500.09Voltage drop observed in one phaseZOA5.45140–1450.10Voltage rise initially, then stableProposed SCS-ZO2.50145–1500.08Maintains stable voltages and low THDDistorted/nonlinear loadHBA6.00140–1500.12Harmonic suppression limitedWHO6.15140–1500.13Voltage regulation affected under transientsSCSO6.50135–1450.10Initial voltage drop observedZOA6.40135–1450.11Voltage rises initially, then stabilizesProposed SCS-ZO2.85140–1500.09Best performance: lowest THD, stable voltage, fast settling Performance comparison of proposed with existing methods. Figure 27 shows the FFT-based harmonic spectra of the output signal of the proposed SCS-ZO controller under balanced, unbalanced and distorted load conditions. Figure 27 (a) displays the balance load results where the harmonic components are practically suppressed and hence the THD is low (2.11) implying a good waveform quality. Figure 27 (b) shows that in the unbalanced load conditions, the harmonic components are a bit higher and hence a THD of 2.50% is achieved without violating the acceptable power quality limits. Figure (c) shows the distorted load condition, with harmonic content that is more significant, and thus the THD of 2.85%. Although the increase occurred, the THD is still within acceptable limits, indicating the strength and efficiency of the proposed controller in ensuring better power quality in different operating conditions. FFT-based harmonic spectra of the proposed SCS-ZO under different operating conditions: (a) Balanced load (THD = 2.11%), (b) Unbalanced load (THD = 2.50%), and (c) Distorted load (THD = 2.85%). Table 5 is a detailed comparison of the work of HBA, WHO, SCSO, ZOA and the proposed SCS-ZO controller on various assessment indicators. The comparison covers THD with balanced, unbalanced and distorted loads, voltage regulating range, settling average, dynamic response, harmonic suppression capacity, and overall performance. As can be seen, the proposed SCS-ZO would considerably outcompete the other techniques, as it provides the least THD values of 2.11, 2.50 and 2.85 respectively, with the shortest settling time and the best dynamic response. It is also exhibiting superb harmonic suppression and constant voltage regulation in the desirable range. Conversely, the current techniques have greater levels of THD, slower response, and relatively average performance. In general, the findings validate the efficiency and the strength of the proposed controller to improve power quality under different operating conditions. Table 5Consolidated performance comparison of different control techniques under balanced, unbalanced, and distorted load conditions.MethodBalanced THD (%)Unbalanced THD (%)Distorted load THD (%)Voltage regulation (V)Average settling time (s)Dynamic responseHarmonic suppressionOverall performanceHBA4.735.106.00140–1500.11ModerateModerateGoodWHO4.855.256.15140–1500.13ModerateModerateGoodSCSO5.205.506.50135–1500.09GoodModerateModerateZOA5.105.456.40135–1450.10GoodModerateModerateProposed SCS-ZO2.112.502.85140–1500.08ExcellentExcellentBest Consolidated performance comparison of different control techniques under balanced, unbalanced, and distorted load conditions. Conclusion The challenge of increasing non-linear loads (NLL) in 3-phase distribution systems, leading to unwanted harmonics and adverse effects on Power Quality (PQ), was addressed in this research. To efficiently compensate for distorted load variations, a novel approach utilizing Shunt active power filters was introduced. Specifically, the hybrid SCS-ZO was proposed. In a three-phase system with NLL, phase angle fluctuations were adeptly identified by the SOGI controller. The adjustment of controller parameters, effective elimination of system harmonics, and management of injected and source voltages were facilitated by the SCS-ZO algorithm. The comprehensive evaluation over the transformer’s lifespan encompassed considerations for harmonics, neutral current issues, voltage sag, swell, and voltage unbalance. The efficacy of the introduced controller was rigorously assessed in a dynamic load 3-phase distributed system using the MATLAB/Simulink environment. Experimental results demonstrated that the SOGI-FLC significantly enhanced system performance and stability, resulting in an improved power quality. The future scope of the proposed technique lies in its potential adaptation to smart grids, leveraging for real-time optimization and predictive maintenance. Further exploration of its applicability across diverse energy systems, along with continuous refinement in line with emerging technological advancements, could establish it as a robust solution for improving power quality and overall efficiency in modern energy distribution networks. Abbreviations Non linear loads Power quality Sand cat swarm zebra optimization Second-order generalized integrator- fuzzy logic controller Total harmonic distortion Second-order generalized integrator Synchronous reference frame Dynamic voltage regulators Fuzzy logic controller Phase-locked loop Bernoulli polynomial-based artificial neural network Optimal harmonic power flow Demand side management Modified water wave optimization Proportional integral Prairie dog optimization Hybrid renewable energy systems Photo voltaic Fuel cell Fundamental constituents Shunt active power filter Direct current Alternative current Fuzzy logic proportional integral derivative Multi complex coefficient filter SOGI-based fuzzy logic proportional-integral Second-order generalized integrator-frequency locked loop with DC-offset rejection capacity Static compensator Quasi-Z-source inverter Point of common coupling Fundamental frequency Reference voltage Source reference voltage Source reference current Hysteresis bandwidth Voltage source inverter Honey badger algorithm Wild horse optimization Sand cat swarm optimization Fractional order-active disturbance rejection controller Renewable energy sources Better bat search algorithm with the moth flame optimization Unified power quality conditioner Sand cat swarm optimization Long short-term memory Convolutional neural network Deep belief network Dwarf mongoose optimization Zebra optimization algorithm Author contributions Suresh Govindasamy – Writing, review and editing the original draft and Visualization; Jaisiva Selvaraj—Supervision and Investigation; Rathinam Angamuthu– Conceptualization; Tefera Mekonnen Azerefegn—Project administration, Data curation and Validation. Data availability The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References: Associated Data Data Availability Statement The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.