Notebooks · lib/power/raw
Reading a PSS/E RAW case
PSS/E's RAW file (Siemens PTI, "PSS/E Program Operation Manual", chapter
"Power Flow Raw Data File Contents", revisions 32 to 34) holds a network as
a sequence of sections, one record per line, each section ended by a line
that starts with 0. read_raw(path) reads the sections a power flow
needs and returns the network in MATPOWER's form (power.case), so every
solver in lib/power takes it:
- buses: number, base kV, type (1 PQ, 2 PV, 3 swing, 4 isolated), area, zone, voltage and, from revision 33, the normal voltage limits;
- loads: the constant-power part PL + jQL is added to the bus's Pd, Qd; the constant-admittance part YP + jYQ (MW and MVAr at 1 pu) becomes a bus shunt; the constant-current part IP + jIQ is taken at the case's voltage, P = IP Vm, Q = IQ Vm (MATPOWER has constant-power loads only);
- fixed shunts: GL + jBL added to the bus shunt;
- switched shunts: held at their initial susceptance BINIT;
- generators: P, Q, Q limits, voltage set point, MVA base, status, P limits, and the source impedance ZR + jZX on the machine base (kept for the short circuit, power.shortcircuit);
- branches: r, x, total charging b, ratings A, B, C (the first three of revision 34's twelve), status; the line-end shunts GI + jBI, GJ + jBJ are added to the shunts of the two buses;
- two-winding transformers (four records each): the impedance R1-2 + jX1-2 on the system base (CZ = 1), the winding base (CZ = 2) or as load loss in watts and |Z| (CZ = 3); the off-nominal ratio t = (WINDV1 / WINDV2) in per unit of the bus base voltages (CW = 1), from winding voltages in kV (CW = 2) or in per unit of the windings' nominal voltages NOMV (CW = 3); the phase shift ANG1; the magnetizing admittance MAG1 + jMAG2 at the winding 1 bus, on the system base (CM = 1) or as no-load loss in watts and exciting current in per unit of the winding base (CM = 2);
- areas (number, swing bus, desired interchange) and zones.
A transformer's impedance on its winding base is moved to the system base by the ratio of the MVA bases alone, as ANDES's reader does. Revision 34 adds a switching-device section after the branches; a closed device is read as a branch of its reactance. Three-winding transformers, DC lines and FACTS devices are not read: a file that has any stops with a message.
Look inside this program
- Atlas
The program’s map: every function and which calls which.
There’s no recorded run of this program yet.
This program declares a record type (Raw), and records run only in compiled C for now, so the Run buttons here are off. Open it in the workbench and use its C tab to compile it.
Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.