Static Generator¶
See also
Create Function¶
-
pandapower.
create_sgen
(net, bus, p_kw, q_kvar=0, sn_kva=<Mock name='mock.nan' id='139784447464168'>, name=None, index=None, scaling=1.0, type=None, in_service=True, max_p_kw=<Mock name='mock.nan' id='139784447464168'>, min_p_kw=<Mock name='mock.nan' id='139784447464168'>, max_q_kvar=<Mock name='mock.nan' id='139784447464168'>, min_q_kvar=<Mock name='mock.nan' id='139784447464168'>, controllable=<Mock name='mock.nan' id='139784447464168'>)¶ Adds one static generator in table net[“sgen”].
Static generators are modelled as negative PQ loads. This element is used to model generators with a constant active and reactive power feed-in. If you want to model a voltage controlled generator, use the generator element instead.
All elements in the grid are modelled in the consumer system, including generators! If you want to model the generation of power, you have to assign a negative active power to the generator. Please pay attention to the correct signing of the reactive power as well.
- INPUT:
net - The net within this static generator should be created
bus (int) - The bus id to which the static generator is connected
- OPTIONAL:
p_kw (float, default 0) - The real power of the static generator (negative for generation!)
q_kvar (float, default 0) - The reactive power of the sgen
sn_kva (float, default None) - Nominal power of the sgen
name (string, default None) - The name for this sgen
- index (int, None) - Force the specified index. If None, the next highest available index
- is used
scaling (float, 1.) - An OPTIONAL scaling factor to be set customly
type (string, None) - type variable to classify the static generator
in_service (boolean) - True for in_service or False for out of service
controllable (bool, NaN) - Whether this generator is controllable by the optimal powerflow
- OUTPUT:
- index - The unique id of the created sgen
- EXAMPLE:
- create_sgen(net, 1, p_kw = -120)
Input Parameters¶
net.sgen
Parameter | Datatype | Value Range | Explanation |
name | string | name of the static generator | |
type | string | naming conventions:
“PV” - photovoltaic system
“WP” - wind power system
“CHP” - combined heating and power system
|
type of generator |
bus* | integer | index of connected bus | |
p_kw* | float | \(\leq\) 0 | active power of the static generator [kW] |
q_kvar* | float | reactive power of the static generator [kVar] | |
sn_kva | float | \(>\) 0 | rated power ot the static generator [kVA] |
scaling* | float | \(\geq\) 0 | scaling factor for the active and reactive power |
max_p_kw** | float | Maximum active power | |
min_p_kw** | float | Minimum active power | |
max_q_kvar** | float | Maximum reactive power | |
min_q_kvar** | float | Minimum reactive power | |
controllable** | bool | States if sgen is controllable or not, sgen will not be used as a flexibilty if it is not controllable | |
in_service* | boolean | True / False | specifies if the generator is in service. |
*necessary for executing a power flow calculation
**optimal power flow parameter
Electric Model¶
Static Generators are modelled as PQ-buses in the power flow calculation:

The PQ-Values are calculated from the parameter table values as:
Note
Static generators should always have a negative p_kw value, since all power values are given in the consumer system. If you want to model constant power consumption, please use the load element instead of a static generator with positive active power value. If you want to model a voltage controlled generator, use the generator element.
Note
The apparent power value sn_kva is provided as additional information for usage in controller or other applications based on panadapower. It is not considered in the power flow!
Result Parameters¶
net.res_sgen
Parameter | Datatype | Explanation |
p_kw | float | resulting active power demand after scaling [kW] |
q_kvar | float | resulting reactive power demand after scaling [kVar] |
The power values in the net.res_sgen table are equivalent to \(P_{sgen}\) and \(Q_{sgen}\).