Dear Ray, I am planning to add them as a simple MW injection with a negative value and then i want to control them.
For example on the bus that a renewable generator is connected i am saving the results for the power flow and then i am setting some rules to control the renewable generator i.e if the power flow its more than 100 i want to curtail the generator with the specific value which the system will run in a safe operation i already achieved this part but right now i am trying to include more renewable generators and curtail them one by one which i define as a priority on my case format. Charalampos On 17 Oct 2017, at 16:09, Ray Zimmerman <[email protected]<mailto:[email protected]>> wrote: How do you plan to model your renewable generators? As a simple MW injection (e.g. equivalent to a negative value in the PD column of the bus matrix)? As a zero-cost generator with a PMAX value that depends on the current wind conditions (why not simply add them to the gen matrix with a zero cost in gencost?)? Ray On Oct 16, 2017, at 6:33 PM, Charalambos Ioannou <[email protected]<mailto:[email protected]>> wrote: Dear Ray, Thank you so much for you guidance. The only thing i don’t know how to develop is the following: For example in the following case format i define two renewable generators on bus 2 and 3. What i want to do is write a code which will identify but its self on which bus the renewable generators will be connected. i.e. if i will create a different case format with more busses lets say 10 bus system i want the same process to be followed as the above and when i will change the number on which bus the renewable generators are connected for example at bus 6 and 10 i want to follow the same process as i mentioned. mpc.renwgen = [ 10 20 1 1 6 10 1 1 ]; Thanks in advance. Regards, Charalampos On 13 Oct 2017, at 15:45, Ray Zimmerman <[email protected]<mailto:[email protected]>> wrote: Since MATPOWER does not have any mechanism to automatically handle renewable generators in the way you envision, you have to implement that functionality yourself. And, of course, you are free to specify the data where you like. If you want to specify it as a renwgen field in the MATPOWER case struct, that’s fine. If you want to specify it in a separate file or data structure that is fine as well. Since you are writing the code to take that data and do something with it to modify model, you simply need to have that code be consistent in where it looks for the data. I hope that answers your question. Ray On Oct 13, 2017, at 10:32 AM, Charalambos Ioannou <[email protected]<mailto:[email protected]>> wrote: Dear Ray, I am trying to add renewable generators into the case format. For example the following is what i am trying to do: function mpc = michalis() % bus Capacity(MW) Curtailment(0==no, 1==yes) Priority mpc.renwgen = [ 2 20 1 1 3 10 1 1 ]; TCL MERGE ERROR ( 10/13/2017 10:45:39 ): "invalid command name "MATPOWER"" OutmailID: 121941184, List: 'matpower-l', MemberID: 79270638 SCRIPT: "MATPOWER Case Format : Version 2 > mpc.version = '2'; > >" ----- Power Flow Data -----%% TCL MERGE ERROR ( 10/13/2017 10:45:39 ): "invalid command name "system"" OutmailID: 121941184, List: 'matpower-l', MemberID: 79270638 SCRIPT: "system MVA base > mpc.baseMVA = 100; > >" bus data % bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin mpc.bus = [ 1 2 50 0 0 0 1 1 0 100 1 1.1 0.9; 2 1 -50 0 0 0 1 1 0 100 1 1.1 0.9; 3 1 -50 0 0 0 1 1 0 100 1 1.1 0.9; 4 3 0 0 0 0 1 1 0 100 1 1.1 0.9; ]; TCL MERGE ERROR ( 10/13/2017 10:45:39 ): "invalid command name ">"" OutmailID: 121941184, List: 'matpower-l', MemberID: 79270638 SCRIPT: "generator data > % bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf > mpc.gen = [ > 1 200 0 200 -200 1 100 1 200 0 0 0 0 0 0 0 0 0 0 0 0; > 4 0 0 0 0 1 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0; > > ]; > >" branch data % fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax mpc.branch = [ 1 2 0.1 0.1 0.1 200 200 200 0 0 1 -360 360; 2 3 0.1 0.1 0.1 100 100 100 0 0 1 -360 360; 3 4 0.1 0.1 0.1 100 100 100 0 0 1 -360 360; ]; TCL MERGE ERROR ( 10/13/2017 10:45:39 ): "extra characters after close-quote" OutmailID: 121941184, List: 'matpower-l', MemberID: 79270638 SCRIPT: "generator cost data > % 1 startup shutdown > n x1 y1 ... xn yn > % 2 startup shutdown > n c(n-1) > ... c0 > mpc.gencost = [ > 2 0 0 2 > 10 0; > 2 0 0 2 > 10 0; > ]; > > Do i have to define it in a different file which i have to create the buses and everything? If you can give me your opinion on this i will appreciate it. > > Thanks in advance. > > Regards, > > Charalampos --Apple-Mail=_24AB2BB2-DBC3-4144-80AB-34421D9CA427 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" <html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Since MATPOWER does not have any mechanism to automatically handle renewable generators in the way you envision, you have to implement that functionality yourself. And, of course, you are free to specify the data where you like. If you want to specify it as a <font face="Courier" class="">renwgen</font> field in the MATPOWER case struct, that’s fine. If you want to specify it in a separate file or data structure that is fine as well. Since you are writing the code to take that data and do something with it to modify model, you simply need to have that code be consistent in where it looks for the data.</div><div class=""><br class=""></div><div class="">I hope that answers your question.</div><div class=""><br class=""></div><div class=""> Ray</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 13, 2017, at 10:32 AM, Charalambos Ioannou <<a href="mailto:[email protected]" class="">[email protected]<mailto:[email protected]></a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><div style="margin-top: 0px; margin-bottom: 0px;" class="">Dear Ray, </div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class=""></div><div style="margin-top: 0px; margin-bottom: 0px;" class="">I am trying to add renewable generators into the case format. For example the following is what i am trying to do: </div><div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class=""><br class=""></span></div><p style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt;" class=""> </span></p><div class=""><span style="color: rgb(255, 0, 0);" class="">function mpc = michalis()</span></div><div class=""><span style="color: rgb(255, 0, 0);" class="">% bus Capacity(MW) Curtailment(0==no, 1==yes) Priority </span></div><div class=""><span style="color: rgb(255, 0, 0);" class="">mpc.renwgen = [ 2 20 1 1</span></div><div class=""><span style="color: rgb(255, 0, 0);" class=""> <span class="Apple-converted-space"> </span></span><span style="font-family: Calibri, Helvetica, sans-serif; color: rgb(255, 0, 0);" class=""></span><span style="color: rgb(255, 0, 0);" class=""> 3 10 1 1</span></div><div class=""><span style="color: rgb(255, 0, 0);" class=""> </span><span style="color: rgb(255, 0, 0);" class=""> ];</span></div><div class=""><br class=""></div><div class="">" MATPOWER Case Format : Version 2</div><div class="">mpc.version = '2';</div><div class=""><br class=""></div><div class="">%%----- Power Flow Data -----%%</div><div class="">%% system MVA base</div><div class="">mpc.baseMVA = 100;</div><div class=""><br class=""></div><div class="">%% bus data</div><div class="">% bus_i type Pd Qd Gs Bs area Vm Va baseKV zone Vmax Vmin</div><div class="">mpc.bus = [</div><div class=""> 1 2 50 0 0 0 1 1 0 100 1 1.1 0.9;</div><div class=""> 2 1 -50 0 0 0 1 1 0 100 1 1.1 0.9;</div><div class=""> 3 1 -50 0 0 0 1 1 0 100 1 1.1 0.9;</div><div class=""> 4 3 0 0 0 0 1 1 0 100 1 1.1 0.9;</div><div class="">];</div><div class=""><br class=""></div><div class="">%% generator data</div><div class="">% bus Pg Qg Qmax Qmin Vg mBase status Pmax Pmin Pc1 Pc2 Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf</div><div class="">mpc.gen = [</div><div class=""> 1 200 0 200 -200 1 100 1 200 0 0 0 0 0 0 0 0 0 0 0 0;</div><div class=""> 4 0 0 0 0 1 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0;</div><div class=""><br class=""></div><div class="">];</div><div class=""><br class=""></div><div class="">%% branch data</div><div class="">% fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax</div><div class="">mpc.branch = [</div><div class=""> 1 2 0.1 0.1 0.1 200 200 200 0 0 1 -360 360;</div><div class=""> 2 3 0.1 0.1 0.1 100 100 100 0 0 1 -360 360;</div><div class=""> 3 4 0.1 0.1 0.1 100 100 100 0 0 1 -360 360;</div><div class="">];</div><div class=""><br class=""></div><div class="">%% generator cost data</div><div class="">%<span style="white-space: pre;" class=""> </span>1<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>startup<span style="white-space: pre;" class=""> </span>shutdown<span style="white-space: pre;" class=""> </span>n<span style="white-space: pre;" class=""> </span>x1<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>y1<span style="white-space: pre;" class=""> </span>...<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>xn<span style="white-space: pre;" class=""> </span>yn</div><div class="">%<span style="white-space: pre;" class=""> </span>2<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>startup<span style="white-space: pre;" class=""> </span>shutdown<span style="white-space: pre;" class=""> </span>n<span style="white-space: pre;" class=""> </span>c(n-1)<span style="white-space: pre;" class=""> </span>...<span style="white-space: pre;" class=""> </span>c0</div><div class="">mpc.gencost = [</div><div class=""><span style="white-space: pre;" class=""></span>2<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>0<span style="white-space: pre;" class=""> </span>0<span style="white-space: pre;" class=""> </span>2<span style="white-space: pre;" class=""> </span>10<span style="white-space: pre;" class=""> </span>0;</div><div class=""><span style="white-space: pre;" class=""></span>2<span style="white-space: pre;" class=""> </span><span class="Apple-converted-space"> </span>0<span style="white-space: pre;" class=""> </span>0<span style="white-space: pre;" class=""> </span>2<span style="white-space: pre;" class=""> </span>10<span style="white-space: pre;" class=""> </span>0;</div><div class="">];</div><div class=""><br class=""></div><div class="">Do i have to define it in a different file which i have to create the buses and everything? If you can give me your opinion on this i will appreciate it. </div><div class=""><br class=""></div><div class="">Thanks in advance.</div><div class=""><br class=""></div><div class="">Regards, </div><div class=""><br class=""></div><div class="">Charalampos </div></div></div></blockquote></div><br class=""></div></body></html>
