pwrs.core.d2Sbus_dV2#

pwrs.core.d2Sbus_dV2.d2Sbus_dV2(Ybus, V, lam, vcart=0, nargout=1)[source]#

Return 2nd derivatives of the power balance equations.

Computes the Hessian blocks of lam' * Sbus(V) with respect to the voltage state variables. The coordinate representation follows MATPOWER: polar when vcart is false and cartesian when vcart is true.

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

  • V (array_like) – Complex bus voltage vector.

  • lam (array_like) – Multiplier vector for the bus power balance equations.

  • vcart (int or bool, optional) – Voltage coordinate flag. Use polar coordinates when false and cartesian coordinates when true.

  • nargout (int, optional) – MATLAB compatibility flag controlling how many Hessian blocks are returned.

Returns:

Hessian blocks (G11, G12, G21, G22) for the selected voltage coordinate system, or just G11 when nargout == 1.

Return type:

scipy.sparse.csc_matrix or tuple of scipy.sparse.csc_matrix

pwrs.core.d2Sbus_dV2.d2Sbus_dV2_full(Ybus, V, lam, vcart=0)[source]#

Return all four power-mismatch Hessian blocks.