Optimal Power Flow (DC-OPF And AC-OPF)

Transcription

Optimal Power Flow (DC-OPF and AC-OPF)DTU Summer School 2017Spyros Chatzivasileiadis

What is optimal power flow?2DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Optimal Power Flow (OPF) In its most realistic form, the OPF is a non-linear, non-convex problem,which includes both binary and continuous variables. Goal: minimize an objective function, respecting all physical, operational,and technical constraints, such as: Ohm’s law and Kirchhoff laws Operational limits of generators Loading limits of transmission lines Voltage levels and many, many others Disclaimer: Realistic OPF implementations include thousands of variables andconstraints Here we focus on the most “fundamental” formulations of OPF These can be extended with several additional constraints toaccurately model the problem and/or system at hand3DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Use of OPF in the industry RTE, France: they invented the OPF! (Carpentier,1962) Their focus is mostly on the optimization of thesystem operation and not so much on markets They are working on the application of convexrelaxations of OPF on their system (see DanMolzahn’s talk!) CAISO, California, USA Electricity markets: An OPF runs every day(Day-Ahead), every hour, every 15 minutes, andevery 5 minutes. Depending on the problem they run a DC-OPFwith unit commitment, a standard DC-OPF, orjust Economic Dispatch4DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Use of OPF in the industry PJM, East Coast, USA Security-Constrained Economic Dispatch every 5 minutesfinal test phase of optimal voltage control every 5 minutes (they useAC-OPF as well) EUPHEMIA one common algorithm to calculate electricity prices across Europe, andallocate cross border capacity on a day-ahead basis 19 European countries, over 150 million EUR in matched trades daily PLEXOS June 2000: PLEXOS was first-to-market with electric power marketsimulation based entirely on mathematical programming Features: generation capacity expansion planning, transmission expansionplanning, hydro-thermal coordination, ancillary services5DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Summarizing DC-OPF market clearing uses DC-OPF (at the moment)convex can solve fast; can be applied in very large problems AC-OPF primarily used for optimization of operation and control actions non-convex (in its original form) continuous efforts to decrease computation time and increase systemsize Trends Incorporating uncertaintyDecomposition (and other) methods to solve very large problems Guarantees for a global minimum (convex relaxations) Market design Coupled energy networks and markets, e.g. gas and electricity 6DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Outline Economic Dispatch DC-OPF AC-OPF7DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Outline Economic Dispatch used in power exchanges, e.g. EPEX, etc.Supply must meet demand Generator limits 8DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Outline Economic Dispatch used in power exchanges, e.g. EPEX, etc.Supply must meet demand Generator limits DC-OPF extends Economic Dispatchconsiders the power flows! (in a linearized form) includes the power flow limits of the lines only active power; no losses 8DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Outline Economic Dispatch used in power exchanges, e.g. EPEX, etc.Supply must meet demand Generator limits DC-OPF extends Economic Dispatchconsiders the power flows! (in a linearized form) includes the power flow limits of the lines only active power; no losses AC-OPF full AC power flow equationsactive and reactive power flow current, voltage losses 8DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Economic Dispatchmin c i P Giisubject to:PGmin PGi PGmaxii PGi PDi9DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Economic Dispatchmin c i P Giisubject to:PGmin PGi PGmaxii PGi PDi The Economic Dispatch does not consider any network flows or networkconstraints!9DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Economic Dispatchmin c i P Giisubject to:PGmin PGi PGmaxii PGi PDi The Economic Dispatch does not consider any network flows or networkconstraints! We assume a copperplate network, i.e. a lossless and unrestricted flow ofelectricity from A to B.9DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Can we solve the economic dispatch problem without using anoptimization solver?10DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Can we solve the economic dispatch problem without using anoptimization solver?Yes! With the help of the merit order curve.10DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

The Merit-Order CurvepricecG4maxA PG1cG3maxB A PG2maxC B PG3cG2maxD C PG4cG1011ADTU Electrical EngineeringBCD powerOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

The Merit-Order CurvepricecG4maxA PG1cG3maxB A PG2maxC B PG3cG2maxD C PG4cG1011ADTU Electrical EngineeringBPDCD powerOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

The Merit-Order Curve cG3 is the systemmarginal priceprice Gens G1 and G2are fullydispatchedcG4cG3 Gen G4 is notdispatched at allcG2 Gen G3 is partiallydispatchedcG1012ADTU Electrical EngineeringBPDCD power G3 is the“marginalgenerator”Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

The Merit-Order Curve: An ExampleMerit-Order of the German conventional generation in 2008. Source:Forschungsstelle für Energiewirtschaft e. V.13DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Merit-Order Curve, Marginal Generators,and Line Congestion Although G3 hasenough capacity,it cannot produceenough to coverthe demand dueto line congestionpricecG4cG3cG2cG10ABPDCD power Instead G4, amore expensivegen that does notcontribute to theline congestion,must produce themissing power In a DC-OPF context, there is no longer a single system marginal price(we will observe different nodal prices Optimalin differentnodes)14 DTU Electrical EngineeringPower Flow (DC-OPF and AC-OPF) Jun 12, 2017

DC-OPFmin c i P Giisubject to:PGmin PGi PGmaxii15DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

DC-OPFmin c i P Giisubject to:PGmin PGi PGmaxiiB · θ PG PD1(θi θj ) Pij,maxxij15DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

DC-OPFmin c i P Giisubject to:PGmin PGi PGmaxiiB · θ PG PD1(θi θj ) Pij,maxxij The DC-OPF with the standard power flow equations contains both thepower generation PG and the voltage angles θ in the vector of theoptimization variables.15DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

ExercisecG1 60 /MWh, cG2 120 /MWhPload 150 MW1max 100 MW, P max 200 MWPG1G22X12 0.1 pu, X13 0.3 pu, X23 0.1pu, BaseMVA 100 MVAmax 40 M W (line limit)P13316DTU Electrical Engineering1What are the optimization variables? Formthe optimization vector2Formulate the objective function3Formulate the constraintsOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

DC-OPF in MatlabHow would you transfer yourproblem formulation to Matlab?17DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Discussion Points sin δ δ 18δ is in rad!DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Discussion Points sin δ δ δ is in rad! B·θ P B is in p.u.θ is in rad, dimensionless P must be in p.u. 18DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Discussion Points sin δ δ δ is in rad! B·θ P B is in p.u.θ is in rad, dimensionless P must be in p.u. Bus Admittance Matrix B in DC-OPF x1ij positive all off-diagonal elements are non-positive (zero or negative) all diagonal elements are positive AC-OPF: This differs from the case where zij rij jxij . In thatcase, it is yij gij jbij with bij is negative. bij18DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Discussion Points sin δ δ δ is in rad! B·θ P B is in p.u.θ is in rad, dimensionless P must be in p.u. Bus Admittance Matrix B in DC-OPF x1ij positive all off-diagonal elements are non-positive (zero or negative) all diagonal elements are positive AC-OPF: This differs from the case where zij rij jxij . In thatcase, it is yij gij jbij with bij is negative. bij If the DC-OPF does not converge, check that the admittance matrix B iscorrect!18DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

4-slide “break”DC-OPF: linear program convexAC-OPF: non-linear non-convex problem in its original form recent efforts to convexify the problemWhy?19DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Convex vs. Non-convex ProblemNon-convex problemConvex ProblemCostf (x)Costf (x)xOne global minimum20DTU Electrical EngineeringxSeveral local minimaOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Several local minima: So what?Example: Optimal Power Flow Problem Assume that the difference in thecost function of a local minimumversus a global minimum is 5% The total electric energy cost inthe US is 400 Billion /yearCostf (x) 5% amounts to 20 billion US ineconomic losses per year Even 1% difference is huge Convex problems guarantee thatwe find a global minimum convexify the OPF problem21DTU Electrical EngineeringxOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Convexifying the Optimal Power Flow problem(OPF) Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)Costf (x)xConvex Relaxation1 Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Convexifying the Optimal Power Flow problem(OPF) Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)Costf (x)f (x)xConvex Relaxation1 Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Convexifying the Optimal Power Flow problem(OPF) Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)Costf (x)f (x) Under certain conditions, theobtained solution is the globaloptimum to the original OPFproblem1xConvex Relaxation1 Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Break is over. More in Dan Molzahn’s lecture tomorrow!23DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF Minimize subject to:24DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF MinimizeCosts, Line Losses, other? subject to:24DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF MinimizeCosts, Line Losses, other? subject to:AC Power Flow equationsLine Flow ConstraintsGenerator Active Power LimitsGenerator Reactive Power LimitsVoltage Magnitude Limits(Voltage Angle limits to improve solvability)(maybe other equipment constraints)24DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF MinimizeCosts, Line Losses, other? subject to:AC Power Flow equationsLine Flow ConstraintsGenerator Active Power LimitsGenerator Reactive Power LimitsVoltage Magnitude LimitsLine Current LimitsApparent Power Flow limitsActive Power Flow limits(Voltage Angle limits to improve solvability)(maybe other equipment constraints) Optimization vector: [P Q V θ]T24DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF2obj.functionmin cT PG AC flow SG SL diag(V )Y bus V Line Current Y line,i j V Iline,max Y line,j i V Iline,max or Apparent Flow V i Y line,i j,i-row V Si j,max V j Y line,j i,j-row V Sj i,maxGen. Active PowerGen. Reactive PowerVoltage MagnitudeVoltage MagnitudeVoltage Angle0 PG PG,max QG,max QG QG,maxVmin V VmaxVmin V Vmaxθmin θ θmax2 All shown variables are vectors or matrices. The bar above a variable denotes complexnumbers. (·) denotes the complex conjugate. To simplify notation, the bar denoting a complexnumber is dropped in the following slides. Attention! The current flow constraints are defined asvectors, i.e. for all lines. The apparent power line constraints are defined per line.25DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Current flow along a lineVjViRij jXijjBij2It is:yij jBij21Rij jXijBijysh,i j other shunt2elements connected to that busπ-model of the line26DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Current flow along a lineVjViRij jXijjBij2It is:yij jBij21Rij jXijBijysh,i j other shunt2elements connected to that busπ-model of the linei j:26Ii j ysh,i Vi yij (Vi Vj ) Ii jDTU Electrical Engineering[ ][] Vi ysh,i yij yijVjOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Current flow along a lineVjViRij jXijjBij2It is:yij jBij21Rij jXijBijysh,i j other shunt2elements connected to that busπ-model of the linei j:j i:26Ii j ysh,i Vi yij (Vi Vj ) Ii j[ ][] Vi ysh,i yij yijVjIj i ysh,j Vj yij (Vj Vi ) Ij i[ ][] Vi yij ysh,j yijVjDTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Line Admittance Matrix Yline Yline is an L N matrix, where L is the number of lines and N is thenumber of nodes if row k corresponds to line i j: Yline,ki ysh,i yijYline,kj yij yij 1is the admittance of line ijRij jXij ysh,i is the shunt capacitance jBij /2 of the π-model of the line We must create two Yline matrices. One for i j and one for j i27DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Bus Admittance Matrix YbusSi Vi Ii Ii Iik , where k are all the buses connected to bus ikExample: Assume there is a line between nodes i m, and i n. It is:Ii Iim Iini mi n (ysh,i yim )Vi yim Vm (ysh,i yin )Vi yin Vni mi n (ysh,i yim ysh,i yin )Vi yim Vm yin VnIi [ysh,im yim ysh,in yin yim yin ][Vi Vm Vn ]T {z} {z } {z}Ybus,ii28DTU Electrical EngineeringYbus,im Ybus,inOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Bus Admittance Matrix Ybus Ybus is an N N matrix, where N is the number of nodes diagonal elements: Ybus,ii ysh,i connected to bus i k yik ,where k are all the buses off-diagonal elements:Ybus,ij yij if nodes i and j are connected by a line3 Ybus,ij 0 if nodes i and j are not connected yij 1is the admittance of line ijRij jXij ysh,i are all shunt elements connected to bus i, including the shuntcapacitance of the π-model of the line3 If there are more than one lines connecting the same nodes, then they must all be added toYbus,ij , Ybus,ii , Ybus,jj .29DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC Power Flow EquationsSi Vi Ii Vi YbusV For all buses S [S1 . . . SN ]T : Sgen Sload diag(V )YbusV 30DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

From AC to DC Power Flow Equations The power flow along a line is: Sij Vi Iij Vi (ysh,iVi yij (Vi Vj )) Assume a negligible shunt conductance: gsh,ij 0 ysh,i jbsh,i . Given that R X in transmission systems, for the DC power flow we1assume that zij rij jxij jxij . Then yij j.xij Assume: Vi Vi 0 and Vj Vj δ, with δ θj θi .1(Vi (Vj cos δ jVj sin δ))xij111 jbsh,i Vi j Vi j Vj cos δ Vj sin δxijxijxijIij jbsh,i Vi j31DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

From AC to DC Power Flow Equations (cont.) Since Vi is a real number, it is:Pij ℜ{Sij } Vi ℜ{Iij } 1Vi Vj sin δxij With δ θj θi , it is:Pij 1Vi Vj sin(θi θj )xij We further make the assumptions that: Vi , Vj are constant and equal to 1 p.u.sin θ θ, θ must be in radThenPij 32DTU Electrical Engineering1(θi θj )xijOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Some additional points. Nodal pricesIn a market context, the nodal prices are:the lagrangian multipliers of the equality constraints Bθ P of a DC-OPF (at the moment) with objective function the minimization of costs 33DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Some additional points. Nodal pricesIn a market context, the nodal prices are:the lagrangian multipliers of the equality constraints Bθ P of a DC-OPF (at the moment) with objective function the minimization of costs Power Transfer Distribution Factors (PTDFs) PTDFs are linear sensitivies that relate the line flows to the powerinjections the DC-OPF can be formulated with respect to PTDFs PTDFs eliminate the need of θ as optimization variable In the zonal pricing in Europe PTDFs are used to model the flowsbetween the zones33DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF Resources about AC-OPF from the US Federal Energy RegulatoryCommission us-act/market-planning/opf-papers.asp Overview paper on Economic Dispatch and DC-OPF:R.D. Christie, B. F. Wollenberg, I. Wangesteen, TransmissionManagement in the Deregulated Environment, Proceedings of the IEEE,vol. 88, no. 2, February 200034DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Wrap-upDC-OPFAC-OPF market clearing uses DC-OPF (atthe moment) primarily used for optimization ofoperation and control actions convex full AC power flow equations can solve fast; can be applied invery large problemsbut only active power flow no losses and no voltage levelsDC approximations more suitablefor DTUtransmissionsystems35Electrical Engineeringbut non-convex (in its original form) no guarantee that we find theglobal optimum computationally expensive andpossibly intractable for very largesystemsefforts to decrease computationtime and increase system sizeOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Thank you!spchatz@elektro.dtu.dk36DTU Electrical EngineeringOptimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

AC-OPF: This ffers from the case where zij rij jxij. In that case, it is yij gij jbij with bij is negative. If the DC-OPF does not converge, check that the admittance matrix B is correct! 18 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Discussion Points sin ˇ