DED-wind : Dynamic Economic Load Dispatch considering Wind generation

Reference

  • Alireza Soroudi, Power System Optimization Modelling in GAMS, Model DED-wind (Gcode4.4) in chapter Dynamic Economic Dispatch, 2017

Category : GAMS PSOPT library


Mainfile : DED-wind.gms

$title Dynamic Economic Load Dispatch considering Wind generation

$onText
For more details please refer to Chapter 4 (Gcode4.4), 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 /
   g 'thermal units' / p1*p4  /;

Table gendata(g,*) '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;

Table data(t,*)
        lambda  load  wind
   t1   32.71   510   44.1
   t2   34.72   530   48.5
   t3   32.71   516   65.7
   t4   32.74   510   144.9
   t5   32.96   515   202.3
   t6   34.93   544   317.3
   t7   44.9    646   364.4
   t8   52      686   317.3
   t9   53.03   741   271
   t10  47.26   734   306.9
   t11  44.07   748   424.1
   t12  38.63   760   398
   t13  39.91   754   487.6
   t14  39.45   700   521.9
   t15  41.14   686   541.3
   t16  39.23   720   560
   t17  52.12   714   486.8
   t18  40.85   761   372.6
   t19  41.2    727   367.4
   t20  41.15   714   314.3
   t21  45.76   618   316.6
   t22  45.59   584   311.4
   t23  45.56   578   405.4
   t24  34.72   544   470.4;
* -----------------------------------------------------

Variable
   OBJ           'objective (revenue)'
   cost          'cost of thermal units'
   p(g,t)        'power generated by thermal power plant'
   Pw(t), PWC(t) 'winf power wind curtailmet';

Pw.up(t)  = data(t,'wind');
Pw.lo(t)  = 0;
Pwc.up(t) = data(t,'wind');
Pwc.lo(t) = 0;
p.up(g,t) = gendata(g,"Pmax");
p.lo(g,t) = gendata(g,"Pmin");

Scalar VWC / 50 /;

Equation Genconst3, Genconst4, costThermalcalc, balance, wind;

costThermalcalc.. cost =e= sum(t, VWC*pwc(t))
                        +  sum((t,g), gendata(g,'a')*power(p(g,t),2)
                                    + gendata(g,'b')*p(g,t) + gendata(g,'c'));

Genconst3(g,t)..  p(g,t+1) - p(g,t)      =l= gendata(g,'RU0');

Genconst4(g,t)..  p(g,t-1) - p(g,t)      =l= gendata(g,'RD0');

balance(t)..      sum(g, p(g,t)) + Pw(t) =g= data(t,'load');

wind(t)..         Pw(t) + PWC(t)         =e= data(t,'wind');

Model DEDwindcostbased / all /;
solve DEDwindcostbased using qcp minimizing cost;

Parameter rep(t,*);
rep(t,'Pth')  = sum(g, p.l(g,t));
rep(t,'PW')   = PW.l(t);
rep(t,'Pwc')  = PWc.l(t);
rep(t,'Load') = data(t,'load');

embeddedCode Connect:
- GAMSReader:
    symbols: [ { name: p }, { name: rep } ]
- Projection:
    name: p.l(g,t)
    newName: p_l(g,t)
- ExcelWriter:
    file: DEDwindcostbased.xlsx
    symbols:
      - { name: p_l, range: Pthermal!A1 }
      - { name: rep, range: rep!A1 }
endEmbeddedCode