Tutorial PLEXOS
Tutorial PLEXOS
Gregory K. Woods
Regional Director – North America
Energy Exemplar, LLC
Energy Exemplar, LLC
PLEXOS for Power Systems Released in 1999
Continuously Developed to meet Challenges of a Dynamic
Environment
A Global Leader in Energy Market Simulation Software With Over 200
Installations in 17 Countries
Offices in Adelaide, Australia; London, UK; California, USA
High Growth Rate in Customers and Installations
Staff Expertise in Operations Research, Electrical Engineering, Economics,
Mathematics, Statistics with over 20% Ph.Ds
North American Office:
Consulting
Customer Support
Training
Software Sales
North American Datasets/WECC Term
01/25/13 Confidential | 2
Advanced Simulation Topics
Agenda
• PLEXOS For Power Systems
• Renewable Portfolio Expansion
• OpenPlexos API
• Integrated Stochastics
• Stochastic Optimization
– Multi-Stage Optimization
– Stochastic Unit Commitment
• Optimal Power Flow Issues
• High Performance Computing (HPC)
01/25/13 3
PLEXOS for Power Systems
01/25/13 4
PLEXOS Algorithms
• Mathematical Optimization
– Utilizes world-class commercial solvers
– Integrates Mixed Integer, Dynamic and Linear Programming Techniques to provide fast,
accurate results
• Simultaneous Co-optimization:
– Capacity Expansion, Reliability, Security Constraints, Unit Commitment and Economic dispatch,
revenue adequacy and uplift
– Thermal, Hydro, Energy, Reserve, Fuel, and Emissions Markets
• Integrated Stochastic Optimization
– Solves the Perfect Foresight Problem using a multi-stage optimizer that includes sample
reduction for fast accurate results
• User-defined constraints and decision variables
– Powerful formulation replaces the need for expensive custom programming
• Both physical (primal) and financial (dual) results reported
– Shadow Pricing report the real operating costs in constrained environments
• OpenPlexos allows customization and automation of PLEXOS through a
standardized Application Programming Interface (API)
01/25/13 6
Simulation Features
- Conventional Generation
• Over 150 technical and economic generation
characteristics:
– Deterministic and stochastic unit commitment
– Random and scheduled outages - optimized maintenance
– Temperature-dependent operating characteristics
– Detailed ramping and start/stop profiles
– Multiple fuel optimisation with complex fuel transitions
and operational modes
– Compartmentalised combined cycle modelling featuring
non-convex heat rates
– Unit Dependencies
01/25/13 7
Simulation Features
- Hydro Modelling
Infl
• Full Cascading Hydro networks: S
t
o
ow
Inflow
~ ~ ~
St
~ ~
P gP P
/ e/ / e
Inflow
– Multiple storage models:
S IS S III
H H
1 Storage
2 II
3 4 5
St
01/25/13 8
Simulation Features
- Additional
• Ancillary services
– Co-optimised with generation dispatch and unit commitment and more features
such as:
– Multiple reserve classes including spinning up and down, regulation up and down,
and replacement services
– Detailed treatment of start-up and shutdown combined with ramping and reserve
interaction over user-selectable intervals down to 1-minute
• Emissions
– Co-optimized generation dispatch for emission limits, emission prices and/or
allowances
– Emissions production on start/up, fuel use, and generation
– Multiple removal technologies including limestone, ammonia, activated carbon
– Flexible Emission constraints including plant, region, zone on any period including
multi-year constraints
– Multiple Air District rules
• Demand Side Management
– Supports multiple technologies such as distributed generation, demand response
bidding, and curtail-able load
– Value DSM programs cost to the system, risk value, capacity value, and valuation
01/25/13 9
Simulation Features
- Transmission Modelling
• Fully integrated transmission modelling capable of
supporting extremely large networks
– Integrated with GIS and Google Maps to produce network
diagrams, zonal and regional diagrams, and flow analysis
– Optimal power flow using a fully integrated DCOPF
– Losses computed using MLF, fixed, linear, quadratic and cubic
formulations
– Large connection of multiple AC and DC networks supporting
10,000’s buses and lines
– Security and n-x contingency constraints (SCUC)
– AC and DC lines, transformers, phase shifters and interfaces
– Transmission aggregation and network reduction
– Nodal LMP pricing and decomposition into energy, congestion
and marginal loss
– Computation of regional and zonal reliability indices
01/25/13 10
Simulation Features
- Gas Modelling
• Fully integrated energy model co-optimises
electricity and gas system dispatch. Includes models
of:
– Gas fields, collection and processing, storages, LNG,
tankers, pipelines, nodes and gas demands
– Integrates with long-term planning to produce expansion
plans for gas and electric infrastructure
– Models constraints on short and mid-term gas supply and
its impact on electricity production
– Compute and enforce hourly and daily pipeline limits and
imbalance charges
01/25/13 11
Simulation Features
- Financial & Risk
• Comprehensive financial reporting for Companies, Generators, Lines,
Contracts (Physical, Financial, Fuel, Transmission rights) and Regions,
including:
– Income Statement: Revenue, fuel, emission, transmission, VOM, FOM, Capital,
taxes, spot purchases/sales
– Valuation: contract settlement, net revenue
– Cost of service: Cost to serve loads
• Compute comprehensive risk metrics using deterministic and stochastic
valuations:
– Risk Reduction Value of Plant and Portfolios
– Risk Premium
– Risk adjusted portfolio cost
– Risk adjusted IRP
• Compute risk-adjusted markets based on dynamic bidding
– In capacity expansion planning, ensures markets are sustainable
– Using Bertrand and Cournot games to reflect market power
– Use empirical schemes such as Residual Supply Index (RSI)
01/25/13 12
Simulation Features
- Intermittent Resources
• Wind and Solar are characterised by uncertain availability:
– Evaluate the full effect of intermittency on reliability indices, system
operation, market prices, ancillary services, and generator valuation
– Evaluate Capacity Value using methods such as Effective Load Carrying
Capacity (ELCC) determined using Stochastic Optimization
– Compute Risk Reduction Value
– User-selectable intervals from 1-minute to multiple hours
– Full ramping constraints
– Autoregressive sampling models for wind speed, solar radiation and
natural inflows (autocorrelation, brownian motion, Box Jenkins
(ARMA, ARIMA) with sample reduction
– Stochastic optimisation of forecast uncertainty, multi-stage scenario-
wise decomposition algorithms
01/25/13 13
Capacity Expansion Planning -
Renewable Resource Portfolio
Generator Build Cost ($/kW) WACC (%) Economic Life (years)
New_CCGT 1750 12 25
New_GT 1100 12 25
EXPANSION PLANNING
FIXED INSTALLED CAPACITY
01/25/13 14
USE
Transmission Expansion
General Description:
• The planned addition/deletion of AC and DC lines from the system is
supported by all OPF methods in PLEXOS using the Line [Units] property.
PLEXOS automatically recomputes the shift factors required to cope with
the changes in topography. LT Plan supports all types of transmission
constraints including security-constrained optimal power flow.
01/25/13 15
Introduction to OpenPlexos
What is OpenPlexos:
– API accessible through Visual Studio.NET
– API accessible through any CSI language
http://en.wikipedia.org/wiki/List_of_CLI_languages
Uses:
– Custom Input
– Integration with Other Applications
– Control Execution: Triggers with SCADA, etc.
– Control Execution: Add additional Optimization Logic
– Control Execution: Custom Risk Logic
– Custom Reporting (Additional Properties, New Formats)
– Write to SQL Server or other DBMS
01/25/13 16
Application Programming Interface
MyModel.afterinitialize Add custom objects and/or Once per simulation phase after Built-in
constraints Objects are initialized
MyModel.AfterProperties Modify constraint coefficients At least once per step after
add custom Variables and mathematical program is fully populated
Constraints
MyModel.BeforeOptimize Override Solver Settings At least once per step before the solver
is called
MyModel.AfterOptimize Re-simulation Overrides. At least once per step after the solver
has completed
MyModel.OnWarning Trap Warning/error conditions When any warning message is raised
01/25/13 18
Integrated Stochastics
• Expected Value: probability weighted average
• Samples: series of outcomes
• Error: difference between expected value and
sample value
• Distribution: shape of probability curve
– Normal, Lognormal, Uniform, Triangular, etc.
• Standard deviation: measurement of spread of
probability curve :
– +/- 1 stdev = 68.3% of errors
– +/- 2 stdev = 95.4% of errors
– +/- 3 stdev = 99.7% of errors
• Volatility: time-base measurement of error
• Correlation: measure of relative movement between separate variables
• Autocorrelation: measurement of relative movement of variable over time
• Brownian Motion with mean reversion: dampening of period-to-period change in
random patterns
• Box-Jenkins: Auto Regressive Integrated Moving Average (ARIMA), a two component
dampening of period-to-period changes using an autoregressive and a moving average
component
01/25/13 20
Risk Adjusted Values
Measurement Issues:
• Deterministic provides a
measure of value at given
conditions:
– Value of portfolio given
average conditions
• Stochastic measures values
of all measured conditions Why use Risk in Planning Decisions?
• It is likely that decisions made under
weighted by probabilities deterministic planning, while optimal
– Average value of portfolio for the deterministic case, yield a
given all conditions decision which is costly under other
known risks
• What is the Risk Adjusted Value?
01/25/13 21
Short-Comings of Deterministic
Simulation
The Perfect Foresight Problem:
• Stochastic Run is simply a deterministic
(predictable) run using randomly drawn data
• Optimization therefore assumes that you know
the outcome, i.e. have perfect foresight
• What if you need to make a decision (UC, Hydro
schedule, Build/retire), based on an unknown
future?
• Stochastic Optimization makes the decision, then
evaluates then runs stochastic optimizations,
allowing the best decision to be determined
01/25/13 22
Stochastic Optimization (SO)
• Stochastic Programming
– The goal of SO is to find some policy that is feasible for all (or almost all) of the
possible data instances and maximize the expectation of some function of the
decisions and the random variables
• Scenario-wise decomposition
– The set of all outcomes is represented as “scenarios”, the set of scenarios can be
reduced by grouping like scenarios together. The reduced sample size can be run more
efficiently
• The most widely applied and studied stochastic programming models are
two-stage linear programs
• Here the decision maker takes some action in the first stage, after which a
random event occurs affecting the outcome of the first-stage decision
• A recourse decision can then be made in the second stage that
compensates for any bad effects that might have been experienced as a
result of the first-stage decision
• The optimal policy from such a model is a single first-stage policy and a
collection of recourse decisions (a decision rule) defining which second-
stage action should be taken in response to each random outcome
01/25/13 24
SO Theory, Continued
• Where the first (or second) stage decisions must take integer values we
have a stochastic integer programming (SIP) problem
• SIP problems are difficult to solve in general
• Assuming integer first-stage decisions (e.g. “how many generators of type
x to build” or “when do a turn on/off this power plant”) we want to find a
solution that minimises the total cost of the first and second stage
decisions
• A number of solution approaches have been suggested in the literature
• PLEXOS uses scenario-wise decomposition ...
01/25/13 25
SO Theory, Continued
H3
Example: H2
M3
• Morning M2 M3
• Mid-day
Initial “high” L3
• Night H3
• If wind is low in any period: H2
M3
• 50% chance that wind remains low H3
• 50% chance it increases to mid M1 M2 M3
• If wind is mid in any period:
L3
• 33% chance decreases to low
M3
• 33% chance it remains mid L2
L3
• 33% chance it increases to high Initial “mid”
H3
• If wind is high in any period:
M2 M3
• 50% chance that wind remains high L2
L3
• 50% chance it decreases to mid
• 17 possible paths, or “scenarios”
M3
L2
Initial “low” L3
01/25/13 26
SO Theory, continued
H1 H2 H3
• Paths are “decomposed” into
H1 H2 M3
discrete scenarios with
H1 M2 H3
discrete probabilities
H1 M2 M3 • Scenariowise decomposition
H1 M2 L3
M1 H2 H3 P(1) assigns probabilities to each
M1 H2 H3
M1 H2 M3
P(2) scenario
M1 H2 M3
M1 M2 H3 P(3) • Similar paths are
M1 M2 M3 combined
M1 M2 H3
M1 M2 L3
• Unlikely paths are
M1 M2 M3
L1 M2 H3
removed
M1 M2 L3
• Probabilities are
L1 M2 M3
M1 L2 M3 recomputed
M1 L2 L3
L1 M2 L3
• For example, it is unlikely that
L1 M2 H3
L1 M2 M3 p(9) wind can be high during
L1 M2 M3
mornings (H1) and, therefore
unlikely to be low during the
L1 M2 L3
day (M2).
L1 M2 M3
L1 L2 L3
01/25/13 27
H1 H2 H3
H1 H2 M3
H3
H1 M2 H3
H2
M3
H1 M2 M3
H1 H3
M2 M3 H1 M2 L3
M1 M2 L3 M1 M2 L3
L3
L1 M2 H3
M3 M1 L2 M3
L2
L3 L1 M2 M3
Initial “mid” M1 L2 L3
H3
L1 M2 L3
L1 M2 H3
M2 M3
L2
L1 M2 M3
L1 M2 M3 p(9)
L3
L1 M2 L3
M3
L2
Initial “low” L3 L1 M2 M3
L1 L2 L3
01/25/13 29
SO in Unit Commitment
01/25/13 30
Day-ahead Unit Commitment
Example
-12hrs off
2x100 [MW] [65] MW 10$/MWh
-8hrs on
-4hrs on
100 [MW] [10] MW 50$/MWh
-2hrs off
0-100 [MW]
Must-run! - 0$/MWh
uncertain
01/25/13 31
Day-ahead Unit Commitment,
Continued
No wind generation is
available
01/25/13 32
Day-ahead Unit Commitment,
Continued
01/25/13 33
Day-ahead Unit Commitment,
Continued
Stochastic Optimisation:
Two stage scenario-wise decomposition
Reveal the Take the
many
Stage 1: possible
optimal
decision 2
Commit 1 or 2 or none of the outcomes
“slow” generators
Stage 2: Expected
Take
cost of
Decision
There are hundreds of possible wind 1
decisions
1+2
speeds. For each wind profile, decide the
Is there a
optimal commitment of the other units better
and dispatch of all units Decision
1?
01/25/13 34
Alternating Current (AC)
01/25/13 35
Alternating Current (AC)
• Complex (Apparent) Power (S)
– Losses are based on Apparent Power
– Line Limits are based on apparent power
– Combination of real and reactive power, measured in
Kilo-Volt Amperes (KVA).
• Phase Angle (ϕ). Difference in phase between
current and voltage:
– Sin (ϕ) = Q/S, asin(Q/S) = ϕ
– Cos(ϕ) = P/S = Power Factor, Acos(PF) = ϕ
• Difference in Phase angles: Between two
nodes, the voltage phase angles are different,
active power flows between the difference in
ΦV2 - ΦV1
Source: Wikipedia
Active Power Correction: Transmission operators actively regulate reactive power flows to
minimize system costs. Some controllable components:
Capacitor Banks Phase Shifters
Generator VAR Support Generator Voltage Support
01/25/13 36
AC Power Flows
AC Power Flows for active and reactive Power Linearized power flows after simplifying
injections at each node for a single phase system assumptions, by(n,m) = reactance
01/25/13 37
AC Power Flows
01/25/13 38
Loss Calculation - Challenges
01/25/13 39
Non-Physical Losses (NPL)
(Piecewise Linear)
01/25/13 40
High Performance Computing
https://www.ornl.gov/modeling_simulation/posters/j_grosh.pdf
01/25/13 41
Questions
Gregory K. Woods
Regional Director – North America
Energy Exemplar, LLC
Energy Exemplar Pty Ltd Energy Exemplar Ltd Energy Exemplar LLC
Suite 3, 154-160 Prospect Road Building 3, Chiswick Park 3013 Douglas Blvd, Ste. 120
Prospect 566 Chiswick High Road Roseville, CA 95661
SA 4082 Australia Chiswick London W4 5YA, UK USA
Tel: +61 8 8342 9616 Tel: +44 208 899 6500 Tel: +1 916 722 1484
www.energyexemplar.com
01/25/13 42