Optimal Design of Passive Power Filters Using the MRFO Algorithm and a Practical Harmonic Analysis Approach including Uncertainties in Distribution Networks

: The design of Passive Power Filters (PPFs) has been widely acknowledged as an optimization problem. This paper addresses the PPF parameters design problem using the novel Manta Ray Foraging Optimization (MRFO) algorithm. Moreover, an analytical method based on Monte Carlo Simulation (MCS) is proposed to investigate the harmonic performance of such an optimally designed PPF with variations in power networks. The MRFO algorithm has shown a superior solution-ﬁnding ability, but a relatively higher computational effort in comparison with other recently proposed algorithms. The harmonic performance of the optimal PPF solution with uncertainties was analyzed using the proposed method. The results imply that the optimally designed PPF can effectively attenuate the high-order harmonics and improved the system performance parameters over different operating conditions to continually comply with the standard limits. The proposed MCS method showed that the optimally designed PPF reduced the voltage and current distortions by roughly 54% and 30%, respectively, and improved the network hosting capacity by 10% for the worst-case scenario.


Introduction 1.Background
Modern power distribution networks are anticipated to be contaminated with significant harmonic distortions due to the increased utilization of power electronics-based systems [1,2].The harmonic currents generated by a grid-connected power converter such as Medium Voltage Direct Current (MVDC) converters must comply with the planning harmonic levels [3].However, due to the aggregation of the harmonic distortions of one busbar with those of the neighboring busbars, the voltage at various nodes and current through power lines can undergo significant distortions.Power harmonics are not only known to cause excessive heating and power losses in power system components, but are also harmful to consumer electronic loads, industrial drives, and communication systems [4].Furthermore, they can significantly limit a power network's capacity for high penetrations of Distributed Energy Resources (DERs).Power transformers' and cables' loading capacity can also be affected by harmonic distortions [5].Therefore, harmonic distortions should be controlled to maximize the network's capacity, improve system components' performance, and comply with the locally established standard limits.At the power network level, an appropriate harmonic mitigation technology, such as passive and active power filters (or a combination of both), can be utilized to overcome the adverse effects of the power harmonics [4].PPFs are the most favorable solution due to their simple implementation and low cost [6,7].However, the design of PPF parameters remains a challenging task for engineers, given the power system requirements.

Literature Survey
The PPFs can be designed through a power load flow program to determine its parameters using the trial-and-error approach.Instead, optimization algorithms have been widely used to obtain an accurate design with a reduced time and effort burden.The natureinspired optimization algorithms developed for engineering applications have placed attention on the optimal design of PPFs to improve their performance for given criteria [7,8].In Refs.[9,10] the Genetic Algorithm (GA) was used to optimize the parameters of different PPF topologies.The authors considered the impact of parameter variations on the PPFs' performance.In addition, the use of a GA to minimize the Total Harmonic Distortion (THD) of current and reduction in total cost was discussed in Ref. [11].GA was also adopted in Ref. [12] for the proposed approach for the optimal location and sizing of PPFs.Similarly, a modified, GA-based, multi-objective optimization problem for the placement and selection of filters was developed and discussed in Ref. [13].An optimal design for a dynamic tuning PPF using the GA for harmonic distortions and cost minimization was discussed in Ref. [14].
The authors in Ref. [15] compared the GA and some other algorithms with a built-in optimization tool for a power system simulation software to size and place some PPFs in a test network.The optimization problem was formulated using the Decoupled Harmonic Power Flow (DHPF) method, which was also adopted to design a high-pass PPF utilizing the multi-objective Firefly Optimization Algorithm in Ref. [16].In Ref. [17], GA was adopted to design a C-type filter in a distorted system with maximizing the load Power Factor (PF).The performance of the GA solution could be evaluated against the generic programming code-based solution discussed in Ref. [18].Regarding C-type filters, Harris Hawks Optimization performance was investigated against some other algorithms with reduced overloading on PPFs as an objective in Ref. [19].In Ref. [20], the Crow Search Algorithm was applied to minimize the total cost of 3rd-order and C-type PPFs.Several PPF configurations were optimally designed to minimize the total demand distortion by employing the Crow Spiral Algorithm [21].A single-tuned PPF was designed in Ref. [22] to minimize the voltage THD using Particle Swarm Optimization (PSO).The optimization problem formulation is based on harmonic power flow, in comparison with Ref. [23], which used the relative weighted harmonic attenuation factors of the PPF design.Refs.[24,25] suggested a continuous and discrete, neural-network-based, optimally designed, singletuned PPF, respectively, with a single weighted objective function for the multi-objective problem.In Refs.[26,27], two single-tuned and high-pass PPFs were designed using PSO with multi-objective optimization, THD, cost, and PF.
The recently developed optimization algorithms were also applied for optimal PPF design.A Bat Optimization Algorithm was developed in Ref. [28] to design a set of PPFs as a multi-objective problem.THD, cost, and PF were considered, and results were compared to those obtained from the Simulated Annealing (SA)-and PSO-based solutions.In Ref. [29], an SA-based, single-tuned PPF was designed to reduce THD and maximize power factor in a simple medium voltage network, but the performance of the SA could be estimated with different algorithms.Different PPF topologies were designed using the Bee Swarm Optimization and Teaching-Learning-Based Optimization algorithms for multiple objectives, as presented in Refs.[30,31] respectively.The work in Ref. [32] developed the Ant Colony Optimization (ACO) algorithm for two single-tuned PPFs operating with an active filter to minimize the total cost and THD.Moreover, a study that proposes a modified ACO for a single-tuned filter is presented in Ref. [33].Single-and double-tuned PPFs were also designed using Bee Colony Optimization (BCO) in Ref. [34].This considered THD and reactive power as weighted objective functions.In Ref. [35], the Whale Optimization Algorithm (WOA) was employed for the design and location of PPF.The results imply that Energies 2022, 15, 2566 3 of 24 the selected PPF and the objective function, which included the power losses minimization only, had a minor impact on harmonic reductions.The Cuckoo Optimization Algorithm was employed to design an optimal PPF with the lowest cost [36].In Ref. [37], three singletuned filters for different individual harmonic orders were designed and placed for a radial distribution system using the Bacterial Foraging Optimization Algorithm.The objective function comprised power losses and a reduction in investment costs.A Gravitational Search Algorithm was adopted in Ref. [38] for the optimal design of a single-tuned PPF in an industrial power network.Class Topper Optimization Algorithm and Slime Mould Optimization Algorithm were also adopted for the optimal design of PPFs, as discussed in Refs.[39,40], respectively.In the literature, the novel MRFO algorithm has not yet been implemented for the PPF design problem, and the harmonic performance of an optimally designed PPF with variations at the network level has not been investigated.

Aim and Contributions
To the best of the authors' knowledge, the performance of the novel Manta Ray Foraging Optimization (MRFO) algorithm, first proposed in Ref. [41], has not been investigated for the PPF applications, and an extensive analysis tool for evaluating the optimally designed PPF performance in power distribution networks subjected to uncertainties and inevitable variations has not been addressed.Therefore, to fill these gaps, the main contributions of this work are as follows.The PPF design optimization problem is addressed using the MRFO algorithm, which has shown considerable computational progress, a powerful ability to solve non-linear optimization problems, easy implementation, and relatively fewer parameters that need to be adjusted [42,43].The most recently proposed optimization algorithms, namely Golden Eagle Optimizer (GEO) [44], Red Fox Optimization (RFO) algorithm [45], and Chameleon Swarm Algorithm (CSA) [46], are adopted for comparison and to verify the superiority of the MRFO algorithm.The prime reason for the adoption of these novel algorithms adopted is their similarity in the inspiration and modelling of the hunting behaviors.The performance of each algorithm is analyzed to help nominate the most appropriate and efficient algorithm.Moreover, a new method based on an MCS solution is proposed to extensively evaluate the harmonic performance of an optimally designed PPF solution in a power system.This tool can capture the influences of the variations in the system components on the performance of the PPF and the system performance parameters to assure continuous compliance with the standard limits.

Paper Organization
The rest of the paper is organized as follows.Section 2 is dedicated to the optimization problem formulation and system modeling.An introduction to the novel algorithms and their inspiration is provided in Section 3. A detailed modeling of the MRFO algorithm is presented in Section 4. In Section 5, the development of the proposed MCS-based method is discussed.The performance of the algorithms and the performance of the designed PPF in the power system are discussed in Section 6.The conclusions derived from this study are presented in Section 7.

Modeling of the System Equivalent and the PPF
To help formulate the optimization problem and evaluate the performance of the PPF system designed using an optimization algorithm, a simple power network, modeled with the equivalent grid and overhead line impedance, is used.This simplified circuit approach was also employed to validate the performance of the optimization algorithms that were applied for PPF design studies [16,47].Among the several modelling techniques for the harmonic sources addressed in the literature, the simple and easy-to-implement current source model in the frequency domain, representing a harmonic source by the current sources of the range of frequencies of interest, can still provide an accurate harmonic performance analysis when the interactions between the control system of a harmonic Energies 2022, 15, 2566 4 of 24 source and the existing background harmonics within the power network are assumed to be negligible [4,47].Additionally, the harmonic current source modelling approach has been widely adopted to conduct harmonic performance analysis studies for the optimal design of the PPFs [5,16].The equivalent circuit utilized for the PPF design problem is shown in Figure 1a with the equivalent grid, overhead line, linear load, and the harmonic source.
source model in the frequency domain, representing a harmonic source by the current sources of the range of frequencies of interest, can still provide an accurate harmonic performance analysis when the interactions between the control system of a harmonic source and the existing background harmonics within the power network are assumed to be negligible [4,47].Additionally, the harmonic current source modelling approach has been widely adopted to conduct harmonic performance analysis studies for the optimal design of the PPFs [5,16].The equivalent circuit utilized for the PPF design problem is shown in Figure 1a with the equivalent grid, overhead line, linear load, and the harmonic source.
Since the system is assumed to be balanced and symmetrical, the DHPF solution is conducted to iteratively compute the corresponding components at each frequency [47].This enables the application of Kirchhoff's voltage and current laws for fundamental and harmonic frequencies, and then the harmonic indices, such as THD, power losses, and PF, can be computed.To perform the harmonics flow for the equivalent power system shown in Figure 1, a typical harmonic modeling of the system's components must be followed, as defined in Reference [4].The power grid is represented by a voltage source of 1 p.u. at the power frequency with background harmonics as: where  (1) is the fundamental RMS of the voltage source,  (ℎ) is the RMS of the harmonic voltage components, and  is the highest harmonic order of interest.The background harmonics are associated with a factor ( ), which will help to further evaluate its effect on the PPF harmonic performance.
The harmonic impedance of the overhead line ( ) is modeled as: where  ,  are the overhead line's resistance and reactance in power frequency, respectively.√ℎ is included in the model to capture the frequency dependency and skin effect of the resistive part [4].
In comparison to the different high-order PPFs configurations proposed in the literature, the 2nd-order PPFs have a lower number of passive components, implying a lower weight, cost, and size.Thus, they stand out as the ideal option among other high-pass PPFs.This is due to the inherent limitations associated with 3rd-order and C-type power filters, such as the effect of the operating conditions and ambient temperature on the filter parameters, which can lead to significant parameter variations and, thus, can result in a different system's characteristic impedance.In addition, the complexity of the design is due to the inclusion of more governing equations for the 3rd-order and C-type filters in the design stage [6].The 2nd-order, damped PPF depicted in Figure 1b is the most common and favorable type due to its lower cost, high attenuation behavior, and design simplicity [7].The equivalent impedance of a 2nd-order PPF ( ) is modeled as [30]: Since the system is assumed to be balanced and symmetrical, the DHPF solution is conducted to iteratively compute the corresponding components at each frequency [47].This enables the application of Kirchhoff's voltage and current laws for fundamental and harmonic frequencies, and then the harmonic indices, such as THD, power losses, and PF, can be computed.
To perform the harmonics flow for the equivalent power system shown in Figure 1, a typical harmonic modeling of the system's components must be followed, as defined in Ref. [4].The power grid is represented by a voltage source of 1 p.u. at the power frequency with background harmonics as: where V s (1) is the fundamental RMS of the voltage source, V s (h) is the RMS of the harmonic voltage components, and H is the highest harmonic order of interest.The background harmonics are associated with a factor (A BGH ), which will help to further evaluate its effect on the PPF harmonic performance.The harmonic impedance of the overhead line (Z OHL ) is modeled as: where R OHL , X OLH are the overhead line's resistance and reactance in power frequency, respectively.
√ h is included in the model to capture the frequency dependency and skin effect of the resistive part [4].
In comparison to the different high-order PPFs configurations proposed in the literature, the 2nd-order PPFs have a lower number of passive components, implying a lower weight, cost, and size.Thus, they stand out as the ideal option among other high-pass PPFs.This is due to the inherent limitations associated with 3rd-order and C-type power filters, such as the effect of the operating conditions and ambient temperature on the filter parameters, which can lead to significant parameter variations and, thus, can result in a different system's characteristic impedance.In addition, the complexity of the design is due to the inclusion of more governing equations for the 3rd-order and C-type filters in the design stage [6].The 2nd-order, damped PPF depicted in Figure 1b is the most common and favorable type due to its lower cost, high attenuation behavior, and design simplicity [7].The equivalent impedance of a 2nd-order PPF (Z F ) is modeled as [30]: Energies 2022, 15, 2566 where Z F is the PPF impedance, R f is the PPF resistance, X L f and X C f are the PPF inductive and capacitive reactance, respectively, and h is the harmonic order.
The parameters of such a PPF are conventionally calculated as follows [4,48] where V PoC (1) is the RMS voltage of the fundamental frequency component at the Point of Connection (PoC).Q MVAr , ω f are the reactive power delivered by the PPF and fundamental angular frequency in rad/sec, respectively.h f is the tuning frequency and Q F is the quality factor of the PPF.The limitation of this calculation method is that the PPF parameters can use different values to achieve different Voltage THD (VTHD), Voltage Individual Harmonic Distortion (VIHD), Current Individual Harmonic Distortion (CIHD), and Total Demand Distortion (TDD).Since this can also lead the grid voltage and the PF to violate the standard limits, the PPF parameters should be optimally designed with the proposed optimization algorithms to address these challenges and ensure compliance with the standard limits.
To model a linear load for harmonic analysis studies, the rated active power (P Load ) and reactive power (Q Load ) components are employed to calculate the corresponding load's resistance (R Load ) and reactance (X Load ) at the fundamental frequency, respectively.The linear load is commonly represented as an assembly of a resistor, connected in parallel with an inductor, and the linear static load harmonic impedance (Z Load ) is computed as: when the interactions of the power converter control circuit are negligible, the harmonic source can be represented by the current sources in a range of frequencies of interest, as in Equation (10).Additionally, since the harmonic performance varies with the operating point, as discussed in Refs.[49,50], the harmonic content (I h ) is associated with a factor (A h ), which will further help it to investigate the PPF harmonic performance with the variations in harmonic source emission.The harmonic source emissions can be expressed as: By using Kirchhoff's current law at the PoC of the system under study, the following can be obtained.
I s , I F , and I Load are the current components following through the power lines, PPF, and linear load respectively, and I hs denotes the harmonic source current.
By substituting the harmonic impedance modeled for the system components with the corresponding voltages in Equation (11), and considering the grid as a reference node, the following representative equations decoupling fundamental and harmonic components are used to solve the system modelled for harmonics flow analysis, as shown in Figure 2.
Energies 2022, 15, x FOR PEER REVIEW 6 of 2 By substituting the harmonic impedance modeled for the system components wit the corresponding voltages in Equation (11), and considering the grid as a reference node the following representative equations decoupling fundamental and harmonic compo nents are used to solve the system modelled for harmonics flow analysis, as shown i Figure 2

Decision on PPF Optimization Objectives
The principal goal of installing PPFs in power systems is to reduce harmonic distor tions, to avoid the maloperation of sensitive loads and increase the system's hosting ca pacity for future renewable systems.Additionally, it has been stated in the literature tha by eliminating harmonic distortions, network power losses can be reduced and system efficiency can be improved.Therefore, the voltage THD at the PoC is considered the majo PPF design objective function to be minimized, while other operational aspects, such a individual harmonic distortions, the PoC voltage, PF, and some concerns related to PP parameter requirements, are treated as constraints to be tackled.The objective function i the voltage THD, which is expressed as: where  (ℎ) is the RMS voltage corresponding to the harmonic order, and  (1) i the RMS voltage of the fundamental frequency component.

Optimization Constraints for PPF Design
For the PPF design, as for any optimization problem with some unapplicable solu tions, some constraints are required to ensure the system performance is kept within th defined limits for the power network and PPF solution.The voltage at the PoC should no exceed the standard limits.The PF at the PoC must be corrected to unity.Total and indi vidual voltage and current distortions should be within the defined limits.The PPF qual ity factor ( ) is to obey the design requirements, as discussed in References [4,51].Thes constraints must be checked during optimization over each iteration, and suitable penal ties are used to ensure their validity.In this work, the constraints are set according to IEEE Std.519 [52]

Decision on PPF Optimization Objectives
The principal goal of installing PPFs in power systems is to reduce harmonic distortions, to avoid the maloperation of sensitive loads and increase the system's hosting capacity for future renewable systems.Additionally, it has been stated in the literature that by eliminating harmonic distortions, network power losses can be reduced and system efficiency can be improved.Therefore, the voltage THD at the PoC is considered the major PPF design objective function to be minimized, while other operational aspects, such as individual harmonic distortions, the PoC voltage, PF, and some concerns related to PPF parameter requirements, are treated as constraints to be tackled.The objective function is the voltage THD, which is expressed as: where V PoC (h) is the RMS voltage corresponding to the harmonic order, and V PoC (1) is the RMS voltage of the fundamental frequency component.

Optimization Constraints for PPF Design
For the PPF design, as for any optimization problem with some unapplicable solutions, some constraints are required to ensure the system performance is kept within the defined limits for the power network and PPF solution.The voltage at the PoC should not exceed the standard limits.The PF at the PoC must be corrected to unity.Total and individual voltage and current distortions should be within the defined limits.The PPF quality factor (Q F ) is to obey the design requirements, as discussed in Refs.[4,51].These constraints must be checked during optimization over each iteration, and suitable penalties are used to ensure their validity.In this work, the constraints are set according to IEEE Std.519 [52], as follows.
0.95 pu The maximum permitted odd current distortions defined by IEEE Std.519 are shown in Table 1.However, the IEEE Std.519 limits the even harmonics to 25% of the odd harmonics.The ratio between the maximum short circuit current and maximum demand load current of the harmonic source is assumed to be between 20 and 50.

Brief Description of the Novel Algorithms
This section is dedicated to the introduction of the most novel algorithms adopted in this work.The inspiration and principal concept of these algorithms are presented in brief.

MRFO Algorithm
Despite their appearance, manta rays, being one of the world's biggest marine animals, are fascinating creatures.Manta rays have a flat upper-lower body and a set of pectoral fins that allow them to swim gracefully, like birds.Manta rays eat plankton, which is primarily made up of minute creatures found in the ocean, because they do not have sharp teeth.When manta rays go foraging, they use their horn-shaped cephalic lobes to funnel water and prey into their mouths.Modified gill rakers filter the prey out of the water.Manta rays consume a significant number of plankton.Oceans are thought to be the most abundant source of plankton.Plankton, however, is not equally distributed or consistently concentrated in certain specific regions due to the water dynamics and changing seasons.Manta rays, interestingly, are adept at locating plankton.
The most fascinating aspect of manta rays is their foraging activity.They can move alone, although foraging is commonly observed in groups.These critters have developed a wide range of incredible and clever foraging techniques.The MRFO algorithm is inspired by three foraging strategies, involving chain, cyclone, and somersault foraging strategies, as shown in Figure 3. Detailed modeling and performance evaluation compared to common optimization algorithms are provided in Ref. [41].

GEO Algorithm
Golden eagles are expert hunters with outstanding vision, speed, and powerful talons, which are capable of catching prey ranging in size from insects to mid-sized animals.Their cruising and hunting are distinct in that they occur in a spiral trajectory, indicating that the prey is usually on one side of the eagle.This allows them to keep an eye on the prey, as well as adjacent stones and shrubs, to choose the best angle of attack.Meanwhile, they scout different areas to see if they can locate better food.The golden eagle's behavior is always guided by two factors during the flight: the tendency to attack and the propensity to cruise.Golden eagles understand that if they strike very quickly, they may only grab tiny prey that are insufficient to pay for the energy spent in hunting.However, if they keep looking for bigger prey indefinitely, they may exhaust their energy and miss the target.
Golden eagles cleverly strike a balance between these two goals, snatching the best prey possible, using a fair amount of time and energy.They seamlessly transition from a low-attack-high-cruise to a high-attack-low-cruise profile.Each golden eagle begins its Energies 2022, 15, 2566 8 of 24 hunt by searching for prey by soaring in wide circles at high altitudes inside its domain.When prey is sighted, it begins to move around the perimeter of an imaginary circle centered on the prey.The golden eagle remembers where the prey is, yet it continues to circle.
As the eagle lowers its altitude and approaches the prey, the radius of the hypothetical circle surrounding the prey shrinks.Simultaneously, it looks for better options in the surrounding areas.Golden eagles may occasionally tell other eagles where they discovered the best prey that they have found to date.If the eagle cannot find a better location/prey, it will continue to circle in smaller circles around the current one before attacking the prey.If the eagle discovers a better prey, it will fly in a new circle and forget about the old one.The last assaults are executed in a straight line, as can be observed in Figure 4.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Ref. [44].
This section is dedicated to the introduction of the most novel algorithms adopted in this work.The inspiration and principal concept of these algorithms are presented in brief.

MRFO Algorithm
Despite their appearance, manta rays, being one of the world's biggest marine animals, are fascinating creatures.Manta rays have a flat upper-lower body and a set of pectoral fins that allow them to swim gracefully, like birds.Manta rays eat plankton, which is primarily made up of minute creatures found in the ocean, because they do not have sharp teeth.When manta rays go foraging, they use their horn-shaped cephalic lobes to funnel water and prey into their mouths.Modified gill rakers filter the prey out of the water.Manta rays consume a significant number of plankton.Oceans are thought to be the most abundant source of plankton.Plankton, however, is not equally distributed or consistently concentrated in certain specific regions due to the water dynamics and changing seasons.Manta rays, interestingly, are adept at locating plankton.
The most fascinating aspect of manta rays is their foraging activity.They can move alone, although foraging is commonly observed in groups.These critters have developed a wide range of incredible and clever foraging techniques.The MRFO algorithm is inspired by three foraging strategies, involving chain, cyclone, and somersault foraging strategies, as shown in Figure 3. Detailed modeling and performance evaluation compared to common optimization algorithms are provided in Reference [41].

GEO Algorithm
Golden eagles are expert hunters with outstanding vision, speed, and powerful talons, which are capable of catching prey ranging in size from insects to mid-sized animals.Their cruising and hunting are distinct in that they occur in a spiral trajectory, indicating that the prey is usually on one side of the eagle.This allows them to keep an eye on the prey, as well as adjacent stones and shrubs, to choose the best angle of attack.Meanwhile, they scout different areas to see if they can locate better food.The golden eagle's behavior is always guided by two factors during the flight: the tendency to attack and the propensity to cruise.Golden eagles understand that if they strike very quickly, they may only grab tiny prey that are insufficient to pay for the energy spent in hunting.However, if they keep looking for bigger prey indefinitely, they may exhaust their energy and miss the target.
Golden eagles cleverly strike a balance between these two goals, snatching the best prey possible, using a fair amount of time and energy.They seamlessly transition from a low-attack-high-cruise to a high-attack-low-cruise profile.Each golden eagle begins its hunt by searching for prey by soaring in wide circles at high altitudes inside its domain.When prey is sighted, it begins to move around the perimeter of an imaginary circle centered on the prey.The golden eagle remembers where the prey is, yet it continues to circle.
As the eagle lowers its altitude and approaches the prey, the radius of the hypothetical circle surrounding the prey shrinks.Simultaneously, it looks for better options in the surrounding areas.Golden eagles may occasionally tell other eagles where they discovered the best prey that they have found to date.If the eagle cannot find a better location/prey, it will continue to circle in smaller circles around the current one before attacking the prey.If the eagle discovers a better prey, it will fly in a new circle and forget about the old one.The last assaults are executed in a straight line, as can be observed in Figure 4.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Reference [44].

RFO Algorithm
The red fox predator's lifestyle and hunting behavior are rather unusual.It hunts both domestic and wild animals, roaming the landscape, and uses a variety of tactics to confuse victims while crawling, making it a particularly effective predator.The fox's territorial behaviors and the familial relationships between young and adult help adapt to changing situations and, thus, survive.
Red foxes are divided into two groups: those who occupy well-defined areas and those that roam freely.Under the alpha couple's structure, each herd is responsible for a specific region.If the possibility of taking control of another region is good, the young may leave the herd and start their own herd.Otherwise, they stay in the family and receive hunting skills from their parents.
The red fox is a skilled predator of small animals.While traveling across the area, the fox seizes any opportunity for food, creeping up to the prey until it is close enough to

RFO Algorithm
The red fox predator's lifestyle and hunting behavior are rather unusual.It hunts both domestic and wild animals, roaming the landscape, and uses a variety of tactics to confuse victims while crawling, making it a particularly effective predator.The fox's territorial behaviors and the familial relationships between young and adult help adapt to changing situations and, thus, survive.
Red foxes are divided into two groups: those who occupy well-defined areas and those that roam freely.Under the alpha couple's structure, each herd is responsible for a specific region.If the possibility of taking control of another region is good, the young may leave the herd and start their own herd.Otherwise, they stay in the family and receive hunting skills from their parents.
The red fox is a skilled predator of small animals.While traveling across the area, the fox seizes any opportunity for food, creeping up to the prey until it is close enough to attack.Figure 5 depicts the main hunting attitude of a red fox.When the fox detects prey in the distance, the exploration of territory in search of food, as a worldwide search, is followed by a local search to navigate the environment and move as near to the prey as feasible before the attack.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Ref. [45].
Energies 2022, 15, x FOR PEER REVIEW 9 of 24 attack.Figure 5 depicts the main hunting attitude of a red fox.When the fox detects prey in the distance, the exploration of territory in search of food, as a worldwide search, is followed by a local search to navigate the environment and move as near to the prey as feasible before the attack.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Reference [45].

CSA Algorithm
The dynamic behavior of chameleons when traveling and foraging for food sources on trees, deserts, and near wetlands served as the idea for this algorithm.This mimics the chameleons' behavioral stages in their quest for food, such as their rotating their eyes to a nearly 360-degree field of view to detect prey, and grabbing prey with their sticky tongues that launch at fast speeds, as shown in Figure 6.
Chameleons wander the search space looking for prey in this algorithm.Chameleons utilize their globular eyes to scan a large radius in this manner, using every possible region in the search domain.They utilize their incredibly lengthy and sticky tongues to pick up prey quickly and efficiently when hunting.An adjustable parameter was suggested to help chameleons better explore the search space throughout CSA iterations to achieve a better balance between exploration and exploitation for a more dependable performance.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Reference [46].Broad similarities can be observed among the recently proposed algorithms, and thus it can be said that the MRFO algorithm with the three foraging strategies can sufficiently represent the adopted algorithms.The GEO and RFO algorithms search for the solutions in an orbitual manner similar to the cyclonic behavior of MRFO searching for plankton.The chain or straight-line approach of the MRFO is quite similar to the CSA in terms of the chameleon's behavior in attacking prey, with its sticky tongue.Furthermore, the recently developed MRFO algorithm has been employed in power system planning and control applications [42,43], showing its powerful ability to solve non-linear optimization problems, easy implementation, and the lower number of parameters that need to be

CSA Algorithm
The dynamic behavior of chameleons when traveling and foraging for food sources on trees, deserts, and near wetlands served as the idea for this algorithm.This mimics the chameleons' behavioral stages in their quest for food, such as their rotating their eyes to a nearly 360-degree field of view to detect prey, and grabbing prey with their sticky tongues that launch at fast speeds, as shown in Figure 6.

CSA Algorithm
The dynamic behavior of chameleons when traveling and foraging for food sources on trees, deserts, and near wetlands served as the idea for this algorithm.This mimics the chameleons' behavioral stages in their quest for food, such as their rotating their eyes to a nearly 360-degree field of view to detect prey, and grabbing prey with their sticky tongues that launch at fast speeds, as shown in Figure 6.
Chameleons wander the search space looking for prey in this algorithm.Chameleons utilize their globular eyes to scan a large radius in this manner, using every possible region in the search domain.They utilize their incredibly lengthy and sticky tongues to pick up prey quickly and efficiently when hunting.An adjustable parameter was suggested to help chameleons better explore the search space throughout CSA iterations to achieve a better balance between exploration and exploitation for a more dependable performance.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Reference [46].Broad similarities can be observed among the recently proposed algorithms, and thus it can be said that the MRFO algorithm with the three foraging strategies can sufficiently represent the adopted algorithms.The GEO and RFO algorithms search for the solutions in an orbitual manner similar to the cyclonic behavior of MRFO searching for plankton.The chain or straight-line approach of the MRFO is quite similar to the CSA in terms of the chameleon's behavior in attacking prey, with its sticky tongue.Furthermore, the recently developed MRFO algorithm has been employed in power system planning and control applications [42,43], showing its powerful ability to solve non-linear optimization problems, easy implementation, and the lower number of parameters that need to be Chameleons wander the search space looking for prey in this algorithm.Chameleons utilize their globular eyes to scan a large radius in this manner, using every possible region in the search domain.They utilize their incredibly lengthy and sticky tongues to pick up prey quickly and efficiently when hunting.An adjustable parameter was suggested to help chameleons better explore the search space throughout CSA iterations to achieve a better balance between exploration and exploitation for a more dependable performance.A detailed modeling and performance evaluation compared to common optimization algorithms are provided in Ref. [46].
Broad similarities can be observed among the recently proposed algorithms, and thus it can be said that the MRFO algorithm with the three foraging strategies can sufficiently represent the adopted algorithms.The GEO and RFO algorithms search for the solutions in an orbitual manner similar to the cyclonic behavior of MRFO searching for plankton.The chain or straight-line approach of the MRFO is quite similar to the CSA in terms of the chameleon's behavior in attacking prey, with its sticky tongue.Furthermore, the recently developed MRFO algorithm has been employed in power system planning and control applications [42,43], showing its powerful ability to solve non-linear optimization problems, easy implementation, and the lower number of parameters that need to be adjusted compared with other common algorithms.Therefore, the different behavior of the MRFO algorithm and their detailed modeling are discussed as follows.

Modeling of the MRFO Algorithm
The MRFO algorithm is inspired by three foraging strategies: chain, cyclone, and somersault foraging strategies.The MRFO algorithm that incorporates the different foraging techniques can offer a global searching solution in comparison to the recently developed algorithm.The different searching strategies are modeled as follows.

Chain Foraging Strategy
Manta rays can identify locations with a high intensity of plankton and swim in their direction.Although the best location is not yet known, MRFO presumes that the best solution found to date has a high concentration of plankton for manta rays to approach.Manta rays move in lines, head-to-tail, and develop a foraging chain.Individuals not only swim towards the plankton, as in the behavior of Grey Wolf Optimization (GWO) discussed in Ref. [53], but they also swim towards the manta ray in front.Therefore, in every iteration, the best candidate solution found is updated for each manta ray.The mathematical model of chain foraging is expressed as: where x d i is the location of ith manta ray at time t in dth dimension, r is a random number between [0, 1], α is a weight coefficient, x d best is the highly concentrated plankton.The position update of the ith member is decided by the location x d i−1 of the (i − 1)th member and the position x d best of the plankton.

Cyclone Foraging Strategy
When a group of manta rays distinguishes potential plankton in deep water, a long foraging series, one behind the other, develops, and a spiral movement will be formed towards the plankton.WOA has a similar foraging approach.The mathematical representation can be further simplified as: where x d rand is a random spot produced in the predefined search space, β is the weight coefficient, L d b and U d b are the lower and upper boundaries of the dth dimension, respectively, T is the number of iterations, and r is a random number of (0-1).

Somersault Foraging Strategy
In this final foraging behavior, the location of the plankton is considered as a swing.Every member tends to move and turn a somersault to a different pivot.Consequently, they always renew their spots around the best candidate position determined to date.The mathematical expression can be developed as: where S is the factor of somersault that indicates the somersault range, and S = 2. r 2 and r 3 are two random numbers between [0,1].N is the population number.
A flowchart illustrating the optimization process for the PPF design using the MRFO algorithm is shown in Figure 7. where  is the factor of somersault that indicates the somersault range, and  = 2.  and  are two random numbers between [0,1]. is the population number.
A flowchart illustrating the optimization process for the PPF design using the MRFO algorithm is shown in Figure 7.After providing the required parameters of the studied system, the maximum number of iterations and population size are defined.An initial DHPF solution is performed to help initialize the calculation of the system performance parameters, such as  and , and the harmonic indices, such as  and .Then, the MRFO algorithm is performed, following the different foraging behaviors and their locations, and the DHPF solution is performed for each solution with respect to the objective function and constraints.When the solutions are found to violate any constraint, large penalties are assigned, and the process is repeated without affecting the number of iterations.
For the optimal design of the PPF parameters ( ,    ), instead of limiting the search space of the optimization problem to, for example, a unity PF, the single objective function to be minimized is associated with a suitably large penalty factor () for each inequality constraint (15) to (21), and a reasonably small tolerance for variations in the PPF components' parameters is included.In other words, the objective function becomes (( 14) + ∑ ) and the DHPF is performed for each optimal solution, with the feasibility of After providing the required parameters of the studied system, the maximum number of iterations and population size are defined.An initial DHPF solution is performed to help initialize the calculation of the system performance parameters, such as V PoC and PF, and the harmonic indices, such as VTHD and V I HD.Then, the MRFO algorithm is performed, following the different foraging behaviors and their locations, and the DHPF solution is performed for each solution with respect to the objective function and constraints.When the solutions are found to violate any constraint, large penalties are assigned, and the process is repeated without affecting the number of iterations.
For the optimal design of the PPF parameters (C f , L f and R f ), instead of limiting the search space of the optimization problem to, for example, a unity PF, the single objective function to be minimized is associated with a suitably large penalty factor (p f ) for each inequality constraint (15) to (21), and a reasonably small tolerance for variations in the PPF components' parameters is included.In other words, the objective function becomes ((14) + ∑ p f ) and the DHPF is performed for each optimal solution, with the feasibility of the solution checked without affecting the number of iterations.The use of the penalty technique helps maintain inequality constraints and enables an algorithm to search globally for more feasible solutions in a simple manner.These procedures are followed for all the algorithms adopted in this work.

Development of the Proposed MCS-Based Harmonic Analysis Method
The stochastic operating characteristics of power distribution networks can lead to an unrealistic realization and prediction of the actual harmonic performance when deterministic analytical approaches are utilized.Therefore, the Monte Carlo Simulation (MCS), which is a computer-based simulation technique that uses probabilistic theory and statistical solutions, is adopted to overcome these issues [54].The principal idea is to replace the fixed operating point at which the system operates and/or system parameters with a probability function composed of different points, which are uniformly distributed around the fixed point and determine the system behavior and response in a semi-dynamic manner.For the power harmonic solutions, the MCS method can help provide statistical insight into the harmonic performance of the PPF to help engineers account for extreme case scenarios related to power system operational uncertainties.
Different probabilistic methods, such as numerical integration, convolution, and semiempirical methods, were proposed in the literature to assess the harmonics flow with the variations in power networks.In Ref. [55], the MCS was developed to investigate the effect of the power network and the harmonic source variations on voltage and current individual harmonic components.Furthermore, a method was developed based on MCS to investigate the impact of the solar PV system and variations in low-voltage customer loads on the system harmonic impedance [56].The use of probability density functions to represent the variations in the power system components has successfully resulted in an efficient harmonic performance analysis, with confidence regarding the extended evaluation process, in comparison to the deterministic approach.The MCS approach was nominated as the most effective solution to evaluate the stochastic characteristics of the power harmonics considering reasonable variations in the system's variables.Thus, an MCS-based method is proposed in this paper to enable the performance of the DHPF solution, to analyze the performance of the designed PPF.The generalized process of the MCS-based approach that was developed to investigate the PPF harmonic performance is shown in Figure 8.
The proposed, MCS-based method incorporates three main stages: defining power system data and the MCS parameters, the extended harmonic flow calculations including the MCS and DHPF solutions, and, lastly, the processing and presenting results.After providing the system specifications and the harmonic models, the harmonic impedance of the system is calculated for the range of frequency of interest.This process is known as a harmonic impedance scan in the frequency domain, and the results are stored in the form of a matrix, which easily enables calling by the next step.The stored harmonic impedance matrices are used to perform the DHPF solution, and the results are simultaneously stored for the corresponding harmonic impedance matrix.The random generator iteratively triggers the probabilities' function generator to produce unique solutions based on the predefined number of samples and distribution functions settings.The large matrix that is formed is used to generate results depicting the system performance and enable a statistical representation of the harmonic indices.
tion process, in comparison to the deterministic approach.The MCS approach was nominated as the most effective solution to evaluate the stochastic characteristics of the power harmonics considering reasonable variations in the system's variables.Thus, an MCSbased method is proposed in this paper to enable the performance of the DHPF solution, to analyze the performance of the designed PPF.The generalized process of the MCSbased approach that was developed to investigate the PPF harmonic performance is shown in Figure 8.The proposed, MCS-based method incorporates three main stages: defining power system data and the MCS parameters, the extended harmonic flow calculations including the MCS and DHPF solutions, and, lastly, the processing and presenting results.After providing the system specifications and the harmonic models, the harmonic impedance of the system is calculated for the range of frequency of interest.This process is known as a harmonic impedance scan in the frequency domain, and the results are stored in the form of a matrix, which easily enables calling by the next step.The stored harmonic impedance matrices are used to perform the DHPF solution, and the results are simultaneously stored for the corresponding harmonic impedance matrix.The random generator

Origins of Uncertainties
The MCS approach is utilized in this work to extend the evaluation of the harmonic performance of the designed PPF solution in power distribution networks.This helps to consider several variations at the network level such as the linear power load, background harmonics, and the harmonic source emissions.
The linear power load, which represents the aggregated low-power loads, requires a stochastic approach to include the uncertainties attributed to the future connection of loads, monthly, daily, and even momentary changes in the existing loads' profile, and the accuracy of the harmonic model of the loads, depending on their nature.The use of a probability distribution function can help include these uncertainties to an acceptable extent [56].
The variations in the harmonic source emissions and their influence on the PPF harmonic performance should also be considered.The harmonic source emissions were shown [49,50] to vary depending on the amount of power being transferred through the DC link.Additionally, the interactions between the converter control system and the system impedance, and the other harmonic sources, can result in different power harmonic performance profiles [57].Furthermore, the background/existing harmonics that originate from other harmonic sources, which are electrically distant from the PoC can be subject to momentary variations, especially in rich renewable-based power systems [49,57].Another source of uncertainty is imposed by the accuracy of the harmonic analysis solution and limitations of the modelling approaches of the harmonic sources when, for instance, the control circuits and their effects are brought into the picture and required be considered for accurate harmonic analysis [4].Therefore, these different operational uncertainties necessitate a sophisticated method to comprehensively investigate the performance of an optimally designed PPF.
The objective of this method is to statistically present the PPF harmonic performance indices when the linear load, background harmonics, and harmonic source emissions are expressed as arbitrary values based on defined distribution functions.The MCS-based method is subject to some input parameters that should be realistically defined for an efficient process and sensible results.These inputs are defined as follows [56]:

•
Probability distribution functions in which the system variables are defined and represented can be defined by normal distribution (Gaussian distribution), continuous or discrete uniform distribution functions.Thus, parameters such as mean, standard deviation, minimum, maximum, or discrete values should be defined.

•
The number of runs or number of samples over which the MCS is performed should also be carefully defined for extensive performance evaluation.The larger the number of runs, the more value combinations are encompassed in the simulation.

Results and Discussion
In this section, the power system details are presented, the performance of the most recently proposed optimization algorithms is assessed, and the harmonic performance of the designed PPF is evaluated using the proposed MCS-based method, including key uncertainties at the power network level.
For the system depicted in Figure 2, the parameters are as follows.At 60 Hz, the grid line voltage is 33 kV, and the overhead line impedance is 1.45 Ω resistance and 2.79 Ω inductive reactance per phase.The commonly representative resistive-inductive load is used, with an impedance of 40 Ω resistance and 20 Ω reactance per phase, accounting for 0.89 lagging PF.The harmonic currents presented in Ref. [50] are adopted and assumed to align with the fundamental current, since it is the only harmonic source in this study.Additionally, the PPF parameter variations due to the ambient temperature changes are assumed to marginally affect the PPF performance, as discussed in Ref. [10]; thus, a tolerance of ±5% is involved in the constraints to account for these variations and ensure that the harmonic performance is retained within the specified limits.The boundaries of the decision variables are each set from 0 to 100.The per-unit quantities are calculated based on 33 kV voltage and 100 MVA base values.The harmonic source is assumed to operate at the unity power factor and has a fundamental current calculated based on the rated power and the nominal voltage.

Algorithms Performance Evaluation
Initially, to compare the performance of the optimization algorithms, the harmonic source is assumed to operate at full capacity, the grid voltage is sinusoidal, with no associated background harmonics, and variations in the linear load are excluded.To solve the optimization problem, the algorithms were performed using MATLAB (R2021a) on a computer with a 64-bit Windows 10 operating system, an Intel ® Core™ i7 CPU @ 3.60 GHz, and 16 GB of RAM.The number of iterations and populations are set as identical to 100 to establish meaningful results for a comparison between the algorithms.The initial control parameters of each algorithm are shown in Table 2.The typical values recommended by algorithms developers are adopted in this work.These initial parameters can have a significant impact on the overall performance of the algorithms that are adopted for a specific application and should be carefully selected to achieve a better performance.However, the auto-tuned coefficients (α and β) of the MRFO algorithm are based on the randomization generated in each iteration and can lower the complexity of algorithm development, with no anxiety about the decision made on these coefficients, as can be experienced in the case of the CSA associated with several control parameters.

Parameter Typical Value
MRFO [41] α Both are randomly generated and subject to iteration no.β GEO [44] p a Increase linearly from 0.5 to 2 Decrease linearly from 1 to 0.5 p c RFO [45] φ 0 π 0.4 θ CSA [46] For performance comparison, the recently developed algorithms are independently performed several times, and the PoC voltage THD, which is the objective function, is computed using the DHPF solution for each execution/run.The statistical results of 40 independent runs are presented in Table 3.The best and worst solutions obtained from the algorithms for the minimization problem are recorded, while the mean value and standard deviation are computed offline.The average time required by each algorithm to complete a single execution is also shown.It can be observed that MRFO can efficiently find the best solution, with the lowest deviation among the algorithms.The RFO can also find a close solution to that found by the MRFO but with a larger diversity of optimal solutions around the mean value over the several executions.The GEA and CSA are also able to minimize the optimization problem with a relatively small variation, but they seem to be trapped in a locally optimal solution and may require more iterations to reach near-optimal solutions.The MRFO and RFO have better solutions compared with the GEA, while the CSA has the poorest performance among the novel algorithms.The poorness of CSA performance can be imputed to the control parameters' settings.However, the lowest standard deviation value associated with the MRFO, in comparison with other algorithms, indicates its consistency in finding optimal solutions.The optimal solutions found by the MRFO are attributed to the different foraging strategies that widely cover the search space.It is also noticeable that the CSA requires the shortest computational time, followed by the GEA algorithm.In contrast, the MRFO takes a longer time to find the best solution, and this can be justified by the multiple estimations of each manta ray's fitness during each iteration.
The convergence rates of the best solutions offered by the adopted algorithms are superimposed, as shown in Figure 9.It is obvious that the MRFO algorithm first reached its best solution of 0.8026.This was followed by the RFO algorithm after about 70 iterations.However, the GEA algorithm converged to its best solution of about 0.8195 after 35 iterations, while the CSA algorithm, which has the poorest convergence rate, reached its optimal value of 0.9158 after 80 iterations.A closer look shows that MRFO and RFO algorithms reached superior solutions compared to the GEA algorithm.The different hunting schemes and auto-tuned coefficients associated with the MRFO can be attributed to its better convergence rate, while the GEA and CSA algorithms are anticipated to require more iterations to converge to a better solution.
Energies 2022, 15, x FOR PEER REVIEW 15 of 24 It can be observed that MRFO can efficiently find the best solution, with the lowest deviation among the algorithms.The RFO can also find a close solution to that found by the MRFO but with a larger diversity of optimal solutions around the mean value over the several executions.The GEA and CSA are also able to minimize the optimization problem with a relatively small variation, but they seem to be trapped in a locally optimal solution and may require more iterations to reach near-optimal solutions.The MRFO and RFO have better solutions compared with the GEA, while the CSA has the poorest performance among the novel algorithms.The poorness of CSA performance can be imputed to the control parameters' settings.However, the lowest standard deviation value associated with the MRFO, in comparison with other algorithms, indicates its consistency in finding optimal solutions.The optimal solutions found by the MRFO are attributed to the different foraging strategies that widely cover the search space.It is also noticeable that the CSA requires the shortest computational time, followed by the GEA algorithm.In contrast, the MRFO takes a longer time to find the best solution, and this can be justified by the multiple estimations of each manta ray's fitness during each iteration.
The convergence rates of the best solutions offered by the adopted algorithms are superimposed, as shown in Figure 9.It is obvious that the MRFO algorithm first reached its best solution of 0.8026.This was followed by the RFO algorithm after about 70 iterations.However, the GEA algorithm converged to its best solution of about 0.8195 after 35 iterations, while the CSA algorithm, which has the poorest convergence rate, reached its optimal value of 0.9158 after 80 iterations.A closer look shows that MRFO and RFO algorithms reached superior solutions compared to the GEA algorithm.The different hunting schemes and auto-tuned coefficients associated with the MRFO can be attributed to its better convergence rate, while the GEA and CSA algorithms are anticipated to require more iterations to converge to a better solution.The decision over the best algorithm performance also depends on the other decisionmaking factors for which the PPF is designed.The power system performance parameters, such as the PoC voltage, PF, system losses, efficiency, and cost, should be computed for comparison between the different optimization algorithms.
Table 4 shows the system performance before and after utilizing the different PPF solutions proposed by the novel algorithms.It can be observed that the performance of the uncompensated system appears to violate the standard limits that were mentioned earlier in terms of voltage and power factor at the PoC, and this emphasizes the necessity for such a PPF solution.It also presents the optimally designed filter parameters and the system performance with the solutions obtained from the different algorithms.The PF with respect to the line current is computed by Equation ( 29), and network and PPF losses The decision over the best algorithm performance also depends on the other decisionmaking factors for which the PPF is designed.The power system performance parameters, such as the PoC voltage, PF, system losses, efficiency, and cost, should be computed for comparison between the different optimization algorithms.
Table 4 shows the system performance before and after utilizing the different PPF solutions proposed by the novel algorithms.It can be observed that the performance of the uncompensated system appears to violate the standard limits that were mentioned earlier Energies 2022, 15, 2566 16 of 24 in terms of voltage and power factor at the PoC, and this emphasizes the necessity for such a PPF solution.It also presents the optimally designed filter parameters and the system performance with the solutions obtained from the different algorithms.The PF with respect to the line current is computed by Equation ( 29), and network and PPF losses are calculated by Equations ( 30) and ( 31) respectively.The PPF overall cost model including Initial Cost (IC) and Operational Cost (OC) can be approximated by Equation (32).The overall system's efficiency and network's hosting capacity are calculated as per Equations ( 33) and (34), respectively.
where ∅ h is the angle difference between voltage and current components [5,16].
P F , Q F are the PPF fundamental dissipated active power, and supplied reactive power, respectively.The weighting coefficients (K 1 to K 5 ) are computed as recommended in Ref. [58] The Overall System Efficiency η (%) = P s − (P OHL + P PPF ) losses P s × 100% where P s is the total active power delivered to the power system, mainly through the harmonic source, and P OHL and P PPF are the active power losses within the overhead line and PPF, respectively.The ratio of the extreme allowable penetration level of DER systems in MW to the combined load's rated MVA is used to calculate the power network's Hosting Capacity (HC).As a result, with all restrictions fulfilled, the hosting capacity may be equal to the system's instantaneous penetration level and can be expressed as follows [5].
The rated active and reactive power components of the linear loads are P L and Q L respectively.The rated active and reactive power components associated with the nonlinear load, which is the harmonic source, are P NL and Q NL .
It can also be observed from Table 4 that the optimally designed PPFs using the novel algorithms provided improvements to the system performance in terms of the voltage profile at the PoC, power factor, voltage distortions, current TDD, overhead line losses, and hosting capacity.A marginal deterioration in the overall system efficiency (η) is noticeable when the PPF solutions are employed.This is because of the power losses developed across the PPF's resistance, which build up and result in slightly higher overall system losses.Moreover, the constraints are satisfied in the compensated system with no further risk of violating power system standard limits.However, the compensated system with the PPF designed using the MRFO algorithm has better performance parameters, such as the lowest voltage THD, current TDD, network losses, and a relatively higher PF and hosting capacity in comparison to the other algorithms.The PPF design proposed by the MRFO algorithm can offer the lowest impedance path for the high-order harmonics, and thus results in the lowest voltage THD and current TDD.Improvements in voltage THD and current TDD of about 57% and 26%, respectively, are experienced.Furthermore, the power dissipation of the PPF designed using the MRFO is lower than those obtained from other novel algorithms.This is attributed to the lower resistance associated with its optimal solution.It can also be seen that the overall cost corresponding to the solution offered by the MRFO algorithm is the lowest among the algorithms.This can be justified by the smallest inductive and capacitive components associated with its solution.Moreover, the solution proposed by the MRFO algorithms is associated with the best improvement for the network's hosting capacity by roughly 11%.
To validate the harmonic performance of the PPF with the parameters proposed by the MRFO algorithm, the simplified power system depicted in Figure 2 was implemented in the Interactive Power System Analysis (IPSA) simulation environment that mimics a real power system and enables harmonic flow analysis studies.By adopting the harmonic currents presented in Ref. [50], the PoC voltage spectra of the uncompensated and compensated system are depicted in Figure 10.The lower impedance of the PPF at high frequencies has significantly damped the high-order voltage harmonics, while a minor amplification of the low-order harmonics occurs due to the resonance developed by the PPF capacitive component.The optimal solution proposed by the MRFO algorithm is chosen as the best solution and will be used to investigate the performance of the developed MCS-based method for the harmonic performance analysis.

PPF Performance Analysis including Uncertainties
Despite its computational burden, the MRFO algorithm showed a superior performance compared to the recently developed algorithms, with potentially better solutions in most cases.Therefore, in this section, the PPF harmonic performance is extensively analyzed based on the optimal solution offered by the MRFO algorithm.When this designed PPF is implemented in a real power system, subjected to several operational variations and unpredictable state changes at the network level, the harmonic performance must be extended to account for these uncertainties and assure compliance with standard limits for various scenarios.To achieve this aim, the MCS-based method is developed by incorporating the DHPF solution to compute the system harmonic impedances and indices in a semi-dynamic approach and statistically present them to ensure continuous compliance with the standard limits.
compensated system are depicted in Figure 10.The lower impedance of the PPF at high frequencies has significantly damped the high-order voltage harmonics, while a minor amplification of the low-order harmonics occurs due to the resonance developed by the PPF capacitive component.The optimal solution proposed by the MRFO algorithm is chosen as the best solution and will be used to investigate the performance of the developed MCS-based method for the harmonic performance analysis.

PPF Performance Analysis including Uncertainties
Despite its computational burden, the MRFO algorithm showed a superior performance compared to the recently developed algorithms, with potentially better solutions in most cases.Therefore, in this section, the PPF harmonic performance is extensively analyzed based on the optimal solution offered by the MRFO algorithm.When this designed PPF is implemented in a real power system, subjected to several operational variations and unpredictable state changes at the network level, the harmonic performance must be extended to account for these uncertainties and assure compliance with standard limits

Handling Uncertainties Using the MCS-Based Method
In this work, the harmonic source emissions were illustrated in Ref. [50] to vary with the operating point.Additionally, the assumption of electrically distant harmonic sources connected to the grid and their variations due to their unpredicted renewable sources should be considered as time-varying background harmonics.Therefore, the existing harmonics of the grid and the harmonic emissions of the harmonic source are associated with the factors A BGH and A h , respectively, as shown in Equations ( 1) and (10), and can be represented in a continuous uniform distribution function to enable the MCS solution.The background voltage spectrum is reasonably assumed, and details are presented in Table 5.The MCS parameters are shown in Table 6.The linear load, which is composed of active and reactive power components calculated in p.u., is also modeled with normal distribution functions, modeled by normal distribution defined with specific mean values (µ) and standard deviations (σ), to explore their impact on the harmonic performance with the PPF solution.The overhead line impedance, however, is assumed to be constant and not subject to variations.

Characteristics Distribution Functions Parameters
A BGH (pu) Continuous Uniform min = 0.50, max = 1.10A h (pu) Continuous Uniform min = 0.50, max = 1.10 The program is encoded and implemented in MATLAB to solve the problem.Based on the input data and MCS settings, the MCS process starts by generating the profiles of the linear load and harmonic distortion factors (A BGH and A h ).The system harmonic impedance is first calculated, using the provided harmonic models of the system components over the range of frequencies of interest (H), which is equal to 100 harmonic orders.The DHPF solution is applied using the stored impedances that were calculated, and its corresponding harmonic indices are computed and stored.The MCS-based method will proceed with this functionality until it reaches the maximum number of samples/runs (R).Generally, the number of samples should be large enough to include more solution combinations in the MCS.Thus, the number of samples of the MCS in this work is set to 3000 to include more possible variations, represented by the probabilistic distribution functions.To lessen the overall computational complexity, the stored results are treated independently for each run to more easily compute the performance parameters and harmonic indices.

System Performance Analysis
The results of the complete application of the developed method are presented and discussed in this subsection.Firstly, to investigate the impact of the different operational uncertainties on each system component, the harmonic impedances are computed independently using the developed MCS-based solution.The impedance of the PPF system with the MRFO optimal solution is initially performed.Then, the driving point impedance seen from the PoC, including only the variation in the linear load without the PPF solution, is also separately computed for the range of frequencies of interest (i.e., from the 1st to 100th harmonic order).To show the impact of the linear load variations on the overall system impedance, the harmonic impedance seen from the PoC is combined with the PPF impedance (i.e., the PPF is connected in parallel with the linear load and the overhead line impedances), and the MCS is performed to calculate the total harmonic impedance, taking the linear load variations into account.
The resultant harmonic impedances, performed using the developed MCS-based approach, are depicted in Figure 11.It is worth mentioning that the plots include the average, maximum, and minimum values, while all other values lay in the area between the max.and min.impedance plots, which are not shown for simple visualization.The analysis of these impedances can be interpreted by the mean and standard deviation values.
Energies 2022, 15, x FOR PEER REVIEW 19 of 24 independently using the developed MCS-based solution.The impedance of the PPF system with the MRFO optimal solution is initially performed.Then, the driving point impedance seen from the PoC, including only the variation in the linear load without the PPF solution, is also separately computed for the range of frequencies of interest (i.e., from the 1st to 100th harmonic order).To show the impact of the linear load variations on the overall system impedance, the harmonic impedance seen from the PoC is combined with the PPF impedance (i.e., the PPF is connected in parallel with the linear load and the overhead line impedances), and the MCS is performed to calculate the total harmonic impedance, taking the linear load variations into account.The resultant harmonic impedances, performed using the developed MCS-based approach, are depicted in Figure 11.It is worth mentioning that the plots include the average, maximum, and minimum values, while all other values lay in the area between the max.and min.impedance plots, which are not shown for simple visualization.The analysis of these impedances can be interpreted by the mean and standard deviation values.The inductive-resistive linear load harmonic impedance linearly increases with the frequency due to the harmonic model, which represents the inductive element with a reactance multiplied by the harmonic order.Moreover, the frequency dependency associated with the resistive part to accommodate the skin effect shows a marginal damping effect at higher frequencies.The impact of the linear load variations on the driving point impedance seen from the PoC ( ) is pronounced at higher harmonic frequencies, at which the impedance increases by up to 18%, while smaller variations can be observed at lower frequencies of 6% at the 10th harmonic order.
The 2nd-order damped filter impedances ( ) corresponding to the MRFO optimal solution are also depicted in Figure 11.This indicates the superiority of the 2nd-order high-pass filter selected to eliminate the high-order harmonics and the performance of the optimization algorithm in generating an optimal solution with a significantly low impedance path for the high-frequency harmonics to achieve the aim of this study.
When the PPF is connected at the PoC, the system impedance ( // ) seen from the PoC is also plotted, as in Figure 11.It is evident that the PPF has altered and significantly reduced the system impedance over a wide range of high frequencies.However, The inductive-resistive linear load harmonic impedance linearly increases with the frequency due to the harmonic model, which represents the inductive element with a reactance multiplied by the harmonic order.Moreover, the frequency dependency associated with the resistive part to accommodate the skin effect shows a marginal damping effect at higher frequencies.The impact of the linear load variations on the driving point impedance seen from the PoC (Z PoC ) is pronounced at higher harmonic frequencies, at which the impedance increases by up to 18%, while smaller variations can be observed at lower frequencies of 6% at the 10th harmonic order.
The 2nd-order damped filter impedances (Z F ) corresponding to the MRFO optimal solution are also depicted in Figure 11.This indicates the superiority of the 2nd-order high-pass filter selected to eliminate the high-order harmonics and the performance of the optimization algorithm in generating an optimal solution with a significantly low impedance path for the high-frequency harmonics to achieve the aim of this study.
When the PPF is connected at the PoC, the system impedance (Z PoC //Z F ) seen from the PoC is also plotted, as in Figure 11.It is evident that the PPF has altered and significantly reduced the system impedance over a wide range of high frequencies.However, the capacitive element of the PPF interacts with the inductive parts of the linear load, overhead line, and the filter itself, and thus a resonance results at lower frequencies.The inclusion of the uncertainties of the linear load is considered and roughly 37% variation in the resonance peak is observed, while a small variation in the resonant point of 14% is observed.At higher frequencies, the difference between the maximum and minimum impedances plots is about 17%, which is caused by the uncertainties associated with the linear load.
The harmonic impedance of the system seen from the PoC after the PPF installation indicates a considerable attenuation effect on the harmonic voltage components, since the PPF will provide a low impedance path for high-order harmonic currents, even with the uncertainties imposed by the linear load.
The proposed MCS-based method also helps in investigations into the PoC voltage harmonic components variations with the expected variations in the harmonic source emissions and the grid background voltage harmonics, since it incorporates the DHPF solution, enabling the calculation of harmonic indices.The stored system harmonic impedances after the installation of the PPF (Z PoC //Z F ), including the linear load variations, are used to investigate their influence on the PoC voltage harmonic distortions.The different resultant voltage spectrums obtained from the developed MCS-based DHPF solution are shown in Figure 12.The average, maximum, and minimum are shown for illustration.The resulting minor amplification effect on the low-order harmonic components is attributed to the variations in the harmonic resonance due to the PPF capacitance that interacts with the variations in linear load.It is evident that, by including the uncertainties, each harmonic voltage component is maintained at well below the standard limit, and the risk of violating these standard individual limits has been alleviated.The harmonic impedance of the system seen from the PoC after the PPF installation indicates a considerable attenuation effect on the harmonic voltage components, since the PPF will provide a low impedance path for high-order harmonic currents, even with the uncertainties imposed by the linear load.
The proposed MCS-based method also helps in investigations into the PoC voltage harmonic components variations with the expected variations in the harmonic source emissions and the grid background voltage harmonics, since it incorporates the DHPF solution, enabling the calculation of harmonic indices.The stored system harmonic impedances after the installation of the PPF ( // ), including the linear load variations, are used to investigate their influence on the PoC voltage harmonic distortions.The different resultant voltage spectrums obtained from the developed MCS-based DHPF solution are shown in Figure 12.The average, maximum, and minimum are shown for illustration.The resulting minor amplification effect on the low-order harmonic components is attributed to the variations in the harmonic resonance due to the PPF capacitance that interacts with the variations in linear load.It is evident that, by including the uncertainties, each harmonic voltage component is maintained at well below the standard limit, and the risk of violating these standard individual limits has been alleviated.The system parameters obtained from the developed method for the uncompensated and compensated systems can be presented by normal distribution, as shown in Figure 13a-e and Figure 13f-j, respectively.The uncompensated system exceeds the voltage and PF limits at the PoC, while a larger-voltage THD can be experienced at the PoC and would limit further renewable connections at this point.In contrast, the compensated system performance parameters with the MRFO-based PPF solution continuously comply with the standard limits in terms of voltage and PF.It is obvious that the PPF solution would effectively maintain the PoC voltage and PF within the limits of from 0.95 to 1.05, and 0.9 to 1, respectively.This can be attributed to the variations in the load's impedance and, consequently, the voltage across the line impedance.Additionally, the compensated system has a significantly lower voltage THD at the PoC, and is continually maintained at well below the IEEE Std.519 limits.The extreme values that were obtained are assumed to be the worst-case-scenario performance parameters.It is observable that the PPF can improve the voltage THD and current TDD for the worst-case scenario by 54% and 30%, respectively.This is attributed to the variations in the apparent power of the linear and nonlinear loads as per Equation (34).Additionally, an improvement in the network's hosting capacity of 10% can also be noticed for the worst-case scenario, which provides a more The system parameters obtained from the developed method for the uncompensated and compensated systems can be presented by normal distribution, as shown in Figure 13a-e and f-j, respectively.The uncompensated system exceeds the voltage and PF limits at the PoC, while a larger-voltage THD can be experienced at the PoC and would limit further renewable connections at this point.In contrast, the compensated system performance parameters with the MRFO-based PPF solution continuously comply with the standard limits in terms of voltage and PF.It is obvious that the PPF solution would effectively maintain the PoC voltage and PF within the limits of from 0.95 to 1.05, and 0.9 to 1, respectively.This can be attributed to the variations in the load's impedance and, consequently, the voltage across the line impedance.Additionally, the compensated system has a significantly lower voltage THD at the PoC, and is continually maintained at well below the IEEE Std.519 limits.The extreme values that were obtained are assumed to be the worst-case-scenario performance parameters.It is observable that the PPF can improve the voltage THD and current TDD for the worst-case scenario by 54% and 30%, respectively.This is attributed to the variations in the apparent power of the linear and nonlinear loads as per Equation (34).Additionally, an improvement in the network's hosting capacity of 10% can also be noticed for the worst-case scenario, which provides a more accurate estimation according to the proposed PPF solution.The MSC-based solution helps provide better insight into the PPF performance in comparison to the deterministic analytical approach shown in Table 4.The results provided by the proposed MCS-based method indicate that the optimally designed PPF would eliminate any potential risk of the high-order harmonics.This harmonic protective measure can also help increase the hosting capacity of the power distribution network for further penetrations of the power electronics-based renewable systems, which are widely acknowledged as harmonics-producing systems.

Conclusions
Power harmonics would unfavorably affect the operation of distribution network components and constrain the future connection of renewable systems.PPFs are anticipated to be widely used to reduce harmonic distortions, comply the standard limits, improve system components' performance, and maximize the network's capacity.However, the design of such a PPF must meet the given power system requirements.Therefore, parameters of a 2nd-order, high-pass PPF were designed using the novel MRFO algorithm, and an analytical method based on the MCS was proposed to evaluate the harmonic performance of an optimally designed PPF, with variations in the power network.For the superiority verification, the MRFO algorithm was compared with the most recently proposed optimization algorithms, namely GEO, RFO, and CSA, which have a similar inspiration and behaviors.The optimization problem was formulated using the DHPF approach, and the novel MRFO algorithm was shown to result in the lowest network power losses, voltage distortions, and cost, with the best PoC voltage profile and PF correction.However, the MRFO has a better solution but requires relatively higher computational effort.It can be emphasized that the main advantage of the MRFO algorithm is the variety of searching strategies that were incorporated to investigate more potential solutions within the search space.The computational complexity of the MRFO algorithm depends only on the number of iterations and variables, and the randomization-based and auto-

Conclusions
Power harmonics would unfavorably affect the operation of distribution network components and constrain the future connection of renewable systems.PPFs are anticipated to be widely used to reduce harmonic distortions, comply with the standard limits, improve system components' performance, and maximize the network's capacity.However, the design of such a PPF must meet the given power system requirements.Therefore, parameters of a 2nd-order, high-pass PPF were designed using the novel MRFO algorithm, and an analytical method based on the MCS was proposed to evaluate the harmonic performance of an optimally designed PPF, with variations in the power network.For the superiority verification, the MRFO algorithm was compared with the most recently proposed optimization algorithms, namely GEO, RFO, and CSA, which have a similar inspiration and behaviors.The optimization problem was formulated using the DHPF approach, and the novel MRFO algorithm was shown to result in the lowest network power losses, voltage distortions, and cost, with the best PoC voltage profile and PF correction.However, the MRFO has a better solution but requires relatively higher computational effort.It can be emphasized that the main advantage of the MRFO algorithm is the variety of searching strategies that were incorporated to investigate more potential solutions within the search space.The computational complexity of the MRFO algorithm depends only on the number of iterations and variables, and the randomization-based and auto-tuned coefficients of the MRFO could offer a significant advantage over other algorithms that may rely on user-defined control parameters, affecting their overall performance.A thorough harmonic performance analysis study of the designed PPF was conducted using the developed MCS-based approach to include the variations in the linear loads, changes in background harmonics, and different harmonic source emissions.The stochastic method-based results of the harmonic performance analysis were discussed and the designed PPF showed a superior performance in attenuating the harmonics to alleviate the potential risk to the sensitive nearby loads and increase the system's hosting capacity for more renewable systems.The results imply that the optimally designed PPF can effectively attenuate the high-order harmonics for different operating conditions to reduce their impacts on power system components and increase the hosting capacity for more renewables.The proposed MCS method showed that the optimally designed PPF reduced the voltage THD and current TDD by roughly 54% and 30%, respectively, for the worst-case scenario, and improved the system performance parameters over different operating conditions to continually comply with the standard limits.An improvement in the network's hosting capacity of about 10% was also noticed.Apart from this work, an insight into the performance of the novel physics-based and human-based optimization algorithms for different PPF configurations, as a multi-objective optimization problem including the proposed MSC-based method, is being considered for future work.Modifications and improvements in the novel algorithm modelling, such as adaptive and optimized coefficients, are required to improve the performance of such novel optimization methods.The impact of the switched PF correction capacitor banks on the harmonic performance of different PPF topologies must also be addressed using the proposed MCS-based approach.Moreover, an appropriate investigation framework to accurately evaluate the improvements in the power network's hosting capacity for more renewable systems is required for today's power distribution systems.

Figure 3 .
Figure 3. Foraging behavior of the manta rays.Figure 3. Foraging behavior of the manta rays.

Figure 3 .
Figure 3. Foraging behavior of the manta rays.Figure 3. Foraging behavior of the manta rays.

Figure 4 .
Figure 4. Hunting behavior of golden eagles.

Figure 4 .
Figure 4. Hunting behavior of golden eagles.

Figure 5 .
Figure 5. Hunting behavior of the Red Fox.

Figure 5 .
Figure 5. Hunting behavior of the Red Fox.

Figure 5 .
Figure 5. Hunting behavior of the Red Fox.

Figure 7 .
Figure 7. Flowchart of the PPF optimization problem using the MRFO algorithm.

Figure 7 .
Figure 7. Flowchart of the PPF optimization problem using the MRFO algorithm.

Figure 8 .
Figure 8. Generalized process of the proposed MCS-based method.

Figure 8 .
Figure 8. Generalized process of the proposed MCS-based method.

Figure 9 .
Figure 9. Convergence curves of the algorithms adopted.

Figure 9 .
Figure 9. Convergence curves of the algorithms adopted.

Figure 10 .
Figure 10.The PoC voltage spectrum prior and after installing the PPF proposed by the MRFO algorithm.

Figure 10 .
Figure 10.The PoC voltage spectrum prior and after installing the PPF proposed by the MRFO algorithm.

Figure 11 .
Figure 11.System harmonic impedances variations performed using the developed MCS-based method.

Figure 11 .
Figure 11.System harmonic impedances variations performed using the developed MCSbased method.

Figure 12 .
Figure 12.Voltage distortions variations at the PoC using the proposed MCS-based method.

Figure 12 .
Figure 12.Voltage distortions variations at the PoC using the proposed MCS-based method.

Energies 2022 ,
15, x FOR PEER REVIEW 21 of 24 electronics-based renewable systems, which are widely acknowledged as harmonics-producing systems.

Figure 13 .
Figure 13.System performance parameters obtained from the developed MCS-based method prior to (left) and after (right) installing the PPF.

Figure 13 .
Figure 13.System performance parameters obtained from the developed MCS-based method prior to (left) and after (right) installing the PPF.

hs R f PoC R Load X OHL R OHL X Lf X Cf X Load I F I Load I S I hs Figure 2. Detailed
circuit modeled for harmonics flow analysis for PPF design.

Table 1 .
IEEE Std.519 current individual distortions limits for systems rated 33 kV.

Table 2 .
Control parameter settings of the algorithms.

Table 3 .
Statistical comparison of the algorithms over 40 runs.

Table 4 .
Comparison of the different solutions proposed by the novel algorithms.

Table 5 .
Odd background harmonic voltage components.

Table 6 .
The MCS distribution functions and parameters settings.