pwrs.core.d2Imis_dV2#

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

Return 2nd derivatives of current mismatch equations.

Computes the Hessian blocks of lam' * Imis(V, Sg) with respect to the voltage state variables. The mismatch is represented in polar or cartesian voltage coordinates according to vcart.

Parameters:
  • Sbus (array_like) – Complex bus injection vector.

  • Ybus (sparse matrix) – Bus admittance matrix.

  • V (array_like) – Complex bus voltage vector.

  • lam (array_like) – Multiplier vector for the current 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.d2Imis_dV2.d2Imis_dV2_full(Sbus, Ybus, V, lam, vcart=0)[source]#

Return all four current-mismatch Hessian blocks.

Return type:

tuple[SparseMatrix, SparseMatrix, SparseMatrix, SparseMatrix]