A Systematic Investigation into the Optimization of Reactive Power in Distribution Networks Using the Improved Sparrow Search Algorithm–Particle Swarm Optimization Algorithm

: With the expansion of the scale of electric power, high-quality electrical energy remains a crucial aspect of power system management and operation. The generation of reactive power is the primary cause of the decline in electrical energy quality. Therefore, optimization of reactive power in the power system becomes particularly important. The primary objective of this article is to create a multi-objective reactive power optimization (MORPO) model for distribution networks. The model aims to minimize reactive power loss, reduce the overall compensation required for reactive power devices, and minimize the total sum of node voltage deviations. To tackle the MORPO problems for distribution networks, the improved sparrow search algorithm–particle swarm optimization (ISSA-PSO) algorithm is proposed. Specifically, two improvements are proposed in this paper. The first is to introduce a chaotic mapping mechanism to enhance the diversity of the population during initialization. The second is to introduce a three-stage differential evolution mechanism to improve the global exploration capability of the algorithm. The proposed algorithm is tested on the IEEE 33-node system and the practical 22-node system. The results indicate a reduction of 32.71% in network losses for the IEEE 33-node system after optimization, and the average voltage of the circuit increases from 0.9485 p.u. to 0.9748 p.u. At the same time, optimization results in a reduction of 44.07% in network losses for the practical 22-node system, and the average voltage of the circuit increases from 0.9838 p.u. to 0.9921 p.u. Therefore, the proposed method exhibits better performance for reducing network losses and enhancing voltage levels.


Introduction
The field of reactive power optimization in modern power grids is constantly evolving and improving as technologies progressively shift towards intelligence, real-time operation, and coordination to address the complexity and variability of power system operation.This enhances the operational efficiency, economic viability, and reliability of the grid.Reasonable strategies for reactive power control and allocation can reduce energy consumption and operational costs in the power grid, ultimately enhancing the stability and economic efficiency of the power system.Conversely, the insufficiency of reactive power and improper distribution in the power distribution system may result in increased line losses and voltage fluctuations.However, the modern reactive power optimization (RPO) field also faces various issues and challenges, including those presented by demand growth, the limitations of traditional reactive power compensation devices, and the intricate grid topology, among other challenges [1].
The RPO of distribution networks in the power system is a subproblem of the optimal power flow problem.RPO can be achieved by manipulating the reactive power for the power system, thereby enhancing the efficiency of the power system [2].The primary objective of RPO is to achieve optimal operating conditions while satisfying the given constraints by harmonizing and optimizing control variables such as generator voltage values and transformer voltage ratios, which aim to reduce network losses and improve voltage levels [3,4].
In general, RPO models presented a single-objective function, such as minimizing reactive power losses or optimizing reactive power distribution.In recent years, with the increasing demands for grid stability and reliability, researchers have begun to explore multi-objective optimization problems.In addition to minimizing reactive power losses, reactive power optimization models also considered other objective functions, such as improving voltage stability, power factor, and reactive power balance.Therefore, the optimization problem has evolved from a single-objective RPO problem to a multi-objective reactive power optimization (MORPO) problem [5,6].The MORPO problem is essentially a nonlinear optimization problem with multiple constraints, variables, and objectives [7,8].
To address this issue, numerous scholars have proposed various solutions, which are mainly divided into two categories: classical optimization techniques and artificial intelligence optimization technologies.The classical optimization techniques consist of gradient methods [9], interior point methods [10], linear programming [11], and nonlinear programming methods [12].To solve multi-objective problems, the traditional approaches generally transformed the MORPO problem into a single-objective optimization problem by using weighted methods [13], ε-constraint methods [14], and fuzzy decision-making methods [15].However, there are inherent drawbacks to traditional methods, such as computational complexity, limited flexibility, and the inability to solve constrained problems involving nonlinear and discontinuous functions.Therefore, artificial intelligence optimization algorithms have gradually been employed to tackle multi-objective optimization problems.Recently, the MORPO problem has been successfully addressed through the implementation of metaheuristic optimization methodologies, with examples such as particle swarm optimization (PSO) [16,17], the sine cosine algorithm (SCA) [18], the sparrow search algorithm (SSA) [19], the imperialist competitive algorithm (ICA) [20], the cuckoo search algorithm (CSA) [21,22], the genetic algorithm (GA) [23], the beetle antenna search (BAS) algorithm [24], the NSGA-II algorithm [25], the grey wolf optimization (GWO) algorithm [26,27], the bacterial foraging optimization (BFO) algorithm [28], etc.
The PSO algorithm, known for its low memory requirements and fast convergence, has been widely adopted in the field of MORPO due to its advantages [29].In reference [30], an improved RPO algorithm was proposed by considering the minimization of power loss as the primary objective function, which was achieved by enhancing the strategy of inertia weight and the acceleration coefficients.In reference [31], the L-index was incorporated to enhance the stability of static voltage in electrical power systems.Confronted with intricate multi-objective dilemmas, such as minimizing power loss and L-index, the implementation of a crossover operator was introduced to augment the diversity of PSO.Additionally, a chaotic sequence based on logical mapping was utilized in PSO instead of a random sequence to enhance its global search capability and exploitation ability.In reference [32], the potential effects of integrating distributed generation (DG) into the power distribution network were discussed.An improved second-order oscillatory PSO algorithm was presented to enhance the efficiency and convergence properties of multi-objectives.It should be noted that multiple iterations are required to converge for the PSO algorithm.Consequently, this can lead to the PSO algorithm easily becoming trapped in a local optimum solution [33].
The SSA is a novel nature-inspired algorithm that draws inspiration from the behavior of sparrows [34].It has gained widespread discussion among scholars and is currently under active research.In reference [35], a multi-objective optimization model was established including investment cost, environmental sustainability, and power supply quality as the objective functions.Subsequently, the Levy flight strategy was incorporated into the SSA to enhance the ability of the multi-objective sparrow search algorithm to escape local optima.In reference [36], a chaotic sparrow searches algorithm (CLSSA) based on the logarithmic spiral strategy and the adaptive step size strategy was proposed.The experimental findings demonstrate the commendable practicality of the proposed approach in addressing engineering quandaries.In reference [37], this article aims to integrate an improved point selection strategy with the SSA.The issue of convergence degradation in solving high-dimensional multi-objective optimization problems has been resolved and the performance of the algorithm is improving.Based on the above research, it can be observed that despite the excellent performance of the SSA in optimization problems, it has some inherent drawbacks, such as slow convergence speed and the possibility of becoming trapped in local optima.
According to the aforementioned research, this paper proposes a method for MORPO in distribution networks using the improved sparrow search algorithm-particle swarm optimization (ISSA-PSO) algorithm.The specific findings and contributions of the paper can be summarized as follows: (1) This paper establishes a MORPO model, where the objective function consists of minimizing active power loss, minimizing total compensation of reactive power compensation devices, and minimizing the sum of node voltage deviations.
(2) Inspired by the aforementioned research, this paper presents the ISSA-PSO algorithm to address the low convergence accuracy in PSO while incorporating the strong global search capability and efficiency of SSA.This algorithm incorporates two notable enhancements: The first enhancement introduces the incorporation of a tent chaotic mapping mechanism to initialize the population, aiming to enhance its diversity.The second enhancement introduces a three-stage differential evolution mechanism to enhance the algorithm's global exploration capability.
(3) The effectiveness of the ISSA-PSO algorithm is proved by simulation using the IEEE 33-node system and the practical 22-node system.Compared with the SSA, PSO algorithm, and SSA-PSO algorithm, the proposed strategy has better performance in terms of tracking speed, accuracy, and dependability.

MORPO Model
The essence of MORPO in distribution networks is essentially the resolution of a nonlinear problem that contains both equality and inequality constraints.By incorporating the actual characteristics of the power system into the reactive power problem and considering given parameters such as impedance values and load conditions of the distribution lines, the control variables are optimized to satisfy the constraints set for the objective function.Consequently, the distribution network achieves an optimal operational state through MORPO.The mathematical model is defined as follows: where min f (u, x) is the objective function; g(u, x) = 0 is the equality constraint; and h(u, x) ≤ 0 represents the inequality constraint.

Selecting the Objective Function
(1) From an economic perspective, the minimization of active power losses in the distribution network system is considered as the first objective function.The expression can be formulated as follows: where P loss indicates the active power loss in the power grid; n is the number of branches; G is line conductivity; and U and θ are the amplitude and phase angle of voltage.
(2) The second objective function aims to minimize the total amount of compensation for the installed compensating devices in the power system; the expression is as follows: where α i is the power factor correction coefficient for the annual reactive power consumption of node i; N c is the selected number of compensation nodes; Q Ci is the compensation amount under node i; and β is the cost factor of network loss with power generation.
(3) The third objective function is to minimize the total sum of nodal voltage deviations in the power system; the expression is as follows: where N is the total number of nodes; U N is the rated voltage; ∆U ij is the longitudinal component of voltage drop; and δU ij is the lateral component of voltage drop.The penalty functions are incorporated into the establishment of the MORPO model, transforming the multi-objective problem into a single-objective one, ensuring a more accurate optimization of the model.The explanation of a penalty function is as follows.When all inequality constraints are satisfied, the penalty term equals zero.However, as soon as any inequality constraint is not satisfied, the corresponding penalty term is generated, and the larger the deviation, the greater the value of the penalty term.This effectively increases the objective function, serving as a punishment for not meeting the constraints.When the penalty factor is sufficiently large, the optimization process can only minimize the penalty function by gradually approaching zero.This compels the previously violated variables or functions to converge or return within the specified limits of their constraints.Utilizing mathematical models that integrate systemic economic benefits and security, we can formulate a precise expression: where the second item pertains to the penalty for excessive voltage at the PQ node; the third item pertains to the penalties for exceeding the limits of reactive power compensation; m is the set of nodes for all generators in this system; δ V is the penalty factor for PQ node voltage violation; ∆V i is the deviation of the voltage at the i node; Q Gi is compensation amount under node i; and δ Q is the penalty factor for overcompensation of reactive power.The specified conditions for punitive measures are as follows: where V imax and V imin are the upper and lower bounds of nodal voltage; and Q Gimax and Q Gimin are the upper and lower reactive power compensation capacity.

Constraint Condition
(1) Equality constraint condition The formulation of equation constraints is intended to ensure the conservation of active and reactive power within the system.To ensure the secure and stable operation of the power system, certain measures must be implemented.The equation of constraint is as follows: where P and Q are active power and reactive power; δ is the phase angle difference; P Gi and Q Gi are the active power output and reactive power output of the generator node; and P Li and Q Li are the active load, reactive load, and reactive compensation capacity of nodes.
(2) Inequality constraint condition In the process of optimization and adjustment, the voltage at the generator's nodes V G , the compensating capacity of the parallel capacitors Q C , and the tap changer T of the transformer are regarded as control variables, while the reactive power output of the node voltage is judged as the changeable state.
The inequality constraints for controlling variables are as follows: The inequality constraint conditions of the state variables are as follows: where V G is the voltage at the terminals of the generator and V Gmin , V Gmax are the corresponding upper and lower thresholds; T, T min , and T max are the relative positioning and upper/lower limit values of the tap changer systems in the transformers; Q G is the reactive power output of a generator and Q Gmin , Q Gmax are the upper and lower limits; and Q C is the voltage at the node and Q Cmin , Q Cmax are the corresponding upper and lower limits.

Sparrow Search Algorithm
The SSA is an intelligent algorithm inspired by the hunting behavior of sparrows.It possesses excellent capabilities for local exploration and global optimization.The process of sparrow predation can be divided into two primary roles: the discoverer and the follower.The discoverer, characterized by a higher energy level, provides the direction to the food source for the population.The remaining individuals serve as followers who trail the discoverer in search of food, and they may even become involved in disputes over resources.Moreover, a certain proportion of sparrows possess the ability of vigilant surveillance, allowing them to evade potential predators.
The discoverer undertakes the task of foraging for sustenance and guiding the collective migration of the entire population.Therefore, the discoverer may explore sustenance in a more extensive realm than the one inhabited by the joiner.The formula for updating the position of the discoverer is as follows: where X t i,j is the i-th individual in the j-th dimension value following t iterations; R 2 is the early warning value; α represents random numbers, α ∈ (0,1]; ST is the safety threshold, ST ∈ (0.5,1]; Q represents random numbers obeying the normal distribution; and L is a matrix consisting of elements that are all 1.
If R 2 < ST, this means the absence of predators, prompting the observer to engage in an extensive exploration mode.Otherwise, if R 2 ≥ ST, all the sparrows must expeditiously migrate to alternative safe havens upon the discovery of predators in their vicinity.
Once the sparrows perceive that the discoverer has identified a region with splendid nourishment, they will relinquish their current location and migrate to the discoverer's position to contend for the food resources.In the event of their successful occupation of the designated vantage point, the discoverer shall be rewarded with nourishment.Otherwise, they shall persist in adhering to the established regulations.The formula for the position of the follower update is as follows: where X P is the optimal position occupied by the discoverer, and X worst is the current worst-case global position.
According to the aforementioned formula, the mathematical model can be expressed as follows: where X best is the current global optimal position; β represents the step size control parameters, conforming to a Gaussian distribution of random numbers with a mean of 1 and a variance of 1; f i is the present fitness value of the sparrows; f g is the current global best fitness value; f w is the present minimum fitness value in the global range; and ε is the minimum constant selected to avoid errors in the division by zero.

Particle Swarm Optimization
PSO is an algorithm of collective intelligence, conceived in the spirit of bird foraging behavior.This algorithm solves optimization problems by emulating the foraging behavior of avian species traversing multidimensional search spaces.In the PSO algorithm, the solution to a problem is represented as the position of a particle, with each particle representing a candidate solution in the problem space.The Formulas ( 14) and ( 15) express the updates for velocity and position in the PSO algorithm, respectively.
where v t i is the velocities of the i-th particle at the t and t + 1 iterations; c 1 and c 2 are acceleration factors; p best and g best are the local and global optimal positions of particles; rand 1 and rand 2 are random numbers ranging from 0 to 1; and ω is the inertia weight.
The advantages of the PSO algorithm include ease of implementation, obviating the need to calculate gradient information, applicability to both continuous and discrete optimization problems, etc.However, the PSO algorithm has some certain drawbacks, such as its susceptibility to becoming trapped within local optima, its sensitivity to problem initialization, etc.

Sparrow Search Algorithm-Particle Swarm Optimization
In order to tackle the problem of limited local search capacity and insufficient search accuracy in PSO, the SSA is introduced.To tackle the problems of search stagnation and the challenge of breaking free from a limited search space, a subgroup of the PSO population known as sparrows is incorporated, which are further classified into discoverers, trackers, and sentinels.
The formula is then updated as follows: where ω is the weight coefficient, with an initial value of 0.5; c 1 and c 2 are the pursuit of knowledge, with an initial value of 0.1 and 0.5; p id is the individual optimal position; p gd is the global optimal position; and r 1 and r 2 are random numbers.
The formula for updating the position of each discoverer is defined as follows: where X t i,j is the coordinate information of sparrow i in dimension j in the t-th generation, where j = 2; α is a random number; A is an alert value, A ∈ [0,1]; T s is the safety threshold, T s ∈ [0.5, 0.7]; and Q represents random numbers obeying the normal distribution.
When A < T s , it indicates the absence of danger nearly, and the discoverer at this moment may engage in a search within a broader spatial range.When A ≥ T s , the observer perceives danger, and some sparrows follow the discoverer's actions as a follower.However, upon the discovery of food, these followers will approach and contend with the finder for sustenance.A small portion of the followers, due to insufficiency of sustenance, will fly to other areas to search for food, replenishing the necessary sustenance.The formula for updating is defined as follows: where N is the population, N = 100; xb t i,j is the best currently discovered food source; and xω t i,j is the worst current global food source.
The formula for updating the position of the observer is as follows: where xb t i,j is the optimal food source discovered by the population of sparrows; β is the step size adjustment factor; ε is a minuscule constant; K is a random number, K ∈ [−1, 1]; f i is the present fitness value; and f g is the current global best fitness value.
The weighting factor adopts a sinusoidal variation; the weight factor of the algorithm is represented by the following equation: where ω max = 1, ω min = 0.5; k represents iterations; k max is the maximum number of iterations; and ω(k) is the inertia weight factor for the k-th iteration.
The flowchart of the SSA-PSO algorithm is shown in Figure 1 as follows.

The Improved SSA-PSO Algorithm
The SSA-PSO algorithm combines the advantages of both the SSA and the PSO algorithm, significantly improving the algorithm's optimization accuracy and efficiency.However, The SSA-PSO algorithm still possesses untapped potential for optimization.Therefore, this paper undertakes further optimization based on SSA-PSO: the first improvement is the introduction of a chaotic mapping mechanism to enhance the diversity of the population during initialization, and the second is the introduction of a three-stage differential evolution mechanism to improve the global exploration capability of the algorithm.
Tent chaotic map A tent chaotic map is a piecewise linear one-dimensional map.Compared to the logistic function, it exhibits a uniform power spectral density, probability density, and ideal correlation characteristics, along with a faster iteration rate.The mathematical expression is as follows: When a ≤ 1, the tent chaotic map is in a stable state; when 1 < a < 2, the tent chaotic map is in a state of chaotic dynamics; when a = 2, the tent chaotic map is the core of tent mapping.The mathematical expression is as follows: The tent chaotic map exhibits remarkable traversability, and the computation processing is suitable for a large magnitude of data sequences.However, the mapping of the tent function suffers from the drawback of having a small unstable period.Therefore, the following enhancements for the tent mapping are proposed.
The three-stage differential evolution mechanism (TSDE)

The Improved SSA-PSO Algorithm
The SSA-PSO algorithm combines the advantages of both the SSA and the PSO algorithm, significantly improving the algorithm's optimization accuracy and efficiency.However, The SSA-PSO algorithm still possesses untapped potential for optimization.Therefore, this paper undertakes further optimization based on SSA-PSO: the first improvement is the introduction of a chaotic mapping mechanism to enhance the diversity of the population during initialization, and the second is the introduction of a three-stage differential evolution mechanism to improve the global exploration capability of the algorithm.

Tent chaotic map
A tent chaotic map is a piecewise linear one-dimensional map.Compared to the logistic function, it exhibits a uniform power spectral density, probability density, and ideal correlation characteristics, along with a faster iteration rate.The mathematical expression is as follows: When a ≤ 1, the tent chaotic map is in a stable state; when 1 < a < 2, the tent chaotic map is in a state of chaotic dynamics; when a = 2, the tent chaotic map is the core of tent mapping.The mathematical expression is as follows: The tent chaotic map exhibits remarkable traversability, and the computation processing is suitable for a large magnitude of data sequences.However, the mapping of the tent function suffers from the drawback of having a small unstable period.Therefore, the following enhancements for the tent mapping are proposed.
The three-stage differential evolution mechanism (TSDE) The TSDE is an evolutionary algorithm commonly used for solving optimization problems.It is an enhanced version of the differential evolution (DE) algorithm.The essence of TSDE lies in iteratively optimizing individuals to seek the optimal solution.In each generation, superior individuals are chosen and preserved by comparing the fitness of the parent population with that of the offspring population.Simultaneously, less adaptive individuals are replaced by newly generated individuals.For individuals with lower fitness, improvement can be achieved by adopting superior mutation and crossover strategies.Compared to traditional DE algorithms, TSDE incorporates a design consisting of three stages, which enhances the stability and convergence of the algorithm.Additionally, TSDE can be customized by employing different mutation and crossover operations tailored to the characteristics of specific problems.This adaptability and flexibility enable TSDE to effectively tackle diverse optimization problems.The three stages of TSDE are as follows: Initialization phase: During this stage, the population needs to be initialized by generating a set of candidate solutions.Common methods for initialization include random generation, uniform distribution, or specific initialization based on the characteristics of the problem.The expression in the initialization phase is as follows: where C represents consumer factors with Levy flight characteristics.
where N (0, 1) is the probability density function of a normal distribution with mean 0 and standard deviation 1; and v 1 and v 2 are the standard normal distribution.Mutation and crossover phase: During this phase, new individuals are generated by selecting parent individuals and performing mutation and crossover operations.Specifically, the mutation operation introduces small perturbations to the parent individuals to obtain new individuals, while the crossover operation combines the new individuals with the original individuals to produce offspring individuals.The expressions for the mutation and crossover phase are as follows: where x j (t) is the optimal individual from the t-th iteration.Selection phase: During this phase, individuals with higher fitness from both the parent and offspring populations are chosen as parents for the next generation based on a predetermined strategy.The expression for the selection phase is as follows: where r 2 is a random number, The flowchart depicting the process of the ISSA-PSO algorithm is illustrated in Figure 2.  (2) Test function In order to verify the performance of the algorithm, this paper selects four standard test functions for calculation, which are shown in Table 1.

Function Test and Result Analysis
In order to verify the speed information of the algorithm, the iterative speed of the proposed ISSA-PSO algorithm is compared with that of the SSA, SSA-PSO, GWO, WOA, and SCA on four test functions, as shown in Figures 3-6.From the illustration, it can be observed that ISSA-PSO exhibits remarkable performance advantages for unimodal test functions.Therefore, the ISSA-PSO algorithm consistently exhibits the fastest iteration speed when convergence reaches the optimal value.

Function Test and Result Analysis
(1) Parameter setting This section uses the Matlab 2019b platform to verify and analyze the computational performance of the ISSA-PSO algorithm to test functions.All the comparison algorithms are set to a population of 30, with 200 iteration times.
(2) Test function In order to verify the performance of the algorithm, this paper selects four standard test functions for calculation, which are shown in Table 1.To further validate the speed information of the algorithm, the iterative speed of the proposed ISSA-PSO algorithm is compared with that of the SSA, SSA-PSO, GWO, WOA, and SCA on four test functions, as shown in Figures 3-6.From the illustration, it can be observed that ISSA-PSO exhibits remarkable performance advantages for unimodal test functions.Therefore, the ISSA-PSO algorithm consistently exhibits the fastest iteration speed when convergence reaches the optimal value.

Functions
Dimension Range Optimum

Simulation Results
In order to assess the effectiveness of the improved algorithm in terms of optimi tion performance, the paper utilizes the IEEE 33-node system and the practical 22-no system for verification.Firstly, the pre-optimized data of each node are obtained by lizing power flow calculation in the node system.Subsequently, optimization is carr out using the SSA, SSA-PSO, and ISSA-PSO algorithms, respectively.The suitable react power compensation devices are selected for the node system applying the above th algorithms.Finally, to further validate the feasibility of the proposed method, the netw losses and node voltage are ultimately compared using the SSA, SSA-PSO, and ISSA-P algorithms.

IEEE 33-Node System Simulation Results
The IEEE 33-node system, as depicted in Figure 7, consists of 32 branches and nodes.The five contact switch branches are, respectively, labeled as follows: 8-21, 9-12-22, 18-33, and 25-29.Node 1 is the equilibrium node, while the remaining 32 no are load nodes.The three-phase reference power value is 10 MVA, the reference voltag 12.66 kV, and the total load in the nodal system is 3415 + j2300 kVA.

Simulation Results
In order to assess the effectiveness of the improved algorithm in terms of optimization performance, the paper utilizes the IEEE 33-node system and the practical 22-node system for verification.Firstly, the pre-optimized data of each node are obtained by utilizing power flow calculation in the node system.Subsequently, optimization is carried out using the SSA, SSA-PSO, and ISSA-PSO algorithms, respectively.The suitable reactive power compensation devices are selected for the node system applying the above three algorithms.Finally, to further validate the feasibility of the proposed method, the network losses and node voltage are ultimately compared using the SSA, SSA-PSO, and ISSA-PSO algorithms.

IEEE 33-Node System Simulation Results
The IEEE 33-node system, as depicted in Figure 7, consists of 32 branches and 33 nodes.The five contact switch branches are, respectively, labeled as follows: 8-21, 9-15, 12-22, 18-33, and 25-29.Node 1 is the equilibrium node, while the remaining 32 nodes are load nodes.The three-phase reference power value is 10 MVA, the reference voltage is 12.66 kV, and the total load in the nodal system is 3415 + j2300 kVA.

Simulation Results
In order to assess the effectiveness of the improved algorithm in terms of optimization performance, the paper utilizes the IEEE 33-node system and the practical 22-node system for verification.Firstly, the pre-optimized data of each node are obtained by utilizing power flow calculation in the node system.Subsequently, optimization is carried out using the SSA, SSA-PSO, and ISSA-PSO algorithms, respectively.The suitable reactive power compensation devices are selected for the node system applying the above three algorithms.Finally, to further validate the feasibility of the proposed method, the network losses and node voltage are ultimately compared using the SSA, SSA-PSO, and ISSA-PSO algorithms.

IEEE 33-Node System Simulation Results
The IEEE 33-node system, as depicted in Figure 7, consists of 32 branches and 33 nodes.The five contact switch branches are, respectively, labeled as follows: 8-21, 9-15, 12-22, 18-33, and 25-29.Node 1 is the equilibrium node, while the remaining 32 nodes are load nodes.The three-phase reference power value is 10 MVA, the reference voltage is 12.66 kV, and the total load in the nodal system is 3415 + j2300 kVA.This paper aims to compensate for reactive power at appropriate nodes in the system, taking into account the loads and voltages on each line as depicted in the diagram.The impedance data for the branches are assumed to be nominal.This paper employs the Newton-Raphson method to perform power flow calculations on a nodal system.Once the power flow calculation is completed, the voltage values corresponding to each node can be obtained prior to optimization, as shown in Table 2. From Table 2, it is evident that the minimum amplitude manifests at node 18, with a voltage of 0.9131 p.u., while the maximum amplitude manifests at node 2, with a voltage of 0.9970 p.u.The voltage value at the last node in the system is 0.9166 p.u., and the average voltage for the entire system is 0.949 p.u.By analyzing load flow calculations on the standard IEEE 33-node system, there are certain issues pertaining to the overall voltage levels throughout the entire network.The voltage levels fall short of the desired ideals, thereby requiring appropriate compensation measures to enhance the active power within the power system.
The paper adopts the SSA, SSA-PSO algorithm, and ISSA-PSO algorithm to optimize the MORPO model, selecting an initial population size of 30 (the population size of producers accounts for 30 percent of the total population size) and a maximum iteration count of 100; the learning factor is c1 = 2 and c2 = 2, and the inertia weight is ω = 0.9.The results are shown in Figures 8-10.Figures 8-10 illustrate the three-dimensional data optimized by the algorithm proposed in this manuscript for three different objective functions, wherein the x-axis in the graph represents the total active power loss of the optimized nodes, while the y-axis represents the total capacity of the optimized capacitor banks at each node.The z-axis represents the total voltage deviation of the optimized nodes.However, despite the ability of      Figures 8-10 illustrate the three-dimensional data optimized by the algorithm proposed in this manuscript for three different objective functions, wherein the x-axis in the graph represents the total active power loss of the optimized nodes, while the y-axis represents the total capacity of the optimized capacitor banks at each node.The z-axis represents the total voltage deviation of the optimized nodes.However, despite the ability of threedimensional images to fully showcase optimized data, the contrast effect is not particularly prominent.The following sections will individually apply the SSA, the SSA-PSO algorithm, and the ISSA-PSO algorithm to objective functions in detail to validate the effectiveness of the proposed method in this article.
To determine the appropriate compensation nodes and capacities, a parallel capacitor bank is used to switch and compensate for the power at six nodes.The step size for compensation power is 50 kvar.These six nodes are designated as Table 3 provides the results of the placement and quantity of compensating capacitors based on the SSA, SSA-PSO, and ISSA-PSO algorithms.Among the selected six nodes, the effect of reactive power compensation on the IEEE 33-node system is found to be the most optimal using ISSA-PSO algorithms.And it can be seen that the ISSA-PAO-calculated compensation capacity is the lowest, which can significantly reduce the system cost in practical applications.In the process of RPO, the magnitude of network loss is a crucial indicator to measure the success of reactive power optimization.To confirm the effectiveness of the method proposed in this paper, the optimization of the objective function using the SSA, SSA-PSO, and ISSA-PSO algorithms is compared.The comparison graph of network loss optimization for the IEEE 33-node system is depicted in Figure 11.Table 4  Among the selected six nodes, the effect of reactive power compensation on the IEEE 33-node system is found to be the most optimal using ISSA-PSO algorithms.And it can be seen that the ISSA-PAO-calculated compensation capacity is the lowest, which can significantly reduce the system cost in practical applications.In the process of RPO, the magnitude of network loss is a crucial indicator to measure the success of reactive power optimization.To confirm the effectiveness of the method proposed in this paper, the optimization of the objective function using the SSA, SSA-PSO, and ISSA-PSO algorithms is compared.The comparison graph of network loss optimization for the IEEE 33-node system is depicted in Figure 11.Table 4 presents the optimized results of the total network loss.From Figure 11, it can be seen that although all three optimization techniques demonstrate favorable effects on network loss reduction, the proposed ISSA-PSO algorithm exhibits the most remarkable reduction.Notably, cables 2, 5, and 27 present significant decreases in network loss, thereby showcasing the excellent optimization efficacy of the ISSA-PSO algorithm.Furthermore, it is evident from Table 4 that the ISSA-PSO method achieves lower network losses compared to the other two methods.Moreover, as indicated by the findings in reference [30], an enhanced PSO algorithm is able to reduce network losses by approximately 11%.In contrast, the implementation of the proposed optimization method in this paper results in a decrease of approximately 33% in network losses, showcasing a significantly superior optimization effect compared with reference [30].Therefore, the proposed approach demonstrates an excellent reactive power optimization capability.
In the process of RPO, another objective function to gauge the effectiveness of the optimization is the magnitude of node voltages.The comparative diagram of voltage for each node in the optimized system is illustrated in Figure 12.
As depicted in Figure 12, the minimum bus voltage in the absence of RPO stands at 0.9131 p.u. (located at node 18); nevertheless, it elevates to 0.9644 p.u. after employing the methods elucidated in this passage for optimization.Aside from node 18, it is apparent from the graph that other nodes in the system have shown favorable optimization effects.To facilitate a more intuitive and comprehensive comparison between the voltages before and after optimization, the average voltage of all nodes in the overall node line is calculated.The calculated results indicate that the average node voltages after optimization are 0.9658, 0.9655, and 0.9748 utilizing the SSA, SSA-PSO, and ISSA-PSO algorithms, respectively.Moreover, the proposed approach in this paper yields the best optimization effect, with an average node voltage increase of 2.7% after optimization.Hence, the utilization of the ISSA-PSO algorithm for RPO in the standard IEEE 33-node distribution network has yielded better outcomes compared with the other two methods.
ISSA-PSO algorithm.Furthermore, it is evident from Table 4 that the ISSA-PSO method achieves lower network losses compared to the other two methods.Moreover, as indicated by the findings in reference [30], an enhanced PSO algorithm is able to reduce network losses by approximately 11%.In contrast, the implementation of the proposed optimization method in this paper results in a decrease of approximately 33% in network losses, showcasing a significantly superior optimization effect compared with reference [30].Therefore, the proposed approach demonstrates an excellent reactive power optimization capability.
In the process of RPO, another objective function to gauge the effectiveness of the optimization is the magnitude of node voltages.The comparative diagram of voltage for each node in the optimized system is illustrated in Figure 12.As depicted in Figure 12, the minimum bus voltage in the absence of RPO stands at 0.9131 p.u. (located at node 18); nevertheless, it elevates to 0.9644 p.u. after employing the methods elucidated in this passage for optimization.Aside from node 18, it is apparent from the graph that other nodes in the system have shown favorable optimization effects.To facilitate a more intuitive and comprehensive comparison between the voltages before and after optimization, the average voltage of all nodes in the overall node line is calculated.The calculated results indicate that the average node voltages after optimization are 0.9658, 0.9655, and 0.9748 utilizing the SSA, SSA-PSO, and ISSA-PSO algorithms, respectively.Moreover, the proposed approach in this paper yields the best optimization effect, with an average node voltage increase of 2.7% after optimization.Hence, the utilization of the ISSA-PSO algorithm for RPO in the standard IEEE 33-node distribution network has yielded better outcomes compared with the other two methods.

The Practical 22 Node System Simulation Results
In order to further validate the effectiveness of the proposed method in a comprehensive system, the practical 22-node system has been selected for evaluation.The practical 22-node system represented a small portion of an agricultural distribution network within the Eastern Power Distribution system in India, wherein the base voltage stands at 11 kV [38].The total reactive power load in the system is 657.4 kvar, and active power loss without compensation is 17.69 kW.Among these nodes, node 1 serves as the equilibrium point, while the remaining 21 nodes represent the load nodes.The three-phase reference power

The Practical 22 Node System Simulation Results
In order to further validate the effectiveness of the proposed method in a comprehensive system, the practical 22-node system has been selected for evaluation.The practical 22-node system represented a small portion of an agricultural distribution network within the Eastern Power Distribution system in India, wherein the base voltage stands at 11 kV [38].The total reactive power load in the system is 657.4 kvar, and active power loss without compensation is 17.69 kW.Among these nodes, node 1 serves as the equilibrium point, while the remaining 21 nodes represent the load nodes.The three-phase reference power value is set at 10 MVA, and the reference voltage at the primary end of the power network is 12.66 kV.Furthermore, the total load within the node system amounts to 662.31 + j657.40 kVA.The practical 22-node system is depicted in Figure 13.value is set at 10 MVA, and the reference voltage at the primary end of the power network is 12.66 kV.Furthermore, the total load within the node system amounts to 662.31 + j657.40 kVA.The practical 22-node system is depicted in Figure 13.where: node 1 is the equilibrium node Similar to the IEEE 33-node system, the system is compensated with reactive power compensation devices at the appropriate nodes, taking into account the loads and voltage conditions along each line depicted in the diagram.The average voltage is taken as per unit value.The voltage values corresponding to each individual node are shown in Table 5 before optimization.Similar to the IEEE 33-node system, the system is compensated with reactive power compensation devices at the appropriate nodes, taking into account the loads and voltage conditions along each line depicted in the diagram.The average voltage is taken as per unit value.The voltage values corresponding to each individual node are shown in Table 5 before optimization.Analyzing the results presented in Table 5, it becomes evident that the voltage levels within the practical 22-node system are suboptimal in nature.The overall active power loss within the system amounts to 17.7 kW, with the lowest magnitude occurring at node 22, where the voltage value stands at 0.9729 p.u.The collective mean voltage of the system amounts to 0.9838 p.u.
The paper adopts the SSA, SSA-PSO algorithm, and ISSA-PSO algorithm to optimize the MORPO model.The results are shown in Figures 14-16.In Figures 14-16, the system is analogous to the practical 22-node system: the x, y, and z axes represent the total active power loss of the optimized nodes, the total capacity In Figures 14-16, the system is analogous to the practical 22-node system: the x, y, and z axes represent the total active power loss of the optimized nodes, the total capacity of the optimized capacitor banks at each node, and the total voltage deviation of the optimized nodes.Due to the inability to showcase specific optimization effects in Figures 14-16, the following sections will compare the results obtained after optimizing the objective function using the SSA, the SSA-PSO algorithm, and the ISSA-PSO algorithm.
Similar to the IEEE 33-node system, the step size for compensation power is 50 kvar.These six nodes are designated as Q 1 , Q 2 , Q 3 , . .., Q 6 .Table 6 showcases the placement and quantity of compensating capacitors in various scenarios.Among the selected six nodes, the effect of reactive power compensation for the practical 22-node system is found to be the most optimal by applying the ISSA-PSO algorithm.Moreover, the results of the compensation capacity using the ISSA-PSO algorithm are still the lowest in the case of the practical 22-node system, resulting in a significant reduction in system cost in practical applications.The comparison graph of network loss optimization for the practical 22-node system is depicted in Figure 17.Table 7 shows the optimization results of total network loss.
As can be seen from Figure 17, although all three optimization techniques show favorable effects on network loss reduction, the proposed ISSA-PSO algorithm shows the most significant reduction.It is worth noting that cables 3, 5, 10, and 12 show a significant reduction in network loss, thus demonstrating the excellent optimization efficiency of the ISSA-PSO algorithm.Furthermore, Table 7 shows the optimization results of total network loss after applying the SSA, SSA-PSO, and ISSA-PSO algorithms in an actual 22-bus system.From Table 7, it is evident that the network loss is 17.7 kW before optimization.After applying the SSA, SSA-PSO, and ISSA-PSO algorithms, a noticeable decrease in power loss can be observed.Importantly, the ISSA-PSO algorithm demonstrates the most significant reduction, with an impressive decline of 44.07%.The effectiveness of this approach surpasses that of other algorithms, demonstrating  Among the selected six nodes, the effect of reactive power compensation for the practical 22-node system is found to be the most optimal by applying the ISSA-PSO algorithm.Moreover, the results of the compensation capacity using the ISSA-PSO algorithm are still the lowest in the case of the practical 22-node system, resulting in a significant reduction in system cost in practical applications.The comparison graph of network loss optimization for the practical 22-node system is depicted in Figure 17.Table 7 shows the optimization results of total network loss.As can be seen from Figure 17, although all three optimization techniques show favorable effects on network loss reduction, the proposed ISSA-PSO algorithm shows the  reduction in network loss, thus demonstrating the excellent optimization efficiency of the ISSA-PSO algorithm.Furthermore, Table 7 shows the optimization results of total network loss after applying the SSA, SSA-PSO, and ISSA-PSO algorithms in an actual 22-bus system.From Table 7, it is evident that the network loss is 17.7 kW before optimization.After applying the SSA, SSA-PSO, and ISSA-PSO algorithms, a noticeable decrease in power loss can be observed.Importantly, the ISSA-PSO algorithm demonstrates the most significant reduction, with an impressive decline of 44.07%.The effectiveness of this approach surpasses that of other algorithms, demonstrating better optimization results.The comparative diagram of voltage for each node in the optimized system is illustrated in Figure 18.As depicted in Figure 18, the minimum bus voltage in the absence of RPO stands at 0.9729 p.u. (located at node 22).Nevertheless, it elevates to 0.9879 p.u., corresponding to the implementation of the proposed resolution.Aside from node 22, it is apparent from the graph that other nodes in the system have shown favorable optimization effects.To facilitate a more intuitive and comprehensive comparison between the voltages before and after optimization, the average voltage of all nodes in the overall node line is calculated.The calculated results indicate that the average node voltages after optimization are 0.9882, 0.9882, and 0.9921 when employing SSA, SSA-PSO, and ISSA-PSO, respectively.Furthermore, the proposed approach in this paper yields the best optimization effect, with an average node voltage increase of 0.84% after optimization.Therefore, the ISSA-PSO algorithm has better optimization outcomes in the practical 22-node system.
It is should be noted that the simulation verification in this article is carried out within the scope of conventional power distribution grids, assuming only sinusoidal quantities for voltage and current waveforms.However, in the actual power grid, the voltage and current waveforms are often influenced by various power quality disturbances, leading to nonsinusoidal waveforms in the actual power grid.These power quality disturbances in- As depicted in Figure 18, the minimum bus voltage in the absence of RPO stands at 0.9729 p.u. (located at node 22).Nevertheless, it elevates to 0.9879 p.u., corresponding to the implementation of the proposed resolution.Aside from node 22, it is apparent from the graph that other nodes in the system have shown favorable optimization effects.To facilitate a more intuitive and comprehensive comparison between the voltages before and after optimization, the average voltage of all nodes in the overall node line is calculated.The calculated results indicate that the average node voltages after optimization are 0.9882, 0.9882, and 0.9921 when employing SSA, SSA-PSO, and ISSA-PSO, respectively.Furthermore, the proposed approach in this paper yields the best optimization effect, with an average node voltage increase of 0.84% after optimization.Therefore, the ISSA-PSO algorithm has better optimization outcomes in the practical 22-node system.
It should be noted that the simulation verification in this article is carried out within the scope of conventional power distribution grids, assuming only sinusoidal quantities for voltage and current waveforms.However, in the actual power grid, the voltage and current waveforms are often influenced by various power quality disturbances, leading to nonsinusoidal waveforms in the actual power grid.These power quality disturbances include, but are not confined to, higher-order harmonics, subharmonics, and harmonic distortions, among others, that can influence the standard functioning of the electricity network and the efficiency of machinery [39][40][41].Therefore, the upcoming research will focus on the implications of harmonic distortion and voltage distortion issues on the power grid.

Conclusions
This paper establishes the MORPO model in the distribution network including reactive power loss, reactive power devices, and the total sum of node voltage deviations.Based on the SSA and PSO algorithm, the ISSA-PSO algorithm is proposed for converging to a global optimal solution effectively.Compared with the SSA and SSA-PSO, the proposed model has exhibited promising results in the IEEE 33-node system and the practical 22-node system.The simulation results show that the total network losses of the IEEE 33-node system decreased from 202.7 kW to 136.4 kW, representing a reduction of 32.71%.In terms of node voltage, the average voltage magnitude of the lines increases from 0.9485 p.u. to 0.9748 p.u.Similarly, the total network losses of the practical 22-node system decreased from 17.7 kW to 9.9 kW, resulting in a reduction of 44.07%.Regarding node voltage, the average voltage magnitude of the lines increases from 0.9838 p.u. to 0.9921 p.u.Therefore, the proposed algorithm can effectively improve optimization performance by reducing active power loss and enhancing voltage levels simultaneously.However, the simulation verification in this study is conducted within conventional power systems without taking into account the voltage nonliterary issues that arise from the integration of distributed energy resources into the grid.Our future research will primarily focus on investigating the effects of harmonic distortion and voltage imbalance in distribution networks on reactive power optimization.

( 1 )
Parameter setting This section uses the Matlab 2019b platform to verify and analyze the computational performance of the ISSA-PSO algorithm to test functions.All the comparison algorithms are set to a population of 30, with 200 iteration times.

Figure 8 .
Figure 8. Optimized results based on SSA.Figure 8. Optimized results based on SSA.

Figure 8 .
Figure 8. Optimized results based on SSA.Figure 8. Optimized results based on SSA.

Figure 8 .
Figure 8. Optimized results based on SSA.

Figure 8 .
Figure 8. Optimized results based on SSA.

Figures 8 -
Figures 8-10 illustrate the three-dimensional data optimized by the algorithm proposed in this manuscript for three different objective functions, wherein the x-axis in the graph represents the total active power loss of the optimized nodes, while the y-axis represents the total capacity of the optimized capacitor banks at each node.The z-axis represents the total voltage deviation of the optimized nodes.However, despite the ability of

Figure 11 .
Figure 11.Comparison chart of network loss optimization in IEEE 33-node system.

Figure 12 .
Figure 12.Comparison chart of node voltages in IEEE 33-node system.

Figure 12 .
Figure 12.Comparison chart of node voltages in IEEE 33-node system.

Figure 13 .
Figure 13.The diagram of the practical 22-node system.

Figure 13 .
Figure 13.The diagram of the practical 22-node system.

Figure 15 .
Figure 15.Optimized results based on SSA-PSO algorithm.Figure 15.Optimized results based on SSA-PSO algorithm.

Figure 15 .
Figure 15.Optimized results based on SSA-PSO algorithm.Figure 15.Optimized results based on SSA-PSO algorithm.
results.The comparative diagram of voltage for each node in the optimized system is illustrated in Figure18.

Figure 17 .
Figure 17.Comparison chart of system loss optimization in the practical 22-node system.

Figure 17 .
Figure 17.Comparison chart of system loss optimization in the practical 22-node system.

Figure 18 .
Figure 18.Comparison chart of node voltages in the practical 22-node system.

Figure 18 .
Figure 18.Comparison chart of node voltages in the practical 22-node system.

Table 2 .
Voltage of each node in the IEEE 33-node system before optimization.

Table 3 .
The quantity of compensating capacitors for different optimization algorithms.
presents the optimized results of the total network loss.

Table 4 .
Total network loss optimization results.
Figure 11.Comparison chart of network loss optimization in IEEE 33-node system.

Table 4 .
Total network loss optimization results.

Table 5 .
Voltage of each node in the practical 22-node system before optimization.

Table 5 .
Voltage of each node in the practical 22-node system before optimization.

Table 6 .
The quantity of compensating capacitors for different optimization algorithms.

Table 7 .
Total network loss optimization results.

Table 7 .
Total network loss optimization results.