pwrs.core.d2Imis_dVdSg#

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

Return mixed 2nd derivatives of current mismatch w.r.t. V and Sg.

Computes the cross-derivative blocks for the current balance equations with respect to the voltage variables and the real/reactive generator injections mapped to buses by Cg.

Parameters:
  • Cg (sparse matrix) – Generator connection matrix mapping generators to buses.

  • 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 outputs are returned.

Returns:

Mixed derivative matrix with the MATPOWER block layout for Pg and Qg against the selected voltage coordinates.

Return type:

scipy.sparse.csc_matrix