IEC 104, CLS and CSIP-AUS

IEC 104 set points, CLS.EEDI control-box limits and CSIP-AUS operating envelopes as exact power caps in Rust, with the § 14a guarantee.

On this page

Three ways a grid operator caps a site or a plant directly: a control centre's IEC 104 set point, a smart-meter gateway's CLS.EEDI control box, and an Australian utility server's CSIP-AUS operating envelope. Each becomes limits in this crate's one sign, applied to an envelope that names who set every bound.

flexibility = { version = "0.4", features = ["iec104", "cls", "csip"] }

The protocols overview has the rules all converters share.

IEC 104 set points (iec104)#

A set-point command carries a number: type 48 (normalized), 49 (scaled) or 50 (short float). What the number means is in the operator's point list: which way it caps, and what 100 % or one count is. That is a Point, and every conversion takes one.

use flexibility::iec104::{self, wire, Direction, Point, Scale};
use wire::types::{Normalized, SetpointNormalized};

// A wind park, 10 MW installed: feed in at most 50 % of it.
let park = Point { direction: Direction::FeedIn, scale: Scale::Normalized { full_scale: kw!(10_000) } };
let cap = iec104::limit(SetpointNormalized::new(Normalized(16_384)), park, window, Rounding::Exact, scc)?;
// min -5 MW
  • Normalized values are fractions in steps of 2⁻¹⁵: 30 % of 10 MW is 2 999 877.9 W, refused with Rounding::Exact. Rounding::TowardZero never exceeds the exact value, so for a cap it is the stricter side; a property test holds that a cap sent and read back toward zero never loosens.
  • Scaled values are whole counts of a step: exact.
  • Short floats are read through their shortest decimal, the number the operator typed: 4.2 at a kW point is 4 200 W exactly. Infinities and NaN are refused.
  • A select of select-before-operate sets nothing and is refused; a type the point is not configured for is refused.
  • IEC 104 has no duration: a set point holds until the next one, so the window is yours.

iec104::setpoint(cap, point, rounding) goes the other way: the execute set point that carries a cap. A normalized 100 % is not representable (the largest value is 1 − 2⁻¹⁵); toward zero it becomes the largest value under it.

CLS.EEDI control boxes (cls)#

A CLS.EEDI control carries a consumption or production limit in whole watts, active or not, lasting duration seconds from receipt, and failsafe values. This is the § 14a path in Germany:

use flexibility::cls;

let caps = cls::limits(&control, received, horizon, &dso)?;
let envelope = guarded.apply(&caps[0])?; // refused below the § 14a guarantee
  • A consumption limit is a consumption cap, a production limit a feed-in cap. Applied to an envelope with the § 14a guarantee, a cap below the minimum is refused.
  • An inactive limit sets nothing. An active limit of 0 W, a zero duration or a negative value is what CLS.EEDI itself refuses, and is refused here.
  • cls::failsafe(&control, window, &who) gives the failsafe caps over the window you expect the fallback to last.
  • cls::control(&limit, at) writes a cap back, with the seconds left at at; read back, it is the same cap (a property test).

CSIP-AUS operating envelopes (csip)#

A CSIP-AUS utility server sends a connection point's import and export limits (opModImpLimW, opModExpLimW) as DER controls, each with an interval, a program primacy and a creation time. csip::envelope reads them onto a grid:

use flexibility::csip;

let envelope = csip::envelope(&controls, "NMI-4001", &defaults, &grid, &server)?;
// ISP 1: min -1.5 kW (utility.example DERControl …A1 opModExpLimW)
  • Which control is in force is CSIP's call, made by the ieee2030-5 crate: the higher primacy wins, then the newer control, and a displaced control never comes back. Not the tightest: a later, looser envelope replaces an earlier one.
  • Within an ISP, the control in force may change; the ISP takes the strictest value any instant of it sees. If import and export controls each hold for part of an ISP and together leave no constant power, the envelope is refused (EmptyRange) rather than bent.
  • An import limit of p is a consumption maximum of p, an export limit a minimum of −p. A negative limit keeps its meaning.
  • A limit is value × 10^multiplier W; a fraction of a watt is refused, and so are controls the rules cannot order and more than 10 000 controls.
  • opModGenLimW and opModLoadLimW bound a DER's gross generation and load, not the connection point, and are not in the envelope.

The resulting limits combine with every other in one envelope: see Limits and envelopes.