Hi Davide, For an example of direct specification to extend the OPF, have a look at the AC OPF tests, e.g. starting at line 228 in t/t_opf_default.m<https://github.com/MATPOWER/matpower/blob/24f9f8cc981fdf92c156dc7dac6597fe3452f9b4/lib/t/t_opf_default.m#L228>. The only difference is that you would be assigning A, l, u, etc. as fields in mpc and calling runopf().
For an example of using the callback functions, I suggest looking carefully at toggle_reserves.m, along with Sections 7.2–7.6.1 in the manual. To get a better understanding of the opt_model object (om) and how it can be used to modify the problem, you may also want to check out Chapter 5 in the User’s Manual for MP-Opt-Model<https://matpower.org/docs/MP-Opt-Model-manual-2.1.pdf>. MP-Opt-Model includes a further development of opt_model that will be in the next version of MATPOWER, but the basics are the same as opt_model in MATPOWER 7 (and are finally documented in that manual). I suggest using direct specification if you are working with only one specific case file and don’t need to manipulate a lot of additional input data. If you want something that will be applicable to any case (including those with non-consecutive bus numbering, off-line gens, branches, etc.) then you probably want to go with the callback approach, since you’ll likely need to handle conversion of any additional data to internal indexing (after off-line equipment has been removed and buses have been renumbered consecutively) using an ext2int callback, and a conversion of results back to external indexing using a int2ext callback, in addition to the formulation callback where you actually modify the optimization problem formulation. Hope this helps point you the right direction. I’m happy to try to answer more specific questions if you still get stuck. Ray On Oct 8, 2020, at 6:18 AM, Davide Maglione <[email protected]<mailto:[email protected]>> wrote: Thank you very much for you help. Dispatchable loads is exactly what i was looking for. I am having a bit of trouble in extending the opf. I have read the manual and i think the Callback functions method is the best for my case. I am trying to understand how this works using the ‘case9’, simply adding a new variable and a new cost to the case. I am trying to understand the “userfcn_” method described in 7.3.2 but i don’t think i am getting this right. case9 = loadcase(case9); case9.gen(4,1) = 6; % case9.gen(4,2) = 0; %Pg, real power output (MW) case9.gen(4,3) = 0; %Qg, reactive power output (MVAr) case9.gen(4,4) = 0; case9.gen(4,5) = 0; case9.gen(4,6)= 1.025; case9.gen(4,7)= 100; case9.gen(4,8) = 1; case9.gen(4,9) = 0; case9.gen(4,10) = -1; case9 = add_userfcn(case9, 'formulation', @userfcn_formulation); results = runopf(case9); function om = userfcn_formulation(om) " OutmailID: 125018367, List: 'matpower-l', MemberID: 82861091 SCRIPT: "variable bounds L=-1; U=1; Cw = 10 * case9.baseMVA om.add_var('S',1,case9.gen(4,2),case9.gen(4,10),case9.gen(4,9)) om.add_lin_constraint('limite1',L,1,U,{'S'}) om.add_quad_cost('costo1',[],Cw,0,{S}); end i think my problem is that i can’t understand how to properly modify the opf model. I hope someone can help me. Best regards, Davide Maglione Da: Ray Daniel Zimmerman<mailto:[email protected]> Inviato: sabato 19 settembre 2020 17:39 A: MATPOWER-L<mailto:[email protected]> Oggetto: Re: Bus, Loads and Generators question That sounds like a dispatchable load … see Section 6.4.2 in the User’s Manual. Ray On Sep 18, 2020, at 8:22 AM, Davide Maglione <[email protected]<mailto:[email protected]>> wrote: Thank you for the answer, i am working on a transmission network so i don’t think a dc network model is adequate. I have read few articles that uses OPF extensible structure to optimize storage size so i am leaning toward that. Sorry i didn’t mean to ask you to show me how to use matpower to solve my problem, i thought my question was way more trivial. I am just struggling a bit with the User’s Manual. Hope my question is not too specific: Is there a way to assign a maximum demand for a load (in order to simulate the size of the storage), and then, after creating my cost function and constraints, solve the OPF to track the variable power absorbed by that load/storage? Hope i was clear, just asking this to understand if i am following the right path or i have to walk in another direction to solve this. Thank you again, best regards, Davide Maglione Da: Ray Daniel Zimmerman<mailto:[email protected]> Inviato: giovedì 10 settembre 2020 19:58 A: MATPOWER-L<mailto:[email protected]> Oggetto: Re: Bus, Loads and Generators question It sounds like you want to solve a problem that MATPOWER does not implement directly, so I’m afraid you’ll have to formulate the problem yourself and determine whether or not it fits MATPOWER’s extensible OPF structure (see also FAQ #2<https://matpower.org/doc/faq/#homework>). In general, when introducing storage, you need to solve a multi-period problem that optimizes across multiple time steps simultaneously. If a DC network model is adequate, you might consider whether MOST<https://matpower.org/docs/MOST-manual-1.0.2.pdf> would be able to solve your problem. Ray On Sep 10, 2020, at 11:00 AM, Davide Maglione <[email protected]<mailto:[email protected]>> wrote: Hi Ray, thank you for your support and your answers. I am new to power flows so i struggled a bit, but i managed to succesfully run a pf for a 4 month period in my network. Thank you for your help. I want to add energy storage in my network, and, taking into account a surplus of power occasionally in the 4 month period, i would like to create a new objective function in order to minimize the cost of installation of the storage system. Is the Extended OPF feature the best way to do this? Should i think of the storage simply as an additional load on the bus and the occasional surplus of energy as an additional power from the generators? Thank you for your help, Best Regards, Davide Maglione Da: Ray Daniel Zimmerman<mailto:[email protected]> Inviato: venerdì 24 luglio 2020 16:10 A: MATPOWER-L<mailto:[email protected]> Oggetto: Re: Bus, Loads and Generators question It sounds like your P and Q are branch flow values, not nodal loads, so no they should not be used as loads in the bus matrix. Ray On Jul 23, 2020, at 12:42 PM, Davide Maglione <[email protected]<mailto:[email protected]>> wrote: Hi Ray and thank you for your reply, i will try to make my case more clear. I am studying a radial transmission network (150 kV). There are 3 branches directly connected to a station. I am thinking of using this station as a “sink” (a load for Matpower) that collects the power generated by the wind power plants in the network. My final goal is to do an extended optimal power flow, using some custom constraints, to optimize size and location of energy storage in order to avoid wind curtailment by the transmission operator. I have data of P, Q and I of branches, and V at the nodes (intersection of branch and power plant). Should i put those data (P,Q) in the 3rd and 4th column of the bus matrix data despite they are not load buses? Or should i do something different in my scenario? I have put an image to semplify things. Hope this time i have make it more clear, thank you again for your time, Davide Maglione Da: Ray Daniel Zimmerman<mailto:[email protected]> Inviato: venerdì 17 luglio 2020 22:40 A: MATPOWER-L<mailto:[email protected]> Oggetto: Re: Bus, Loads and Generators question It isn’t completely clear what data you have to create your case, but you definitely need both load and generation for the system to make any sense. Total generation is equal to total load plus losses, so you need both. And dispatchable load refers to loads whose quantities are not fixed, but can vary depending on the price. Ray On Jul 16, 2020, at 10:06 AM, Davide Maglione <[email protected]<mailto:[email protected]>> wrote: Hello, For my thesys work i am trying to recreate a trasmission network with high penetration of wind power. I have some doubts on how to consider my buses, because in my network there are no loads but only generators and i am considering the buses as the nodes of the system. I have V,I and P datas of each n_i node, so can i put in the 3rd and 4th column of the bus matrix those flow data despite they are not load buses? Finally, what do you mean with “dispatchable load”? Thank you very much, best regards. Davide Maglione [https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Mail priva di virus. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> <network.PNG> --_000_C63C81C5387E48748FEC53112B964EA4cornelledu_ Content-Type: text/html; charset="utf-8" Content-ID: <[email protected]> Content-Transfer-Encoding: base64 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""> <div class="">Hi Davide,</div> <div class=""><br class=""> </div> For an example of direct specification to extend the OPF, have a look at the AC OPF tests, e.g. starting at <a href="https://github.com/MATPOWER/matpower/blob/24f9f8cc981fdf92c156dc7dac6597fe3452f9b4/lib/t/t_opf_default.m#L228" class="">line 228 in <font face="Courier" class="">t/t_opf_default.m</font></a>. The only difference is that you would be assigning <font face="Courier" class="">A</font>, <font face="Courier" class="">l</font>, <font face="Courier" class=""> u</font>, etc. as fields in <font face="Courier" class="">mpc</font> and calling <font face="Courier" class=""> runopf()</font>. <div class=""><br class=""> </div> <div class="">For an example of using the callback functions, I suggest looking carefully at <font face="Courier" class="">toggle_reserves.m</font>, along with Sections 7.2–7.6.1 in the manual. To get a better understanding of the <font face="Courier" class="">opt_model</font> object (<font face="Courier" class="">om</font>) and how it can be used to modify the problem, you may also want to check out Chapter 5 in the <a href="https://matpower.org/docs/MP-Opt-Model-manual-2.1.pdf" class="">User’s Manual for MP-Opt-Model</a>. MP-Opt-Model includes a further development of <font face="Courier" class=""> opt_model</font> that will be in the next version of MATPOWER, but the basics are the same as <font face="Courier" class="">opt_model</font> in MATPOWER 7 (and are finally documented in that manual).</div> <div class=""><br class=""> </div> <div class="">I suggest using direct specification if you are working with only one specific case file and don’t need to manipulate a lot of additional input data. If you want something that will be applicable to any case (including those with non-consecutive bus numbering, off-line gens, branches, etc.) then you probably want to go with the callback approach, since you’ll likely need to handle conversion of any additional data to internal indexing (after off-line equipment has been removed and buses have been renumbered consecutively) using an ext2int callback, and a conversion of results back to external indexing using a int2ext callback, in addition to the formulation callback where you actually modify the optimization problem formulation.</div> <div class=""><br class=""> </div> <div class="">Hope this helps point you the right direction. I’m happy to try to answer more specific questions if you still get stuck.</div> <div class=""><br class=""> </div> <div class=""> Ray<br class=""> <div class=""><br class=""> <div><br class=""> <blockquote type="cite" class=""> <div class="">On Oct 8, 2020, at 6:18 AM, Davide Maglione <<a href="mailto:[email protected]" class="">[email protected]</a>> wrote:</div> <br class="Apple-interchange-newline"> <div class=""> <div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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; text-decoration: none;"> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Thank you very much for you help.</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Dispatchable loads is exactly what i was looking for. I am having a bit of trouble in extending the opf. I have read the manual and i think the Callback functions method is the best for my case.</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> I am trying to understand how this works using the ‘case9’, simply adding a new variable and a new cost to the case. I am trying to understand the “userfcn_” method described in 7.3.2 but i don’t think i am getting this right.</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9 = loadcase(case9);<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,1) = 6; %<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,2) = 0; %Pg, real power output (MW) <span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,3) = 0; %Qg, reactive power output (MVAr)<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,4) = 0;<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,5) = 0;<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,6)= 1.025;<span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,7)= 100;<span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,8) = 1; <o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,9) = 0; <span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9.gen(4,10) = -1;<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""> </o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">case9 = add_userfcn(case9, 'formulation', @userfcn_formulation);<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""> </o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">results = runopf(case9);<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""> </o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">function om = userfcn_formulation(om)<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">" TCL MERGE ERROR ( 10/08/2020 10:01:58 ): "extra characters after close-quote variable bounds<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">L=-1;<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">U=1;<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""> </o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">Cw = 10 * case9.baseMVA<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">om.add_var('S',1,case9.gen(4,2),case9.gen(4,10),case9.gen(4,9)) <span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">om.add_lin_constraint('limite1',L,1,U,{'S'}) <span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">om.add_quad_cost('costo1',[],Cw,0,{S});<span class="Apple-converted-space"> </span><o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class=""><o:p class=""> </o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <i class="">end<o:p class=""></o:p></i></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> i think my problem is that i can’t understand how to properly modify the opf model. I hope someone can help me.</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Best regards,</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Davide Maglione</div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; border: none; padding: 0cm;" class=""> <b class="">Da:<span class="Apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">Ray Daniel Zimmerman</a><br class=""> <b class="">Inviato:<span class="Apple-converted-space"> </span></b>sabato 19 settembre 2020 17:39<br class=""> <b class="">A:<span class="Apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">MATPOWER-L</a><br class=""> <b class="">Oggetto:<span class="Apple-converted-space"> </span></b>Re: Bus, Loads and Generators question</div> </div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> That sounds like a dispatchable load … see Section 6.4.2 in the User’s Manual.<span class="Apple-converted-space"> </span><o:p class=""></o:p></div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Ray<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <br class=""> <br class=""> <o:p class=""></o:p></div> <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> On Sep 18, 2020, at 8:22 AM, Davide Maglione <<a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">[email protected]</a>> wrote:<o:p class=""></o:p></div> </div> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""> </o:p></div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Thank you for the answer,<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> i am working on a transmission network so i don’t think a dc network model is adequate. I have read few articles that uses OPF extensible structure to optimize storage size so i am leaning toward that.<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Sorry i didn’t mean to ask you to show me how to use matpower to solve my problem, i thought my question was way more trivial. I am just struggling a bit with the User’s Manual.<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hope my question is not too specific:<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Is there a way to assign a maximum demand for a load (in order to simulate the size of the storage), and then, after creating my cost function and constraints, solve the OPF to track the variable power absorbed by that load/storage?<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hope i was clear, just asking this to understand if i am following the right path or i have to walk in another direction to solve this.<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Thank you again, best regards,<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Davide Maglione<o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <b class="">Da:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">Ray Daniel Zimmerman</a><br class=""> <b class="">Inviato:<span class="apple-converted-space"> </span></b>giovedì 10 settembre 2020 19:58<br class=""> <b class="">A:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">MATPOWER-L</a><br class=""> <b class="">Oggetto:<span class="apple-converted-space"> </span></b>Re: Bus, Loads and Generators question<o:p class=""></o:p></div> </div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> It sounds like you want to solve a problem that MATPOWER does not implement directly, so I’m afraid you’ll have to formulate the problem yourself and determine whether or not it fits MATPOWER’s extensible OPF structure (see also <a href="https://matpower.org/doc/faq/#homework" style="color: blue; text-decoration: underline;" class="">FAQ #2</a>).<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> In general, when introducing storage, you need to solve a multi-period problem that optimizes across multiple time steps simultaneously. If a DC network model is adequate, you might consider whether <a href="https://matpower.org/docs/MOST-manual-1.0.2.pdf" style="color: blue; text-decoration: underline;" class="">MOST</a> would be able to solve your problem.<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Ray<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <br class=""> <br class=""> <br class=""> <o:p class=""></o:p></div> </div> <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> On Sep 10, 2020, at 11:00 AM, Davide Maglione <<a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">[email protected]</a>> wrote:<o:p class=""></o:p></div> </div> </div> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hi Ray,<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> thank you for your support and your answers. I am new to power flows so i struggled a bit, but i managed to succesfully run a pf for a 4 month period in my network. Thank you for your help.<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> I want to add energy storage in my network, and, taking into account a surplus of power occasionally in the 4 month period, i would like to create a new objective function in order to minimize the cost of installation of the storage system.<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Is the Extended OPF feature the best way to do this? Should i think of the storage simply as an additional load on the bus and the occasional surplus of energy as an additional power from the generators?<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Thank you for your help,<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Best Regards,<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Davide Maglione<o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <b class="">Da:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">Ray Daniel Zimmerman</a><br class=""> <b class="">Inviato:<span class="apple-converted-space"> </span></b>venerdì 24 luglio 2020 16:10<br class=""> <b class="">A:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">MATPOWER-L</a><br class=""> <b class="">Oggetto:<span class="apple-converted-space"> </span></b>Re: Bus, Loads and Generators question<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> It sounds like your P and Q are branch flow values, not nodal loads, so no they should not be used as loads in the bus matrix.<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Ray<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <br class=""> <br class=""> <br class=""> <br class=""> <o:p class=""></o:p></div> </div> </div> <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> On Jul 23, 2020, at 12:42 PM, Davide Maglione <<a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">[email protected]</a>> wrote:<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hi Ray and thank you for your reply,<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> i will try to make my case more clear. I am studying a radial transmission network (150 kV). There are 3 branches directly connected to a station. I am thinking of using this station as a “sink” (a load for Matpower) that collects the power generated by the wind power plants in the network.<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> My final goal is to do an extended optimal power flow, using some custom constraints, to optimize size and location of energy storage in order to avoid wind curtailment by the transmission operator.<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> I have data of P, Q and I of branches, and V at the nodes (intersection of branch and power plant). Should i put those data (P,Q) in the 3rd and 4th column of the bus matrix data despite they are not load buses? Or should i do something different in my scenario?<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> I have put an image to semplify things.<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hope this time i have make it more clear, thank you again for your time,<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Davide Maglione<o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0cm 0cm;" class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <b class="">Da:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">Ray Daniel Zimmerman</a><br class=""> <b class="">Inviato:<span class="apple-converted-space"> </span></b>venerdì 17 luglio 2020 22:40<br class=""> <b class="">A:<span class="apple-converted-space"> </span></b><a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">MATPOWER-L</a><br class=""> <b class="">Oggetto:<span class="apple-converted-space"> </span></b>Re: Bus, Loads and Generators question<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> It isn’t completely clear what data you have to create your case, but you definitely need both load and generation for the system to make any sense. Total generation is equal to total load plus losses, so you need both.<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> And dispatchable load refers to loads whose quantities are not fixed, but can vary depending on the price.<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Ray<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <br class=""> <br class=""> <br class=""> <br class=""> <br class=""> <o:p class=""></o:p></div> </div> </div> </div> <blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> On Jul 16, 2020, at 10:06 AM, Davide Maglione <<a href="mailto:[email protected]" style="color: blue; text-decoration: underline;" class="">[email protected]</a>> wrote:<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Hello,<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> For my thesys work i am trying to recreate a trasmission network with high penetration of wind power. I have some doubts on how to consider my buses, because in my network there are no loads but only generators and<span class="apple-converted-space"> </span><span style="font-size: 10pt; font-family: "Segoe UI", sans-serif;" class="">i am considering the buses as the<span class="apple-converted-space"> </span></span>nodes of the system.<o:p class=""></o:p></div> </div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> I have V,I and P datas of each n_i node, so can i put in the 3rd and 4th column of the bus matrix those flow data despite they are not load buses?<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Finally, what do you mean with “dispatchable load”?<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Thank you very much,<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> best regards.<o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Davide Maglione<span class="apple-converted-space"> </span><o:p class=""></o:p></div> </div> </div> </div> </div> <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""> </span><o:p class=""></o:p></div> </div> </div> </div> <table class="MsoNormalTable" border="1" cellspacing="3" cellpadding="0" style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(211, 212, 222);"> <tbody class=""> <tr class=""> <td width="55" style="width: 41.25pt; border: none; padding: 13.5pt 0.75pt 0.75pt;" class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: blue; text-decoration: underline;" class=""><span style="text-decoration: none;" class=""><img border="0" width="46" height="29" id="_x0000_i1025" src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" style="width: 0.4791in; height: 0.3055in;" class=""></span></a><o:p class=""></o:p></div> </div> </div> </div> </td> <td width="470" style="width: 352.5pt; border: none; padding: 12.75pt 0.75pt 0.75pt;" class=""> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 13.5pt;" class=""> <span style="font-size: 10pt; font-family: Arial, sans-serif; color: rgb(65, 66, 78);" class="">Mail priva di virus.<span class="apple-converted-space"> </span><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: blue; text-decoration: underline;" class=""><span style="color: rgb(68, 83, 234);" class="">www.avast.com</span></a></span><o:p class=""></o:p></div> </div> </div> </div> </td> </tr> </tbody> </table> </div> </div> </blockquote> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <span style="color: white;" class=""> </span><o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div> </div> </div> </div> <div class=""> <div class=""> <div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <network.PNG></div> </div> </div> </div> </blockquote> </div> </div> </div> </blockquote> </div> </div> </div> </blockquote> </div> </div> </div> </div> </blockquote> </div> <br class=""> </div> </div> </body> </html> --
