Voltage Regulation For Residential Prosumers Using a Set of Scalable Power Storage

: Among the electrical problems observed from the solar irradiation variability, the electrical energy quality and the energetic dispatch guarantee stand out. The great revolution in batteries technologies has fostered its usage with the installation of photovoltaic system (PVS). This work presents a proposition for voltage regulation for residential prosumers using a set of scalable power batteries in passive mode, operating as a consumer device. The mitigation strategy makes decisions acting directly on the demand, for a storage bank, and the power of the storage element is selected in consequence of the results obtained from the power ﬂow calculation step combined with the prediction of the solar radiation calculated by a recurrent neural network Long Short-Term Memory (LSTM) type. The results from the solar radiation predictions are used as subsidies to estimate, the state of the power grid, solving the power ﬂow and evidencing the values of the electrical voltages 1-min enabling the entry of the storage device. In this stage, the OpenDSS (Open distribution system simulator) software is used, to perform the complete modeling of the power grid where the study will be developed, as well as simulating the effect of the overvoltages mitigation system. The clear sky day stored 9111 Wh/day of electricity to mitigate overvoltages at the supply point; when compared to other days, the clear sky day needed to store less electricity. On days of high variability, the energy stored to regulate overvoltages was 84% more compared to a clear day. In order to maintain a constant state of charge (SoC), it is necessary that the capacity of the battery bank be increased to meet the condition of maximum accumulated energy. Regarding the total loading of the storage system, the days of low variability consumed approximately 12% of the available capacity of the battery, considering the SoC of 70% of the capacity of each power level.


Research Motivation
The electrical system for transmission and distribution of electricity traditionally operate conceiving the energy flow unidirectional, from generation to final user, being responsible for conducting the energy resource in a safe, reliable, and uninterrupted manner. For this to be doable, a set of apparatus are used in all operational stages of the process. The increasing insertion of photovoltaic solar energy in the low-voltage distribution network, poses challenging problems for electricity utilities due to the intrinsically intermittent character of the solar resource. The passage of a cloud, for example, impacts the state of the network changing abruptly the voltage levels throughout the feeder, causing a reverse current increasing the electrical losses and favoring the instability between the phases of the feeder.
The aggressive input of the photovoltaic solar energy is posing new challenges for the routine of the electricity distribution companies, whether from operational, security, reliability point of view or from the intervention of infrastructural expansion. Taking Germany as reference, with an installed potential of 49 GWp registered until the end of the year 2019 [1], half of this installed capacity of PVS is integrated to low-voltage networks and take the form of roof systems, where 90% of these systems are lower than 30 kWp [2]. Not only Germany, but several other countries in the world, began to review their energy regulatory framework for a decentralized bias. Papathanassiou et al. [3] listed the various technical challenges for the insertion of distributed generators, among which were mentioned the problems associated to the quality of the electrical voltage in the common point of coupling. The work carried out by Bayer et al. [2] approached on the operational experience of several German distribution companies regarding the operational problems before the distributed generation. Torres et al. [4] presented evidences, experimental and theoretical, related to the emergence of overvoltage in the points of energy supply in a low-voltage urban power grid with predominantly residential loads, considering a clear sky day. In the work of Marcos et al. [5], a confrontation is carried out with the state of the art, where the author used the moving average technique to quantify the necessary requisition of storage to mitigate fluctuations of photovoltaic energy. Almeida [6] presented the following forms of mitigation of problems caused by the largescale insertion of photovoltaic solar generation: geographic distribution of generators, use of storage systems, and intervention in the parameters of the inverters. Resch et al. [7] analyzed the possible alternative applications with battery energy storage systems (BESS) to optimize the penetration of distributed generation (DG). In Chamana et al. [8], a proposal was made to use BESS to mitigate power ramps, the author used a medium voltage (MV) grid context, regulating the voltage at a specific point in the grid, the control was based on the state of charge (SoC). In a similar context, Zeraati et al. [9] used BESS to control the increase in voltage in low voltage (LV) grid, and the author used a coordinated control algorithm for BESS participation and SoC monitoring.
In Booth et al. [10], several procedures for power variability calculations are defined. As an example, it can be conceptualized as follows: the difference between two end points of a 1-min interval, or the difference between the maximum and minimum points comprised in a time interval (∆t) [11]. In the article of Ghaffarianar et al. [12], an analytical study of voltage stability in a radial system using the 34 node feeder (IEEE 34) with voltage levels of 24.9 kV and 4.16 kV was proposed, using a permission coefficient for penetration of distributed photovoltaic generation (DGPV), and the results were used to illustrate the positive and negative points in an electricity distribution network in face of the DGPV insertion.
As reported in this topic, the research field focused on the impacts regarding the high level of penetration is intensifying, and some countries have already anticipated the norms that regulate the acceptance rate in the face of power fluctuations. For example, in Ireland, a positive ramp rate registered was of 30 MW/min, and, in Hawaii, a variable ramp of ±2 MW/min. In Denmark, a power ramp of 100 kW/s is acceptable [13]. Yet, there are no requirements regarding the regulation of standardization of ramp rates in Brazil.

Contribution of This Work
This work proposes a technique for the regulation of overvoltage. The tool is based on the use of storage unities aiming to partially divert the reverse power flow. The stages consist in short-term solar irradiation forecasting, after which the voltages are calculated by the real modeling of the power grid and execution of the power flow calculation. The values used as limiting criteria were related to the critical and precarious voltage limits, both dispatched by the regulatory document called Procedures Distribution Electricity (PRODIST) in its module 8, responsible for issuing the parameters related to the quality of electricity.
The great contribution of this work is to anticipate the state of the network through any condition of solar irradiation in residential distribution networks. The study scenario for a distribution network is quite complex, resulting in the suppression of information tending to incomplete results. Therefore, the proposed model, in addition to presenting possibilities to be shipped in a microcontrolled system, can be used as a method of study by electricity distribution companies, representing as much information as possible of the elements that make up the electrical system. The use of electric batteries is restricted only in the charging situation for this work, aiming at voltage regulation, but another context can be explored in relation to the feasibility of electrical storage to compensate electrical energy at different tariff stations.

Characteristic Profiles of Solar Radiation
The energy incident on the terrestrial surface suffers variations throughout the day, month, year and latitude. The variation of solar radiation is presented in two primordial components: one deterministic and the other stochastic [14]. With a given set of equations inferred from the geographical and geometrical analysis of the position and relative earthsun movement, it is possible to calculate all the solar resource incident on a generic surface, this fact characterizes the deterministic component [15]. The stochasticity of the solar radiation is given in the alterations of a set of atmospheric factors. One example of this is the randomness of the passing and approaching of clouds and the sporadic shading by passing objects. In short, the behavior of the solar radiation depends on a very complex scenario before the stochastic and deterministic nature. The graphs in Figure 1 contemplate the typical profiles observed on terrestrial surface.  The variability phenomenon is attributed to the weather characteristics of the day in question, evidencing outlines of randomness impacting the daily profile of solar radiation [14]. Such an aspect is quite relevant before the distributed generation scenario, raising the level of risk offered to the electrical system, and the degree of this risk is significantly attached when there is high massive insertion in low capacity networks, for example, remote cities located in islands and away from large urban centers. In this scenario, challenges emerge for the creation of strategies that attenuate the adverse effects caused in the electricity quality [16]. Another overriding factor concerns the location of generators in secondary distribution networks, classified as: residential, commercial, or rural [17]. The secondary distribution networks very often operate asymmetrically, compromising the loads balance, this happens because of varied topologies for connection to the power grid, presented in single phase, two phase, and three phase [18]. That way, it is correct to say, for this context, where an electricity distribution system is equipped with photovoltaic generators, the electricity quality is intimately associated to the power fluctuations and to the charging profile of the power grid.

Solar Irradiation Forecast
Techniques to forecast the solar radiation have been a much-discussed subject in several research institutes. The well-elaborated forecast helps to plan and operate the electrical system, always implying economic and operational advantages. As regards the problem of guaranteeing the access and the integration of solar energy for all users of the electrical system, it is necessary to adopt measures of mitigation for possible impeding occurrences to the reliable operability of the electrical system mainly before a situation of exposure of a photovoltaic generator to a condition of high variability of the solar resource. Figure 2 associates the objectivity and the utility of the forecasting system as the several procedures and requisitions necessary for the operation of an energy system.  When envisioning an electrical system of conventional power, the quality and stability problems are largely most strongly related to disturbances caused due to too many drives of electrical loads [6]. Going deeper in the definition, the concept of voltage stability then emerges, referring to the ability of a system to recompose and keep the voltage level in permanent regime in all the nodes after being submitted to a stress [19]. However, imagining a scenario of distributed generation in secondary distribution networks, is it foreseeable, the increasing probability of occurrences of momentary disturbances in the electrical system, given the strong correlation between the photogenerated power and solar radiation? In the face of all the reported experiences, new more elaborate techniques emerge daily in order to improve and guarantee the safe insertion of photovoltaic generation. The use of solar radiation forecasting models becomes a crucial task to ensure the operative stability of the network, as well as its expansion [20].

FORECASTING OBJECTIVE
When it comes to short and long-term forecasting, there are several developed predictive models proposed, taking into consideration the geographic localization (latitude), climatological variables associated (radiation, temperature, wind speed, pressure, humidity), prediction time (one minute, five minutes, fifteen minutes, hours, days, months), and models from the simplest, based on the moving averages, to more complex models, using machine learning and artificial intelligence, a thematic that will compose the methodology of this work.

Recurrent Neural Networks
The recurrent neural networks (RNN) have the sensibility of perceiving all the processing history throughout the neural network, the response in function of the input is reached in a complex manner, thanks to the mapping of the entire path referring to the previous inputs, through reverse feeding. For time series with dynamic characteristics, the RNN has high representativeness in terms of efficacy [21]. A simple graphic structuring of this kind of network is presented in Figure 3. The RNN input parameters are entered at each time step, in Figure 3, and the input sequence is cadenced by the previous time (i (t−1) ), current time (i (t) ), and the predicted time in the future (i (t+1) ), mathematically symbolized by one vector. Information passed on entry are weighted by a multiplier denoted by W. The output value O (t) will always take into consideration the information of the previous stage K and the multiplier weigh value S. Considering the stages in Figure 3 where B1 is the processing result in the previous time O (t−1) , the current stage (B2) is mathematically expressed by: The output of a neural network uses activation functions (σ) and trend constants (c) to delimit the results, considering this parameter, and the output O (t) in the current stage B2 can be determined by: A derivation of the RNN is the LSTM (Long Short Term Memory). In the work proposed by Wang et al. [21], the advantageous points of LSTM are reported. In Vassalli [22], a detailing is made about the entire operability of the LSTM network. Specific LSTM applications reflected to the production of power from photovoltaic systems were proposed by Abdel-Nasser and Mahmoud's [23]. In Figure 4, the structural diagram of an LSTM network is presented.
From the representation of an LSTM, Figure 4, the long short-term information is, respectively, denoted by the variables M (t−1) and H (t−1) . That way, considering a given physical process, the LSTM neural network is able to decide on what is weighted in its learning. Still according to Figure 4, the memory history (M (t−1) ) is passed through a filter (forget gate) signed by the multiplication operator located in the upper left portion of Figure 4; in summary, the forget gate (STG 1 ) controls the information after passing through the sigmoid function. The subsequent stage (STG 2 ) will include the type of information that will be stored in the cell, and H (t−1) passes through by a sigmoid filter, again, and a tanh, obtaining the respective numerical values and updating the current state of the cell to M (t) . Finally, the STG 3 delivers an information preceding the output made compatible by a sigmoid function, generating a real value for the output y (t) ; however, the current state is updated for the short-term memory (H (t) ). x(t+1) NEXT STEP

Electrical Problems Associated to the High Variability of the Solar Radiation
As mentioned in Reference [24], an electricity consumer can integrate a photovoltaic generator at their residency or business, respecting all technical operative requirements [24,25]. Figure 5 synthesizes separately the power flow dynamics using a simple diagram characteristic of a power system. The representation can be integrated to a more complex system, with more consumer units, nodes, and photovoltaic generators.  When examining Figure 5a, the residential load is directly connected to the network through the Z E impedance, and it represents the branch connector responsible for physically interconnecting the residence to the electricity supplier system; this circuit does not share other loads. The equivalent impedance of the network, for simplification purposes, is represented by the variable Z G , and this element serves to represent the equivalent impedance of the network, seen from the load. The impedances (r + jX) can be presented as function of their resistive (r) and reactive (X) components, and the predominance of both components is dictated by the operative and constructive characteristics of the network influencing the resistance/reactance (X/R) [26]. In addition, in Alves [17], reports regarding the X/R ratio of distribution networks are found, where a strong predominance of the resistive component can take this ratio to a value lower than 1.0. Being P L the power demanded by the network, the loads in an electric power system represent the global consume, regardless of the consumer class, among the several load models, and the following stand out: power, current, and constant impedance [27], Still referring to Figure 5a, it is emphasized that the low voltage electrical system was initially designed for this operation mode, where the direction of the voltage drop between the nodes is always on the consumer side (V G > V C ). Contrasting this initial analysis, Figure 5b considers the absence of residential load or a relatively tiny one before the photovoltaic generator; then, we have P PV > 0, and, assuming such facts, all the energy flow is reverted to the power grid; in this principle, the voltage in the connection point of the photovoltaic generator will rise in function of the amount of power inserted (V PV > V G ).

GRID
Both Figure 5a,b represent connections where the load flow will occur in only one direction, sometimes direct, sometimes reverse. Considering initially the energy flow that comes from the source (GRID) to the load (P L ), it is possible to formalize the voltage variation mathematically in the source (V G1 and V G2 ) and load (V L ) sources by the following, Equations (3) and (4): The network sections of the feeders and secondary distribution branches predominantly present only the resistive components of the impedance due to their electrical and geometric characteristics [18]. In this context, Equation (5) is represented despising the reactive component of the connection branch of the residential consumer unit, expanding it to (6).
Equation (6) demonstrates that the voltage in the load node is given by the difference between the voltage in the network node and the voltage drop (V r E ) throughout the conductor of the connection branch. The branch impedance, for considering, most of the time, the intrinsic factors of the projects, is a simple conductor, and so the impedance is intimately linked to its characteristics, such as: cross section, material used in manufacturing, and linear length of the conductor.
In view of these reflections, the challenge is truly attached in situations of microgenerators positioned in residential preponderance feeders, when it involves the dynamics between the solar irradiance, photogenerated power and power demanded by the residence. A more contemporary view of a low-voltage system is presented by Figure 6. For the circuit exposed above, the electrical variables Z G , Z C , V G , V L , P PV , Q PV , P L , Q L , I PV , and I L , are, respectively: network impedance, impedance of the consumer interconnection branch, voltage in the network node, voltage at the point of delivery to the consumer, photogenerated active power, photogenerated reactive power, active power demanded, reactive power demanded, photogenerated reactive power, photogenerated current, and current demanded by the consumer unit. For calculation purposes, it is known that the components of active and reactive power compose the respective complex powers.
Maintaining the positive signal convention for the unidirectional current flow and assuming that, in this analysis, P PV >> P LOAD , there is the complex power that will flow reversely through the Z G , and Z C will be obtained by the difference between the complex powers of photovoltaic generation and load: Assuming that the photogenerated power is higher than the demanded power, the photogenerated current (I inj ) that will flow from the load node towards the substation node is expressed by: Polarizing the voltage drop in function of the direction of the current injected by the photovoltaic system, the voltage variation is shown in Equation (9) the potentials are explained through Equation (10), expanded: With the representation of photogenerated current as a function of power and voltage, the voltage drop in the load node is obtained: In the work of Borges [18], it is mentioned that the angular aperture between two nodes in a distribution feeder framed in LV grid is practically zero. In Lima et al. [28], the angular invariability between the nodes in the LV distribution system is also reported. Therefore, for the calculation of voltage drop between the nodes, only the real component of the numerator of Equation (12) is considered.

Restrictions of Voltage Limits
The most common technique for the maintenance of electrical voltage stability is measured by the excitation control of the synchronous generators, the action is performed by the Overexcitation Limiter (OEL) by preventing the injection of reactive power by the synchronous motor [29]. Throughout the transmission and distribution circuits, the voltage stability depends on the transformers, specially to the equipped with the OLTC (On Load Tap Changer) allowing the automatic regulation of the voltage levels throughout the network [30], and this type of equipment is located in medium voltage primary distribution networks serviced in high and medium voltage networks. The graphic representation of the permissible voltage levels is illustrated below in Figure 7. The steady-state voltage must be monitored throughout the distribution system and the utility must intervene in the power grid in order to ensure the maintenance of the adequate voltage levels. The information in Table 1 is regulated by the module 8 of the PRODIST, document prepared by the Brazilian agency ANEEL [24]. The table data reflect values only for a given topology, where the base or reference value is in single phase 220 volts or three phase 380 volts. The quality of the voltage level in steady-state voltage level is evaluated by indicators, not exceeding 3% of precarious readings or 0.5% of critical readings within a set of 1008 valid readings [28]. Table 1. Classification of operational voltage ranges in LV distribution networks.

Voltage Classification
Single Phase 220 V Range (Volts) Three Phases 380 V Range (Volts)

Case Study
The current study was motivated by the inconstancies observed in the voltage levels in the attachment point between photovoltaic generator and a residential consumer unit (prosumer), and it is noteworthy that the problem was verified in a real photovoltaic system with operation permission granted by the local utility in the region, properly equipped with climatological sensors instrumentation connected to a referenced CR1000 data logger manufactured by Scientific Campbell. The Logger Net software is responsible for the daily collection of data involved in this study. In this panorama, it was calculated the state of the power grid in the Time-Series mode, at every 1-min interval, considering the presence of photovoltaic generators and the following sky conditions: clear, cloudy, and intermittent. The application was based on a real low-voltage feeder, seen in Figure 8, and more specific parameters and characteristics will be explained next. Figure 8 presents the real scenario that was modeled in the operational software. The single generator unit present is seen, with rated power of 5.1 kWp and synchronized in the network before the B9 node downstream from the substation (TR-75 KVA) which makes the energy flow available for the circuit, where the primary of the respective transformer is connected in delta (∆), and the secondary is connected in star (Y), with three phase voltages of 13.8 kV and 380 V, respectively. The interconnection point was monitored to serve as a basis for simulation studies. Table 2 presents the layout of the lines and nodes that configured the power grid under study.  The characteristics of the cable that compose the stretches of the circuits are shown in Table 3, where it is possible to associate the electrical characteristics of each conductor and their physical location in the stretches of the circuit associated to the column "Line" of Tables 2 and 3. Al25 mm² Trunk

Mitigation Method for Overvoltage
The purpose of this work is to mitigate overvoltages by anticipating the state of the power grid of a low voltage distribution circuit through the irradiance and temperature prediction tool of the photovoltaic cell in the generator arrangement. Thus, the calculation of the power flow is performed providing the results 1 min in advance, guaranteeing the precise decision making of the storage system. An illustration of the proposed method is shown in a flowchart format in Figure 9 below. The ultimate goal of this method is to ensure voltage regulation below the critical value. The goal of the initial stage, addressed by the power flow forecasting and calculation stages, is fundamental to feeding the model comparison block, based on the comparative results, and the need to insert the storage is decided and estimating the convenient level of battery power (P BAT ). The first verification step compares the rated voltage (V N ) with the critical voltage, according to the normative resolution of the module 8 do PRODIST [24], informed in Section 5. The comparison block, that limits the power injection (P inj−limit ), started from a permission threshold of P inj−limit = 2500 W; this value was used by analyzing the time series for 1 year of operation of the photovoltaic system used in Reference [4], observing the data of power injected into the distribution network and the voltage level at the common coupling point; with this, for this condition, the value of P inj−limit = 2500 W, it was correlated with 5% of the occurrences of overvoltage. It is noteworthy that there is no rule for establishing the power injection limit in the electric network, and the limitation is only considered in function of the available capacity of installed power in a given point of the electric network, supported by the norm of the local operator of the power system. distribution.

Database
The database used in this work was composed by a historical series of incident irradiance in the location of the study over a 21-month time horizon (1 January 2019 to 30 September 2020), the equivalent of 639 days. In addition to global irradiance, the operational temperature of the modules that equip the photovoltaic generator were registered, and the electrical magnitudes (voltage and direct current, power in alternating current, and network electrical voltage) were also collected. It is worth mentioning that the time interval of acquisition and registration of variables was of one minute; that way, 1440 data per day was obtained for each variable. The making of the database in this work was previously preprocessed and filtered to ensure the integrity of future results and the performance of the model of the neural network. After the refinement of the data, 503 days were defined, totaling approximately 725 thousand records of all the variables in the process. Data were segregated for the training actions and RNN LSTM test, arranging in 412 thousand and 311 thousand records, respectively. The procedure described can be seen in Figure 10. The modeling of the distribution network and its elements was the same considered in Section 6. For greater real representativeness in the results, some demand meters were used in the CUs adjacent to the resistance where the photovoltaic generator is located in order to record possible impacts in the voltage through the operational dynamic of the loads. The measure data in the adjacent CUs will serve also as parameters for future simulations in order to obtain better results in the simulations of the state of the network and the calculation of the voltage. To illustrate, after Figure 11, the composition of the demand curves and the operational temperature of the photovoltaic module regarding specific days are presented and will be used in the simulation of a CU equipped with the photovoltaic generator. Each subgraph below is associated with a condition typical of solar irradiation. Thus, the days of low variability, clear sky, cloudy sky, and high variability, refer, respectively, to days, 1, 2, 3, and 4. The dataset presented in the graphs above are relevant as input parameters in the simulation with OpenDSS to perform the power calculation in the Time-Series mode. It should be noted that the inverter efficiency curve and the rated characteristics of the photovoltaic generator are necessary for this calculation.

Forecasting Model of RNN LSTM
The combination of the solar irradiation forecast and the solution of the power flow from the feeder modeling results in the ability to anticipate the variability of the electrical voltage of the network caused by the high variability of the solar irradiance. The motivation to develop this method is intimately connected to the peculiar characteristics of the low-voltage network, such as: infrastructure, absence of instantaneous and retroactive information of the electrical variables, low level of electrical protection, and strong alterability of electrical loads. It should be noted that, for an installed capacity in a feeder, if there is a greater number of photovoltaic systems installed with lower power than the number of photovoltaic systems with higher power, there may be a situation of limitation of the hosting capacity much earlier in the first case than in the second. In this aspect, we come to the big questions: What is the maximum hosting capacity of the distributed generators in the feeder in question? The engineering professionals are able and equipped to analyze and grant permission for the insertion of distributed generators to the network, admitting reliability and operational security to it? The crucial point of the purpose of this study is attributed to the performance of the LSTM network, and this is where the solar irradiance forecast information will be sent. The first part of the proposed model is formed by the forecast stage set in a recurrent neural network LSTM type. The model was built and tested as explained in the previous topic, illustrated by Figure 10. Below, Figure 12 shows the flowchart of the steps of the definition and validation of the model of the neural network used. The model defined runs the solar irradiance forecast for every 1 min ahead, based on the 20-min retroactive information from historical series of solar irradiance measured by the local solarimetric station. In parallel, the photovoltaic sensor serves as a reference standard for the predicted value, and for future recalibrations of the LSTM neural network. The concern with having a high performance for the neural network is vital for the subsequent steps, of the global method (Figure 9), to reach an accurate and coherent value.

Storage System Planning and Definition
The battery system can be allocated directly in direct current (DC) next to the photovoltaic modules or it can be connected directly to the power grid through an interface converter to synchronize and make the batteries compatible with the electrical system. In this work, the control of the battery is centered primarily on the forecast of solar radiation and the temperature of the photovoltaic cell; after that, considering a feeder already modeled, the power flow is calculated through OpenDSS, allowing verification of both voltages nodal as the powers injected into a bar. These results allow us to infer about the voltage levels, framing them in the operational restrictions. In practical terms, a view of the elements that make up the network with their respective variables is shown below in Figure 13. The planning of the instantaneous drive was initially based on the dynamic power situation (P dynamic(t) ) that flows through a connection branch in a UC. The dynamic power is due to the conditions of generation and demand, and a mathematical understanding is shown below, interpreting when any UC is operating under the condition of direct flow (consuming electrical energy), reverse (providing electrical energy), or in equilibrium (autonomous), as shown in (13). The dynamic power is calculated by the difference between the power generated (P PV ) and that consumed (P DMD ) by the residence, being defined the operation profile of the storage system: Under the condition of reverse flow, the idea of using the storage system is to limit the dynamic power, which flows through the grid extension that connects the common coupling point with the grid bus, to a maximum limit power, previously defined (P inj−limit ). Every moment that P dynamic (t) > P inj−limit (t) , there is a need to actuate the storage system through the control key, framing the storage system in passive mode. With this, the passive power of the battery bank (P BAT ) is calculated in: The modes of operation of the storage system are translated by the conditional Equation (15), from the result of the difference between photovoltaic generation and demand. The signal adopted for P BAT uses the positive convention for loading and negative for unloading. The conditions regarding the operation of the battery in terms of its operating mode (Charge, Discharge, and Idle) is interpreted by the following conditions: Charge, If (P PV (t) > P DMD (t) ) and (P dynamic (t) > P inj−limit ) Idle, If (P PV (t) > P DMD (t) ) and (P dynamic (t) < P inj−limit ) Idle, If (P DMD (t) > P FV (t) ) Discharge, If (P FV (t) = 0) and (∀ P DMD (t) ) .
The value of P BAT is closely linked to the value of P inj−limite , since, if the power limitation value is too low and the bank's capacity remains the same, it will reflect in the increase of depth of discharge of battery's (DoD), consequently reducing its useful life. As there is no rule for dimensioning the coefficient of P inj−limit , it is important to pay extra attention when assigning its value, as two situations can occur: high cost of implanting the batteries or inability to mitigate overvoltages due to early charging. For such a context, it is necessary to increase the capacity of the battery bank in order to maintain the state of charge (SoC) within an operational range that optimizes the life of the batteries. In Diaz [31], a method for calculating the battery capacity is presented can be calculated by the difference between the minimum and maximum limits. The capacity of the storage system can also be obtained by integrating P BAT , present in Equation (14).
The signal convention for the storage system operating modes is linked to a component P BAT . Table 4, below, synthesizes the mode of operation according to the main variables involved in the process. Table 4. Summary table of the drive profile of the storage system.

Operation Mode Battery Power PV Power Demand Power
Charge (Passive) P BAT > 0 P PV > 0 P DMD > 0 Idle (Neutral) P BAT = 0 P PV > 0 P DMD > 0 Discharger (Active) P BAT < 0 P PV = 0 ∀ P DMD The storage system was made possible at 4 power levels. The purpose of this configuration seeks to provide greater flexibility in the insertion of power; in addition to that, in the event of eventual maintenance of the device, this context would guarantee partial operation. Each power level corresponds to a ∆P different, where the first step is to limit the dynamic power that will be injected into the network to the minimum limiting values (MI N(P inj )) and maximum (MAX(P inj )). In that regard, the minimum value of the injected power is equal to the limit value of the power injection defined at the beginning of this section; thus, MI N(P inj ) = P inj−limit , and the maximum values will be arbitrated for every 500 W step increase. ∆P as a function of the dynamic power for each level is obtained from the set of inequalities below: 500 W, If MI N(P inj ) ≤ P dynamic ≤ MAX(P inj ), for MAX(P inj ) = 3000 W 1000 W, If MI N(P inj ) ≤ P dynamic ≤ MAX(P inj ), for MAX(P inj ) = 3500 W 1500 W, If MI N(P inj ) ≤ P dynamic ≤ MAX(P inj ), for MAX(P inj ) = 4000 W 2000 W, If MI N(P inj ) ≤ P dynamic ≤ MAX(P inj ), for MAX(P inj ) = 4500 W . (16) The total electrical energy given off in charge mode by all levels of the storage system is calculated from the sum of the individual energy of each ∆P BAT . The following, Equation (17), calculates and converts the global energy stored by the battery bank in Watt hour (Wh).
The charging for the mitigation of the storage system will start from a minimum state of charge of 70% of the total capacity of each level of the storage system, in such a way that, when the batteries need to discharge, usually at night, only 30% of the stored energy will be discharged. It is also noteworthy that the discharge depth will be variable; that is, in the condition of full charge, the maximum discharge depth will be 30%, and for an operating situation where it was not possible to fully charge the battery, the depth discharge will be relatively lower. This work is limited only to highlight the passive study of storage, so, in this stage, the battery discharge mode will not be considered.

Results
In this section, the results will be separated by topics, and each step will be discussed in isolation. In the end, the performance of the proposed method to mitigate the overvoltage promoted by the power produced by photovoltaic generators will be performed from a comparison with the voltage obtained experimentally if the system was operated on the respective days.

Result of the Forecast of Solar Irradiation and Cell Temperature
The estimation of the solar radiation and temperature of the photovoltaic module cell is the first task of the method,; all results practically derive from this function. As the objective is to ascertain the impact of the variability of the solar resource, as well as the mitigation in these conditions, and the results of this stage show only the days with the following climatological peculiarities: clear sky, cloudy sky, low variability, and high variability, in order to evaluate what each particularity of these days influence in the power grid.
For the prediction of solar radiation, the last 20 values were used, and the next value was estimated based on the trained model of the LSTM; therefore, the errors were calculated to evaluate the accuracy of the model. The RMSE calculated for the output values of the LSTM neural network reached a value of 78.52 W/m², along with a linear correlation coefficient of 96%. Right after, the graphs for the 4 typical days explained in Figure 14 are presented.  Figure 14. Results of predicted radiation compared to actual measured radiation.
The visual perception of the predicted and real solar irradiation graphs shows a great similarity in their behaviors, which are statistically ratified by the regression coefficient R² close to 95%, and Table 5 individualizes the performance results for each day. The performance parameters were compared with solar irradiation data measured by the datalogger, covered in Section 7.1; more details about the instrumentation and the measurement can also be seen in Section 6. Table 5 shows the performance information around the statistical metrics, RMSE, MAE, and Pearson, thus determining the accuracy of the prediction algorithm. The biggest error found was for the classification of the sky of high variability. The lowest values of RMSE were related when the forecasting model ran a day with lower rates of variability, that is, on days of clear or heavily cloudy skies, Figure 14b,c. On those days, the correlations between the simulated and the experimental profiles resulted in 0.99 and 0.97, respectively. In contrast, on the days of intermittent behavior with low or high variability, Figure 14a,d, the mean quadratic error increased to 96.39 W/m² and 121.36 W/m², respectively, followed by their respective Pearson coefficients of 0.92 and 0.89.
In the work of Campos Filho [14], an RMSE of 179.4 W/m² was found for a set of 267 1-min predicted data samples, and the forecasting system used was based on image processing. In the article published by Alzahrani et al. [32], a normalized RMSE of 0.078 for an LSTM neural network was verified; it is noteworthy that the author used a database of 4 days of measurement of solar irradiation acquired from a LI-200S sensor, in a sampling frequency of 100 Hz. In the article by Guariso et al. [33], a performance test of some prediction models was carried out; the author slices the results in a short term horizon (5 min) for the first three hours of the day, and the RMSE obtained by RNN LSTM, only with daily data, was 121.78 W/m². The interesting fact is that this result is very close to the value found for the day of high variability in this work, and the database that the author uses in his work is composed of 60% of the data classified as cloudy and partially cloudy.
Concomitantly, the prediction of solar irradiation in parallel with the prediction of the operating temperature of the cell was carried out, and the two information sets serve as subsidies for the calculation of the photogenerated power. In practical terms, the neural network provides a set of information on solar radiation and the cell's operating temperature for the respective days of interest. Soon after, in Figure 15, follows a graphical perspective of the results obtained by the predictor system compared to those measured experimentally.
The comparison between predicted and experimental data is compared based on performance metrics. The RMSE between the predicted and experimental value for the day of low and high variability, reached a value of 0.80 • C and 0.69 • C, respectively. For the clear day, the RMSE was close to 0.41 • C; for the cloudy day, the calculated RMSE was 0.13 • C. Some reports in the literature seek to evaluate the performance of the model according to the size of the observed data window. Chevalier et al. [34] obtained a better performance of the network using 24 data from past observations. In his thesis work, Sabino [35] found an RMSE between 0.6 • C to 1.6 • C varying in a time horizon of 1 h up to 24 h. The error values found in this work are in line with those found in the literature, thus enabling the application of these results in the next stages of this research.   Figure 15. Results of the comparison between the operating temperature of the real PV cell and that predicted by the LSTM neural network.

Determination of Power Flow Produced by the Photovoltaic Generator
In this step of the study, the photovoltaic generator power values of 5 kWp were obtained, considering the real solar irradiation and the previously simulated, in addition to the modeling of the distribution feeder, and, parameterizing and replicating all its real characteristics in the simulation computational environment in the OpenDSS, were elaborated from the answers of simulations of the LSTM neural network, observed in Figure 14. Next, the graphs in Figure 16 show a comparison between the real data monitored by an active power transducer in the alternating current (AC) output of the inverter and the power. Both the simulated values (Nowcasted) and the measured values were sampled every 1 min.
The power flow presented in graphical form in Figure 16; sketches on the left instant comparative of experimental electrical power and Nowcasted, and on the right are the representation of linearity between them, for various sky conditions profiles, along with the representation of linear dependency between predict and real magnitudes. Similar to what happened to solar irradiation in the previous section, when comparing the real power curve and calculated curve, a RMSE of 77.29 W was observed in a cloudy sky day, while, on a clear sky day, a RMSE of 230.91 W was reached. In reference to Pearson's correlation, coefficients on a clear sky day resulted in 0.98 and 0.93 in cloudy sky days. This occurs because, on cloudy sky days, the photovoltaic system operates in lower load for most of the day, resulting in imprecise measurements because the transducer operates out of its optimum point.  For days characterized as intermittent, the error metrics were established close to each other. The higher RMSE value for the power was slightly higher for the day with low variability Figure 16a, reaching a root-mean-square error of de 276.21 W, in terms of percentage variation; the day with low variability was 0.76% above the RMSE obtained for the day with high variability, in Figure 16d, in which a RMSE of 274.12 W was calculated. In general, the calculation for PV power production shows good fidelity, considering an average of all variables between the days analyzed, and there are good linear correlation metrics (R² = 0.96), root-mean-square error (RMSE = 214.57 W), and mean absolute error (MAE = 173.60 W) for the data estimated and observed in a period of 12 h (6:00 a.m. to 6:00 p.m.).
The low loading of consumer units during too many solar irradiation rates favors the emergence of overvoltages. It is noteworthy that the power flow simulation for the state of the network was calculated using the time series of the demand curve for the respective days. In Figure 17, the combination of factors that corroborate the intensification of the power injected into the network are presented, delivered in the form of reverse power flow, another factor that justifies the voltage overshoots. With the confirmation of the rated voltage above the critical voltage, the proposed method performs the next step, performing the calculation of the injected power and conditioning it to the allowed limit (P inj−limit = 2500 W) previously predifined. For each day, the following figure shows the reverse flow (P dynamic (t) ) detecting the moments when the permission for injection limit value is exceeded.
In practical terms, the cloudy day is the only one that observes the lowest injected reverse power, justified by the low index of solar irradiation; in addition to this fact, the demand profile also helps in the reduction of the reverse power. This analysis already confirms that the injected power limit is not exceeded, ending the process. On the other hand, on the days with the highest activity of solar irradiation, for high variability, 30% of the occurrences of exceeding the power limit were obtained when compared to the day of low variability. The day of clear sky surpasses the day of high variability in instances of exceeding the power limit, reaching 33% more occurrence than the day of high variability. In Table 6, below, are the metrics of overvoltage and over power as a function of the total time period analyzed.   Classification V N > V critical V N < V critical V N > V critical V N < V critical P dynamic > P inj−limit P dynamic > P inj−limit P dynamic < P inj−limit P dynamic < P inj−limit The data explained in Table 6 reveal the frequencies of occurrences of the total time that exceeded both the critical voltage and the limit power, simultaneously. It is noticed that the greatest impact on the tension occurs on the day of high variability, marked at 33%, while the overpower is registered at 43%; this information is significantly above the numbers obtained for the day of low variability. The curious fact is revealed for the day of clear sky, where there is the highest percentage of occurrences of the power overrun. In contrast, the overruns of the voltage limit is minimally represented by 12% of the events that occurred. This condition is associated with the absence of power fluctuations for a clear day, allowing the power to be injected into the distribution system smoothly, without providing severe disturbances in the power grid.

Short-Term Voltage Regulation
The final step presents the results of the calculated stress profile compared to the mitigating stress profile, obtained through the proposed method based on the storage system. The attributes inserted in Table 6 are used to measure the phenomenon of overvoltage in simultaneous events, in addition to illustrating the global panorama of the events that occurred in the simulation. The solution of the problem was carried out in a period of 12 h, totaling a dataset of 720 samples for the classifications of the type of sky used in this work.
In Figure 18, all the graphics on the left side depict the dynamic effect of inserting the storage system in mitigating short-term overvoltage. The green curve, called the nominal voltage, is under the absence of the mitigation strategy. The blue curve alludes to the voltage profile submitted to the mitigation strategy. The composition of the images in Figure 18 was prepared in pairs, concatenating the voltage graph with the respective power graph drained by the storage system.  The strong relationship between the voltage at the supply point and the reverse power flow is quite evident in all scenarios. Taking the high variability day as an example, the storage system drains approximately 5042 Wh of electrical energy; this amount corresponds to 22.56% of the useful energy that would be injected into the distribution network by the photovoltaic system. The clear sky day, highlighted by having a large volume of electricity production, manages to minimize the storage of electricity in the battery. The total energy to be injected by the clear sky is 29.976 Wh, and, in view of the need to stabilize the voltage momentarily, the storage system drains 2733 Wh of the electricity produced by the photovoltaic generator, corresponding to 9.12% of the total energy volume produced. It is normal to question why the clear sky day minimizes the amount of energy, and the answer is linked to the power ramp rates at the output of the photovoltaic generator. The high variability day is responsible for disturbing the voltage at the supply point too much; on the other hand, for the day of clear sky, no matter how much the injected power is higher than the maximum limit and for most of the day, the injection happens smoothly and gradually. In the work prepared by Torres et al. [4], a method was proposed to attenuate the overvoltage using redefining the connection from single-phase to three-phase inverters; however, in the case of low-power generating units, the commercial solution does not exist, the work being restricted only in the theoretical field. Xie et al. [36] developed a study to relieve the stress of electric power distribution systems and reduce the number of OLTC operations; for this purpose, an intelligent search algorithm acting on controllable loads (CL) was used. As a practical application point of view, in the article by Bayer et al. [2], some reports are presented regarding the problems of overvoltage in distribution networks in Germany, and how the distributors are mitigating these problems.
Regarding the activity of the storage system, the effect on the regulation of the operational voltage used in the model proposed in this work is verified. In the work of Liu et al. [37], a coordinated control between electrical storage systems and switched transformers was used, relieving the stress of the regulating transformer in the overvoltage mitigation activity; the method proposed by the author stabilized the voltage at values below the critical limit, remaining below 1.04 pu, maintaining the DoD of the battery by 20% for the largest mass insertion of PVS. The wear of a conventional voltage regulator is associated with the number of excessive switching.
Some studies prove that the high rate of solar intermittence promotes the excessive switching of OLTCs [38], decreasing its efficiency [39] and reducing device life [40]. In this context, since the storage system works under battery group switching, Figure 19 shows the amount of switching performed for each ∆P BAT used for each type of power variability profile. Setting the high variability day, the high switching rates in the entire power range are clear and understandable, reaching the peak for ∆P BAT = 1500 W, and, in this same power group, the number of switchings exceeds by 100% the amount of switching in a day with low variability.  Another major factor for extending battery life is the control and monitoring of SoC for each power group. Within this context, a well-designed battery management system (BMS) is vital to the safety and longevity, and accurate SoC monitoring is carried out with current sensors; however, there are almost always practical restrictions in specific applications [41]. Faced with this problem, in the article by Wei et al. [41], a method without current sensor is proposed using a method of co-estimation of the online load current and SoC, eliminating the need to install a sensor, as well as reducing the final financial cost.
The task of regulating the voltage by deviating the power flow leads the storage system to operate passively, in load mode. At each charge stage, the cycle needs to be completed with discharge, always preparing the battery for the next day and maintaining its minimum state of charge. Figure 20 illustrates each state of charge by witnessing each power group in isolation. Once again, the highlight for the day of high variability is perceived, in which it is possible to fully charge the batteries in the 500 W, 1000 W, and 1500 W stages. In some profiles of power variability, the battery system does not reach its full load; this aspect can be considered a negative point from the energy point of view, when, for example, it is desired to compensate the energy in different tariff posts. For the 500 W storage group, the day of high variability required 325% more storage capacity compared to the day of low variability, while the day of clear sky did not act at this level of power, remaining in idle mode. Still showing the day of high variability, it stands out from the day of low variability, with the need for greater storage capacity for the levels of 1000 W and 1500 W, establishing a percentage of 245% and 234%, respectively. This analysis is used as a criterion to define the energy storage capacity for each power level: (∆P BAT ). Unlike what happens at these observed levels, the ∆P BAT = 2000 W for the clear sky day is the only day that reaches full load; for the clear sky day, the need for energy storage was 253% higher for the day of high variability, and 237% for the day of low variability. Thus, Table 7 shows the values of the storage capacity for each ∆P BAT for each type of contour of solar irradiation. The variation of the C BAT for each contour level of solar irradiation suggests that, in practical terms, the operational storage capacity of the storage system is defined by the criterion of the largest capacity occurring in each range of ∆P BAT . The value of C BAT for the day of high variability is responsible for composing 75% of the power levels of the storage system. The remaining 25% of the operational storage capacity is filled by the day of clear sky, composing the ∆P BAT = 2000 W. In these molds, it is possible to obtain a storage system that meets the minimum voltage regulation requirements for the days studied, and it is also concerned with maintaining the charge status of the batteries.

Conclusions
In this work, the theoretical-experimental study was presented for the anticipation of overvoltage occurrences that may arise at the point of coupling between the photovoltaic generator, the residential consumer unit, and the electrical system of the utility. This work sought to anticipate the supply voltage profile to residential consumer units through the forecasting technique, differently from methods based on coordinated control mentioned in the introduction of this work. In the first step, the recurrent neural network (LSTM) was used as primordial artifice of short term (1 min) instantaneous irradiance forecasting; the data were duly validated for the respective days analyzed, finally assembling a data shape of solar irradiance to be used as input for the performance of the energy flow prediction, along with the prosumer and previously determining the voltage levels at the point of coupling with the network. These results, along with a mitigation strategy based on storage by batteries, were applied to avoid potential situations of transient overvoltage. It is important to reinforce the theoretical and experimental character of the work where extensive validations were made with detailed experimental data, involving the measurement of the prosumer and the point of coupling in the voltage supply. The most relevant and interesting results are listed below: • The mitigation technique proposed in this work was able to reduce voltage levels above the critical limit. For the days of high variability, there was a greater need for energy storage, of 84% more than the day of clear sky, in order to guarantee the mitigation of all points of overvoltage. • For a SoC of 70% of the minimum level of total storage capacity, the day of high variability reached full loading of the initial 3 levels of storage. In percentage terms, for ∆P BAT = 500 W, ∆P BAT = 1000 W, and ∆P BAT = 1500 W, it needed supplements of: 252%, 144%, and 134%, respectively, at each level of power. The quantitative percentage is related to the capacity of accumulation of electric energy for the day of low variability. • The number of excessive commutations was classified for the power class ∆P = 1500 W, where the number of commutations for the day of high variability was double compared to the day of low variability. The relationship between the number of commutations and accumulated energy was the opposite for the clear day, when looking at the class of power ∆P = 2000 W, and this fact is justified by the time that the battery system remained in a state of charge. • The RNN forecasting model for solar irradiance performed well in the absence of variability, the clear sky, and cloudy sky days presented with a Pearson's correlation coefficient of 98%. The parameters of RMSE were better for the day of clear sky and cloudy sky, at 47.84 W/m² and 5.69 W/m², respectively. As well as the MAE, for the days of clear sky and cloudy sky, they reached, respectively, 33.44 W/m² and 3.56 W/m². The days characterized as high and low variability showed higher values of RMSE and MAE, as demonstrated throughout the work, concluding with the fact that the neural network had low relative performance for the days with the presence of solar irradiation variability. • The model used to calculate the power converted by a photovoltaic generator in the OpenDSS software also presented an excellent profile when compared to the data obtained experimentally. The power flow calculation model based on the irradiation prediction achieved good results for all sky conditions. The days with low and high intermittence were validated with a Pearson's coefficient of 96% for both days, and the RMSE and the MAE were established in a range of 23.03% and 28.80%, respectively, tolerating the maximum load of the predefined inverter (5000 W).