Harmonic Overloading Minimization of Frequency-Dependent Components in Harmonics Polluted Distribution Systems Using Harris Hawks Optimization Algorithm

This paper presents a novel approach to optimal planning of a resonance-free ${C}$ -type harmonic filter to minimize the harmonic overloading level of frequency-dependent components in a non-sinusoidal distribution system. In the studied system, the non-sinusoidal conditions are represented by the utility side’s background voltage distortion and the load side’s current distortion in addition to the harmonic characteristics of the utility, power cable, distribution transformer, and hybrid linear and nonlinear loads. A constrained optimization problem is formulated to find the optimal filter design that can enhance the power quality performance of the system while complying with the harmonic limits reported in the IEEE Standard 519, filter operation limits reported in the IEEE Standard 18, and other sets of operational ranges to maintain voltage and power factors within their acceptable limits, in addition to diminishing harmonic resonance hazards that may arise due to the filter connection. The problem is solved using a recent swarm intelligence optimization algorithm called the Harris hawks optimization (HHO) algorithm. The results obtained by the conventional methods presented in the literature, namely loss-based and adjusted power factor expressions, are compared with the results obtained by the proposed methodology for validation of the solution. Besides, the problem is solved using other swarm intelligence methods and these methods are compared with the HHO algorithm. The results obtained show the effectiveness of the approach proposed using HHO in finding the minimum power loss and harmonic overloading level of the frequency-dependent components compared to the other optimizers.


I. INTRODUCTION
Nowadays, it is not an easy task for distribution system operators to operate a system without paying attention to harmonic distortion, which is considered one of the most significant power quality (PQ) problems because of the extensive deployment of harmonic (nonlinear) loads and large-scale inverter-based distributed generation (DG) units. When aggregated harmonic distortion exceeds the standard levels, it results in numerous PQ problems such as poor energy transfer efficiency of the system with low power factor (PF) ratios, excessive power loss and overheating problems due to harmonic overloading of frequency-dependent components in the system such as lines, transformers, cables, and motors, which reduces their loading capabilities, malfunctioning of protective equipment, measurement errors of revenue meters, and the possibility of occurrence of series and parallel resonance at some harmonic frequencies, which can result in amplified voltages and currents [1]- [4].
From the perspective of harmonic compensation techniques, numerous configurations of passive, active, or hybrid passive-active filters can be used [5]. Each of them has its operational merits; however, PF correction capacitors and passive filters (particularly single-tuned filters) have gained popularity in distribution systems compared to other types of filters because of their simplicity, reliability, and economic performance in reactive power compensation, voltage support, and harmonic distortion mitigation [6]. Other configurations such as high-pass passive filters (particularly the third-order C-type filters) are more popular in heavy industrial and high-voltage direct current (HVDC) applications, in addition to some transmission system applications, because they damp harmonic resonance, support voltage, reduce power loss, and mitigate a broad range of harmonics [7], [8], particularly in situations where harmonic pollution is not accurately known or is hard to predict because of the deployment of harmonic sources and loads, as well as the uncertainty of harmonics generated from DG units connected to these systems [9]- [11].
From the perspective of optimization techniques for the design of harmonic filters, studies can be divided into several categories including exact methods such as the classical linear and nonlinear programming methods [12], sequential quadratic programming [13], and metaheuristic methods, which mimic ideas, concepts, processes, or behaviors that take place in nature, physics, biology, or society [14]. Some of the metaheuristic methods that have been employed in filter design problems are population-based methods such as genetic algorithms [15], crow search algorithms [7], and particle swarm and ant colony optimization [16] and single solution-based methods such as simulated annealing [17] and Tabu search [18]. On one hand, exact and classical methods suffer from locally optimal solutions because of the discrete, non-convex, nonlinear, and non-differentiable nature of the filter design optimization problems, in addition to the time consumption when obtaining global solutions. On the other hand, metaheuristic methods can solve these complex constrained optimization problems by finding a solution that complies with the bounds and constraints and then improving its global behavior by orchestrating an interaction between exploration and exploitation phases to generate a robust search route capable of escaping from local optima and attaining global or near-global solutions.
From the perspective of the solution approach, authors use various approaches to find a solution (usually the filter parameters) that can achieve one or more constrained design objectives such as minimization of harmonics pollution, cost, or power losses or maximization of the PF or efficiency. Further, they test the PQ performance in a deterministic or probabilistic manner using measurable PQ indices such as the total harmonic distortion (THD) of the voltage and current or the derating factor (DF) of transformers or cables for validation of the filter design and the system performance. Examples of these works can be found in [4], [19]. A comprehensive overview of the various objective functions and constraints used to design passive filters is found in [20]. Also, the authors of [2], [9]- [11] proposed optimal filter designs to maximize the harmonic-constrained capacity of inverter-based renewable resources integrated into a power system above which the system performance becomes unacceptable. The authors concluded that a system's capacity to host renewables decreases noticeably with the increase in the utility side's background voltage distortion and the load side's current distortion. Besides, different research works have made proposals to minimize the harmonic power loss of frequency-dependent components such as transmission lines [21] and cables [22], or transformers [23] by introducing a minimum loss condition of power systems under nonsinusoidal conditions; however, these works did not evaluate the impacts of these losses on the total system performance in the presence of background voltage distortion on the utility side. Other works have addressed the problems of harmonic power loss and resistance frequency dependency of components using an adjusted PF definition that depends on the weights of harmonic voltage and current vectors [24]; however, no consensus about the frequency-dependent weights of harmonic voltage and current vectors has been reached so far.
To address this gap, in this paper, an approach for optimal planning of a resonance-free C-type harmonic filter to minimize harmonic overloading of components of a harmonic distorted power distribution system by considering the frequency dependency of their resistances is presented. For this aim, a newly formulated index is used to evaluate the PQ performance level of the system with different frequencydependent components effectively. The non-sinusoidal conditions are represented by the utility side's background voltage distortion and the load side's current distortion, in addition to the harmonic characteristics of the source, equipment (cable and transformer), and loads in which all these conditions are simultaneously considered in a formulated optimization problem for the optimal design of the proposed filter. Several constraints are taken into account in the problem formulation to find solutions that can enhance the PQ performance of the studied system by complying with the harmonic limits reported in IEEE Standard 519, the filter operation limits reported in IEEE Standard 18, and other sets of operational limitations that maintain the voltage and PF within their acceptable limits while diminishing the harmonic resonance hazards that may arise due to the filter connection in the system. The problem is solved using a recent optimization algorithm developed by Heidari et al. in 2019, called the Harris hawks optimization (HHO) algorithm, which maintains the diversity of search agents through its welldesigned diversification and intensification phases in examining wide search regions and detecting the promising ones in the solution space [25].
Results obtained by other swarm intelligence methodologies such as the salp (SSA), crow (CSA), and hybrid particle swarm optimization and gravitational search algorithms (PSOGSA) are compared with the results obtained by the proposed algorithm for validation of the solution. Besides, the filter design obtained by the proposed methodology is compared with the filters designed by conventional methods presented in the literature for minimizing harmonic losses, namely loss-based and effective PF methods to validate the effectiveness of the proposed solution in minimizing fundamental and harmonic power losses in balanced non-sinusoidal systems.
The rest of the paper is organized in five sections. In Section II, the network under study is presented and analyzed. Also, the harmonic characteristics of the system parameters and the harmonic filter are presented. The conventional measures to correlate harmonic distortion and harmonic overloading of frequency-dependent components are presented and discussed. The new harmonic overloading index is formulated to evaluate the PQ performance level of a system with different frequency-dependent components. Further, performance indices that evaluate the PQ performance level of the system are explored. Section III presents the problem formulation and the approach proposed to solve the problem of minimization of harmonic overloading of the frequencydependent components. Further, the search algorithm by HHO is presented. In Section IV, the results obtained are presented and discussed. Finally, the findings of our study are presented in Section V.

II. Analysis of the system under study
In this section, the system under study and its model, which considers the harmonic characteristics of the components, filter parameters, and operational indices, are presented to evaluate the PQ performance of the system with different frequency-dependent components. Fig. 1 shows a single-line diagram of the distribution system, which consists of aggregated consumers with three-phase linear and nonlinear loads, a PF correction capacitor bank, and a C-type harmonic filter connected to a common load bus. The primary high-voltage side of the power transformer (liquidfilled type) installed by the customers is connected to the point of common coupling (PCC). A short cable transmits the electrical power from the utility side to the transformer. The single-phase equivalent circuit of the system under study at the hth harmonic is shown in Fig. 2, where ℎ is the system voltage at harmonic order h, ℎ is the hth harmonic line current, ℎ and ℎ are the hth harmonic PCC and load bus voltages respectively, ℎ is the hth harmonic current injected into the system by the nonlinear load, and ℎ , ℎ , ℎ , ℎ , ℎ , and ℎ are the hth harmonic equivalent impedances of the source, cable, transformer, filter, capacitor, and linear load respectively. The system components in Fig. 1 are modeled as follows: Utility: This is represented by its Thevenin equivalent voltage ( ℎ ) and impedance ( ℎ ) at each harmonic order; thus:

A. SYSTEM UNDER STUDY
By regarding the skin effect at each harmonic order for the utility side's Thevenin equivalent circuit, ℎ , the resistive part of ℎ , is expressed as given in (2): This expression permits the increase of the resistance at higher harmonic orders than the resistance at the fundamental frequency ( 1 ) [26]. Also, ℎ is the imaginary component of ℎ and is expressed as ℎ 1 at h.
Accordingly, the power loss of the utility side (∆ ) can be calculated as: where H is the maximum harmonic order and ℎ is the hth line current.
Power cable: The short cable is represented by its hth harmonic impedance ( ℎ ), where ℎ = ℎ + ℎ , by neglecting its shunt capacitance as the capacitance of short cables can be neglected in harmonic studies [27]. The hth harmonic resistance of the cable ( ℎ ) can be expressed as given in (4) to take account of the skin effect [28]. Also, ℎ , the inductive reactance component of ℎ , is expressed as ℎ 1 . ℎ = 1 �0.187 + 0.532√ℎ� (4) The ampacity of power cables is defined as the maximum continuous current that the conductor can carry at its maximum operating temperature. Under non-sinusoidal conditions, excess harmonic currents flowing in the cable should be determined to reduce its operating current to avoid its thermal overloading. The intentional reduction of cables supplying nonlinear loads is generally called derating in the literature. To derive the expression of the harmonic derating factor of the cable ( ), the rated power loss (∆ − = 2 1 ) and the loss under a supplied non- Thus, can be expressed as: where I r is the rated current of the cable. Then, the maximum permissible current ( − ) of the cable can be determined in terms of as ( − = × ). In addition, the maximum three-phase apparent power ( − ) delivered by the cable can be determined as follows: where is the true rms value of the phase-to-neutral voltage.
Transformer: Harmonic current components increase the power loss, which results in overloading of the transformer. In the literature, for harmonic analysis studies, transformers are generally expressed by their hth harmonic short-circuit equivalent impedance ( ℎ ); thus: where ℎ is the harmonic inductive reactance of the transformer and is expressed as ℎ 1 . Also, ℎ is the harmonic equivalent resistance of the transformer and is expressed as a combination of one frequency-independent resistance and two frequency-dependent harmonic resistances, namely ohmic resistance ( ), winding stray loss resistance ( ), and resistance related with the other stray losses in the tank and clamps of the transformer ( ). ℎ = + ℎ 2 + ℎ 0.8 (8) The three resistances encounter harmonic loading losses of the transformer, namely ohmic (∆ ), stray (∆ ), and other stray (∆ ) losses, respectively. The no-load loss of a transformer arises at its core, a part which experiences lower heating than the transformer windings (depending on the quality of lamination and the thickness and resistance of the core) [23]. It should be noted that dc or very low-frequency voltages (with voltage total harmonic distortion values above 5%) may cause saturation and considerable extra loss in the core of the transformer [29]; however, this is not the case for high-frequency harmonics [30]. Hence, the core power loss is neglected in this work.
In line with the literature [30], [31], for derating of transformers supplying nonlinear loads, the total three-phase harmonic loading losses of a transformer (∆ ) are calculated as: and depend on the type, design, and size of transformers, where / can be as low as 0.01 to 0.05 in highly efficient transformer designs with low stray loss, whereas it can reach 0.3 in low-efficiency transformers with high stray loss [23]. Also, according to IEEE standard C57.110 [31], / is 67% and 33% of the total stray losses, that is, , for dry-type and liquid-filled transformers, respectively; therefore, / can be determined. Further, the harmonic loss factors for winding currents (F HL ) and other stray losses (F HL-St ) when supplying nonlinear loads are expressed, respectively, as follows: Then, using both harmonic loss factor expressions, one can determine the maximum permissible per-unit current ( − ) and the maximum permissible three-phase power ( − ) of the transformer as follows [30], [31]: − ( ) = 100 × ( ) − (16) Linear loads: These are composed of induction motors and other loads, which are represented by the hth harmonic impedance ( ℎ ), where ℎ = ℎ + ℎ , in which the real and imaginary parts of ℎ are determined from the power flow at the fundamental frequency. Also, some of the loads are individually compensated by a capacitor bank, whose shunt harmonic impedances ( ℎ ) can be written as ℎ = − ℎ . Besides, previous work [32] clarified that harmonic motor losses are inversely proportional to the harmonic order and directly proportional to the square of voltage harmonic magnitudes. The relationship between the motor load loss function (MLL) and voltage harmonics is given as follows: It can be noted from (17) that low harmonic orders have more effect on the loading loss of induction motors when compared to high harmonic orders.
Nonlinear loads: These are composed of a combination of lighting loads and a group of six-pulse variable-frequency drives. They are represented at each harmonic order by their current source model ( ℎ ), where ℎ = ℎ , in which ℎ is a factor that represents the ratio of the hth harmonic current to the fundamental current ( ). Values of ℎ for these aggregated loads are obtained from previous publications [4].
Harmonic filter: The C-type filter is used in this study because it can damp resonance effectively, support the voltage, reduce power losses, and mitigate a broad range of harmonics as mentioned before. It behaves like a capacitor (C 1 ) at the fundamental frequency, resulting in practically negligible and theoretically nil power loss at the fundamental harmonic [7]. The single-phase equivalent circuit of the Ctype filter and its impedance-frequency response are illustrated in Fig. 3. The hth harmonic equivalent impedance ( ℎ ) of the filter can be written as follows: where a= 2  The design equations needed to find the four unknown parameters of the C-type filter are arranged as follows: The main capacitance ( 1 ) value needed for reactive power support and PF compensation at the fundamental frequency ( 1 ) is determined.
where Q f is the required reactive power to correct PF and is the rated voltage. The inductance ( ) is determined so that it resonates at 1 with the auxiliary capacitance ( 2 ) to bypass the resistance in order to neglect the fundamental power loss; thus At the tuning frequency (ℎ ), the filter reactance should equal zero. This leads to the following expression of the filter's resistance [8]: As ℎ should be inductive above ℎ , while maintaining positive values of the filter's parameters, the following inequality should be met.
Accordingly, using (21)-(24), one can get values of the filter's parameters, but selecting optimal values of these parameters depends on the system conditions.

B. HARMONIC ASSESSMENT FOR FREQUENCY-DEPENDENT COMPONENTS
In this section, conventional measures named the loss-based power factor (PF L ) and harmonic adjusted power factor (PF HA ) methods are used to correlate the harmonic signature and harmonic overloading of frequency-dependent components. Further, the new harmonic overloading index is formulated.

1) Loss-based power factor (PF L ) approach
It was indicated in [33], [34] that the apparent power should be linearly related to the power transfer loss to give true information on the system efficiency under non-sinusoidal conditions. In addition, the same studies considered the meaning of the PF for sinusoidal and balanced conditions to calculate the true apparent power under non-sinusoidal conditions as follows: First, under sinusoidal and balanced system conditions, the PF is expressed as where the active power is = √3 , the apparent power is = √3 , and I min and I denote the minimum and actual rms line currents, which transmit the same active power, under negligible variation of V ll .
Second, for the same value of the transmitted active power, the ratio between the minimum (∆P min ) and actual (∆P) total transmission losses is given as follows: Then, the expression of the PF L can be found as a function of the transmission loss as follows: Accordingly, for harmonic distorted distribution systems, the total power loss (∆ ) can be calculated as: where ∆ is the power loss in the system's Thevenin impedance, ∆ is the power loss in the cable, and ∆ is the power loss in the transformer. ∆ is obtained when a sinusoidal active current I is experienced by the system, and it can be found in terms of the load voltage and active power at the fundamental frequency ( 1 and 1 ), as follows: As a consequence, maximizing would minimize the harmonic losses of the components.
2) Harmonic adjusted power factor (PF HA ) approach In [24], McEachern et al. presented PF HA as a justifiable PF expression that uses effective voltage and current vectors to penalize customers with higher-order harmonic currents that cause greater power loss than lower-order harmonic currents. Based on this approach, and considering a balanced system, the effective apparent power (S E ) and power factor (PF HA ) expressions that take account of the non-sinusoidal losses can be determined as follows: where ℎ and ℎ are the hth harmonic weighting factors for voltage and current respectively. Both are equal to 1 at the fundamental frequency, and ℎ is the hth harmonic phase angle between the hth load voltage and line current. Different values of ℎ and ℎ were considered in their work; however, based on their results, the most reasonable values was setting ℎ as 1 and ℎ as h 1.333 as implied in IEEE 519 limits for the odd harmonic currents because IEEE 519 can be viewed as a site-based limit on harmonics that does not address harmonic distortion of individual equipment but gives limits on a site scale, which is the primary interest of this work. Hence, maximizing would minimize the harmonic losses of the components.

3) Proposed harmonic overloading approach
Using the concepts behind derating of transformers and cables presented in [4] and [31], an index for the collective evaluation of harmonics overloading of transmission and distribution components with frequency-dependent resistances can be given as follows: First, the power loss expressions given in Section II clarify that components with resistances that increase with the frequency have higher losses in the case of a non-sinusoidal current compared to the case of a sinusoidal current even if both cases have the same total rms value because of harmonic currents and the frequency-dependent characteristics of the components' resistances. Hence, if an increased current (I eq ) flows through the sinusoidal system, it can result in a power loss with the same value as is obtained in the non-sinusoidal system, where I eq is an equivalent current that includes a value added to the normal rms current flowing in the system to give the same result as the non-sinusoidal harmonic loss.
Second, using the approach proposed in [23] to measure overloading of transformers under non-sinusoidal load current cases, one can consider that the impact of the harmonic currents on the system components is equivalent to increasing the fundamental frequency current value. Accordingly, aggregate harmonic overloading of the utility side's line, power cable, and transformer can be redefined as the ratio between the total power loss (∆ ) and the total rated power loss (∆ ); thus: where ∆ denotes the total rated loss of the utility's line, power cable, and transformer. To sum up, a system with ( ) > 1 means that the total power loss is greater than the permissible power loss and this indicates aggregate harmonic overloading of the system components.

C. PERFORMANCE INDICES
Several operational parameters and technical indices are investigated to evaluate the PQ performance level of the system under study. To calculate these indices, the line current and PCC and load voltages are determined using the expressions given in (33), (34), and (35), respectively, at each harmonic order.
where ̅ ℎ , � ℎ , and � ℎ denote the complex phasors of the line current and the PCC and load voltages.

1) True and displacement power factors
By regarding the fundamental active ( 1 ) and apparent powers ( 1 ) at the load bus determined using expressions given in (36), the displacement power factor (DPF) and true power factor (TPF) expressions to measure the system efficiency can be obtained as follows:

2) Voltage total harmonic distortion
The total harmonic distortion values of the PCC ( ) and load ( ) voltages are calculated respectively as:

3) Current total demand distortion
The total demand distortion value of the line current (TDD) is expressed as follows: is the maximum demand current and is considered equal to the rated current ( ).
Besides, − of the cable given in (6), − of the transformer given in (16), and of the motors given in (17) are taken into consideration as PQ performance indices.

III. OPTIMIZATION PROBLEM FORMULATION
The problem formulation and the approaches proposed to solve the problem of minimization of harmonic overloading of frequency-dependent components are presented. Further, the HHO algorithm is demonstrated.

A. OBJECTIVE FUNCTIONS
The objective functions (OFs) investigated for the optimal design of the C-type filter can be expressed as follows:

1) Proposed approach
The proposed optimization approach is the minimization of to minimize the system's harmonic overloading of frequency-dependent components. Thus:

2) Conventional approaches
The conventional optimizations approaches are maximization of and independently to minimize the system's harmonic overloading of frequency-dependent components. Thus:

B. CONSTRAINTS
Six constraints were considered in this work. The first constraint is to ensure compliance with the individual and total harmonic voltage limits given in IEEE 519 for the PCC and load bus voltages [35]. Thus where is the maximum value permitted by IEEE 519 for THDV and is given in Table I, which shows the threshold values used in this problem. ℎ and ℎ are the hth individual harmonic distortion percentages of the PCC and load bus voltages, and ℎ is the hth maximum value permitted by IEEE 519 for individual harmonic voltage distortion. The second constraint is to ensure compliance of and with the bus voltage limits; thus: where and are the minimum and maximum bus voltage values, respectively.
The third constraint is to ensure compliance with the individual harmonic current and total demand distortion limits given in IEEE 519 for the distorted line current flowing in the system. ( where is the maximum value permitted by IEEE 519 for TDD. ℎ is the hth individual harmonic distortion percentage of the line current, and ℎ is the hth maximum value permitted by IEEE 519 for individual harmonic current distortion.
The fourth constraint is to ensure that TPF is within its acceptable limits. Thus The fifth constraint is to ensure compliance with shunt capacitor limits given in IEEE 18-2012 to ensure continuous operation of capacitors connected to the non-sinusoidal load bus. Specifically, for every shunt capacitor k, the capacitor's rms voltage , , peak voltage , , rms current , , and reactive power , must comply with the following limits given in per-unit of their nominal values [36].
, ( 1 , , 2 , ) ≤ 1.35, ∀ The last constraint is to ensure that the C-type filter connected to the system will damp the harmonic resonance that can be initiated after its connection. This can be expressed by the ratio between the load voltages after and before connecting the filter to the system and considering the worst case of harmonic voltage amplification ( ), in which the series system impedance is assumed to be purely reactive and equal to the negative equivalent filter reactance [7]. Thus: where ℎ ℎ is set to 1.2 [8].

C. SEARCH ALGORITHM
Currently, metaheuristic optimization algorithms are frequently employed to tackle complex engineering problems because of their exploration and exploitation abilities to attain better results (global or near global) in a time-effective manner compared to the results of classical algorithms [37]. In this work, HHO, developed in 2019, is employed to solve the filter design problem due to its good performance in solving engineering problems. The HHO algorithm mimics the behavior of Harris hawks, intelligent birds that live in groups in the USA, in chasing their prey (usually rabbits) [25]. A group of hawks attacks prey from diverse locations to surprise it, and then the leader hawk (the best-fit one) surrounds it. The hawks have the ability to change their chasing techniques based on the environment and the escape routes of the rabbits. Mathematically, the hunting technique of the hawks can be modeled in three phases: i) exploration, ii) changeover from exploration to exploitation, and iii) globalization of search (exploitation). During the exploration phase, the hawks sit in a random way in high places (such as tall trees) where they wait and observe the surrounding environment to detect the prey using their powerful eyes. When the hawks detect prey, they can attack it using two tactics. The first tactic depends on cooperation between all hawks to surprise the prey, whilst the second depends on permitting one of the hawks in the group to attack the prey based on the prey's escape behavior and the leader hawk decision. If an equal chance (α) is considered for each tactic, hawks can sit based on the positions of the neighboring hawks to ensure a cooperative attack as expressed by (59) under the condition of α < 0.5. Otherwise, the hawks sit in random locations expressed by (60) under the condition of α ≥ 0.5.
where P(t) is the position vector of hawks at iteration t, P(t + 1) is the updated position vector of hawks at iteration (t + 1), P best (t) is the prey's position, and α, β, ψ, φ, and τ are random numbers in the range of [0,1]. LB and UB are the upper and lower bounds of the position variables, P rand (t) is a randomly selected hawk from the current population, and P avg (t) is the average position of the hawks. Further, HHO can change from exploration to exploitation by execution of a change between different exploitative expressions that depend on the escaping energy of the prey, where the energy of the prey (E) is expressed as follows: where t max is the maximum number of iterations, and E 0 is the initial energy of the prey state that is randomly selected in the range of [−1, 1] at each iteration. When E 0 decreases from 0 to −1, the prey is becoming weaker; otherwise, the prey is becoming stronger.
Then, to ensure globalization of the search, the hawks perform a sudden attack on the prey detected in the previous phases. To model this, let r represent the probability of escape of the prey; r is less than 0.5 in the case of successful escape and greater than or equal to 0.5 in the case of unsuccessful escape before the attack. Regardless of the prey's escape scenario, the attacking hawks will perform a hard or soft siege to catch their prey. To mimic this hunting strategy, the HHO can switch between the soft and hard siege approaches depending on the escape energy of the prey E; that is, when |E|≥0.5, the soft siege begins; otherwise, a hard siege will occur. In the soft siege, when |E| ≥ 0.5 and r ≥ 0.5, the prey tries to escape using random jumps but fails. During these trials, the hawks surround the prey to ensure it is tired and then perform a sudden attack on it. Thus: where ∆ ( ) is the difference between the position vector of the prey and the current position in the tth iteration. J denotes the random escape strength of the prey.
In the hard siege, when |E|< 0.5 and r ≥ 0.5, the prey is tired and has a low escape energy. Consequently, the hawks hardly encircle the prey to perform a sudden attack. Thus: Fig. 4 shows a representation of the different phases of HHO. In addition, more advanced tactics for both soft and hard siege approaches can be employed as detailed in [25].  Fig. 1, the rated three-phase short-circuit capacity is 800 MVA and the voltage of the 50 Hz rated system is 6.35 kV (line-to-line), for which the equivalent Thevenin resistance 1 and reactance 1 at the fundamental frequency are given as 0.0038 and 0.0506 ohms, respectively. It has a short power cable (trefoil formation, PVC insulated, unarmored, copper wire, 0.1 km) whose rated line-to-line voltage and ampacity are 6.35 kV and 640 A, respectively, and whose fundamental resistance 1 and reactance 1 are given as 0.0098 and 0.0104 ohms, respectively. A star-star liquid-filled consumer transformer with nameplate ratings of 7 MVA and 6.3/0.4 kV is connected. Its resistances ( , and ) obtained from [4] are given as 0.026, 0.006, and 0.012 ohms, respectively, and the harmonic inductive reactance 1 is 0.221 ohms. The rated stray loss (∆ ) and other stray power losses (∆ ) are given in per-unit as 0.2308 and 0.4615, respectively. The three-phase active and reactive powers specified at the load bus are 4.9 MW and 4.965 MVAr. The load resistance 1 and reactance 1 at the fundamental frequency (referred to the primary side of the transformer) are given as 4 and 4.05 ohms, respectively. Some of loads are individually compensated by a capacitor bank, whose fundamental capacitive impedance referred to the primary side of the transformer ( 1 ) equals 100. Also, the nonlinear loads are modeled using harmonic current injections at characteristic harmonic orders presented in Table II. The utility side's background harmonic voltage distortion is also presented in Table II. Results obtained in the case of the uncompensated system are given in Table III. It can be noted from Table III that is close to ; however, both and are considerably higher than their permissible values. The same table also indicates that the considered PF expressions are very low because of the harmonic pollution and reactive power shortage. It therefore follows that the individual capacitor connected to the loads did not contribute to any improvement of the DPF value. The cable has reduced current carrying capability, − , thus limiting the transfer of more current. The transformer suffers from a dramatic reduction in − , indicating a low loading capability. The motors also have a high MLL value. Besides, normalized values of individual and total power losses of the components have high values as collectively reflected by the per-unit value of (1.3236), which indicates aggregated harmonic overloading of the system.  Table IV presents the optimal filter parameters and the best fitness values of the proposed I eq minimization approach obtained by the four algorithms. Also, the worst, mean, standard deviation of the fitness values obtained, and the time collapsed to obtain them are clarified in the same table. It can be noted from Table IV that the four algorithms provide close best fitness values. The results obtained by HHO are better than those obtained by the other optimizers in term of the best fitness (498.069) and mean (498.271) values. The minimal values of the standard deviation index of SSA (0.128) followed by HHO (0.137) clarify their high robustness. However, it should be noted that HHO requires a lower computational time to find the best fitness value compared to the other three algorithms over the same number of iterations and runs, in addition to having a better convergence rate in finding the best fitness value than the other three algorithms, as shown in Fig. 5. The optimal filter parameters and the results obtained for the compensated system using the three objective functions are given in Table V. We can see that the C 1 and C 2 values provided by OF 1 are smaller than their values obtained by the other objective functions; therefore, lower reactive power will be supplied from the filter in such a design. Although the values of the filter's resistance (R) and inductance (L) provided by OF 3 are smaller than their values obtained by the other objective functions, the average value of the worst harmonic voltage amplification ( ) is higher than its values obtained by the other objective functions, as shown in Fig. 6, which means that the first filter configuration is more advantageous than the other filter configurations with respect to resonance damping. We can also see from Table V that the filter parameters provided by OF 1 resulted in and values lower than those provided by the other objective functions, which indicates a lower aggregation of harmonic overloading of the system components. In addition, a lower ∆ * percentage has been achieved using the filter proposed by OF 1 compared to the losses obtained using the other objective functions. This is also justified by the lower cable (∆ * ) and transformer (∆ * ) normalized power losses obtained using the same filter. However, this was not the case for the power loss of the system's Thevenin impedance.

For the system under study shown in
From the perspective of harmonic distortion, and are well below the IEEE standard limit (5%) in the results obtained by the three objective functions, as presented in Table V. The TDD values are also well below the corresponding IEEE standard limit (15%) in all the objective functions' results. Besides, the individual harmonic voltage and current distortion values, shown in Figs. 7 to 9 for IHDV PCC , IHDV L , and IHDI respectively, are well below the IEEE 519 limits for the individual harmonic distortion limits presented in Table I.  Furthermore, it can be seen from Table V that the proposed filter design provided by OF 1 has led to higher and DPF values than the values obtained by the other filter designs. But, the filter design obtained using OF 2 and OF 3 resulted in loading values of − , − , and MLL that were better than the corresponding values provided by OF 1 because of the dependence of these quantities on the harmonic signature of current and voltage, especially those of the low harmonic orders. Moreover, the responses of the three objective functions among variation of the filter parameters around their optimal values provided by OF 1 of HHO are investigated. The responses observed in the same search region of the filter parameters are illustrated in Fig. 10.  Fig. 10 shows that the choice of the values of the optimal filter significantly affects the values of the objective functions. Even so, it was observed that acceptable PF expressions are obtained at the optimal values of the filter with the lowest equivalent current value in the same search region of the filter parameters; that is, the optimal values of the filter with I eq minimization almost provide acceptable values of the other PF expressions. Also, we can see that the responses of the objective functions are mainly affected by the X C1 values. However, the I eq response was the one affected least by these variations.
In practice, there is always a certain amount of variation in every resistive-inductive-capacitance (RLC) component value due to manufacturing variations; that is, the parameters of the filter components are not exact. The common ranges of these variations are i) -10 to 10% of the resistance, ii) -3 to 3% of the inductance, and iii) 0 to 10% of the capacitance values. However, the performance of the damped filters such as the C-type filters is more robust to the variations that may occur due to variation of these parameters than that of tuned filters [7], [8]. Then, to examine the filter's robustness to these variations, the optimal parameters obtained by HHO and OF1 are assumed to vary randomly in their variation tolerance ranges, and thousands of combinations are calculated using the Monte Carlo simulation method. Further, each PQ index is then calculated for all the studied ranges and the statistical values representing the 50 th to 95 th percentiles of the parameter variation are further determined, while considering that the variations of the random variables are normally distributed. Fig. 11 shows the change in the and TDD values versus the variation percentiles used, while Fig. 12 shows the change in the ∆ * and values. On one hand, the results obtained indicate the good robustness of the filter as all the values of the parameters vary close to the optimal designed values, and the maximum percentage change calculated differs from the base designed value by around 11%. On the other hand, they did not exceed the design limits, which justifies the robustness of the filter designed using OF 1 by HHO.

V. CONCLUSION
In this work, we presented an approach for the optimal planning of a resonance-free C-type harmonic filter to minimize the harmonic overloading level of frequencydependent components in a non-sinusoidal distribution system. A new index is formulated to evaluate the PQ performance level of the system with different frequencydependent components effectively. The filter design problem is solved using the recent HHO algorithm, which maintains the diversity of search agents because of its well-designed diversification and intensification phases in examining wide search regions and detecting the promising ones in the solution space. Besides, the problem is solved using other swarm intelligence methods such as the crow, salp, and hybrid particle swarm optimization and gravitational search algorithms and compared with the HHO algorithm. The results obtained show the effectiveness of the approach proposed using HHO in finding the minimum power loss and harmonic overloading level of the frequency-dependent components compared to the other optimizers. Also, a comparative analysis has been conducted on other filter designs obtained by conventional methods presented in the literature for minimizing harmonic losses, namely loss-based and effective PF methods, to validate the effectiveness and robustness of the proposed solution in minimizing fundamental and harmonic power losses in distribution systems supplying nonlinear loads. Finally, in future studies this study will be extended to other types of passive filters using new metaheuristic techniques in unbalanced systems.