A Novel Approach for Mitigating Power Quality Issues in a PV Integrated Microgrid System Using an Improved Jelly Fish Algorithm

A two-step methodology was used to address and improve the power quality concerns for the PV-integrated microgrid system. First, partial shading was included to deal with the real-time issues. The Improved Jelly Fish Algorithm integrated Perturb and Obserb (IJFA-PO) has been proposed to track the Global Maximum Power Point (GMPP). Second, the main unit-powered via DC–AC converter is synchronised with the grid. To cope with the wide voltage variation and harmonic mitigation, an auxiliary unit undergoes a novel series compensation technique. Out of various switching approaches, IJFA-based Selective Harmonic Elimination (SHE) in 120° conduction gives the optimal solution. Three switching angles were obtained using IJFA, whose performance was equivalent to that of nine switching angles. Thus, the system is efficient with minimised higher-order harmonics and lower switching losses. The proposed system outperformed in terms of efficiency, metaheuristics, and convergence. The Total Harmonic Distortion (THD) obtained was 1.32%, which is within the IEEE 1547 and IEC tolerable limits. The model was developed in MATLAB/Simulink 2016b and verified with an experimental prototype of grid-synchronised PV capacity of 260 W tested under various loading conditions. The present model is reliable and features a simple controller that provides more convenient and adequate performance.


Introduction
Solar energy is always a viable option for meeting power demands. Its clean and green features, easy accessibility, and cost-free nature have made it extremely popular [1].
There are numerous challenges, such as properly tracking MPP in non-uniform conditions and injecting harmonicsfree voltage into the grid. Traditional approaches such as Incremental Conductance (IC) [2], Hill Climbing (HC), Perturb and Obserb (P&O) [3], etc., is incapable of tracking MPP under Partial Shading Conditions (PSC). Many metaheuristic strategies, including Slime Mould Algorithm (SMA) [4], Weighted Means of Vector Algorithms (INFO) [5], Whale Optimization Algorithm (WOA) [6], Grey Wolf Optimization (GWO) [7], Colony Predation Algorithm (CPA) [8], Jaya Algorithm [9] and Jelly Search Algorithm (JSA) [10,11], have been utilised to overcome the challenges produced by PSC. The previously mentioned metaheuristic techniques are relatively new and have been used for PSC tracking. To address this problem, a hybrid IJFA-PO method was proposed, which combines the benefits of both traditional and innovative methods. It outperformed others in terms of faster and more accurate convergence with a smaller number of tuning parameters. It converges to much lower values compared to other algorithms.
The choice of a proper converter is mandatory because it can reduce undesirable harmonics to deliver power efficiently to the grid. This paper undergoes comparative analysis of several switching techniques to get a better picture. Voltage source inverters are commonly used with renewable energy sources. The Sinusoidal Pulse Width Modulation (SPWM) [12], conventional 180° and 120°, was used in a hybrid system with the Biogeography-Based Algorithm (BBO) and the Unified Power Quality Conditioner (UPQC) [13]. To validate effective harmonic mitigation for the present model, IJFA was used in proposed series compensation. This produces firing angles for SHE based 180° and 120° switching approaches.
Power quality was improved using a Radial Basis Function Neural Network (RBFNN) integrated with a Proportional Integral (PI) controller [14]. A comparison of recent algorithms was done to selectively remove the harmonics [15]. For harmonic removal in multilevel inverters, a Modified Newton Raphson (MNR) and pattern recognition were utilised [16]. The SHEPWM and Selective Harmonic Mitigation PWM (SHMPWM) based three-level NPC converters were employed, applying the harmonic suppression algorithm [17]. In [18], an Artificial Bee Colony (ABC) and filter compensation modules were used to minimise harmonics in microgrids.
The typical SHE-PWM approach was found incapable of regulating the non-eliminated harmonics, resulting in higher values using a Harris Hawks Optimization (HHO) [19]. A comparative analysis of various bionic algorithms was carried out [20,21]. As per the literature, direct solutions suffer from computational complexity and weaker convergence. Furthermore, a higher number of harmonics to be removed necessitates a large number of switching angles, which adds computational complexity and losses unnecessarily. The IJFA search-based SHEPWM technique has addressed this problem by providing optimum angles for a main and auxiliary inverter. Three switching per quarter cycle was employed to minimise harmonics using the proposed series compensation IJFA metaheuristic-based SHEPWM approach. The optimised three switching angles per quarter cycle have the same performance as that of nine firing angles but with reduced losses as found in the latter case. As a result of this novel concept, switching losses are reduced, and the converter's life is extended. The application of IJFA is not found in hybrid system fields. Its usage in the proposed scheme and the improved results obtained have contributed greatly.
To eliminate undesired harmonics, a series compensation network was used on the grid side in this paper. It would also meet grid demand and maintain voltage supply in the event of a wider voltage variation, dip or unbalance. On applying the proposed model, the harmonics were minimised drastically and the THD was determined to be just 1.32%, which is within the IEEE 1547, IEC, CIGRE WG 36-05 standards [22][23][24]. A piecewise mixed-model technique was adopted to store the set of switching angles offline and use them for practical applications [25]. This paper has been divided into various sections. The operation of the proposed strategy, its motivation, and its significant contribution are described in Sect. 2. Section 3 delves into the various switching techniques in detail. The study evaluates various switching strategies (SPWM, direct solution method for conventional 180° and 120°, SHE implemented IJFA in a conventional 180° and 120° switching strategy) best suited for the proposed scheme. In Sect. 4, IJFA and its application to the proposed series compensation mechanism and PSC have been discussed in detail. The control scheme is developed in Sect. 5. The simulation and experimental results are presented and analysed in Sect. 6. Last but not least, Sect. 7 depicts the conclusion.

Proposed Scheme
Due to PSC and variation in isolation, it is difficult to maintain the DC bus and output voltage using a single DC-DC boost converter. Various literature is cited in Sect. 1 which implies difficult control methods, slower MPP tracking, and expensive implementation costs. Furthermore, if the input voltage is low, an additional Boost converter will be required to manage the entire power, increasing the overall cost and decreasing reliability. The presence of harmonics and wider voltage variations disrupting the power quality is also a major concern. Therefore, these issues have motivated the authors to design a prototype shown in Fig. 1, which is robust, non-bulky, lowcost, has a simple controller, and is easy to deploy.
The aforementioned concerns are addressed by a novel low-rated auxiliary unit integrated series compensation network on the ac side, which mitigates voltage demands and stabilizes the output ac voltage of the inverter. It also effectively eliminates harmonics with fewer switching angles and a single boost converter, addressing all of the aforementioned issues. The proposed prototype's layout is shown in Fig. 1. The primary PV panel is the supply panel, whereas the auxiliary panel is the compensatory panel. The primary PV panel is under partially shaded conditions. The auxiliary unit's ratings are 20% of the main units. The main PV panel is coupled to the DC-DC boost converter, which supplies the grid-synchronized inverter. The proposed IJFA-PO technique computes the duty cycle for boost converter operation, which monitors the GMPP smoothly among all the local peaks at a quicker rate. The voltage is three times that of the PV voltage, making it ideal for grid synchronization but it has some limits. The greater ratio is attainable at the expense of decreased power output, which compromises the system's reliability.
As shown in Fig. 1, the auxiliary panel can directly feed the compensating inverter connected to the main inverter through a series compensating transformer. To identify the optimal performance for the proposed system, different switching strategies (180° conventional, IJFA implemented in 180°, 120° conventional, IJFA implemented in 120°, SPWM) were compared. It was found that IJFA-based 120° produced improved results. These inverters were switched at a low frequency. The IJFA uses three switching angles for each inverter to drive them in the 120° SHE implemented mode. The performance of the optimised three switches per quarter cycle was better than the nine switching angles. As a result, switching losses are reduced, and the converter's 1 3 life and efficiency are increased. The main inverter has three switching angles that minimise harmonics (5th, 7th, 11th, 23rd), but other higher-order harmonics up to 29 th will remain. In this paper, harmonics up to the 29 th order are considered. The auxiliary inverter deals with these harmonics in 180° phase opposition, and the output voltage THD would be decreased greatly as a result. A piecewise mixed model was used in which the switching angles were stored offline for online implementation.

Sinusoidal Pulse Width Modulation Inverter
The two types of multilevel modulation methods are high switching frequency and fundamental switching control, in which SPWM and Space Vector PWM fall within the former.
One of the primary challenges with high-power applications such as SPWM inverters is power dissipation. If the output voltage levels are considered to be " n ", then " n − 1 " can be used to find the carrier waves. The output SPWM inverter in this paper is developed for two levels, as illustrated in Fig. 2. A Phase Lock Loop (PLL) was used for controlling purposes. The modulation index can be adjusted to modify the RMS value of the output voltage. If the value of MI is chosen carefully, it can reduce or eliminate harmonics to a great extent, which reduces the THD. The output voltage in quasi sine wave form can be written in terms of Fourier series.
As the waveform has symmetry of quarter-wave therefore, a 0 and a n = 0 for all values of n , b n = 0 for all even values of (1) V an = a 0 2 + ∞ ∑ n=1 (a n cos(nwt) + b n sin(nwt))

Main unit
Compensating unit

Using the Direct Solution Method
for the Conventional 180° Switching Strategy (4) on solving, b n = 4V dc 3n 1 + cos n 3

SHE Implemented IJFA in a Conventional 180 • Switching Strategy
With a proper selection of three switching's per quarter cycle from the optimization technique, the harmonics up to 29th order were mitigated. f ( ) was analysed from the unipolar waveform shown in Fig. 2b.

SHE Implemented IJFA in a Conventional 120 • Switching Strategy
on solving, it can be written as Due to the symmetrical nature of unipolar line to line voltage, triple-n harmonics are absent in a three-phase balanced system. The + and − signs of cos denote the rising and falling edges in the transition phases. The switching angles can be determined by expanding and equating voltage harmonics (10) and (14) to zero and setting the fundamental component to MI, where (MI < 1). The optimised angles with the lowest THD were chosen as they reduce harmonics introduced to the grid. The presence of trigonometric terms increases the complexity as it produces multiple or no solutions at all. To solve the non-linear equations acquired through direct solution or conventional technique, IJFA-based SHE comes into the picture. The existing solutions are discontinuous at some points, which requires an increased number of switching angles to reduce harmonics. (8) on solving, b n = 4V dc 3n cos(n 1 ) − cos(n 2 ) + cos(n 3 ) − cos(n 4 ) + 2 cos(n 5 ) (1) and considering a delay of 30 in the limits) Lower switching rates are preferred since they result in fewer switching losses and higher efficiency. IJFA reduces overall THD by mitigating a wider spectrum of harmonics with only three optimum angles. These angles are calculated offline and stored in the lookup

Jelly Fish Algorithm (JFA)
Jui-Sheng Chou and Dinh-Nhat Truong developed JFA in 2021 which is inspired by jellyfish searching for food in the ocean. Three strategies are used by the jellyfish search optimizer. (1) Jellyfish move with the ocean current or within the group; (2) Jellyfish are drawn to areas with more food; and (3) the amount of food is assigned and the appropriate Fitness Function (FF) is computed. The heavy active and passive movements of the jellyfishes within the swarm cause a jellyfish bloom. When food sizes are compared, the optimum placements can be determined and the FF's best value may be evaluated. As a result, JFA can be modelled as where the value for η is taken as 4; �⃗ X i is a vector that contains the logistic chaotic values of the ith jellyfish; �⃗ X 0 is an initial vector of jellyfish 0, generated randomly between [0, 1]; �⃗ X * is the location with the most food;. * is the elementby-element vector multiplication; β > 0 is the distribution coefficient taken as β = 3; µ is the mean of the population and ⃗ r , r 1 , r 2 , r 3 is a random number between [0, 1]; �⃗ X i (t + 1) is the ocean current in (16). The movements of jellyfish inside the swarm are controlled by passive and active motions. Jellyfish move about their positions in passive motion, and the fresh update of their positions is described using (17). The active motion, on the other hand, is determined according to the formula shown in (18).
where γ > 0 indicates the length of the motion around the current location. U b and L b are the upper and the lower bound of the search space of the problem, respectively. �� ⃗ D is used to determine the direction of the motion of the current jellyfish within the next generation. This motion corresponds to the tracking of the best food position and is expressed in (19). Where, j is the index of a jellyfish selected randomly.
The c(t) is used to switch between ocean currents, passive and active motions, all of which may be described mathematically in (20).
where t is the current evaluation; t max is the maximum evaluation A jellyfish swarm is formed over time, and each jellyfish continues to migrate within the swarm to obtain a better position, using both active and passive motions, resulting in exploitation at this stage. Meanwhile, c(t) switches between these motions. The user should choose between two control options i.e., population and t max . As per the latter, fewer settings are required, resulting in less labour and haphazard trials to fine-tune the JFA's performance.

Improved Jelly Fish Algorithm (IJFA)
The JFA algorithm's exploitation capability was found to be low due to the current jellyfish movement within the population. This slowed the convergence toward the best solution so far, resulting in a long time to find a better solution. Furthermore, local exploration capability searches multiple rounds within the regions where the swarm's presence is limited. As a result, looking for areas inside the swarm that haven't been investigated by any of the other jellyfish helped to fetch better results. When the control variable r is small, the IJFA explores around the best-so-far solution, but when r is large, it improves exploration around the swarm for reaching other regions. As a result, the IJFA equation is as follows: where r 1 , r 2 and r 3 are the indices of three solutions, whose values are between [0 1]; r is the control parameter which is used to control in moving of the current solution. If r is small, the current solution will be moved to a location located between the best-so-far and �⃗ X r3 (t) to accelerate convergence, if r is high, the current one is updated using two randomly chosen solutions from the population to improve the algorithm's ability to reach new regions. This method is then combined with the JS to modify its performance to reach better solutions in fewer iterations. The IJFA approach in the proposed series compensation for the current scheme is given in the flowchart in Fig. 3.

Angle Obtained for the Main SHEPWM Inverter in Detail
The IJFA-based SHEPWM technique was used to determine the angle generation for the primary inverter. Three switching angles were found by equating the fundamental component to MI and the rest voltage harmonics to zero, as indicated earlier in (3). A search-based technique has been used to obtain angles and store them offline in the micro-controller memory (25). The three angles can attenuate harmonics up to the 5th, 7th, 11th, … 23rd order, but higher-order harmonics such as the 25th, … 29th, and so on will still exist. As a result, an auxiliary inverter was used to implement novel series compensation to attenuate existing higher-order harmonics.

Angle Calculation for Auxiliary SHEPWM Inverter to Suppress Higher Orders in Detail
As SHEPWM involves trigonometric concepts, it has limits in terms of displaying many solutions. Therefore, to achieve convergence variables must be chosen at the exact point.
To avoid the difficulty of finding a solution to a non-linear equation, the problem was changed to an optimization function t 1 ( ).The THD obtained should be a minimum (24) and the corresponding angles are to be considered further. The objective function used to produce the angles for the auxiliary inverter for decreasing the existing dominating harmonics where K 1 ⋯ K n are the weights that are applied to the harmonics to be minimized priority-wise, 1 ⋯ n are the values that are set according to the magnitude of the respective harmonic that is to be reduced. Normally, it is set to zero but here it is taken according to the amount in which the higherorder harmonics are to be reduced. The values of K 1 ⋯ K n in (22) have to be selected wisely to reduce the magnitude of the harmonics with 1 ⋯ n amount respectively. As an example, suppose the harmonic amplitudes of the 25th and 29th harmonics are 23% and 14%, respectively. For reducing the amplitude of the harmonics, the weights must be used in order of priority, with the 25th priority being given first, followed by the 29th. To cancel out the 25th harmonic, it must be set to a value of 23% but in the opposite phase. This also applies to any harmonic order of any amplitude. The IJFA algorithm includes the objective function (22) for reducing existing dominating harmonics in particular. The technique was repeated until the desired outcome and convergence were achieved. The angles obtained in the IJFAbased SHEPWM approach (22) should strictly follow the criteria illustrated in (23). As indicated in Fig. 1, the three angles achieved are sent to the auxiliary inverter, which undergoes series compensation with the main unit. For a three-phase system, IJFA mitigates a wider range of harmonics 5th, …, 23rd with only three optimum angles, while others up to 29th are minimised by employing (22) and (23)

Application of Proposed IJFA-PO to Tackle PSC
PSC is caused by passing clouds, building shadows, neighbouring trees, bird excreta, and other factors. The efficiency of PV is affected by many peaks and non-convex features.
The array consists of modules with solar irradiation of 250 (shaded), 1000 (non-shaded), 800, 1000 W/m 2 at a module temperature of 25 °C. Under uniform irradiation, simple P&O is effective. However, under non-uniform irradiance, it is unable to track the GMPP among the numerous LMPPs, and the speed drops. As a result, integration of IJFA and P&O is carried out to address these scenarios, as shown in Fig. 4.

Implementation of the Control Technique
Piecewise mix model equations have been used to store the set of switching angles produced by IJFA. This control method makes use of a set of linear and non-linear equations that were computed offline using the IJFA and then stored in the processor memory for online usage (25). When compared to other existing strategies, this processor takes little memory space and has a lower computational complexity. Figure 5 depicts the fluctuation of triggering angles with various modulation indices in this method. Figure 5 depicts the control system in which the SHEPWM main inverter's three-phase voltage is compared to an appropriate reference output voltage. The error is processed by the PI controller that has been set up to generate MI. The set of triggering angles in the form of equations is stored for different values of MI, and the SHEPWM inverters are triggered by the pulses generated by the driver circuit using that set of equations.

Result Analysis
The model was developed in the MATLAB/Simulink 2016b environment. Figure 6a depicts MPP tracking under partially shaded conditions. The grid voltage is depicted in Fig. 6b. It was found that the corresponding algorithm has fewer tuning variables and is easier to implement with a tracking time of 0.01 s. Table 1 shows the results of a comparative analysis of various MPPT approaches. Figure 7 shows the output waveform of voltage at the main inverter side using the SPWM, conventional 180°, IJFA implemented in 180°, conventional 120°, IJFA implemented in 120°. Figure 8a shows the FFT analysis for each output voltage before compensation. Figure 8b shows the FFT analysis after compensation. It was found that the IJFA, implemented in 120° conduction, has given superior results. The values are obtained using (22) in opposition to cancelling out the existing dominant harmonics. Three switching angles were generated by the IJFA-based SHEPWM technique, used for the main and compensating SHEPWM inverters at a modulation index of 0.85, as indicated in Table 2. The comparison of various bio-inspired algorithms has been done in Fig. 8c, in which IJFA has given better results for the given plot. The behaviour of triggering pulses over MI has been given in Fig. 8d. The optimised pulses give better results than the conventional ones.
Three switching angles were generated by the IJFA-based SHEPWM technique, used for the main and compensating SHEPWM inverters at a modulation index of 0.85, as indicated in Table 2. The comparison of various bio-inspired algorithms has been done in Fig. 8c, in which IJFA has given better results for the given plot. The behaviour of triggering pulses over MI has been given in Fig. 8d. The optimised pulses give better results than the conventional ones. The convergence time for IJFA is 0.10 s respectively, as shown in Fig. 8e, for 50 iterations with a population size of 100 at 0.85 MI. Run time versus population size has been studied in Fig. 8f. It was found that IJFA outperforms with existing GWO, WOA, JAYA in terms of obtaining optimised THD and its corresponding angles. It has faster, easier implementation and more accurate convergence with a smaller number of tuning parameters. It attains convergence much more accurately and at a faster rate than others. On an Intel® Core ™ i5, 2.30 GHz processor with 4.00 GB of installed memory, all stages of programming are coded in MATLAB. Thus, IJFA has superior performance over others in giving optimised THD and its corresponding angles.
The behaviour of three switching angles per quarter cycle was equal to that of nine switching angles, as shown in Fig. 9. Three switching angles are the ideal option for the proposed model. It eliminates the greatest number of harmonics possible, resulting in a THD of only 1.32%. When 1 3 MI is low, higher-order harmonics have more amplitude than lower-order harmonics and vice versa happens for higher values of MI. Table 3 shows the results of a comparative analysis of several optimization approaches. Figure 10a, b show the behaviour of three switching angles to the modulation index every quarter cycle for an evolutionary algorithm. The switching angles are inversely proportional to the modulation index, and there has been a moderate movement to the origin, as shown in the graph.   Table 4.

Experimental Setup
A per phase system test setup was used to verify the modelling results of the proposed method shown in Fig. 11. The solar panels used have a 260-W capacity, a 35.24-V open circuit voltage, and an 8.57-amp short circuit current rating. PV panels were used to power both the main and auxiliary inverters at the same time under two separate situations. In the test room, incandescent bulbs were used to create an artificial isolation for consistent irradiance. The PSC was created by adjusting the intense light intensity of 1000 W and covering 20% of it with cardboard, as illustrated in Fig. 11.     For temperature and irradiation sensing, the LM35 and Pyranometer were used respectively. These signals were amplified using a PIC 18F452 controller in a computer interface environment. To trigger the MOSFET of the boost converter, the pulse is amplified using a voltage optocoupler from the (TLP-250H of 1636 series) driver. To drive both inverters, SHEPWM pulses were created using the IJFA algorithm and stored in the PIC18F452 microcontroller. The results were seen in a Digital Storage Oscilloscope (DSO) using a transformer with a rating of 230/48 V, 2A and a load of 1A, 0.8 power factor. Figure 12a, b show the gate pulses delivered to switches in the main and compensating inverters using IJFA-based 120° conduction. As the results for the IJFA-based 120° are found to be the best, therefore, its firing pulses have been implemented for the hardware setup. Three switching pulses per quarter cycle have been used for the inverter separately. The output waveforms of the main and auxiliary voltages are shown in Fig. 13a, b. In Fig. 13a, voltage variation can be seen for both uniform and non-uniform isolation. Figure 13c shows the output after series compensation, similar to before PSC. Due to the change in irradiance, voltage variation causes a change in the dc bus which was overcome by an auxiliary inverter. FFT analysis has been shown to manifest a higher number of harmonics present than the latter at an MI of 0.5. Figure 14c shows the FFT analysis at an MI of 0.8. The after-compensation results were improved for MI at 0.8. The amplitude of the targeted harmonics has been lowered by a significant amount. Due to the fact that the experimental setup is in phase, triple-n harmonics are also present. The harmonic order was focussed up to the 29th order, as anything beyond that was insignificant. The IJFA, implemented in 120°, eliminates the maximum order of harmonics. For the three-phase system, the THD attained by simulation results was only 1.32%, as shown in Fig. 8b and Table 4. The THD for the per phase laboratory experimental prototype was found to be 2.58%, as shown in Fig. 14c. As a result, it was determined that the simulated and experimental results were completely in accord. Table 5 shows the results of a comparison of existing and proposed designs. It was inferred that the present proposed scheme works better due to the inclusion of novel series compensation, appropriate for industrial and domestic applications.

Conclusion and future works
With the use of series compensation under PSC, it was possible to eliminate harmonics while also improving the voltage profile for the PV-integrated grid system. During wider voltage variations, the compensating inverter fulfils the voltage demand on the grid side. The overall THD of the output voltage was reduced to 1.32%, which is well within the Table 3 Comparison of different evolutionary techniques PSO [21] HHO [20] WOA [6] GWO [21] BBO [13] JFA [11] IJFA Weight (w)   specifications of IEEE 1547, IEC, and CIGRE WG 36-05. In comparison to existing approaches with changing loads, the IJFA-based SHE using proposed series compensation gives improved results. The experimental results of the prototype have also been presented in support of the simulated outputs. The three switching angles performance was equivalent to nine switching angles per quarter cycle in reducing harmonics, resulting in lower losses and improved system efficiency. A piecewise mixed-model approach has been used to store angles offline in the microcontroller for the online applications. It can be concluded that the current proposed system produces superior results when compared to other existing algorithms and meets all of the paper's objectives. The same topology can be applied to large power plants for effective control of output voltage as well as output harmonics. This research can be extended to faulty conditions on the main unit side also. Then, in this case, the auxiliary unit undergoing series compensation would maintain an uninterrupted power supply, maintain the output voltage, and control the harmonics with the specified values. This PV-wind hybrid generation scheme can be operated in standalone mode in remote areas where the grid supply to the consumers is not available. The proposed schemes improve the power quality obtained from the units installed and, thus, can have a very positive impact on improving the quality of life in the remote grid-secluded regions.  Table 5 Comparative analysis of existing and proposed schemes Parameters Ref. [12] Ref. [14] Ref. [15] Ref. [16] Ref. [17] Ref. [

Declarations
Conflicts of interest None.

Ethical Approval
The manuscript is an original research work. This has neither been published previously, nor under consideration for publication elsewhere.

Informed Consent
Approved.