Distributed Real-Time Power Flow control with renewable integration

We formulate an Optimal Real-Time Power Flow (ORPF) problem that integrates renwable energy generation and energy storage. In the ORPF problem, we seek to minimize the costs of energy storage and of power generation from fossil fuel that are required to balance the loads and generation from renewable sources. We present a novel decentralized algorithm for this problem, using tie-set graph theory. Tie-set graph theory significantly reduces the complexity of the ORPF problem by dividing a power network into a set of independent loops referred to as “tie-sets.” Simulation results demonstrate real-time power production responses and flow controls that lead to reliable use of battery systems and reduce the cost of using fossil fuel.


I. INTRODUCTION
Integration of renewables with energy storage systems has been motivated by the increasing availability of renewable energy from solar and wind power and excess generation by customers.According to [1], "It has been estimated that if 20% of the energy that could be harvested from wind farms across the globe were used, all of the world's electricity demands could be met several times over [2]."Battery systems provide large savings in generation cost without compromising energy availability for customers [3].
Optimal power flow (OPF) problems, first formulated and studied by Carpentier [4], have been studied for more than half a century.Many of the earlier models for OPF focused on static optimizations, i.e., optimizations for isolated periods of time in which power supply and demand must be balanced at every period.Today, it is increasingly common for energy storage devices such as batteries to be installed and used in power grids [5].By charging and discharging the batteries, mismatches between instantaneous power supply and demand can be balanced.As a result, the requirement of power balance at every instant in the OPF formulation can be relaxed.Multiperiod versions of OPF problems can be considered.in which the battery charging/discharging profile becomes one of the control variables over which the optimization is defined.
In this paper, we adopt a model similar to that of [1].We formulate an Optimal Real-Time Power Flow (ORPF) problem with energy storage devices.Our goal is to minimize the total cost, which consists of (1) the cost of power production by the Controllable Generation Facility (CGF) using fossil fuels and (2) the cost of using batteries across multiple time periods to balance the fluctuation of renewable power generation and loads.To solve the ORPF problem, we present a novel decentralized algorithm to autonomously allocate the CGF generations and battery charges/discharges.
As the topology of today's traditional grids are modified to integrate and manage distributed energy resources (DERs), mesh topologies will likely be utilized because of the increased flexibility, efficiency, and resiliency they provide [6], [7].The proposed algorithm effectively divides a meshed power network into a set of independent loops, so-called "tie-sets" in graph theory, that can be seen as a µ-dimensional linear vector space 1 .Monitoring of loads and renewable production is locally conducted in each tie-set using an autonomous agent.Based on the monitored data, each tie-set independently optimizes the power production response and then distributes power flow at each time step to minimize both CGF and battery cost.
The work in [8] deals with balanced allocation of static distributed energy resources and introduces the simulation results showing that the iterative optimization within the system of fundamental system of tie-sets leads to global solution whose theoretical property can be verified in [9].On the basis of [8], our previous work achieves the balanced allocation of renewables with the complete automation of a prospective future grid that integrates end-use devices to capture stochastic process of loads and renewable generations automatically [10].
The proposed algorithms achieve sustainable grid operation even though future load is uncertain and renewable generation is variable and unpredictable.Simulation results show that our algorithm reduces the costs of battery usage and power production by CGF at every time step, and demonstrates flow distribution that leads to reliable use of battery systems.

II. PROBLEM FORMULATION
In this section, we formulate an Optimal Real-Time Power Flow (ORPF) problem that integrates renewable energy production and energy storage devices.
We consider a connected graph G = (V, E) with a set of nodes V = (1, ..., n) representing the buses and a set of links E ⊆ V ×V representing the power lines.The links are directed with arbitrarily defined directions, and a link from nodes i to j is denoted interchangeably by either (i, j) ∈ E or i → j.
Let i : i → j and k : j → k denote the set of predecessors and successors of node j in the directed graph, respectively.
We focus on the notion of a system operating point (SOP) [11], which has a task of integrating growing amounts of renewables as well as loads and in-and-out power flows into a smart grid.A node in this model has the function of SOP and is also responsible for making a decision to balance the supply and load at every moment, with the help of installed storage devices, e.g., batteries.Storage systems are significantly able to save generation cost without wasting consumers' facilities, by charging or discharging to balance the surplus or shortfall in generation compared to load.Then, we define the following variables in the power network.
• p j (t): The battery energy level at node j ∈ V at time t ∈ T := {1, 2, ...}.• l j (t): The total load of node j at time t.
• r j (t): The amount of real power injection of node j at time t that is provided by renewable energy resources.• g j (t): The amount of real power injection of node j at time t provided from Controllable Generation Facility (CGF) that utilizes resources except renewable resources, such as fossil fuel (coal, gas powered) or nuclear.• f ij (t): The real power flow on the link (i, j) ∈ E. We use variables without subscripts to denote vectors with the proper components.For example, p = (p j (t), j ∈ V and t ∈ T ) denotes the vector of node battery energy levels.The battery energy levels p j follow the dynamics as2 p j (t) = p j (t − 1) − d j (t) + g j (t) − F j (t), for j ∈ V, (1) where d j (t) := l i (t) − r j (t) is called the net demand, and is the net power injection from node j to other nodes at time t.Note that the battery energy levels are bounded by finite capacities as Also, the CGFs are subject to generation capacity constraints and, due to thermal and safety limits, the power flows on the lines are subject to capacity constraints The generated power injections g i (t) by CGF incur some cost.We denote the cost of generation g j (t) at time t by c j (g j (t), t).We also consider a cost b j (p j (t)) for the battery with energy level p j (t) at time t.Then, we formulate the ORPF problem to minimize the cost of CGF generations and efficiently distribute DERs for reliable use of batteries.
ORPF: Given initial battery levels p(0) ≥ 0, net demand d, battery capacities p, CGF capacities g, link capacities f , and a given time sequence T = {t}, the ORPF is over f, F, g, p s.t.
In this paper, we consider quadratic cost functions for CGFs: where γ i (t) is a time-varying coefficient.The battery cost is assumed to be dependent on the battery level p i .As we want to maintain the useful life of a battery, we consider the battery cost function that imposes a penalty proportional to the deviation from its capacity as for some α i > 0.

III. OPTIMAL REAL-TIME POWER FLOW BASED ON TIE-SETS
We introduce tie-set graph theory and an autonomous distributed control model to solve the ORPF problem.

A. Tie-set Graph Theory
Tie-set graph theory is described in detail in [12], [13].Here we provide the basics.
For a given bi-connected graph G = (V, E), let L λ = {e λ 1 , e λ 2 , ...} be a set of all the edges that constitutes a loop in G, which is called a tie-set [14].The set of all vertices included in a tie-set L λ is denoted as V λ .Let T and T respectively be a spanning tree and a cotree of G, where T = E − T .µ = µ(G) = |T | is called the nullity of a graph.Focusing on a subgraph G T = (V, T ) of G and an edge l = (a, b) ∈ T , there exists only one elementary path P T (b, a) ⊆ T whose origin is b and terminal is a in G T .Then, a fundamental tie-set that consists of the path P T and the edge l is uniquely determined as L(l) = {l} ∪ P T (b, a).There are µ = |T | fundamental tiesets in G, which are called a fundamental system of tie-sets denoted as L B = {L 1 , L 2 , ..., L µ }.A fundamental system of tie-sets covers all the vertices and edges even in a non-planar graph G as shown in Fig. 1 where thick lines represent edges of a spanning tree T and thin lines correspond to edges of a cotree T .

B. Tie-set based Autonomous Distributed Control
We describe the model of Tie-set based Autonomous Distributed Control (TADiC) conducted in each L λ , which is described in Algorithm 1, to accomplish complete automation of a future smart grid.Algorithm 2 is called by TADiC if L λ gains process priority to control resources within the tie-set.In order to explain TADiC, we use the notations and definitions in Table I.Each tie-set L λ ∈ L B has a leader node v λ l .TADiC is conducted in the leader v λ l by communicating with leaders of Adjacent Tie-sets (AdT) L A λ using a predefined routing table.Tie-set Agent (TA) constantly navigates each tie-set L λ to bring Measurement Vector (MV) y λ (t) to the leader node v λ l .Based on the MV y λ (t), v λ l calculates the value of Tie-set Evaluation Function (TEF) Φ(L λ , t) and exchanges it with AdT using Tie-set Evaluation Function (TEFM) to decide the process priority among tie-sets.If L λ gains the process priority, v λ l set its Tie-set Flag (TF) as ζ(L λ ) = 1, otherwise ζ(L λ ) = 0. Tie-set Flag Signal (TFS) is used to confirm that the TF of L λ and its AdT is set as 0 so that TADiC is iterated.
Therefore, the procedure of TADiC starts out with Initialize, and repeats the steps from Send to Receive, Optimize, Notify, Confirm, and StandBy in each leader v λ l as in Algorithm 1.In this paper, TEF is defined as the average value of battery cost functions in a tie-set as follows: The tie-set(s) with larger value of Φ(L λ , t) gains the process priority to conduct Algorithm 2 in the next section.

C. Decentralized Algorithm for Optimal Real-Time Power Flow
We optimize the objective function ( 6) in a tie-set L λ at every time step t.A node power p i (t) has two types of variables; the CGF generation g i (t) and the net power injection F i (t).Our algorithmic solution is designed to first optimize the cost (6) focusing on CGF generations, and then optimize flows in a tie-set as described in Algorithm 2. Necessary information in a tie-set L λ is provided by MV y λ (t) included in TA and stored in its leader node v λ l .After Initialization, v λ l conducts the following procedures.
1) CGF Optimization: In Step 1, the optimum CGF power g * i (t) at i ∈ V λ is first calculated without dealing with the net power injection F i (t).Let us define p i (g i (t), t) as where V λ is a set of all the nodes in a tie-set L λ .Solving for g i (t), we get: Now we have some constraints on g i (t) and p i (g i (t), t) as in (3) and ( 4).On the one hand, since p i (g i (t), t) ≤ p i and g i (t) ≤ g i , we have On the other hand, we know that g i (t) ≥ 0 and p i (g i (t), t) ≥ 0. Therefore, we have Let us define ψ(g i (t), t) on the basis of (6) as
Each element of the tie-set flow vector satisfies (5).In addition, p j (t) satisfies (3).Therefore, we solve the following problem: where As the edges in a tie-set form a linear structure, we can solve (21) by linear programing.
Algorithm 2 Decentralized Algorithm for ORPF STEP 0: Initialzation IV.SIMULATION AND ANALYSIS Simulation and experiments were conducted to verify the proposed method for solving the ORPF problem and to analyze the solution and its behavior.The results described below confirm that at every node the useful battery life is maintained by the procedure described for calculating CGF generation and in-and-out power flows.As the network becomes larger, the stability of behavior of overall battery levels does not change, which demonstrates the effectiveness of the proposed method in terms of scalability.
In each run of our simulation, the network is configured to be a biconnected network in which each node has at least 2 link connections.Although links are directed, power flow can pass bidirectionally.Each node has a function that produces its load and renewable power generation over time.In addition, each node i has a battery whose capacity is set as p i = 20 MW (Megawatt).The generation capacity is g i = 100 MW, and the link capacity is f ij = 100 MW.The initial powers are uniformly set as p i (0) = 5. α i of the storage cost b i (p i (t)) = α i (p i − p i (t)) is assigned between 1 to 2 at random; γ i (t) ≡ 1.The loads l i (t) and renewable injections r i (t) are randomly generated with a time interval of 15 min, where T = {0, 15, ...}.The communications interval ∆t in TADiC as in Table 1 is set as ∆t = 1 min.MV y λ (t) is constantly reported to the leader of each tie-set by TA.Fig. 2. The behavior of p i (t), l i (t), r i (t), g i (t), and F i (t) at a typical node.

A. Power Injections at a Node
We first analyze the simulated behavior of various power injections at a node.The simulation network G = (V, E) has 100 nodes and 200 links.Since G has 200 links, the number of tie-sets is µ(G) = |E| − |V| + 1 = 101.The height of the tree is 7.The loads and renewable injections are bounded by 0 ≤ l i (t) ≤ 20 (MW) and 0 ≤ r i (t) ≤ 10 (MW), respectively, so that the expected penetration rate of renewables (i.e., the expected value of r i (t)/l i (t)) is intended to be 50%.We show the results at two nodes: an arbitrary node and the root node of the spanning tree in G used to generate the tie-sets.Fig. 2 shows the behavior of battery level p i (t), load l i (t), renewable generation r i (t), CGF power generation g i (t), and net power injection F i (t) at a typical node i ∈ V.The values are shown at 15 minute intervals from t = 0 to 600.As shown in Fig. 2, the battery level p i (t) varies in the range 0 < p 10 (t) ≤ 20 (MW).Shortly after the sudden load peaks occur, node i makes up for those peaks with increased CGF generation and increased power inflows.At node i, the net power injection F i (t) can be either positive or negative depending on the power levels and the value of α j at other nodes V λ within a tie-set.The value of α i is 1.601.Fig. 3 shows the behavior at the root node.At this node, α i = 1.120.Since this node is the root of the tree, it belongs to many tie-sets, so it is involved in many optimization procedures conducted in those tie-sets.As can be seen in of Fig. 3, the root node produces more CGF power than the node in Fig. 2, with the most of the produced CGF power distributed to other nodes.This suggests that the nodes in a grid can be divided into two categories: nodes that obtain power from other nodes, or the nodes that distribute power to other nodes.This category to which a node i belongs depends in part on on the number of tie-sets to which it belongs and the value of α i .

B. Convergence of the Overall Power Levels with Different Renewable Penetrations
We analyze the convergence behavior of the overall power levels, taking their average value to see if the proposed scheme is capable of coping with different values of the renewable penetration rate.We calculate P (t), the average value of the power levels at time t, as follows: Convergence can be measured by looking at the changing values of P (t) over time.Convergence is achieved from time t s to t e provided 0.9 ≤ P (t+1)/P (t) ≤ 1.1 is satisfied during the time interval t s ≤ t ≤ t e .We define the maximum load l i and the maximum renewable generation r i by The renewable penetration rate can be adjusted by fixing the load and changing the maximum renewable generation as follows:  i∈V g i (t) with different renewable penetrations (25% to 100%) in a 100-node grid.
Experimental data was obtained for each value of the renewable penetration rate by running the simulation 10 times and averaging the results.
Fig. 4 shows the result of the simulations in a 100-node grid.From the figure, we see that convergence occurs for all values of the renewable penetration rate, and that as the renewable penetration rate increases the convergence line moves closer to the capacity p i .For all renewable penetration rates, after 100 minutes the average battery levels are converging in the range between 15 and 20, and they remain in this range once they have reached it.

C. Analysis of CGFs with Different Penetration Rates of Renewables
We analyze the behavior of the total CGFs ∑ i∈V g i (t) in a 100-node grid from over a 600-minute period with the same simulation conditions as previously.Fig. 5 shows the result of these simulations.
There is an initial spike in the CFG power injection, as power is injected to match the load.After about 30 minutes, the total CGF power becomes stable as P (t) starts to converge.As the renewable penetration rate is lowered, the amount of CGF power injection increases.

D. Scalability
To assess scalability, we conducted simulation on networks where the number of nodes varied from 100 to 500 in increments of 100.In these simulations, we held the renewable penetration rate constant at 50%.The results are shown in Fig. 6.The convergence results are similar to those seen in Fig. 4 above, as in all cases convergence occurred after no more than 100 minutes.As can be seen in Fig. 6, as the number of nodes becomes large the final average battery levels approach battery capacity.Although the reason is not clear, this could be because the size of a tie-set (the number of nodes in a tie-set) becomes large and many nodes conduct optimizations in parallel.This behavior suggests that the proposed method will be well suited to future large-scale power networks.

V. CONCLUSION
In this paper, we have formulated an optimal real-time power flow problem to integrate renewable energy generation Fig. 6.The convergence behavior of the average node power P (t) with the number of nodes varying from 100 to 500.The renewable penetration is fixed at 50%. and energy storage systems.We have proposed a decentralized algorithm to solve the problem, using a fundamental system of tie-sets that divides a grid into a set of independent loops.Our algorithm minimizes the costs of fossil fuel generation and battery storage within each tie-set.Simulation results suggest that reliable operation of batteries may be possible with optimal power productions and flow controls based on the system of tie-sets.The proposed method shows promise as a cost-effective and sustainable grid management strategy that compensates for fluctuations in load and renewable generation in a complex large-scale future power grid.

Fig. 1 .
Fig. 1.Examples of a fundamental system of tie-sets

Fig. 3 .
Fig.3.The behavior of p i (t), l i (t), r i (t), g i (t), and F i (t) at a root node.

Fig. 4 .
Fig.4.The convergence behavior of the average node power P (t) with different renewable penetrations (25% to 100%) in a 100-node grid.

Fig. 5 .
Fig. 5.The behavior of the total CGF power