Pandapower Documentation

0 views
Skip to first unread message

Lashawna Vorhees

unread,
Aug 5, 2024, 4:50:24 AM8/5/24
to brilancualse
Thisrepository provides data and code to use SimBench within the software pandapower.pandapower combines the data analysis library pandas and the power flow solver PYPOWER to create an easy to use network calculation programaimed at automation of analysis and optimization in power systems.

pandapower is a joint development of the research group Energy Management and Power System Operation (e2n), University of Kassel and the Department for Distribution SystemOperation at the Fraunhofer Institute for Energy Economics and Energy System Technology (IEE), Kassel.


In addition to these both institutes, to SimBench the Institute of Power Systems and Power Economics (IAEW) of the RWTH Aachen University and the Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3) of the Technical University of Dortmund contributed.


Some formats may be similar to the format used by power-grid-model, but use a different underlying data structure.While we do not formally support those formats, you may find examples in this documentation for some of them.


pandapipes is an easy to use network calculation program aimed at automation of analysis of district heatingand gas systems. It utilizes the data analysis library pandas and is also closely related tothe power systems calculation tool pandapower.


In this subsection, we will give an example on how to set up an environment in grid2op if you alreadyhave some data that represents loads and productions at each steps. This paragraph aims at making more concretethe description of the environment shown previously.


you have a grid in a given format (for example .example) and knows how to convert it to a format for whichyou have a backend (typically: PandapPowerBackend, that reads pandapower json file). In that case, you convert thegrid and you put the converted grid in the directory and you are good. For converters to pandapower, you canconsult the official pandapower documentation at .


In all cases, after you converted your file, name it grid.something (for example grid.json if your grid iscompatible with pandapowerr backend) into the folder EXAMPLE_FOLDER (for exampleC:\Users\Me\Documents\my_grid2op_env)


Once the previous steps have been performed, you can try to load your environment in grid2op. This processis rather easy, but unfortunately, from our own experience, it might not be successful on the first trial.


We tried our best to display useful error messages if the environment is not loading properly. If you experienceany trouble at this stage, feel free to post a github issue on the official grid2op repository -france/grid2op/issues (you might need to log in on a github account for such purpose)


Mosaik as a co-simulation tool organizes the data exchange between simulatorsand coordinates the execution of the connected simulaters. This part is called mosaik-core and contains mosaik itself and APIs for multipleprogramming languages.


The components listed above and provided by the mosaik team, have usually a documentation directly in their repository.For components which need a more detailled documentation to describe how they work, the documentation is integrated here:


Below is an example code snippet that connects the input simulator with the output simulator and executes ten time steps.After the simulation is done, the dictionary including the values received by the input simulator is printed.


These components are developed by external users of mosaik and we can not guarantee or supportthe flawless integration of these tools with mosaik.If you also have implemented additional tools for mosaik, simulation models or adapters,feel free to contact us at mosaik [ A T ] offis.de to be listed here.


nestli (Neighborhood Energy System Testing towards Large-scaleIntegration) is a co-simulation environment for benchmarking the performance of BACS (building automation andcontrol systems). Is uses EnergyPlus and FMUs with mosaik.


Our project aims to simulate potential cyber attacks on an electrical power grid. The electrical grid is a high impact target, which makes it very enticing for attackers. Disrupting an electrical grid can have catastrophic effects for a city and it's citizens, and making it important to keep it secured. Our project will allow city planners, electric companies, and security firms a tool that will allow them to test the impact of cyber attacks against the electrical grid, and help them enhance and validate security measures for their own electric grid. The simulated electrical grid will be created using the following open source projects: pandapower to simulate a transmission grid dss-python for modeling a distribution grid OpenDER to simulate users of the power grid HELICS Co-Simulation to facilitate the simulation between all of these programs.


I am a senior in cyber security engineering and I will be a concurrent student next semester going for my Masters of Science in Cyber Security. I currently have my Sec+ certification and am working with Kingland Systems as a SOC Tier-1 Analyst on the Security Operations team.


I am a senior in cyber security engineering working towards my graduation in May. I've had an internship at Ag Leader Inc in Ames as a Software Engineer. After graduation I plan to enter the workforce after moving to Denver.


My name is Matthew Nevin, I am a senior in Electrical Engineering at Iowa State University with a focus on power systems. I have industry experience with the power grid and substation design. I currently work remotely for Electrical Consultants Inc. as a Substation Design Intern.


Hi! I am a Cyber Security Engineer at Iowa State, I have worked 2 internships at Principal Financial Group as both a Cyber Defense Analyst and Engineer. I have a focus in Cyber Defense Architecture and Forensics relating to said architecture or incidents.


The implementation of power-grid-model is validated using multiple test cases present in tests/data folder.There are 2 simple grid test case examples of power-grid-model validated Vision and GAIA.A thorough validation is done using minimal test cases of each component and 2 test networks described in the following sections.


The cases of a differences in modelling between both the libraries are handled by theoretical workarounds.For example in power-grid-model, source impedance is included for all component sequences.In pandapower, source impedance is present only in positive sequence network whereas it considered in all sequence components in power-grid-model.Source impedance is then set to a low value to match this modelling difference.Hence, the result of source component here should be ignored.The output result attributes of power-grid-model are validated at a tolerance value of \(\pm10^-5\) of respective unit.Both the iterative algorithms: Newton Raphson and Iterative current are validated.


A node can have 2 states: energized and non-energized which is presented in the first grid.The second grid example uses a line to validate node operation for voltages other than 0 or 1 p.u.The circuit diagram for test cases of the 2 grids is as follows:


All the remaining supported components for which conversion to power-grid-model is supported are also connected to this level.They include: line, reactance, special transformer, load, synchronous generator, shunt and zig-zag transformer.


The cases are built taking into consideration the modelling differences between Vision and power-grid-model mentioned in the power-grid-model-io documentation.The node voltages and branch power flows are validated for symmetrical calculation.For asymmetrical output only the result attributes being validated are the ones which can be exported to excel. (ie. node voltages and branch currents)The absolute tolerances here are set to the least count of the Vision result export: till ie. till V and kW level.


The short circuit calculations are validated against manual calculations based on electrical engineering theory.The test grid is designed to encompass most grid configurations of short circuit that might be interesting.


There are 4 cases for the 4 types of fault: three_phase, single_phase_ground, two_phase, two_phase_ground.Each case is tested for minimum and maximum voltage scaling.Each case has multiple scenarios. They are combinations of following situations:


The Numba @jit decorator fundamentally operates in two compilation modes,nopython mode and object mode. In the go_fast example above,nopython=True is set in the @jit decorator, this is instructing Numba tooperate in nopython mode. The behaviour of the nopython compilation modeis to essentially compile the decorated function so that it will run entirelywithout the involvement of the Python interpreter. This is the recommended andbest-practice way to use the Numba jit decorator as it leads to the bestperformance.


Should the compilation in nopython mode fail, Numba can compile usingobject mode, this is a fall back mode for the @jit decorator ifnopython=True is not set (as seen in the use_pandas example above). Inthis mode Numba will identify loops that it can compile and compile those intofunctions that run in machine code, and it will run the rest of the code in theinterpreter. For best performance avoid using this mode!


First, recall that Numba has to compile your function for the argument typesgiven before it executes the machine code version of your function, this takestime. However, once the compilation has taken place Numba caches the machinecode version of your function for the particular types of arguments presented.If it is called again the with same types, it can reuse the cached versioninstead of having to compile again.


A really common mistake when measuring performance is to not account for theabove behaviour and to time code once with a simple timer that includes thetime taken to compile your function in the execution time.


A good way to measure the impact Numba JIT has on your code is to time executionusing the timeit modulefunctions, these measure multiple iterations of execution and, as a result,can be made to accommodate for the compilation time in the first execution.

3a8082e126
Reply all
Reply to author
Forward
0 new messages