{'fraction_non_alphanumeric': 0.041821419486135845, 'fraction_numerical': 0.010277283134062579, 'mean_word_length': 4.354399346227186, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Adaptive Coordination of Distributed Energy Resources in Lossy Power Distribution Systems

This paper is concerned with the problem of coordinating a set of distributed energy resources (DERs) in a lossy power distribution system to provide frequency regulation services to a bulk power grid with the explicit consideration of system losses. To this end, we formulate the problem as an optimization problem, the objective of which is to minimize some cost function subject to a set of constraints. The formulation requires knowledge of incremental total system losses, which we approximate using the so-called loss factors (LFs) that explicitly capture the impacts of both active and reactive power injections on system losses. The LFs are estimated recursively using power injection measurements; thus, they are adaptive to various phenomena that impact the power system operation. Numerical simulation on a 33-bus distribution test feeder validated the effectiveness of the proposed framework.


I. INTRODUCTION
Frequency regulation services are by-and-large provided by conventional synchronous generators. However, with deepening penetration of renewable-based generation resources, synchronous generators alone may be insufficient to meet regulation requirements [1]. Moreover, conventional synchronous generators may suffer from poor performances when the regulation signal changes fast. To overcome the aforementioned challenges, distributed energy resources (DERs), such as energy storage resources, are allowed to provide such services [2]. In this context in the US, driven by Order 755 from the Federal Energy Regulatory Commission, performance-based regulation markets have emerged as an effective means to incentivize the provision of high-quality frequency regulation services from resources including conventional generators and DERs [3]. Resources are incentivized to track the instructed regulation signal accurately in a performance-based regulation market since otherwise they will incur loss of payments [3].
Compared to conventional generators, DERs typically enjoy much faster-responding capabilities, and can potentially track the regulation signal better. Yet, the individual frequency regulation capability of the DER is usually small [4]. As such, appropriate coordination of DERs is required in order for them to collectively provide some amount of regulation power in the form of an incremental change (with respect to some nominal value) in the power exchanged by the distribution feeder with the rest of the system; this incremental change is specified by the regulation signal sent by the bulk system operator. The problem of optimally allocating the regulation power among the set of DERs subject to capacity limits is referred to as the optimal DER coordination problem (ODCP).
The general ODCP that concerns with the allocation of resources (active or reactive power) has been widely studied [4], [5]. For example, a distributed coordination scheme is proposed for DERs to provide ancillary services in lossless systems in [4]. Authors in [5] present a framework to coordinate the DERs to provide the primary frequency control using a droop-control scheme, based on a power flow model with explicit consideration of losses. However, neglecting system losses will result in a solution that fail to provide the exact amount regulation power at the power distribution feeder. Also, the dependence on model parameters obtained offline and thus lack adaptivity to changes in system conditions as evidenced in [6], [7]. Moreover, in situations where the model parameters are unavailable, these approaches simply cannot work.
In this paper, we address the ODCP by taking an alternative approach that explicitly takes into account system losses yet without reliance on system models. To this end, we formulate the ODCP as an optimization problem that aims to minimize some cost function and is constrained by the power balance equation and DER capacity limits. In order to provide the exact amount of regulation power, it is necessary to explicitly consider the impacts of system losses, which are a nonlinear function of the power injections, as well as the network parameters, when determining the regulation power provided by each DER. As such, in the ODCP formulation, we approximate the losses using the so-called loss factors (LFs)-linear sensitivities of the total system losses with respect to changes in power injections-that explicitly capture the impacts of both active and reactive power injections on system losses. LFs are conventionally computed from power flow models and have been applied in locational marginal price computation in electricity markets [8] and sizing and allocation of DERs in power distribution systems [9]. In the proposed framework, the LF will be estimated in an online fashion using measurements acquired from the system, and updated in real-time so as to adapt to various phenomena that impact the operation of the power system, e.g., changes in system operating point.

II. PRELIMINARIES
In this section, we first introduce the power distribution system model used throughout this paper. Then, we describe the problem of coordinating a set of DERs to collectively provide frequency regulation services to a bulk power grid.

A. Power Distribution System Model
Consider a balanced power distribution system that consists of a set of buses indexed byÑ = {0, 1, · · · , N }. Assume that bus 0 corresponds to a substation bus, which is the only connection of the distribution system to a sub-transmission (or transmission) network. Further, assume that the bus 0 is an ideal voltage source.
Without loss of generality, assume there is one DER and one load at every bus except for bus 0, where there is no DER or load. Let P g i and Q g i , i = 1, 2, . . . , N, respectively denote the active and reactive power injections from the DER at bus i (referred to as DER i). Similarly, let P d i and Q d i respectively denote the active and reactive power withdrawals of the load at bus i (referred to as load i). Typically, there will be some reactive power control resources in the power distribution system to maintain the bus voltages within a desired range [10]. Assume the reactive power injections from such resources are included in the Q d i 's. Let P i and Q i denote the respective net active and reactive power injections at bus i, and P t and Q t the respective active and reactive power injections into the power distribution system from the bulk power grid. Then, . Then, we can conceptually express P t as a function of P and Q as For given P and Q, the total system losses, denoted by (P , Q), are given by where 1 N is an N -dimensional all-ones vector. The partial derivatives of the total system losses with respective to active and reactive power injections at each bus are referred to as the loss factors (LFs). Let Λ p i and Λ q i respectively denote the partial derivatives of the total system losses with respect to the active and reactive net power injections at bus i, i ∈ N ; we refer to Λ p i as the active LF at bus i, and Λ q i as the reactive LF at bus i.
where the partial derivatives of h with respect to P and Q are row vectors. Expressions for Λ p and Λ q can be obtained using a power flow model; due to the space limitation, the derivation of model-based LFs are not presented here.
Therefore, for given small ∆P and ∆Q (with respect to some P and Q), the incremental total system losses associated with ∆P and ∆Q can be approximated by Then, by using (1) and (3), we can obtain the change in P t , denoted by ∆P t , as follows: It is clear from (5) that the impacts from reactive power injections on the total system losses cannot be neglected. When active power injections change, the net reactive power change, ∆Q, may change accordingly based on some specific rules (possibly as a result of a feedback control action). Both ∆P and ∆Q will lead to changes in system losses. Thus, in order to determine the incremental total system losses after an active power injections change, it is necessary to know the reactive power control policies implemented throughout the system. If ∆P is small, we can approximately represent ∆Q as ∆Q ≈ Φ∆P , where Φ ∈ R N ×N is the reactive power response sensitivity matrix at the operating point defined by (θ, V , P , Q). Using this approximation, together with (4) and (5), ∆ (P ) and ∆P t can be represented as a linear function of ∆P as follows: where Λ := Λ p + Φ Λ q ; we refer to the entries of Λ as the total loss factors. 1
Let r(t) denote the value of some regulation signal, r, sent by the bulk system operator to the distribution system at time t. Usually, the operator sends a single value every ∆T units of time, e.g., ∆T = 2 s. Thus, in reality, the signal r(t) is piecewise constant, taking some value r[k] ∈ R for t in the interval (k∆T, (k + 1)∆T ], k = 0, 1, . . . , referred to as time interval k. Let , · · · , p g N [k]] . Let p g i and p g i respectively denote the maximum up and down regulation capacities of DER i, and define p g = [p g 1 , · · · , p g N ] and p g = [p g 1 , · · · , p g N ] . Then, at time instant k∆T, k = 0, 1, . . . , referred to as time instant k, the problem is to determine p g [k] satisfying the following two constraints: [C1.] p g ≤ p g [k] ≤ p g , i.e., DER up and down regulation capacity constraints are satisfied; and , i.e., the total amount of regulation power provided to the bulk grid is r[k], 3 while all loads within the power distribution system are balanced, i.e., equation (7), which is used to approximately model the power balance in the system, is satisfied for some Q. Note that r[k] and all the measurements are obtained at time instant k, and the loads are assumed to be constant for the duration of the interval (k∆T, (k+1)∆T ]. Also, the computation of p g [k] is assumed to be instantaneous. The DERs will be instructed to provide p g [k] immediately after the computation is completed, and their power outputs will remain fixed for the duration of the interval (k∆T, (k + 1)∆T ].
In a lossless power distribution system, the sum of p g i [k]'s must equal to r[k]; however, this is not the case in a lossy power distribution system. As such, it is important to explicitly take into account the system losses in order for the DERs to provide the exact amount of regulation power to the bulk power grid. Also, while there may exist multiple ways to choose a p g [k] that solves the DER coordination problem, we can select one that is optimal with respect to some objective function. For example, we may select a p g [k] that minimizes the incremental total system losses or costs as in [11], or one that minimizes the norm of the regulation power vector, or a combination of these various objectives.

III. ADAPTIVE DER COORDINATION FRAMEWORK
In this section, we propose an adaptive coordination framework for DERs to provide frequency regulation. We first propose a measurement-based method to estimate the LFs, which is then used to develop a formulation of the ODCP.

A. Recursive Loss Factor Estimator
We next propose a measurement-based approach for estimating LFs, which is built upon the recursive weighted leastsquares (RWLS) estimation method. Suppose at time instant k, we have k consecutive measurements of P t and P , denoted by P t [0], · · · , P t [k − 1], P [0], · · · , P [k − 1], respectively (measurements P t [l] and P [l], l = 0, 1, · · · , k−1, are obtained at time instant l). Define the change in the power injection vector at time instant k as ∆P Let ∆P t [l] denote the change in the active power injection into the network from the bulk power grid at time instant l that results from ∆P [l], i.e., ∆P t [l] = P t [l] − P t [l − 1]. Then, for sufficiently small ∆P [l], and assuming Λ remains relatively constant over time if there are no topology changes, it follows from (7) that Then, by stacking the equation in (8) for l = 0, 1, · · · , k − 1, we obtain the following system of equations: When k is sufficiently large, (9) becomes overdetermined, and thus, we can use weighted least-squares (WLS) to obtain an estimate of Λ at instant k −1, denoted byΛ[k −1], as follows: is a positive definite symmetric weight matrix, and where Thus, using (11), the LFs can be updated using new measurements with little computational effort.

B. LF-based ODCP Formulation
Using the estimated LFs, we can now develop a formulation for the ODCP. At time instant k, the total LFs estimated at time instant k − 1,Λ[k − 1], is available. Then, for sufficiently small ∆P [k], it follows from (8) that Now, given r[k], we would like to choose p g [k] in some optimal fashion so that that P t [k] tracks the regulation signal, i.e., P t [k] = P t0 [k] − r[k]. Thus, by using the incremental model in (12), we have that with Then, by choosing the minimization of a weighted sum of the incremental losses and the L 2 -norm (denoted by · ) of the regulation power vector as the optimality criterion, the ODCP to be solved at time instant k can be formulated as follows: where ρ ≥ 0, z = [z 1 , · · · , z N ] with z i being the regulation power provided by DER i, which is to be determined. Note , and r[k] are known quantities. The ODCP is a quadratic program with one equality constraint, which can be solved efficiently.

C. Interaction between LF Estimator and ODCP Solver
At time instant k, the LF estimator providesΛ[k − 1], i.e., the estimate of the total LFs based on some measurements taken up to time instant k − 1. Then, the vector of estimated LFs,Λ[k − 1], is sent to the ODCP solver. The ODCP solver also receives loads P d [k], the requested regulation power r[k], and solves the ODCP to determine p g [k]. Then, DERs are instructed to change their set-points so as to provide p g [k] for k∆T < t ≤ (k + 1)∆T . A new set of measurements will be available after the DER set-points are modified. The new measurements will be used in the LF estimator to dynamically update the estimated values of the total LFs and obtainΛ[k], which will be used in ODCP to compute the optimal regulation power from DERs for the next time interval.

IV. NUMERICAL SIMULATION
In this section, we illustrate the application of the proposed framework through numerical simulations. The accuracy of the estimated LFs, as well as the performance of the framework, is studied for a case where the nominal loads are kept constant, and a case where there are load changes.

A. Simulation Setup
A modified 33-bus power distribution system from [13] is used for all numerical simulations. There are three DERs, located at buses 12, 25, and 33, respectively, with their respective capacities being 2300 kW, 1500 kW, and 1200 kW, and their regulation capacity equal to 10% of its total capacity. We assume the reactive power control at buses 1 and 12 aims to maintain a constant voltage magnitude of 1 p.u. while no reactive power control is employed at any other buses. Throughout the simulation, we set ρ = 1 and γ = 0.97.
The power demanded by load i is generated using i denotes the demand nominal value, and ν i is a zero-mean Gaussian random variable with standard deviation being σ i = 0.01. The regulation signal is taken from PJM [14] and is updated every 2 seconds; correspondingly, we update the DER set-points every 2 seconds.
The actual LFs are obtained by manually perturbing the system and their values at the nominal operating point are shown in Fig. 1. As can be seen from Fig. 1, the active LFs, reactive LFs, and the total LFs have distinct values. Therefore, absent the knowledge of Φ, we can hardly obtain the accurate total LFs from the model.

B. LF Estimation Accuracy
The accuracy of the LF estimation is measured by the root mean squared error (RMSE), denoted by ε. Assume we have an initial estimation ofΛ and R at t = 0 s obtained by solving (9). The estimation results are shown in Fig. 2. In the model-based approach, the active LFs are used as estimates for the total LFs. At t = 0 s, ε[0] = 0.0062 in the measurement-based approach, which is relatively small. Yet, we have ε[0] = 0.0758 for the model-based approach, which is one order of magnitude greater than the values obtained using the measurement-based approach. This is expected since the impacts of reactive LFs on the total LFs are ignored in the model-based approach due to the lack of knowledge on Φ. After the first estimation, the RWLS algorithm is used to dynamically updateΛ and R. The RMSEs during t = 0 s to t = 300 s are shown as the solid line (case 1) in Fig. 3. The average RMSE in the measurement-based approach is 0.0049.
To illustrate the adaptivity of the measurement-based approach, we simulate a case where the nominal loads increase linearly by 20% from t = 60 s to t = 120 s. Under this setup, the RMSEs during the time interval (0, 300] s are presented as the dashed line (case 2) in Fig. 3. The average RMSE in the measurement-based approach is 0.0096, while the maximum RMSE is 0.0349. The RMSE starts to increase when the operating point begins to change at t = 60 s and starts to decrease when the changes end at t = 120 s. This is intuitively reasonable since the during the time when the operating  point changes, the majority of existing measurements provide information on old operating points, based on which we can hardly get accurate estimates at the current operating point. After the operating point change ends, the new measurements provide more information on the new operating point and the impacts from the measurements on the old one decay.

C. Quantification of Frequency Regulation Performance
The proposed framework is compared with the participation factor (PF) based coordination approach, which are nonnegative real numbers that sum up to 1 and are proportional to the regulation capacity of each DER. The total incremental changes in the active loads and the requested regulation power are allocated to each DER based on the PFs. The frequency regulation performance is measured by a score denoted by S. In the base case, the average performance score obtained using the PF-based approach is 0.8756; that obtained using the LF-based approach with estimated total LFs is 0.9991; and that obtained using the LF-based approach with actual total LFs is 0.9992. Obviously, the LF-based approaches perform much better than the PF-based approach where system losses are ignored. Moreover, the estimated-LF based approach perform almost equally good as the actual-LF based approach.
In the case with same operating point changes described in Section IV-B, the average performance score using LF-based approach with estimated total LFs is 0.9988, and that obtained using the LF-based approach with actual total LFs is 0.9992. The slight decrease in the performance score obtained using the estimated LFs are caused by the decrease in the estimation accuracy of the total LFs. Yet, the performance score decrease is negligible, showing the adaptivity of the propose framework.

V. CONCLUDING REMARKS
In this paper, we proposed an adaptive coordination framework for DERs in a lossy power distribution system to collectively provide frequency regulation services to a bulk power grid. The framework consists of a measurement-based recursive LF estimator to capture the impacts of both active and reactive power injections on system losses, and an ODCP solver that determines the optimal DER power outputs using the estimated LFs. The inherent nature of the estimator makes it adaptive to system condition changes. Numerical simulation validated the effectiveness of the proposed framework in coordinating the DERs for frequency regulation.