pwrs.core.cpf_corrector#

pwrs.core.cpf_corrector.cpf_corrector(Ybus, Sbusb, V_hat, ref, pv, pq, lam_hat, Sbust, Vprv, lamprv, z, step, parameterization, mpopt=None)[source]#

Solve the corrector step of a continuation power flow.

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

  • Sbusb (callable) – Callables returning base and target complex injections in per unit and, optionally, their derivatives with respect to voltage magnitude.

  • Sbust (callable) – Callables returning base and target complex injections in per unit and, optionally, their derivatives with respect to voltage magnitude.

  • V_hat (array_like) – Predicted complex bus voltage vector.

  • ref (array_like) – REF, PV, and PQ bus index vectors.

  • pv (array_like) – REF, PV, and PQ bus index vectors.

  • pq (array_like) – REF, PV, and PQ bus index vectors.

  • lam_hat (float) – Predicted continuation parameter.

  • Vprv (array_like) – Previous complex bus voltage vector.

  • lamprv (float) – Previous continuation parameter value.

  • z (array_like) – Normalized tangent prediction vector.

  • step (float) – Continuation step size.

  • parameterization (int) – CPF parameterization mode.

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

Returns:

(V, converged, i, lam) containing the corrected voltage vector, convergence flag, Newton iteration count, and continuation parameter.

Return type:

tuple