Intelligent Integrated Approach for Voltage Balancing Using Particle Swarm Optimization and Predictive Models

,


Introduction
Electrical power systems normally operate under balance conditions and regular three-phase voltages.In some circumstances, unbalance conditions infuence the electrical power system and cause unbalance voltages.Tese conditions emerge when the three-phase loads are irregular or because of the asymmetries in the network topology.Te unbalance voltages will inevitably degrade the performance, i.e., quality, of electrical power systems [1][2][3].Additionally, the unbalance voltage conditions cause several system defciencies such as electrical machine overheating, transformer overloading, high losses, and low stability of the power system [4][5][6].Te unbalance three-phase system can be decomposed into positive and negative sequence components.Several defnitions for voltage unbalance are introduced.According to IEEE Std.1159-1195, the voltage unbalance is defned as the ratio between negative and positive sequence voltages [7].
Voltage balancing is critical in three-phase power systems to ensure efcient and reliable operation.Diferent voltage balancing techniques have been proposed to ensure that the voltages in the three phases of the system are equal, leading to better performance, improved energy efciency, and reduced equipment damage [8].Te use of compensators such as static synchronous compensators (STAT-COMs) has shown promising results in voltage balancing in three-phase power systems [9][10][11].In the next section, an overview of recent developments and state-of-the-art techniques for voltage balancing in three-phase power systems will be presented.

Literature Review
Many research works have been proposed to detect and mitigate the voltage unbalance problem.Te research work in [12] introduced the concept of E-STATCOMs, which are static compensator devices that include energy storage systems.Te authors proposed using a supercapacitor energy storage system (SCESS) in conjunction with a STAT-COM for controlling transients in a power system to improve reactive power unbalance following a contingency.Te authors demonstrated that supplementary PI controllers in voltage magnitude and phase angle loops can provide extra damping to the system, leading to very good responses even under severe three-phase fault conditions.In [13], a method for controlling a 3-phase cascaded H-bridge (3ph-CHB) converter with n-levels was proposed to compensate for reactive power and eliminate the harmonic currents generated by nonlinear loads.Te authors introduced a generalized model of the CHB-nL converter that takes into account the efect of the line impedance.Additionally, they proposed an advanced controller that consists of current tracking loop, to ensure that the line current tracks the reference, and outer voltage loops to ensure the regulation and balance of the capacitor voltages involved.A similar article [14] described a control scheme for a STATCOM based on a delta-connected CHB converter.Te authors proposed a new feedforward control method to enhance the dynamic performance of the system.Te aim of this method was to improve the regulation of zero-sequence circulating current in the delta-connected CHB STATCOM, especially during grid faults or load imbalances, without causing excessive fuctuation in the dc cell capacitor voltage.Te proposed method ofered signifcant improvements in the system's dynamic performance.Te authors in [15] also proposed a new technique for voltage regulating and balancing.Te idea was regulating the three cluster voltages of a star-connected CHB STATCOM to diferent values, while maintaining balance in the three-phase modulation voltages.Tis was achieved by decomposing the positive and negative sequence components from the converter voltages to balance the three-phase currents.To ensure the stability of the cluster voltages, the authors extracted the zero-sequence voltage to analyze the active power distribution.Te use of an improved model predictive control (MPC) algorithm was suggested in [16] as a means of controlling STATCOM device performance.Te authors tried to forecast future STATCOM output current needed to manage designated bus line voltages in accordance with neighboring bus line voltage variations to reduce voltage imbalance.Additionally, they established the MPC state space and goal functions based on neighbors' bus voltages, currents, and transmission line characteristics.Accordingly, the proposed method may be used for wide applications in power systems.In [17], a compensator that combines star and delta segments was proposed to eliminate neutral current, balance loads, and improve power factor.Te authors derived a mathematical model based on the load current's phase and sequence components, using symmetrical components theory for load balancing, power factor correction, and neutral current elimination.Tis study presented the mathematical principle for compensating a star-connected load (with neutral) that is supplied by a balanced three-phase four-wire network, using the theory of symmetrical components.Te article [18] suggested a new technique to balance voltages and loads by controlling continuously variable series reactor (CVSR).In more details, by regulating the bias dc circuits of CVSR, the ac reactance was adjusted based on the nonlinear B-H characteristic of the shared ferromagnetic core.Tus, the generated dc bias magnetic fux can then be used to balance the three-phase voltages and reduce the negative impact of any imbalances on the operation and equipment of the distribution system.
Te authors in [19] have proposed an algorithm for voltage unbalance detection based on Clark transformation, which converts the three-phase voltages into complex zplane.Te static volt-ampere-reactor compensative (SVC) has the ability to balance the loads and stabilize the electrical power system [20][21][22].Te authors in [23] used the SVC to balance the load voltages and improve the power factor.Te symmetrical component theory was considered to develop the mathematical model for voltage balancing.In [24], a dynamic voltage restorer technique was used together with proportional-integral (PI) controller and phase-locked loop to correct the voltage on the low voltage side.Te authors in [25] used the SVC to compensate for the unbalanced three-phase four wires load.A combination of SVC and STATCOM was used to balance the threephase load voltages in the electrical power system [14,26].Several factors must be considered, including accuracy and complexity when control strategies are used for voltage balancing [27,28].Also, the time required for algorithm computations must be taken into account.Te authors in [29] used the fuzzy logic technique to train artifcial neural network (ANN) which controls SVC.Te controller needs more than 125 ms to retrieve the voltage balance conditions.Te authors in [30] employed the ANN to retrieve the balance conditions at an average time of 60 ms for the voltage unbalance factor (VUF) range of 3.48%-4.68%.Retrieving the voltage balance conditions quickly is a necessity especially for the systems that contain time-varying loads such as electric arc furnaces.In [31], a reactive power compensator was used for this purpose.PSO algorithm is proposed in [32] to fnd the optimal parameters of the PI controller to retrieve the balance conditions.In [33], genetic algorithm (GA) was used for the same purpose.Te GA required more than 130 ms to retrieve the voltage balance.In [34,35], the PSO was successfully employed in electrical power system applications to retrieve the voltage balance, reduce the voltage sags, and estimate power transformer parameters.In [36], the authors compared between GA and PSO for tuning lead controllers which have three parameters to be optimized.It was concluded that the PSO has a larger mean ftness value along with the generation number compared to GA, especially when the generation continues.In [37], the authors reported some advantages of PSO over other optimization techniques, such as fewer adjustable parameters and more efective memory capability.
In conclusion, the literature review shows that reactive power control using diferent STATCOMs topologies is an efective strategy to retrieve the voltage balance and the stability of electrical power systems.Te majority of the 2 Journal of Electrical and Computer Engineering previously mentioned research works have been focused on controlling the reactive power to retrieve the voltage balance quickly in the three-phase power systems.Tis will protect the electrical equipment from long-term failures.Additionally, this is vital to enhance the system's dynamic response.Several control techniques have been proposed to solve the problem of voltage balancing and achieve the optimal performance of electrical power systems.Machine learning-based techniques have shown promising results and have the potential to further improve the performance of voltage balancing using STATCOMs.So far, the performance of the proposed solutions is still insufcient and requires further enhancements, such as the system response time and the recovered range of VUF.
In this paper, advanced control strategy using predictive models and optimization algorithm is proposed to control a TCR and retrieve the balance conditions in threephase power system.PSO is used in ofine mode to determine the optimum set of TCR fring angles based on the VUF's smallest ftness value.A mathematical model of a three-phase power system is used for this purpose.Te modeled power system comprises a 500 km long transmission line which is divided into three-pi sections to guarantee accurate system response.GPR and SVM models are trained using the optimal fring angles determined by PSO and then used as real-time controllers to recover the voltage balance of the power system.Te suggested control strategy has the ability to restore the voltage balance quickly within 20 ms and can cover a wide range of VUF 3.90-8.42%.
Te paper is organized as follows: Section 3 describes the three-phase reactive power compensation in electrical power systems.Te PSO algorithm and GPR and SVM models are discussed in Section 4. Te mathematical model and the prototype of the electrical power system are given in Section 5. Section 6 presents the results and discussion.Te contribution of this work is provided in Section 7. Finally, the conclusion of this work is given in Section 8.

Three-Phase Reactive Power Compensation
Te main reason for using reactive power compensation in electric power networks is to maintain the stability of the power system at diferent loading conditions [38].Additionally, it afords many advantages to the power system, such as voltage regulation and load balancing [21,39].TCR is commonly used SVC for voltage balancing [40,41].It consists of an inductor connected in series with two antiparallel pair of thyristors.By controlling the thyristor triggering time, the amount of inductive reactance is manipulated to generate the adequate reactive power needed for voltage balancing.
When the three-phase loads become unbalanced (i.e., imbalance of electric power fow in the three-phase load), the compensator has to generate the required reactive power to balance the three-load voltages [42].If the load is Yconnected, the three load voltages can be calculated by using the following equation: where When the three-phase loads become unbalanced, the three-line currents will also become unbalanced and can be substituted by their symmetrical components as given in the following equation: where I → a(L1,L2,L0) , I → b(L1,L2,L0) , and I → c(L1,L2,L0) represent positive, negative, and zero sequence components of unbalanced load currents, respectively.
In equation ( 3), the positive, negative, and zero sequence components are indicated by the subscripts 1, 2, and 0, respectively.Te zero-sequence components have no efect on the system balance because they have equal amplitude with zero phase angles from each other.To preserve the balanced three-phase load voltages, the negative-sequence components of the load currents must be eliminated.Terefore, the reactive power compensator should be used to generate the appropriate three susceptances and absorb the negative-sequence components of the load currents leading to balance load voltages.However, to obtain the adequate value of generated compensator susceptance, the TCR fring angles should be calculated accurately.Consequently, an advanced real-time control using GPR and SVM is proposed in this work to perform the previous duties, i.e., calculate the TCR fring angles and retrieve the balance conditions of the electrical power system.Figure 1 shows the proposed controller that utilizes GPR and SVM algorithms to control the reactive power compensator and retrieve balance conditions.into three stages.In the frst stage, the PSO algorithm is used to determine the optimum set of TCR fring angles, using the steady-state mathematical model of the power system.Tis stage is executed only in ofine mode because using the PSO in online mode will degrade the system's dynamic behavior.Tis is due to the iterative nature of the PSO computation.Terefore, in the proposed integrated approach, the GPR and SVM are used to control the system in online mode.In the second stage, the optimum fring angles calculated from the PSO in the ofine mode are appointed to train the GPR and SVM models.Finally, in the third stage, the GPR and SVM models are used as a real-time controller to restore the voltage balance in online mode.

Particle Swarm Optimization (PSO) Algorithm.
Particle swarm optimization (PSO) was proposed in 1995 by Kennedey and Eberhart.PSO algorithm simulates the swarm behavior in nature.It searches a space of dimension (d) by moving a swarm that consists of n-particles to determine the best solution based on a ftness function.Every particle in the swarm has its own position and velocity [43].
Te algorithm starts searching the space of dimension (d) by initializing a swarm with (n) particles, randomly.Ten, each particle modifes its position according to its ftness and the ftness of the neighborhood particles as well.Te ftness of the particle is evaluated according to the defned cost function to assign the best particle among the current generation which is called the personal best particle (p best ).P best is the local particle in the swarm that has the minimum ftness value within the same position in the swarm [44,45].Te global best particle (g best ) of the smallest ftness is found by comparing the ftness values of all personal best particles.In each iteration, the velocity and position of the particles are updated according to equations ( 4) and (5), respectively [36].PSO algorithm continues searching in the d-dimensional space until one termination condition is achieved.Journal of Electrical and Computer Engineering where w represents inertia factor.c 1 and c 2 represent random integers (between 2 and 4).r 1 and r 2 represent random numbers (between 0 and 1).P best represents personal best particle.V nd represents the velocity of the n th particle in a space of dimension (d).X nd represents n th particle in a space of dimension (d).g best represents global best particle.rand represents random number (0-1).iter represents sequential number of iterations.
One of the most important aspects when utilizing the PSO algorithm is defning an appropriate ftness function to measure the quality of the solutions.In this paper, the proposed ftness function relies on the VUF of the threephase load voltages to get the optimal particle that has the smallest ftness value (i.e., smallest VUF).
Figure 2 shows the fowchart of the frst stage in the proposed approach.In this stage, the PSO algorithm is used with the mathematical model of a 500 km long electrical power system to fnd the TCR optimal fring angles required for voltage balancing.Te PSO particles represent the TCR fring angles, α ab , α bc , and α ca .Te PSO operates when an unbalance load change is detected.Te following steps summarise the frst stage of the proposed integrated approach.
(1) Strat PSO algorithm by generating a random swarm with n-particles and their velocities.In this paper, the particles and their velocities are given by the following equations, respectively: where X n3 represents n th particle in a space of 3dimension (i.e., 3-fring angles of TCR).V n3 represents the velocity of the n th 3-dimension particle.α ab , α bc , and α ca represent the fring angles of TCRs.v 1 , v 2 , and v 3 represent the velocities of the three components of the particle.(2) Evaluate the three-phase load voltages that correspond to each particle using the mathematical model of the 500 km long electrical power system, and then calculate the ftness (J) of each particle using the following equation: where V 1 represents the positive-sequence voltage and V 2 represents the negative-sequence voltage.(3) Find p best according to the minimum value of ftness (at a minimum value of VUF).(4) Compare the ftness values of all personal best particles and assign the one with the smallest ftness as the global best particle (g best ).( 5) Update the velocities and particles using equations ( 4) and ( 5), respectively.(6) Repeat steps 2 to 5 until the ftness of VUF for threephase voltages becomes less than 2%.(7) Apply the best particle which corresponds to the minimum VUF on the TCR compensator.

Gaussian Process Regression and Support Vector Machine.
Te Gaussian processes are probabilistic supervisedmachine learning methods that have been extensively utilized in statistical modeling, regression, and pattern classifcations [46].Te GPR model performs predictions joining prior knowledge and provides uncertainty measures over predictions [47].In other words, GPR is a nonparametric kernel-based probabilistic model with a fnite collection of random variables with a multivariate distribution.Te Gaussian processes have many advantages, such as interpolate observations, adaptive ftting, and kernel versatility.Te key points in the GPR can be summarized as follows: Firstly, the next function is updated with new observations.Secondly, fnite samples of functions are jointly-Gaussian distributed.Finally, the mean function which is calculated by the posterior distribution of possible functions is used for regression predictions.Te regression function modeled by a multivariate Gaussian is given as follows [48]: where Support vector machine is a regression and classifcation tool that uses machine learning theory to increase predictive accuracy and avoid data overftting problems [48].SVM uses the hypothesis space of linear functions in a highdimensional feature space.Additionally, SVM is trained with a learning algorithm from optimization theory that implements a learning bias derived from statistical learning theory [49].Duality, kernels, convexity, and sparseness are the most major features of SVM, it is one of the best approaches for data modeling and combines generalization control as a technique to control dimensionality.It has been proved that the SVM has the upper hand over the neural network (NN) in regression due to many reasons [50].SVM gives higher accuracy in comparison with sophisticated neural networks with elaborated features in regression tasks.Additionally, SVM performs better in terms of not Journal of Electrical and Computer Engineering overgeneralization when the neural networks might end up overgeneralizing easily [49].

The Mathematical Model and the Prototype of Electrical Power System
To test the performance of the proposed integrated approach, an electrical power system with a long transmission line is considered and modeled.Te general mathematical model was derived in [28] and use in this work for a 500 km long transmission line.Tis power system consists of a 15 kV 3-phase generator, a step-up transformer at the generator side, step-down transformers at the load side, a 500 km long transmission line divided into three-pi sections, and delta connected load.Table 1 shows the components specifcations in the modeled power system.Te mathematical model of the power system is generated, built, and simulated using MATLAB SIMULINK.Figure 3 shows the block diagram of the modeled power system with the PSO algorithm.Moreover, an experimental setup of the power system prototype is built to support the simulated results and validate the ability of the proposed integrated approach in retrieving the voltage balance conditions successfully.Te prototype consists of the following equipment: three-phase voltage source of 178 V, the equivalent transmission line divided into 3 π-section networks, three-phase inductive load, and data acquisition (DAQ) device.Te experimental setup is shown in Figure 4.

Results and Discussions
As mentioned in Section 3, the proposed approach is divided into three stages.In stage one, the PSO algorithm is used to determine the optimum set of TCR fring angles in ofine

6
Journal of Electrical and Computer Engineering mode.Tese fring angles are used in stage two to train the GPR and SVM models.In the third stage, the GPR and SVM models are used as real-time controllers to retrieve the voltage balance.Accordingly, in this section, the results and discussions will be introduced for each stage individually.

Te Results and Discussion in Stage
One.Many unbalance cases were created to evaluate the ability of the proposed PSO algorithm for restoring the voltage balance in the load side of the system.Table 2 shows the results for diferent loading conditions covering a wide range VUF.Table 2 includes the VUF values before and after PSO action, the optimal fring angles generated by the PSO algorithm, and the time needed to retrieve the balance conditions measured from the PSO initiating time.As indicated in Table 2, the average value of VUF after activating the PSO is 0.717% which is lower and better than the recommended value (i.e., 3%).Tus, the results prove the capability of the proposed PSO algorithm in recovering the system balance conditions   Journal of Electrical and Computer Engineering and achieving very low VUF values.In addition, it can be noted from Table 2 that the time needed by the PSO to retrieve the system balance conditions in some cases exceeded 30 ms.Tis long delay in the PSO response will degrade the system's dynamic behavior.Consequently, the PSO is used in the ofine mode only.

Te Results and Discussion in Stage Two.
Te optimum set of TCR fring angles generated by the PSO in stage one was used to train GPR and SVM models.Te input data for these models are the three load unbalance voltages and the VUF, while the output data of these models are the three fring angles of the TCR compensator needed for voltage balancing.Te performance of the trained GPR and SVM models is shown in Figures 5 and 6, respectively.Te regression factor (R 2 ), which indicates the model's ability to produce the desired output, is 0.95 and 0.93 for GPR and SVM models, respectively.Te root mean square error (RMSE), which shows the model's ability to track the data points, is 0.084772 and 0.099518 for GPR and SVM, respectively.Te results show that the GPR and SVM models have the ability to track the data points and produce the desired output efciently.However, at this stage, the GPR model introduced a slightly better performance than the SVM.

Te Results and Discussion in Stage
Tree.Several tests were conducted to demonstrate, assess, and validate the feasibility and efectiveness of the proposed integrated approach in restoring the system voltage balance.During these tests, the three loads were changed deliberately and asymmetrically to create a wide range of unbalanced voltages.Te tests were conducted using both the simulation and practical models.
Tree tests were conducted using the simulation and practical models.Te frst and second tests were conducted using the simulation model, while the third test was conducted using the practical model.In the frst test, many unbalance cases were created to test the ability of the GPR and SVM models in recovering the voltage balance for diferent loading conditions covering a wide range of VUF.Tables 3 and 4 show the results of this test when using GPR and SVM models, respectively.Tese tables include the TCR fring angles generated by GPR and SVM models, the VUF values, and the three load voltages before and after the model's action.It can be noted from these tables that the  8 Journal of Electrical and Computer Engineering average value of VUF before the model's actions is 6.002%.As indicated in Table 3, the average value of the VUF is reduced to 0.580% by using the GPR model.While, as indicated in Table 4, the SVM reduced it to 2.041% which is lower and better than the recommended value (i.e., 3%).Tus, the results in Tables 3 and 4 prove the capability of the GPR and SVM models in recovering the system balance conditions efciently and achieving very low VUF values.Additionally, the results revealed that the GPR outperforms the SVM by achieving low VUF values.
In the second test, an unbalance case was created to assess the system time response and demonstrate the threephase load voltages.Te test case scenario is as follows: starting the electrical power system with balanced conditions during the time interval from 0 to 0.1 sec, then making unbalance change in the three-phase loads exactly at 0.1 sec, and fnally initiating the GPR or SVM controller at 0.15 sec.Figures 7 and 8 illustrate the efect of GPR and SVM controllers, respectively, on the three load voltages when the VUF is 6.985%.It is noted that the GPR and SVM controller recovered the balance conditions of the power system accurately within a very narrow time interval.Additionally, Te VUF is reduced from 6.985% to 0.842% and from 6.985% to 1.752% using GPR and SVM, correspondingly.
In the third test, which was conducted using the practical model, another unbalance case was created to validate the simulation results in the second test.Te unbalance change in the three-phase loads is initiated at 0.05 sec, and GPR or SVM controller is activated at 0.1 sec.Figures 9 and 10 illustrate the efect of GPR and SVM controllers, respectively,   on the three load voltages when the VUF is 5.69%.It can be observed from these fgures that the GPR and SVM controllers recovered the balance conditions of the power system accurately within a very narrow time interval.Additionally, Te VUF is reduced from 5.69% to 1.64% and from 5.69% to 2.03% using GPR and SVM, correspondingly.In conclusion, the results from the three tests proved the ability of the proposed integrated approach to balance the three-load voltages quickly and achieving very low VUF values.

Contribution to Knowledge
Table 5 introduces a brief comparison between the state-ofthe-art techniques for voltage balancing in three-phase power systems mentioned in Section 3 and the proposed integrated approach.Accordingly, the contributions of knowledge in this paper are as follows: (1) In the proposed integrated approach, GPR and SVM models are trained using the optimum data set of fring angles generated from the PSO algorithm.
Tese fring angles are required to drive the TCR compensator and restore the voltage balance in the three-phase power system.Tese optimum values enhanced the performance of the trained GPR and SVM models and achieved high R 2 factor and low RMSE.(2) Te proposed integrated approach retrieved the balanced conditions in the electrical power systems successfully by achieving a fast response time of only 20 ms.Indeed, this is the shortest response time among the methods proposed in the literature.Terefore, the proposed approach enhanced the system's dynamic behavior.(3) Te proposed integrated approach can solve the voltage unbalance problem and cover a wide range of VUF between 3.90% and 8.42%.Tis VUF range is wider than the ranges achieved in the literature.(4) Te proposed integrated approach obtained the best performance for a three-phase power system and   [18] published in 2023 Work in [13] published in 2023 Work in [28] published in 2020

Journal of Electrical and Computer Engineering
Work in [33] published in 2020 Work in [30]  algorithm uses the mathematical model of the power system to determine the required set of TCR fring angles.Tus, it is more accurate compared to the ones in [28,30].Additionally, this operation is performed ofine which make the proposed approach faster than the one proposed in [13,18] Controller

. Conclusion
In this paper, an advance integrated approach is proposed to control the reactive power and restore the voltage balance in three-phase power systems using the PSO algorithm and SVM-GPR models.Te PSO algorithm is used to determine the optimum set of TCR fring angles required for voltage balancing in ofine mode, these fring angles are then used to train the GPR and SVM regression models; fnally, the models are used as a real-time controller to restore the voltage balance in the online mode.Simulation and physical models for the electrical power system were built.In addition, three tests with diferent unbalance cases were conducted to validate the proposed integrated approach.Te results have revealed the superiority of the proposed advanced approach over others mentioned in the literature and the ability of this approach to retrieve the voltage balance conditions quickly (within 20 ms) with a wide range of VUF (3.90-8.42%).
and V → c represent the load voltages, I → aL , I → bL , and I → cL represent the load currents, and Z a , Z b , and Z c represent the Y-connected load impedances.

StartFigure 2 :
Figure 2: Flowchart of the frst stage in the proposed integrated approach.

Figure 3 :
Figure 3: Block diagram of the modeled power system with the PSO algorithm.

Figure 4 :
Figure 4: Te experimental setup for the power system prototype.

Figure 5 :
Figure 5: Te regression graph of the GPR model.

Figure 9 :Figure 10 :
Figure 9: Tree-phase load voltages when using GPR controller to reduce the VUF value from 5.69% to 1.64%.

Table 1 :
Te components' specifcations in the modeled power system.

Table 2 :
Te results from the simulation model for diferent unbalance cases.

Table 5 :
A comparison between the proposed PSO technique and other techniques.