53
From Deterministic Economic Dispatch to Secure Stochastic Unit Commitment/Optimal Power Flow with MOST, the new MATPOWER Optimal Scheduling Tool Ray Zimmerman 1 , Carlos Murillo-Sánchez 3 , Daniel Muñoz-Álvarez 1 , Alberto Lamadrid 2 1 Cornell University (Ithaca, NY) 2 Lehigh University (Bethlehem, PA) 3 National University of Colombia (Manizales, Caldas, Colombia) FERC Technical Conference on Increasing Market and Planning Efficiency through Improved Software June 27-29, 2015

From Deterministic Economic Dispatch to Secure Stochastic Unit Commitment… · 2020. 5. 7. · From Deterministic Economic Dispatch to Secure Stochastic Unit Commitment/Optimal Power

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

  • FromDeterministicEconomicDispatchtoSecureStochasticUnitCommitment/OptimalPowerFlowwith

    MOST,thenewMATPOWEROptimalSchedulingTool

    RayZimmerman1,CarlosMurillo-Sánchez3,DanielMuñoz-Álvarez1,AlbertoLamadrid2

    1CornellUniversity(Ithaca,NY)2LehighUniversity(Bethlehem,PA)

    3NationalUniversityofColombia(Manizales, Caldas, Colombia)

    FERCTechnicalConferenceonIncreasingMarketandPlanningEfficiencythroughImprovedSoftware

    June27-29, 2015

  • Acknowledgements

    • AlbertoLamadrid• DanielMuñoz-Álvarez• CarlosMurillo-Sánchez• BobThomas• C.LindsayAnderson• WooyoungJeon• TimMount

    2

  • Outline

    • MATPOWER Background• MOSTOverview

    – WhatisMOST?– ProblemFormulation

    • MOSTExamples– Single-periodcontinuousvariableproblems– Multi-intervalproblemswithUC

    3

  • http://www.pserc.cornell.edu/matpower/– implemented inMatlab language,

    compatiblewithfreeGNUOctave– interfacestostate-of-the-artsolvers– usedworldwide inteaching,research,

    industry– researchenabling tool,whosemomentum&

    impactcontinues togrow,asevidencedby• 1325citationsof2011MATPOWER paper*

    • roughly20,000downloads peryear

    MATPOWERFree,open-sourcepowersystemsimulationenvironmentwithpowerflow(PF),ContinuationPF,extensibleOPF,nowwithMOST,stochasticunitcommitmentandmulti-intervalOPF.

    4

    R.D.Zimmerman,C.E.Murillo-Sánchez, andR.J.Thomas, MATPOWER Steady-StateOperations, PlanningandAnalysis ToolsforPowerSystemsResearchandEducation, PowerSystems,IEEETransactions on,vol. 26,no. 1,pp. 12-19, Feb. 2011.* GoogleScholar,6/20/16

  • BriefMATPOWER History• MATPOWER beganin1996asanACOPFtoolusedtoclearmarketsfor

    PowerWeb,apowermarkettestingplatform.• Publiclyreleasedin1997(v1andv2)• Developmentfocusedoninternaluseuntilreleaseofv3in2005• Someofthemajorfeaturesaddedovertime:

    – DCpowerflowandDCOPF– additional powerflowalgorithms– extensibleOPFarchitecture– improvedOPFsolvers, includingnativeMatlab primal-dualinteriorpoint– continuation powerflow– explicitopensourcelicense(BSD)– realistictestcases(Polish, French, Europeancasesupto13kbuses)

    • Combinationofhighqualitysolversandready-to-usecasescreatedadefactobenchmarkplatform(foroptimization&powersystemsresearch)

    • MATPOWER 6.0b1* includesMOST (MATPOWER OptimalSchedulingTool)

    5*releasedJune1,2016– asofJune18,morethan1,000downloads

  • Outline

    • MATPOWER Background• MOSTOverview

    – WhatisMOST?– ProblemFormulation

    • MOSTExamples– Single-periodcontinuousvariableproblems– Multi-intervalproblemswithUC

    6

  • WhatisMOST?

    • MATPOWER OptimalSchedulingTool*

    • Optimizationtoolforsolvingageneralizedschedulingproblem,whichcaninclude:– priceresponsivedemand– transmissionnetworkmodel(ornot)– securedispatchviaco-optimizedreserves(zonalorendogenously

    determinedfromcontingencies)– stochasticinputs(e.g.renewables,load)– integercommitmentdecisions,startup&shutdowncosts– multi-intervaldispatchwithrampingconstraints&costs– fullunitcommitmentwithminimumup-&down-timeconstraints– energystorageanddeferrabledemandresources

    7* Previously referred to as MOPS –MATPOWER Optimal Power Scheduler

  • OurFormulation

    • GeneralizedextensionofcombinedUC/OPFproblem,toinclude…– intertemporalenergyconstraintsforstorage,flexible/deferrable

    demand– endogenous,priceresponsivecontingencyandrampingreserves– multi-stagestochasticapproachw/scenariorecombination

    • Formulationpresentedherein2013andpublishedin[1]andsomepreliminarytestingresultspresentedherein2015.

    [1]CarlosE.Murillo-Sánchez,RayD.Zimmerman,C.LindsayAnderson andRobertJ.Thomas,“SecurePlanningandOperationsofSystemswithStochasticSources,EnergyStorageandActiveDemand”,SmartGrid,IEEETransactionson,vol.4,no.4,pp.2220-2229,Dec.2013.Available:http://dx.doi.org/10.1109/TSG.2013.2281001

    8

  • MOSTContinuousSinglePeriodProblems

    23

    single deterministicsystem state

    multiple probabilisticsystem states

    secureED

    secureDC OPF

    secureAC OPF

    stochastic secure

    ED

    stochasticsecureDC OPF

    stochasticsecureAC OPF

    stochasticED

    stochasticDC OPF

    stochasticAC OPF

    EDw/reserves

    DC OPFw/reserves

    AC OPFw/reserves AC OPF

    DC OPF

    economicdispatch

    EDw/reserves

    DC OPFw/reserves

    AC OPFw/reserves AC OPF

    DC OPF

    economicdispatch

    MATPOWER

    secureED

    secureDC OPF

    stochastic secure

    ED

    stochasticsecureDC OPF

    stochasticED

    stochasticDC OPF

    EDw/reserves

    DC OPFw/reserves DC OPF

    economicdispatch

    MOST

  • multi-period+ ramping

    multi-period+ storage

    multi-period+ ramping+ storage

    with integer commitment+ transition costs

    + min up/down times

    multi-period

    with integercommitment + transition

    costs

    with integercommitment

    continuousdispatch

    singleperiod

    MOPSMixedIntegerandMulti-PeriodProblems

    37

  • Outline

    • MATPOWER Background• MOSTOverview

    – WhatisMOST?– ProblemFormulation

    • MOSTExamples– Single-periodcontinuousvariableproblems– Multi-intervalproblemswithUC

    38

  • minx

    f(x) where

    f(x) = fp

    (p, p+, p�)

    + fz

    (rz

    )

    + fr

    (r+, r�)

    + f�

    (p)

    + flf(�+, ��)

    + fs

    (s0, psc, psd)

    + fuc(u, v, w)

    ObjectiveFunction

    39

    expectedactivepower(re)dispatchcosts

    contingency reservecosts

    expectedrampingwear&tearcosts

    loadfollowing rampreservecosts

    expectedvalueofleftover storedenergy

    startup,shutdown&noloadcosts

    zonalreservecosts

  • Constraints

    40

    (1) standardOPFconstraints• powerbalanceequations• transmission flowlimits,otherOPFinequalities

    (3)intertemporal constraints• loadfollowing ramping limitsandreserves• energystorageconstraints

    (4)unit commitmentconstraints• injection limitsvs.commitmentvariables• startup/shutdownevents• minimum up/downtimes

    (2)securityconstraints• fixedzonalreserverequirements,or• contingencyconstraints

    • reserve,redispatch andcontractvariables• rampinglimitsontransitions frombasetocontingencycases

  • Outline

    • MATPOWER Background• MOSTOverview

    – WhatisMOST?– ProblemFormulation

    • MOSTExamples– Single-periodcontinuousvariableproblems– Multi-intervalproblemswithUC

    41

  • TutorialExampleSystem• 3-bustrianglenetwork• generators

    – 2identical200MWgensatbus1,diffreserve cost– 500MWgenatbus2– all3haveidenticalquadraticgenerationcosts

    • load450MWatbus3,curtailable@$1000• branches

    – 300MWlimit,line1–2– 240MWlimit,line1–3– 300MWlimit,line2–3

    • adequacy requirement– reserve requirement

    • 150MWlimit– contingencies

    • generator 2atbus1• line1–3

    42

    240 MW

    bus 1 bus 2

    bus 3

    200 MW 200 MW 500 MW

    450 MW

    300 MW

    300 MW

    100 MW

    gen 1 gen 2 gen 3

    ±80 MW

    200 MWh

  • TutorialExampleSystem• 3-bustrianglenetwork• generators

    – 2identical200MWgensatbus1,diffreserve cost– 500MWgenatbus2– all3haveidenticalquadraticgenerationcosts

    • load450MWatbus3,curtailable@$1000• branches

    – 300MWlimit,line1–2– 240MWlimit,line1–3– 300MWlimit,line2–3

    • adequacy requirement– reserve requirement

    • 150MWlimit– contingencies

    • generator 2atbus1• line1–3

    • wind– 100MWunitatbus2– 3samplesofnormaldistributionaround50MW

    43

    240 MW

    bus 1 bus 2

    bus 3

    200 MW 200 MW 500 MW

    450 MW

    300 MW

    300 MW

    100 MW

    gen 1 gen 2 gen 3

    ±80 MW

    200 MWh

  • SinglePeriodContinuousExamples

    44

    Economic Dispatch

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    45

    Economic Dispatch w/reserves

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    46

    DC OPF

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    47

    DC OPF w/reserves

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    48

    secure DC OPF

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    49

    stochastic DC OPF

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • SinglePeriodContinuousExamples

    50

    secure stochastic DC OPF

    Gen1 2 3 4

    MW

    0

    50

    100

    150

    200

    250

    300Generation & Reserves

    Bus1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Nodal Prices

    Line1 2 3

    $/MW

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100Flow Constraint Shadow Prices

  • InputData

    loadmd()

    mpcMATPOWER case

    data

    xgdadditional

    generator data(xGenData)

    sdadditional

    storage unit data (StorageData)

    profilestime varying parameters

    contabcontingency

    data

    transmattransition probability matrices

    most()

    MATPOWEROptimal

    Scheduling Tool

    solveroptions

    mpopt mpc.busmpc.branch

    mpc.gen

    mpc.gencost

    offer(t).PositiveActiveReservePrice

    offer(t).PositiveActiveReserveQuantity

    offer(t).PositiveLoadFollowReservePrice

    offer(t).PositiveLoadFollowReserveQuantity

    RampWearCostCoeff

    Storage.MinStorageLevel

    Storage.MaxStorageLevel

    Storage.InitialStorage

    Storage.InitialStorageLowerBound

    Storage.InitialStorageUpperBound

    Storage.OutEff

    Storage.InEff

    Storage.TerminalStoragePrice

    offer(t).NegativeActiveReservePrice

    offer(t).NegativeActiveReserveQuantity

    offer(t).NegativeLoadFollowReservePrice

    offer(t).NegativeLoadFollowReserveQuantity

    Storage.LossFactor

    cont(t,j).contab

    tstep(t).OpCondSched(j).tab

    tstep(t).TransMat

    md – MOST Data struct

    InitialState, MinUp, MinDown

    CommitKey, CommitSched, InitialPg

    51

  • ExampleCode

    • DCOPFmdi = loadmd('ex_case3a');mdo = most(mdi);

    • EconomicDispatchmpopt = mpoption('most.dc_model', 0);mdo = most(mdi, mpopt);

    • Withzonalreservesreserves.zones = [1 1 1 0];reserves.req = 150;

    reserves.cost = [1; 3; 5];reserves.qty = [100; 100; 200];mdi.FixedReserves = reserves;mpopt = mpoption('most.dc_model', 1);mdo = most(mdi, mpopt);

    52

  • SecureDCOPF

    • Definingcontingencies:examplecontabfunction contab = ex_contab

    define_constants;% label probty type row column chgtype newvaluecontab = [

    1 0.06 CT_TGEN 2 GEN_STATUS CT_REP 0; %% gen 2 at bus 12 0.04 CT_TBRCH 2 BR_STATUS CT_REP 0; %% line 1-3

    ];

    • Samemechanismusedtomodifyabasecaseforeachperiodinmulti-intervaloptimization

    53

  • “Extra”GeneratorData- xGenData

    • Generatorparametersnotincludedinbasecasedata,e.g.unitcommitmentdata,reserveoffers,rampingcosts,andmore

    function xgd_table = ex_xgd_res(mpc)xgd_table.colnames = {

    'PositiveActiveReservePrice', ...'PositiveActiveReserveQuantity', ...

    };xgd_table.data = [

    5 250;0 100;1.5 600;0 800;

    ];

    • RuntheSecureDCOPFmpc = loadcase('ex_case3a');xgd = loadxgendata('ex_xgd_res', mpc);

    mdi = loadmd('ex_case3a', [], xgd, [], 'ex_contab');mdo = most(mdi, mpopt); 54

  • Outline

    • MATPOWER Background• MOSTOverview

    – WhatisMOST?– ProblemFormulation

    • MOSTExamples– Single-periodcontinuousvariableproblems– Multi-intervalproblemswithUC

    55

  • TutorialExampleSystem• 3-bustrianglenetwork• generators

    – 2identical200MWgensatbus1,diffreserve cost– 500MWgenatbus2– gencosts marginal startup shutdown

    1 $25 $0 $02 $30 $200 $2003 $40 $3000 $600

    • load300-540MW atbus3,curtailable@$1000• branches

    – 300MWlimit,line1–2– 240MWlimit,line1–3– 300MWlimit,line2–3

    • adequacy requirement– reserve requirement

    • 150MWlimit– contingencies

    • generator 2atbus1• line1–3

    • wind– 0-166MWunitatbus2– 3samplesofnormaldistributionaroundvaryingmean

    56

    240 MW

    bus 1 bus 2

    bus 3

    200 MW 200 MW 500 MW

    450 MW

    300 MW

    300 MW

    100 MW

    gen 1 gen 2 gen 3

    ±80 MW

    200 MWh

  • TutorialExampleSystem• 3-bustrianglenetwork• generators

    – 2identical200MWgensatbus1,diffreserve cost– 500MWgenatbus2– gencosts marginal startup shutdown

    1 $25 $0 $02 $30 $200 $2003 $40 $3000 $600

    • load300-540MW atbus3,curtailable@$1000• branches

    – 300MWlimit,line1–2– 240MWlimit,line1–3– 300MWlimit,line2–3

    • adequacy requirement– reserve requirement

    • 150MWlimit– contingencies

    • generator 2atbus1• line1–3

    • wind– 0-166MWunitatbus2– 3samplesofnormaldistributionaroundvaryingmean

    • storageatbus3– 200MWhenergycapacity, 80MWpowercapacity

    57

    240 MW

    bus 1 bus 2

    bus 3

    200 MW 200 MW 500 MW

    450 MW

    300 MW

    300 MW

    100 MW

    gen 1 gen 2 gen 3

    ±80 MW

    200 MWh

  • Mult-Interval(UC)Examples

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    100

    200

    300

    400

    500

    600

    MW

    Load and Wind Profiles

    LoadDeterministic WindStochastic Wind

    58

  • DeterministicUCExamples

    59

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent Base : No Network

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW

    0100200300400500

    Net

    Loa

    d, M

    WGen 1Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

  • DeterministicUCExamples

    60

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + DC Network

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • DeterministicUCExamples

    61

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Startup/Shutdown Costs

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • DeterministicUCExamples

    62

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Min Up/Down Time Constraints

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • DeterministicUCExamples

    63

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Ramping Constraints/Ramp Reserve Costs

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • DeterministicUCExamples

    64

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Storage

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW

    Gen 1Gen 2Gen 3Storage ChargeStorage Discharge

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • StochasticWind

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    200

    MW

    Wind Profile, Individual Trajectories

    Wind ScenariosPossible Transitions

    65

  • StochasticWind

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    200

    MW

    Wind Profile, Full Transition Probabilities

    Wind ScenariosPossible Transitions

    66

  • DeterministicUCw/oStorage

    67

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Ramping Constraints/Ramp Reserve Costs

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

  • StochasticUCExamples

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent Individual Trajectories

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

    68

  • StochasticUCExamples

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent Full Transition Probabilities

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

    69

  • StochasticUCExamples

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Contingencies

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW Gen 1

    Gen 2Gen 3

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

    70

  • StochasticUCExamples

    1 2 3 4 5 6 7 8 9 10 11 12Period

    Gen 3 @ Bus 2

    Gen 2 @ Bus 1

    Gen 1 @ Bus 1

    Uni

    t Com

    mitm

    ent + Storage

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0100200300400500

    Gen

    erat

    ion,

    MW

    Gen 1Gen 2Gen 3Storage ChargeStorage Discharge

    1 2 3 4 5 6 7 8 9 10 11 12Period

    0

    50

    100

    150

    Nod

    al P

    rice,

    $/M

    Wh

    Bus 1Bus 2Bus 3

    0100200300400500

    Net

    Loa

    d, M

    W

    71

  • StorageDatafunction storage = ex_storage(mpc)

    ecap = 200; %% energy capacity

    pcap = 80; %% power capacityscost = 45.17; %% cost/value of initial/residual stored energy

    % bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin ...storage.gen = [

    3 0 0 0 0 1 100 1 pcap -pcap ...];

    storage.xgd_table.colnames = {'CommitKey', 'CommitSched', 'PositiveActiveReservePrice', ... };

    storage.xgd_table.data = [2 1 0 2*pcap 0 2*pcap 0 0 0 2*pcap 0 2*pcap;

    ];

    72

  • StorageData(continued)function storage = ex_storage(mpc)...storage.sd_table.OutEff = 1;

    storage.sd_table.InEff = 1;storage.sd_table.LossFactor = 0;storage.sd_table.rho = 0;storage.sd_table.colnames = {

    'InitialStorageLowerBound', ...'InitialStorageUpperBound', ...

    'InitialStorageCost', ...

    'TerminalStoragePrice', ...'MinStorageLevel', ...

    'MaxStorageLevel' };storage.sd_table.data = [

    0 ecap scost scost 0 ecap;];

    73

  • LoadProfileInputfunction loadprofile = ex_load_profile

    loadprofile = struct( ...

    'type', 'mpcData', ...'table', CT_TLOAD, ...'rows', 0, ...

    'col', CT_LOAD_ALL_PQ, ...'chgtype', CT_REP, ...

    'values', [] );

    loadprofile.values(:, 1, 1) = [

    440;480;

    540525;500;

    450;400;

    350;300;325;

    375;425;

    ];

    loaddataforallloadsshouldbereplacedwithspecifiedvalues

    74

    number of periods in planning horizon

  • WindProfileInputfunction windprofile = ex_wind_profile

    windprofile = struct( ...

    'type', 'mpcData', ...'table', CT_TGEN, ...'rows', 1, ...

    'col', PMAX, ...'chgtype', CT_REL, ...

    'values', [] );

    windprofile.values(:, :, 1) = [

    0.72 0.80 0.88;0.49 0.65 0.81;

    0.36 0.60 0.84;0.50 0.82 1.14;0.60 1.00 1.40;

    0.22 0.70 1.18;0.00 0.50 1.00;

    0.33 0.85 1.37;0.46 1.00 1.54;0.54 1.10 1.66;

    0.48 1.06 1.64;0.35 0.95 1.55;

    ];

    generatorparameterPMAX(maxgeneration)ofwindgenerator1shouldbescaledbyspecifiedvalues

    75

    number of periods in planning horizon

    number of wind scenarios

  • TransitionProbabilitiesfunction transmat = ex_transmat(nt)

    transmat = cell(1, nt);

    transmat{1} = [ 0.16;0.68;0.16 ];

    transmat{2} = [ 0.16 0.16 0.16;0.68 0.68 0.68;0.16 0.16 0.16 ];

    .

    .

    .transmat{nt} = [ 0.16 0.16 0.16;

    0.68 0.68 0.68;0.16 0.16 0.16 ];

    76

    scenarios in period 2

    scenarios in period 1

  • ExampleCodempc = loadcase('ex_case3b');xgd = loadxgendata('ex_xgd_uc', mpc);[iwind, mpc, xgd] = addwind('ex_wind_uc', mpc, xgd);

    [iess, mpc, xgd, sd] = addstorage('ex_storage', mpc, xgd);profiles = getprofiles('ex_wind_profile', iwind);profiles = getprofiles('ex_load_profile', profiles);nt = size(profiles(1).values, 1);transmat = ex_transmat(nt);

    mdi = loadmd(mpc, transmat, xgd, sd, 'ex_contab', profiles);

    mpopt = mpoption(mpopt, 'most.storage.cyclic', 1);

    mdo = most(mdi, mpopt);

    ms = most_summary(mdo);

    plot_uc(mdo)plot_storage(mdo)

    77

  • StorageProfileSolution

    0 2 4 6 8 10 12 14Period

    -50

    0

    50

    100

    150

    200

    250En

    ergy

    , MW

    hStored Energy for Storage Unit 1 (Gen 6) @ Bus 3

    78

  • MOSTv1.0b1

    • MOSTv1.0b1isavailableaspartofMATPOWER6.0b1fromtheMATPOWER website:– http://www.pserc.cornell.edu/matpower/

    • FulldescriptionofMOSTproblemformulation,softwarereference,andtutorialexamplesfoundin:– R.D.ZimmermanandC.E.Murillo-Sánchez,MATPOWER OptimalSchedulingTool(MOST)User’sManual,2016.

    http://www.pserc.cornell.edu/matpower/MOST-manual.pdf79

  • Questions?

    80