ac-branch-pi-model

Compute AC branch power-flow with Pi-model and transformer effects.

Updated Jan 15, 2026
One-click install
npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill ac-branch-pi-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ac-branch-pi-model
Source: https://github.com/KaiserWhoLearns/skillsbench/tree/main/tasks/energy-ac-optimal-power-flow/environment/skills/ac-branch-pi-model
Command: npx skills add https://github.com/KaiserWhoLearns/skillsbench --skill ac-branch-pi-model

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) components.

What problem does it solve?

This skill provides exact branch power-flow equations for AC networks (Pi-model) including transformer tap ratio and phase shift, enabling precise P/Q and |S| calculations for line i-j and j-i directions within MATPOWER-like data.

Core Features & Use Cases

  • Exact branch power-flow computation for AC networks using Pi-model with line charging and transformer effects.
  • Bidirectional flow analysis to assess loading and nodal balance across a branch.
  • Verification and debugging of branch calculations against MATPOWER-style data for model validation.

Quick Start

Run scripts/branch_flows.py with your network data to compute P_ij, Q_ij, P_ji, and Q_ji.

Frequently Asked Questions about ac-branch-pi-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate AC branch power flow with transformer tap and phase shift?

AC branch power flow with transformer tap and phase shift is computed using the Pi-model to calculate bidirectional P/Q values. This approach applies per-unit conventions to handle series impedance and line charging for accurate network loading evaluation.

How do I verify nodal balance and branch loading in MATPOWER-like datasets?

Nodal balance and branch loading in MATPOWER-like datasets are verified by computing bidirectional P_ij, Q_ij, P_ji, and Q_ji flows. This Pi-model calculation supports per-unit conventions and transformer effects to debug and validate power-system analysis tasks.

What is the Pi-model used for in AC power flow analysis?

The Pi-model in AC power flow analysis is used to compute exact branch power flows by accounting for line charging and transformer tap ratios. It enables precise P/Q and |S| calculations for both line directions to evaluate branch loading.

Does this AC branch flow calculation support per-unit conventions and line charging?

Yes, this AC branch flow calculation supports per-unit conventions, transformer tap/shift handling, and series/line charging calculations. These features ensure reliable P/Q and |S| results when applied to MATPOWER-style network data.

Why are my AC branch flow calculations mismatching MATPOWER-style data?

AC branch flow calculations mismatch MATPOWER-style data when transformer tap ratios, phase shifts, or line charging effects are not properly included. Applying the exact Pi-model equations ensures precise bidirectional P/Q computation and resolves nodal balance discrepancies.

Can I use numpy to compute bidirectional P and Q for AC networks?

Yes, you can use numpy to compute bidirectional P and Q for AC networks by running the Pi-model branch flow scripts. This handles transformer tap/shift effects and line charging to produce accurate branch loading and nodal balance results.