Optimal Power Flow Junjian Qi Dept. of Electrical Engineering & Computer Science University of Tennessee, Knoxville Nov. 25, 2013 Economic Dispatch I I Objective: minimize the cost of generation Constraints I I I Equality constraint: load generation balance Inequality constraints: upper and lower limits on generating units output May result in unacceptable flows or voltages in the network Optimal Power Flow (OPF) I I Optimization problem Classical objective function I I Equality constraints I I Minimize the cost of generation Power flow equations, power balance at each node Inequality constraints I I Network operating limit (line flows, voltages) Limit on control variables Optimal Power Flow (OPF) I Parameters I I Known characteristics of the system Assumed constant I I I I I Network topology Network parameters (R, X, B, flow and voltage limits) Generator cost functions Generator limits Vector of parameters: y Optimal Power Flow (OPF) I Decision variables (control variables) I I I I I I I Active power output of the generating units Voltage at the generating units Position of the transformer taps Status of the switched capacitors and reactors Control of power electronics (HVDC, FACTS) Amount of load disconnected Vector of control variables: u Optimal Power Flow (OPF) I State variables I I Describe the response of the system to changes in the control variables Magnitude of voltage at each bus I I I Except generator busses, which are control variables Angle of voltage at each bus Vector of state variables: x Optimal Power Flow (OPF) I Classical objective function I I Minimize total generating cost: min u N PG Ci (PGi ) i=1 Many other objective functions are possible I I N PG Minimize active power loss: PGi − i=1 N PG Minimize reactive power loss i=1 I I N PD PDi i=1 N PD QGi − i=1 Minimize number of controls rescheduled Miminize load shedding QDi Optimal Power Flow (OPF) I Equality constraints: I Power balance at each node–power flow equations For AC Power Flow: PGk − PDk = QGk − QDk = N X i=1 N X Vk Vi [Gki cos(θk − θi ) + Bij sin(θk − θi )] (1) Vk Vi [Gki sin(θk − θi ) − Bij cos(θk − θi )] (2) i=1 For DC Power Flow: F =Bθ I Compact expression: G(x , u, y ) = 0 (3) Optimal Power Flow (OPF) I Inequality constraints: I I I I Limits on the control variables: umin ≤ u ≤ umax Operating limits on flows: |Fij | ≤ Fijmax Operating limits on voltages: Vmin ≤ V ≤ Vmax Compact expression: H(x , u, y ) ≤ 0 Optimal Power Flow (OPF) I I I I min f (u) u (4) s.t. G(x , u, y ) = 0 H(x , u, y ) ≤ 0 (5) (6) Linear programming Nonlinear programming Mixed integer linear programming Mixed integer nonlinear programming Security-Constrained OPF I Conventional OPF only guarantees that the operating constraints are satisfied under normal operating conditions I I –All lines in service This does not guarantee security I –Must consider N-1 contingencies Assume lime limits for Line 1-3, 1-2, and 2-3 are 300 MW, 100 MW, and 220 MW Base case OPF solution Contingency case Security-Constrained OPF min f (u0 ) u (7) s.t. G(x0 , u0 , y0 ) = 0 H(x0 , u0 , y0 ) ≤ 0 (8) (9) 0 ( ∀k G(xk , u0 , yk ) = 0 H(xk , u0 , yk ) ≤ 0 Subscript 0 indicates value of variables in the base case Subscript k indicates value of variables for contingency k Stability-Constrained OPF Reduced network: Swing equations: δ˙i = ωR (ωi − 1) 1 (Pmi − Pei ) ω̇i = Mi where Pei = Ei X j (10) (11) Ej [Bij sin(δi − δj ) + Gij cos(δi − δj )] (12) Stability-Constrained OPF Initial value: !∗ Ei ∠δi0 − Vi ∠θi S̃ = Ṽi Ĩ = Vi ∠θi jxd0 Ei Vi sin(δi0 − θi ) Ei Vi cos(δi0 − θi ) − Vi2 = + j xd0 xd0 Equality constraints for initial value: ∗ Ei Vi sin(δi0 − θi ) − PGi = 0 ∀i ∈ G xd0 Ei Vi cos(δi0 − θi ) − Vi2 − QGi = 0 ∀i ∈ G xd0 ωi0 = 1 ∀i ∈ G (13) (14) (15) (16) Stability-Constrained OPF Discretize swing equations with trapezoidal rule: δit+1 − ωit+1 − ωit − where Peit = Ei ∆t ωR (ωit+1 + ωit − 2) = 0 2 ∀t ∈ T , ∀i ∈ G ∆t 1 (Pmi − Peit+1 + Pmi − Peit ) = 0 2 Mi ∀t ∈ T , ∀i ∈ G X (17) (18) Ej [Bijt sin(δit − δjt ) + Gijt cos(δit − δjt )] (19) j Gijt and Bijt are different for during-fault and post-fault states Stability-Constrained OPF For each time step t, calculate δ t of the OMIB system δt = 1 X 1 X Mi δit − Mi δit MC i∈GC MNC i∈GNC (20) Inequality constraint for transient stability δ t ≤ δ max ∀t ∈ T (21) Stability-Constrained OPF min X PG 2 ai + bi PGi + ci PGi (22) i∈G s.t. PG − PL − P(V , θ) = 0 (23) QG − QL − Q(V , θ) = 0 (24) max (25) max (26) max Pg (27) max (28) F (V ,θ) ≤ F V min min PG min QG ≤V ≤ V ≤PG ≤ ≤QG ≤ Qg Ei Vi sin(δi0 − θi ) − PGi = 0 ∀i ∈ G x0 (29) d Ei Vi cos(δi0 − θi ) − Vi2 x0 − QGi = 0 ∀i ∈ G (30) d 0 ωi = 1 ∀i ∈ G t+1 δi t+1 ωi − t ωi − − ∆t t+1 ωR (ωi 2 ∆t 1 2 Mi (Pmi − t + t ωi t+1 Pei δ ≤δ max (31) − 2) = 0 ∀t ∈ T , ∀i ∈ G + Pmi − ∀t ∈ T t Pei ) = 0 ∀t ∈ T , ∀i ∈ G (32) (33) (34) Stability-Constrained OPF Conventional OPF Stability-constrained OPF Algorithms Challenges: I Nonlinear I Nonconvex Algorithms: I Quadratic programming I Lagrange relaxation I Interior point method I Artificial neural network I Tabu search algorithm I Genetic algorithm I Particle swarm Many are based on Karush-Kuhn-Tucker (KKT) necessary conditions and can only guarantee a locally optimal solution Convexifying OPF I I Solve a relaxed dual problem, which is convex programming Derive a necessary and sufficient condition to guarantee zero duality gap Source: Daniel Molzahn Further Reading Stability-Constrained OPF: I D. Gan, R. Thomas, and R. Zimmerman. Stability-constrained optimal power flow. IEEE Transactions on Power Systems, vol. 15, May 2000. I R. Zárate-Miãno, T. V. Custem, F. Milano, and A. J. Conejo. Securing transient stability using time-domain simulations within an optimal power flow. IEEE Transactions on Power Systems, vol. 25, Feb. 2010. I D. Ernst, D. Ruiz-Vega, M. Pavella, P. Hirsch, and D. Sobajic. A unified approach to transient stability contingency filtering, ranking and assessment. IEEE Transactions on Power Systems, vol. 16, Aug. 2001. Convexifying OPF: I J. Lavaei and S. Low, Zero duality gap in optimal power flow problem. IEEE Transactions on Power Systems, vol. 27, Feb. 2012.