# Distributed Optimal Power Flow Algorithms Over Time-Varying Communication Networks

###### Abstract

In this paper, we consider the problem of optimally coordinating the response of a group of distributed energy resources (DERs) in distribution systems by solving the so-called optimal power flow (OPF) problem. The OPF problem is concerned with determining an optimal operating point, at which total generation cost or power loss is minimized and operational constraints are satisfied. To solve the OPF problem, we propose distributed algorithms that are able to operate over time-varying communication networks and have geometric convergence rate. First, we solve the second-order cone program (SOCP) relaxation of the OPF problem for radial distribution systems, which is formulated using the so-called DistFlow model. Then, we focus on solving the convex relaxation of the OPF problem for mesh distribution systems. We showcase the algorithms using the standard IEEE – and –bus radial test systems and the IEEE –bus mesh test system.

## I Introduction

It is envisioned that present-day power grids mainly dependent on centralized power generation stations will transition towards more decentralized power generation based on DERs. One of the obstacles in making this shift happen is to find effective control strategies for coordinating a large population of DERs in distribution systems. To coordinate a large number of DERs, it will be required to process a large amount of data in real-time. Traditional centralized approach, which requires this data to be collected in the central processing unit, may not be feasible because of the communication overhead and constraints. Also, due to high renewable intermittency in future power grids, DERs will need to more frequently adjust their set-points, which will require the real-time feedback control to run and process data more often.

Although it is significantly faster to solve the OPF problem in a centralized way, collecting real-time data in the central unit will require more carefully designed and costly communication network because of the large distances between the central node and DERs and large volume of data. Such challenges will also require building a denser communication network with higher bandwidth and more secure communication channels to prevent cyber attackers from stealing sensitive private information. In the distributed approach, local data at each node is locally processed, and there is no need to collect the data in a single node. However, it is more difficult to solve the OPF problem in a distributed way since communication delays and random data packet losses might prevent the distributed algorithm from converging to an optimal solution.

In this work, we consider the standard OPF problem for balanced distribution systems with high penetration of DERs, where each DER is assumed to have a generation cost and can be operated within its capacity constraints. The objective of the OPF problem is to determine an optimal operating point at which total generation cost is minimized and operational constraints are satisfied. We also assume that a computing device is attached to each bus in the distribution system, and it is able to communicate with the computing devices at neighboring buses.

We also consider the problem of making the distributed algorithm resilient to communication delays and random data packet losses in communication channels. To this end, we propose distributed algorithms that are capable of operating over time-varying communication networks, where any given communication link can become inactive at any time instant. The proposed algorithms also have geometric convergence rate, which is a desirable feature for ensuring fast performance.

A vast body of work has focused on solving the OPF problem for distribution systems. Earlier works (see, e.g., [1, 2, 3]) focused on dealing with the non-convexity of the OPF problem, and proposed semidefinite program (SDP) and SOCP relaxations, which were shown to be exact for radial networks under some conditions. A few works proposed distributed approaches for solving the OPF problem over time-invariant communication networks (see, e.g., [4, 5, 6, 7]). In [7], the authors proposed a distributed algorithm for solving the SOCP relaxation of the OPF problem for balanced radial networks, which is based on the alternating direction method of multiplier (ADMM). There exists another body of works (see, e.g., [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]) that focused on time-varying communication networks, albeit, in a much simpler problem setting, in which most operational constraints were neglected. One line of works (see, e.g., [8, 9, 10, 11, 12, 13, 14, 15]) focused on the DER coordination problem with only total active power balance constraint and generation capacity constraints. In addition to these constraints, another line of works (see, e.g., [16, 17, 18]) also considered line flow constraints.

Our starting point in the design of the algorithms is a primal-dual algorithm for solving the system of optimality conditions also known as the Lagrangian system. We then develop distributed versions of this primal-dual algorithm by having bus agents closely emulate the iterations of the primal-dual algorithm, where each agent maintains and updates only local variables. The resulting distributed primal-dual algorithms converge geometrically fast. For convergence analysis, each algorithm is viewed as a feedback interconnection of the (centralized) primal-dual algorithm representing the nominal system and the error dynamics due to the nature of the distributed implementation. We show that the nominal system trajectories converge geometrically fast to the optimal solution if the error decays geometrically. Then, by using a small-gain based analysis inspired by [19], we establish the geometric convergence rate of the proposed algorithms. We note that the authors of [19] propose distributed algorithms with geometric convergence rate for solving an unconstrained optimization problem over time-varying graphs. However, since the OPF problem is a constrained optimization problem, these algorithms cannot be directly applied to solve it.

## Ii Preliminaries

In this section, we formulate the OPF problem and introduce the communication network model adopted in this work.

### Ii-a OPF Problem Formulation

We consider a balanced distribution system, the topology of which can be described by a directed graph, , where denotes the set of buses, and denotes the set of distribution lines, with if node is located upstream from node , i.e., is closer to the distribution substation. Let and denote the sets of nodes located downstream and upstream from node . Based on this orientation, we can define a node-to-edge incidence matrix, , with and , if , and and , otherwise. Also, let contain the entries of , each corresponding to a sending end, with if , for some , and , otherwise. Similarly, contains the entries of , each corresponding to a receiving end, with if , and , otherwise. [Note that .]

Let denote the series impedance of the line . Let denote the voltage magnitude at bus , and denote the current magnitude through line . Define , , . If is radial, the AC power flow equations can be exactly represented via the following DistFlow model (see, e.g., [20, 7]):

(1a) | ||||

(1b) | ||||

(1c) | ||||

(1d) |

where and denote the active power demand and supply at node , and denote the reactive power demand and supply at node , and denote the active and reactive power flow into node through line , respectively.

We impose the operational limits on the power outputs of the DERs that need to satisfy the capacity constraints:

(2) |

where , , , . We also impose the following operational constraints on the voltage magnitude at each bus and line currents:

(3) | |||

(4) |

where , , , .

Then, the OPF problem can be formulated as follows:

over | (5) | |||

subject to |

where denotes the cost associated with the electric power generated by the DER at bus , and our main objective is to minimize the total generation cost, . We assume that is twice differentiable, and , , .

### Ii-B SOCP Relaxation Of The OPF Problem

Because of the nonlinear equality constraint (1d), the OPF problem (5) is non-convex. For radial networks, it has been shown in [2, 3] that under certain assumptions when (1d) is relaxed to the second-order cone constraint,

(6) |

the OPF problem (5) admits an exact second-order cone program (SOCP) relaxation given below:

over | (7) | |||

subject to |

For our further analysis, we introduce additional variable , , and break the constraint (1c) into two constraints:

(8a) | ||||

(8b) |

Clearly, the constraint (1c) is equivalent to (8). The proposed distributed algorithm relies on the use of the regularization term that plays an important role in establishing the convergence results. Although including this term in the objective function adds a certain approximation to the OPF problem (7), there is practically no difference between the solutions of (7) and its regularized approximation, given below, if the regularization weight () is kept small:

over | (9) | |||

subject to |

where is the regularization term that also allows to penalize the line currents, and is the Euclidean norm. To this end, we develop a distributed algorithm that solves (9) for radial distribution systems.

### Ii-C The OPF Problem For Mesh Distribution Systems

In this work, we also develop another distributed algorithm that solves an optimal power flow problem formulated for mesh distribution systems. We formulate this problem using a few graph-theoretic notions provided below.

Let denote an undirected spanning tree in . An undirected edge in , which does not belong to , and the path in between the vertices of this edge form the so-called fundamental cycle [21, Definition 2-8]. contains fundamental cycles, as many as the number of edges, which do not belong to . Let denote a directed fundamental cycle with vertices, where the vertex set , and the directed edge set , in which the orientation of the edges is chosen by traversing the cycle in one (e.g., clockwise) direction. We define the fundamental cycle matrix, denoted by , as follows:

(10) |

In the remainder, we make use of the following result (see, e.g., [21, Theorem 4-6]):

(11) |

For mesh networks, we adopt the so-called LinDistFlow model (see, e.g., [20, 22]) obtained from (1) by neglecting the branch loss terms and :

(12a) | ||||

(12b) | ||||

(12c) |

which is accurate enough under normal operating conditions. Because of the mesh topology, using the LinDistFlow model (12) in the OPF problem may not yield accurate values for the power flows. In fact, there exist infinitely many solutions that satisfy the LinDistFlow model (12) due to the circulating power flows along the cyclic paths. To obtain a more accurate solution, additional constraints need to be taken into account that are imposed by the voltage phase angles on the flows along each cycle. In the following discussion, we elaborate on this further, and write

where is the voltage phase angle at bus , and denote the conductance and susceptance of the line . Let and denote monotonically non-decreasing functions such that and , . Let denote the -th row of the fundamental cycle matrix given in (10). Let . Let , , where

For each cycle , the following relations hold, which follow from (11):

Thus, the flows, and , need to satisfy the following constraints for each cycle :

(13) |

Similar to the problem formulation for radial networks, we introduce additional variable , and break the constraint (12c) into the following constraints:

(14a) | ||||

(14b) |

where the constraint (14) is equivalent to (12c). For mesh distribution systems, we then consider the following optimal power flow problem:

over | (15) | |||

subject to |

Note that LOPF is non-convex and difficult to solve because the constraint (13) is non-convex. Later, we present a convex approximation of LOPF that allows the resulting flows to satisfy the constraints (13) accurately.

### Ii-D Cyber Layer

Next, we introduce the cyber layer model for representing the communication network interconnecting the nodes of the distribution system. Here, we assume that the topology of the nominal communication network coincides with the topology of the power network. More formally, let denote the nominal undirected communication graph, where is the set of bidirectional communication links, and if or . During a time period , successful data transmissions among the nodes can be captured by graph , where is the set of active communication links, in which if nodes and exchange information with each other during time period . Regarding the communication model, we also make the following standard assumption (see, e.g., [23, 19]).

###### Assumption 1.

There exists some positive integer such that the graph is connected for .

Note that Assumption 1 only requires a communication graph to be connected over a long time interval rather than at every time instant.

## Iii Distributed Algorithm for Radial Distribution Systems

In this section, we present a distributed algorithm for solving the OPF problem (9) over time-varying communication graphs.

### Iii-a Distributed Primal-Dual Algorithm

Let , and let denote the dual variables associated with the DistFlow model constraints (1a) – (1b), (6), and (8) in the OPF problem (9). Let denote the augmented Lagrangian for (9) given by

where denotes an element-wise multiplication, , and are defined as follows:

where , and . The regularization terms , , and penalize the violation of the constraints and allow to significantly improve the convergence speed.

Our starting point to solve (9) is the following primal-dual algorithm:

(16a) | ||||

(16b) | ||||

(16c) |

where , denotes the projection onto the set , , , and denotes the projection onto the interval . Notice that the -update (16c) uses instead of simply using ; this subtle change (to be clarified later when we present the convergence analysis) is due to the nonlinearity of the constraint (6).

In the proposed distributed version of (16), every node estimates the optimal values of only local primal and dual variables, denoted by . In the distributed algorithm, each node performs updates based on the following local augmented Lagrangian:

which was obtained from the Lagrangian by collecting all terms that are local to node , is an estimate of , and

To illustrate the main idea behind the distributed algorithm, we explain how neighboring nodes and estimate the local quantities that they share, and focus our attention on one such quantity, . Assuming , note that and are the estimates of maintained by nodes and , respectively. To make sure that the estimates and converge to the same value, nodes and need to exchange the estimates with one another and compute their average as shown below:

where denotes the projection onto the interval , if , and , otherwise, and and are the estimates of , the sensitivity of the Lagrangian to , used in the -update of (16a). One way to estimate the gradient can be purely based on the local Lagrangian (local information):

(17) |

where , . However, leveraging only local information, as in (17), typically results in slow (asymptotic) convergence. A better approach is to let each node track the gradient by using local information and the information received from a neighbor:

(18a) | ||||

(18b) |

where and are updated so that their average

has exactly the same form as the sensitivity of the Lagrangian to ,

used in the -update of (16a). This idea of tracking the gradient, which appeared in [19] for solving an unconstrained multi-agent optimization problem, allows to more closely emulate the updates in the primal-dual algorithm (16), and achieve faster (geometric) convergence rate.

We use exactly the same ideas to update other variables, which leads us to the following distributed algorithm:

(19) |

where , , if , and , otherwise. The gradients and , , are updated as follows: