pwrs.core.dcpf#

pwrs.core.dcpf.dcpf(B, Pbus, Va0, ref, pv, pq)[source]#

Solve the linear DC power flow equations.

solves for the bus voltage angles at all but the reference bus, given the full system B matrix and the vector of bus real power injections, the initial vector of bus voltage angles (in radians), and column vectors with the lists of bus indices for the swing bus, PV buses, and PQ buses, respectively. Returns a vector of bus voltage angles in radians.

Parameters:
  • B (array_like or sparse matrix) – DC power flow susceptance matrix.

  • Pbus (array_like) – Real bus power injections.

  • Va0 (array_like) – Initial/reference bus voltage angles.

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

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

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

Returns:

(Va, success) with solved bus voltage angles and a convergence flag.

Return type:

tuple