Home > matpower5.0 > idx_gen.m

idx_gen

PURPOSE ^

IDX_GEN Defines constants for named column indices to gen matrix.

SYNOPSIS ^

function [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN,MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX,QC2MIN, QC2MAX, RAMP_AGC, RAMP_10, RAMP_30, RAMP_Q, APF] = idx_gen

DESCRIPTION ^

IDX_GEN   Defines constants for named column indices to gen matrix.
   Example:

   [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN, ...
   MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX, ...
   QC2MIN, QC2MAX, RAMP_AGC, RAMP_10, RAMP_30, RAMP_Q, APF] = idx_gen;

   Some examples of usage, after defining the constants using the line above,
   are:

    Pg = gen(4, PG);   % get the real power output of generator 4
    gen(:, PMIN) = 0;  % set to zero the minimum real power limit of all gens
 
   The index, name and meaning of each column of the gen matrix is given
   below:

   columns 1-21 must be included in input matrix (in case file)
    1  GEN_BUS     bus number
    2  PG          Pg, real power output (MW)
    3  QG          Qg, reactive power output (MVAr)
    4  QMAX        Qmax, maximum reactive power output (MVAr)
    5  QMIN        Qmin, minimum reactive power output (MVAr)
    6  VG          Vg, voltage magnitude setpoint (p.u.)
    7  MBASE       mBase, total MVA base of machine, defaults to baseMVA
    8  GEN_STATUS  status, > 0 - in service, <= 0 - out of service
    9  PMAX        Pmax, maximum real power output (MW)
    10 PMIN        Pmin, minimum real power output (MW)
    11 PC1         Pc1, lower real power output of PQ capability curve (MW)
    12 PC2         Pc2, upper real power output of PQ capability curve (MW)
    13 QC1MIN      Qc1min, minimum reactive power output at Pc1 (MVAr)
    14 QC1MAX      Qc1max, maximum reactive power output at Pc1 (MVAr)
    15 QC2MIN      Qc2min, minimum reactive power output at Pc2 (MVAr)
    16 QC2MAX      Qc2max, maximum reactive power output at Pc2 (MVAr)
    17 RAMP_AGC    ramp rate for load following/AGC (MW/min)
    18 RAMP_10     ramp rate for 10 minute reserves (MW)
    19 RAMP_30     ramp rate for 30 minute reserves (MW)
    20 RAMP_Q      ramp rate for reactive power (2 sec timescale) (MVAr/min)
    21 APF         area participation factor
   
   columns 22-25 are added to matrix after OPF solution
   they are typically not present in the input matrix
                   (assume OPF objective function has units, u)
    22 MU_PMAX     Kuhn-Tucker multiplier on upper Pg limit (u/MW)
    23 MU_PMIN     Kuhn-Tucker multiplier on lower Pg limit (u/MW)
    24 MU_QMAX     Kuhn-Tucker multiplier on upper Qg limit (u/MVAr)
    25 MU_QMIN     Kuhn-Tucker multiplier on lower Qg limit (u/MVAr)

   See also DEFINE_CONSTANTS.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN, ...
0002     MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX, ...
0003     QC2MIN, QC2MAX, RAMP_AGC, RAMP_10, RAMP_30, RAMP_Q, APF] = idx_gen
0004 %IDX_GEN   Defines constants for named column indices to gen matrix.
0005 %   Example:
0006 %
0007 %   [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN, ...
0008 %   MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX, ...
0009 %   QC2MIN, QC2MAX, RAMP_AGC, RAMP_10, RAMP_30, RAMP_Q, APF] = idx_gen;
0010 %
0011 %   Some examples of usage, after defining the constants using the line above,
0012 %   are:
0013 %
0014 %    Pg = gen(4, PG);   % get the real power output of generator 4
0015 %    gen(:, PMIN) = 0;  % set to zero the minimum real power limit of all gens
0016 %
0017 %   The index, name and meaning of each column of the gen matrix is given
0018 %   below:
0019 %
0020 %   columns 1-21 must be included in input matrix (in case file)
0021 %    1  GEN_BUS     bus number
0022 %    2  PG          Pg, real power output (MW)
0023 %    3  QG          Qg, reactive power output (MVAr)
0024 %    4  QMAX        Qmax, maximum reactive power output (MVAr)
0025 %    5  QMIN        Qmin, minimum reactive power output (MVAr)
0026 %    6  VG          Vg, voltage magnitude setpoint (p.u.)
0027 %    7  MBASE       mBase, total MVA base of machine, defaults to baseMVA
0028 %    8  GEN_STATUS  status, > 0 - in service, <= 0 - out of service
0029 %    9  PMAX        Pmax, maximum real power output (MW)
0030 %    10 PMIN        Pmin, minimum real power output (MW)
0031 %    11 PC1         Pc1, lower real power output of PQ capability curve (MW)
0032 %    12 PC2         Pc2, upper real power output of PQ capability curve (MW)
0033 %    13 QC1MIN      Qc1min, minimum reactive power output at Pc1 (MVAr)
0034 %    14 QC1MAX      Qc1max, maximum reactive power output at Pc1 (MVAr)
0035 %    15 QC2MIN      Qc2min, minimum reactive power output at Pc2 (MVAr)
0036 %    16 QC2MAX      Qc2max, maximum reactive power output at Pc2 (MVAr)
0037 %    17 RAMP_AGC    ramp rate for load following/AGC (MW/min)
0038 %    18 RAMP_10     ramp rate for 10 minute reserves (MW)
0039 %    19 RAMP_30     ramp rate for 30 minute reserves (MW)
0040 %    20 RAMP_Q      ramp rate for reactive power (2 sec timescale) (MVAr/min)
0041 %    21 APF         area participation factor
0042 %
0043 %   columns 22-25 are added to matrix after OPF solution
0044 %   they are typically not present in the input matrix
0045 %                   (assume OPF objective function has units, u)
0046 %    22 MU_PMAX     Kuhn-Tucker multiplier on upper Pg limit (u/MW)
0047 %    23 MU_PMIN     Kuhn-Tucker multiplier on lower Pg limit (u/MW)
0048 %    24 MU_QMAX     Kuhn-Tucker multiplier on upper Qg limit (u/MVAr)
0049 %    25 MU_QMIN     Kuhn-Tucker multiplier on lower Qg limit (u/MVAr)
0050 %
0051 %   See also DEFINE_CONSTANTS.
0052 
0053 %   MATPOWER
0054 %   $Id: idx_gen.m 1635 2010-04-26 19:45:26Z ray $
0055 %   by Ray Zimmerman, PSERC Cornell
0056 %   Copyright (c) 1996-2010 by Power System Engineering Research Center (PSERC)
0057 %
0058 %   This file is part of MATPOWER.
0059 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0060 %
0061 %   MATPOWER is free software: you can redistribute it and/or modify
0062 %   it under the terms of the GNU General Public License as published
0063 %   by the Free Software Foundation, either version 3 of the License,
0064 %   or (at your option) any later version.
0065 %
0066 %   MATPOWER is distributed in the hope that it will be useful,
0067 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0068 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0069 %   GNU General Public License for more details.
0070 %
0071 %   You should have received a copy of the GNU General Public License
0072 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0073 %
0074 %   Additional permission under GNU GPL version 3 section 7
0075 %
0076 %   If you modify MATPOWER, or any covered work, to interface with
0077 %   other modules (such as MATLAB code and MEX-files) available in a
0078 %   MATLAB(R) or comparable environment containing parts covered
0079 %   under other licensing terms, the licensors of MATPOWER grant
0080 %   you additional permission to convey the resulting work.
0081 
0082 %% define the indices
0083 GEN_BUS     = 1;    %% bus number
0084 PG          = 2;    %% Pg, real power output (MW)
0085 QG          = 3;    %% Qg, reactive power output (MVAr)
0086 QMAX        = 4;    %% Qmax, maximum reactive power output at Pmin (MVAr)
0087 QMIN        = 5;    %% Qmin, minimum reactive power output at Pmin (MVAr)
0088 VG          = 6;    %% Vg, voltage magnitude setpoint (p.u.)
0089 MBASE       = 7;    %% mBase, total MVA base of this machine, defaults to baseMVA
0090 GEN_STATUS  = 8;    %% status, 1 - machine in service, 0 - machine out of service
0091 PMAX        = 9;    %% Pmax, maximum real power output (MW)
0092 PMIN        = 10;   %% Pmin, minimum real power output (MW)
0093 PC1         = 11;   %% Pc1, lower real power output of PQ capability curve (MW)
0094 PC2         = 12;   %% Pc2, upper real power output of PQ capability curve (MW)
0095 QC1MIN      = 13;   %% Qc1min, minimum reactive power output at Pc1 (MVAr)
0096 QC1MAX      = 14;   %% Qc1max, maximum reactive power output at Pc1 (MVAr)
0097 QC2MIN      = 15;   %% Qc2min, minimum reactive power output at Pc2 (MVAr)
0098 QC2MAX      = 16;   %% Qc2max, maximum reactive power output at Pc2 (MVAr)
0099 RAMP_AGC    = 17;   %% ramp rate for load following/AGC (MW/min)
0100 RAMP_10     = 18;   %% ramp rate for 10 minute reserves (MW)
0101 RAMP_30     = 19;   %% ramp rate for 30 minute reserves (MW)
0102 RAMP_Q      = 20;   %% ramp rate for reactive power (2 sec timescale) (MVAr/min)
0103 APF         = 21;   %% area participation factor
0104 
0105 %% included in opf solution, not necessarily in input
0106 %% assume objective function has units, u
0107 MU_PMAX     = 22;   %% Kuhn-Tucker multiplier on upper Pg limit (u/MW)
0108 MU_PMIN     = 23;   %% Kuhn-Tucker multiplier on lower Pg limit (u/MW)
0109 MU_QMAX     = 24;   %% Kuhn-Tucker multiplier on upper Qg limit (u/MVAr)
0110 MU_QMIN     = 25;   %% Kuhn-Tucker multiplier on lower Qg limit (u/MVAr)
0111 
0112 %% Note: When a generator's PQ capability curve is not simply a box and the
0113 %% upper Qg limit is binding, the multiplier on this constraint is split into
0114 %% it's P and Q components and combined with the appropriate MU_Pxxx and
0115 %% MU_Qxxx values. Likewise for the lower Q limits.

Generated on Mon 26-Jan-2015 15:21:31 by m2html © 2005