Home > matpower6.0 > most > t > uniformwindprofile.m

uniformwindprofile

PURPOSE ^

UNIFORMWINDPROFILE Creates a wind profile with evenly spaced capacity values.

SYNOPSIS ^

function profiles = uniformwindprofile(nt, nj, n);

DESCRIPTION ^

UNIFORMWINDPROFILE Creates a wind profile with evenly spaced capacity values.

   PROFILES = UNIFORMWINDPROFILE(NT, NJ, N)

   Returns a Profile struct to modify the PMAX of a set N generators.
   The profile has NT periods and NJ scenarios, where the NJ scale
   factors are evenly spaced from 0 to 1. All inputs are optional.
   Defaults are NT = 24, NJ = 5, N = 1.

   See also IDX_PROFILE, GET_PROFILES.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function profiles = uniformwindprofile(nt, nj, n);
0002 %UNIFORMWINDPROFILE Creates a wind profile with evenly spaced capacity values.
0003 %
0004 %   PROFILES = UNIFORMWINDPROFILE(NT, NJ, N)
0005 %
0006 %   Returns a Profile struct to modify the PMAX of a set N generators.
0007 %   The profile has NT periods and NJ scenarios, where the NJ scale
0008 %   factors are evenly spaced from 0 to 1. All inputs are optional.
0009 %   Defaults are NT = 24, NJ = 5, N = 1.
0010 %
0011 %   See also IDX_PROFILE, GET_PROFILES.
0012 
0013 %   MOST
0014 %   Copyright (c) 2013-2016, Power Systems Engineering Research Center (PSERC)
0015 %   by Ray Zimmerman, PSERC Cornell
0016 %
0017 %   This file is part of MOST.
0018 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0019 %   See http://www.pserc.cornell.edu/matpower/ for more info.
0020 
0021 %% define constants
0022 [GEN_BUS, PG, QG, QMAX, QMIN, VG, MBASE, GEN_STATUS, PMAX, PMIN, ...
0023     MU_PMAX, MU_PMIN, MU_QMAX, MU_QMIN, PC1, PC2, QC1MIN, QC1MAX, ...
0024     QC2MIN, QC2MAX, RAMP_AGC, RAMP_10, RAMP_30, RAMP_Q, APF] = idx_gen;
0025 [CT_LABEL, CT_PROB, CT_TABLE, CT_TBUS, CT_TGEN, CT_TBRCH, CT_TAREABUS, ...
0026     CT_TAREAGEN, CT_TAREABRCH, CT_ROW, CT_COL, CT_CHGTYPE, CT_REP, ...
0027     CT_REL, CT_ADD, CT_NEWVAL, CT_TLOAD, CT_TAREALOAD, CT_LOAD_ALL_PQ, ...
0028     CT_LOAD_FIX_PQ, CT_LOAD_DIS_PQ, CT_LOAD_ALL_P, CT_LOAD_FIX_P, ...
0029     CT_LOAD_DIS_P, CT_TGENCOST, CT_TAREAGENCOST, CT_MODCOST_F, ...
0030     CT_MODCOST_X] = idx_ct;
0031 
0032 %% set up default input args
0033 if nargin < 3
0034     n = [];
0035     if nargin < 2
0036         nj = [];
0037         if nargin < 1
0038             nt = [];
0039         end
0040     end
0041 end
0042 if isempty(nt)
0043     nt = 24;
0044 end
0045 if isempty(nj)
0046     nj = 5;
0047 end
0048 if isempty(n)
0049     n = 1;
0050 end
0051 
0052 %% initialize profile
0053 profiles = struct( ...
0054     'type', 'mpcData', ...
0055     'table', CT_TGEN, ...
0056     'rows', 1, ...
0057     'col', PMAX, ...
0058     'chgtype', CT_REL, ...
0059     'values', [] );
0060 
0061 c = (0:1/(nj-1):1);
0062 profiles.values = repmat(c, [nt 1 n]);
0063 
0064 %% default looks like ...
0065 % profiles.values(:, :, 1) = [
0066 %     0    0.25    0.5    0.75    1;
0067 %     0    0.25    0.5    0.75    1;
0068 %     0    0.25    0.5    0.75    1;
0069 %     0    0.25    0.5    0.75    1;
0070 %     0    0.25    0.5    0.75    1;
0071 %     0    0.25    0.5    0.75    1;
0072 %     0    0.25    0.5    0.75    1;
0073 %     0    0.25    0.5    0.75    1;
0074 %     0    0.25    0.5    0.75    1;
0075 %     0    0.25    0.5    0.75    1;
0076 %     0    0.25    0.5    0.75    1;
0077 %     0    0.25    0.5    0.75    1;
0078 %     0    0.25    0.5    0.75    1;
0079 %     0    0.25    0.5    0.75    1;
0080 %     0    0.25    0.5    0.75    1;
0081 %     0    0.25    0.5    0.75    1;
0082 %     0    0.25    0.5    0.75    1;
0083 %     0    0.25    0.5    0.75    1;
0084 %     0    0.25    0.5    0.75    1;
0085 %     0    0.25    0.5    0.75    1;
0086 %     0    0.25    0.5    0.75    1;
0087 %     0    0.25    0.5    0.75    1;
0088 %     0    0.25    0.5    0.75    1;
0089 %     0    0.25    0.5    0.75    1;
0090 % ];

Generated on Fri 16-Dec-2016 12:45:37 by m2html © 2005