Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PSS/E Disaggregated Plant Aggregation

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.


Repository Contents

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.

Method

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.

Collector Cable Series Impedance

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_i is the total downstream source-unit MVA behind cable segment i
  • Z_i is the cable segment impedance
  • P_total is the total source-unit MVA in the aggregation group

This is applied to:

R, X, R0, X0

Cable Shunt Charging

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 / GSU Reactance

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.

Whole-Plant Rollup

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.


Features

  • 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 leg
    • COLLECTOR_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 ERROR as the safe default
  • Structured Excel output with Summary, Power Transformers, Aggregates, Details, and Warnings sheets
  • Metadata included in the output workbook for traceability

Requirements

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 xlsxwriter

Example PSS/E Python paths:

C:\Program Files (x86)\PTI\PSSE34\PSSPY27
C:\Program Files\PTI\PSSE34\PSSPY27

Usage

  1. Place psse_plant_aggregation.py in the same folder as your PSS/E .sav case.

  2. Open the script and edit the USER SETTINGS section.

    At minimum, define your PCC bus or buses:

    PCC_BUSES = [700001, 700002]
  3. Confirm the PSS/E installation path:

    PSSE_PATH = r"C:\Program Files (x86)\PTI\PSSE34\PSSPY27"
  4. 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
  5. 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.

  6. The output workbook is written to:

    psse_plant_aggregation.xlsx
    

Important Settings

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.

Voltage Classification Notes

There is no fixed voltage limitation in the method. Voltage thresholds are used only to classify the PSS/E topology.

Typical examples:

33 kV Collector System

COLLECTOR_KV_MIN = 1.0
COLLECTOR_KV_MAX = 36.0
POWER_TF_HV_KV_MIN = 36.0

34.5 kV Collector System

COLLECTOR_KV_MIN = 1.0
COLLECTOR_KV_MAX = 40.0
POWER_TF_HV_KV_MIN = 40.0

Machines Modelled at Collector Voltage

Some 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.0

For models with explicit low-voltage source-unit buses, such as 0.69 kV machines, this can be tightened:

SOURCE_UNIT_KV_MAX = 1.0

Aggregation Modes

LEG Mode

Recommended 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.

COLLECTOR_GROUP Mode

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.


Output Workbook

The script exports a five-sheet Excel workbook.

Summary

Whole-plant equivalent values, tool metadata, author, version, reference method, PCC buses, and aggregation settings.

Power Transformers

Detected downstream power transformers and their collector leg buses.

Aggregates

One row per aggregation result, including source-unit count, MVA, unit-transformer X equivalent, cable R/X/B, and zero-sequence equivalents.

Details

Cable-level and unit-transformer-level calculation details for audit.

Warnings

All warnings generated during the run, such as fallback machine ratings, ambiguous cable tracing, reactor-like same-voltage branches, or skipped elements.


Companion Excel Workbook

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.


Limitations

  • 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_GROUP mode assumes radial feeder groups.
  • Zero-sequence aggregation depends on valid RXZERO and CHARGINGZERO values 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.

Recommended Public-Repo Practice

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

License

MIT — see LICENSE.


Author

Haider Ali
Senior Power System Engineer
Power Planners International, Lahore, Pakistan

GitHub: github.com/4haiderali
LinkedIn: linkedin.com/in/4haiderali


Version

Current release: 1.0.0

About

PCC-driven P²Z collector system aggregation for disaggregated plants in PSS/E (wind, solar, BESS, hybrid)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages