pwrs.core.fdpf#

pwrs.core.fdpf.fdpf(Ybus, Sbus, V0, Bp, Bpp, ref, pv, pq, mpopt=None)[source]#

Solve an AC power flow using the fast-decoupled method.

Mirrors MATPOWER’s fdpf solver by alternating voltage-angle and voltage-magnitude updates using the reduced Bp and Bpp matrices until the power mismatch satisfies the configured tolerance.

Parameters:
  • Ybus (array_like or sparse matrix) – Bus admittance matrix.

  • Sbus (callable) – Callable returning complex bus injections for a given voltage magnitude vector.

  • V0 (array_like) – Initial complex bus voltage vector.

  • Bp (array_like or sparse matrix) – Fast-decoupled Jacobian approximation for active-power updates.

  • Bpp (array_like or sparse matrix) – Fast-decoupled Jacobian approximation for reactive-power updates.

  • ref (array_like) – One-based reference bus indices.

  • pv (array_like) – One-based PV bus indices.

  • pq (array_like) – One-based PQ bus indices.

  • mpopt (dict, optional) – MATPOWER options struct.

Returns:

(V, converged, iterations).

Return type:

tuple