Chapter 9 of 12

Inside the right-hand side

The RHS is not a number stored somewhere. It is a small program, a list of typed terms evaluated on a stack every five minutes from live measurements. Once you can read the term list you can see exactly what a limit depends on.

Terms and their types

Each RHS is stored in GENERICCONSTRAINTRHS as an ordered list of terms. A term has a SPD_ID (what it refers to), a SPD_TYPE (where the value comes from), a FACTOR, an optional OPERATION, a DEFAULTVALUE used when the live value is unavailable, and an optional GROUPID for nesting. The type code is the key:

TypeMeaningWhere the value comes from
CConstantThe DEFAULTVALUE itself: ratings, margins, cap values.
ASCADA analogA live measurement: MW or MVA on a line, a voltage, a temperature.
SSCADA statusA breaker or switch position, 0 or 1.
TTrader (unit) MWA scheduled unit's current output, used as a measured quantity on the RHS.
RRegion demandThe regional demand forecast for the interval.
IInterconnector flowThe current flow on an interconnector.
EEntered valueA value operators enter: line ratings, forecasts, limits from off-line studies.
GGroupA sub-expression: the terms sharing this GROUPID are evaluated first and the result is used as one term.
BBranchAn if-then-else over three parameter terms.
UStack operationAn operator applied to what is already on the stack: ADD, MUL, MAX, MIN, STEP, POW2, SQRT and friends.
XGeneric equationA call to a reusable equation defined in GENERICEQUATIONRHS, so common sub-expressions are written once.
WSwitch-run statusWhether this is the second NEMDE run that Basslink can trigger.
M, NMNSP availabilityThe maximum or minimum bid availability of a market interconnector.
Measured: how often each type appears

The stack machine

Because of the U type the RHS is not a formula but a program in reverse Polish notation: terms are pushed onto a stack in TERMID order, each multiplied by its factor, and a U term pops operands and pushes a result. Terms with the same GROUPID are evaluated as their own little stack whose result becomes one value in the outer one. The X type makes this recursive. NEMDE, and any faithful re-implementation, walks the list once and reads the final stack value as the RHS.

A real RHS, term by term

Start small. S>NIL_MHNW1_MHNW2 protects the second Monash to North West Bend 132 kV line in South Australia's Riverland from overloading if the first one trips. Its LHS is just Murraylink with factor 1. Here is its dispatch-scope RHS as stored:

This is the feedback form from Chapter 3 in miniature: rating, minus what is already flowing on the monitored line, minus a share of the flow on the contingency line, minus an operating margin, then add back the current value of the LHS term so the equation expresses headroom. Because the A terms are SCADA measurements you do not have, you cannot reproduce the RHS from public data; you read the value AEMO published.

The trivial case

A discretionary cap has the shortest program of all. V_DUNDWF1_2_3_168's RHS is:

A longer one

N>NIL_969, the Gunnedah to Tamworth feedback constraint in northern NSW, shows what a typical thermal RHS looks like once unit outputs (T), breaker statuses (S), a group and a scale operation are involved. Its description even documents its own swamping rule.

Dispatch versus pre-dispatch scope

Every RHS is stored up to three times, under SCOPE values DS (dispatch), PD (pre-dispatch) and ST (short-term PASA). The dispatch version can use live SCADA. A forecast for tomorrow afternoon cannot, so the pre-dispatch version replaces the A feedback terms with forecast-based ones (unit outputs from the pre-dispatch solution, demand forecasts, entered ratings). The consequence for anyone comparing horizons: a constraint's headroom in a pre-dispatch run and its headroom in the dispatch run are not the same equation, and a large pre-dispatch headroom can vanish when the live terms arrive. That is one reason AEMO's own forecasts of binding are a baseline to score rather than a truth to copy, which Chapter 11 takes up.

Check your understanding

Evaluate this RHS: term 1, type E, rating 116, factor 1; term 2, type A, measured flow 30, factor minus 1; term 3, type C, operating margin, factor minus 10 (default value minus 10, so it contributes minus 10); term 4, type I, current Murraylink flow minus 10 MW, factor 1. What is the RHS?

Why can you not recompute a feedback constraint's dispatch RHS from public data?

  • The term list is confidential.
  • Its A-type terms are SCADA measurements that AEMO does not publish at five-minute resolution.
  • The stack machine is undocumented.
  • The RHS is recomputed only monthly.

Which SPD_TYPE lets one constraint's RHS call a reusable equation shared by many constraints?

True or false: a constraint's pre-dispatch (PD) RHS and dispatch (DS) RHS are the same program, so their headroom values are directly comparable.

  • True
  • False