cpf_tangent

cpf_tangent(V, lam, Ybus, Sbusb, Sbust, pv, pq, zprv, Vprv, lamprv, parameterization, direction)

cpf_tangent() - Computes normalized tangent predictor for continuation power flow.

Z = CPF_TANGENT(V, LAM, YBUS, SBUSB, SBUST, PV, PQ, ...
                              ZPRV, VPRV, LAMPRV, PARAMETERIZATION, DIRECTION)

Computes a normalized tangent predictor for the continuation power flow.

Inputs:
    V : complex bus voltage vector at current solution
    LAM : scalar lambda value at current solution
    YBUS : complex bus admittance matrix
    SBUSB : handle of function returning nb x 1 vector of complex
            base case injections in p.u. and derivatives w.r.t. |V|
    SBUST : handle of function returning nb x 1 vector of complex
            target case injections in p.u. and derivatives w.r.t. |V|
    PV : vector of indices of PV buses
    PQ : vector of indices of PQ buses
    ZPRV : normalized tangent prediction vector from previous step
    VPRV : complex bus voltage vector at previous solution
    LAMPRV : scalar lambda value at previous solution
    PARAMETERIZATION : value of cpf.parameterization option.
    DIRECTION: continuation direction (+1 for postive lambda
               increase, -1 otherwise)

Outputs:
    Z : the normalized tangent prediction vector