zgausspf

zgausspf(Ybus, Sbus, V0, ref, pv, pq, Bpp, mpopt)

zgausspf() - Solves the power flow using an Implicit Z-bus Gauss method.

[V, CONVERGED, I] = ZGAUSSPF(YBUS, SBUS, V0, REF, PV, PQ, BPP, MPOPT)
solves for bus voltages given the full system admittance matrix (for
all buses), the complex bus power injection vector (all buses),
the initial vector of complex bus voltages, column vectors with the
lists of bus indices for the swing bus, PV buses, and PQ buses,
respectively, and the fast-decoupled B double-prime matrix (all buses)
for Q updates at PV buses. The bus voltage vector contains the set point
for generator (including ref bus) buses, and the reference angle of the
swing bus, as well as an initial guess for remaining magnitudes and
angles. MPOPT is a MATPOWER options struct which can be used to
set the termination tolerance, maximum number of iterations, and
output options (see MPOPTION for details). Uses default options
if this parameter is not given. Returns the final complex voltages,
a flag which indicates whether it converged or not, and the number
of iterations performed.

NOTE: This method does not scale well with the number of generators
    and seems to have serious problems with some systems with many
    PV buses.

See also runpf().