Engineering
ac-branch-pi-model avatar

ac-branch-pi-model

Computes AC branch power flow equations using MATPOWER branch data, supporting transformer tap ratios, phase shifts, MVA limits, and bus injection aggregation for nodal balance.

Introduction

This skill provides a robust implementation of AC power flow equations based on the pi-model, specifically designed for engineers and researchers working with power grid simulations. It utilizes the standard MATPOWER branch data format, including parameters such as F_BUS, T_BUS, resistance (BR_R), reactance (BR_X), line charging (BR_B), transformer tap ratios (TAP), and phase shifts (SHIFT). The skill is essential for calculating real (P) and reactive (Q) power flows in both directions across branches, ensuring accuracy in nodal balance calculations by aggregating bus injections.

  • Computes per-unit P and Q flows for AC power system networks using precise pi-model mathematical formulations.

  • Handles transformer modeling by incorporating real-valued tap ratios and complex-to-real phase shift conversions, ensuring compatibility with standard power flow solvers.

  • Facilitates MVA limit checking against RATE_A constraints and provides branch loading percentage calculations for identifying system bottlenecks.

  • Enables systematic conversion between power in MW/MVAr and per-unit values using baseMVA normalization.

  • Provides a direct Python implementation interface via scripts/branch_flows.py to facilitate seamless integration into larger power flow analytical pipelines.

  • Operates strictly on standard MATPOWER branch structures, ensuring plug-and-play capability for existing grid datasets.

  • Ensure input data includes valid voltage magnitudes and angles for the specific network state being analyzed.

  • For transformers, verify that the SHIFT parameter is converted to radians correctly before processing through the branch equations.

  • The tool ignores line charging (BR_B) if the branch status is set to zero or if the series impedance is effectively zero to avoid computational artifacts.

  • Always validate total network nodal balance by summing branch flows at each bus; the output P_out and Q_out should align with generation and demand differences.

  • This utility is strictly for steady-state AC power flow analysis and does not account for transient dynamics or switching phenomena.

Repository Stats

Stars
1,084
Forks
271
Open Issues
38
Language
PDDL
Default Branch
main
Sync Status
Idle
Last Synced
Apr 30, 2026, 11:09 AM
View on GitHub