Home > matpower4.1 > idx_bus.m

idx_bus

PURPOSE ^

IDX_BUS Defines constants for named column indices to bus matrix.

SYNOPSIS ^

function [PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM,VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus

DESCRIPTION ^

IDX_BUS   Defines constants for named column indices to bus matrix.
   Example:

   [PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...
   VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus;

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

    Pd = bus(4, PD);       % get the real power demand at bus 4
    bus(:, VMIN) = 0.95;   % set the min voltage magnitude to 0.95 at all buses
 
   The index, name and meaning of each column of the bus matrix is given
   below:

   columns 1-13 must be included in input matrix (in case file)
    1  BUS_I       bus number (positive integer)
    2  BUS_TYPE    bus type (1 = PQ, 2 = PV, 3 = ref, 4 = isolated)
    3  PD          Pd, real power demand (MW)
    4  QD          Qd, reactive power demand (MVAr)
    5  GS          Gs, shunt conductance (MW demanded at V = 1.0 p.u.)
    6  BS          Bs, shunt susceptance (MVAr injected at V = 1.0 p.u.)
    7  BUS_AREA    area number, (positive integer)
    8  VM          Vm, voltage magnitude (p.u.)
    9  VA          Va, voltage angle (degrees)
    10 BASE_KV     baseKV, base voltage (kV)
    11 ZONE        zone, loss zone (positive integer)
    12 VMAX        maxVm, maximum voltage magnitude (p.u.)
    13 VMIN        minVm, minimum voltage magnitude (p.u.)
   
   columns 14-17 are added to matrix after OPF solution
   they are typically not present in the input matrix
                   (assume OPF objective function has units, u)
    14 LAM_P       Lagrange multiplier on real power mismatch (u/MW)
    15 LAM_Q       Lagrange multiplier on reactive power mismatch (u/MVAr)
    16 MU_VMAX     Kuhn-Tucker multiplier on upper voltage limit (u/p.u.)
    17 MU_VMIN     Kuhn-Tucker multiplier on lower voltage limit (u/p.u.)
 
   additional constants, used to assign/compare values in the BUS_TYPE column
    1  PQ    PQ bus
    2  PV    PV bus
    3  REF   reference bus
    4  NONE  isolated bus

   See also DEFINE_CONSTANTS.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...
0002     VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus
0003 %IDX_BUS   Defines constants for named column indices to bus matrix.
0004 %   Example:
0005 %
0006 %   [PQ, PV, REF, NONE, BUS_I, BUS_TYPE, PD, QD, GS, BS, BUS_AREA, VM, ...
0007 %   VA, BASE_KV, ZONE, VMAX, VMIN, LAM_P, LAM_Q, MU_VMAX, MU_VMIN] = idx_bus;
0008 %
0009 %   Some examples of usage, after defining the constants using the line above,
0010 %   are:
0011 %
0012 %    Pd = bus(4, PD);       % get the real power demand at bus 4
0013 %    bus(:, VMIN) = 0.95;   % set the min voltage magnitude to 0.95 at all buses
0014 %
0015 %   The index, name and meaning of each column of the bus matrix is given
0016 %   below:
0017 %
0018 %   columns 1-13 must be included in input matrix (in case file)
0019 %    1  BUS_I       bus number (positive integer)
0020 %    2  BUS_TYPE    bus type (1 = PQ, 2 = PV, 3 = ref, 4 = isolated)
0021 %    3  PD          Pd, real power demand (MW)
0022 %    4  QD          Qd, reactive power demand (MVAr)
0023 %    5  GS          Gs, shunt conductance (MW demanded at V = 1.0 p.u.)
0024 %    6  BS          Bs, shunt susceptance (MVAr injected at V = 1.0 p.u.)
0025 %    7  BUS_AREA    area number, (positive integer)
0026 %    8  VM          Vm, voltage magnitude (p.u.)
0027 %    9  VA          Va, voltage angle (degrees)
0028 %    10 BASE_KV     baseKV, base voltage (kV)
0029 %    11 ZONE        zone, loss zone (positive integer)
0030 %    12 VMAX        maxVm, maximum voltage magnitude (p.u.)
0031 %    13 VMIN        minVm, minimum voltage magnitude (p.u.)
0032 %
0033 %   columns 14-17 are added to matrix after OPF solution
0034 %   they are typically not present in the input matrix
0035 %                   (assume OPF objective function has units, u)
0036 %    14 LAM_P       Lagrange multiplier on real power mismatch (u/MW)
0037 %    15 LAM_Q       Lagrange multiplier on reactive power mismatch (u/MVAr)
0038 %    16 MU_VMAX     Kuhn-Tucker multiplier on upper voltage limit (u/p.u.)
0039 %    17 MU_VMIN     Kuhn-Tucker multiplier on lower voltage limit (u/p.u.)
0040 %
0041 %   additional constants, used to assign/compare values in the BUS_TYPE column
0042 %    1  PQ    PQ bus
0043 %    2  PV    PV bus
0044 %    3  REF   reference bus
0045 %    4  NONE  isolated bus
0046 %
0047 %   See also DEFINE_CONSTANTS.
0048 
0049 %   MATPOWER
0050 %   $Id: idx_bus.m,v 1.10 2010/04/26 19:45:25 ray Exp $
0051 %   by Ray Zimmerman, PSERC Cornell
0052 %   Copyright (c) 1996-2010 by Power System Engineering Research Center (PSERC)
0053 %
0054 %   This file is part of MATPOWER.
0055 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0056 %
0057 %   MATPOWER is free software: you can redistribute it and/or modify
0058 %   it under the terms of the GNU General Public License as published
0059 %   by the Free Software Foundation, either version 3 of the License,
0060 %   or (at your option) any later version.
0061 %
0062 %   MATPOWER is distributed in the hope that it will be useful,
0063 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
0064 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0065 %   GNU General Public License for more details.
0066 %
0067 %   You should have received a copy of the GNU General Public License
0068 %   along with MATPOWER. If not, see <http://www.gnu.org/licenses/>.
0069 %
0070 %   Additional permission under GNU GPL version 3 section 7
0071 %
0072 %   If you modify MATPOWER, or any covered work, to interface with
0073 %   other modules (such as MATLAB code and MEX-files) available in a
0074 %   MATLAB(R) or comparable environment containing parts covered
0075 %   under other licensing terms, the licensors of MATPOWER grant
0076 %   you additional permission to convey the resulting work.
0077 
0078 %% define bus types
0079 PQ      = 1;
0080 PV      = 2;
0081 REF     = 3;
0082 NONE    = 4;
0083 
0084 %% define the indices
0085 BUS_I       = 1;    %% bus number (1 to 29997)
0086 BUS_TYPE    = 2;    %% bus type (1 - PQ bus, 2 - PV bus, 3 - reference bus, 4 - isolated bus)
0087 PD          = 3;    %% Pd, real power demand (MW)
0088 QD          = 4;    %% Qd, reactive power demand (MVAr)
0089 GS          = 5;    %% Gs, shunt conductance (MW at V = 1.0 p.u.)
0090 BS          = 6;    %% Bs, shunt susceptance (MVAr at V = 1.0 p.u.)
0091 BUS_AREA    = 7;    %% area number, 1-100
0092 VM          = 8;    %% Vm, voltage magnitude (p.u.)
0093 VA          = 9;    %% Va, voltage angle (degrees)
0094 BASE_KV     = 10;   %% baseKV, base voltage (kV)
0095 ZONE        = 11;   %% zone, loss zone (1-999)
0096 VMAX        = 12;   %% maxVm, maximum voltage magnitude (p.u.)      (not in PTI format)
0097 VMIN        = 13;   %% minVm, minimum voltage magnitude (p.u.)      (not in PTI format)
0098 
0099 %% included in opf solution, not necessarily in input
0100 %% assume objective function has units, u
0101 LAM_P       = 14;   %% Lagrange multiplier on real power mismatch (u/MW)
0102 LAM_Q       = 15;   %% Lagrange multiplier on reactive power mismatch (u/MVAr)
0103 MU_VMAX     = 16;   %% Kuhn-Tucker multiplier on upper voltage limit (u/p.u.)
0104 MU_VMIN     = 17;   %% Kuhn-Tucker multiplier on lower voltage limit (u/p.u.)

Generated on Mon 26-Jan-2015 15:00:13 by m2html © 2005