PCC-driven aggregation of disaggregated power plant collector systems in PSS/E using the Muljadi et al. P²Z equivalencing method.
This tool automates the aggregation of collector-system cable impedances, shunt charging, zero-sequence parameters, and unit-transformer / GSU reactance for disaggregated plants modelled in PSS/E.
Although the reference method was developed for large wind power plants, the implemented workflow is applicable to any suitably modelled disaggregated plant, including wind, solar PV, BESS, hybrid renewable plants, and other multi-unit generation plants connected through a collector network.
The script starts from user-defined PCC bus number(s), discovers downstream power transformers, identifies collector legs, traces source units through the collector network, and exports a structured Excel workbook for review and model setup.
| File | Purpose |
|---|---|
psse_plant_aggregation.py |
Main Python automation script for PSS/E. |
plant_aggregation_formula_workbook.xlsx |
Companion formula-based Excel workbook for validation and manual checking. |
README.md |
Tool documentation and usage guide. |
LICENSE |
MIT license. |
The script implements the equivalencing procedure from:
Muljadi E., Pasupulati S., Ellis A., Kosterev D. (2008).
Method of Equivalencing for a Large Wind Power Plant with Multiple Turbine Representation.
IEEE PES General Meeting, Pittsburgh, PA. NREL/CP-500-42886.
For collector cable resistance and reactance, the script uses the P²Z weighted equivalent:
Z_eq = SUM(P_trail_i² × Z_i) / P_total²
where:
P_trail_iis the total downstream source-unit MVA behind cable segmentiZ_iis the cable segment impedanceP_totalis the total source-unit MVA in the aggregation group
This is applied to:
R, X, R0, X0
Cable shunt charging is summed directly:
B_eq = SUM(B_i)
B0_eq = SUM(B0_i)
This follows the physical behavior of shunt charging contributions and is not P² weighted.
Unit transformer reactance is aggregated using source-unit MVA weighting:
X_T_eq = SUM(P_unit_i² × X_T_i) / SUM(P_unit_i)²
where P_unit_i is the source-unit MVA associated with the unit transformer. The script derives this from topology rather than using transformer nameplate MVA as the weighting quantity.
The script first creates equivalents per aggregation group, then rolls them up to a whole-plant equivalent using the same P²Z logic across groups. Cable shunt values are deduplicated by physical cable key to avoid double-counting shared elements.
- PCC-driven discovery from one or more user-defined PCC buses
- Supports both 2-winding and 3-winding power transformer topologies
- Dynamic detection of collector legs downstream of power transformers
- Aggregation by:
LEG: one equivalent per power-transformer collector legCOLLECTOR_GROUP: one equivalent per feeder leaving each collector leg
- Positive-sequence and zero-sequence cable aggregation
- Topology-based source-unit / GSU weighting
- Direct summation of cable shunt B and B0
- Protection against ambiguous meshed collector topology
- Collector-group overlap detection, with
ERRORas the safe default - Structured Excel output with Summary, Power Transformers, Aggregates, Details, and Warnings sheets
- Metadata included in the output workbook for traceability
| Requirement | Version |
|---|---|
| PSS/E | v34 |
| Python | 2.7, PSS/E environment |
| xlsxwriter | Any recent version compatible with Python 2.7 |
Install xlsxwriter in the PSS/E Python 2.7 environment:
<PSSE_PATH>\python.exe -m pip install xlsxwriterExample PSS/E Python paths:
C:\Program Files (x86)\PTI\PSSE34\PSSPY27
C:\Program Files\PTI\PSSE34\PSSPY27
-
Place
psse_plant_aggregation.pyin the same folder as your PSS/E.savcase. -
Open the script and edit the USER SETTINGS section.
At minimum, define your PCC bus or buses:
PCC_BUSES = [700001, 700002]
-
Confirm the PSS/E installation path:
PSSE_PATH = r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27"
-
Confirm voltage classification settings for your model:
COLLECTOR_KV_MIN = 1.0 COLLECTOR_KV_MAX = 40.0 SOURCE_UNIT_KV_MAX = 100.0 POWER_TF_HV_KV_MIN = 40.0
-
Run from the PSS/E Python 2.7 environment:
exec(open("psse_plant_aggregation.py").read())
Or run it using the PSS/E script runner.
-
The output workbook is written to:
psse_plant_aggregation.xlsx
| Setting | Default | Description |
|---|---|---|
PCC_BUSES |
[] |
Required. One or more PCC bus numbers. |
AGGREGATION_MODE |
"LEG" |
"LEG" or "COLLECTOR_GROUP". |
COLLECTOR_KV_MIN |
1.0 |
Lower bound for collector-level buses. |
COLLECTOR_KV_MAX |
40.0 |
Upper bound for collector-level buses. |
SOURCE_UNIT_KV_MAX |
100.0 |
Maximum voltage for source-unit machine buses. |
POWER_TF_HV_KV_MIN |
40.0 |
Minimum voltage for identifying power-transformer HV side. |
ONLY_IN_SERVICE |
True |
Skip out-of-service equipment. |
AMBIGUOUS_CABLE_ACTION |
"WARN_ZERO" |
Action for ambiguous downstream cable tracing. |
COLLECTOR_GROUP_OVERLAP_ACTION |
"ERROR" |
Safe default for overlapping collector groups. |
WARN_ZERO_WEIGHT_UNIT_TF |
False |
Warn for unit transformers with no source-unit MVA. |
OUTPUT_XLSX |
"psse_plant_aggregation.xlsx" |
Output workbook name. |
There is no fixed voltage limitation in the method. Voltage thresholds are used only to classify the PSS/E topology.
Typical examples:
COLLECTOR_KV_MIN = 1.0
COLLECTOR_KV_MAX = 36.0
POWER_TF_HV_KV_MIN = 36.0COLLECTOR_KV_MIN = 1.0
COLLECTOR_KV_MAX = 40.0
POWER_TF_HV_KV_MIN = 40.0Some PSS/E plant models place source units directly at collector-voltage buses instead of explicit low-voltage generator buses. In that case, keep:
SOURCE_UNIT_KV_MAX = 100.0For models with explicit low-voltage source-unit buses, such as 0.69 kV machines, this can be tightened:
SOURCE_UNIT_KV_MAX = 1.0Recommended for most studies.
Creates one equivalent per collector leg of each downstream power transformer.
AGGREGATION_MODE = "LEG"This is the safest mode for normal plant aggregation and avoids issues with closed tie switches or ringed collector feeders.
Creates one equivalent per first feeder leaving each collector leg.
AGGREGATION_MODE = "COLLECTOR_GROUP"This mode assumes a radial collector network. If feeder groups overlap due to a closed tie, ring feeder, or meshed topology, the script stops by default:
COLLECTOR_GROUP_OVERLAP_ACTION = "ERROR"Changing this to "WARN" is not recommended for final results because plant-total rollup can become numerically unreliable when collector groups overlap.
The script exports a five-sheet Excel workbook.
Whole-plant equivalent values, tool metadata, author, version, reference method, PCC buses, and aggregation settings.
Detected downstream power transformers and their collector leg buses.
One row per aggregation result, including source-unit count, MVA, unit-transformer X equivalent, cable R/X/B, and zero-sequence equivalents.
Cable-level and unit-transformer-level calculation details for audit.
All warnings generated during the run, such as fallback machine ratings, ambiguous cable tracing, reactor-like same-voltage branches, or skipped elements.
The repository also includes a formula-based companion workbook:
plant_aggregation_formula_workbook.xlsx
This workbook is not required to run the Python automation. It is provided for:
- Transparent formula review
- Manual validation
- Understanding the aggregation method
- Cross-checking selected cases
- Demonstrating the calculation workflow without PSS/E automation
The Python script is the main automation tool. The Excel workbook is a companion and validation aid.
- Tested for PSS/E v34 and Python 2.7.
- Not yet tested on PSS/E v35+.
- The method assumes that source units and collector circuits are represented clearly enough in the PSS/E topology to support downstream tracing.
COLLECTOR_GROUPmode assumes radial feeder groups.- Zero-sequence aggregation depends on valid
RXZEROandCHARGINGZEROvalues in the PSS/E case. - Unit-transformer resistance is not aggregated; only transformer reactance is equivalenced, consistent with the referenced methodology.
- The script does not modify the PSS/E case. It only reads data and writes an Excel report.
Do not upload confidential project files, .sav cases, client-specific outputs, or study results. The repository should contain only:
- Generic script
- Generic companion workbook
- README
- LICENSE
- Optional screenshots or synthetic examples
MIT — see LICENSE.
Haider Ali
Senior Power System Engineer
Power Planners International, Lahore, Pakistan
GitHub: github.com/4haiderali
LinkedIn: linkedin.com/in/4haiderali
Current release: 1.0.0