Home > matpower7.0 > most > lib > filter_ramp_transitions.m

filter_ramp_transitions

PURPOSE ^

FILTER_RAMP_TRANSITIONS Creates a transition mask for ramp reserves.

SYNOPSIS ^

function md = filter_ramp_transitions(md0, threshold)

DESCRIPTION ^

FILTER_RAMP_TRANSITIONS  Creates a transition mask for ramp reserves.
   MD = FILTER_RAMP_TRANSITIONS(MD0, THRESHOLD)

   Creates a transition mask for ramping reserves, including only transitions
   with probabilities greater than or equal to a given THRESHOLD value,
   where the probability of the transition from j1 to j2 is taken to be the
   conditional probability in TransMat multiplied by the conditional
   probability of being in state j1, given that you've made it to period t.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function md = filter_ramp_transitions(md0, threshold)
0002 %FILTER_RAMP_TRANSITIONS  Creates a transition mask for ramp reserves.
0003 %   MD = FILTER_RAMP_TRANSITIONS(MD0, THRESHOLD)
0004 %
0005 %   Creates a transition mask for ramping reserves, including only transitions
0006 %   with probabilities greater than or equal to a given THRESHOLD value,
0007 %   where the probability of the transition from j1 to j2 is taken to be the
0008 %   conditional probability in TransMat multiplied by the conditional
0009 %   probability of being in state j1, given that you've made it to period t.
0010 
0011 %   MOST
0012 %   Copyright (c) 2012-2016, Power Systems Engineering Research Center (PSERC)
0013 %   by Ray Zimmerman, PSERC Cornell
0014 %
0015 %   This file is part of MOST.
0016 %   Covered by the 3-clause BSD License (see LICENSE file for details).
0017 %   See https://github.com/MATPOWER/most for more info.
0018 
0019 %% dimensions
0020 md = md0;
0021 nt = length(md.tstep);
0022 
0023 %% create mask
0024 for t = 1:nt
0025     if t == 1
0026         prob = md.tstep(t).TransMat;
0027     else
0028         prob = md.tstep(t).TransMat * prob;
0029     end
0030     md.tstep(t).TransMask = diag(prob) *  md.tstep(t).TransMat >= threshold;
0031 end

Generated on Mon 24-Jun-2019 15:58:45 by m2html © 2005