Under CM=2 the transformer magnetizing admittance is stated on a different voltage base than under CM=1, and the parser corrects only the MVA base. When NOMV1 differs from the Winding 1 bus base kV, the resulting g_fr/b_fr (and the three-winding g/b) are wrong by a factor of (NOMV1/BASKV)^2.
From the PSS/E manual
[This is v33.]
MAG1, MAG2: The transformer magnetizing admittance connected to ground at bus I.
When CM is 1, MAG1 and MAG2 are the magnetizing conductance and susceptance, respectively, in pu on system MVA base and Winding 1 bus voltage base. [...]
When CM is 2, MAG1 is the no load loss in watts and MAG2 is the exciting current in pu on Winding 1 to two MVA base (SBASE1-2) and nominal Winding 1 voltage (NOMV1). For three-phase transformers or three-phase banks of single phase transformers, MAG1 should specify the three-phase no-load loss. [...]
A second manual copy (version not identified) states the same rule more tersely:
The magnetizing conductance and susceptance, respectively, in pu on system base quantities when CM is 1; MAG1 is the no load loss in watts and MAG2 is the exciting current in pu on winding one to two base MVA (SBASE1-2) and nominal voltage (NOMV1) when CM is 2. MAG1 = 0.0 and MAG2 = 0.0 by default.
When CM is 1 and a non-zero MAG2 is specified, MAG2 should be entered as a negative quantity; when CM is 2 and a non-zero MAG2 is specified, MAG2 should always be entered as a positive quantity.
The CM=2 half is word-for-word equivalent across both copies. The copies differ only in the CM=1 clause: the v33 text names the voltage base outright ("Winding 1 bus voltage base"), while this one says "system base quantities", which implies the bus voltage base rather than stating it. That distinction is what this issue turns on, so the v33 wording above is the load-bearing citation; this copy corroborates it but would not establish it alone.
So the two forms differ in voltage base, not just MVA base:
|
MVA base |
Voltage base |
CM=1 |
system |
Winding 1 bus base kV |
CM=2 |
SBASE1-2 |
NOMV1 |
Current behaviour
_transformer_mag_pu_conversion (src/pm_io/psse.jl) handles the MVA base only:
G_pu = PSSE_MICRO_UNIT_SCALE * transformer["MAG1"] / base_power
mag_diff = transformer["MAG2"]^2 - G_pu^2
B_pu = -sqrt(max(0.0, mag_diff))
base_power is SBASE1-2, so the MVA rebase is right. Nothing accounts for the voltage base. The CM=1 path needs no voltage correction (it is already on the bus base), which is why the asymmetry is otherwise correct — see the discussion on #36.
Expected
Per-unit admittance scales as Y_pu = Y_actual * V^2 / S, so restating from the NOMV1 base onto the bus base kV multiplies by (BASKV / NOMV1)^2. Both G and B take the same factor, since the no-load loss in watts is likewise referred to nominal voltage.
NOMV1 = 0.0 means "use the bus base kV", in which case the factor is 1 and nothing is wrong. The bus base kV is already available at the call site as _get_bus_value(transformer["I"], "base_kv", pm_data) (see psse.jl:1121-1125, which resolves base_voltage_from the same way).
Both CM=2 call sites are affected: two-winding (g_fr/b_fr) and three-winding (g/b).
Note on coverage
No RAW file in the PowerSystemsTestData artifact uses CM=2 — all 72 files are CM=1, and every one has SBASE1-2 == baseMVA == 100, so mva_ratio_12 == 1 throughout. CM=2 is exercised only by synthetic fixtures, and the existing one uses NOMV1 = 0, so nothing currently covers this. A fix should add a fixture with NOMV1 != BASKV.
This is why the sign error in #36 went unnoticed for so long, and it means this path carries no real-data regression safety net.
Found while fixing #36 (PR #45 / #46); deliberately left out of that PR to keep it scoped to the sign.
Under
CM=2the transformer magnetizing admittance is stated on a different voltage base than underCM=1, and the parser corrects only the MVA base. WhenNOMV1differs from the Winding 1 bus base kV, the resultingg_fr/b_fr(and the three-windingg/b) are wrong by a factor of(NOMV1/BASKV)^2.From the PSS/E manual
[This is v33.]
A second manual copy (version not identified) states the same rule more tersely:
The CM=2 half is word-for-word equivalent across both copies. The copies differ only in the CM=1 clause: the v33 text names the voltage base outright ("Winding 1 bus voltage base"), while this one says "system base quantities", which implies the bus voltage base rather than stating it. That distinction is what this issue turns on, so the v33 wording above is the load-bearing citation; this copy corroborates it but would not establish it alone.
So the two forms differ in voltage base, not just MVA base:
CM=1CM=2SBASE1-2NOMV1Current behaviour
_transformer_mag_pu_conversion(src/pm_io/psse.jl) handles the MVA base only:base_powerisSBASE1-2, so the MVA rebase is right. Nothing accounts for the voltage base. TheCM=1path needs no voltage correction (it is already on the bus base), which is why the asymmetry is otherwise correct — see the discussion on #36.Expected
Per-unit admittance scales as
Y_pu = Y_actual * V^2 / S, so restating from theNOMV1base onto the bus base kV multiplies by(BASKV / NOMV1)^2. BothGandBtake the same factor, since the no-load loss in watts is likewise referred to nominal voltage.NOMV1 = 0.0means "use the bus base kV", in which case the factor is 1 and nothing is wrong. The bus base kV is already available at the call site as_get_bus_value(transformer["I"], "base_kv", pm_data)(seepsse.jl:1121-1125, which resolvesbase_voltage_fromthe same way).Both
CM=2call sites are affected: two-winding (g_fr/b_fr) and three-winding (g/b).Note on coverage
No RAW file in the
PowerSystemsTestDataartifact usesCM=2— all 72 files areCM=1, and every one hasSBASE1-2 == baseMVA == 100, somva_ratio_12 == 1throughout.CM=2is exercised only by synthetic fixtures, and the existing one usesNOMV1 = 0, so nothing currently covers this. A fix should add a fixture withNOMV1 != BASKV.This is why the sign error in #36 went unnoticed for so long, and it means this path carries no real-data regression safety net.
Found while fixing #36 (PR #45 / #46); deliberately left out of that PR to keep it scoped to the sign.