9.5 Forming Standard Power Systems Matrices

9.5.1 makeB

  [Bp, Bpp] = makeB(mpc, alg)
  [Bp, Bpp] = makeB(baseMVA, bus, branch, alg)

The makeB function builds the two matrices B ′ and B ′′ used in the fast-decoupled power flow. The alg, which can take values 'FDXB' or 'FDBX', determines whether the matrices returned correspond to the XB or BX version of the fast-decoupled power flow. Bus numbers must be consecutive beginning at 1 (i.e. internal ordering).

9.5.2 makeBdc

  [Bbus, Bf, Pbusinj, Pfinj] = makeBdc(mpc)
  [Bbus, Bf, Pbusinj, Pfinj] = makeBdc(baseMVA, bus, branch)

The function builds the B  matrices, Bdc  (Bbus) and Bf  (Bf), and phase shift injections, Pdc  (Pbusinj) and Pf,shift   (Pfinj), for the DC power flow model as described in (3.29) and (4.15). Bus numbers must be consecutive beginning at 1 (i.e. internal ordering).

9.5.3 makeJac

  J = makeJac(mpc)
  J = makeJac(mpc, fullJac)
  [J, Ybus, Yf, Yt] = makejac(mpc)

The makeJac function forms the power flow Jacobian and, optionally, the system admittance matrices. Bus numbers in the input case must be consecutive beginning at 1 (i.e. internal indexing). If the fullJac argument is present and true, it returns the full Jacobian (sensitivities of all bus injections with respect to all voltage angles and magnitudes) as opposed to the reduced version used in the Newton power flow updates.

9.5.4 makeLODF

  PTDF = makePTDF(mpc)
  LODF = makeLODF(mpc.branch, PTDF)

The makeLODF function forms the DC line outage distribution factor matrix for a given PTDF. The matrix is nbr × nbr  , where nbr  is the number of branches. See Section 4.5 on Linear Shift Factors for more details.

9.5.5 makePTDF

  H = makePTDF(mpc)
  H = makePTDF(mpc, slack)
  H = makePTDF(baseMVA, bus, branch)
  H = makePTDF(baseMVA, bus, branch, slack)

The makePTDF function returns the DC PTDF matrix for a given choice of slack. The matrix is nbr × nb  , where nbr  is the number of branches and nb  is the number of buses. The slack can be a scalar (single slack bus) or an nb × 1  column vector of weights specifying the proportion of the slack taken up at each bus. If the slack is not specified, the reference bus is used by default. Bus numbers must be consecutive beginning at 1 (i.e. internal ordering). See Section 4.5 on Linear Shift Factors for more details.

9.5.6 makeYbus

  [Ybus, Yf, Yt] = makeYbus(mpc)
  [Ybus, Yf, Yt] = makeYbus(baseMVA, bus, branch)

The makeYbus function builds the bus admittance matrix and branch admittance matrices from (3.11)–(3.13). Bus numbers in the input case must be consecutive beginning at 1 (i.e. internal indexing).