Skip to content

Commit

Permalink
Merge branch 'develop' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jkupka committed Jul 15, 2021
2 parents b05826e + 79c8fdc commit 052b07c
Show file tree
Hide file tree
Showing 95 changed files with 117,861 additions and 2,519 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/github_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ name: pandapower
on:
push:
branches: '*'
paths-ignore:
- 'CHANGELOG.rst'
pull_request:
branches: [ master, develop ]
paths-ignore:
- 'CHANGELOG.rst'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
Expand All @@ -31,6 +35,7 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .
pip install matplotlib python-igraph
pip install ortools
if ${{ matrix.python-version == '3.7' }}; then python -m pip install pypower; fi
if ${{ matrix.python-version != '3.6' }}; then python -m pip install numba; fi
- name: Install Julia
Expand Down Expand Up @@ -62,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8']
python-version: ['3.6', '3.7', '3.8', '3.9']

steps:
- uses: actions/checkout@v2
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
Change Log
=============

[2.6.0]- 2021-03-09
[2.7.0]- 2021-07-15
----------------------
- [ADDED] Optimized the calculation of single/selected buses in 1ph/2ph/3ph short-circuit calculation
- [ADDED] Power station units with gen and trafo designated with "ps_trafo_ix" for short-circuit calculation
- [ADDED] Multiple example networks and network variations from IEC 60909-4
- [ADDED] OR-Tools implementation of linprog solver
- [ADDED] Efficient PTDF calculation on large grid
- [ADDED] toolbox function replace_pq_elmtype()
- [ADDED] Alternative constructor for DiscreteTapControl to use net.trafo.tap_step_percent to determine vm_lower_pu and vm_upper_pu based on vm_set_pu
- [ADDED] Characteristic object that represents a piecewise-linear characteristic
- [ADDED] CharacteristicControl that implements adjusting values in net based on some other input values in the grid
- [ADDED] USetTapControl that adjusts the setpoint for a transformer tap changer, based on a specified result variable (e.g. i_lv_ka)
- [CHANGED] Short-circuit gen calculation parameter "rkss_pu" to "rkss_ohm" according to IEC 60909 example
- [CHANGED] ConstControl can now also change attributes of other controllers, if the parameter "variable" is defined in the format "object.attribute" (e.g. "object.vm_set_pu")
- [CHANGED] ConstControl is initialized with level=-1 and order=-1 by default to make sure that it runs before other controllers
- [CHANGED] ConstControl now writes values from the datasource to net at time_step instead of control_step, which ensures that the values for the time step are set before running the initial power flow
- [CHANGED] replaced naming for "inductive" or "ind" by "underexcited" and "capacitive" or "cap" for "overexcited"

[2.6.0]- 2021-03-09
----------------------
- [ADDED] Factorization mode instead of inversion of Ybus in short-circuit calculation.
- [ADDED] Optimized the calculation of single/selected buses in 1ph/2ph/3ph short-circuit calculation.
- [ADDED] New options for run_control to 'continue on divergence' and 'check each level' PR #1104.
Expand Down
Binary file added doc/about/p_q_reference_system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion doc/about/units.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,14 @@ The value should not be relevant in most applications since all power values are

**Signing System**

There are three elements that have power values based on the generator viewpoint (positive active power means power generation), which are:
The reference system for bus elements can be summarized with the following figure:

.. image:: p_q_reference_system.png
:width: 12em
:alt: in consumer frame convention (load-like elements), P is positive for consumption Q is positive for absorption (underexcited behavior, decreases voltage). For generator frame convention (gen-like elements), the opposite applies.
:align: center

There are three bus elements that have power values based on the generator viewpoint (positive active power means power generation), which are:
- gen
- sgen
- ext_grid
Expand Down
4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = "2.6"
version = "2.7"
# The full version, including alpha/beta/rc tags.
release = "2.6.0"
release = "2.7.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
27 changes: 26 additions & 1 deletion doc/control/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ ConstControl
==============
.. _ConstControl:
This controller is made for the use with the time series module to read data from a DataSource and write it to the net.
The controller can write the values either to a column of an element table (e.g. net.load.p_mw) or an attribute of another object that is
stored in an element table (e.g. another controller, net.controller.object). To change a controller attribute, the variable must be defined
in the format "object.attribute" (e.g. "object.set_vm_pu").
Note that ConstControl writes values to net in time_step, in order to set the values of the time step before the initial power flow.
If ConstControl is used without a data_source, it will reset the controlled values to the initial values, preserving the initial net state.

.. autoclass:: pandapower.control.controller.const_control.ConstControl
:members:
Expand All @@ -32,7 +37,8 @@ Continuous Tap Control
**********************
.. autoclass:: pandapower.control.controller.trafo.ContinuousTapControl.ContinuousTapControl
:members:



-------------

**********************
Expand All @@ -42,3 +48,22 @@ Discrete Tap Control
.. autoclass:: pandapower.control.controller.trafo.DiscreteTapControl.DiscreteTapControl
:members:

CharacteristicControl
===============

The following controllers that use characteristics are predefined within the pandapower control module.

**********************
CharacteristicControl
**********************
.. autoclass:: pandapower.control.controller.characteristic_control.CharacteristicControl
:members:

-------------

**********************
USetTapControl
**********************

.. autoclass:: pandapower.control.controller.trafo.USetTapControl.USetTapControl
:members:
11 changes: 6 additions & 5 deletions doc/elements/gen_par.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
**Parameter**;**Datatype**;**Value Range**;**Explanation**
name;string;;name of the generator
type;string;"| naming conventions:
| *""sync""* - synchronous generator
| *""async""* - asynchronous generator
type;string;"| naming conventions:
| *""sync""* - synchronous generator
| *""async""* - asynchronous generator
";type variable to classify generators
bus*;integer;;index of connected bus
p_mw*;float;:math:`\leq` 0;the real power of the generator [MW]
Expand All @@ -17,6 +17,7 @@ max_q_mvar**;float;;Maximum reactive power
min_q_mvar**;float;;Minimum reactive power
vn_kv***;float;;Rated voltage of the generator
xdss_pu***;float;:math:`>` 0;Subtransient generator reactance in per unit
rdss_pu***;float;:math:`>` 0;Subtransient generator resistence in per unit
rdss_ohm***;float;:math:`>` 0;Subtransient generator resistence in ohm
cos_phi***;float;:math:`0 \leq` 1;Rated generator cosine phi
in_service*;boolean;True / False;specifies if the generator is in service.
in_service*;boolean;True / False;specifies if the generator is in service
power_station_trafo*;integer;;index of the power station trafo (short-circuit relevant).
6 changes: 4 additions & 2 deletions doc/elements/trafo_par.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vk0_percent***;float;:math:`\geq` 0;zero sequence relative short-circuit voltage
vkr0_percent***;float;:math:`\geq` 0;real part of zero sequence relative short-circuit voltage
mag0_percent***;float;:math:`\geq` 0;"z_mag0 / z0
ratio between magnetizing and short circuit impedance (zero sequence)"
mag0_rx***;float;;zero sequence magnetizing r/x ratio
mag0_rx***;float;;zero sequence magnetizing r/x ratio
si0_hv_partial***;float;:math:`\geq` 0;zero sequence short circuit impedance distribution in hv side
vector_group***;String;'Dyn','Yyn','Yzn','YNyn'; Vector Groups ( required for zero sequence model of transformer )
shift_degree*;float;;transformer phase shift angle
Expand All @@ -30,4 +30,6 @@ tap_phase_shifter;bool;;defines whether the transformer is an ideal phase shifte
parallel;int;:math:`>` 0;number of parallel transformers
max_loading_percent**;float;:math:`>` 0;Maximum loading of the transformer with respect to sn_mva and its corresponding current at 1.0 p.u.
df;float;1 :math:`\geq` df :math:`>` 0;derating factor: maximal current of transformer in relation to nominal current of transformer (from 0 to 1)
in_service*;boolean;True / False;specifies if the transformer is in service.
in_service*;boolean;True / False;specifies if the transformer is in service
oltc*;boolean;True / False; specifies if the transformer has an OLTC (short-circuit relevant)
power_station_unit*;boolean;True / False; specifies if the transformer is part of a power_station_unit (short-circuit relevant).
24 changes: 12 additions & 12 deletions doc/networks/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@ If you like to study a more advanced and thus more complex network, please take
Simple Example Network
=====================================

The following example contains all basic elements that are supported by the pandapower format. It is a simple example to show the
The following example contains all basic elements that are supported by the pandapower format. It is a simple example to show the
basic principles of creating a pandapower network.

.. autofunction:: pandapower.networks.example_simple

.. image:: ../../tutorials/pics/example_network_simple.png
:alt: alternate Text
:align: center
:align: center

The stepwise creation of this network is shown in the `pandapower tutorials <https://www.pandapower.org/start/#interactive-tutorials->`_.


Multi-Voltage Level Example Network
=====================================

The following example contains all elements that are supported by the pandapower format. It is a more
realistic network than the simple example and of course more complex. Using typically voltage levels
for european distribution networks (high, medium and low voltage) the example relates characteristic
topologies, utility types, line lengths and generator type distribution to the various voltage levels.
To set network size limits the quantity of nodes in every voltage level is restricted and one medium
voltage open ring and only two low voltage feeder are considered. Other feeders are represented by
The following example contains almost all elements that are supported by the pandapower format. It is a more
realistic network than the simple example and of course more complex. Using typically voltage levels
for european distribution networks (high, medium and low voltage) the example relates characteristic
topologies, utility types, line lengths and generator types spread over the voltage levels.
To set network size limits the quantity of nodes in every voltage level is restricted and one medium
voltage open ring and only two low voltage feeder are considered. Other feeders are represented by
equivalent loads. As an example one double busbar and one single busbar are considered.

.. autofunction:: pandapower.networks.example_multivoltage

.. image:: ../../tutorials/pics/example_network.png
:width: 42em
:alt: alternate Text
:align: center

The stepwise creation of this network is shown in the `pandapower tutorials <https://www.pandapower.org/start/#interactive-tutorials->`_.
The stepwise creation of this network is shown in the `pandapower tutorials <https://www.pandapower.org/start/#interactive-tutorials->`_.
2 changes: 1 addition & 1 deletion doc/plotting/matplotlib/generic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If there are no geocoordinates in a network, generic coordinates can be created.
- networkx
- graphviz

Two avoid having two compile C libraries, precompiled wheels are available on https://www.lfd.uci.edu/%7Egohlke/pythonlibs/ (unofficial)
To avoid having to compile C libraries, precompiled wheels are available on https://www.lfd.uci.edu/%7Egohlke/pythonlibs/ (unofficial)


Generically created geocoordinates can then be plotted in the same way as real geocoordinates.
Expand Down
34 changes: 17 additions & 17 deletions doc/shortcircuit/current_source.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Current Source Elements
================================

Full converter elements, such as PV plants or wind parks, are modeled as current sources:

.. image:: bus_current.png
:width: 8em
:align: center

All static generator elements are assumed to be full converter elements except if the type is specified as "motor", in which case they are treated as asynchronous machines.

The inductive short circuit current is calculated from the parameters given in the sgen table as:

.. math::
\underline{I}_k = -j \cdot \frac{k \cdot s\_n\_kva}{\sqrt{3} \cdot vn\_kv}
where :math:`s\_n\_kva` is the rated power of the generator and :math:`k` is the ratio of nominal to short circuit current. :math:`vn\_kv` is the rated voltage of the bus the generator is connected to.
Current Source Elements
================================

Full converter elements, such as PV plants or wind parks, are modeled as current sources:

.. image:: bus_current.png
:width: 8em
:align: center

All static generator elements are assumed to be full converter elements except if the type is specified as "motor", in which case they are treated as asynchronous machines.

The inductive short circuit current is calculated from the parameters given in the sgen table as:

.. math::
\underline{I}_k = -j \cdot \frac{k \cdot s\_n\_kva}{\sqrt{3} \cdot vn\_kv}
where :math:`s\_n\_kva` is the rated power of the generator and :math:`k` is the ratio of nominal to short circuit current. :math:`vn\_kv` is the rated voltage of the bus the generator is connected to.
Loading

0 comments on commit 052b07c

Please sign in to comment.