opf_vref_fcn

opf_vref_fcn(x, mpc, refs, mpopt)

opf_vref_fcn() - Evaluates voltage angle reference and their gradients.

[Vref, dVref] = OPF_VREF_FCN(X, mpc, ref, MPOPT)

Computes the voltage angle reference using real and imaginary part of complex voltage for
AC optimal power flow. Computes constraint vectors and their gradients.

Inputs:
  X : optimization vector
  MPC : MATPOWER case struct
  REFS : reference vector
  MPOPT : MATPOWER options struct

Outputs:
  VREF  : vector of voltage angle reference
  DVREF : (optional) angle reference gradients

Examples:
    Vref = opf_vref_fcn(x, mpc, refs, mpopt);
    [Vref, dVref] = opf_vref_fcn(x, mpc, refs, mpopt);

See also opf_vref_hess().