Abstract
Distribution systems have been significantly impacted in the present scenario by incorporating solar and wind power electronic devices. This work optimally designs the solar PV system (SPVS), battery storage (BS), and fuel cell (FC) sourced seven-level cascade H-bridge converter for shunt active power filter (7L-SHAPF) by selecting the filter resistance and inductance parameters in addition to inductance of boost and buck boost converters of SPVS, BS, and FC by enhanced lyrebird optimization (LOA) called as (ELOA). The multilevel cascaded topology provides superior performances in power quality enhancement. The hybrid control ELOA trained ANNC-PID controller is developed by optimal selection of weights and bias values of artificial neural network controller (ANNC) by reducing mean square error (MSE) to obtain gain values of PID controller. The primary goal is to efficiently handle the current waveforms distortions with DC link voltage balancing, and to reduce the source current total harmonic distortion (THD) of the system connected to the grid that integrates SPVS, FC along with BESS which is denoted as (7L-SHAPF-SFCB). The effectiveness of the developed method is compared with genetic algorithm and artificial bee colony algorithm. The proposed hybrid optimally designed method reduces the THD to 3.53%, 2.44%, 4.15%, and 3.79% which are much lower than those of compared techniques and existing methods available in literature.
Keywords
Introduction
The idea of predictive and adaptive control, shunt active power filter (SHAPF) with artificial neural network (ANN) and neuro-fuzzy control was proposed, aiding in the quick prediction of compensatory current (Jayanti et al., 2016). In addition, the PV-fed SHAPF design was created to enhance the PQ of sinusoidal ac supplies and lower harmonic distortions while supporting IOT devices. To determine the SHAPF switching state, the reference current signal and switching signal were generated using artificial intelligence methods (Goswami and Goswami, 2020).
The ADALINE neural network was developed as an effective harmonic detection approach for real-time creation of the reference current fed to a shunt active power filter. The reference current model's weights are generated by a single layer of 101 nodes. Instantaneous power theory (PQ), a limitation of the existing technology, is successfully addressed by it (Janpong et al., 2021). The SVR prediction technique was created with three new machine learning-based algorithms for the fulfillment of its multi-objective in the view of PV energy production and PQ enhancement, the main goal is to improve the ability of the PV- SHAPF (Asmae and Mohammed, 2024). Solar PV, wind, and fuel cell (FC)-based distributed generation were used in the design of the MG system, and a combined control technique-based SHAPF is used to handle the PQ issues of the MG system (Prasanta et al., 2025). A thorough analysis of the SHAPF, MPPT, and RES combined control strategies. To enhance SAPF performance in terms of total harmonic distortion (THD), an ANN-based control system was created (Ravinder and Hari, 2018). Additionally, SHAPF design concepts were presented, and a PR controller developed using GA described the system's optimal control strategy (Behnam et al., 2024).
In the meantime, a methodology based on the Multi Sine Cosine Algorithm was proposed for the best SHAPF design in order to minimize inters harmonics (Umadevi et al., 2023). The different configurations of existing synchronization methods were applied to control SHAPF (Hoon et al., 2019). In recent decades, there has been increased focus on incorporating RES into the distribution network. This integration is encouraged to alleviate the workload of VSCs and minimize the need for higher ratings. A novel configuration of a solar-integrated UPQC was created to efficiently tackle PQ issues. The study thoroughly summarizes the difficulties RESs offer and the several approaches taken to overcome these difficulties (Elavarasan, 2020; Elavarasan et al., 2020; Madurai et al., 2020: 10–12). The nature inspired firefly algorithm was used to obtain optimal parameters of shunt filter along with PI controller gain values in order to decrease THD and improve PF (Mahaboob et al., 2019). The PI controller gain values selection for shunt filter was developed utilizing an Ant Colony Algorithm to minimize THD with different loads (Sakthivel et al., 2015). Besides, the SHAPF for compensation of reactive power using ANN was presented to maintain unity PF (Karthikeyan et al., 2020).
However, in the distribution network that is linked with a microgrid, problems over PQ were addressed by introducing UPQC which aims to address voltage imbalances and current harmonics. Besides, an AI-based ANFIS technique was presented to enhance system's efficiency and utilization (Renduchintala et al., 2021). However, the assessment of several SHAF control methods for enhancing microgrid performance using the most cutting-edge control methods is methodically examined and contrasted to emphasize their advantages and disadvantages (Buddhadeva et al., 2023).
Next, an efficient energy management system was developed for small-scale microgrid to address PQ issues in association with renewable sources (Arpitkumar and Amit, 2022; Kumar et al., 2020). Conversely, harmonic mitigation is carried out using convolution neural networks. Using CNN for harmonic extraction, a five-level cascaded H-bridge inverter is used as a shunt active filter, with the reference current produced by the SRF theory (Sugavanam et al., 2021). In the meantime, a hybrid control approach was created using a multilayer topology converter to improve PQ performance for grid-connected PV systems that can actively filter electricity in the highly distorted power grid (Aourir et al., 2022). Meta-heuristic optimization algorithm-based optimal design of controllers for power quality (PQ) enhancement in association with renewable sources (Srilakshmi et al., 2024a; Srilakshmi et al., 2024b; Ramadevi et al., 2023, Srilakshmi et al., 2024c).
The underlying concept for LOA is based on a new bio inspired meta-heuristic algorithm that imitates lyrebird (LB) behavior in its natural environment, namely how LBs react to danger (Dehghani et al., 2023). Additionally, a unique technique known as the HDL-RCNN was introduced to compute the coefficients for the PDC, demonstrating notable enhancements in voltage and frequency control: voltage oscillations in MG (Nima and Hamid, 2025). Then, in order to enhance voltage and frequency regulation within a predetermined timeframe, a finite-time control strategy for PWM control in MG systems was developed (Nima, 2025a). However, integrating battery and hydrogen energy storage systems was intended to improve energy sustainability and dependability, particularly in applications involving renewable energy. By offering effective energy storage, these hybrid systems mitigate the unpredictability of renewable energy sources and guarantee PQ (Nima, 2025b). However, a detailed discussion of new control strategies for voltage stability, including classical PI/PID controllers, non-integer controllers, model-based, and model-free approaches, was provided in (Nima et al., 2025). The composite load model was taken into consideration for state estimation and additional improvement, and an ANN with a back propagation method were utilized for determining the islanding mode of distribution network states (Laskhmi et al., 2024).
It is clear that the latest research articles have primarily focused on using SHAPF in combination with solar PV system (SPVS) and RES. These investigations explored different control techniques to improve PQ with solar and battery storage (BS). Besides, they overlooked multilevel converters with hydrogen energy, with optimal design of controller, filter, boost and buck boost converter parameters utilizing meta-heuristic algorithms. The novelty of the paper is highlighted in the key points below:
Development of new enhanced lyrebird optimization algorithm (ELOA) by adopting levy flight to improve the performance of LOA by escaping from local minima. ELOA-based selection of artificial neural network controller (ANNC) weights and bias to obtain optimal gains of PID controller for signal generation. Additionally, the ELOA is also used for the choice of buck boost, filter parameter values of seven-level cascaded H-Bridge converter with objectives of reducing MSE and THD. Reduction of THD in the supply current, while increasing the PF. The integration of FC, BS, and SPVS helps to minimize the stress on converters, offers support in satisfying the demand, and guarantees the regulation of a stable voltage across the DC bus, even in the presence of fluctuations in solar radiation (G), FC pressure, and different types of loads.
The paper is organized in the following manner: Modeling of microgrid Section gives the modeling of renewable sources with 7L converter; besides Proposed control technique Section focuses on methods employed in this research, specifically ELOA, ANN, and PID. Results and discussions Section provides the findings and corresponding analysis. In conclusion, Conclusion Section provides a comprehensive overview of the findings derived from the proposed study and proposes prospective avenues for further research within this particular domain.
Modeling of microgrid
The shunt converter is attached parallel to the PCC, functions as a current compensator. Figure 1 shows the schematic layout of the developed system. The SPVS, BS, and FC grid connections enable PQ control. The SHAPF is connected to the grid via Lsh it is responsible for maintaining a constant DLCV and adding currents to suppress the harmonic content in the current. Nevertheless, the primary limitation of traditional converters is that their output contains a significant amount of harmonics, resulting in the need for larger filters to achieve a sinusoidal waveform, which incurs higher costs. In addition, the proposed multilevel converters generate a leveled output, reducing both the size and cost of the converters. In multilayer inverters, the cascaded H Bridge architecture operates without the need for clamping diodes or components. Figure 2 illustrates the three-phase 7L configuration of a converter, while the corresponding switching sequence is presented in Table 1.

Structure of developed SHAPF. SHAPF: shunt active power filter.

Three-phase 7L cascaded H bridge VSC configuration.
Switching for cascaded 7-level converter for each phase.
Note: ✓indicates ON, ✖ indicates OFF.
Equation (1) is used to calculate the power flow.
Modeling of solar PV system
A solar photovoltaic system operates based on the premise that solar cells convert light energy into electrical energy. The modules of PV are arranged in a series configuration to create a string, which is then assembled in parallel to obtain the desired voltage/ current magnitude. Figure 1 depicts the representation PV model. The system comprises a photocurrent, denoted as Iph, contingent upon temperature and irradiation. The series resistance signifies the internal resistance through which current I is transmitted, while the shunt resistance characterizes ish,Pv flow, representing a leakage current. The equations for the load current, photocurrent, and other variables (Ramadevi et al., 2023) are provided in equations (2) to (6).
Fuel cell
The chemical energy is converted into electrical energy by the fuel cell. Electricity is produced by the electrochemical reaction between H2 and O2. To generate high voltage, several FC's are connected to create a fuel cell (FC) stack. The boost converter raises the FC voltage level. The FC controller with boost converter is depicted in Figure 1. By using PI controller in the Equations (7) and (8), the reference current
According to Equation (9), the PI controller uses the FC error current
Here,
Battery storage
The BS has a crucial play in ensuring the satisfaction of load needs. Batteries, composed of cells assembled in parallel/series configurations, are utilized to get the requisite amounts of voltage and current. The BS also aids in maintaining stable DC bus voltage. The Li-ion battery is chosen for this research project because of its benefits, including slow discharging and low-maintenance expenses. The SOC and its boundaries of this state determine whether to charge or discharge (Srilakshmi et al., 2024c).
Proposed control technique
The shunt filter reduces THD in the current signal and regulates DC bus voltage stable. This is achieved by employing the abc/dq0 transformation, utilizing the optimally trained NNC by choosing weights, and bias with ELOA for selection of PIDC gain values, in addition to the selection of filter resistance and inductance values. However, to convert sources into dq0 frame, the PLL utilizes phase and frequency information obtained from the supply voltage. The load current's dth component is incorporated into the ELOA-ANNC-PIDC. The Hysteresis controller depicted in Figure 3 is utilized to create gate signals.

Shunt controller with ELOA-ANNC-PIDC. ANNC: artificial neural network controller.
ANN is a renowned technique in the field of Artificial Intelligence. It is a mathematical model inspired by humans and is highly versatile for controlling electrical systems. MLPs encompass the well-known neural networks. The benefits of ANN include its capacity for self-learning, fault tolerance, rapid convergence, and robustness. The layout of an ANN has three layers: (IL, HL, OL) input/ hidden and output layers. The learning algorithm chosen for training is the primary determinant of ANN performance. Training is the iterative process of identifying the optimal set of weights which connects the neurons of the ANN to minimize errors.
However, these methods can be classified into gradient search and meta-heuristic. The gradient based BP is a well-known training approach for MLP networks that is based on gradients. Despite its fame, this method of BP is plagued by several shortcomings, including inadequate initial weight estimation, sluggish convergence, and a high likelihood of becoming stranded in local minima. In addition, search methods based on meta-heuristic algorithms rely on the stochastic choice of preliminary predictions at the time of optimization procedure. Utilizing these methods offers the advantage of identifying the global best optimal solution as opposed to a local optimal solution. Nevertheless, they require any preexisting knowledge of the selected issue during calculation.
The approaches above can be utilized to optimize the weight, parameters, and design of neural networks. In supervised learning, the objective is to reduce the disparity among the intended and output. The summation function aims to aggregate the product of inputs, weights, and bias, as depicted in Equation (13). A nonlinear activation function, such as the sigmoid function, is commonly employed as indicated in Equation (12). Hence, the output of neuron is shown in Equation (13).

ELOA trained NNC-PIDC hybrid controller.
ANN training settings.
MSE: mean square error.
Proposed ELOA with control parameters
The multilevel converters with conventional design parameter may not be effective in lowering the THD. In recent days, meta-heuristic optimization algorithms have played a vital role in solving complex multi-objective engineering problems effectively. In this work, ELOA, a member in meta-heuristic algorithm family is employed for solving the SHAPF design problem to minimize the THD and obtain the best possible design parameter values taking different harmonic loads in account. The main reason for selecting ELOA in this work is its advantages, such as its effectiveness in solving unconstrained and constrained multi-objective optimization problems, easy development, minimum parameters for tuning, and robust solution without stuck in local optima. This section explains the ELOA, the representation of problem variables the solution procedure.
The LB is an indigenous avian species of Australia. The LOA technique being offered is a meta-heuristic algorithm that operates on a population based, with LB's serving as the population members. Every LB, as a member represents the value of the selected control parameter. In mathematical form each LB representation a vector that corresponds to a decision parameter. The population of the algorithm is represented by the LOA members and can be formally represented using a matrix, as described by Equation (14). The LOA population is randomly generated in search space using Equation (15).
Here, X represents the LOA population matrix.
Here, F represents the vector of the objective function values that have been assessed.
LB's decision in this scenario involves a population update procedure that consists of two distinct phases: (i) escape with levy flight concept and (ii) hiding. Equation (17) is used to imitate the LB's decision-making strategy in selecting between hiding or escape options at danger times in the design of LOA. Consequently, for every iteration, the location of LB is solely changed based on either the 1st or 2nd phase.
Here,
Phase 1: escaping strategy (exploration with levy flight)
At this stage of the LOA, the LB position is adjusted using a model that simulates the LB's movement from a dangerous place to a safe area. Moving LB to a secure location results in significant alterations in its location within the problem-solving domain, thereby demonstrating the exploratory capabilities of LOA in conducting a comprehensive search. In the construction of LOA algorithms, safe regions refer to the positions of other LB's that have best values. Hence, the set of secure regions for every LOA member can be ascertained by employing Equation (18).
Here,
Phase 2: hiding strategy (exploitation)
During this stage of the LOA, the location of the individual within the search space is adjusted using a modeling method inspired by the LB's ability to conceal itself in a secure place within its surroundings. The LB's ability to accurately assess its surroundings and move with little steps to find a suitable hiding spot demonstrates the local search exploitation capacity of LOA. Within the framework of LOA design, the LB's migration towards a nearby place ideal for concealment is modeled. Equation (22) is then utilized to calculate a new position for each member of the LOA. If the value of the objective function, as determined by Equation (23), is improved, this new location will replace the former position of the associated member.
Here,
Procedure and flowchart of ELOA
The completion of the first LOA iteration is achieved by modifying the position of all LBs. Subsequently, the algorithm proceeds to the subsequent iteration, where the ELOA population is updated according to Equations (17)–(23), and this process persists until the final iteration of the algorithm. During each iteration, the optimal candidate solution is revised and stored.
Representation of design variables
The problem variables in this study encompass the design parameters, such as the weights and bias of the NNC, as well as the resistance and inductances of shunt active filter, PV, FC and battery. The fitness function (FF) is represented by arranging these variables in vector form, as illustrated in Equation (24).
Fitness function
The objective function (F) used for this study is the minimization of THD. The FF is considered to be the inverse of the objective function, as expressed in Equation (25).
Where,
The Obj1 = F1 = THD determined by Equation (26).
Objective two is denoted as Obj2, F2 = Obj2=
Solution process with flowchart
The ELOA iteration is finished once changing the position of all foxes depending on the two phases. The updating procedure persists until the algorithm reaches the maximum number of iterations. Ultimately, the ELOA offers the potential resolution to the provided issue following complete execution. The flowchart in Figure 5 illustrates the stages involved in implementing the ELOA with key parameters and settings used for the ELOA for ANN training is given in Table 3. These parameters were chosen based on prior meta-heuristic optimization literature.

ELOA flow chart.
Parameters and settings used for the ELOA.
Results and discussions
Simulink/Matlab 2022b is used to design and implement the 7level H bridge cascaded SHAPF integrated with FC, PV, and BS. The specified parameters are listed in Table 4, and the system and SHAPF and load parameters are shown in Table 5. Three case studies (mentioned in Table 6) are used in this study, and scenarios involving different irradiation and FC pressure with a combination of different loads are also taken into consideration. The effectiveness of the ELOA-optimized SHAPF is demonstrated by these case studies. This study's primary goal is to address PQ issues in an effective manner. The ELOA provides the optimal gain values of PID controller, along with filter parameters, buck, and boost converter parameters, are used to achieve this purpose.
Pv, FC, and BESS ratings.
FC: shunt active power filter.
Specifications.
Test cases.
FC: shunt active power filter; THD: total harmonic distortion.
In case-1 to exhibit the effective performance of the optimally designed SHAPF effectively standard PV irradiation of 1000 W/m2 and fixed FC pressure is selected with two types of load combination 1, 2 & 5 (i.e. nonlinear, active power and asynchronous motor loads). Figure 6(a) shows the PV power and FC power obtained for the standard PV irradiation of 1000 W/m2 and stable pressure in FC tank. In addition, it also exhibits the battery power which indices charge and discharge for load demand. Lastly, it is also clearly exhibited that proposed method maintains voltage across DC bus stable.

Case1 waveforms.
Figure 6(b) illustrates the efficiency of the ELOA-NN-PIDC, due to the loads 1 and 2, which leads to major distortions of the load current. The optimally designed SHAPF system ensures the distortion-free grid current by supporting with the required amount of compensating current. This, in turn, minimizes the THD to 3.53% and improves the PF to nearly unity.
In the second case study, in order to observe the performance of the designed SHAPF the change in solar irradiation and FC pressure is selected for different combinations of loads 1, 2, 4 & 6. However, Figure 7 (a) indicates that the developed method maintains stable DC link voltage under varying conditions. In addition, due to the nonlinearity of load 1 with load 4, the current at the load terminals is highly polluted. To address this imperfection waveform, the ELOA-optimized SHAPF introduces the required current, as depicted in Figure 7(b), resulting in a reduction of THD to 4.15% and PF close to unity.

Case2 waveforms.
In the case 3 scenario, similar to case 2 900 W/m2 irradiation with variable FC tank pressure and different set of loads i.e. 1 to 5 (unbalanced and balanced combination) are selected. The power output of PV, FC, and BS is shown in Figure 8(a). The efficiency of the suggested approach is seen in Figure 8(a) that it maintains constant voltage across DC bus. This study investigates the proposed ELOA-NN-PID efficiently manages the imbalanced load and delivers sinusoidal source current with reduced THD, as depicted in figure 8(b). Table 7 shows the THDs of the developed method in each case study. The outcomes show that the proposed method not only satisfies IEEE standards but also has a much lesser THD when compared with other standard methods, including with those found in the review.

Case3 waveforms.
Comparison of % THD.
THD: total harmonic distortion; GA: genetic algorithm; ABC: artificial bee colony.
However, the proposed ELOA-optimized ANN results in significantly faster response times during deployment, making it more suitable for real-time applications. On other hand, the ANN-based controller, trained on historical or simulated data, inherently captures system nonlinearities without the need for explicit mathematical modeling. Furthermore, the ELOA optimization ensures high accuracy and generalization, making the system more resilient to unknown disturbances without introducing chattering. The ELOA-ANN framework reduces implementation complexity by avoiding the need for solving differential equations (as in SMC) or online optimization problems (as in model predictive control (MPC). Once trained, the ANN executes lightweight forward-pass computations, requiring minimal computational resources during real-time operation. Additionally, the ELOA algorithm autonomously optimizes both the ANN parameters, which eliminate the manual tuning, required in SMC (e.g. gain selection) and the need for real-time solver tuning in MPC.
To show the superior performance of developed method the comparative study of the ELOA over conventional meta-heuristic algorithms such as GA and artificial bee colony (ABC), a performance comparison Table 8 has been. Where, ELOA is benchmarked against GA and ABC across multiple runs using standard performance metrics, including the convergence speed (measured by the number of iterations to reach near-optimal fitness), MSE of the ANN on a validation dataset, Standard Deviation of MSE, computational time, DC bus voltage, overshoot, obtained PID gain values and success rate in escaping local minima (percentage of runs achieving global/near-global minima over 30 independent trials). From the Table 8, it is evident that ELOA not only achieves a lower MSE and faster convergence but also exhibits greater stability and reliability across multiple trials. This can be attributed to its enhanced exploration-exploitation balance, achieved through dynamic inertia adjustment and mutation-based local search—features not present in standard GA or ABC. Furthermore, as Figure 9 illustrates, the value of the proposed PF system is extremely near to unity when compared to alternative methods. The FFT spectrum of the grid current for case studies is shown in Figure 10.

Pf comparison for case studies.

Current %THD spectrum for case studies. THD: total harmonic distortion.
Performance comparison for case 1.
MSE: mean square error; GA: genetic algorithm; ABC: artificial bee colony.
Conclusion
An ELOA algorithm is utilized for optimal designing of the 7Levl cascade H bridge converter based SHAPF connected to PV, FC, and BS. SHAPF is utilized to address PQ concerns to maintain a consistent DC link voltage under different load types, varying FC tank pressure, and irradiation circumstances. Furthermore, the ELOA technique is utilized to train the NNC to get gain parameters of PID controller while simultaneously selecting suitable filter and buck boost converters parameters. The objective of the developed is to satisfy the load demand and to reduce THD and maintain stable DC voltage. The device efficiently mitigates imperfections in the current waveforms. Nevertheless, using this suggested methodology, the THD values for currents have been are below 5%. Subsequent investigations may expand upon the findings of this work by using reduced switch converter with hybrid meta-heuristic algorithms.
Footnotes
ORCID iDs
Ethical approval
The paper is not currently being considered for publication elsewhere.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data availability statement
The datasets generated during and/or analyzed during the current study are available from the corresponding author on reasonable request.
