Re: Continuous power flow question
Hi Simone, See the FAQ on power flow divergence<https://matpower.org/doc/faq/#pfconvergence>. It lists some useful tips to debug power flow divergence when using MATPOWER and how to run a continuation power flow to check if a power flow solution exists (point v). Thanks, Shri From: on behalf of Simone Fratton Reply-To: MATPOWER discussion forum Date: Tuesday, June 1, 2021 at 4:08 AM To: "matpowe...@list.cornell.edu" Subject: Continuous power flow question Check twice before you click! This email originated from outside PNNL. Hi, I would like to ask where I can find specific indications on the use of "continuous power flow" in Matpower? Maybe a video, an example Specifically I have a case (an electrical grid) for which Newton-Rapshon does not converge even if a solution exists and I thought of the "continuous power flow" to find this solution. I don't know if I can do it and also how to do it. Thank you all and I apologize so much for the inconvenience.
Continuous power flow question
Hi, I would like to ask where I can find specific indications on the use of "continuous power flow" in Matpower? Maybe a video, an example Specifically I have a case (an electrical grid) for which Newton-Rapshon does not converge even if a solution exists and I thought of the "continuous power flow" to find this solution. I don't know if I can do it and also how to do it. Thank you all and I apologize so much for the inconvenience.
?????? AC power flow question
Dear Dr.Zimmerman: It is my pleasure to get your response! I find that even if we don't turn off those generators whose reactive power is out of the limit, just only adjusting their output to a reasonable value is also feasible. When we adjust a generator, we run the power flow again, if we find there is a generator exceeding the limit, we again adjust the output until the all generators' reactive outputs are under the limit. No matter how, it is really a perfect experience for me to get the response by yourself. When I see the matpoer code, I am sur that I am one of your fans! Thank you very much! -- -- ??: "Ray Zimmerman";<r...@cornell.edu>; : 2016??6??3??(??) 0:09 ??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; : Re: AC power flow question If you look more carefully at the code (and the comments) you??ll see that the generator is turned off temporarily in line 267, and the load is adjusted to include the injection. Later in line 307, the process is reversed, turning the generator back on. Without studying the code in more detail, I don??t remember why it was done this way, but I suspect it has something to do with multiple generators at a bus. Ray > On Jun 2, 2016, at 10:05 AM, <1499730...@qq.com> wrote: > > Dear Sir/Madam, > I have a question with the AC power flow calculation. In Matpower > 5.1, when AC power flow is calculated, if the q_limt is used, as the manual > states that "If any generator has a violated reactive power limit, its > reactive injection is fixed at the limit, the corresponding bus is converted > to a PQ bus and the power flow is solved again. This procedure is repeated > until there are no more violations". Obviously, we can find that all > generators violating the reactive power limit will be regared as PQ bus, then > the power flow will be recalculated. However, when I opened the file runpf.m, > I fund that the states of all generators violating the reactive power limit > are set to be zero, that is, "gen(mx, GEN_STATUS) = 0";. That means the > generation is turned off in the next power flow re-calculation. This isn't > included in the manual. It seems unreasonable. So I want to know the reason > why turn off all these generators.
Re: AC power flow question
If you look more carefully at the code (and the comments) you’ll see that the generator is turned off temporarily in line 267, and the load is adjusted to include the injection. Later in line 307, the process is reversed, turning the generator back on. Without studying the code in more detail, I don’t remember why it was done this way, but I suspect it has something to do with multiple generators at a bus. Ray > On Jun 2, 2016, at 10:05 AM, 严超 <1499730...@qq.com> wrote: > > Dear Sir/Madam, > I have a question with the AC power flow calculation. In Matpower > 5.1, when AC power flow is calculated, if the q_limt is used, as the manual > states that "If any generator has a violated reactive power limit, its > reactive injection is fixed at the limit, the corresponding bus is converted > to a PQ bus and the power flow is solved again. This procedure is repeated > until there are no more violations". Obviously, we can find that all > generators violating the reactive power limit will be regared as PQ bus, then > the power flow will be recalculated. However, when I opened the file runpf.m, > I fund that the states of all generators violating the reactive power limit > are set to be zero, that is, "gen(mx, GEN_STATUS) = 0";. That means the > generation is turned off in the next power flow re-calculation. This isn't > included in the manual. It seems unreasonable. So I want to know the reason > why turn off all these generators.
AC power flow question
Dear Sir/Madam, I have a question with the AC power flow calculation. In Matpower 5.1, when AC power flow is calculated, if the q_limt is used, as the manual states that "If any generator has a violated reactive power limit, its reactive injection is fixed at the limit, the corresponding bus is converted to a PQ bus and the power flow is solved again. This procedure is repeated until there are no more violations". Obviously, we can find that all generators violating the reactive power limit will be regared as PQ bus, then the power flow will be recalculated. However, when I opened the file runpf.m, I fund that the states of all generators violating the reactive power limit are set to be zero, that is, "gen(mx, GEN_STATUS) = 0";. That means the generation is turned off in the next power flow re-calculation. This isn't included in the manual. It seems unreasonable. So I want to know the reason why turn off all these generators.
Re: power flow question
Good idea. That should probably be an option though. Ray > On Feb 18, 2016, at 11:58 AM, Abhyankar, Shrirang G. <abhy...@anl.gov> wrote: > > I agree. Having the warnings for all generators, voltages, etc. would be > helpful for the cases when users are also varying the generation on PV buses. > I would even like MATPOWER fixing the active power at PV buses to the max. or > min. limit, if the generation exceeds these limits, and informing the users > via a warning. > > Shri > > From: Ray Zimmerman <r...@cornell.edu <mailto:r...@cornell.edu>> > Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu > <mailto:matpowe...@list.cornell.edu>> > Date: Thursday, February 18, 2016 at 10:34 AM > To: MATPOWER discussion forum <matpowe...@list.cornell.edu > <mailto:matpowe...@list.cornell.edu>> > Subject: Re: power flow question > > I agree that checking for exceeded limits and warning about them would be a > nice feature to add to the the power flow. I see no reason, though, why it > should be limited to the swing bus power injection … why not include all of > the other generator, voltage and branch flow limits, all of which can be > violated in a converged power flow solution. > > I’ll put it on the “to do” list. > >Ray > > >> On Feb 18, 2016, at 8:05 AM, Jovan Ilic <jovan.i...@gmail.com >> <mailto:jovan.i...@gmail.com>> wrote: >> >> >> Jose, >> >> I did not suggest to turn the swing bus into a PV bus. There should be at >> least one swing bus >> in the system unless you formulate your PF problem as ACOPF problem which >> does not need >> any slack buses. >> >> I understand what you are saying and you are right. I'd keep the swing bus >> as it is just >> to provide the angle reference (admittance matrix is rarely singular) and >> add to Jacobian a >> constraint on the sum of P and Q flows on the lines connected to the swing >> bus. The sum >> of all these lines out flows must be less than the power injection >> capability of the swing bus, >> both P and Q. If the constraint is violated the power flow does not >> converge. The original >> poster was concerned with the convergence when there is not enough >> generation, so >> no convergence would give them a really stern "warning" and leave them >> guessing what went >> wrong. Or you can just keep it simple and have PF implementation just print >> out a warning >> that the slack bus exceeded its capacity. Modifying the Jacobian was the >> first thing that >> came to my mind but I am not sure if it provides anything in addition of a >> warning to user. >> >> Jovan >> >> >> On Thu, Feb 18, 2016 at 3:25 AM, Jose Luis Marin <mari...@gridquant.com >> <mailto:mari...@gridquant.com>> wrote: >> But you did that, it would no longer be a powerflow calculation. There are >> good mathematical reasons why the standard powerflow calculation is >> formulated so that there should be at least one swing bus (where you specify >> both V and A, leaving P and Q "free"). If you specified V, A, and Pgen at >> the swing, this would yield an overdetermined system. You could >> theoretically formulate a powerflow in which the swing bus specified only A >> (the global angle reference) and Pgen, leaving Vref and Qgen free, but this >> would yield a system of equations with a severe pathology, namely a >> near-singular Jacobian (this originates from the fact that the full >> transmission admittance matrix, being a Laplacian matrix, always has a zero >> eigenvalue, which corresponds to a translation symmetry consisting in >> uniformly shifting all voltages; pinning down at least one voltage is what >> breaks this symmetry and recovers invertibility). >> >> However, I think you're right it would be a good idea to *warn* the user >> when the swing generator(s) have gone over their PMAX (or below their PMIN!). >> >> -- >> Jose L. Marin >> Grupo AIA >> >> >> On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilic <jovan.i...@gmail.com >> <mailto:jovan.i...@gmail.com>> wrote: >> >> Good point, maybe we should trow a Pgen constraint on the swing buses in the >> Jacobian. >> >> >> >> On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres <santiago.i...@gmail.com >> <mailto:santiago.i...@gmail.com>> wrote: >> Because the exceding generation is supplied by the swing bus. Normal power >> flow does not check power generation limits. >> >> El 17 feb. 2016 1:58 PM, "Bai, Wenlei" <wenlei_...@baylor.edu >> <mailto:wenlei_...@baylor.edu>> escribió: >> Dear Ray, >> >> I tried to modified load of ‘case9’ to exceed the total generation capacity >> purposely. >> >> To my surprise, power flow still converges. More specifically, the total >> generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is >> 920.8MW >> >> Why the actual generation can be larger than its capacity? >> >> >> >> Blessings, >> Wenlei >> >> >> >> >> >> >
Re: power flow question
I agree. Having the warnings for all generators, voltages, etc. would be helpful for the cases when users are also varying the generation on PV buses. I would even like MATPOWER fixing the active power at PV buses to the max. or min. limit, if the generation exceeds these limits, and informing the users via a warning. Shri From: Ray Zimmerman <r...@cornell.edu<mailto:r...@cornell.edu>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> List-Post: matpower-l@cornell.edu Date: Thursday, February 18, 2016 at 10:34 AM To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> Subject: Re: power flow question I agree that checking for exceeded limits and warning about them would be a nice feature to add to the the power flow. I see no reason, though, why it should be limited to the swing bus power injection … why not include all of the other generator, voltage and branch flow limits, all of which can be violated in a converged power flow solution. I’ll put it on the “to do” list. Ray On Feb 18, 2016, at 8:05 AM, Jovan Ilic <jovan.i...@gmail.com<mailto:jovan.i...@gmail.com>> wrote: Jose, I did not suggest to turn the swing bus into a PV bus. There should be at least one swing bus in the system unless you formulate your PF problem as ACOPF problem which does not need any slack buses. I understand what you are saying and you are right. I'd keep the swing bus as it is just to provide the angle reference (admittance matrix is rarely singular) and add to Jacobian a constraint on the sum of P and Q flows on the lines connected to the swing bus. The sum of all these lines out flows must be less than the power injection capability of the swing bus, both P and Q. If the constraint is violated the power flow does not converge. The original poster was concerned with the convergence when there is not enough generation, so no convergence would give them a really stern "warning" and leave them guessing what went wrong. Or you can just keep it simple and have PF implementation just print out a warning that the slack bus exceeded its capacity. Modifying the Jacobian was the first thing that came to my mind but I am not sure if it provides anything in addition of a warning to user. Jovan On Thu, Feb 18, 2016 at 3:25 AM, Jose Luis Marin <mari...@gridquant.com<mailto:mari...@gridquant.com>> wrote: But you did that, it would no longer be a powerflow calculation. There are good mathematical reasons why the standard powerflow calculation is formulated so that there should be at least one swing bus (where you specify both V and A, leaving P and Q "free"). If you specified V, A, and Pgen at the swing, this would yield an overdetermined system. You could theoretically formulate a powerflow in which the swing bus specified only A (the global angle reference) and Pgen, leaving Vref and Qgen free, but this would yield a system of equations with a severe pathology, namely a near-singular Jacobian (this originates from the fact that the full transmission admittance matrix, being a Laplacian matrix, always has a zero eigenvalue, which corresponds to a translation symmetry consisting in uniformly shifting all voltages; pinning down at least one voltage is what breaks this symmetry and recovers invertibility). However, I think you're right it would be a good idea to *warn* the user when the swing generator(s) have gone over their PMAX (or below their PMIN!). -- Jose L. Marin Grupo AIA On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilic <jovan.i...@gmail.com<mailto:jovan.i...@gmail.com>> wrote: Good point, maybe we should trow a Pgen constraint on the swing buses in the Jacobian. On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres <santiago.i...@gmail.com<mailto:santiago.i...@gmail.com>> wrote: Because the exceding generation is supplied by the swing bus. Normal power flow does not check power generation limits. El 17 feb. 2016 1:58 PM, "Bai, Wenlei" <wenlei_...@baylor.edu<mailto:wenlei_...@baylor.edu>> escribió: Dear Ray, I tried to modified load of ‘case9’ to exceed the total generation capacity purposely. To my surprise, power flow still converges. More specifically, the total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is 920.8MW Why the actual generation can be larger than its capacity? Blessings, Wenlei
Re: power flow question
Hi Jovan, Sorry, I see I misundertood. I had read your proposal as consisting in adding an *equality* constraint, instead of an *inequality* constraint. But as you say, I suspect that such thing would be equivalent to just adding a simple post-calculation check and a warning to the user when PG is out of bounds (PMIN, PMAX). -- Jose L. Marin Grupo AIA On Thu, Feb 18, 2016 at 2:05 PM, Jovan Ilicwrote: > > Jose, > > I did not suggest to turn the swing bus into a PV bus. There should be at > least one swing bus > in the system unless you formulate your PF problem as ACOPF problem which > does not need > any slack buses. > > I understand what you are saying and you are right. I'd keep the swing bus > as it is just > to provide the angle reference (admittance matrix is rarely singular) and > add to Jacobian a > constraint on the sum of P and Q flows on the lines connected to the swing > bus. The sum > of all these lines out flows must be less than the power injection > capability of the swing bus, > both P and Q. If the constraint is violated the power flow does not > converge. The original > poster was concerned with the convergence when there is not enough > generation, so > no convergence would give them a really stern "warning" and leave them > guessing what went > wrong. Or you can just keep it simple and have PF implementation just > print out a warning > that the slack bus exceeded its capacity. Modifying the Jacobian was the > first thing that > came to my mind but I am not sure if it provides anything in addition of a > warning to user. > > Jovan > > > On Thu, Feb 18, 2016 at 3:25 AM, Jose Luis Marin > wrote: > >> But you did that, it would no longer be a powerflow calculation. There >> are good mathematical reasons why the standard powerflow calculation is >> formulated so that there should be at least one swing bus (where you >> specify both V and A, leaving P and Q "free"). If you specified V, A, and >> Pgen at the swing, this would yield an overdetermined system. You could >> theoretically formulate a powerflow in which the swing bus specified only A >> (the global angle reference) and Pgen, leaving Vref and Qgen free, but this >> would yield a system of equations with a severe pathology, namely a >> near-singular Jacobian (this originates from the fact that the full >> transmission admittance matrix, being a Laplacian matrix, always has a zero >> eigenvalue, which corresponds to a translation symmetry consisting in >> uniformly shifting all voltages; pinning down at least one voltage is what >> breaks this symmetry and recovers invertibility). >> >> However, I think you're right it would be a good idea to *warn* the user >> when the swing generator(s) have gone over their PMAX (or below their >> PMIN!). >> >> -- >> Jose L. Marin >> Grupo AIA >> >> >> On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilic >> wrote: >> >>> >>> Good point, maybe we should trow a Pgen constraint on the swing buses in >>> the Jacobian. >>> >>> >>> >>> On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres < >>> santiago.i...@gmail.com> wrote: >>> Because the exceding generation is supplied by the swing bus. Normal power flow does not check power generation limits. El 17 feb. 2016 1:58 PM, "Bai, Wenlei" escribió: > Dear Ray, > > I tried to modified load of ‘case9’ to exceed the total generation > capacity purposely. > > To my surprise, power flow still converges. More specifically, the > total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ > is 920.8MW > > Why the actual generation can be larger than its capacity? > > > > Blessings, > Wenlei > > > >>> >> >
Re: power flow question
Jose, I did not suggest to turn the swing bus into a PV bus. There should be at least one swing bus in the system unless you formulate your PF problem as ACOPF problem which does not need any slack buses. I understand what you are saying and you are right. I'd keep the swing bus as it is just to provide the angle reference (admittance matrix is rarely singular) and add to Jacobian a constraint on the sum of P and Q flows on the lines connected to the swing bus. The sum of all these lines out flows must be less than the power injection capability of the swing bus, both P and Q. If the constraint is violated the power flow does not converge. The original poster was concerned with the convergence when there is not enough generation, so no convergence would give them a really stern "warning" and leave them guessing what went wrong. Or you can just keep it simple and have PF implementation just print out a warning that the slack bus exceeded its capacity. Modifying the Jacobian was the first thing that came to my mind but I am not sure if it provides anything in addition of a warning to user. Jovan On Thu, Feb 18, 2016 at 3:25 AM, Jose Luis Marinwrote: > But you did that, it would no longer be a powerflow calculation. There > are good mathematical reasons why the standard powerflow calculation is > formulated so that there should be at least one swing bus (where you > specify both V and A, leaving P and Q "free"). If you specified V, A, and > Pgen at the swing, this would yield an overdetermined system. You could > theoretically formulate a powerflow in which the swing bus specified only A > (the global angle reference) and Pgen, leaving Vref and Qgen free, but this > would yield a system of equations with a severe pathology, namely a > near-singular Jacobian (this originates from the fact that the full > transmission admittance matrix, being a Laplacian matrix, always has a zero > eigenvalue, which corresponds to a translation symmetry consisting in > uniformly shifting all voltages; pinning down at least one voltage is what > breaks this symmetry and recovers invertibility). > > However, I think you're right it would be a good idea to *warn* the user > when the swing generator(s) have gone over their PMAX (or below their > PMIN!). > > -- > Jose L. Marin > Grupo AIA > > > On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilic wrote: > >> >> Good point, maybe we should trow a Pgen constraint on the swing buses in >> the Jacobian. >> >> >> >> On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres > > wrote: >> >>> Because the exceding generation is supplied by the swing bus. Normal >>> power flow does not check power generation limits. >>> El 17 feb. 2016 1:58 PM, "Bai, Wenlei" escribió: >>> Dear Ray, I tried to modified load of ‘case9’ to exceed the total generation capacity purposely. To my surprise, power flow still converges. More specifically, the total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is 920.8MW Why the actual generation can be larger than its capacity? Blessings, Wenlei >>> >> >
Re: power flow question
But you did that, it would no longer be a powerflow calculation. There are good mathematical reasons why the standard powerflow calculation is formulated so that there should be at least one swing bus (where you specify both V and A, leaving P and Q "free"). If you specified V, A, and Pgen at the swing, this would yield an overdetermined system. You could theoretically formulate a powerflow in which the swing bus specified only A (the global angle reference) and Pgen, leaving Vref and Qgen free, but this would yield a system of equations with a severe pathology, namely a near-singular Jacobian (this originates from the fact that the full transmission admittance matrix, being a Laplacian matrix, always has a zero eigenvalue, which corresponds to a translation symmetry consisting in uniformly shifting all voltages; pinning down at least one voltage is what breaks this symmetry and recovers invertibility). However, I think you're right it would be a good idea to *warn* the user when the swing generator(s) have gone over their PMAX (or below their PMIN!). -- Jose L. Marin Grupo AIA On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilicwrote: > > Good point, maybe we should trow a Pgen constraint on the swing buses in > the Jacobian. > > > > On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres > wrote: > >> Because the exceding generation is supplied by the swing bus. Normal >> power flow does not check power generation limits. >> El 17 feb. 2016 1:58 PM, "Bai, Wenlei" escribió: >> >>> Dear Ray, >>> >>> I tried to modified load of ‘case9’ to exceed the total generation >>> capacity purposely. >>> >>> To my surprise, power flow still converges. More specifically, the >>> total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ >>> is 920.8MW >>> >>> Why the actual generation can be larger than its capacity? >>> >>> >>> >>> Blessings, >>> Wenlei >>> >>> >>> >> >
Re: power flow question
Good point, maybe we should trow a Pgen constraint on the swing buses in the Jacobian. On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torreswrote: > Because the exceding generation is supplied by the swing bus. Normal power > flow does not check power generation limits. > El 17 feb. 2016 1:58 PM, "Bai, Wenlei" escribió: > >> Dear Ray, >> >> I tried to modified load of ‘case9’ to exceed the total generation >> capacity purposely. >> >> To my surprise, power flow still converges. More specifically, the >> total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ >> is 920.8MW >> >> Why the actual generation can be larger than its capacity? >> >> >> >> Blessings, >> Wenlei >> >> >> >
Re: power flow question
Because the exceding generation is supplied by the swing bus. Normal power flow does not check power generation limits. El 17 feb. 2016 1:58 PM, "Bai, Wenlei"escribió: > Dear Ray, > > I tried to modified load of ‘case9’ to exceed the total generation > capacity purposely. > > To my surprise, power flow still converges. More specifically, the total > generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is > 920.8MW > > Why the actual generation can be larger than its capacity? > > > > Blessings, > Wenlei > > >
Re: power flow question
Wenlei, The power flow routine in MATPOWER does not enforce generation limits on real power. Exceeding the capacity does not necessarily imply a divergence of the power flow. Shri From: , Wenlei <wenlei_...@baylor.edu<mailto:wenlei_...@baylor.edu>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>> List-Post: matpower-l@cornell.edu Date: Wednesday, February 17, 2016 at 12:57 PM To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" <matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>> Subject: power flow question Dear Ray, I tried to modified load of ‘case9’ to exceed the total generation capacity purposely. To my surprise, power flow still converges. More specifically, the total generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is 920.8MW Why the actual generation can be larger than its capacity? Blessings, Wenlei
power flow question
Dear Ray, I tried to modified load of 'case9' to exceed the total generation capacity purposely. To my surprise, power flow still converges. More specifically, the total generator 'on-line capacity' is 820MW, while the 'actual generation' is 920.8MW Why the actual generation can be larger than its capacity? Blessings, Wenlei