International Journal of Electrical Power and Energy Systems

.


Background
Distribution system operators have encountered new difficulties in recent years due to the incorporation of new components into distribution systems, such as renewable energy sources, Energy Storage Devices (ESDs), and electric vehicles.As of 2017, a total capacity of about 178 GW of distributed generators (DGs) were installed globally, with about 55% being solar Photovoltaic (PV) panels [1].The increasing penetration of DG units has a significant impact on the operation of the conventional voltage control devices in Distribution System (DS) [2].One of the main issues that have arisen is a higher degree of phase imbalance [3], which can lead to problems with power quality and system stability.In addition, the integration of these new elements has also resulted in a wider range of technical problems for the DS, which can cause problems for both the DS and the end users who rely on it for their electricity needs [4].
To effectively address these challenges, Distribution System Operators (DSOs) need to carefully evaluate the integration of new technologies and thoroughly assess their potential impact on the overall system operation [5].This entails shifting the perspective to view DG units and ESDs as valuable resources rather than obstacles within the grid.It also involves implementing novel control and management strategies, as well as investing in infrastructure and equipment that facilitate the integration of these elements [6].Ultimately, the objective is to ensure that DSOs can reliably deliver electricity to end users while embracing the advantages offered by these new technologies [7].
With the rise in popularity of new technologies such as renewable energy sources, DSOs must adapt their role by becoming active facilitators and service providers to support the energy transition [8].This https://doi.org/10.1016/j.ijepes.2023 Random position for evaluation process shift is mainly needed due to the integration of a significant number of PV units into DSs.While the incorporation of PV units is advantageous in reducing reliance on fossil fuels and greenhouse gas emissions, it can also present difficulties for system operators [9].Heavy integration of PV units in medium and low voltage networks may result in voltage fluctuations, imbalances, and violations [10].
To address these problems, system operators may use ESDs and adjust their charging and discharging powers or dynamically adjust the tap position of Voltage Regulator (VR) devices.An improved control strategy for ESDs and VRs, which aims to maximize the lifetime of these devices, can be effective in mitigating the impact of these issues from a technological and economic perspective [11].DSOs can guarantee the delivery of reliable electricity to end users and optimize the advantages of renewable energy integration by deploying these strategies.It is important to note that the approach to address these challenges depends on the unique characteristics and requirements of the DS.Furthermore, in several settings, the DSO is restricted in controlling local-level ESDs.
The goals of the control strategy for the ESDs at the local level related to the local energy community may vary from the energy management aims of the DSO.The local energy community hereby is a group of consumers in a common area who shares similar interests.They may be grouped into energy communities that are locally managed [12].
There are a number of factors to consider when developing a control strategy for ESDs and VRs that aims to eliminate the mentioned electrical system issues and maximize the lifetime of these devices from a technological and economic perspective.Some key factors include the following: • Load forecasting [13]: Accurate load forecasting can help to optimize the operation strategy of ESDs to minimize system overload risk and extends the lifetime of ESDs and VRs.• Power management [14]: Optimal adjustment of the charging and discharging of ESDs based on renewable energy availability, local goals, and dynamically altering VRs' tap positions helps to maintain voltage levels.• Uncertainty planning [15]: It is important to consider contingencies like equipment and communication failures, renewable energy output uncertainties, and natural disasters for the operation of ESDs and VRs.A robust contingency plan with backup systems protocols can minimize the impact of these events and ensure effective system operation.
• Integration of robust control and optimization algorithms [16]: Advanced control and optimization algorithms can optimize the operation strategy of ESDs and VRs to achieve predefined goals.These goals commonly include maximizing renewable energy utilization, minimizing environmental impact, operation and maintenance costs, and ensuring system reliability.Optimization algorithms are widely used in the operation of DSs to achieve these objectives.
To develop a control strategy for ESDs and VRs, it is crucial to consider the primary needs and characteristics of the system.This may require combining approaches and technologies, such as integrating various control and optimization algorithms that collaborate and share data to achieve faster and more reliable solutions [17].It is crucial to also consider the utilization of electrical power generation/consumption in DSs, as well as green electricity and energy technologies such as e.g., ESDs.Additionally, smart distributed energy management systems in smart DSs, play a vital role in developing effective control strategies.Considering their scopes, a comprehensive strategy is needed to optimize the performance of ESDs and VRs and enhance the overall efficiency of the power system.
Most recent control techniques for VRs, such as On-Load Tap Changers (OLTCs), Step Voltage Regulators (SVRs), and Switchable Capacitors (SCs), are designed based on the assumption of unidirectional power flow in passive DSs.However, the integration of renewable energy sources, such as PV panels and ESDs, can lead to multi-directional power flow in DSs, which can result in misleading situations for classic control strategies and cause issues such as voltage violations and tap oscillations of VR devices [1].
As the integration of DGs and ESDs into DSs becomes increasingly widespread, the development of effective control strategies for these technologies has become a critical issue [2].However, recent optimization methods for DSs with high penetration of ESDs may have some potential disadvantages, such as high computational cost and complexity [18], interoperability between different strategies and methods, data privacy, and security concerns [16].Therefore, to address the challenges posed by active DSs, it is necessary to carefully consider the specific problems in the system and the potential trade-offs between different approaches in solving them.In the following literature review, various control strategies that have been developed to optimize the operation of ESDs and VRs in grids are explored.

Literature review
Recently, there has been a lot of research on finding the best ways to control devices in distribution systems.Researchers have developed control strategies for DGs, ESDs, and VRs using different methods such as advanced control algorithms [19], reinforcement learning [20], and heuristic methods [21].Additionally, there has been some research on finding the best strategies to optimize the operation of power electronic devices in DSs [1].
Recent research studies suggest two methods of operating devices in DSs: centralized and decentralized operation strategies.In centralized operation, a single controller has the responsibility of managing all devices within the system.On the other hand, decentralized operation relies on the collaborative efforts of multiple controllers.Researchers have extensively studied a range of techniques aimed at enhancing the performance of devices within the system.From them, the most popular approaches are data sharing [22], single optimization techniques [23], multi-objective optimization techniques [24,25], and neural network applications [20].Hereby, most of the strategies found in the literature are based on the centralized approach [26] and used to operate the system towards specified optimization goals.
The main predefined goals of the optimization problem in studies with centralized control methods are minimizing voltage deviations, improving device lifetime and losses of the systems, or reducing peak demand.Coordinating DGs, OLTCs, and SCs using a centralized control method for day-ahead coordination is investigated in [27].The same method is used for managing the active and reactive power of DGs in a grid [23], for sharing reactive power between several microgrids [28], and for voltage rise mitigation by controlling the charge and discharge powers of ESDs [29].Although these methods have the potential to determine the best control strategies, they depend on costly communication systems and may be less reliable compared to decentralized methods.
Decentralized control strategies rely on local controllers and decisionmaking processes rather than a centralized control system.They involve communication between different areas within the DS to coordinate the operation of devices and the system.These strategies have been widely applied to a range of tasks in DSs.Among them are several implementations of the decentralized methods in DSs, such as the charge/discharge of ESDs [30], reactive power-sharing [31] and curtailment of the output of DG units [26], and coordination among VRs and PV output [32].
Decentralized control approaches are generally considered to be more reliable than centralized methods due to their inherent decentralized nature, which makes them less sensitive to communication failures.Moreover, these approaches enable the optimization of both local and global goals in the optimization process.Local controllers can effectively consider specific goals and constraints within their respective areas while ensuring the safe operation of the system [33].

Contributions and organization
This study presents two decentralized optimization models to improve the operation of ESDs in local low-voltage communities of DSs and VRs in medium-voltage DSs.The models aim to simultaneously minimize technical problems in the DSs and maximize the lifetime of VRs and ESDs.Two DSs used to test the methodologies are the IEEE 33-bus and 69-bus systems.The considered technical problems in DSs include minimizing voltage violations or minimizing energy losses in the feeders.The proposed decentralized model determines the optimal control strategy for ESDs locally at each low-voltage community using two different methods: Profile Steering (PS) [34] and an Advanced Arithmetic Optimizer (AAO).Additionally, the study proposes using the AAO algorithm to determine near-optimal tap positions of VRs.
In addition to determining the optimal control strategy for VRs and ESDs, this study proposes an improved version of the Arithmetic Optimization Algorithm (AOA) [35] called the AAO.The AAO algorithm is designed to improve the convergence speed of the AOA to solve the specific problem of voltage control in DSs.The proposed AAO algorithm increases the search capability of the AOA and makes it better suited for handling mixed-integer nonlinear programming (MINLP) problems.
Finally, this study tests the quality of the solutions found by the proposed methods on the defined problem.For this, the optimization results obtained from the proposed AAO method are compared to those from the AOA, Grey Wolf Optimization (GWO) [36], and Particle Swarm Optimization (PSO) [35] in terms of the speed of convergence and the quality of the solutions.The key contributions of this article within the scope of the operation and planning of green power/energy technologies, smart DSs, and active network management include the following: • A new objective function for solving the voltage violations while maximizing the lifetime of the used assets.• A new objective function for minimizing energy losses of the systems while maximizing the lifetime of the used assets.• Investigation of the potential benefits of the proposed decentralized methods for the operation of ESDs and the extension of the control strategy by using VRs to eliminate voltage magnitude deviations.• Investigation of the potential benefits of the decentralized method over a centralized approach for the proposed objective function in the optimization process.
• A novel AAO algorithm that solves MINLP problems using additional stopping criteria to improve its convergence characteristics and allows for finding better solutions compared to other metaheuristic algorithms.
The structure of the paper is as follows.In Section 2, the statement of the problem, including the objective functions and constraints for both centralized and decentralized methods, is described.Section 3 is devoted to the AAO and PS methods and the implementation of the problem in centralized and decentralized methods.Section 4 presents the simulation results for the test systems application, and final conclusions are provided in Section 5.

Formulation of the problem
There are two goals for the optimization process under consideration.The first goal aims to minimize deviations in voltage magnitude from a reference value in the busses, while also maximizing the lifetime of ESDs and VRs in DSs.The objective is to ensure a reliable supply of electricity to end users.Similarly, using the same approach, a second goal is to minimize energy losses in the feeders of the system, along with maximizing the lifetime of the devices.To attain optimal solutions for these proposed goals, both centralized and decentralized methods can be employed.
For the centralized approach, any optimization method for minimizing the objective function and finding the optimal set of control decisions for the VR and ESD units may be used.The optimization algorithms can be implemented in a central control center, where all the necessary data is available to be used in the optimization process.
For the decentralized approach, we can use distributed optimization algorithms to achieve a set of control decisions for ESDs based on lowerlevel optimization for local load points and then obtain the optimal VRs tap scheduling for the system as the upper-level optimization problem.This approach allows each ESD to make its own control decisions based on local information and communication with its neighbors to reduce the complexity of the problem for upper-level controllers.
The modeling of the devices, corresponding problem formulations, and proposed objective function for both approaches are explained in Sections 2.1 and 2.2.

Centralized approach
In the centralized approach, a central unit processes data from the entire system and makes control decisions to achieve the desired objectives.To optimize the operation of the DS, we formulate an optimization objective function that captures the key performance metrics of the system.In order to balance the conflicting goals of minimizing voltage deviation and energy losses while maximizing the lifetime of the ESDs and VRs, two new objective functions are proposed.The subsections below present the objective function, the constraint for the centralized approach, and the optimization problem defined within the centralized method.

Objective function and constraints
The proposed objective function to minimize the voltage violation while maximizing the expected lifetime of the ESDs and VRs is denoted by   .This objective function is used to optimize the operation of  ESDs ( ⃗  ESD ) and  VRs ( ⃗  TAP ).Note that the types of control variables for the problem are as follows: ⃗  ESD represents the continuous control variables for the charge/discharge of ESDs and ⃗  TAP are the integer control variables specifying the tap positions of VRs.The function is composed of three different terms, each representing a specific goal.The first term, represented by  ⋅ , aims to minimize voltage violations in the network by forcing the voltage magnitudes to be as close as possible to the reference voltage magnitude.The mathematical formulation for this term is as follows: where  ,,ℎ is the output of a power flow analysis (voltage magnitude obtained by using the Laurent power flow [37]) for a DS with   busses and   , is a predefined voltage magnitude reference for a bus at time interval .
The second term, ∑  =1   ⋅   , aims to maximize the lifetime of  ESDs.The expected lifetime maximization for an ESD can be calculated as follows: where the state of charge for an ESD at time  is shown by SOC and SOC  denotes to a reference SOC for the ESD.
The third term, ∑  =1   ⋅  , aims to maximize the lifetime of  VRs. for a VR is formulated as follows: Hereby, Tap ,ℎ is denoting to ℎ ℎ tap position of a VR at time .Note that the weighting factors , , and  are used to adjust the importance of each goal in the overall objective function.
The formulation for the objective functions by combining all three terms is as follows: The second objective function (  ) is proposed to minimize the energy losses in the feeders while maximizing the expected lifetime of the ESDs and VRs.The only difference with the previous objective function is in the first term of the function ( ⋅ ) that aims to minimize the energy losses. represents the value of the energy losses in kWh, and   ,,ℎ is the output of a power flow analysis (losses) for a DS with   lines.
The formulation for the objective functions (  ) is as follows: To calculate the value of  in (2), a set of constraints for the SOC of an ESD with a capacity of  is needed.A formulation defines the evolution of the SOC of the ESD over time.It states that the SOC at time  is equal to the SOC at the previous time step plus the amount of charge/discharge power of the ESD within this interval.The mathematical formulation for the constraint is as follows: The next constraint restricts the range of the SOC of the ESD by stating that the SOC must be between lower and upper capacity bounds, represented by  and , respectively.
The last constraint limits the range of the charge/discharge powers of the ESD between a lower bound of - and an upper bound of .The constraint is as follows: B. Ahmadi et al.
Note that a positive value for  ESD ,ℎ, expresses the charging of an ESD device, and a negative value corresponds to the discharging of the ESD.Finally,  is the length of time intervals in the simulation.
To calculate the objectives ( 4) and ( 6), the power flows for a given DS considering the tap positions of VRs and ⃗  ESD is needed.In addition to the power flow equations, it is necessary to incorporate a power balance at every node in order to enhance the self-consumption capability of each node within the distribution system.The power balance for the total power generated by PV systems and for the main feeder, the charge/discharge of ESDs, and the power consumed by the loads are formulated as follows: Note that based on equality and inequality constraints, the injected power from local communities into the grid is unrestricted and depends on the objective function used by the local communities to help the grid in reducing losses.

Problem formulation for the centralized approach
The centralized approach for optimizing the operation of the DSs is as follows: ..(7), ( 8), ( 9), ( 10), (11), The goal hereby is to find optimal values for ⃗  TAP and ⃗  ESD whereby for the centralized objective  centralized (either   or   presented in (4) and ( 6)).

Decentralized approach
For the decentralized method, we can use a bi-level optimization approach, where a local controller solves the lower-level optimization problem to optimize the scheduling of the ESDs based on local community needs, and the upper-level optimization problem optimizes the scheduling of VRs with respect to the obtained lower-level results and the DS parameters.The problem formulation for the upper and lower level controllers are explained in the following sub-sections.

Lower-level optimization
This problem for the lower-level optimization problem at th controller can be written as: .. ) is the objective function for the lower-level optimization problem.The objective of the lower-level optimization problem is to flatten the local power profile, in order to decrease the peak loads and valleys in the power profile.It is important to note that in the event of overproduction at the local level, the objective function prioritizes the maximization of energy community self-consumption.Note that the best solutions ( ⃗  ESD * ) found in lower-level optimization problems ( ⃗  ESD *  , ∀ ∈   ) for each local community is the input to the upper-level optimization.

Upper-level optimization
The upper-level optimization problem is given by: min here the best values for the control variables ⃗  TAP and ⃗  ESD* have to be found with respect to the objective   which can be either   or   .
The goal for the upper-level objective function is to minimize a technical parameter of DSs, such as voltage violations or energy losses, while simultaneously maximizing the overall lifetime of the ESDs and VRs within the DS.

Solution methodology
The proposed solution methodology for managing the operation of a DS is based on the problem outlined in the previous section and presented in this section by utilizing the AAO algorithm as the main tool.Additionally, the PS method is used to find the optimal schedules of the ESDs in local communities.Finally, we describe how we have implemented the AAO and PS algorithm in both centralized and decentralized settings.

Advanced Arithmetic Optimizer
The AAO algorithm was developed to improve the searchability of the AOA [35] in finding the global optimal solutions.The aim of the AAO is to improve the approximations of the global minimum solution found by the AOA algorithm.The optimization process in the AAO algorithm is comprised of steps given in the following subsections:

Initializition
In the first step, a set ⃗  = { 1 , … ,   } of  possible solutions is generated randomly, whereby each represents a control variable restricted by the following boundaries: where  is the number of control parameters in each solution.  and    are the lower and upper boundaries for the th control parameter.Finally, each solution is valued using the objective function for the problem (  →   where   is the objective value for th solution), and the best solution  * is selected for a solution with the best  value (smallest value from  values for minimization problems) at each iteration.The corresponding solution for finding the best objective value is called the best solution and is illustrated by  * .

Evaluation of the solutions
The main loop of the optimization process in the AAO algorithm [33] consists of two phases: an exploitation phase and an exploration phase.Both phases aim to improve the value of the objective function by updating the solutions in an effort to find the optimal solution.The exploration phase focuses on searching the entire solution space to identify promising new candidate solutions, thereby not getting stuck in locally optimal solutions.The exploitation phase, on the other hand, concentrates on exploring the local areas of the solution space around the candidates identified in the exploration phase.
The evaluation of solutions, either in the exploration phase or in the exploitation phase at each iteration of the main loop, is based on the following formulations.For the exploration phase, the method uses multiplication and division from the arithmetic operators to update the solutions.The AAO algorithm employs a specific method to adjust the th control parameter of the th solution during the exploration phase.This is done by utilizing the th control parameter of the current best solution, denoted as  * , and a random number generated by the equation 2( 1 − 0.5)((   −   ) 2 +   ), where  1 and  2 are randomly generated numbers between 0 and 1.This random number is then multiplied or divided by the th control parameter of  * with a probability of 50%.The resulting value is referred to as  exploration , .For the exploitation phase, the subtraction and addition operators are used to evaluate the positions of a solution.The AAO algorithm uses a specific method to update the th control parameter of the th solution during the exploitation phase.The algorithm utilizes the th control parameter of the best solution  *  , and a random number generated by 2( 1 −0.5) , , where  1 is a randomly generated numbers between 0 and 1.This random number is then added to or subtracted from the th control parameter of  * with a probability of 50% for subtraction and addition operators to form an updated solution called  exploitation , .The evaluation method used by the AAO algorithm to determine the new value of the th control parameter of the th solution uses a decision factor  .It is an exponential function that decreases exponentially from 100% to 0% over the number of iterations.The new value of  , is set to  exploration , with the chance of  and the change of evaluation to  exploitation , is 100% −  .This process is repeated for each control parameter, and for each solution.The AAO algorithm uses this method to adjust its solutions and converges to an optimal one.It uses a balance between exploration and exploitation.The exploitation is increased as the iteration progress, and the algorithm explores less and less the solution space, as the iteration progresses and gets closer to the maximum iteration, the exploitation takes over, and the algorithm starts exploiting the best solution it found so far.
For the proposed approach to be robust, it is important to have a balance between the exploitation and exploration phases because this can significantly affect the efficiency and effectiveness of the optimization process.The exploitation phase generally focuses on refining and improving upon promising solutions that have already been identified, while the exploration phase seeks to identify new, potentially better solutions by searching a wider area of the solution space.A welldesigned strategy for switching between these two phases can help the optimization algorithm strike a balance between thoroughly searching the solution space and efficiently zooming in on high-quality solutions.Comparing the optimization process in AAO to the AOA formulations, both the exploitation and exploration phases were modified to improve the global search capability in the first iterations and improve the exploitation in the last iterations.
In addition to modifying the exploitation and exploration phases, AAO also incorporates other techniques to improve the optimization process.One such technique is the use of a new boundary check method called mirroring correction [35].The formulation for the mirroring correction process is as follows: The mirroring correction method ensures that the decision variables remain within their defined bounds by projecting the variable back into the feasible region if it falls outside the bounds.In the context of the mirroring process used for checking variable constraints in the AAO optimization method, mirroring correction is applied iteratively until the variable remains within the specified boundaries.
Additionally, AAO utilizes a dynamic stopping criterion [23] to determine when the optimization process should terminate, further enhancing its efficiency.Specifically, the AAO algorithm stops when | * () −  * ( − )| < , where  is a pre-specified tolerance,  is the current iteration number, and  is a predefined integer number for the comparison of the best solutions with  solution before.
It is important to note that these modifications were made with the aim to improve the global search capability of the optimization process and achieving better results.The AAO algorithm steps are shown in Algorithm 1.

Profile Steering
Demand side management (DSM) encompasses the effective manipulation of electricity production and consumption through the utilization of controllable appliances, such as flexible devices (e.g., washing machines, electric vehicles, and batteries).Each of these appliances possesses individual flexibility constraints that dictate the extent to which their power profile can be adjusted.DSM algorithms play a crucial role in determining the optimal operation time and mode for these appliances, taking into account their respective constraints.Consequently, a power profile is computed, which aggregates the power profiles of all appliances.The primary objective of a DSM approach is to identify the most efficient operation of these appliances, with the aim of minimizing a defined objective function.
PS [19] is a heuristic DSM approach in which a desired power profile is used as the steering signal to control the production and consumption of electricity power in an electrical community.The goal of PS is to minimize the distance between the desired power profile and the obtained power profile from the planning algorithm while respecting the constraints of the controllable appliances.Any vector norm can be used to measure the distance between the two profiles (e.g., the Euclidean distance).
In the domain of DSM, the purpose of optimal planning for flexible appliances entails determining the optimal starting intervals for a set of  devices.This optimization seeks to minimize a specified objective function while adhering to the constraint that the total power within each interval remains below a predetermined maximum value.However, due to the computational complexity associated with calculating the exact optimal solution, and therefore in PS, a heuristic algorithm is used as an alternative solution.
The PS algorithm for finding the optimal operation of the devices in a DSM setting with multiple appliances starts with requesting each appliance to optimize its own power profile to be as close as possible to a certain desired profile, which is a vector denoting the desired community power profile for a finite number of discrete time intervals.The aggregated power profile of the appliances in the community is then calculated.The difference between this aggregated power profile and the desired profile is determined.Each appliance is requested to propose a new candidate profile that reduces the difference between the actual and desired household power profile.After generating the new profile, the appliance reports its new profile.The algorithm chooses the appliance that provides the best improvement to the objective value (i.e., minimizes the Euclidean distance between the desired and aggregated community profile the most), and its profile is replaced with the proposed candidate profile.Note that the desired profile corresponds to the optimal profile expected by the lower-level objective function.This iterative process is repeated until no device provides a further significant improvement.The PS algorithm is shown in Algorithm 2 [19].

Implementation of the optimization algorithms in centralized method
In the centralized method, a central controller is responsible for optimizing the operation of the ESDs and VRs.The goal of the central controller is to minimize the technical objective of the DSs (either voltage deviation or energy losses) besides maximizing the lifetime of the ESDs and VRs.The problem we are dealing with is an MINLP problem.In comparison to mathematical optimization techniques, heuristic methods exhibit various advantages.They are particularly advantageous for real-world applications due to their ease of implementation [38].Moreover, heuristic methods offer significant benefits in terms of computational efficiency and the ability to generate highquality solutions [39].To solve the optimization problem presented in Section 2.1.2,the AAO algorithm was utilized.
Within the AAO algorithm in the centralized method for optimizing the operation of the ESDs and VRs, the central controller can follow these steps: 1. Specify the objective function and the constraints that capture the performance metrics and operational limits of the system.2. Initialize the first candidate solutions randomly within the boundaries of the control variables.3. Check the control variables using the mirroring method to bring the control variables within the boundaries.4. Calculate the objective function value for the solutions.

Update the control variable of each candidate solution based
on the formulations for evaluating solutions within the exploration/exploitation phase.6. Repeat steps 3-5 until a stopping condition (maximum number of iterations or dynamic stopping criteria) is met.
In order to collect data and send control signals, the central controller needs to communicate with the ESDs and VRs.By utilizing the AAO algorithm in this way, the central controller aims to minimize voltage deviation/energy losses while simultaneously maximizing the lifetime of the ESDs and VRs based on the objective function of the process.The flowchart of the centralized optimization based on the AAO method is shown in Fig. 1.Note that the control variables for the   )) are the solutions of the set ⃗  in the AAO method, and the   and  for the control variables are defined based on ( 9) and (22).Moreover,  in AAO is the value of the objective function for the problem (either ( 4) or ( 6)).

Implementation of the optimization algorithms in decentralized method
In the decentralized method, a local coordinator determines the best operation of ESDs in each energy community by using either PS or AAO, and this best operation strategy is used in the upper-level optimization problem to find the tap positions of the VRs by AAO.The goal is to minimize voltage deviation or energy losses and maximize the lifetime of the ESDs and VRs.
To implement the AAO algorithm and PS in the decentralized method for optimizing the operation of the ESDs and VRs, each device can take the following actions: • Lower-level optimization 1. Define the lower-level optimization objective function and constraints.2. Solve the lower-level problem (Eqs.( 13) to ( 18)) for an ESD attached to the local controller using either the PS method or the AAO method.

Communicate the best solution found by local controllers
to the upper-level controllers and define the upper-level optimization objective function and constraints.
• Upper-level optimization 4. Initialize the first candidate solutions ( ⃗  TAP ) randomly within the boundaries of the control variables (22). 5. Check the control variables using the mirroring method to bring them into the boundaries.8. Repeat steps 5-7 until a stopping condition is met.9. Report the best solution found for the upper-level optimization problem.
By implementing the PS method or the AAO algorithm in this manner, ESDs attached to local controllers can be optimized based on the lower-level optimization problems.Besides, by implementing the AAO algorithm for solving the upper-level optimization problems, the overall goals of the decentralized problem can be met.

Test systems and energy communities
The IEEE 33 and 69 bus DSs [40] are used in our simulation study.Within these models, the main modifications are the addition of PV systems and ESDs at several busses of the system referred to as the local energy community in this paper.Real data concerning solar irradiation and load curve behavior are used to model the PV yield and load characteristics for the day-ahead optimization.For the test systems, the locations and sizes of the VRs, PVs, and ESDs that are added to the systems are given in [41].
In the IEEE 33-bus and 69-bus test systems, the PV and ESD are connected to a local community attached to a bus of the system.The locations of the local energy communities for lower-level optimization in the test systems are shown in Figs. 2 and 3.The characteristic of local energy communities are based on the same system characteristics of the Aardehuizen community [42] in Olst, the Netherlands.This community consists of 23 residential houses and one communing building.The main goal behind this community is living responsibly with respect to the environment.In this regard, the houses are built using sustainable materials, and the goal is to satisfy their energy requirements using sustainable sources such as PV panels.The proper sizes of the PV units and ESDs in the Aardehuizen community are given in [22], determined using a multi-objective optimization problem.Different Pareto solutions achieved with differing parameters [41] are used to model different local communities attached to the test systems.The Aardehuizen community configuration is shown in Fig. 4.
The centralized method of managing energy involves gathering information on control variables and data such as load, PV, and ESD units from households in a local community.This information is then communicated to a centralized controller in the IEEE 33 and 69 bus systems.It is worth noting that with this method the power profile of each bus is aggregated, and system data is shared with the centralized controllers.
On the other hand, the decentralized method utilizes a controller at each local community to optimize the control variables for household energy management.These local controllers then share the aggregated power profile of the community with other controllers, thereby facilitating the upper-level optimization process.

Results and discussion
To implement the optimization algorithms in a centralized manner, a computer with 16 GB RAM, an Intel Core i7-7700 3.6 GHz processor configuration, and MATLAB version 2021b are used to perform the calculations.The result of the simulations for both test systems using the centralized and decentralized methods is given in Section 4.2.1.The comparisons between methodologies are based on the objective values, computation cost based on execution time (ET), data privacy, scalability of the methods, and reliability indices.Besides evaluating the AAO algorithm on its stability to find near-optimal solutions, the quality of the solutions found by the AAO method is also compared with other heuristic methods (see Section 4.2.2).

Centralized and decentralized methods
By distributing the control variables of the centralized problem over several controllers, the optimization problem is divided into smaller subproblems, and each local ESD attached to a controller solves its own subproblem independently.This way, each controller makes its own decision based on its local measurements and information and shares the results with other units only if needed.The potential advantages of this method over the centralized method are investigated in this section.
The results obtained by the two different decentralized methods are compared to the results of the centralized method (C-AAO scenario).A scenario using AAO as well for optimizing the operation of ESDs in lower-level optimization problems and also for the operation of VRs in upper-level optimization is denoted by D-AAO-AAO.The other decentralized method that uses PS for lower-level optimization is called D-PS-AAO scenario.
In order to compare the results for all three scenarios, each method is evaluated against five criteria.
• Objective function value: determining the best solutions with respect to an objective function is a critical criterion for assessing the effectiveness of a method.• Data privacy: protecting the household power usage data is an essential consideration, particularly when sensitive information, such as household consumption profiles, is involved in finding ESD operation strategies.• Computational time: a key factor that directly impacts the efficiency and the ability of the methods to handle complex problems is to minimize the time to find the best solutions.• Scalability: is an essential element that influences the capacity of methods to address larger problems.• Reliability: is an essential criterion to ensure that the method produces consistent and accurate results, which can also affect all previous criteria.
The insights achieved from analyzing the results of the method based on all criteria can provide valuable information regarding the strengths and weaknesses of each method, guiding the selection of the most appropriate method for a specific task.
The number of control variables ( for the C-AAO method) for the IEEE 33-bus test system is 2376, where 24 variables are integer variables (the tap position of the VR unit ⃗  TAP ), and the rest of the variables are continuous variables for the operation strategy of ESDs in local communities.Note that this number depends on the number of ESDs and the value   for the optimization process.The variables are divided over the local controllers in the decentralized methods.Furthermore, each method is executed 50 times independently.The detailed results of the simulations are provided in Table 1.
To check the scalability of the proposed decentralized method, the methods are tested by doubling the number of control variables and applying the method to solve the problem in the IEEE 69-bus system with 12 local energy communities.The value of  for the C-AAO method now increases to 5232 control variables.Note that the numbers are for simulations with 24 discrete time intervals.The discussion for each criterion is based on the results in the table.

Lower objective values:
For determining the best scenario with respect to the objective function values (lower is better), the quantitative results are compared to each other.Based on the values in Table 1, it appears that the centralized method (C-AAO) generally has larger objective values compared to the decentralized methods (D-AAO-AAO, D-PS-AAO) for both test cases (IEEE 33-bus and 69-bus).For the 33-bus test case, the mean objective value of the voltage-based objective   for C-AAO is 0.890, while the mean objective values for D-AAO-AAO and D-PS-AAO are 0.703 and 0.735, respectively.The best objective value for C-AAO is 0.521, while the best objective values for D-AAO-AAO and D-PS-AAO are 0.424 and 0.502, respectively.Comparing the mean and the best objective values for C-AAO to the best-found solution (  = 0.424), it appears that the centralized method has difficulties in finding a solution with a low objective value, especially for IEEE 69-bus system.
The results for the loss-based objective function   follow the same behavior considering objective values, but in this case, the centralized method found a better mean value compared to decentralized methods.The centralized method found a better mean value for   in the IEEE 33bus system compared to the decentralized method.The best mean value in C-AAO is 0.676, and D-AAO-AAO scenario finds the best solution with an objective value of 0.551.
Similarly, for solving the problem of   in the IEEE 69-bus test case, the mean objective value for C-AAO is 0.759, while the mean objective values for D-AAO-AAO and D-PS-AAO are 0.728 and 0.675, respectively.For the   problem, the best mean value is found by the D-AAO-AAO method.
The table also includes the details of the best results obtained in each scenario, represented by the values , , , and .Since the majority of the values for voltage violation and energy losses are the same, choosing the best method that can find a better lifetime for the devices is important.The table indicates that the D-PS-AAO and D-AAO-AAO methods generally provide the best results for  and , both in IEEE 33-bus and 69-bus test cases.Regarding the best results for , the methods found similar results while considering the  values.The D-AAO-AAO method found a better operation strategy for ESDs that results in improving the lifetime of the devices.
Therefore, it can be seen that the decentralized methods generally have lower objective values than the centralized method, indicating that the decentralized methods may be more efficient in solving the optimization problem.

Lower computation cost:
Table 1 also gives the execution time for all three scenarios.The mean, standard deviation, and best execution time are used as the criteria for the computational cost.Note that the execution time is measured in seconds.This table allows for selecting a faster method for determining the best operation strategy for ESDs and VRs.
The table shows that the execution time of the decentralized methods (D-AAO-AAO and D-PS-AAO) is generally shorter than the centralized method (C-AAO) for both the IEEE 33-bus and 69-bus systems, and the best execution time for the decentralized methods are found by D-PS-AAO.For the problems with 2376 control variables in the IEEE 33-bus system, the decentralized method, in general, is faster than the centralized method by 54%, and this number is 84% for scaling up the number of control variables in the IEEE 69-bus system.
The D-PS-AAO method generally has the lowest execution time among the decentralized methods.Based on the table, the mean execution time of the D-PS-AAO method is 6.2 s faster than the D-AAO-AAO method on average.D-PS-AAO is 73% faster than C-AAO on IEEE 33-bus system and 89% faster than C-AAO on IEEE 69-bus system.Finally, with respect to the ET results, the decentralized method is faster than the centralized method, and among them, the faster method is D-PS-AAO.

Data privacy:
For determining the best scenario considering data privacy, the sharing of the data between the devices with the control units and how much data is needed at household levels are the main important factors to consider.
In both decentralized methods, each ESD unit only needs to share its local measurements with a local control unit that is directly connected to it rather than sending all the data to a central controller.This can increase the security and privacy of the system, as sensitive data does not need to be transmitted over long distances and can be kept within the local community of the ESD units.So, as a result, the privacy of the household data in both D-AAO-AAO and D-PS-AAO is better than the centralized method.Comparing the decentralized methods, both are equivalent since, during the optimization process, both need an expected power profile from each household and perform the optimization for ESDs based on that.Also, the expected power profile will be used in the local community, and the aggregated power profile of the community is communicated to other controllers if necessary.
In the decentralized method, each unit only needs to share its local measurements and decisions with the units it is directly connected to rather than sending all the data to a central controller.This can increase the security and privacy of the system, as sensitive data does not need to be transmitted over long distances and can be kept within the neighborhood of the unit.

Scalability:
As the number of units in the system increases, the centralized method for solving the optimization problem may become impractical.This is because there are a large number of control variables that need to be evaluated in the optimization process.To compare the methods, the number of control variables in the problem is increased by 120%, and the convergence curve of the methods is compared to each other.This is done to see how the convergence curve changes as the number of control variables increases.
The convergence curves of the methods for the individual execution of the simulations are shown in Figs. 5, 6, 7, and 8.The figures show the convergence curve for different scenario cases of solving   and   problems in the IEEE 33-bus and 69-bus systems.The horizontal-axis represents the iteration number (it), and the vertical-axis represents the objective function value defined for each problem.The light-colored convergence curves represent the convergence behavior of the methods for different individual runs of the methods from 50 runs, and the convergence curve with vivid colors is a representative convergence curve from the 50 runs.
As shown in Figs. 5 and 6, the maximum number of iterations for the methods to converge are similar.On the other hand, when the number of devices in the system increases, the centralized method for solving the optimization problem needs more iterations in the optimization process (approximately five times more iterations).The figures show   how the convergence curve changes for the centralized method as the number of control variables increases, while for decentralized methods, the average number of iterations for converging to the best solutions is the same.

Reliability:
In centralized control, a central controller alone handles all computations and determines optimal control variables for each device, exposing the system to the risk of a single point of failure.In the decentralized method, each local community can function independently and can make decisions, even if communication with other units is lost.
Besides the reliability advantage of the decentralized methods from a failure point of view, the reliability of the optimization process is also in decentralized methods better than the centralized method.The reason for that is in decentralized methods, the search space for the AAO method decreased, and as a result, the quality of the obtained solutions will be better.Comparing the decentralized method, the D-PS-AAO is more reliable since the chance of getting stuck in a local optimum at the lower-level of the optimization problem is negligible compared to using AAO at the lower-level.

Quality of AAO solutions
To confirm the superiority of the AAO algorithm, a comprehensive evaluation was carried out by comparing the solutions obtained through AAO with those obtained through other heuristics.This comparison was designed to demonstrate that AAO is capable of determining near-optimal solutions, thereby reinforcing the validity of the solutions presented in previous sections.The outcome of this comparison offers a thorough understanding of the strengths and limitations of the AAO approach, highlighting avenues for further improvement.Furthermore, this evaluation sheds light on the dependability and sturdiness of the AAO algorithm, affirming its potential as a reliable and robust optimization tool.
The objective function values in the IEEE 33 and 69 bus systems, obtained through the decentralized optimization approach (AAO for VRs at the upper-level problem and AAO for the ESDs at the local energy communities) are presented in Table 2.The result obtained by the AAO method is compared to the results obtained by the AOA (AOA for VRs and AOA for the ESDs), GWO (GWO for VRs and GWO for the ESDs), and PSO (PSO for VRs and PSO for the ESDs) methods for the same number of iteration (Max-it) and neglecting the dynamic stopping criteria for the centralized implementation method.The table compares the performance of the different methods in terms of the average (mean), standard deviation (STD), and best objective function (best) values based on 50 independent runs.Additionally, the table also compares the convergence speed of the heuristic methods based on computational time.Note that the execution time in seconds is denoted by ET in the table.
The details of the simulations and heuristic parameters are as follows.The maximum number of iterations for simulations is set to 100 iterations for IEEE 33-bus and IEEE 69-bus systems.For all the heuristic methods, the number of solutions for the optimization process is set to 30 solutions.Besides the number of maximum iterations and the number of solutions, for PSO, there are several parameters that can be adjusted to control the behavior of the optimization process.The inertia weight, which controls how much the current velocity of a particle affects its next position, is set to 0.72 with a damping ratio of 0.9 over the iterations.The cognitive and social learning rates, which control the influence of the personal best and global best positions, are set to 1.49 on the particle's position update.Note that the AAO, AOA, and GWO are parameters-free and that the other parameters are found after initial experimental results.
The performance of the four different heuristic methods (AAO, AOA, GWO, PSO) is evaluated using the results of the two objective functions and also ET.The table presents the mean, standard deviation (std.), and best values of   ,   , and ET for each method and the two systems (IEEE 33-bus and IEEE 69-bus).
For the IEEE 33-bus system, the AAO method has the best mean value for both   and   with a value of 0.3080 and 0.4267, respectively, and the best value for   is 0.2875 and for   is 0.4193.The execution time for this method is 60 s for   and 83 s for   in the AAO method.For the IEEE 69-bus system, the AAO method has the best mean value for   with a value of 0.4813, and the best value for   is 0.4089.The execution time for this method is 116 s.For the results of   together with AOA, they found the best mean values and best solutions with the GWO method.
Overall, it seems that the AAO method performs the best for both systems in terms of both   and   objective function values and execution time.

Conclusion
This paper introduces a multi-objective optimization framework for managing the operation of VRs and ESDs in DSs.The framework aims to optimize the tap positions of VRs and to locally optimize charging and discharge powers for ESDs using a decentralized approach that considers a predefined objective function.Two objective functions are proposed to optimize the technical parameters of DSs, while maximizing the expected lifetime of VRs and ESDs.The objective functions take into account the voltage profile of the network, lifetime improvement of VRs and ESDs, energy losses, and device lifetime.
Two decentralized methods, based on the AAO algorithm and the PS approach, were proposed to address the limitations of centralized optimization methods.The decentralized methods aim to improve the reliability and efficiency of the optimization process while improving the scalability and privacy disadvantages of the centralized methods.Based on simulation results from the IEEE 33 and 69 bus systems, the proposed methods were evaluated and compared to a centralized approach.

B
.Ahmadi et al.

Fig. 1 .
Fig. 1.Flowchart of the centralized optimization based on the AAO method.

Fig. 4 .
Fig. 4. The Aardehuizen micro-grid community, which is attached as a local community to the IEEE 33 and 69 bus systems.

Fig. 5 .
Fig. 5. Convergence curve for the different scenario cases of solving   problem in IEEE 33-bus system.

Fig. 6 .
Fig. 6.Convergence curve for the different scenario cases of solving   problem in IEEE 33-bus system.

Fig. 7 .
Fig. 7. Convergence curve for the different scenario cases of solving   problem in IEEE 69-bus system.

:
AAO algorithm.Set the basic parameters of the algorithm (e.g.,  and ); Set the input parameters of the problem and specify their boundaries ( and  ); Initialize a random solution as the best solution ( * ) and find the objective value for it ( * ); while iter ≤ iter Max do for Each solution do Calculate the value of the objective function ( ) for   ; Update  * and  * if   solution with  value is better; B. Ahmadi et al.Algorithm 1* and  * ;

Table 1
Comparison of the decentralized methods to the centralized method in solving the optimization problem.

Table 2
Comparison of the heuristic methods in solving the distribution system problem.Convergence curve for the different scenario cases of solving   problem in IEEE 69-bus system.