Home > matpower5.1 > 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 %   Copyright (c) 1996-2015 by Power System Engineering Research Center (PSERC)
0055 %   by Ray Zimmerman, PSERC Cornell
0056 %
0057 %   $Id: idx_gen.m 2644 2015-03-11 19:34:22Z ray $
0058 %
0059 %   This file is part of MATPOWER.
0060 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0061 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0062 
0063 %% define the indices
0064 GEN_BUS     = 1;    %% bus number
0065 PG          = 2;    %% Pg, real power output (MW)
0066 QG          = 3;    %% Qg, reactive power output (MVAr)
0067 QMAX        = 4;    %% Qmax, maximum reactive power output at Pmin (MVAr)
0068 QMIN        = 5;    %% Qmin, minimum reactive power output at Pmin (MVAr)
0069 VG          = 6;    %% Vg, voltage magnitude setpoint (p.u.)
0070 MBASE       = 7;    %% mBase, total MVA base of this machine, defaults to baseMVA
0071 GEN_STATUS  = 8;    %% status, 1 - machine in service, 0 - machine out of service
0072 PMAX        = 9;    %% Pmax, maximum real power output (MW)
0073 PMIN        = 10;   %% Pmin, minimum real power output (MW)
0074 PC1         = 11;   %% Pc1, lower real power output of PQ capability curve (MW)
0075 PC2         = 12;   %% Pc2, upper real power output of PQ capability curve (MW)
0076 QC1MIN      = 13;   %% Qc1min, minimum reactive power output at Pc1 (MVAr)
0077 QC1MAX      = 14;   %% Qc1max, maximum reactive power output at Pc1 (MVAr)
0078 QC2MIN      = 15;   %% Qc2min, minimum reactive power output at Pc2 (MVAr)
0079 QC2MAX      = 16;   %% Qc2max, maximum reactive power output at Pc2 (MVAr)
0080 RAMP_AGC    = 17;   %% ramp rate for load following/AGC (MW/min)
0081 RAMP_10     = 18;   %% ramp rate for 10 minute reserves (MW)
0082 RAMP_30     = 19;   %% ramp rate for 30 minute reserves (MW)
0083 RAMP_Q      = 20;   %% ramp rate for reactive power (2 sec timescale) (MVAr/min)
0084 APF         = 21;   %% area participation factor
0085 
0086 %% included in opf solution, not necessarily in input
0087 %% assume objective function has units, u
0088 MU_PMAX     = 22;   %% Kuhn-Tucker multiplier on upper Pg limit (u/MW)
0089 MU_PMIN     = 23;   %% Kuhn-Tucker multiplier on lower Pg limit (u/MW)
0090 MU_QMAX     = 24;   %% Kuhn-Tucker multiplier on upper Qg limit (u/MVAr)
0091 MU_QMIN     = 25;   %% Kuhn-Tucker multiplier on lower Qg limit (u/MVAr)
0092 
0093 %% Note: When a generator's PQ capability curve is not simply a box and the
0094 %% upper Qg limit is binding, the multiplier on this constraint is split into
0095 %% it's P and Q components and combined with the appropriate MU_Pxxx and
0096 %% MU_Qxxx values. Likewise for the lower Q limits.

Generated on Fri 20-Mar-2015 18:23:34 by m2html © 2005