Variance-Aware Optimal Power Flow: Addressing the Tradeoff Between Cost, Security, and Variability

Recent work has studied modifications to DC optimal power flow (DC-OPF) computations so as to better account for risk arising as a result of stochastic variation in the output of renewable sources. Typically such modifications rely on mathematical constructs, such as chance-constraints, that can still yield convex formulations. However, numerical simulations show that the computed policies can translate into power flow patterns with high variance. We introduce a number of convex variants of OPF that tradeoff variance and cost minimization, describe practical algorithms for the solution of such problems, and present numerical experiments.


I. INTRODUCTION
A number of trends in power engineering practice have resulted in increasing exposure of transmission systems to risk in the form of variability and more broadly unpredictable behavior.Renewable penetration has been an early driver in this direction, to which one should probably add 'smart' loads, the use of distributed photovoltaics used in response to market signals, and other factors.
One impact of such stochasticity is the potential for increased equipment overloads.Prior research has addressed this problem by developing alternative formulations for the Optimal Power Flow (OPF) problem that also include modifications to balancing mechanisms.An example is provided by chance-constrained formulations for OPF (see [1]- [11]), which yield both generator output values but also participation factors, so that the probability that any given line exceeds its operational limit is upper bounded by a small value, under some assumptions on the stochasticity of uncertain sources.
Even though such schemes are risk-aware they may nevertheless fail to capture another (and important) facet of risk.In particular, numerical experiments such as those discussed herein, show that dispatch and participation decisions computed by the chance-constrained formulation may yield realtime power flows with high variability; specifically with the feature that some transmission lines have high variance of power flow.Such a feature is, likely, undesirable from a real-time operational perspective.See [12], which discusses negative impact of power flow variability on voltage profile and transformer operation.In general, high variance will likely hamper system understanding and control, and pricing policies (see [13], [14], [15] for work on pricing under uncertainty).[16] describes an optimization method for selecting a mix of renewable generation (under Gaussian stochastics) so as to attain a desirable mean-variance trade-off in flows on tie lines of a balancing area.Also see [17].
This paper continues the work initiated in [18].We describe modifications to the OPF problem which we term varianceaware OPF.In these modifications we explicitly trade-off variance in power-flow related quantities to operational cost.We provide computational experiments with several varianceaware schemes, and present an analysis of the variance-cost trade-off that borrows ideas from the classical "Sharpe-ratio" perspective in economics.
In Sections II-III we review prior work and introduce some basic concepts and formulations.Section IV presents a simple example of the impact of variance.Section V presents our main variance-aware formulations, and Section V-D describes numerical experiments with larger systems.Section VII discusses a different convex optimization formulation for addressing the trade-off between OPF cost and solution variance.

II. NOTATION AND BASIC FORMULATIONS
In this paper we will focus on the linearized, or DC model for power flows.We will use the following selected nomenclature, with additional terms described later: B = set of buses, n = |B|; B = bus susceptance matrix.B = B, with the last row and column removed B = B−1 0 0 0 ; Bi = i th row of B.
θ i = phase angle at bus i, θi = E(θ i ).E = set of lines; m = |E|.f max ij , b ij = power flow limit, and susceptance, for line ij ∈ E.
= BT i − BT j for each line ij ∈ E G = set of generator buses; we assume at most one generator per bus p min i , p max i = minimum and maximum output of i ∈ G. S = set of stochastic injection buses, µ k + ω k = stochastic injection at bus k ∈ B, • µ k = constant, ω k = zero-mean random variable.
• Ω = covariance of ω, an n × n matrix, • W = support of distribution for ω, R = set of buses participating in balancing A = matrix of participation factors; α ij = (i,j)-entry of A, ∈ R or j / ∈ S • V(A) = vector with entries b 2 ij π T ij (I − A)Ω(I − A T )π ij (variances) for ij ∈ E K = convex set of allowable participation factor matrices p = vector of generation amounts, extended to all b ∈ B (forcing p b = 0 when b / ∈ B). c(p) = (convex) cost of generation vector p. d= (fixed) vector of loads.
The standard DC-OPF formulation, using this notation, is as follows: A well-known simplification to constraints (1b)-(1c) relies on a pseudo-inverse for the B matrix (see, for example [1], [3]).For a line ij, et π T ij denote the row of the pseudoinverse corresponding to ij.Then the power flow on ij equals Using this equation we reduce (1b)-(1c) to the system
The methodology proposed in [1], [3], [9], modifies the DC-OPF computation so as to output both a vector p of controllable generation amounts and (as in [9]) an n × n matrix A used to model controllable generator participation in balancing.In this scheme, a vector ω ∈ W of output variation, is balanced by generation changes given by Aω, with the result that the total generator output at bus i is For simplicity, when i is not a controllable generator bus, we write α ij = 0 for all j.As a result the vector of net injections equals p − d + µ + ω − Aω.For the system to be balanced we need the stochastic condition ∀w ∈ W : Suppose we also require i∈B (p − d + µ) i = 0, i.e. absent stochastics the system is balanced.Then (4) is the same as ∀ω ∈ W : This condition will be satisfied if we impose [9] which is an equation in ω-space (thus removing one degree of freedom in ω).If W is full-dimensional then ( 6) is in fact required for (4) [20].Of course, we may impose additional requirements on A, for example by having bounds on individual α ij .We may also impose a "global" policy [9], namely that for every bus i ∈ R1 , α ij = α ik for every j = k.Notation.We will denote by A ∈ K a generic set of admissible participation matrices A, typically described by convex constraints.
In summary, where f ij denotes flow on line ij, we have ∀ij ∈ E : Likewise by construction Depending on how randomness is modeled, or whether the matrix A is fixed or subject to optimization, one obtains a number of variants of the problem (1).
The use of chance constraints has emerged as a central idea in the modeling of safe operation.Consider a given line ij.A chance constraint on this line is of the form where 0 < < 1 reflects the planner's tolerance for risk (or perhaps, perception on the impact of risk on the system).A relaxation of this requirement is that When ω is Gaussian, (10) can be summarized as (11) where Φ −1 (1− ) is the -quantile for a normal distribution and Std is standard deviation.System (11) is SOCP representable [1], [3].

A. Modifications used in this paper
We substitute (11) with Here, ν ij is a safety parameter.As outlined above in the Gaussian case ( 12) is equivalent to (9) when However, the Gaussian case is not the only one where such an equivalence holds; see the discussion in [18].In each case one needs an appropriately constructed parameter ν ij = ν ij ( ).Additionally (12) can be used to tightly approximate distributionally robust (or "ambiguous") chance constraints.Refer e.g. to [21].In any case, one could argue that even when the stochastics of ω is poorly understood or nontrivial with the result that it is difficult to fully justify a particular choice for the safety parameters, in general we will still be able to compute Ω, or in the worst case estimate it from data.The safety-parameter approach would still be practicable and relevant even though it is equipped with a satisfactory mathematical guarantee.We will term (12) a safety constraint.
Using matrix Ω we can provide a different expression for the variance of a line flow f ij .Let us write D .= BA, and (13a) Lemma 1.For any line ij, the variance of flow on ij under scheme (3) is given by A proof of this result can be obtained by substituting (13) into (8) (also see prior work: [1], [3], [9]).It is also important to note that ( 14) holds for all probability distributions.
Similar developments apply to generator output.Let generation cost at a bus i be given by c i (p) .= c i0 p 2 + c i1 p + c i2a , and let the i th row of A be denoted by A i .Then one easily shows that: Lemma 2. Let i be a bus.Then Var(p i ) = A T i ΩA i , and Next we provide our initial formulation, which extends the chance-constrained formulation in [3].Let n = |B| and also m = |E| (see Section II).As inputs to the formulation we have safety parameters ν ij and ν i for each line ij and generator i, respectively (ν i = 0 at non-generator buses).The formulation uses variables p, θ (n-vectors), f (m-vector), A, D (|S| × |S| and n × |S| matrices, respectively), and γ and s (an m × |S| matrix and m-vector, respectively).As above, we use A ∈ K to denote a given set of convex constraints on A.
∀i ∈ G : It is straightforward to verify that this formulation captures the desired features.This is a second-order cone program which is amenable to solution by many current optimization packages.On the minus side, [9], [3], [19] have highlighted numerical challenges arising when attempting solutions of models like (15), on large transmission systems, by appealing to black-box solvers.A practical alternative is that of relying to simple but effective cutting-plane methods.We will return to this point later on.
To close this section, we point out some alternative modeling perspectives.See e.g.[22], [2]).An "ambiguous" model, that is to say, a distributionally robust model under Gaussianity is studied in [4].

IV. AN EXAMPLE OF THE VARIANCE-COST TRADE-OFF
To motivate the forthcoming discussion, in this section we present a small example of problem (15) where there is a strong trade-off between cost and a system variance measure.Consider Figure 1.Here, • k is large, as is D.
• The load at bus b equals L units.
• At bus b, stochastic output at bus is denoted by ω, with Their lower limit is zero, their safety parameter is 3. • There is no load, generation or stochastic injection at buses a, k + 2, . . ., k + D. • Line limits are large.Denote the participation factor for generator i ≥ 1 as α i .
It can be shown that the following solution, is optimal (in fact: uniquely optimal) for the case of problem (15) in Figure 1.For a proof, see [18].It is clear that the stochastic flow on line ab equals L−µ−ω, with variance σ 2 .Thus f ab displays the entirety of stochastic injection variance.Further, the sum of flow variances equals Suppose we attempt to decrease Var(f ab ) by a factor of Γ < 1.This goal will be achieved by setting In that case the sum of variances will be at least When D = 10 and Γ = .5this quantity equals approximately 1.44σ 2 : in other words the sum of line flow variances has increased by more than 40%.As the reader no doubt has anticipated, putting emphasis on a particular variance metric brings forth a tradeoff with other (perhaps equally compelling) metrics.For a more extreme example, suppose now that the line limits are not very large.Consider an alternative variance metric that does take into account line limits: We modify the data in the example above as follows: • µ = L/4 and σ = µ/2 = L/8.
• Lines ia (1 ≤ i ≤ k) and lines on the path from k + 1 to b all have limit 2σ.• Line safety parameters are set to 3. It can again be easily shown [18] that the solution given by ( 16) remains feasible, and is the sole optimal solution.The variance metric (17) attained by solution ( 16) equals 1/81 + 1/(4k) ≈ .0123for k large.
Suppose that, as above, we wish to reduce the variance of f ab by 0 ≤ Γ < 1.The participation factors that attain the correction will now attain a variance metric of (at least) In the case D = 10, Γ = 0.5 this quantity is approximately 0.242.In other words, in our attempt to reduce variance in one line we have increased the variance metric (17) by approximately a factor of 20.And even if D = 3 the variance metric at the new solution equals 0.092: an increase by more than 8 times relative to the original value.
To conclude this section we point out that: 1) It is not true that every feasible solution to the securityconstrained problem will accumulate variance on line ab.
In fact our analyses show that we can transfer variance to the path k + 1, k + 2, . . ., b. Doing so, however, will increase cost and total system variance.2) This example is arguably unrealistic -different parameter choices will result in less radical behavior.Nevertheless, it is not difficult to see that the example can be modified to obtain a system setup that is not obviously extreme, while preserving or even amplifying the effect depicted above.The salient point is that the underlying economics and network structure is arguably efficient, because the large, most efficient generator can be used for deterministic demand coverage, while many participating generators are near the load.
3) The variance-concentration in the example, in summary, is due to interaction of network topology, load structure (i.e.location of loads, stochastic injection nodes and responding buses) and cost structure resulting in large variance caused by overlap of flow paths.To put it differently, a variance-aware reformulation of the securityconstrained problem will tend to manage, or reduce, risky overlap of flow paths.In the next section we will consider, in a systematic fashion, how to addresses the cost-variance trade-off.

V. VARIANCE-AWARE PROBLEMS
Here we describe a generic procedure that modifies problem (15), so as to better manage the trade-off between cost and a number of variance metrics.Our procedure seeks to find good solutions for a problem of the general type where s 2 is a vector of variances.To fix ideas, an example is that where s 2 = {s 2 ij } are the line flow variances of line flows, which depend on the participation matrix A as in ( 13), ( 14)).Finally, is the variance metric.Here each ∆ ij is a nonnegative function chosen to highlight a specific penalty as a function of expected flow and variance.Formulation (18) includes all constraints of the safetyconstrained problem (15) but the objective forces the desired trade-off.The formulation (and our templates below) are easily modified to account for many other variance metrics, for example, variability of output of participating generators.
As the reader can observe, one can scale the ∆ term in (18a) by a positive constant, obtaining a problem with the same functional form that places a different emphasis on the costvariance trade-off.Seen from this perspective, problem (18) bears a resemblance to traditional mean-variance optimization problems arising in financial portfolio analysis; see [23].In Section VI we will return to this viewpoint.

A. Some variance metrics
Here we describe several relevant variance metrics.Also see Section VI.
(I) For all ij ∈ E, ∆ ij is convex and nondecreasing in s 2 ij .The simplest case is that where Here the ψ ij ≥ 0 are given and F ⊆ E is a solutiondependent set, for example: (II.1) the set of N lines with largest average flow magnitude.
(II.2) the set of N lines with largest flow variance.In either model, we do not know in advance the set F to be summed over.In case of Model (II.2), problem (18) can be written as Formulation (21a) is an SOCP of exponential size.However the formulation suggests a practical algorithm (i.e. a cutting-plane algorithm) as well as a theoretically sound polynomial-time method (relying on the ellipsoid method).We theorize that Model (II.1) can also be formulated as a convex program that is polynomially solvable.
(III) Let: (where ρ ij > 0 is given) i.e. the standard logarithmic barrier function [24].In this setting, the conic constraints (15h) would not be used.When the ρ ij are all equal to a common value ρ the solution to (18) (with (15h) not imposed) will converge to an optimum solution for (15) as ρ → 0 + .Moreover, the structural form of this particular ∆ function, for any choice of the ρ ij , already imposes a trade-off of risk against operating cost -the tradeoff reflects the "nearness" of each line to its limit, in a natural sense, but without the explicit (and very computationally expensive) enforcement of the conics (15h).Of course, this risk perspective is, potentially, not necessarily the same as a variance-aware stance, because a line whose flow is not near the limit may still experience high variance of flow, and controlling such variance may be deemed important.Nevertheless, a line whose average flow is near the line limit is one where it is important to control variance, from a very direct perspective, as implied e.g. by constraints (15e), (15h) of ( 15).We find this choice of metric appealing because of the success of very mature state-of-the-art logarithmic barrier solvers, which can furthermore be adapted to handle additional, non-convex features [25], [26].

B. Iterative solution
In this section we focus on problem (18).Rather than discussing direct solution to this problem, however, we will instead suggest an iterative corrective procedure that appropriately modifies an optimal solution to the standard safetyconstrained problem (15) so as to make it into a "much more" variance-aware solution that is still near-optimal for (15).
There are two separate (but related) reasons for this goal.First of all, previous work in the literature on chanceconstrained DC-OPF [3], [6] has shown that direct solution to (15), using a standalone solver, can be a challenging numerical task in the case of large transmission systems.However, this difficulty is easily resolved by employing a cutting-plane algorithm that iteratively outer-approximates the conic constraints (15h) using linear inequalities.In other words we rely on an algorithm that repeatedly solves problems of the form (15) with all constraints (15h) removed; the algorithm opportunistically detects which constraints (15h) are violated by a computed solution and approximates such violated constraints using tangent hyperplanes.It has been observed that such an approximation algorithm typically requires relatively few iterations to converge, and, most important, the number of lines ij that demand attention in the approximation is very small.
Beyond the purely computational insight (which of course is important) this observation brings forth an important riskrelated perspective; namely, that only a few lines appear exposed to risk in the context of our generic problem (15).One may wonder why it is the case that realistic transmission systems have this behavior.To a certain extent this observation has been known in the industry in the context of non-risk aware DC-OPF.Recent work [27] performs systematic experiments that analyze the solution to the standard DC-OPF problem.They find that the number of tight constraints (1c) is limited to a few percent of the total and sometimes even less than that.Additionally, even large changes in the loads do not change the set of risky lines.We conclude that this is indeed a persistent feature in realistic cases.
In any case, these observations suggest an algorithm that shifts risk (in our context, variance) from what should be a small set of lines, to a broader set.The algorithm would start from an optimal solution to the standard safety-constrained problem (15), and correct that solution by taking simple, variance-metric reducing steps.In doing so we would be attaining three goals at once: (i) reduce the numerical complexity, which may be worse for the variance-aware problem (18) than it is for ( 15), (ii) leverage the underlying economicrisk dynamic we have just discussed, and (iii) explicitly reveal to a decision maker the set of lines that are exposed to high variance.A template for our scheme is given next: Template V.1.GENERIC CORRECTION TEMPLATE Input: an instance of the safety-constrained problem (15) and a variance metric.
Step II.Execute a small number of iterations that transform (p * , A * ) into a new feasible solution to (15) which attains a decreased value of the variance metric, while also moderately increasing generation cost.

An appropriate implementation of
Step II is important.Below, we focus on a strategy that amounts to solving a convex optimization problem with relatively few constraints.

C. Implementing the template
To simplify the presentation we will assume that for each line ij, ), i.e. our metric only depends on variance, but we stress that the analysis of procedure V.3 given below extends to the more general case.We also assume that ∆ ij (s 2 ij ) is convex nondecreasing.Further, Definition V.2.Let f be a flow vector and A ∈ K a matrix of participation factors.We define the pair ( f , A) as compatible (or say that A is compatible with f ) for (15), if there exist p, θ, D, γ and s so with (p, f , θ, A, D, γ, s) feasible for (15).Hence ( f , A) is compatible if they give rise to a feasible solution to (15).
We describe an implementation of Step II of Template V.1 which repeatedly solves two convex optimization problemsa formal procedure is given in Procedure V.3 given below.We will next describe the two problems and comment on their use afterwards with Procedure V.3 presented after that.Let 0 < τ < 1 be fixed.
The first problem is denoted by Reroute( Â, τ ).Its inputs are a compatible pair ( f , Â) and the vector ŝ2 = V( Â) of line flow variances (under participation factor matrix Â).
) ∀i ∈ G : Our second problem takes as input a compatible pair ( f , A ).In the description of the problem, we write s ij = Var(A ) ij , and T( f , A , τ ) denotes the family of lines whose which the safety constraint is almost tight under the participation matrix A : The problem, denoted VShift( f , A , τ ), is as follows: Comments: Reroute( Â, τ ) minimizes expected generation cost using the constant participation matrix Â.It imposes tighter line safety constraints (i.e. by a factor of (1 − τ ) in (22c)).Thus, this procedure reroutes flow so as to create slack capacity in all lines.Let an optimal solution be (p * , f * , θ * ), assuming feasibility.Then clearly ( f * , Â) is compatible for (15), with "slack" at least 1−τ on each line (multiplicatively).Choosing τ large can cause infeasibility of Reroute( Â, τ ); but in our implementation of Procedure V.3, τ will be small, which as a byproduct will only slightly increase expected generation cost.With regards to VShift( f , A , τ ), its purpose is to improve on the variance metric while keeping flows and average generation fixed.Let us call the optimal solution Â, and the corresponding line flow standard deviations, ŝ.The fact that the functions ∆ ij are nondecreasing implies, without loss of generality, that at optimality all constraints (24c) will be tight.Thus, by (24d), on lines ij ∈ T(f , A , τ The definition of the set T makes it tempting to say that holds for all lines ij and not just for ij ∈ T, and thus we get a reduction of variance metric "for free" (without cost increase).As we will see below, the desired compatibility will in general not hold, and an appropriate algorithmic correction will be needed.The numerical difficulty entailed by problem (24) will depend on the number of constraints (24d) which, as we have discussed, is frequently quite small.
If infeasible, STOP.Else, let (p k , f k , θk ) be the optimal solution.
Next we comment on this algorithm 2 with a formal analysis provided below.
In Steps 3-4 we take a convex combination of the previous and the new participation matrices so as to obtain compatibility.For any line ij, V((1 − t)A k−1 + t Âk ) ij is a convex quadratic over 0 ≤ t ≤ 1 and thus the determination of λ (Step 3) can be done exactly.Usually ∆(ŝ 2 k ) < ∆(ŝ 2 k−1 ) (by choice of (ŝ k , Âk ) in Step 2).Hence choosing λ as large as possible will help toward reducing variance metric.This is why we use inequality ) with ŝk,ij large would force a small value for λ.
Moreover, the procedure could terminate in Step 1 of some iteration.This feature is avoided by, e.g.scaling τ by a factor of 1/2 and then repeating Step 1 (until feasibility is attained).We have not implemented this strategy as it did not prove necessary for small values of τ and K.
Next we provide an analysis of Procedure V.3.Lemmas 4 and 5 are the critical result; together they essentially show that, under fairly general conditions, any execution of Steps 2-3 is guaranteed to make progress in the sense that a positive length stepsize λ can be chosen.Theorem 6 is an important corollary; it shows that if the algorithm ever stops in Step 5, then under Model (I) variance metric has reached its minimum possible value.

Remark 3. Let
Proof.The first claim follows since K is convex and the second using expression (8).
Lemma 4. Suppose that in iteration k the algorithm reaches Step 2. Let A ∈ K be an arbitrary participation matrix.Then there exists 0 < γ ≤ 1 such that for all 0 ≤ t ≤ γ, Hence we can find γ ij > 0 with The result is obtained by setting γ = min ij γ ij .
Lemma 5. Suppose that the algorithm reaches Step 2 of iteration k.Suppose Ā is any matrix with ∆(V ( Ā)) < ∆(s 2 k−1 ).Then for any 0 < t ≤ 1, Proof.Consider any line ij.Since , and therefore, since ). Summing this expression over all ij we obtain Let A * and ∆ * denote, respectively, the participation matrix with minimum variance metric, and the metric it attains, i.e.
= argmin A∈K ∆(V(A)) and ∆ * .= ∆(V(A * )).(27) Based on the above results we can state an important consequence under Model (I) of the variance metric (Section V-A).
Theorem 6.Under Model (I) if Procedure (V.3) stops at Step 5 of iteration k then ∆(s 2 k−1 ) = ∆ * .Proof.Assume, by contradiction, that ∆ * < ∆(s 2 k−1 ).The contradiction we will provide will show that the procedure does not stop at Step 5.By Lemma 5, applied to matrix A * , we have that ) And if we apply Lemma 4, also to matrix A * , we have that there exists 0 < γ ≤ 1 such that Âk is the optimal solution to this problem, we therefore have by ( 28) Now we apply Lemma 4 to Âk , and conclude that the stepsize λ computed in Step 5, is strictly positive.And if we also apply Lemma 5 to matrix Âk we obtain that 29) at t = λ yields the desired contradiction, i.e. ∆(s 2 k ) < ∆(s 2 k−1 ).

D. Numerical examples for the correction template
In this section we apply Procedure V.3 to the Polish grid example case2746wp [29].This system has 2746 buses, 3514 branches, 520 generators total load 24873.We introduced 22 stochastic injection sites, with total average injection 4611.57(i.e., roughly 18.5% penetration).The ratio of standard deviation to mean of stochastic injections was 0.3, and it is assumed that injections at different stochastic sites were independent.All safety parameters (for lines and generators) were set to 3. All generators were made available for balancing.These choices follow the setup in [3].We also chose τ = 0.1 and K = 2.
The variance metric we selected is nonconvex.We used where the set F = F( f , s) ⊂ E of lines is, as our notation indicates, flow and variance dependent and is designed to highlight lines that are "at risk"; it is made up by the combination of two sets: (a) The 100 lines that attain largest average flow magnitude, as in Model (II.1).(b) All lines ij for which , in other words, lines whose flow and variance characteristics place them in a near-risk condition.The computation of the solution (p 0 , f 0 , A 0 ) to safetyconstrained problem (15) was performed using Cplex [34] and required approximately one CPU minute (on a standard workstation) and 29 cutting-plane steps.The computation selected 11 generators with positive participation parameer α and in the rest of the procedure we used this subset of buses as the set of participating buses.
We then applied the iterative component of Procedure V.3.We provide a brief outline of the run, next.
Iteration k = 1, Step 1.This computation took 1.12 seconds, and produced a solution whose expected generation cost ≈ 1.1 × 10 06 , which is nearly identical to that in the initial chance-constrained OPF solution.Iteration k = 1, Step 2. As anticipated by the above discussion, the set T (see ( 23)) of risky lines in the solution computed in Step 1 is quite small -just five lines are in the set.As a result, in (30) we have |F| = 105, with variance metric taking value 6.3 × 10 04 .
Problem VShift( f 1 , A 0 , τ ) had, roughly, 14000 variables and 1e06 nonzeros.Nevertheless, it was solved using Gurobi 7.02 [35] in just 2.3 seconds.The updated variances, ŝ2 1 and f 1 , attained metric (30) of ≈ 2.3 × 10 04 -of course this computation is done using the set F = F( f 1 , s 0 ), rather than the correct set, F( f 1 , ŝ1 ).As such the value we have just provided is not a correct calculation of variance metric, however it indicates a large potential decrease of metric compared to that in the solution obtained in Step 1 (which was nearly three times larger).In fact, Â1 is not necessarily even compatible with f 1 .Steps 3 and 4 will recover compatibility.Iteration k = 1, Step 3. The stepsize computation yields λ ≈ 0.55.Summary.Thus, in just two iterations of Procedure V.3 we once again maintain nearly constant expected generation cost, but variance metric is decreased by roughly 40% compared to the original value.
It is also useful to consider the structure of the power flows.At termination, the largest magnitude average line flow magnitude is approximately 817.The third largest flow has value 632 and the corresponding line attains the largest single standard deviation; roughly 91.In contrast, the 101 st largest flow magnitude is approximately 144 and lines below that ranking attain far smaller standard deviation of flow; approximately 15.In other words the procedure transfers variance away from high flow lines while avoiding the creation of lines with high variance but low expected flow.

PROBLEMS
Our formal problem (18) enforces a tradeoff between "performance," i.e. expected cost given in the first term of (18a), and "risk" which is the second term in (18a).The more weight that is placed on the risk term, i.e. the more risk-aware the computation is, the less emphasis that the optimization will place on performance.This is the "cost of variance".For any given structural form of the variance metric one can scale (up or down) the contribution of variance to the objective of (18).For example, in Models (I) and (II) of Section V-A one can scale the parameters ψ ij by a common positive constant so as to adjust the impact of variance.Different choices of this common scale factor imply a different risk posture and likely a different solution to problem (18).In essence, thus, problem (18) represents a number of choices of operating solutions, each driven by a different risk posture.
To better examine the performance-risk tradeoff we slightly alter formulation (18): we choose parameters Λ = 0 or 1 and 0 ≤ Π, and address the problem When Λ = 1 and Π = 0 the variance term is ignored and we obtain the standard chance-constrained DCOPF problem.When Π > 0 and Λ = 0 the goal is to minimize variance metric and cost is ignored.For Λ = 1, larger choices of Π represent a more risk-aware stance; the larger Π is, the more emphasis is placed on variance reduction.Thus when Λ = 1, problem (31) amounts to a version of (18) with scaling of the variance metric.[ Remark: (31) is more flexible than (18) because it allows us to ignore either cost or variance ].We first describe experiments using case2746wp as in Section V-D.Again we assume independence of the stochastic injections, and that the variance of the injection at bus k is given by σ 2 k .We simplify the controllable generator setup (3) so that for each controllable generator i there is a constant α i with the stochastic response at i given by p i (ω) = pi − α i j∈B ω j , rather than the more general (3).Then the variance of generation at i is given by Var(p i ) = α 2 i ( j σ 2 j ).We tackle problem (31) using a variant of the cutting-plane algorithm in [3], which computes a solution that is both optimal and feasible within numerical tolerance.
We first consider the variance metric given by i∈B Var(p i ), i.e. the sum of variances of output of controllable generators.In Table I, "cost" is expected generation cost and "var" is the variance metric.Comment.The problems solved when both Λ = 1 and Π > 0 show a large range of values for system variance, with small but significant changes in generation cost.Note that the cost in the (1, 2e3) case is approximately 3% higher than in the standard chance-constrained solution (i.e. the (1, 0.0) case), a nontrivial increase.The problems solved when (Λ, Π) = (1, 0) or (0, 1) disregard, respectively, variance and generation cost.The high variance metric attained in the (1, 0) case highlights the potential danger in optimizing with respect to cost alone.In fact, a comparison of the (1, 0) and (1, 1e3) columns illustrates what might be termed the "cost of variance".The second set of tests that we perform use, as variance metric, a sum of variances of flow on "important" lines.In particular we use the quantity ij∈E(N ) s 2 ij where for an integer N > 0, E(N ) is the set of lines with largest variance in the solution to the standard chance-constrained DCOPF problem (CCOPF problem in the sequel; this is related to Model (II) in Section V-A).To set up these tests, we first consider Table II, which shows various values of the variance metric that are attained by the solution of the standard problem.In our variance-aware problem, we again consider problem (31) with the metric ij∈E(N ) s 2 ij .We used Λ = 1.0.Parameter Π was chosen so as to attain a meaningful tradeoff between the two terms in (31a) while avoiding numerical difficulties in the underlying solver.Results are given in Table III.Note that the variance metric of interest (third row of Table

VII. SHARPE-RATIO PROBLEMS
In the previous section we performed experiments involving problem (31a) which optimizes a blend of performance and risk, with parameterization used to take a stance on the relative importance of variance reduction.This task may be nontrivial though an experienced operator may be able to tailor the tradeoff based on an assessment of current operating conditions.In this section we describe an approach that bypasses the need for parameter choice and, informally, seeks to maximize "cost savings per unit of variance".We will make this statement clearer below.
For completeness, we first describe an approach found in the economics literature that provides an alternative to solving problem (18).Here, one chooses a desired level of maximum risk (variance metric) that can be tolerated and solve a CCOPF variant that caps variance metric at that maximum level.Or, conversely, one can place an upper bound on cost and minimize variance metric subject to that upper bound on cost.Formally, one would choose parameters ρ s and ρ c , and consider problems and The first problem minimizes cost subject to a limit on variance, and viceversa.When ∆( f , s 2 ) is convex, so are both problems.We note that (32) and ( 33) are analogues of well-known problems in the (financial) portfolio optimization literature, termed the maximum return and minimum risk problems (resp.),see [30].We have the (straightforward) result: Lemma 7. Let ĉ and ∆ denote the expected cost and variance metric (resp.)attained by an optimal solution to the varianceaware problem (18), or to problem (31) with Λ = 1 and 0 < Π.
Clearly an approach relying on problem (32a) or (33a) is not parameter-free -we need to specify ρ s or ρ c .Either choice represents a risk-stance on the part of the planner.However, again, either problem may be of interest to an experienced operator.
In the remainder of this section we present a parameter-free approach, which applies when the generation cost functions are strictly convex and the when the variance metric is convex and of appropriate structure, and is motivated by the classical "Sharpe ratio" problem in economics [31].Formally, we proceed as follows: Step 1.Let us assume that the generation cost functions are of the form c i (p) = c i0 p 2 + c i1 p + c i2 (as discussed above) and thus, as per Lemma 2, E(c i (p We will further assume that c i0 > 0 for each generator i ∈ G. Defining Hence, up to an additive constant, the expression i∈G E(c i (p i )) is a convex quadratic (i.e.no linear term!) of the υ and A.
Step 2. Formulation (31) includes linear equations and inequalities, as well as conic constraints.In order to simplify the discussion below, we will use streamlined notation, as follows.g.1 We will use the generic term "x" so as to refer to the vector of variables appearing in problem (18), including the υ just defined (see the paragraph preceding the statement of problem (15) for a complete list of all its variables).Some additional variables, such as the v i above, will be included for problem reformulation.g.2 Constraints (15b)-(15i) are represented using the generic form Φ(x) ≤ b.Here Φ(x) is a vector-valued function; each row of Φ(x) ≤ b corresponds to a row of (15b)-(15i) with equations (such as (15c)) equivalently restated as two inequalities.We further assume that constraint (15b), i.e.A ∈ K, is polyhedral or second-order cone representable.Thus, in other words, the constraint system Φ(x) ≤ b is made up of linear and second-order cone constraints.g.3The expected cost term, i∈G E(c i (p i )), is represented by a strictly convex quadratic g(x) with no linear term.g. 4 The variance-metric term will be denoted as S 2 (x).We assume this function is convex and homogeneous of degree-2, i.e. S 2 (tx) = t 2 S 2 (x) for any scalar t.The variance metric given by (II.2) in Section V-A is of this form.Under assumptions g1.-g4 we can equivalently rewrite the generic variance-aware safety-constrained problem (31) (with Λ = 1) as Now we will replace problem (34) with one that does not require the choice of Π, and yet captures the interplay between performance and risk.
Step 3. We assume that there is a constant κ 2 > 0 such that a solution to the safety-constrained problem is of interest so long as its expected cost is less than κ 2 .In other words this constant represents the maximum that we are willing to pay for a safe solution.We will further assume that such "cheap enough" safe solutions exist, and that they always attain positive (e.g.nonzero) variance metric.With Steps 1-3 in place, we can now state a formal optimization problem, namely: We will show that this problem is SOCP-representable.Prior to proving this fact we can discuss the structure and rationale behind this problem.The proofs below, at a very high level, are directed by the traditional analysis of the Sharpe ratio.
• The numerator κ 2 − g(x) in (35a) measures the savings in expected cost relative to the benchmark κ 2 .Intuitively we are optimizing the "cost savings per unit of variance".• By assumption (Step 3 above) the ratio κ 2 −g(x) S 2 (x) is positive and well-defined (nonzero denominator) for solutions x of interest.
• Under the assumption that the generator cost functions are strictly convex quadratics, the units in g(x) are "megawatts squared".In many cases of the variance metric described above, the units in S 2 (x) are of the same type.• If the generation costs are all linear (which is the case in some of the larger examples available in e.g.MAT-POWER) one can replace the ratio in (36) with one where the denominator is S 2 (x) and the analysis below will carry through.• In analysis of actual transmission systems, the solution of problem (35) may simply be used as a "benchmark" for other operating plans, rather than as a plan to be actually implemented.A network operator may choose to implement a particular plan if e.g. that plan looks "good enough" benchmarks well against the the solution to (35).We will now prove the stated convexity result.Toward this goal, let Constraints (36b) are the homogenization of constraints (35b), and the new variable Θ is usually termed the homogenization constant.For example, constraint (15f) in (31), BA = D, becomes BA − ΘD = 0 in (36), constraint (15e , remains unchanged since it has no constant term. We will next show that (a) problems ( 35) and (36) are equivalent (Lemmas ( 8) and ( 9)) and (b) problem (36) is convex.Prior to the proofs we note that: • since g(x) is strictly quadratic, g is homogeneous of degree-2, i.e. g(tx) = t 2 g(x), for every scalar t, • We also have Φ(tx) = tΦ(x) for any scalar t ≥ 0 (refer again to problem (15)).
Proof.Let x be optimal for (35).By assumption on the quantity κ 2 , κ 2 > g(x).Define As a consequence of Lemmas 8 and 9 we obtain R 1 = R 2 and indeed the proofs show that problems (35) and (36) are equivalent.

VIII. CONCLUSION
In this work we have considered the interplay between expected cost minimization in operation of power grids under stochastic injections, and variability.We presented numerically efficient procedures that post-process non-variance aware minimum-cost solution so as to reduce its variance while controlling costs as w ell as theoretically efficient cost-variance tradeoff procedures, in particular a generalized Sharpe-ratio maximization procedure.An interesting topic for future research concerns the analysis of concrete ("real-world") transmission system with particular emphasis on studying relevant variance metrics, i.e. variability of transformer operation.Such problems may lead to non-convexity, but as argued here may be amenable to efficient post-processing through appropriate algorithms.Capturing important engineering details may call for advanced numerical optimization tools, such as derivativefree optimization [33].A further issue of interest is the exploration of the performance-risk frontier through techniques such as those described in Section VII, which may prove helpful in concrete pricing mechanisms that account for variability of renewable output.
we recover the metric in the examples in Section IV .(II) Let N > 0 be a given integer, and consider a function ∆ of the form

TABLE I RESULTS
(31)ROBLEM(31)FOR VARIANCE METRIC i∈B Var(p i )