Economic Dispatch - Wind energy penetration

Problems with modeling
Post Reply
rpereira57
User
User
Posts: 5
Joined: 6 years ago

Economic Dispatch - Wind energy penetration

Post by rpereira57 »

I have this question here to analyse with gams:

Several wind farms of total capacity 350 MW are now installed in the system. An additional operational constraint is introduced whereby the maximum contribution from wind generation at any given time is 30% of total demand. Wind generation has priority dispatch and zero cost. With an unchanging system demand level, the corresponding aggregate wind output in successive half hours is200, 280, 245 and 170 MW respectively. Determine the optimal, N-1 secure economic dispatch (with all units remaining online)and the profitability of each generation unit across the 2 hour period for the new generation fleet. Comment on the significance of the results obtained. If it is now assumed that 70% of curtailed wind production can contribute to the system reserve contribution, determine the updated optimal economic dispatch for the same 2 hour period. Again, comment on the results obtained.

and I wrote 2 codes, but they are giving me the same results... I can not see the reason. I think it is an English interpretation problem with the second condition (70% of curtailed bit) my codes are:

set Gen /g1*g5/
scalar load /730/
scalar y /175/
scalar half_hour /0.5/
scalar maxcap /350/
scalar wind_contribution /0.3/
Table data (Gen,*)
a b c Pmax Pmin Res
g1 0.19 58.3 1800 155 35 20
g2 0.13 39.3 3250 195 60 35
g3 0.08 11.5 4600 165 95 55
g4 0.07 42.6 5100 305 170 95
g5 0.14 8.9 3850 280 130 65;

parameter resc(gen) reserve constraints for each generator
res(Gen)
pwind ;

pwind = load*wind_contribution;

res(gen) = data(Gen,"Res") ;


scalar pw, total_demand, Rw;

if (y gt pwind,
pw = pwind;
else
pw = y;);

total_demand = load - pw ;

if (y gt pwind,
Rw = 0.7*(y-pwind);
else
Rw = 0;);


resc("g1") = res("g2") + res("g3") + res("g4") + res("g5") + Rw;
resc("g2") = res("g1") + res("g3") + res("g4") + res("g5") + Rw;
resc("g3") = res("g2") + res("g1") + res("g4") + res("g5") + Rw;
resc("g4") = res("g2") + res("g3") + res("g1") + res("g5") + Rw;
resc("g5") = res("g2") + res("g3") + res("g4") + res("g1") + Rw;

Variables P(Gen), cost;

positive variables p;

p.up("g1") = resc("g1") ;
p.up("g2") = resc("g2") ;
p.up("g3") = resc("g3") ;
p.up("g4") = resc("g4") ;
p.up("g5") = resc("g5") ;
p.lo(gen) = data(gen,"Pmin") ;

Equations
eq1, eq2;

eq1 .. cost=e=sum(gen,(data(gen, 'a')*half_hour)*P(gen)*P(gen)+(data(gen,'b')*half_hour)*P(gen)+(data(gen,'c')*half_hour));
eq2 .. sum(gen, P(gen))=e=total_demand;

Model ECD /all/
solve ECD us qcp min cost;

parameter report(gen,*);

report(gen,"profit")= P.l(gen)*eq2.m + P.m(gen)*res(Gen) ;

option decimals=3

display cost.l;
display p.l;
display eq2.m;
display report;
display total_demand;
display pw;
display pwind;
display Rw;



and




set Gen /g1*g5/
scalar load /730/
scalar y /175/
scalar half_hour /0.5/
scalar maxcap /350/
scalar wind_contribution /0.3/
Table data (Gen,*)
a b c Pmax Pmin Res
g1 0.19 58.3 1800 155 35 20
g2 0.13 39.3 3250 195 60 35
g3 0.08 11.5 4600 165 95 55
g4 0.07 42.6 5100 305 170 95
g5 0.14 8.9 3850 280 130 65;

parameter resc(gen) reserve constraints for each generator
res(Gen)
pwind ;

pwind = load*wind_contribution;

res(gen) = data(Gen,"Res") ;


scalar pw, total_demand;

if (y gt pwind,
pw = pwind;
else
pw = y;);

total_demand = load - pw ;

resc("g1") = res("g2") + res("g3") + res("g4") + res("g5");
resc("g2") = res("g1") + res("g3") + res("g4") + res("g5");
resc("g3") = res("g2") + res("g1") + res("g4") + res("g5");
resc("g4") = res("g2") + res("g3") + res("g1") + res("g5");
resc("g5") = res("g2") + res("g3") + res("g4") + res("g1");

Variables P(Gen), cost;

positive variables p;

p.up("g1") = resc("g1") ;
p.up("g2") = resc("g2") ;
p.up("g3") = resc("g3") ;
p.up("g4") = resc("g4") ;
p.up("g5") = resc("g5") ;
p.lo(gen) = data(gen,"Pmin") ;

Equations
eq1, eq2;

eq1 .. cost=e=sum(gen,(data(gen, 'a')*half_hour)*P(gen)*P(gen)+
(data(gen,'b')*half_hour)*P(gen)+(data(gen,'c')*half_hour));
eq2 .. sum(gen, P(gen))=e=total_demand;

Model ECD /all/
solve ECD us qcp min cost;

parameter report(gen,*);

report(gen,"profit")= P.l(gen)*eq2.m + P.m(gen)*res(Gen) ;

option decimals=3

display cost.l;
display p.l;
display eq2.m;
display report;
display total_demand;
display pw;
display pwind;
User avatar
Renger
Posts: 639
Joined: 7 years ago

Re: Economic Dispatch - Wind energy penetration

Post by Renger »

Hi
It seems obvious to me as rw=0, so both models are exactly the same (next time, show explicitly what is different instead of just given the code...):

y < pwind, so pw = y

y still not greater than pwind, so rw = 0

Cheers

Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
rpereira57
User
User
Posts: 5
Joined: 6 years ago

Re: Economic Dispatch - Wind energy penetration

Post by rpereira57 »

thanks!!
You were right, the code was the same. and both were wrong, I got the correct answer yesterday!
But thanks for the reply
Post Reply