RampSenDED : Ramp rate sensitivity analysis for Dynamic Economic Load Dispatch

Reference

  • Alireza Soroudi, Power System Optimization Modelling in GAMS, Model RampSenDED (Gcode4.2) in chapter Dynamic Economic Dispatch, 2017

Category : GAMS PSOPT library


Mainfile : RampSenDED.gms

$title Ramp rate sensitivity analysis for Dynamic Economic Load Dispatch

$onText
For more details please refer to Chapter 4 (Gcode4.2), of the following book:
Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017.
--------------------------------------------------------------------------------
Model type: QCP
--------------------------------------------------------------------------------
Contributed by
Dr. Alireza Soroudi
IEEE Senior Member
Email: alireza.soroudi@gmail.com
We do request that publications derived from the use of the developed GAMS code
explicitly acknowledge that fact by citing
Soroudi, Alireza. Power System Optimization Modeling in GAMS. Springer, 2017.
DOI: doi.org/10.1007/978-3-319-62350-4
$offText

Set
   t 'hours'         / t1*t24 /
   i 'thermal units' / p1*p4  /;

Table gendata(i,*) 'generator cost characteristics and limits'
       a     b      c    d     e     f     Pmin  Pmax  RU0  RD0
   p1  0.12  14.80  89   1.2  -5     3     28    200   40   40
   p2  0.17  16.57  83   2.3  -4.24  6.09  20    290   30   30
   p3  0.15  15.55  100  1.1  -2.15  5.69  30    190   30   30
   p4  0.19  16.21  70   1.1  -3.99  6.2   20    260   50   50;

Parameter demand(t) /  t1 510,  t2 530,  t3 516, t4  510,  t5 515,  t6 544
                       t7 646,  t8 686,  t9 741, t10 734, t11 748, t12 760
                      t13 754, t14 700, t15 686, t16 720, t17 714, t18 761
                      t19 727, t20 714, t21 618, t22 584, t23 578, t24 544 /;

Variable
   OBJ         'objective (revenue)'
   costThermal 'cost of thermal units'
   p(i,t)      'power generated by thermal power plant'
   EM          'emission calculation';

p.up(i,t) = gendata(i,"Pmax");
p.lo(i,t) = gendata(i,"Pmin");

Equation Genconst3, Genconst4, costThermalcalc, balance, EMcalc;
costThermalcalc.. costThermal =e= sum((t,i), gendata(i,'a')*sqr(p(i,t)) + gendata(i,'b')*p(i,t) + gendata(i,'c'));
Genconst3(i,t)..  p(i,t+1) - p(i,t) =l= gendata(i,'RU');
Genconst4(i,t)..  p(i,t-1) - p(i,t) =l= gendata(i,'RD');
balance(t)..      sum(i, p(i,t))    =g= demand(t);
EMcalc..          EM =e= sum((t,i), gendata(i,'d')*sqr(p(i,t)) + gendata(i,'e')*p(i,t) + gendata(i,'f'));

Model DEDcostbased / all /;

Scalar Rscale / 1 /;
Set counter   / c1*c21 /;
Parameter report1(counter,*);

loop(counter,
   Rscale = 1 - (ord(counter)-1)*0.02;
   gendata(i,'RU') = gendata(i,'RU0')*RScale;
   gendata(i,'RD') = gendata(i,'RD0')*RScale;
   solve DEDcostbased using qcp minimizing costThermal;
   report1(counter,'Scale') = Rscale;
   report1(counter,'TC')    = costThermal.l;
   report1(counter,'EM')    = EM.l;
);
display report1;

$ifI %system.fileSys%==Unix $exit
$call MSAppAvail Excel
$ifThen not errorLevel 1
   execute_unload "DEDcostbased.gdx" report1
   execute 'gdxxrw.exe DEDcostbased.gdx par=report1 rng=Pthermal!a1'
$endIf