Home > matpower7.1 > lib > opf_veq_hess.m

opf_veq_hess

PURPOSE ^

OPF_VEQ_HESS Evaluates Hessian of voltage magnitude equality constraint.

SYNOPSIS ^

function d2Veq = opf_veq_hess(x, lambda, mpc, idx, mpopt)

DESCRIPTION ^

OPF_VEQ_HESS  Evaluates Hessian of voltage magnitude equality constraint.
   D2VEQ = OPF_VEQ_HESS(X, LAMBDA, MPC, IDX, MPOPT)

   Hessian evaluation function for voltage magnitudes.

   Inputs:
     X : optimization vector
     LAMBDA : column vector of Lagrange multipliers on active and reactive
              power balance constraints
     MPC : MATPOWER case struct
     IDX : index of buses whose voltage magnitudes should be fixed
     MPOPT : MATPOWER options struct

   Outputs:
     D2VEQ : Hessian of voltage magnitudes.

   Example:
       d2Veq = opf_veq_hess(x, lambda, mpc, idx, mpopt);

   See also OPF_VEQ_FCN.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function d2Veq = opf_veq_hess(x, lambda, mpc, idx, mpopt)
0002 %OPF_VEQ_HESS  Evaluates Hessian of voltage magnitude equality constraint.
0003 %   D2VEQ = OPF_VEQ_HESS(X, LAMBDA, MPC, IDX, MPOPT)
0004 %
0005 %   Hessian evaluation function for voltage magnitudes.
0006 %
0007 %   Inputs:
0008 %     X : optimization vector
0009 %     LAMBDA : column vector of Lagrange multipliers on active and reactive
0010 %              power balance constraints
0011 %     MPC : MATPOWER case struct
0012 %     IDX : index of buses whose voltage magnitudes should be fixed
0013 %     MPOPT : MATPOWER options struct
0014 %
0015 %   Outputs:
0016 %     D2VEQ : Hessian of voltage magnitudes.
0017 %
0018 %   Example:
0019 %       d2Veq = opf_veq_hess(x, lambda, mpc, idx, mpopt);
0020 %
0021 %   See also OPF_VEQ_FCN.
0022 
0023 %   MATPOWER
0024 %   Copyright (c) 2018, Power Systems Engineering Research Center (PSERC)
0025 %   by Ray Zimmerman, PSERC Cornell
0026 %   and Baljinnyam Sereeter, Delft University of Technology
0027 %
0028 %   This file is part of MATPOWER.
0029 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0030 %   See https://matpower.org for more info.
0031 
0032 %% unpack data
0033 [Vr, Vi] = deal(x{:});
0034 
0035 %% problem dimensions
0036 nb = length(Vi);            %% number of buses
0037 n = length(idx);            %% number of buses with fixed voltage magnitudes
0038 
0039 %%----- evaluate Hessian of voltage magnitude constraints -----
0040 dlam = sparse(idx, idx, 2*lambda, nb, nb);
0041 zz = sparse(nb, nb);
0042 
0043 %% construct Hessian
0044 d2Veq =  [dlam zz; zz dlam];

Generated on Fri 09-Oct-2020 11:21:31 by m2html © 2005