-
Notifications
You must be signed in to change notification settings - Fork 0
Power System Primer en
中文 | English
Maintained version: v0.51.2 | Last updated: 2026-07-06
This page gives software/AI engineers the foundational power system concepts, so YBus, N-1, IEC 104 in EnerOS code are no longer jargon. Wiki-unique content, not copied from docs/.
The grid consists of three element types:
| Element | EnerOS Type | Description |
|---|---|---|
| Bus |
Bus / BusType
|
Node, voltage node. Three types: PQ (load) / PV (generator) / Slack (swing) |
| Branch | Branch |
Transmission line / transformer branch, connects two buses |
| Switch | Switch |
Switchable element, Open/Closed state determines topology connectivity |
Graph model: The grid is naturally a graph — buses are nodes, branches are edges. EnerOS's eneros-topology maintains this graph via NetworkGraph; switch state changes trigger topology reconfiguration.
IEEE 14-bus: Standard test system, 14 buses / 20 branches / 5 generators, the "Hello World" of power systems. EnerOS's MVP loop is based on it (see First Demo).
Problem: Given load/generation injections, find bus voltage magnitude V and angle θ.
Equation: P_i + jQ_i = V_i · Σ (Y_ij · V_j)*, i.e., Y · V = I, where Y is the admittance matrix (YBus).
Solving methods (EnerOS has 4, see Powerflow Solvers):
| Algorithm | Abbreviation | Convergence | Use case |
|---|---|---|---|
| Newton-Raphson | NR | Quadratic, 2-5 iterations | Main, general purpose |
| Fast-Decoupled | FD | Linear, 4-10 iterations | Large grids, fast (v0.51.0) |
| Backward-Forward Sweep | BFSW | Simple | Distribution networks (radial) |
| DC | DC | Single solve | Approximation (DC powerflow) |
Key terms:
-
pu(per unit) — normalized voltage/power. EnerOS uses pu internally throughout. -
Slack bus— swing bus, absorbs network losses, angle reference 0 -
PQ bus— load bus, known P/Q, solve for V/θ -
PV bus— generator bus, known P/V, solve for Q/θ
Power systems must satisfy physical constraints, otherwise equipment damage / grid collapse:
| Constraint | Meaning | EnerOS Implementation |
|---|---|---|
| N-1 | Grid remains stable after any single line/device failure |
ContingencyAnalyzer parallel scan |
| Thermal stability | Line current must not exceed thermal capacity (otherwise wire melts) |
ConstraintEngine validation |
| Voltage violation | Bus voltage within [0.95, 1.05] pu range |
ConstraintEngine validation |
| Frequency stability | System frequency within [49.5, 50.5] Hz (China) / [59.95, 60.05] Hz (US) | RealtimeStabilityMonitor |
Constraints as hard law: In EnerOS, Agent decisions must pass SafetyGateway validation; commands violating constraints are rejected at the kernel layer (see Safety Gateway). This is the fundamental difference between EnerOS and general-purpose Agent frameworks.
EnerOS supports 11 protocols (see Protocol Support); the 4 most common:
| Protocol | Standard | Purpose | Mnemonic |
|---|---|---|---|
| IEC 61850 | IEC 61850 | Substation automation (abstract data model MMS/GOOSE/SV) | "Smart substation standard" |
| IEC 60870-5-104 | IEC 104 | Telecontrol (control center ↔ substation, TCP/IP) | "SCADA telecontrol" |
| Modbus | Modbus TCP/RTU | Industrial general (serial/TCP) | "Simplest industrial protocol" |
| DL/T 698.45 | DL/T 698 | Chinese energy meter (object-oriented) | "Domestic energy meter" |
GOOSE — IEC 61850 Layer 2 multicast message, used for fast protection communication within substations (< 4ms). EnerOS captures directly via AF_PACKET raw socket.
SV — Sampled Values, IEC 61850 sampled values message, PT/CT digital sampling transmission.
PMU — Phasor Measurement Unit, synchrophasor measurement (μs-level timestamps, IEEE C37.118). EnerOS supports 10/25/30/50/60/120 Hz data rates.
| Time scale | Phenomenon | EnerOS response |
|---|---|---|
| Microsecond | Protection actions, GOOSE transmission | RT domain (SCHED_FIFO + lockfree IPC) |
| Millisecond | Switching operations, IEC 104 commands | RT domain (P99 < 1ms) |
| Second | AGC (Automatic Generation Control) | General domain (Agent orchestration) |
| Minute | Economic dispatch, State Estimation | General domain (powerflow) |
| Hour/Day | Load forecasting, maintenance scheduling | General domain (AI inference) |
This is the fundamental reason EnerOS's dual execution domain exists — a single time-scale OS cannot satisfy both protection (μs) and AI inference (minutes).
EnerOS supports both standards:
| Type | Standard | EnerOS crate |
|---|---|---|
| Device parameters | GB/T series + IEC series |
eneros-equipment + eneros-cnpower (Chinese distribution) |
| Energy meter | DL/T 698.45 + DL/T 645-2007 | eneros-protocol-dlt698 |
| Harmonic limits | GB/T 14549-1993 | eneros-analysis::harmonic_limits_gbt14549 |
| Telecontrol | IEC 60870-5-104 / DL/T 634.5101 (CDT) |
eneros-device + eneros-protocol-cdt
|
eneros-cnpower is a native Rust port of the Python cnpower tool: 12 device types / 51 GB items / 17 JSON datasets (see ADR-0005).
- AgentOS Primer — Agent/LLM crash course for power engineers
- Safety Gateway — How constraints become kernel hard law
- Powerflow Solvers — 4 algorithms detailed
- Protocol Support — Full 11-protocol matrix
- Glossary — Terminology
EnerOS Wiki | v0.51.2