Thanks Jose. I’ve added that to the manual as you suggested.
I also agree with your suggestions for Chris. However, I’m curious about your
[*] note. In the situation you describe, it’s just that the Newton method will
diverge, correct? The original solution will still be a solution of the power
flow equations won’t they?
Ray
> On Apr 30, 2016, at 2:01 PM, Jose Luis Marin <[email protected]> wrote:
>
>
> Interesting, I didn't know that enforcing Q-limits also affects generators
> when their bus-type is set to PQ. Ray, I suggest documenting this behavior
> in the manual, probably at the end of the last paragraph in Section 4.1.
> Something to the effect of "... Note also that this option affects generators
> even if the bus they are attached to is already of type PQ."
>
> Going back to Chris's problem, I suggest you approach this as consisting of
> two orthogonal issues:
> Solving with Q-limits enforced vs. solving without
> Solving with a given generator running as PQ-type vs. running as PV-type (by
> manually switching it)
> With regards to the first issue, I suggest to start by analyzing the behavior
> of your case *without* enforcing Q limits: in particular, pay close attention
> to the QG injections obtained *in the solution* for those gens operating as
> PV-type (and also the specified QG for those operating as PQ), and *compare*
> those to your specified [QMIN, QMAX] values. If you observe any large
> violation, then solving this case with Q limits enforced will yield a *very*
> different solution.
>
> Concerning the second issue, the main thing to check when manually switching
> a given bus from PQ-type to PV-type, is that the gen setpoint VG has to be
> set to the bus voltage VM obtained in the previous solution, otherwise your
> next solution could be again very different. Conversely, when manually
> switching a bus from PV-type to PQ-type [*], you have to specify a gen
> injection QG equal to the value obtained in the previous solution.
>
> [*] As I mentioned before, the switch in this direction is not always
> guaranteed to give you the same solution. If the setpoint VG is decreased
> too much, or if the real power PG is increased too much, you can end up with
> a case that is solvable with the bus running as PV, but unfeasible when the
> bus is running as PQ (under the switching procedure described here).
> Technically: this happens when you're running the PV generator at the
> unstable branch of its Q-V curve.
>
> --
> Jose L. Marin
> Grupo AIA
>
>
>
> On Fri, Apr 29, 2016 at 10:12 AM, Chris Prokop <[email protected]
> <mailto:[email protected]>> wrote:
> Hi,
>
> oh, I just realized that the Q-limits also hold on PQ-buses, hence the
> generators are limited to it - I wouldn't have thought that. So without
> Q-limits the results are the same - huch.
>
> Anyway, when changing the bus to a PV-bus I've got the problem that the Q of
> the PV-buses (generators) are calculated way to high. At a first step runpf
> makes the bus with highest gap between the Q-limit and the Q-result to a PQ
> bus, in my case this is the reference bus -> the problem starts (even if I
> increase the ref-Qmax to 1e20, Qmin to -1e20 - then the problem repeats after
> converting the other 2 PV buses to PQ).
>
> (in a few hours I'll be without internet connection for 8 days so I wanna
> apologize for not responding during the next days)
>
> Nice regards,
> Chris
>
> Am 28.04.2016 um 23:48 schrieb Jose Luis Marin:
>>
>> Looking at those records I think I may have misunderstood what you're doing.
>> I thought you were converting a given PQ bus (BUS_I=246) into PV, but the
>> generator record you're showing is attached to BUS_I=1 instead.
>>
>> To be precise, I thought you were starting from (numbers made up for this
>> example):
>>
>> bus_i type Pd Qd Gs Bs area Vm Va baseKV
>> zone Vmax Vmin
>> 246 1 15.37 1.12 0 0 3 1 0 20
>> 4 2 0.6;
>>
>> And, assuming that the solution for that starting case gave for instance
>> V=1.0375 on BUS_I=246, then making these changes to the case:
>>
>> bus_i type Pd Qd Gs Bs area Vm Va baseKV
>> zone Vmax Vmin
>> 246 1 0.0 0.0 0 0 3 1 0 20
>> 4 2 0.6;
>>
>> plus adding this generator to the bus:
>> bus Pg Qg Qmax Qmin Vg mBase
>> status Pmax ...
>> 246 -15.37 0 999.99 -999.99 1.0375 100 1
>> 1.3 ...
>>
>> Then, provided you are not enforcing MVAR limits (which may change a lot of
>> things), you should obtain the same powerflow solution in this second case
>> (with Qg near -1.12, in this example),
>>
>>
>> Did I miss something?
>>
>>
>> --
>> Jose L. Marin
>> Grupo AIA
>>
>>
>>
>> On Thu, Apr 28, 2016 at 7:26 PM, Chris Prokop <[email protected]
>> <mailto:[email protected]>> wrote:
>> Hi,
>>
>> @ Jose L. Marin:
>> I used a generator in both cases, hence it should be the correct sign
>> (should result in the same I guess). Anyway P was very small, around 1e-6 MW.
>>
>> I'm not sure if I've modelled something wrong: S_base is 100, my generator
>> is at bus 1 (at the end zeros(1,12)):
>> bus Pg Qg Qmax Qmin Vg mBase status
>> Pmax ...
>> 1 0.4 0 0.7 -0.45 1.04 100
>> 1 1.3 ...
>>
>> And the PQ-bus:
>> bus_i type Pd Qd Gs Bs area Vm Va
>> baseKV zone Vmax Vmin
>> 246 1 2.64e-06 -30 0 0 3 1 0
>> 20 4 2 0.6;
>>
>> I've tried another thing: I changed the PQ-bus from -30 to +30 Mvar (e.g.
>> mpc.bus(1, 4) = 0) and for another time I did the same with the generator
>> from +30 to -30 Mvar (e.g. mpc.gen(1, 3)=30), the other part (gen vs. load)
>> was always set to 0. The result was not (!) the same... hm? - I guess this
>> is the reason for the problem.
>> With the bus I get results from -8 Mvar up to 30 Mvar with v=0.635 to 1.46
>> whereas with the generator the voltage varies only within -1 Mvar and +1
>> Mvar (appr. 1.01 pu to appr. 1.04 pu), for other Q-injections the voltage
>> doesn't change.
>>
>> I uploaded the plot under: http://de.tinypic.com/r/350pk02/9
>> <http://de.tinypic.com/r/350pk02/9>
>>
>> Do you have any idea why?
>>
>> Thanks for your help, nice regards,
>> Chris
>>
>>
>>
>>
>> Am 28.04.2016 um 17:41 schrieb Jose Luis Marin:
>>>
>>> Those are certainly some crazy Mvar injections! Just checking: are you
>>> sure you reversed the signs of P properly when switching the type of that
>>> bus from PQ (load) to PV (gen with neg real power), also taking care of
>>> making the corresponding changes in the bus row and adding a new gen row?
>>>
>>> If you could share your case file I could try to give you a quick
>>> diagnostic.
>>>
>>> --
>>> Jose L. Marin
>>> Grupo AIA
>>>
>>>
>>>
>>> On Thu, Apr 28, 2016 at 5:19 PM, Chris Prokop <[email protected]
>>> <mailto:[email protected]>> wrote:
>>> Thanks for your responses.
>>>
>>> @ Ray Zimmerman:
>>> I can't find the problem here. If I set Q=+0.7 Mvar (cap.), the voltage at
>>> this bus is about 1.04 p.u., with Q=-0.7 Mvar (ind.) it decreases to 1.02
>>> p.u., the power flow converges as expected (+the result is as expected).
>>> Only converting this bus into a PV-bus results in the problem mentioned
>>> above (with or without limits). I don't get why the Newton Power Flow
>>> returns for example 1e3 Mvar for this bus as a result, as only <1 Mvar
>>> should have been enough reactive power.
>>> Before solving the case the reactive power of the generators at the
>>> PV-buses are (variable gen in runpf):
>>> - Reference bus: 0 Mvar
>>> - PV-Bus1: 0 Mvar
>>> - PV-Bus2: 64.4 Mvar
>>> - PV-Bus3 (the problematic one): 0.1 Mvar
>>> after solving it (after pfsoln), the variable gen is filled with:
>>> - Reference bus: 1e6 Mvar
>>> - PV-Bus1: 2.7e4 Mvar
>>> - PV-Bus2: 9.6e3 Mvar
>>> - PV-Bus3 (the problematic one): -600 Mvar
>>> whereas the next most reactive power intensive gen&bus has less than 5e2
>>> Mvar. I don't understand where the power comes from/goes to...
>>>
>>> @ Jose Luis Marin:
>>> If I use the voltage from the PQ-calculation (e.g. 20.6668/20 p.u.) there
>>> remains the same problem. Also without Q-limits I get the the problem...
>>> Vg=1 p.u. actually works as a PV-bus, Vg=1.01 or Vg=1.02 etc. don't.
>>>
>>>
>>> Nice regards,
>>> Chris
>>>
>>> 2016-04-28 16:04 GMT+02:00 Ray Zimmerman <[email protected]
>>> <mailto:[email protected]>>:
>>> It sounds like the voltage at that bus may be very sensitive to the
>>> reactive power injection. One thing you might try to get some idea of this
>>> is to change that bus back to PQ with the reactive at the lower limit, then
>>> try running a few cases with slightly perturbed values of the reactive
>>> power at that generator and see how the voltage at the bus changes.
>>>
>>> Ray
>>>
>>>
>>>> On Apr 28, 2016, at 8:40 AM, Chris Prokop <[email protected]
>>>> <mailto:[email protected]>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I'm using Matpower (v5.0b1, but the same holds for v5.1) for a 220 kV/110
>>>> kV/20 kV-grid quite a while. The grid has 1 reference bus (220 kV), 2
>>>> PV-buses (220 kV) and >100 PQ-buses (110 kV & 20 kV). So far calculating
>>>> the grid using runpf with Newton has never been a problem.
>>>>
>>>> Now I've tried to change a 20 kV PQ-bus to a PV-bus with the Q-limits +0.7
>>>> for Q_max and -0.45 for Q_min (considering mpopt =
>>>> mpoption('pf.enforce_q_lims', 1)). If I set Vg of the generator to 1.05 I
>>>> get the error:
>>>> "All 4 remaining gens exceed their Q limits : INFEASIBLE PROBLEM"
>>>> whereas when using 1.00 as Vg there is no problem (then the generator is
>>>> at its lower Q-limit, hence converted to PQ). If the problem is infeasible
>>>> the result of pfsoln in runpf are Q-values of all 4 PV generators (Slack+3
>>>> PV) that are out of their limits. Why is there such a big difference
>>>> between the case V=1.05 and V=1.00?
>>>>
>>>> As a info: the Slack has a Q-Limit of +-10000, both of the already
>>>> existing PV buses +720/-290, according to case_info the total generation
>>>> is -300 MW+j10 Mvar, the total load 300 MW-j50 Mvar, but I've tried
>>>> several scenarios which are no problem when using the PQ instead of the
>>>> PV-bus (or the Vg=1).
>>>>
>>>> Does anybody experience a similar problem/has an idea how to fix it?
>>>>
>>>> Nice regards,
>>>> Chris
>>>
>>>
>>>
>>
>>
>
>