pwrs.core.makeSbus#
- pwrs.core.makeSbus.makeSbus_dV(baseMVA, bus, gen, mpopt=None, Vm=None)[source]#
Return
(empty, dSbus_dVm)with explicit Python semantics.- Parameters:
baseMVA (float)
bus (FloatArray)
gen (FloatArray)
mpopt (MatpowerConfig | None)
Vm (ArrayLike | None)
- Return type:
tuple[FloatArray, SparseMatrix]
- pwrs.core.makeSbus.makeSbus_value_dV(baseMVA, bus, gen, mpopt=None, Vm=None, Sg=None)[source]#
Return power injections together with the ZIP-load voltage derivative.
- Parameters:
baseMVA (float)
bus (FloatArray)
gen (FloatArray)
mpopt (MatpowerConfig | None)
Vm (ArrayLike | None)
Sg (ArrayLike | None)
- Return type:
tuple[ComplexArray, SparseMatrix]
- pwrs.core.makeSbus.makeSbus_value(baseMVA, bus, gen, mpopt=None, Vm=None, Sg=None)[source]#
Return the complex bus injection vector with explicit Python semantics.
- Parameters:
baseMVA (float)
bus (FloatArray)
gen (FloatArray)
mpopt (MatpowerConfig | None)
Vm (ArrayLike | None)
Sg (ArrayLike | None)
- Return type:
ComplexArray
- pwrs.core.makeSbus.makeSbus(baseMVA, bus, gen, mpopt=None, Vm=None, Sg=None, nargout=None)[source]#
Build the vector of complex bus power injections.
- Parameters:
baseMVA (float) – System base MVA.
bus (array_like) – MATPOWER bus matrix.
gen (array_like) – MATPOWER generator matrix.
mpopt (dict, optional) – MATPOWER options dict. When provided together with
Vm, ZIP loads are evaluated using the configured system-wide ZIP coefficients.Vm (array_like, optional) – Bus voltage magnitudes used to evaluate voltage-dependent ZIP loads. If omitted or empty, nominal voltage is assumed.
Sg (array_like, optional) – Complex generator injections in per unit. When provided, these values override the
PG/QGcolumns ingenandgenis used only for connectivity.nargout (int, optional) – MATLAB-compatibility output selector. If
nargout == 2, the first return value is an empty array and the second isdSbus_dVm.
- Returns:
With the default single-output form, returns the complex bus injection vector in per unit, i.e. generation minus load. With
nargout == 2, returns(empty, dSbus_dVm)wheredSbus_dVmis the partial derivative of bus injections with respect to voltage magnitude.- Return type:
numpy.ndarray or tuple
See also
makeYbus,makeSdzip