scieee AI-readable full text Open interactive document viewer

Dynamic optimisation of unbalanced distribution network management by model predictive control with Markov reward processes

Álvarez Arroyo, César; Vergine, Salvatore; D’Amico, Guglielmo; Escaño González, Juan Manuel; Alvarado-Barrios, Lázaro

Abstract

In this work, a two-level control system is used to minimize the total active power losses of an active distribution system connected to the external grid and composed of a wind turbine, two photovoltaic power sources, and two batteries. At the first control level, a model-based predictive control (MPC) is run, using non-homogeneous Markov reward models for wind power prediction and homogeneous Markov reward models for photovoltaic power. At the second level, an algorithm is run for optimal management of voltage control assets, such as voltage regulating transformers, to minimize losses. Different scenarios have been considered, highlighting the advantages of using an MPC framework. This results in an optimization process that can be influenced by different time horizons depending on whether or not the MPC is applied. The predictions allow considering a long-horizon stepwise optimization process that leads to an increasing number of variables along with the decrease of total active power losses. When the MPC is not applied, a short-horizon analysis is performed with a decrease in both the number of variables and the quality of the results. Different cases are considered in which the nominal power of a photovoltaic unit and the battery capacity are modified.

Full text

Heliyon 10 (2024) e24760 Available online 17 January 2024 2405-8440/© 2024 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/). Contents lists available at ScienceDirect Heliyon journal homepage: www.cell.com/heliyon Research article Dynamic optimisation of unbalanced distribution network management by model predictive control with Markov reward processes César Álvarez-Arroyoa, Salvatore Vergineb,∗, Guglielmo D’Amicoc, Juan Manuel Escañod, Lázaro Alvarado-Barriose aDepartment of Electrical Engineering, Universidad de Sevilla, 41092 Sevilla, Spain bDepartment of Management, Marche Polytechnic University, 60121 Ancona, Italy cDepartment of Economics, University G. D’Annunzio, 65127 Pescara, Italy dDepartment of Systems Engineering and Automatic Control, Universidad de Sevilla, 41092 Sevilla, Spain eEngineering Department, Universidad Loyola Andalucía, Avda. de las Universidades s/n, 41704 Dos Hermanas, Spain A R T I C L E I N F O A B S T R A C T Keywords: Model predictive control Economic dispatch Distributed generation Renewable energy sources Markov process Uncertainty In this work, a two-level control system is used to minimize the total active power losses of an active distribution system connected to the external grid and composed of a wind turbine, two photovoltaic power sources, and two batteries. At the first control level, a model-based predictive control (MPC) is run, using non-homogeneous Markov reward models for wind power prediction and homogeneous Markov reward models for photovoltaic power. At the second level, an algorithm is run for optimal management of voltage control assets, such as voltage regulating transformers, to minimize losses. Different scenarios have been considered, highlighting the advantages of using an MPC framework. This results in an optimization process that can be influenced by different time horizons depending on whether or not the MPC is applied. The predictions allow considering a long-horizon stepwise optimization process that leads to an increasing number of variables along with the decrease of total active power losses. When the MPC is not applied, a short-horizon analysis is performed with a decrease in both the number of variables and the quality of the results. Different cases are considered in which the nominal power of a photovoltaic unit and the battery capacity are modified. 1. Introduction 1.1. Motivation The growing interest in environmental sustainability and strategies to curb greenhouse gases has sparked a heightened focus on expediting the decarbonization of the economy [1,2]. As part of this effort, electricity systems are undergoing a shift towards * Corresponding author. E-mail address: s.vergine@staff.univpm.it (S. Vergine). https://doi.org/10.1016/j.heliyon.2024.e24760 Received 25 September 2023; Received in revised form 27 December 2023; Accepted 13 January 2024 Heliyon 10 (2024) e24760 2 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Nomenclature Acronyms ADS Active Distribution System ADSM Active Distribution System Management BESS Battery Energy Storage System DER Distributed Energy Resources DG Distributed Generation DisCo Distribution Companies DN Distribution Network DOPF Dynamic Optimal Power Flow DR Demand Response DSO Distribution System Operator ED Economic Dispatch EES Electrical Energy Storage EVS Electric Vehicle Stations LV Low Voltage MPC Model Predictive Control MV Medium Voltage OLTC On-Load Tap Changer OPF Optimal Power Flow PV Photovoltaic Unit PVS Photovoltaic Systems RBMPC Rule-base MPC RES Renewable Energy Source SVC Static VAR Compensator UC Unit Commitment WT Wind Turbine Parameters 𝐸𝑆State space of PV power 𝐸𝑤State space of WT power 𝐼𝑘𝑗 𝑚𝑎𝑥 Maximum current of branch 𝑘𝑗 𝑃𝑖 𝑚𝑎𝑥 Maximum generator capacity of unit 𝑖 𝑃𝑖 𝑚𝑖𝑛 Maximum generator capacity of unit 𝑖 𝑝𝑖Cost function coefficients of External grid 𝑆𝑂𝐶𝑖 𝑚𝑎𝑥 Maximum state of charge of the BESS 𝑖 𝑆𝑂𝐶𝑖 𝑚𝑖𝑛 Minimum state of charge of the BESS 𝑖 𝑉𝑚𝑎𝑥 Maximum voltage limit 𝑉𝑚𝑖𝑛 Minimum voltage limit Δ𝑡Time between samples 𝜂𝑐Battery charging efficiency 𝜂𝑑Battery discharging efficiency 𝑃𝑐 𝑚𝑎𝑥 Maximum charging rate of the BESS 𝑖 𝑃𝑑 𝑚𝑎𝑥 Maximum discharging rate of the BESS 𝑖 Variables  𝑓𝑆 𝑖(𝑠, 𝑡)Predicted values of PV residuals  𝑓𝑤 𝑖(𝑠, 𝑡)Predicted values of WT 𝑃𝑆PV homogeneous probability matrix 𝑃𝑤(𝐾)WT non-homogeneous probability matrix 𝑃𝐵𝐸𝑆𝑆𝑖 𝑡Battery power at time 𝑡 𝑃𝐷𝑒𝑚 𝑡Power demand at time 𝑡 𝑃𝐸𝑥𝑡 𝑡External grid power at time 𝑡 𝑃𝑃𝑉𝑖 Power given by PV plant 𝑖at time t 𝑃𝑊𝑇 𝑡Power given by WT at time 𝑡 𝑆𝑂𝐶𝑖 𝑡State of charge of BESS 𝑖at time 𝑡 Φ𝑆(𝑠, 𝑡)PV transition probability function Φ𝑤(𝑠, 𝑡)WT transition probability function 𝐼𝑘𝑗 𝑡Current of branch 𝑘𝑗 at time 𝑡 𝑃𝐿𝑜𝑠𝑠 𝑡Power losses at time 𝑡 𝑉𝑘 𝑡Voltage of node 𝑘at time 𝑡 decentralized power grids, marked by the integration of distributed energy resources (DERs) [3,4], such as distributed generation units (DG). They mainly include renewable energy sources (RES), battery energy storage systems (BESSs), and demand response (DR) [5]. The evolution from traditional distribution networks to active distribution systems (ADSs) presents new technical challenges but also opens up novel financial opportunities for market participants and system operators [6]. Along with this, we must consider two significant concepts. Firstly, the Distribution System Operator (DSO) is an independent entity tasked with ensuring the reliable operation of ADS [7]. The DSO collaborates with distribution companies (DisCO), engages aggregators to secure flexibility services for delivering energy to end users more cost-effectively [8], and establishes operational constraints on the grid, such as voltage limits [9]. Secondly, electricity sector regulations prohibit the DSO from owning or operating storage or generation resources on the grids. Current studies underline the importance of granting flexibility to DSOs in managing DERs [10,11]and facilitating communication among operators, consumers, and aggregators to enhance the energy efficiency of these systems [12]. Consequently, there is a widely accepted understanding that empowering DSOs to oversee the generation and storage resources within their networks – either through bilateral agreements or by using their own BESS – is crucial to maximizing the integration of DERs into the networks [13]. Medium voltage (MV) distribution networks typically exhibit two key characteristics: a radial topology that results in a gradual loss of electrical power along distribution feeders [14], and a much higher R/X ratio than transmission systems that causes greater power losses and a problem in voltage control. This problem in voltage control is due to the injection of power from renewable sources, since the Q-V relationship between reactive power (Q) and voltages (V) is reduced. Consequently, loss minimization and voltage control are two of the most important issues for DSO. Network reconfiguration and placement capacitors are methods to minimize losses [15,16]. In this work, an economic dispatch (ED) is proposed with the main objective of minimizing active power losses by using batteries as an energy storage system. The primary goal is to enhance the integration of renewable energy sources within active distribution networks. Optimization incorporates action on the on-load tap changers (OLTCs) to correct the voltage problem and a model predictive control (MPC) to take into account the forecast and variability generation of renewable sources. The results of MPC will depend on the time horizon and its movement in the future [17–19]. Heliyon 10 (2024) e24760 3 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. 1.2. Related work In the redesigned management framework of the electric power system, the primary focus for DSOs and DisCos is the economy of Active Distribution Systems (ADS). Several problem formulations propose maximizing Renewable Energy Source (RES) participation to meet overall energy consumption, representing a primary objective in Active Distribution System (ADS) operations [20]. In [21], the authors investigate the management of distribution network operation in terms of marginal price congestion and steady-state conditions, utilizing optimal power flow (OPF) modelling to minimize or maximize network operating costs, power losses, or RES penetration. For instance, authors in [22]employ OPF-based operations to evaluate the network’s capacity to integrate Distributed Generation (DG) at the distribution and subtransmission levels. Dynamic OPF (DOPF) problem is used to optimize control strategies for electrical storage with RES in [23]and [24]. Furthermore, in [25]this technique is applied to a problem with intertemporal constraints from Electrical Energy Storage (EES) and flexible demand management in active grid management. In [26,27], a Unit Commitment (UC), is employed to evaluate flexibility and reserve needs in a system with high penetration of energy from wind turbine (WT). [28] presents a real-time control model for Active Distribution System Management (ADSM) in low voltage (LV) networks, focusing on controlling the temperature of controlled loads and EES. Medium and low voltage networks are very sensible to voltage fluctuations due to active power from distributed generation resources, as highlighted in [29]. Consequently, these problems couple two objectives: minimization of power losses and compliance with voltage limits [30,31]. In this context, power losses and voltage profiles emerge as the most critical aspects for the management of ADSs, given their impact on operating costs. The method presented in [32]employs a multi-objective methodology to minimize the operating cost of ADS scheduling active and reactive powers of DER, EES, and controllable loads. Authors in [33] aim at minimizing both power losses and operating costs, through a power flow control and quick reconfiguration of the distribution network (DN). In [7], a robust optimization problem is proposed to minimize active and reactive power losses, together with the cost of imported electricity, and operating costs of On-Load Tap Changers (OLTC), capacitor banks, Static VAR Compensators (SVC), and ESS. In [34], a hybrid optimization algorithm is implemented to minimize power losses, compliance with voltage limits, and peak-valley differences. This methodology couples particle swarm optimization and bacterial foraging algorithms. Additionally, authors in [35–38] suggest the dynamic daily scheduling of ESS linked to ADS. This approach is favoured for its advantages in providing dependable local backup power to end-users. The proximity of ESS to consumers ensures a readily available supply in the event of an outage, contributing to enhanced operational indices, such as power loss and voltage profile. MPC strategies, widely recognized in the process industry [17], have garnered significant interest in optimizing the operation of electrical power distribution systems in recent years. MPC represents a valid solution in addressing the intermittency of RES power production, mitigating the substantial fluctuation of power in ADS feeders and preventing severe voltage violations. In reference [39], an MPC-based strategy for local voltage control of DG is employed to address voltage violation concerns and improve the system’s adaptability to the volatility of DG. This investigation is conducted using the modified IEEE 33-node distribution system In [40], the demand response problem is solved using a multi-objective MPC for the effective use of flexible resources, such as heating systems (HS) and BESS in low voltage distribution networks with solar PV. In its first contribution, the study introduces and develops a linear power flow method by relaxing power losses in radial distribution networks. In the second aspect, it devises a flexible resource controller capable of solving a linear multi-objective optimization problem through a falling horizon. Authors in [41] solve an optimal scheduling of multiple multi-energy supply microgrids. This is achieved through an MPC framework incorporating an online learning Markov chain prediction method to forecast load demands and renewable productions. They find that this model gives better results compared with the application of the same methodology based on the support vector machine method. The analysis of the literature reveals certain limits in the application of different strategies and mathematical tools used in the management of ADS, both for their feasibility, performance, and scalability. Some of them: i) not addressing the uncertainties caused by the presence of RES in a comprehensive way (e.g., in [23,24], the authors acknowledge that the use of time series for DERs scheduling and grid asset control with variable generation cannot be the only way to deal with the intrinsic uncertainty); ii) low level of penetration of RESs in ADS [28]; iii) failure to consider the variability of power flows (upstream export of energy to the grid is not taken into account in [28], which significantly limits the scope and the need to manage the impact of uncertainties in planning and operations; iv) failure to consider intra-hourly variations of wind speed and demand in the optimization model ([29]and [30]). Regarding the use of MPC techniques, it is necessary to point out that they require random variable forecasts, which is a limitation for environments where such forecasts are not available for practical or cost reasons [39]. This article presents an intelligent cyber-physical model of ADSs, which allows the incorporation of new external agents in the energy sector, which are integrated into the distribution network as Prosumers, Local Energy Communities, and Aggregators [42]. This strategy will contribute to intelligently managing the distribution grid to maximize the integration of DERs, to administrate these resources as independent managers or in a coordinated manner with the new agents, as a solution for the contribution of additional services to the distribution grid. To this end, a two-level control strategy is proposed based on a new approach to the typical economic dispatch. The two levels consist of an optimisation problem aiming at minimising total active power losses followed by an algorithm used to control OLTCs. The strategy aims to develop a centralized ADSM for distribution networks to optimally manage locally distributed energy resources. The first level of control is based on solving an optimization problem, with the objective of increasing the energy efficiency in the operation of the distribution system; for this purpose, it formulates to minimize the losses of active and reactive power in the distribution network, maximizing the penetration of DERs and the second level of control aims at guaranteeing the optimal management of the assets that the network has for voltage control such as voltage regulating transformers. Heliyon 10 (2024) e24760 4 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. ADMS will guarantee the efficient operation of the system in situations of fluctuation between generation and demand and provide complementary services to the distribution network, improving its flexibility. In the literature, there are a lot of works in which Markov processes are used to model and forecast WT and PV power productions [43–46]. This stochastic process is nonparametric and the only specification that is needed is the state space of the process. In this study, the MPC framework includes the Markov reward process to predict wind and photovoltaic power productions with a time horizon equal to 24 hours. 1.3. Contributions In this study, the primary contribution lies in the juxtaposition of the innovative two-level control strategy approach for the operation of unbalanced ADS proposed in [47]with the MPC framework with Markov reward process predictions of renewable power. The former is based on an optimization problem which aims at minimizing total active power losses. Additionally, it employs an algorithm to control the settings of On-Load Tap Changer transformers, ensuring compliance with the technical constraints stipulated by the DSO. The latter provides a renewable production modelization which is an extension of the previous study [48] where the Markovian models are used only to simulate wind and photovoltaic productions in a cost optimization problem. More specifically, wind production is obtained by simulating a non-homogeneous Markov chain and assigning a random reward to each state of the chain. The reward consists of a certain wind power production belonging to the production range identifying the state. Photovoltaic production is modelled through a homogeneous Markov chain used to simulate the residuals. Also in this case, once obtained the chain, a reward is associated with each state, randomly extracting a photovoltaic power from the set identifying the state. We carry on this past study by providing 24-hour Markov predictions of both renewable sources used to implement an MPC framework through which the system is optimised by considering the next 24-hour wind and photovoltaic power predictions at each time step. Furthermore, this study represents an improvement of previous contributions [49,47]and [50]that are based on deterministic or single-random-variable approaches for the uncertainties of renewable sources or demand. In particular, in these first two works, renewable productions are considered exactly known. The optimization consists of a two-stage problem solved using the pairing of two software, MATLABⓇand DIgSILENTⓇPowerFactory, as done in [47]but in the more general MPC framework Markovian randomness. The originality also deals with the comparison of different time horizons, which is possible thanks to the juxtaposition of the myopic vision used in [47]and the MPC framework, which allows us to consider a larger perspective. The object of the optimization problem is minimizing the power losses of the considered grid which is firstly treated in MATLABⓇ as minimizing the cost function having the operation cost of the batteries and the generation costs of the external grid as only contributors, and secondly, implemented in DIgSILENTⓇPowerFactory to obtain the power flows, control the voltage limits and calculate the active power losses. This is a multiple-aspect problem where the solutions are found according to different strategies, subsequently associated with 3 different scenarios, which directly influence the problem formulation and the computational load. For each strategy, 3 different cases are considered in which the nominal power of one of the PV unit and the capacity of the two batteries are modified to measure the impact of these parameters on the methodology. 1.4. Paper organization The next parts of the paper are organized as follows. Section 2shows how demand, wind, and photovoltaic generation are modelled. Section 3provides a description of the context of the problem, presents the model and structure of the unbalanced grid, and treats the optimization problem with reference to the ED and the communication between MATLABⓇ-DIgSILENTⓇPowerFactory. Section 4focuses on the core of the problem explaining the objective function, the constraints of the system, and the different optimization procedures used according to the different scenarios considered. The results are presented in Section 5. Finally, Section 6 presents the conclusions. 2. System modelling This section shows in detail the modelling of demand and renewable sources. 2.1. Demand A fixed demand curve is not considered to influence the optimization results. Specifically, demand is kept constant to compare the different scenarios and cases considered in which both the optimization methodology and the characteristics of the system are modified. In Fig. 1the demand curve is shown in a day. Since when the MPC framework is applied, the process considers a daily horizon time, at each optimization step, a translated demand curve is computed, which starts from the demand value of present hour and continues with the consecutive values after the analyzed hour. An example of the demand curves considered in the first three hours of the day is shown in Fig. 2. Heliyon 10 (2024) e24760 5 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 1. Demand curve. Fig. 2. Translated demand curves for the first three hours of the day. 2.2. Wind generation Wind speed data are used for a 10-year period and are referred to the geographical coordinates of 39,5N latitude and 8,75E longitude, which correspond with a site in Sardinia (Italy). The same database as in [51], taken from [52], is used. Wind energy production is obtained by the power curve shown in Fig. 3. According to [47], we consider the equation (1)for the power curve. 𝑊𝑇(𝑡)=⎧ ⎪ ⎪ ⎨ ⎪ ⎪ ⎩ 0for 𝑣(𝑡)<𝑣 𝑐𝑖, 𝑃𝑟 𝑣3(𝑡)−𝑣3 𝑐𝑖 𝑣3 𝑟−𝑣3 𝑐𝑖 for 𝑣𝑐𝑖 <𝑣(𝑡)<𝑣 𝑟, 𝑃𝑟for 𝑣𝑟<𝑣(𝑡)<𝑣 𝑐𝑜, 0for 𝑣(𝑡)>𝑣 𝑐𝑜, ∀𝑡∈ℕ.(1) The WT does not produce power for wind speeds lower than 4m / s and produces the maximum power for wind speeds greater than 13 m/s. Production is characterized by a parabolic growth between these two values. Once wind production is obtained, it is normalized to have values with a maximum equal to 1and apply different scenarios simply by multiplying the production by different factors presented later in this work. Wind power is modelled, considering it as a nonhomogeneous Markov reward process [53]. The power is divided into five levels according to the set 𝐸𝑤={1, 2, 3, 4, 5} and the random variable 𝐽𝑤 𝑛that indicates the state of the system at the 𝑛𝑡ℎ transition is considered. More precisely, the state 1indicates the power between 0and 0.4MW, the state 2the power between 0.4and 0.8MW, the state 3the power between 0.8and 1.2MW, the state 4the power between 1.2and 1.6MW, and the state 5the power between 1.6and 2MW. Heliyon 10 (2024) e24760 6 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 3. Wind power production. Each time step has a different probability transition matrix, and we have 24 matrices because the database is discretized in hours. Relationship (2)governs this type of stochastic process. ℙ[𝐽𝑤 𝑛+1 =𝑗∣𝐽𝑤 𝑛=𝑖𝑛,𝐽𝑤 𝑛−1 =𝑖𝑛−1, ..., 𝐽 𝑤 1=𝑖1,𝐽𝑤 0=𝑖0]=ℙ[𝐽𝑤 𝑛+1 =𝑗∣𝐽𝑤 𝑛=𝑖𝑛]=𝑝𝑤 𝑖𝑛𝑗(𝑛+1),∀𝑛∈{0,1, ..., 23}.(2) The probabilities 𝑝𝑤 𝑖𝑛𝑗(𝑛 +1)are stored in the matrix 𝐏𝑤(𝑛 +1) =(𝑝𝑤 𝑖,𝑗 (𝑛 +1)) 𝑖,𝑗∈𝐸𝑤. Moreover, we assume that the daily wind power is a 24-hour cyclic process, as formulated in equation (3). 𝐏𝑤(𝑛)=𝐏𝑤(𝑛+24⋅ℎ),∀𝑛∈{0,1, ..., 23},ℎ∈𝐍.(3) At this point, we introduce the matrix 𝚽𝑤(𝑠, 𝑡) =(𝜙𝑤 𝑖𝑗 (𝑠, 𝑡))𝑖,𝑗∈𝐸𝑤, 𝑠, 𝑡 ∈ℕ, which is the matrix of the probability transition functions with the elements defined by 𝜙𝑤 𝑖𝑗 (𝑠, 𝑡) =ℙ[𝐽𝑤 𝑡=𝑗∣𝐽𝑤 𝑠=𝑖]. For example, 𝜙𝑤 𝑖𝑗 (𝑠, 𝑡)represents the probability of producing a wind power equal to 𝑗at time t knowing that a wind power equal to 𝑖is produced at time s. Equation (4) can be used to obtain the transition probability functions in one day: 𝚽𝑤(𝑠, 𝑡)= 𝑡 ∏ 𝑘=𝑠+1 𝐏𝑤(𝑘),𝑠,𝑡∈ℕ,0≤𝑠≤𝑡≤24.(4) More generally, if we consider any couple of integer values for 𝑠and 𝑡(also on different days), we can compute the transition probability functions using the formula (5). 𝚽𝑤(𝑠, 𝑡)=𝚽𝑤(𝑠, 24) ⋅(𝚽𝑤(0,24)[𝑡∕24]−[𝑠∕24]−1)⋅𝚽𝑤(0, 𝑡),𝑠,𝑡∈ℕ,0≤𝑠≤𝑡, (5) where [𝑎]denotes the integer part of 𝑎, and 𝑠 =𝑠 −24 ⋅[𝑠∕24] and  𝑡=𝑡 −24 ⋅[𝑡∕24]. The wind power production can be predicted considering each state of the system and each hour of the day through a specific transition probability matrix. Let 𝐌be the column vector that contains the average values of the wind power data classified in the corresponding state. The estimation of the available data gives the vector (6). 𝐌𝑇=(12345 0.09 0.58 0.98 1.38 1.93).(6) Let us indicate by  𝑓𝑤 𝑖(𝑠, 𝑡)the predicted values of the wind power at time 𝑡given that at time 𝑠the wind power is in the state 𝑖. These forecasts are obtained using equation (7)as follows:  𝑓𝑤 𝑖(𝑠, 𝑡)= 5 ∑ 𝑎=1 𝜙𝑤 𝑖,𝑎(𝑠, 𝑡)⋅𝑀𝑎.(7) For example, if we want to predict the wind power at hour 𝑡 =37starting from hour 𝑠 =14of the current day, that is, a prediction to 23 hours ahead, we start calculating the transformed time variables 𝑠 =14 −24 ⋅[14∕24] =14and  𝑡=37 −24 ⋅[37∕24] =13(i.e. 1:00 pm of the day ahead). Then, formula (5) becomes 𝚽𝑤(14,37) = 𝚽𝑤(14,24) ⋅𝐈⋅𝚽𝑤(0,13).(8) Heliyon 10 (2024) e24760 7 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 4. Prediction curves of state 1. The real data application of formula (8)provides the following transition probability matrix: ⎛⎜⎜⎜⎜⎜⎜⎜⎝ 12345 10.67 0.16 0.07 0.04 0.06 20.61 0.15 0.09 0.05 0.10 30.54 0.15 0.09 0.06 0.16 40.45 0.14 0.10 0.08 0.23 50.28 0.11 0.11 0.12 0.38 ⎞⎟⎟⎟⎟⎟⎟⎟⎠ .(9) Therefore, if the system is in state 2at 14𝑡ℎ hour of the current day, the prediction of power after 23 hours (at hour 1 ∶00pm of the day ahead) is equal to 0.49 MW. This is obtained according to equation (7), by multiplying the second row of the matrix (9)with the vector (6). Figs. 4and 5show all prediction curves referred to states 1and 5, respectively. In both figures, the curves referring to the hours 𝑠 =2, 3, 12, 13 are highlighted to show the different prediction trends that are obtained, depending on the hour in which the system is in that particular state. For example, in Fig. 4the curve referred to hour 2reaches the maximum power production after about 13 hours, while the curve referred to hour 12 reaches the maximum power after around 23 hours. This means that having a low energy production in the central hours of the day is an important fact because it can be deduced that it is most likely not to have a high energy production in the rest of the day. In the same way, by observing Fig. 5, if there is high energy production in the first hours of the day, it is very likely that the turbine produces a large amount of energy in the central hours of the day. In contrast, if the system produces large amounts of energy in the central hours of the day, the production will decrease in the afternoon hours. 2.3. Photovoltaic generation The hourly solar irradiation data considered in this work are the same as in [54], and downloaded from [55]. They refer to a period of 10 years, starting from August 1, 2008, to August 1, 2018, and to the same geographic coordinates used to obtain the wind speed data. The following equation is used to convert solar irradiation to photovoltaic power [47]: 𝑃𝑉(𝑡)=𝑃𝑆𝑇𝐶 𝑛⋅𝐸𝑀,𝑡 𝐸𝑆𝑇𝐶 [1 + ℎ(𝑇𝑀,𝑡 −𝑇𝑆𝑇𝐶)].(10) 𝑃𝑉(𝑡)is the photovoltaic power produced at time 𝑡. The same formula is used for the two sources available in the network under consideration (PV1 and PV2). 𝐸𝑀,𝑡 is the solar irradiance and 𝑇𝑀,𝑡 is the temperature at time 𝑡. 𝑛indicates the number of solar panels and ℎthe power temperature coefficient (%∕◦𝐶). 𝑃𝑆𝑇𝐶 is the maximum power under standard test conditions. It is the same for irradiance 𝐸𝑆𝑇𝐶 and temperature 𝑇𝑆𝑇𝐶. Again, after solar production is obtained, it is normalized to make it easier to apply the different scenarios. From solar production data, the residuals are calculated by subtracting the photovoltaic power from the detrended power, which is the average hourly power calculated for each month of the year. In Fig. 6, it is possible to see a one-day example. In Table 1, mean and standard deviation of the residuals are shown. The residuals are modelled using a homogeneous Markov reward process [51]. The fact that the process is homogeneous implies that there is only a probability transition matrix which is independent of time. The residual values are divided into three sets depending on whether they are positive, null, or negative. In this case, the set 𝐸𝑆={1, 2, 3}. Denoting by 𝐽𝑆 𝑛the random variable Heliyon 10 (2024) e24760 8 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 5. Prediction curves of state 5. Fig. 6. Photovoltaic and detrendized power with residuals. Table 1 Mean and standard deviation of residuals in MW. Mean Standard deviation Positive residuals 2.22 3.21 Negative residuals -2.15 3.20 with values in 𝐸𝑆that identifies the state of the system at the 𝑛𝑡ℎ transition, the probability transition matrix characterizing this process is the following: 𝑃[𝐽𝑆 𝑛+1 =𝑗∣𝐽𝑆 𝑛=𝑖𝑛,𝐽𝑆 𝑛−1 =𝑖𝑛−1, ..., 𝐽 𝑆 1=𝑖1,𝐽𝑆 0=𝑖0]=𝑃[𝐽𝑆 𝑛+1 =𝑗∣𝐽𝑆 𝑛=𝑖𝑛]=𝑝𝑆 𝑖𝑗 .(11) Once the probabilities (11)are obtained, we store them in the matrix 𝐏𝑆=(𝑝𝑆 𝑖,𝑗 )𝑖,𝑗∈𝐸𝑆. Similar methods to those described in Section 2.2 can be applied to obtain the matrix of probability functions 𝚽𝑆(𝑠, 𝑡)with the elements defined by 𝜙𝑆 𝑖𝑗 (𝑠, 𝑡) =ℙ[𝐽𝑆 𝑡=𝑗∣𝐽𝑆 𝑠=𝑖]. The equation (12)is used to obtain the transition probability function: 𝚽𝑆(𝑠, 𝑡)=(𝐏𝑆)𝑡−𝑠,𝑠,𝑡∈ℕ,0≤𝑠≤𝑡. (12) Heliyon 10 (2024) e24760 9 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Since the states of the system are three and the process is homogeneous, three prediction curves are obtained by multiplying the column vector 𝐌(13) containing the average values of each set of residuals and by the corresponding transition probabilities referred to the state 𝑖in which the system is. 𝐌𝑇=(12 3 01.61 −2.23).(13) To calculate the value of the prediction  𝑓𝑆 𝑖(𝑠, 𝑡), we can use formula (14), as follows:  𝑓𝑆 𝑖(𝑠, 𝑡)= 3 ∑ 𝑏=1 𝜙𝑆 𝑖,𝑏(𝑠, 𝑡)⋅𝑀𝑏.(14) For example, if the system is in state 𝑖 =2at time 𝑠 =3and we want to forecast the variable at 𝑡 =6, we need to calculate  𝑓𝑆 2(3, 6) according to formula (15).  𝑓𝑆 2(3,6) = 3 ∑ 𝑏=1 𝜙𝑆 2,𝑏(3,6) ⋅𝑀𝑏= 3 ∑ 𝑏=1 ((𝐏𝑆)3)2,𝑏 ⋅𝑀𝑏,(15) where the estimates give the vector (16). 𝜙𝑆 2,𝑏(𝑠, 𝑡)= (123 0.00 0.77 0.23),(16) and in turn  𝑓𝑆 2(3, 6) =0.7268 MW. Once the residual values have been obtained, they are added to the hourly average power to obtain the predicted power curves. 3. Problem approach This section presents the formulation of the problem, the communication between Matlab and DIgSILENT, and shows the structure of the grid in which the different scenarios have been tested. 3.1. Context description The incorporation of RES is increasing and some of its objectives are to achieve optimal integration, overcome energy intermittency problems, accelerate energy transition, and improve performance through the use of energy storage systems. Several of these renewable sources and batteries are incorporated into MV networks, where the DSO has the main task of efficiently managing their operation within the network. An approach to accomplish this is to optimize the control of the grid to reduce active power losses. Two of the different control strategies that the DSO can apply are the management of the OLTCs and the control of the behaviour of the available batteries (usually through contracts with the owner companies). Therefore, in this paper a new ED is presented as an ADS management tool in which the uncertainty of renewable sources production is incorporated and forecasted, and the influence of the considered time horizon on the reduction of the active power losses is highlighted. The proposed ED is carried out in MATLABⓇ and has been tested on the IEEE 34-node network for different days and scenarios. ED results are communicated to DIgSILENTⓇ PowerFactory, where the network is simulated, load flows are performed, and power losses are calculated. 3.2. Grid model and structure The proposed ADS management tool has been tested on the IEEE 34-Node Test Feeder. It is mainly characterized by unbalanced loading and two in-line regulators. A wind generator, two photovoltaic generators, two batteries and two three-phase OLTC transformers are incorporated into the considered grid, as shown in Fig. 7. This is an unbalanced grid that presents a high penetration index of RESs and BESSs. 3.3. Two-level control strategy The optimization problem first aims to minimize the operating costs and second to minimize the total active power losses in the considered grid by controlling the voltages at the nodes using the OLTCs. In practice, the former maximizes the power supply from renewable sources and batteries and reduces the power imported from the external grid because this is produced from a pool of different technologies, such as coal, gas, and diesel. Maximizing the use of RESs means improving social welfare. The latter ensures compliance with technical constraints within the network. In the optimization problem, the wind speed and the solar irradiance are not deterministic. Their contributions are modelled and predicted stochastically. The ED decides how much power is involved from the external grid and the behaviour of the batteries. Therefore, the time horizon is an important parameter because it affects the optimization results. The length of the time horizon directly influences decision making, depending on whether a long-term or short-term horizon is considered. This choice strongly Heliyon 10 (2024) e24760 16 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 11. Demand response curve for the day 3𝑟𝑑 of August in case 1 (a), 2 (b) and 3 (c), and the sum of the SOC of the two batteries (d) in all cases for Scenario 1. August 3𝑟𝑑 day coverage curves for cases 1, 2 and 3 are shown in Figs. 12a, 12band 12c, and the sum of the SOC of the two batteries in Fig. 12d. In all cases, the contributions from renewable sources are the same as in Scenario 1. The difference is in the use of batteries that are charged using the external grid more than what would be needed to satisfy the current demand because the energy stored is planned to be used subsequently for higher demand values. Another confirmation is given by the SOC trends, which are jagged and move in a wide range of power. In this case, the SOC sum referred to in case 3shows higher levels of energy due to the larger capacity of the batteries. The results obtained for this scenario are totally different compared to Scenario 1, where battery use is almost negligible. 5.4. Scenario 3 In Scenario 3, the predictions based on the current renewable power production at each time step are considered in the optimization process. In Figs. 13a, 13b, 13c, and 13d, the demand coverage curves and the sum of the two-battery SOCs for the three cases, respectively, are shown. This scenario shows similar behaviour to scenario 2, both in terms of the use of batteries and in the collection of energy from the external grid. In particular, the batteries tend to be discharged when the demand is high and, consequently, the energy from the external grid is more expensive because of its parabolic cost. This demonstrates that the use of MPC with Markov predictions of RES productions consistently improves the optimal management of the grid. 5.5. Comparative study In this subsection, a comparative study is presented to highlight the differences between the three different scenarios. The results in terms of power losses can be seen in Table 5for each scenario and each case. Figs. 14a, 14b, 14c and 14d show a graphical comparison in terms of absolute percentage error of the results obtained in Table 5. The decrease in power losses in Scenario 3compared to Scenario 1is evident in relation to Scenario 2which is considered idealistic. Heliyon 10 (2024) e24760 17 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 12. Demand response curve for the day 3𝑟𝑑 of August in case 1 (a), 2 (b) and 3 (c), and the sum of the SOC of the two batteries (d) in all cases for Scenario 2. Table 5 Total power losses in MW for each scenario and each case. Case Scenario 2𝑛𝑑 of August 3𝑟𝑑 of August 6𝑡ℎ of August 7𝑡ℎ of August 1 1 1.6172 1.4880 1.9222 1.6120 2 1.5824 1.4471 1.8774 1.5582 3 1.5792 1.4405 1.8869 1.5838 2 1 1.5805 1.4606 1.8855 1.5903 2 1.5431 1.4185 1.8431 1.5389 3 1.5564 1.4248 1.8437 1.5559 3 1 1.5719 1.4584 1.8805 1.5848 2 1.5164 1.3775 1.8007 1.5037 3 1.5351 1.3895 1.7906 1.5133 To get an idea of how much money a city of 1million inhabitants saves by applying this control strategy, first, the difference in the power losses of Scenarios 2and 3compared to Scenario 1is considered in Table 6. The studied grid consumes a maximum of 1.8MW and can be thought of as a group of 450 houses with an average of 3people in each of them (an average electricity consumption of a residential unit equal to 4kW). Taking into account that the calculated power loss values are referred to 1day, assuming an average daily electricity price of 170 AC/MWh, the results shown in Table 7are obtained. Daily savings are always greater than 4377 ACfor Scenario 2and 3547 ACfor Scenario 3. The different nominal power of PV2 does not have a great impact on this. On the contrary, it is possible to notice that the daily savings for case 3are greater compared to the one obtained for cases 1and 2. This means that the capacity of the battery positively influences this methodology. Heliyon 10 (2024) e24760 18 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 13. Demand response curve for the day 3𝑟𝑑 of August in case 1 (a), 2 (b) and 3 (c), and the sum of the SOC of the two batteries in all cases(d) for Scenario 3. Table 6 Difference in total power losses in MW of Scenario 2 and 3 compared to Scenario 1 for each case. Case Scenario 2𝑛𝑑 of August 3𝑟𝑑 of August 6𝑡ℎ of August 7𝑡ℎ of August 1 1 1.6172 1.4880 1.9222 1.6120 2 -0.0348 -0.0409 -0.0448 -0.0538 3 -0.0380 -0.0475 -0.0353 -0.0282 2 1 1.5805 1.4606 1.8855 1.5903 2 -0.0374 -0.0421 -0.0424 -0.0514 3 -0.0241 -0.0358 -0.0418 -0.0344 3 1 1.5719 1.4584 1.8805 1.5848 2 -0.0555 -0.0809 -0.0798 -0.0811 3 -0.0368 -0.0689 -0,0899 -0.0715 Table 7 Daily savings in ACof Scenario 2 and absolute percentage error of Scenario 3 as compared to Scenario 2 for each case. Case Scenario 2𝑛𝑑 of August 3𝑛𝑑 of August 6𝑛𝑑 of August 7𝑛𝑑 of August 12 4377.84 5145.22 5635.84 6768.04 3 9.20% 16.14% 21.20% 47.58% 22 4704.92 5296.18 5333.92 6466.12 3 35.56% 14.95% 1.41% 33.07% 32 6981.90 10177.22 10038.84 10202.38 3 33.71% 14.83% 12.66% 11.84% Heliyon 10 (2024) e24760 19 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. Fig. 14. Bar graph of the absolute percentage error of Scenario 1and 3compared to Scenario 2for each case for the day 2𝑛𝑑 (a), 3𝑟𝑑 (b), 6𝑡ℎ (c) and 7𝑡ℎ (d) of August. 6. Conclusion In this paper, an optimization problem of a hybrid grid is presented to minimize active power losses. The joint use of the software MATLABⓇand DIgSILENTⓇallows us to obtain all the powers of the different system units by optimizing the cost function and to calculate the power flows into the grid and the power losses. The nonhomogeneous and homogeneous Markov reward processes are used to model 10-year wind and photovoltaic powers, respectively, and to build daily power predictions. Three scenarios are considered to emphasize the benefits of the application of an MPC framework based on Markov reward process predictions compared to the simple myopic strategy. In particular, it is evident how the active power losses calculated in the four chosen days using the MPC framework decrease, reaching values close to those referred to in the ideal scenario (Scenario 2) where the wind and photovoltaic powers are assumed to be known. The power losses decrease with the increase both of the nominal power of the photovoltaic system and of battery capacity, showing that the use of renewable sources and the availability of greater storage systems decrease the energy supplied by the external grid. This effect improves when we optimize the management of the battery thanks to the ideal framework of Scenario 2 and the MPC one with Markov processes in Scenario 3. The use of this methodology greatly improves battery management by charging and discharging it taking into account a longer time horizon (in this study it is taken equal to 24 hours) compared to the myopic strategy influenced only by the current system conditions. The parabolic cost of the energy from the external grid together with a 24-hour time horizon allows the optimization to choose charging the battery when the demand is low and discharge it when is high. As a result of the application of different system parameters, it is also found that increasing both the nominal power of the renewable source and the capacity of the battery improves the performance of this procedure, as shown in Tables 5and 6. The power losses are always lower in scenarios 2 and 3 compared with Scenario 1, with the daily differences ranging from -0.0348 MW to -0.0811 MW for the former, and from -0.0241 MW to 0.0899 MW for the latter. The greatest values are obtained when we increase the battery capacity. To better understand the impact of this methodology in terms of savings, an application example is also presented through which it is obtained that for a city of 1million people, the daily savings are always greater than 4000 ACfor any scenario and case considered. Given the advantages of the suggested strategy, the application of Markovian processes for renewable predictions provides a valid means for implementing a model predictive control framework in advanced control techniques, where uncertainties play a fundamental role. This study also presents some limitations, such as not considering the operating costs of RESs and OLTCs, not Heliyon 10 (2024) e24760 20 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. including the degradation of the battery, and considering a limited number of days. Furthermore, OLTCs do not guarantee the best result, but only an improvement of the solution and compliance of technical limits. Further improvements of this study could be obtained by applying diverse stochastic processes to model renewable productions and adjusting the time scale or time horizon. CRediT authorship contribution statement César Álvarez-Arroyo: Writing – review & editing, Writing – original draft, Visualization, Software, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. Salvatore Vergine: Writing – review & editing, Writing – original draft, Visualization, Software, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. Guglielmo D’Amico: Writing – original draft, Validation, Supervision, Methodology, Formal analysis, Conceptualization. Juan Manuel Escaño: Writing – original draft, Validation, Supervision, Methodology, Formal analysis, Conceptualization. Lázaro Alvarado-Barrios: Writing – original draft, Visualization, Validation, Methodology, Funding acquisition, Formal analysis, Conceptualization. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Data availability Data will be made available on request. Acknowledgements G. D’Amico and S. Vergine acknowledge the financial support from the program MUR PRIN 2022 n. 2022ETEHRM “Stochastic models and techniques for the management of wind farms and power systems”. References [1] C. Gerbaulet, C. von Hirschhausen, C. Kemfert, C. Lorenz, P.-Y. Oei, European electricity sector decarbonization under different levels of foresight, Renew. Energy 141 (2019) 973–987. [2] S. Pye, P.-H. Li, I. Keppo, B. O’Gallachoir, Technology interdependency in the United Kingdom’s low carbon energy transition, Energy Strat. Rev. 24 (2019) 314–330. [3] F.H. Malik, M. Lehtonen, A review: agents in smart grids, Electr. Power Syst. Res. 131 (2016) 71–79. [4] S. Kakran, S. Chanana, Smart operations of smart grids integrated with distributed generation: a review, Renew. Sustain. Energy Rev. 81 (2018) 524–535. [5] E. Commission, Energy storage -the role of electricity, https://ec .europa .eu /energy /sites /ener /files /documents /swd2017 _61 _document _travail _service _part1 _v6 . pdf, 2017. [6] A. Dubey, A. Bose, M. Liu, L.N. Ochoa, Paving the way for advanced distribution management systems applications: making the most of models and data, IEEE Power Energy Mag. 18 (1) (2020) 63–75, https://doi .org /10 .1109 /MPE .2019 .2949442. [7] H. Gao, J. Liu, L. Wang, Robust coordinated optimization of active and reactive power in active distribution systems, IEEE Trans. Smart Grid 9(5) (2017) 4436–4447. [8] P. Sheikhahmadi, S. Bahramara, A. Mazza, G. Chicco, J.P. Catalão, Bi-level optimization model for the coordination between transmission and distribution systems interacting with local energy markets, Int. J. Electr. Power Energy Syst. 124 (2021) 106392. [9] V.A. Evangelopoulos, T.P. Kontopoulos, P.S. Georgilakis, Heterogeneous aggregators competing in a local flexibility market for active distribution system management: a bi-level programming approach, Int. J. Electr. Power Energy Syst. 136 (2022) 107639. [10] C. Heinrich, C. Ziras, T.V. Jensen, H.W. Bindner, J. Kazempour, A local flexibility market mechanism with capacity limitation services, Energy Policy 156 (2021) 112335. [11] P. Olivella-Rosell, P. Lloret-Gallego, Í. Munné-Collado, R. Villafafila-Robles, A. Sumper, S.Ø. Ottessen, J. Rajasekharan, B.A. Bremdal, Local flexibility market design for aggregators providing multiple flexibility services at distribution network level, Energies 11 (4) (2018) 822. [12] X. Jin, Q. Wu, H. Jia, Local flexibility markets: literature review on concepts, models and clearing methods, Appl. Energy 261 (2020) 114387. [13] K. Oureilidis, K.-N. Malamaki, K. Gallos, A. Tsitsimelis, C. Dikaiakos, S. Gkavanoudis, M. Cvetkovic, J.M. Mauricio, J.M. Maza Ortega, J.L.M. Ramos, et al., Ancillary services market design in distribution networks: review and identification of barriers, Energies 13 (4) (2020) 917. [14] R.S. Rao, Capacitor placement in radial distribution system for loss reduction using artificial bee colony algorithm, https://doi .org /10 .5281 /zenodo .1077229, Aug. 2010. [15] M.E. Baran, F.F. Wu, Network reconfiguration in distribution systems for loss reduction and load balancing, IEEE Power Eng. Rev. 9(4) (1989) 101–102. [16] R.S. Rao, K. Ravindra, K. Satish, S. Narasimham, Power loss minimization in distribution system using network reconfiguration in the presence of distributed generation, IEEE Trans. Power Syst. 28 (1) (2012) 317–325. [17] E.F. Camacho, C.B. Alba, Model Predictive Control, Springer Science & Business Media, 2013. [18] G. Bruni, S. Cordiner, V. Mulone, V. Rocco, F. Spagnolo, A study on the energy management in domestic micro-grids based on model predictive control strategies, Energy Convers. Manag. 102 (2015) 50–58. [19] G. Valverde, T. Van Cutsem, Model predictive control of voltages in active distribution networks, IEEE Trans. Smart Grid 4(4) (2013) 2152–2161. [20] S. Sekizaki, I. Nishizaki, T. Hayashida, Electricity retail market model with flexible price settings and elastic price-based demand responses by consumers in distribution network, Int. J. Electr. Power Energy Syst. 81 (2016) 371–386. [21] Z. Liu, Q. Wu, S.S. Oren, S. Huang, R. Li, L. Cheng, Distribution locational marginal pricing for optimal electric vehicle charging through chance constrained mixed-integer programming, IEEE Trans. Smart Grid 9(2) (2016) 644–654. [22] L.F. Ochoa, G.P. Harrison, Using ac optimal power flow for dg planning and optimisation, in: IEEE PES General Meeting, IEEE, 2010, pp. 1–7. [23] A.L. Costa, A.S. Costa, Energy and ancillary service dispatch through dynamic optimal power flow, Electr. Power Syst. Res. 77 (8) (2007) 1047–1055. [24] P. Correia, J.F. De Jesus, Simulation of correlated wind speed and power variates in wind parks, Electr. Power Syst. Res. 80 (5) (2010) 592–598. Heliyon 10 (2024) e24760 21 C. Álvarez-Arroyo, S. Vergine, G. D’Amico et al. [25] S. Gill, I. Kockar, G.W. Ault, Dynamic optimal power flow for active distribution networks, IEEE Trans. Power Syst. 29 (1) (2013) 121–131. [26] J. Kiviluoma, M. O’Malley, A. Tuohy, P. Meibom, M. Milligan, B. Lange, H. Holttinen, M. Gibescu, Impact of wind power on the unit commitment, operating reserves, and market design, in: 2011 IEEE Power and Energy Society General Meeting, IEEE, 2011, pp. 1–8. [27] J. Ma, V. Silva, R. Belhomme, D.S. Kirschen, L.F. Ochoa, Evaluating and planning flexibility in sustainable power systems, in: 2013 IEEE Power & Energy Society General Meeting, IEEE, 2013, pp. 1–11. [28] A. Saint-Pierre, P. Mancarella, Active distribution system management: a dual-horizon scheduling framework for dso/tso interface under uncertainty, IEEE Trans. Smart Grid 8(5) (2016) 2186–2197. [29] O.D. Montoya, J.A. Alarcon-Villamil, J.C. Hernández, Operating cost reduction in distribution networks based on the optimal phase-swapping including the costs of the working groups and energy losses, Energies 14 (15) (2021) 4535. [30] T. Ding, S. Liu, W. Yuan, Z. Bie, B. Zeng, A two-stage robust reactive power optimization considering uncertain wind power integration in active distribution networks, IEEE Trans. Sustain. Energy 7(1) (2015) 301–311. [31] S.K. Injeti, V.K. Thunuguntla, Optimal integration of dgs into radial distribution network in the presence of plug-in electric vehicles to minimize daily active power losses and to improve the voltage profile of the system using bio-inspired optimization algorithms, Prot. Control Mod. Power Syst. 5(1) (2020) 1–15. [32] X. Zhao, Q. Chen, Q. Xia, C. Kang, H. Wang, Multi-period coordinated active-reactive scheduling of active distribution system, in: 2013 IEEE Power & Energy Society General Meeting, IEEE, 2013, pp. 1–5. [33] A.A. Ibrahim, B. Kazemtabrizi, C. Dent, Operational planning and optimisation in active distribution networks using modern intelligent power flow controllers, in: 2016 IEEE PES Innovative Smart Grid Technologies Conference Europe (ISGT-Europe), IEEE, 2016, pp. 1–6. [34] F. Zhao, J. Si, J. Wang, Research on optimal schedule strategy for active distribution network using particle swarm optimization combined with bacterial foraging algorithm, Int. J. Electr. Power Energy Syst. 78 (2016) 637–646. [35] M. Farrokhifar, Optimal operation of energy storage devices with ress to improve efficiency of distribution grids; technical and economical assessment, Int. J. Electr. Power Energy Syst. 74 (2016) 153–161. [36] M. Koller, T. Borsche, A. Ulbig, G. Andersson, Review of grid applications with the Zurich 1 MW battery energy storage system, Electr. Power Syst. Res. 120 (2015) 128–135. [37] E. Reihani, S. Sepasi, L.R. Roose, M. Matsuura, Energy management at the distribution grid using a battery energy storage system (bess), Int. J. Electr. Power Energy Syst. 77 (2016) 337–344. [38] H. Saboori, H. Abdi, Application of a grid scale energy storage system to reduce distribution network losses, in: 18th Electric Power Distribution Conference, IEEE, 2013, pp. 1–5. [39] P. Li, J. Ji, H. Ji, J. Jian, F. Ding, J. Wu, C. Wang, Mpc-based local voltage control strategy of dgs in active distribution networks, IEEE Trans. Sustain. Energy 11 (4) (2020) 2911–2921. [40] N. Karthikeyan, J.R. Pillai, B. Bak-Jensen, J.W. Simpson-Porco, Predictive control of flexible resources for demand response in active distribution networks, IEEE Trans. Power Syst. 34 (4) (2019) 2957–2969. [41] B. Li, R. Roche, Optimal scheduling of multiple multi-energy supply microgrids considering future prediction impacts based on model predictive control, Energy 197 (2020) 117180. [42] REScoop.eu, Energy communities under the clean energy package transposition guidance, in: Transposition Guidance, European Federation of Citizen Energy Cooperatives, Avenue Milcamps 103, 1030 Brussels, Belgium, 2020, https://www .rescoop .eu /toolbox /how -can -eu -member -states -support -energy -communities. [43] V. Eniola, T. Suriwong, C. Sirisamphanwong, K. Ungchittrakool, Hour-ahead forecasting of photovoltaic power output based on hidden Markov model and genetic algorithm, Int. J. Rennew. Energy. Res. 9(2) (2019) 933–943. [44] L. Yang, M. He, J. Zhang, V. Vittal, Support-vector-machine-enhanced Markov model for short-term wind power forecast, IEEE Trans. Sustain. Energy 6(3) (2015) 791–799. [45] G. D’Amico, F. Petroni, F. Prattico, Wind speed and energy forecasting at different time scales: a nonparametric approach, Phys. A, Stat. Mech. Appl. 406 (2014) 59–66. [46] P. Jeyakumar, N. Kolambage, N. Geeganage, G. Amarasinghe, S.K. Abeygunawardane, Short-term wind power forecasting using a Markov model, in: 2021 3rd International Conference on Electrical Engineering (EECon), IEEE, 2021, pp. 19–24. [47] L. Alvarado-Barrios, C. Álvarez-Arroyo, J.M. Escaño, F.M. Gonzalez-Longatt, J.L. Martinez-Ramos, Two-level optimisation and control strategy for unbalanced active distribution systems management, IEEE Access 8 (2020) 197992–198009. [48] S. Vergine, C. Álvarez-Arroyo, G. D’Amico, J.M. Escaño, L. Alvarado-Barrios, Optimal management of a hybrid and isolated microgrid in a random setting, Energy Rep. 8 (2022) 9402–9419. [49] L. Alvarado-Barrios, A.R. del Nozal, J.B. Valerino, I.G. Vera, J.L. Martínez-Ramos, Stochastic unit commitment in microgrids: influence of the load forecasting error and the availability of energy storage, Renew. Energy 146 (2020) 2060–2069. [50] F. Pacaud, P. Carpentier, J.-P. Chancelier, M. De Lara, Optimization of a domestic microgrid equipped with solar panel and battery: model predictive control and stochastic dual dynamic programming approaches, arXiv preprint arXiv :2205 .07700, 2022. [51] G. D’Amico, F. Petroni, S. Vergine, An analysis of a storage system for a wind farm with ramp-rate limitation, Energies 14 (13) (2021) 4066. [52] G.E.S. Data, I.S. C.G. DISC), Global modeling and assimilation office (gmao), merra-2, https://disc .gsfc .nasa .gov /datasets /M2T1NXFLX _5 .12 .4 /summary. (Accessed 20 January 2021), 2015. [53] G. D’amico, F. Gismondi, J. Janssen, R. Manca, F. Petroni, E. di Prignano, The study of basic risk processes by discrete-time non-homogeneous Markov processes, Theory Probab. Math. Stat. 96 (2018) 27–43. [54] L. Casula, G. D’Amico, G. Masala, F. Petroni, Performance estimation of photovoltaic energy production, Lett. Spat. Resour. Sci. 13 (3) (2020) 267–285. [55] G.E.S. Data, I.S. C.G. DISC), Global modeling and assimilation office (gmao), merra-2, https://disc .gsfc .nasa .gov /datasets /M2T1NXRAD _5 .12 .4 /summary. (Accessed 10 October 2021), 2015.