Skip to content

Write PSS/E remote and shared voltage control to the OpenAPI document - #66

Draft
m-bossart wants to merge 7 commits into
psy6from
mb/remote-control
Draft

m-bossart wants to merge 7 commits into
psy6from
mb/remote-control

Conversation

@m-bossart

@m-bossart m-bossart commented Sep 28, 2026 •

Copy link
Copy Markdown

Remote and shared voltage control

Writes the PSS/E remote and shared voltage control data to the OpenAPI document instead of dropping it or leaving it in ext.

What changes

  • Generators, VSC converters, FACTS devices and switched shunts get remote_regulated_bus_id from IREG/REMOT/FCREG/SWREG.
  • Generators get voltage_setpoint (VS) in per unit on the regulated bus base.
  • Devices that share a regulated bus join one ReactivePowerSharing group per bus, weighted by RMPCT/100. A device alone on its bus gets no group.
  • Transformer circuits get regulated_bus_id, regulated_bus_side from the sign of CONT (UNDEFINED when the bus is an arc end) and load_drop_compensation_r/_x from CR/CX.
  • LCC lines reference their commutating buses and tap transformers by id.
  • A remote bus the case does not hold falls back to the device's own bus, as PSS/E does. An LCC tap transformer the case does not hold is reported and left unset.
  • Each type-level declared unit is resolved once, which cuts the Eastern Interconnect document build from minutes to seconds.
  • Synthetic v33 and v35 fixtures cover every record.

Breaking

REMOT_FROM/TO and RMPCT_FROM/TO on vscline, IREG on legacy generators and RMPCT on v34 and v35 FACTS devices move out of ext into first-class keys of the PowerModels dictionary.

Verification

Full suite: 2823 pass, rebased on psy6 (2026-09-28).

Stack

Merge in this order.
The Julia branches pin each other's mb/remote-control branches in [sources], and each pin moves back to main or psy6 as its dependency merges.

Depends on: Sienna-Platform/PowerOpenAPIModels#28.
This branch writes the fields Sienna-Platform/PowerSystems.jl#1819 reads, and that PR's round-trip tests exercise it.

🤖 Generated with Claude Code

Carry IREG, RMPCT, the signed transformer CONT with CR/CX, the two-terminal
DC commutating bus and tap transformer references, the VSC REMOT/RMPCT and
the FACTS and switched shunt remote buses through the PowerModels dictionary
into the OpenAPI writers.

Generators, converters, FACTS devices and switched shunts get a nullable
remote_regulated_bus_id, and generators get voltage_setpoint in per unit on
the regulated bus base. Devices that share a regulated bus become members of
one ReactivePowerSharing group per bus, weighted by RMPCT/100; a device alone
on its bus gets no group. Transformer circuits get regulated_bus_id,
regulated_bus_side derived from the CONT sign when the bus lies off the arc,
and load_drop_compensation scaled to the circuit base. LCC lines reference
their commutating buses and tap transformers by id.

Two synthetic fixtures (v33 and v35) exercise every record, and the
generator builders stage the required enum fields before the voltage
setpoint so the shadow instance the unit conversion needs can be built.
A reservoir hydro unit maps to HydroTurbine but is created as a HydroDispatch,
so the member lookup under the mapped name failed on every case with hydro
generation. The generator makers now hand back the component they created and
the member takes its type and id from it.
Asking a model type for a discriminated property's unit raises by design, and
the staging code caught that exception on every set_value! to fall back to a
shadow instance. The answer never changes for a (type, property) pair, so it
is now remembered; on platforms where recording a backtrace is slow this cuts
the Eastern Interconnect document build from minutes to seconds.
Real cases name a converter tap transformer that the TRANSFORMER data holds
as three-winding or not at all. The line is still valid, so the reference is
reported and left unset instead of failing the import.
… hold

A generator, shunt, FACTS device or converter can name an IREG-style bus the
parser dropped as isolated or that never existed. The reference is reported
and the device regulates its own bus, which is also what PSS/E does, and its
sharing-group membership follows the bus it actually regulates.
CR and CX go to load_drop_compensation_r and load_drop_compensation_x, the
schema's split of the transformer circuit's compensation impedance.
@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.11111% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/openapi/build.jl 94.28% 2 Missing ⚠️
src/openapi/generation.jl 93.75% 2 Missing ⚠️
src/openapi/identity.jl 86.66% 2 Missing ⚠️
src/openapi/branch.jl 96.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant