makeSbus

makeSbus(baseMVA, bus, gen, mpopt, Vm, Sg)

makeSbus() - Builds the vector of complex bus power injections.

SBUS = MAKESBUS(BASEMVA, BUS, GEN)
SBUS = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM)
SBUS = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM, SG)
returns the vector of complex bus power injections, that is, generation
minus load. Power is expressed in per unit. If the MPOPT and VM arguments
are present it evaluates any ZIP loads based on the provided voltage
magnitude vector. If VM is empty, it assumes nominal voltage. If SG is
provided, it is a complex ng x 1 vector of generator power injections in
p.u., and overrides the PG and QG columns in GEN, using GEN only for
connectivity information.

[SBUS, DSBUS_DVM] = MAKESBUS(BASEMVA, BUS, GEN, MPOPT, VM)
With two output arguments, it computes the partial derivative of the
bus injections with respect to voltage magnitude, leaving the first
return value SBUS empty. If VM is empty, it assumes no voltage dependence
and returns a sparse zero matrix.

See also makeYbus().