Review of Voltage and Reactive Power Control Algorithms in Electrical Distribution Networks

: The traditional unidirectional, passive distribution power grids are rapidly developing into bidirectional, interactive, multi ‐ coordinated smart grids that cover distributed power generation along with advanced information communications and electronic power technologies. To better integrate the use of renewable energy resources into the grid, to improve the voltage stability of distribution grids, to improve the grid protection and to reduce harmonics, one needs to select and control devices with adjustable reactive power (capacitor batteries, transformers, and reactors) and provide certain solutions so that the photovoltaic (PV) converters maintain due to voltage. Conventional compensation methods are no longer appropriate, thus developing measures are necessary that would ensure local reactive and harmonic compensation in case an energy quality problem happens in the low voltage distribution grid. Compared to the centralized methods, artificial intelligence (heuristic) methods are able to distribute computing and communication tasks among control devices.


Introduction
Electricity distribution networks (DN) encounter constantly changing generation demands and/or high load fluctuations from low to high, and vice versa. These problems are common for electricity distribution networks [1]. Voltage drop is among the most important energy quality issues and concerns users connected to low voltage distribution grids [2]. Voltage stability is closely linked with changes in load dynamics, and lately, constant changes in system loads have been giving rise to a greater number of voltage instability cases. Voltage stability analysis is a field of study that targets the monitoring of the response by the electrical system depending on the changing dynamics of the generator and the load to achieve stable and reliable operation of the power system [3]. In order to maintain the stability and reliability of the entire system in respect to these changes, the rearrangement of traditional control and actions, as well as the merge of various layers/time scales, becomes increasingly more necessary [4]. Practical experience of distribution system operators shows that it might be complicated to compensate the decrease in load in primary substations with multiple power lines with unmatched load profiles [5]. The use of load distribution methodologies and specified observation data allows the creation of rather realistic load profiles [6].
Thus, reconsidering this optimization technique is necessary, both for distributed system operators (DSOs) and for users, to manage the public or private system load profile and power consumption [7,8]. The distribution and decentralized control systems are necessary not only in solving the extent of the problem, but also in decreasing the communication demand that may affect the system control and optimization in real time [4]. Current passive distribution systems are modernized by installing distributed generation (DG) into active electricity networks. It may occur with the increased short circuit currents in the components of the electricity network. DG affects the condition of the electric system and the network losses [9]. The sources of DG are built near the electric load center. Their respective layouts may contribute to decreasing power losses [10]. The use of distribution generation invalidates the presumption that the current always flows from a power supply to the end of feeders and the voltage value gradually decreases. The devices of DG change the energy flow of the supply lines and it results in the changes of the voltage profiles [11]. The installation of voltage controllers is as important for the control of voltage profile, in cases such as:  high-bandwidth lines  end of heavily loaded supply (with significant voltage drops) [12] The modernization of the DN may be treated as an optimization task. In order to improve the network efficiency, several objectives were set and approved (e.g. decreasing loss and increasing reliability), defining which configuration would guarantee the best reliability results without breaking a secure network operation [13]. Due to inductive and non-linear loads in electricity distribution systems, precautionary and corrective measures must be taken to not only ensure the right power factors, but also reduce harmonic distortions [14]. Harmonics cause a reduced power factor, which causes reduced active power delivered to consumers. The active power supplied to the users is lowered by the harmonics that reduce the power factor. This problem may be solved by using type C passive filters, but appropriate parameters need to be set [15].
Reactive power affects the power quality parameters and, by properly adjusted control devices, reduces system losses, increases power transmission, and reduces grid voltage drops [16,17]. Passive solutions are frequently based on capacitor batteries [17]. The installation of capacitors in distribution networks is important not only for the compensation of reactive power, but also for the power factor adjustment, improvement of voltage profile, and loss reduction [12,18,19].
This solution requires accurate positioning and measurement of capacitor battery values. This passive solution faces the main issue of resonance, which can occur when a capacitor battery is connected to induction cells [17]. Reactive power compensation is a useful method for voltage control in distributed systems. Distribution systems have capacitor batteries to keep the power factor close to one and to compensate for voltage drops in high-load situations [20]. Reactive power compensation can have a more efficient solution by using dynamic VAR compensators, such as static VAR generators (SVGs). A dynamic and wide range of reactive power compensation is among the advantages of this solution, in addition to an accurate and reliable displacement power factor (DPF) [17].
Some countries apply the requirements for use of photovoltaic energy converters that are necessary to control reactive power by supplying the active power [21]. The value of power flow belongs on the voltage square and on flow components at the end of the line. The equation set of the balance between the bus power and the reactive power, along with the line voltage equations, compose the equation system of static power. Upon solving the task of loss reduction, the reduction of all electric power generated is an objective agent and a valid way of minimizing load losses [22,23]. Even though, during the equipment installation, the load is distributed among the three phases equally, the load gain and the changing demand throughout the day cause the occurrence of the phase load imbalance. For a certain period of time, the phase load in a three-phase network is distributed evenly, however, after a while, the load imbalance occurs [1]. A power-load curve changing in time is the basis of the load distribution and the programming of the electricity distribution system. The loads of the system power are related with various types of electricity consumers that have different demands of energy consumption. This means that the place and time of new loads cannot be anticipated. Therefore, power loads of electricity distribution system are random variables dependent on time [16]. The need to balance load and reduce power losses to the highest extent possible encouraged the study load balancing and planning problems [1].
In general, energy planning and decision-making requires a lot of resources, which significantly impacts all economic agents. Planning of power systems mainly aims to define the appropriate generation and transmission strategies to ensure efficient use of the system. The general energy efficiency system must be optimized in terms of the efficient use of energy resources [24].
Thus, this work aims to address the problem of the optimal reactive power control by considering the multifunctionality that simultaneously covers power loss, voltage deviation, and reactive power generation costs. The article offers a comprehensive bibliographic overview of mathematical methods used for optimal choice and positioning of reactive power compensation elements. Soon, DN will be self-sustaining and contain renewable and non-polluting sources; therefore, it is important to focus this analysis on DN with distributed resources [19,18].
This type of grid topology that can be isolated requires some reactive power compensation analysis due to bidirectional power flows existing in such grids [18].

Voltage and Reactive Power Control in Electrical Networks
Traditionally, voltage control is carried out by applying the reactive power control using a synchronous generator, capacitor batteries, and devices of the latest FACTS (Flexible AC transmission systems) [22,25]. To set up the reactive power control for each generator, only local measurement and information exchange with neighboring buses are required [26].
Voltage optimization in the bus is a serious task for DN operators that seek to ensure a maximum load capacity and operation security [27]. By using the frequency control, the aim is to supply a sufficient and load-meeting active power via electric power systems, and by using the voltage control with sufficient and load-meeting reactive power. Reactive power and voltage quality indicators are crucially important for the operation of the distribution system [16]. Due to the type of these networks, a right integrated control of the reactive power flows and voltage in the DN has become a particularly serious problem requiring a complex solution [28].
Currently, the voltage is controlled in the bus of the average voltage by operating the switch of the branches of an overloaded transformer of high and average voltage. When power is supplied from distribution generators, this method does not ensure proper voltage values in network nodes because voltage significantly rises [29]. In the networks of high voltage, this phenomenon occurs when the reactive power is supplied because the line resistance is insignificant, compared to the line inductive reactance. However, in the DN of a medium voltage the resistance is not insignificant, therefore, the supplied reactive power increases voltage. However, when the distribution voltage is controlled automatically, it can be controlled in one generator, hence, the voltage profile can be better [29].
In some cases, photovoltaic systems may affect the quality of voltage in the distribution networks that is defined by Standard EN 50160. Photovoltaic systems influence the voltage profile curve and harmonic distortion of current and voltage [30]. Due to high voltage drops, it is important to ensure a proper voltage profile curve of radial networks.

Compensation Equipment and Transformer Branch Control
In power systems, voltage is usually controlled using OLTC (on-load tap changer) transformers and reactive power units [31]. The purpose of power transformers is to supply a linear load at rated frequency. The disadvantage of non-linear loads is that they raise the temperature of transformers and reduce their service life [15]. However, the control of this device highly depends on the connections used within. On the other hand, this method becomes ineffective in the presence of integrated generators [29]. The control of reactive power compensation devices and transformer branch outputs changes discreetly (unevenly). Therefore, it is very complicated to control the reactive power changes gradually. The reactive powers of generator bus/lines are changing, which makes the ORPD (optimal reactive power distribution) problem mixed integer non-linear programming problem (MINPP) [28]. The main reasons are as follows: the monitoring does not cover all network buses, the requirements for separate loads are not known in advance, and it is difficult to accurately forecast the operational readiness of small generators (that often correlates with operational readiness of renewable sources). It should be noted that network parameters and sometimes even topology are only partially known. Also, generation is expected to be switched on and off, and in such cases, an automatic reconfiguration of network control infrastructure is necessary (the so-called plug and play method) [32].
Generalization: Research articles have focused on service quality, reliability of the transformer branch switch, and how to maintain a high level throughout the life cycle of a regulating transformer. So far, no other alternative regulation of transformers is expected. In the near future, properly functioning and controlled converters will continue to play an important role in power grids and industrial processes.

Reactive Power Capacitors and Their Control
Passive VAR generators (e.g., capacitor batteries) or active VAR generators (e.g., static VAR generators) may be singled out as the key compensation devices for reactive power. Without the use of VAR generators, reactive energy may be supplied via renewable energy systems or a load connected to the grid via grid connected converters (GcC) [17]. Capacitor batteries are widely used to minimize the breaches of the lower voltage threshold. Literature suggests the following measures aiming to mitigate breaches of the upper voltage threshold: the development of the traditional grid, var control of induction devices, var and watt control of PV-inverters, and response to demand and storage management [31]. In recent decades, compensation for reactive power with capacitors has become a real challenge due to a significant increase in non-linear load and deviations of substation voltage. It is known that the flow of harmonic currents in distorted distribution systems is more harmful than the reactive currents of the main frequency. The undesirable effects of harmonic currents are even more pronounced in shunt capacitors, primarily due to increased harmonics in the distribution systems caused by capacitors [8].
Capacitor battery configurations (with low response rates of 10 seconds to minutes) are commonly used for control of reactive power in distribution and industrial networks. These configurations are made by changing a certain number of capacitor sections in the connection diagram according to reactive load requirements. In such cases, mechanically switched capacitor batteries are the most economically efficient compensation sources [26,33].
In the application of later solutions, the reactive power in capacitor batteries is converted to an evened output voltage or output voltage in very small blocks. Such solutions are compiled from a low number of switches and they are very rational [14,33].
Static compensators (STATCOM) are a solution for voltage regulation by controlling and supplying the reactive power at the load connection point. This method is effective in transmission or distribution systems. When used in distribution lines, they are called DSTATCOMs. However, in the case of weak grid, voltage control with DSTATCOM requests high reactive power due to high R/X line grid ratio, making reactive power control less powerful in low voltage grids. This factor gives rise to two major issues: the need for a converter with especially high rated power to ensure control and the excessive reactive power circulation in the distribution transformer, which can damage equipment [2]. Static compensator with thyristor switched capacitors and thyristor control reactors are more advanced configurations with a continuous control, basically no transition voltage, minor generation of harmonics, and control and operation flexibility [26,33].
Capacitor distribution tasks are solved by applying various methodologies, including constructive heuristic algorithms, metaheuristic instances, such as genetic algorithms, tabu search, plant growth simulation, and particle swarm, as well as classical methods, for example, branch and bound algorithms, in which the capacitor distribution is simulated as a task of mixed integer linear programming (MILP) by applying injection flow equations and considering loads of a constant current [12,22]. One of the main tasks related to the planning of distribution and industrial networks is selecting capacitor batteries with optimal capacity and finding the best fitting location for them [33].
Scientific sources contain many works on the challenges related to capacitor distribution. Similarly, as in the case of voltage controller distribution tasks, capacitor distribution can also be simulated as a task of mixed integer non-linear programming (MINLP), where the objective function is reducing the costs of DN investments and power losses [12]. The main problem-the optimization of a real network-conditions a rather high number of network configurations due to the number of connecting devices [13,22]. Hence, a proper selection of capacitor power and place of installation may help to reduce losses and improve the voltage quality [16,34].
It is hardly feasible to test all potential combinations and make the required calculations of the most efficient power flows, for each of them.
Generalization: The distribution grid voltage and reactive power are typically controlled by a load branch switch and capacitor units with low response rates (10 seconds to minutes). Power flow studies may determine the best capacitor size and best operating location, both to improve the power factor and to raise the voltage of power mains.

Participation of Power Plants in Voltage and Reactive Power Control
Traditional power sources are no longer sufficient to meet modern electricity demands, which raises questions related to energy reliability and security, as well as an enormous carbon footprint [35]. Due to global energy reliability and environmental concerns, governments promote power generation from renewable energy sources (RES) [36]. Over the past two decades, renewable and distributed power sources have emerged as an addition to conventional power sources and are now considered by municipal service engineers as an effective solution that meets the power demand and helps to successfully overcome power challenges [35,37].
An especially significant spread of RES has been observed in Northern Europe, in such countries as Sweden and Norway, where the increase exceeded 30% in 2012. In the United States, the installed generation capacity exceeded 10 GW for photovoltaic (PV) generating systems in 2013 [38]. In the following five years, PV and wind generation systems are expected to account for over 80% of RES growth [37]. In recent years, PV generation systems have become very popular in power systems. RES are usually connected to the grid system through connected converters of DC/AC grid [17].
The main purpose of distributed generators is to supply active power to the power grid depending on the parameters of the primary power source.
However, the increase in DG poses many technical issues for distribution systems, as well as amplifying challenges to maintain a stable, reliable, yet affordable power supply, while conventional voltage control devices that have regular control capabilities encounter difficulties with voltage control [37,39,40]. Usually, these issues are related to the drop in voltage amplitude, frequency deviations, and higher harmonic components. This explains network requirements and standards intended for alignment of the interaction between photovoltaic generators (PVGs) and the grid, as well as troubleshooting during malfunction [41]. European DSOs must ensure that their grid voltage is within EN50160 bounds of ±10% of the rated voltage of [31].
The RES energy output is unpredictable and often differs from the estimated value, and therefore can seriously affect voltage control in distribution systems [38,39,42].
Electricity production from PV systems is highly variable as it depends on meteorological conditions. Consequently, methodologies are required to forecast the PV generation from a predictor variable, such as irradiation, and to develop a simulation model for such generation [36]. Voltage deviations that arise due to fluctuations in RES output power become especially problematic in real-time. This can be explained by power of RES being forecasted based on certain time intervals (from dozens of minutes to an hour). The RES power is assumed to be constant over time, while the actual RES power fluctuates in real-time [38].
The main objective function in voltage control strategies aimed at the reduction of voltage deviation is as follows: where represents a voltage deviation vector at N monitoring nodes, and is a reference voltage. Based on load flow equations, the voltages in DNs with DGs is the function of the following parameters.
Several reactive power control strategies exist for low voltage grids that have many consumers; their assessment can be made based on sociotechnical criteria. Two types of control devices can be used, which substantially differ by their control structure: prosumer-owned photovoltaic (PV) inverters and inductive devices owned by distribution system operators [31]. Currently, most distributed generators that use photovoltaic power are connected to power grids using converters, which convert the power generated by photovoltaic modules into standard power that corresponds to electric grid parameters. The control of local cosφ (P)-and Q (U)-PV converters, as well as the local control of L (U)-induction devices, are modelled separately in various low voltage networks, using radial structure and can differ with different overhead lines and cables [31].
On the other hand, due to lower costs and improved reliability of power electronic converters, rectifiers connected in the AC/DC network are increasingly used as an interface between some loads and the network. Network-connected rectifiers use a power circuit, which is similar to systems of converters connected in a network but with a different power flow direction, i.e. from the network to DC [17].
Aiming to resolve the issue relevant to power grids, which is related to current and voltage harmonic compensation, arising from nonlinear loads, it is appropriate for the power grid to use the energy supplied by photovoltaic modules, i.e. not to use the usual photovoltaic converters, but to design special converters having a property of active power grid harmonic compensation.
The results demonstrate that use of consumer-owned PV converters to eliminate voltage breaches in the feeder gives rise to social and technical shortfalls, such as consumer discrimination, threats to their data privacy, significant reactive power exchange between low and medium voltage networks, heavy loading of the distribution transformer, and large network losses. The use of induction devices for voltage control is unrelated to social challenges and facilitates satisfactory control of low voltage networks [31].
The most popular measures for reduction of voltage limits are cosφ (P)-and Q (U)-local converter control, where voltage control uses consumer-owned devices. Both control strategies mitigate voltage damage by absorbing reactive power. PV controlled by Cosφ (P) is a converter that absorbs reactive power starting from the pre-set active power injection. This control strategy provides strong voltage regulation potential; however, it fails to consider the actual grid voltage. Thus, it causes excessive high Q flows and losses, especially at high loads [31,44]. This shortfall can be remedied using Q (U)-control, which reduces Q-traffic and additional network losses; however, it unevenly distributes reactive power compensation fee among participating consumers. This issue may give rise to a new social challenge, namely, the discrimination of clients in the provision of ancillary services.
Normally, uncoordinated local Q controllers provoke uncontrolled flows of reactive power in superordinate networks [31,45]. This shortfall is widely known; thus, in many cases, utility companies use conventional Volt/var control technologies for step-setting of the distribution transformer (DTR) and coordinate reactive power devices [31,46]. The implementation of such coordination at low voltage levels requires large-scale data exchange among consumers and DSOs, ensuring stringent data privacy requirements [31].
Modern DG systems are connected to AC networks via active-front-end (AFE) power converters. With the increase in their share, power systems with AFE power converters must be provided with additional system services and support measures in the power grid [40,47]. Irrespective of their factual application, they must be engaged in grid voltage and frequency control in line with the national network codes, e.g., regulating wind turbine systems [40]. First, at the level of DN, power converters will play an increasingly important role aimed at fast and balanced control of voltage and reactive power [47].
Contingent on the implemented control strategy or operating method, AFE power converters can be grouped into networking and grid-feeding converters. In AC micro-networks, networking AFE power converters are used as AC voltage sources with low output impedance to determine the value and frequency of the grid voltage locally. They can ensure uninterruptible power supply (UPS) and good quality high output voltage; however, they must have an appropriate power storage system. In contrast, grid-feeding AFE power converters are used to deliver active and reactive power to the already energized grid, whereas active power flow control can be limited to real adjustment [40].
In recent years, increase in the DG in DN stimulated the use of multi-agent systems (MAS) to control the operation of systems and solve issues faced by DN. MAS is a management system consisting of a large number of controlled agents. An agent is an autonomously operating system that uses the data collected by sensors to perform control actions and affect the environment.
Based on management architecture, MAS can be classified into three different categories: (a) centralized management, (b) decentralized management, and (c) distributed management. In a centralized management system, the control center collects information from all DN agents and uses the collected data to calculate the optimal control action for each agent. The operation of the centralized control method depends on the reliability and speed of the used communication system. This means that to eliminate communication failure and increase the overall system efficiency, a high-performance operation will be expensive and complex [39].
Hybrid renewable energy systems (HRES), which are based on DG, have become the latest trend among renewable energy systems due to demonstrated results in the improvement of overall performance and reliability [35].
Generalization: With the development of an active distribution grid and the increasing number of various distributed resources, loads, energy storage systems, as well as changes in the structure of the power grid, the traditional distribution grid faces a voltage change caused by the integration of the photovoltaic energy generation. In order to maintain the voltage level, the operating mode of photovoltaic converters and capacitor batteries must be properly coordinated and controlled.
In the real world, the evaluation of objective function can be difficult, discontinuous, and/or dynamic, while constraints applicable to the real world may demand an approximate response under the condition of limited time or resources, promoting a heuristic approach.

Energy Storage Systems in Distribution Networks
Aiming to move from conventional power systems to smart grids, energy storage becomes a relevant issue. Energy storage in DN is an excellent way to increase the efficiency, quality, and reliability of such systems, providing a significant advantage over fluctuations and allowing frequency and voltage control in distribution systems [18,48].
Rapid development and increasing penetration of renewable generation, such as wind and solar power, new loads, such as electric vehicles, are just two trends that can stress the current grid by causing voltage variations larger than it is prepared for. Therefore, it is vital to find and implement economically efficient and sustainable energy storage and conversion systems [49][50][51].
Flexibly combining the generated electricity with the demand is of utmost importance. This flexibility may be achieved through two possible mechanisms: the demand-side response (DSR) or the energy storage systems (ESS) [52]. The demand-side response enables the end-users to actively participate in power markets by offering to reduce their loads in response to signals from local distribution companies (operators) requiring load management [53].
Energy storage plays various roles in various scenarios. Electricity users are interested in using the ESS to reduce electricity costs or increase profits. ESS can flexibly adapt at different time scales and may be considered as a variable energy source or variable load [54]. ESS may be operational at specific times or in critical situations [2,55]. These multifunctional optimizations enhance the reliability of power grid, considering the issues faced by transmission and distribution networks [56].
ESS devices can be used to address general power quality issues, such as voltage and frequency fluctuations, or use strategies to increase battery life, etc. [2,55].
Efficient and effective power system operation means the balance between sustainability, reliability, and cost-effectiveness. A large-scale energy storage technology may offer the potential to overcome some challenges faced by modern power supply systems in relation to transmission and distribution levels. Numerous research efforts have targeted access to the installation and use of large-scale battery storage systems [3].
EES may be divided into five main groups: 5. Thermal systems, e.g., intelligent use of heat, latent heat storage and heat absorption, and absorption systems [51].
In relation to the mentioned difficulties of the operation of the electricity networks and in pursuance of the control of electricity flows between generation and consumption, battery energy storage systems (BESS) are viewed as a viable option in evening out the fluctuations of the net load curve and in conditioning the renewable energy penetration [57]. Inclusion of BESS into the distribution/underground transmission level of the power supply system is mainly focused on the improvement of the flexibility of the power system by controlling the VER limitation, preventing reverse power flow, maintaining frequency stability, and ensuring the quality of power supply [3,58].
Out of various types of batteries, part of which are available on the BES (battery energy storage) market, Li-ion batteries occupy 55% of the market; however, the power supplied by the batteries can only satisfy demand on a low scale, suitable only for a local user or a microgrid [51].
Connection to an electric grid is the key component of fixed battery energy storage systems. Efficiency scale systems are comprised of power electronics. Different grid-connection topologies, load distribution between power electronics and grid level, to which the system is connected, are possible considering conversion stages of each device. Depending on the battery power and voltage and different types of power electronic, DC-to-DC converters and inverters/rectifiers are required. Different technical solutions for topologies are possible for grid interconnection, which may vary depending on the efficiency of energy consumption [60].
Energy storage systems must meet various criteria, such as: capacity reserve, short-term and long-term energy storage, fast reaction time, geographic independence (mobility or stationary application), energy density assessment, conversion factor, storage expenses, end use (e.g., network connected or separate), environmental impact, and storage terms [51,61].
Energy efficiency is the main indicator of the storage systems of battery energy operation, and it is compared among various scenarios. Since connection to networks require different conversions, high energy losses occur [60]. The battery is able to store and extract energy in high frequencies, therefore ensuring stability of frequency and voltage, and it is able to do that for a long time, that way ensuring the efficient optimization of energy control of renewable energy systems [61].
Scientific publications discuss sizes of photovoltaic and storage systems. One of the main problems is optimal battery size determination [51,62]. The placement of battery storage systems based on their sizes may be determined using various methods, with each method having its strengths and weaknesses. The complexity of the methods used also varies to a high extent, applying the methods that range from simple probabilistic methods to mathematical optimization strategies and nature-inspired methods [62]:  Probabilistic methods are the most intuitively appealing and have the most simplistic view of the battery sizing. The main concept is to use the stochastic approach to renewable sources, usually solar or wind while optimizing the size of batteries based on selected criteria [61].
 Analytical methods, which are sometimes referred to as deterministic methods, are among the most widely used approaches for sizing battery energy storage systems. These methods are based on the analysis of a series of configurations of the power system, and the elements of the system differ, which must be optimized following efficiency criteria [61].
Generalization: With rapid growth of electricity generation and demand, and with rapid development of electricity markets, the attention of researchers has shifted to the question of how to increase efficiency of the use of energy storage systems in distribution grids. Distribution of energy storage systems reduces fluctuations caused by renewable energy resources. These multi-functional optimizations increase the reliability of the power grid, taking into account the problems of transmission and distribution grids.

Load Control in the Power Grid
A reorganization of distribution systems is a nonlinear and multi-objective optimization problem. A multipurpose DN has many different purposes, including loss minimization, balancing transformer load, balancing supply load, maximizing supply load, and improving profile [63]. It was believed for many years that a sufficient amount of capacity margin ensuring the security of electricity generation is about 20 percent. Given the average demand across the year, the use of average generation capacity is below 55 percent. This relatively low utilization of the average unit enables to apply load control solutions that would allow moving loads from peak periods to non-peak periods. This would reduce the demand of additional generation capacities and improve the utilization of existing capacities, as well as increase the effectiveness of generation investments [64].
The electricity sector is also a key factor in the transition to more sustainable energy production/ consumption that guarantees the largest share of RES. As production must always match the consumption, the interrupted use of RES must be compensated in terms of consumption. Solutions are available to optimize the use of RES (i.e. storage, demand management); however, they all rely on accurate information regarding the modes of generation and demand [48].
The evaluation of a typical load curve of a day (also called load profile, load form, or load model) of a common client (industrial, residential, and commercial building) or a distribution transformer/substation is called load simulation [65].
It can be noted that energy saving highly depends on the type of load, especially on lighting loads. In fact, in cases of residential buildings and commercial companies, the major part of loads is lighting loads, whereas in industry it is motor loads [7].
Load control techniques:  Indirect load control is used in smart networks when reacting to demand by using various programs that can change tariffs, surcharges, etc.
o Load shift: this method transfers loads to off-peak hours from peak hours. This allows avoiding the additional generation needed for peak demand.
o Valley filling is the process used to fill non-peak periods.
o Peak load is the program for the reduction of the peak load of a power system.
o Energy use efficiency is the reduction of used energy without compromising consumer's comfort.
Changes in consumer load in response to changes in energy purchasing price are called price-based programs: o Time-dependent pricing is the use of different prices for different day times, e.g., several tariffs.
o Real-time pricing is when the price for electricity is usually set for one hour or shorter periods.
o Critical peak price is used when system security is at stake or energy prices are too high.
 Direct load control is the direct load control when it uses various switching devices and systems [66].
Contemporary load profiling methods use clustering algorithms in combination with dimensional reduction based on historical data, creating static typical load profiles that could repeat during a year, considering seasonality and other data periodicity [48]. Load forecasting is crucial for prediction of inputs critical for other algorithms intended for distributed control systems, e.g. assessment of the condition, optimization procedures, voltage maintenance, optimal configuration, maintenance schedules, etc. Normally, a reliable load forecasting function is crucial for coordination of variable renewable generation with real demand, also considering active demand management and load strategies [65].
Generalization: A highly accurate load forecasting methodology may be beneficial for the economy and the environment by promoting renewable sources. Additionally, load forecasting is beneficial for network security by providing important information useful for determining imbalance and vulnerable scenarios in advance.

Reactive Power Reactors in the Power Grid
Power quality issues, such as a deviation in voltage, current, or frequency, result in malfunctions or interferences of the equipment possessed by end-users. However, energy quality challenges are not limited to harmonic distortion [67]. The standard IEEE 1159 classifies various electromagnetic phenomena of electrical system voltage (related to power quality issues): pulses, oscillations, deviations, surges, static deviations of the direct current, harmonics, noises, flicker and frequency variations, etc. Increasingly, more attention is given to dynamic reactive power compensation and harmonic elimination techniques (or power quality controller). Many ways have been suggested to solve this problem [68].
Conventional rotating synchronous condensers and mechanically switched capacitors or inductors were used for reactive power compensation. However, in recent years, a static var compensator (SVC) based on a thyristor and a static synchronous compensator based on self-commutating converters have been widely used for dynamic reactive power compensation [67].
Although reactors connected in series may be used to limit fault currents, shunt reactors are used to control var. Shunt reactors are used to offset the line capacitance effects, especially aiming to limit voltage rise in an open circuit or low load. The magnetically controlled reactor (MCR) is a device in which the DC pulse transmitted through special winding controls the inductance [69]. An MCR is based on the following principle: the control of magnetic saturation indirectly changes magnetic permeability of ferromagnetic materials or the magnetic resistance of corresponding magnetic circuit, ensuring less than 2-3% of basic harmonic distortion without the use of special filters [69,70]. Controlled reactor characteristics are stable, reliable, and flexibly controlled [70]. MCR improves power quality by automatic voltage control, reduction in fluctuations, and smoothing of reactive power surges. The damping of voltage fluctuations results in the increase of power stability thresholds, allowing it to transmit higher voltages [69]. Reactors can be grouped into two classes: those containing an iron core and those that do not contain any magnetic materials in the windings.
A magnetically controlled shunt reactor (MCSR) is among the key elements used in EHV/UHV transmission systems for reactive power compensation and surge damping [71]. Compared to stationary reactors and TCRs, they have many advantages listed below:  to control voltage support or any other operating parameter without the use of circuit breakers in an automatic switching system;  to reduce active power losses in networks and improve their operational reliability by reducing on-load tap changing of transformer;  to increase small margin of signal stability;  to improve damping of electrical system;  to reduce the use of synchronous generators as controlled source of reactive power;  to have flexibility [67].
In the literature, a MCSR is used as an energy quality device. MCSRs are commonly used to suppress surges, reduce secondary current, achieve voltage stabilization and reactive power compensation, and reduce voltage/current harmonics in EHV/UHV transmission lines. MCSRs seem to be multifunctional devices designed to improve power quality.
MCSRs operate together with a group of capacitors for reactive power compensation. A MCSR and a group of capacitors are connected in parallel. These capacitors increase the system voltage by generating reactive power while the voltage of power system increases. When this increase exceeds the upper threshold of systemic operation, a surge phenomenon occurs. Prolonged overvoltage causes system failure. An MCSR can be used to neutralize surges caused by capacitive effects of transmission-especially long-distance-lines. When aiming to compensate reactive power, the MCSR response rate is important. In a substation, MCSR can be used with its usual topology to increase the power factor and constant value. Under such circumstances, the power factor without MCSR is 0.8, but when the MCSR is installed into the system, the power factor improves by approximately 25%. The purpose of multiple compensations is to improve several system factors at once, for instance harmonics. Although these systems have a complex structure, they ensure a more efficient and greater compensation. Reactive power control can be facilitated by optimizing harmonics. This can be achieved using heuristic methods [67].

The use of an MCSR allows to:
 control the support of voltage or any other operating parameter without use of automatic switches in automatic switching systems;  reduce active power losses in grids and improve their operational reliability by reducing the switching number of connecting load shifting transformers;  increase the low signal stability threshold;  improve the damping of electrical system;  reduce the use of synchronous generators as controlled reactive power sources [72].

MCSR classification:
 power classification and applications.
The classification based on the power criterion is given in Figure 1. The power factor of a compensated system plays an important role in determining the control philosophy for the implementation of required MCSRs [67].

 Application in the case of low power
This application mainly concerns systems that have power output of less than 100 kVA. This is mainly associated with residential areas, commercial buildings, hospitals, and various small and medium production systems for cargos and drives.

 Single-Phase System
Electricity is usually produced as a three-phase alternating voltage in power plants and is transmitted as a three-phase alternating voltage across long-distance transmission lines. Even though single-phase systems are commonly used in residential power systems, some single-phase systems exist in industrial and commercial settings.

 Three-Phase Systems
Because high loads for industrial and commercial applications require alternating voltages, three-phase power systems are commonly used. Therefore, three-phase MCSR applications are mainly applicable to single-phase MCSRs, as are all three-phase applications.

 Application in the case of medium power
The second type is medium power applications with power from 100 KVA to 10 MVA. In the case of medium power MCR applications, the literature reports reactive power compensation, power quality compensation, the soft start of the induction motor, and damping of the electrical system.

 Application in the case of high power
High power applications are defined as those with power rating exceeding 10MVA. MCSRs are used almost entirely on EHV/UHV transmission lines [67].
Generalization: Having analyzed literature sources, one may state that the current research focuses on the evaluation of power supply capacities of distribution grid based on a single objective or a multi-functional objective. The single objective function mainly takes into account the maximum power supply, with certain voltage, current, and other safety constraints. The multi-functional objective takes into account such factors as voltage balance, load balance, and other factors based on the peak power supply. The optimization tools used for power systems are becoming increasingly important in ensuring an efficient supply of power to the grid. Areas of the energy system, in which these optimization tools are required, include the analysis of the energy system's performance, planning, and power control. To address issues in these areas, a different analysis of the objective function and limitations is required [24].

Optimization Methods, Designed for Optimal Voltage and Reactive Power Control
The objective function is the dependence of the optimization criteria on the parameters that influence its value. An optimization criterion or objective function is expressed by a specific optimization task. This way, an optimization task boils down to finding the extreme point of the objective function.
Optimization methods can be divided into three main groups: 1. Numerical (classical) methods

Artificial Intelligence (heuristic) methods
3. Deterministic methods [73] Numerical methods (classical) include linear programming, hybrid number programming, decomposition methods, and lagrangian relaxation methods. However, many inherited mathematical methods have some drawbacks, such as being stuck in the local optimum, or each of them individually being only suitable to solve a particular function of the OPF problem [74,75]. Stochasticity or uncertainty occurs in all power system problems described above. However, to date, it has not been possible to solve large-scale system optimization problems considering the stochasticity. Stochastic methods include Monte Carlo simulations, probabilistic programming, Pareto curves, and risk management techniques [24,73].
Artificial intelligence (heuristic)-among the artificial intelligence techniques, the main algorithms applied in power systems are genetic algorithm, particle swarm optimization, colony optimization, simulated annealing, and evolutionary computing. Some of the distinctive properties of artificial intelligence methods are the ability to remember past findings, the methods learn and adapt in their subsequent performances, and so on [73].
Deterministic methods include mixed-integer programming, linear programming, and so on. The summary of these methods is provided in Figure 2. Although there are other methods available, examples to define problem complexity are predominantly used. Classical optimization methods for the optimal control and optimization of the reactive power are as follows [28]:  Linear programming is a solution to optimization problems with linear objective function and permissible area defined by linear equations and inequalities. The main advantage of linear programming method is the guaranteed and well-formulated solution of a problem [25,28,67,75,76,77,78],  Gradient method [25,28,67,76,77,78],  Interior-point method [25,28,75,76,77,78],  Sequential quadratic programming algorithm [25,28,67,77,79],  Newtonʹs method [75,76,78].
Classical methods have various drawbacks common to them, including sensitivity to initial conditions and mathematical restrictions applicable to objective functions, such as convexity [25].
 Convergence to the nearest local optimum.
 The mentioned methods do not apply to cases of discontinuous function and tasks with several minimum points.
 However, the use of all these algorithms is impossible without complex communication networks that would be used to gather all necessary information [25].
Classical optimization algorithms are no longer suitable for optimizing reactive power in large-scale power systems [79]. However, in search of solutions to optimization problems, optimization algorithms copied from nature have been introduced that contain multiple variables, including both discrete and continuous ones, while also having global (local) optimum points [79].
In solving the reactive power problem, the variables are the voltage at the generator terminals, the position of the loaded transformer branch switch, and they are adjusted in the limited possible space of the parameter space [80]. Having evaluated such variables, a power grid system with the lowest active and reactive power losses is created. The transformer branch setting parameters are attributed to the discrete variables, and the reactive power output of generators without synchronous compensators are attributed to continuous parameters [79].
The optimal power flow (OPF) in power transmission networks poses major challenges to nonlinear optimization problems, which include many quadratic equations and constraints of quadratic uncertainties. Finding active uncertainty constraints is the most difficult part of OPF problem-solving. There is no direct solution to OPF problems without use of an intermediate optimization method to determine current active sets [81].
However, it is still not easy to get reliable OPF solutions that would be fully practicable in engineering of power systems. The search for better methods and software continues [82]. The principal objective of OPF is to determine optimal adjustments for control variables to minimize the selected objective function while meeting various physical and operational constraints dependent on equipment and the network. As the level of real energy generation and voltage value are continuous variables, and the transformer turns ratio and shunt capacitors are individual variables, the OPF problem is considered a nonlinear multimodal optimization problem consisting of a combination of discrete and continuous variables [75,83]. Due to the insensitivity of the OPF problem, several global (local) optima may exist [84]. These constraints that are difficult to solve by computation are often expressed in terms of linear constraints and matrix additional first-order constraints on the outer products of voltage vectors [85].
It is important to apply certain OPF problems in order to obtain global optimum [84]. Mathematically, the OPF problem is highly nonlinear and nonconvex due to multiple quadratic equations and constraints of quadratic uncertainties in relation to buses, hardware capacity, and the balance between power demand and supply [85]. These nonlinear constraints are mathematically unmanageable; therefore, the most modern nonlinear optimization solutions can concentrate on fixed points, which are not necessarily possible [85].
To handle these nonlinear constraints, it is common to reformulate them as linear constraints on the outer product W = VV H , of the voltage vector V = (V1, V2, . . . , Vn) T ∈ C n [85].
General OPF problem is given as the reduction of general objective function F (x, u) while satisfying the constraints g (x, u) = 0 and h (x, u) ≤0, where g (x, u) denotes the nonlinear equality constraints (power flow equations) and h (x, u), with nonlinear inequalities for the vectors x and u [78]. x is the vector of state variables consisting of load bus voltage VL, slack bus power PG1, generator reactive powers QG, and transmission line loading SL. x can be demonstrated in Equation 3 [78,86].
The vector u consists of control variables, such as active and reactive power generation, DC transmission line flows, controlled voltage parameters, phase shift angles, load MW, and MVAr (load reduction) [77,78].
Specific solution techniques are required when dealing with numerous constraints and problematic solutions:  Limits on power system apparatus and system operation can cause models and their sensitivities to undergo sharp state-dependent discontinuities.
 Practical decision process searches for a useful result following the priorities and rules pertaining to the objective, control, and constraining.
 Solution convergence is a relevant problem, where constraints at any decision point indicate a physically unstable or malfunctioning power system, particularly in the case of post-emergency mode [82].
Several general comments can be made about this calculation process and nature of the solution:  Realistic modelling of OPF system, constrains of power devices, network operation, etc. as well as objectives and priorities are complex, confusing, and non-smooth.
 Every efficient optimizer is designed to solve problems related to specific mathematical structures (such as programming linear, quadratic, nonlinear, or hybrid numbers); thus, the OPF problem must be re-applied in an appropriate form, which is outside the bounds of optimization measure.
 Each OPF iteration, the sensitivity between the objective, control, and constraint functions can also change unexpectedly. In a power system, some of these changes are difficult or impossible to be analytically formulated, even using complex hybrid numbers.
 Since realistic problem of OPF is not smooth, convergence is usually asymptomatic, and final solution usually depends on the sequence (route). At best, the solution to OPF problem can only be regarded as accurate considering its recent approximation.
 The number of OPF constraints can be large (up to hundreds of millions). A critical aspect of the overall OPF solution is one or more "external loop" processes intended for identification of those several constraints and emergencies that may link a possible solution. This is a particularly important heuristic and specific part of the power system's OPF decision process.
 Managing nonlinear constraints can be an advantage related to a network model as far as the pre-contingency. However, much of this advantage is lost with the introduction of constraints that arise following the situation, since for small systems, the only practical application is to adjust them in turn [82].
Optimal control of the reactive power system can cause minimal loss of active power and improve the voltage profile. At the same time, the reduction in the cost of reactive power generation is yet another important factor that cannot be ignored. Therefore, the objective function is formulated as a combination of three sub-functions [25].
where W1, W2, and W3 are the weight coefficients, which describe the preference of reactive power suppliers. Ploss, DV, and CQ are the power loss, voltage deviation, and cost of reactive power generation, respectively. The objective function (1) consists of three expressions. The first expression relates to the loss of active power, which can be calculated using energy flow equation: where PGi and PLi are the generation and the load at bus i, respectively, and remaining is the power flow from bus i. Yij and θij are the magnitude and angle of element of the Y bus matrix between bus i and j, Vi, Vj, and δi, δj are bus voltages and angles of i and j, respectively. The total amount of power loss in the electrical system can be obtained by calculating the difference between total generation and total load [25]: Total power loss can be obtained by taking the summation of Eq (6) for i=1,…, n.
The second condition of objective function is the deviation between the magnitude of the bus voltage and its reference.
where * i V is the reference voltage for bus i.
The consumption of reactive power generation, which is covered by generator, is calculated where NG is the generator index group, QGi is the reactive energy generated from the generator i. aQi, bQi, and cQi are the reactive power cost coefficients of generator i, determined respectively from active power cost coefficients aPi, bPi, and cPi, by using a modified triangle method. 2 2 sin sin where σi is the angle difference between voltage and current [25].
Generalization: Most authors who looked into reactive power flow optimization have focused their analyses on optimization problems that have a single objective function. However, modern technology revealed this to be a much more complex problem, which requires analyzing the prevalence of all variables and considering the current realistic scenarios with active generation points.
The purpose of a typical OPF solution is to meet physical and operational constraints of the power system and map control variables aiming to minimize (or maximize) the scalar target function. Normally, satisfaction of constraints and arrangement of controls in practically realistic conditions is more important than the absolute top-level optimum. Practical difficulties of optimization are related to solving multiple, incompatible objectives at the same time.
Artificial intelligence (heuristic) methods differ from traditional methods by their ability to find the optimum point without the use of the objective function gradient, therefore, as a result, the calculation costs decrease (by assigning time for sources). However, their local minimization is not as effective as the global optimization. In other words, it demands more time than the function minimization [76].
To solve the problem of optimal selection of power compensator in the DN, its place and parameters, many models based on artificial intelligence (heuristics and metaheuristics) were designed. These models work as search algorithms performing an overview of knots and lines of the system studied. Heuristic methods are based on the way computer systems can imitate smart processes, such as learning, reasoning, and comprehension of specific information [22,34].
Metaheuristic optimization algorithms are the processes that find the best answer to problems. The optimization process aims to find the value of variable by reducing or increasing the objective function with constraints [91].
These methods present extreme superiority in obtaining the near-global optimum and in handling non-convex and discontinuous objectives, and they are effective in overcoming the disadvantages of classical algorithms. Loss reduction, voltage deviation reduction, and stability improvement are the main objective functions that are assessed in solving the task of optimal distribution of reactive power [28]. They are suitable for using internet applications with frequent updates of control settings [25]. Specificity of artificial intelligence (heuristic) methods are in Table 1.

Method Method specifics
Genetic algorithm (GA) GA are adaptive heuristic search algorithms that are based on the ideas of natural selection and genetics [90].
These methods are well-known and often applied at the very beginning, when solving the tasks of optimal power flow based on heuristic search methods [76]. The iteration process continues until optimal solutions to the OPF problem are obtained [78]. Power distribution planning is performed using the genetic algorithm along with the Quasi-Newton Method, OPF, and branch exchange. A balanced GA with data envelopment analysis can solve multi-level power distribution planning problems with uncertainty [22,91].
There are several approaches to applying the task of voltage and reactive power. For instance, the use of preventive regulation for planning and optimal layout of the reactive power sources and voltage security improvement [90].
A genetic algorithm shows the optimization of a function. It is not an inherent optimizer as the function optimization is only a demonstration of the learning ability of this complex adaptive system [92].
Method advantages-possibility to find quite good solutions for the tasks with the unknown algorithms of an accurate solving process.
Shortfalls of the method-limited areas of use, calculating time, exponentially increasing with the number of independent variables. Care is needed in situations where the domain was selected exclusively for demonstration purposes [92].

Search with prohibitions (Tabu search-TS)
TS is an heuristic algorithm that commands the search engine to find the best fitting solution for a combinatorial problem [34].
TS is applied in finding an optimal solution for the DN operation [22]. The advantage of TS is that it reduces the need of data for the initial processing because TS automatically eliminates variables to a certain degree. These variables do not increase the classification for various problems analyzed as is the case with the variables with missing data or incorrect coding [93]. Effective execution to achieve optimal or suboptimal solution is the ability to avoid the local minimum [94].
Shortfalls of the method-relatively harder to encode due to the adjustment of multiple parameters, low accuracy factor.

Particle swarm optimization (PSO) algorithm
PSO algorithm is an iterative algorithm, in which the particles fly (move stochastically) in a multidimensional search-space [95]. Each swarm particle corresponds to a specific solution to the problem [78].
Moving, each particle adjusts its position according to its experience (referred to as local best experience) and the experience of particles near it (referred to as global best experience) and selects the best position [95].
Method advantages-PSO is the closest to the accurate solution, speeds up the optimization procedure by searching for the best point [93]. Similarly, if the calculations are limited for time, the algorithm for particle swarm tracks may become useful. Easy to encode with several equations, easy to find examples in academic literature [22].
Shortfalls of the method-relatively poor quality in searching for a global optimum, few examples in scientific publications [22]. It was found that the results of particle swarm optimization convergence are better than those of the genetic algorithms [76].

Evolutionary algorithm (EA)
EA emulates natural selection process [52]. EA is a metaheuristic population-based optimization process that converges a global optimal solution with unit probability to a finite number of evolution steps based on finite set solutions [22]. EA is not applied in searching for the solutions of energy control problems [96].
Method advantages-efficiently used in searching for a global optimum, easy to find examples in scientific publications [34].
Shortfalls of the method-although standard values usually ensure a reasonably good efficiency, different configurations might bring better results. Also, premature convergence to the global (local) extremal point may result from an unfavorable configuration and fail to produce (a point next to) the global (local) extremal point.

Ant colony optimization (ACO)
ACO algorithm is a new and evolutionary method for solving optimization tasks [76]. Lately, the ACO algorithm has been applied in solving various optimization problems, e.g., short-term schedule generation, planning of hydroelectric power plants, etc. The use of ACO algorithm allows reaching almost optimal network rearrangement [97].
Method advantages-easy to understand and encode. The solutions are improved one step at a time by estimating probabilities [22].
Shortfalls of the method-probability distribution deviations from iterations, unclear time for convergence, little examples in scientific publications [22]. Bacteria foraging (BF) This technique solves the problem of compiling an optimal feeder route [93]. This algorithm is inspired by the group foraging behavior of bacteria that will perceive chemical gradients in the environment and move toward or away from them [74,89]. There are three steps in the bacterial foraging algorithm following the search strategies, such as chemotaxis, reproduction, removal, and distribution [87]. The algorithm is suitable for a combinatorial optimization problem.
Method advantages-possible to find new solutions based on elimination or dispersion, short calculation periods, search-space dimension.
Shortfalls of the method-a very specific constraint handling mechanism, which is difficult to generalize, and also a large number of parameter values that must be defined by the user.

Simulated annealing (SA)
SA is a popular heuristic search algorithm. It is empirically illustrated in searching for global optimizations for combinatorial tasks [98]. SA is a computational simulation, during which the optimization problem is simulated during the annealing process [99]. The model helps in finding an optimal place and size of DG in order to reduce the power losses (PL), emissions (Epg), and contingencies with respect to a severity index (SI) subject to power balance constraints and generation limit, using SA as an optimization measure [22,93]. SA is a computational simulation, as a physical process, during which the optimization problem is simulated during the annealing process [100,101]. It is capable of escaping from the local minimum by including the probability function to approve or reject new solutions [102]. In a physical context, the premise is that metals can often reach a higher final energy state if they are periodically re-heated through their cooling process [99].
Method advantages-easy to implement, ability to provide quite good solutions for multiple combinatorial problems [22].
Shortfalls of the method-relatively poor quality in searching for a global optimum, long calculation period [22].

Artificial immune system (AIS)
AIS is connected to the network local search engine in order to solve the problems of power distribution planning under load indeterminacies [91].
Method advantages-easily adapts and evolves depending on the tasks performed. Artificial bee colony (ABC) ABCA is a relatively new optimization technique that mimics the intelligent feeding behavior of a bee swarm [75]. ABC algorithm utilizes only three control settings (population size, highest number of cycles, and restrictions) that are pre-determined by the user. The ABC algorithm is simple, flexible, and stable [79]. Even though the ABC algorithm may be applied for optimization problems, its solution may fall in the local minimum. Finding an optimal solution for a complex objective function then becomes difficult (e.g. multi-modal function with multiple local minimums) [22,103].
Method advantages-capable of processing complex optimization problems, easy to encode. Shortfalls of the method -few examples in scientific publications.

Differential evolution (DE)
DE is used to solve the problem of optimization by selecting a target function at several randomly selected starting points. Predefined parameter constraints describe the area from which the M vectors are selected in this initial population [22,102]. SE accepts the mutation as a weighted sum of the difference between the base vector and the vectors.
Method advantages-random search, less parameter setting, high throughput, and complex optimization problems.
Shortfalls of the method-unstable convergence, possibility of pitfalls in favorable conditions, lower accuracy rate.
Generalization: For the last 20 years, evolutionary algorithms has been the most popular method to solve the OPF problem. On the other hand, a tendency was found in the last decade to approach the OPF through swarm intelligence algorithms.

Discussion
 The effect on the quality of power changes as DN continue to provide services to new customers and producers, including electric vehicles and various distributed generators. This causes voltage fluctuations in the feeder lines, malfunctions of voltage control devises, overloading of feeder cables, variations in reactive power flow due to malfunctioning capacitor batteries and overcurrent, and failure of overvoltage protection devices. Therefore, it is important to choose the right optimization method for optimal regulation of voltage and reactive power.
 Energy storage systems in a distribution grid allows system operators to solve load problems caused by decentralized renewable energy generation. Appropriately integrated and controlled batteries can reduce power losses, contribute to voltage control, and provide the optimum compensation for active and reactive power in a continuously powered electrical system. A battery can store and emit energy at high frequencies, ensuring frequency and voltage stability, as well as for long periods of time, while ensuring efficient energy management optimization for renewable energy system. However, DG includes renewables, and in terms of optimization, these are additional uncertainties, as it is usually difficult to forecast any accuracy, short term or real-time wind speed, and battery loading over the coming days.
 Most current optimization methods only use DC network models, depending on the efficiency and size. Also, there is a growing need to incorporate variables and constraints related to reactive power into the problem, which accelerates the incorporation of AC network models, as approximate DC network models for reactive power planning may yield incorrect results due to their inherent inaccuracy.
 In the electrical system, condition variables include bus voltage values, relative bus voltage angle difference with respect to reference angle, while system variables are active and reactive power, generator voltage values, transformer tap, and phase switches. Therefore, it is necessary to find computational methods that can manage many control variables.
 Classical methods allow finding the global optimum of objective function, and when the objective function consists of discrete variables, the application of such methods becomes problematic. Besides, classical, purely mathematical methods require derivatives of objective function, which gives rise to many difficulties during the optimization procedure, e.g., the complexity characteristic to some function derivatives.
 Heuristic methods, during optimization procedure, use the objective function itself rather than its derivatives. Furthermore, they may be used to find the optimum point. Heuristic methods have overcome many drawbacks of traditional algorithms and they have been proven to be useful in optimization. The main advantage of each metaheuristic technique is its versatility in solving multifunctional problems and constraints as well as the need to find high-quality optimal solutions. Due to the development of smart grids and increasing number of distributed energy resources, future solution methods must be able to model and find optimal solutions to the problems of various types of constraints related to storage resources, renewable energy resources, etc.

Conclusions
The optimization tools used in power systems are becoming increasingly important in the complex task of efficient power supply to the grid. Power system areas where these optimization tools are required include performance analysis, planning of the power system, and power management.
Abundant control and optimization techniques have been developed for optimal reactive power control, such as deterministic and artificial intelligence (heuristics). There are several new objectives and constraints involved in applying new optimization techniques to the traditional problem of optimal power flow.
The primary goal of power system planning is to define appropriate generation and transmission strategy for efficient system use.
Selecting efficient logic for battery charging and discharging that can extend their service life is important, as well as selecting the right optimization method in order to get the optimum size of the battery storage system.
On the contrary to previous reviews of size optimization for battery energy storage systems, this review was conducted by the type of energy application-renewable energy systems. As we shift towards power generation for the renewable energy system, more sophisticated optimization tools will further be developed.
Most of the reviewed pieces of research examine the impact of high solar PV penetration in low-voltage DN in terms of voltage, loading of lines, cables and transformers, focusing less on other phenomena particular to networks.
The analyzed algorithms not only include modern and popular, but also historical, methods. This review presents heuristic methods that are used in solving the problem of reactive power control. Besides, it offers objective function and mathematical formulation to the problem. These methods are classified based on their objective functions; besides, they are grouped into evolutionary algorithms, physical algorithms, immune algorithms, and swarm algorithms. The discussion covers the use of methods, their strengths and weaknesses.
Aiming for optimum operation of power grids and high quality of power, all available data must be used. Extraction and analysis of such data allow assessing reliability and identifying relevant problematic areas (locations). This knowledge facilitates the ability of energy companies to focus on inspection and preventive repair efforts on the most vulnerable components and devices.
When recommending that a particular method outperforms others, you need to have all the required method input data and quantitatively compare the results to obtain the best method.
As data volumes will increase significantly in the future, integrating intelligent big data analysis tools is necessary. Selecting or developing new, more sophisticated methods is required to operate with large-scale data acquisition, and take automated real-time decision making into account.
Authors of many publications using these kinds of optimization strategies have failed to include grid constraints (voltage in buses, power flows through distribution lines and transformers) and assumed that the grid infrastructure had unlimited capacity.
Author Contributions: In this research activity, all authors were involved in the data collection and pre-processing phase, model constructing, results analysis and discussion, and manuscript preparation. All authors have approved the submitted manuscript.