e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
881 stars 484 forks source link

Suggestion: sgen type = "motor" by default #240

Closed miek770 closed 5 years ago

miek770 commented 5 years ago

Hi,

I'd like to propose changing the sgen default type to "motor". I've just spent a while trying to understand a weird behavior, until I realized what was going on (my generator didn't have the "motor" type). See below, there's my thought process..

I think many if not most sgens will be motors and generators, and they obviously shouldn't be modeled as current sources during short-circuit calculations. Even wind turbine generators are usually modeled as voltage sources in our studies because current sources are too unrealistic for harmonic studies, even though manufacturers often provided Northon equivalents.

It should also be made obvious here that the type can also be "motor", and that this has a HUGE impact on short-circuit calculations.

Another solution, if nobody sees a reason to keep a current source during short-circuit calculations, would be to simple disregard the "type" parameter during SC and consider all sgens as voltage sources. That'd be me favorite solution, but I might be missing something.

What do you think?

Thank you,

Michel


Issue I was originally going to submit, until I realized what was going on.

Still in the process of debugging the short-circuit calculation, I made this small test to demonstrate a bug when static generators are used. The test should either be run with test = "sgen" or test = "grid", but not both.

When running in grid mode, everything's fine. ikss_ka is 1.17 kA @ bus2 (208V), as expected (it should be around 1.8 kA with an infinite bus at the transformer's primary).

When running in sgen mode, ikss_ka reaches 17 348 kA @ bus2 (208V).

At 600V, it's what you'd expect with these parameters (6014 kA @ bus0), but there's no diminution at bus1. It looks as though the sgen ignores all impedances.

...yeah that's exactly it, 6014 kA 600 V / 208 V = 17 348 kA. They're probably modeled as current sources. I tried with type="motor" and it fixed this. Oh... OOOoooh (link to doc).*

Here's the code:

import pandapower as pp
import pandapower.shortcircuit as sc
import pandas as pd

# Use either option
#test = "sgen"
test = "grid"

net = pp.create_empty_network(name="IUSMQ", f_hz=60.0)

bus0 = pp.create_bus(net, vn_kv=0.6, name="bus0", type="n")
bus1 = pp.create_bus(net, vn_kv=0.6, name="bus1", type="n")
bus2 = pp.create_bus(net, vn_kv=0.208, name="bus2", type="n")
print(f"Buses:\n\n{net.bus}\n")

if test == "grid":
    pp.create_ext_grid(net=net, bus=bus0, s_sc_max_mva=999, rx_max=1/10, rx_min=1/10)
    print(f"Grid:\n\n{net.ext_grid}\n")

elif test == "sgen":
    p_kw = 999999
    pp.create_sgen(net,
                   bus=bus0,
                   p_kw=-p_kw,
                   sn_kva=p_kw/0.8,
                   type="sync",
                   k=5,
                   rx=1/20)
    print(f"Static generator:\n\n{net.sgen}\n")

pp.create_line(net,
               from_bus=bus0,
               to_bus=bus1,
               std_type="149-AL1/24-ST1A 10.0",
               length_km=1)
print(f"Line:\n\n{net.line}\n")

s_kva = 15
z_percent = 2.3
xr = 1.13
vsrc_percent = (z_percent**2 / (1 + xr**2))**0.5
pp.create_transformer_from_parameters(net,
                                      hv_bus=bus1,
                                      lv_bus=bus2,
                                      sn_kva=s_kva,
                                      vn_hv_kv=0.6,
                                      vn_lv_kv=0.208,
                                      vscr_percent=vsrc_percent,
                                      vsc_percent=z_percent,
                                      pfe_kw=1e-20,
                                      i0_percent=1e-20)
print(f"Transformer:\n\n{net.trafo}\n")

sc.calc_sc(net)
results = pd.merge(net.bus, net.res_bus_sc, left_index=True, right_index=True)
results
lthurner commented 5 years ago

I think many if not most sgens will be motors and generators, and they obviously shouldn't be modeled as current sources during short-circuit calculations. Even wind turbine generators are usually modeled as voltage sources in our studies because current sources are too unrealistic for harmonic studies, even though manufacturers often provided Northon equivalents.

Modeling the sgens as current source in the short-circuit calculation is very much intentional, as this is the recommended way to model converter units according to the newest revision of IEC 60909 from 2016. This is supposed to model the behaviour of PV plants or wind parks that are connected to the grid with a full inverter, see this paper: https://www.researchgate.net/publication/309430459_SHORT-CIRCUIT_CALCULATION_WITH_FULLSIZE_CONVERTERS_ACCORDING_TO_IEC_60909. I am not much of an expert on short-ciruicts myself, but if it is defined this way in the standard I would trust that it makes sense to model it that way.

I think many if not most sgens will be motors and generators

In public grids, I would actually think it is more common to have a wind park or a large PV plant connected to the grid than an asynchronous motor. That is why I chose this default behaviour. When you say sgens will in almost all cases be motors/generators, are you modeling industrial grids? Maybe there is also a difference between european and north american grids that I am not aware of.

It should also be made obvious here that the type can also be "motor", and that this has a HUGE impact on short-circuit calculations. Another solution, if nobody sees a reason to keep a current source during short-circuit calculations, would be to simple disregard the "type" parameter during SC and consider all sgens as voltage sources. That'd be me favorite solution, but I might be missing something.

For the reasons listed above, I definitely do not want to remove the current source behaviour, I think it is a very nice feature to be able to perform SC-calcualtion according to the newest revision of IEC 60909.

I do agree however that the behaviour is to implicit. What I would suggest is to not make the behaviour depend on the type, but instead to include a new parameter that can be used to explicitely set the behaviour of the generator?

miek770 commented 5 years ago

I am surprised, but if IEC 60909 says so there must be a good reason, I'll try to get my hands on it. In that case it absolutely wouldn't make sense to remove the option.

From my experience in Canada, and please keed in mind that I'm not trying to start a technical debate about this particular subject, when we model wind turbines tied to the grid, be it Vestas, GE, Siemens WTG, etc., we model then as voltage sources. My last wind farm for example had Siemens WTG with a relatively high Z1 (close to 1.0 pu), a very high Z2 (close to 400 if I recall correctly, very low negative sequence contribution), and Z0 was between Z1 and Z2. The values are only from memory, but the turbines were modelled as voltage sources in ETAP. The utility (Hydro-Québec) requested a thévenin equivalent for the complete wind farm for its network integration, not a current source. And as I mentioned, we used voltage sources for our harmonic study.

P.S.: I realize the sgen is not a sync gen and it doesn't allow you to model sequence impedances, but if you're only doing doing subtransient 3ph faults it's a great approximation.

So my statement that "many if not most sgens will be motors or generators" was influenced by this for the utility level.

And yes I fully agree with your suggestion to add a new explicit parameter. Considering all this, it's definitely the best way to do it. I'll try to submit if PR if no one beats me to it, but it might take a few days (holidays are approaching).

Thank you,

Michel

miek770 commented 5 years ago

Closing, about to push fully working #245. Let me know there if there's any further comment.