Experimental repo for Newton Raphson initial value problem
- Download the latest version of Python from the official website.
- Run the installer and ensure you check the box "Add Python to PATH".
- Follow the installation steps.
- Download the latest version of Python from the official website.
- Open the downloaded package and follow the installation steps.
- Open a terminal.
- Install Python using your package manager. For example, on Debian-based systems:
sudo apt update sudo apt install python3
- Open a terminal or command prompt.
- Navigate to your project directory:
cd /path/to/your/project
- Create a virtual environment using the
venv
module:python3 -m venv .venv
.\.venv\Scripts\activate
source .venv/bin/activate
- Ensure your virtual environment is activated.
- Install the required packages from
requirements.txt
:pip install -r requirements.txt
This notebook provides an introduction to the pandapower
library, including its initialization and internal workings. It is designed to help you understand the basics of power system modeling and analysis using pandapower
in terms of accessing internal states and specify initial states. More detailed tutorial can be found via the official website.
This notebook demonstrates the implementation of a deep neural network (DNN) pipeline. It includes data preprocessing, model training, and evaluation steps. It is intended to guide you through the process of building and deploying a DNN model in the context of pandapower
for your project.
This repository includes four base network and functionality to generate training networks based on parameterization of key parameters.
The data generation is handled by the net_gen.py
script, which uses the definitions provided in simple_net/transformer_high_pu.py
, simple_net/high_generation_injection.py
complete_net/high_generation_segmented_grid.py
and complete_net/transformer_high_pu_segmented_grid.py
to create networks with varying parameters.
-
High Generation Injection Network (
HighGenInjectionNet
)- This network simulates a high generation injection scenario.
- It consists of:
- A source bus at 10kV (node_0).
- A line with 1 ohm resistance connecting to another bus (node_1).
- A load connected to node_1.
- Parameters:
vm_pu
: Voltage magnitude at the external grid bus.p_mw
: Active power generation.q_mvar
: Reactive power generation.init_vm_pu
: Initial voltage magnitudes for the power flow calculation.
-
Transformer High PU Network (
TrafoHighPuNet
)- This network simulates a transformer with high per-unit values.
- It consists of:
- Two buses at 10kV.
- A transformer connecting the two buses.
- An external grid connected to the first bus.
- A load connected to the second bus.
- Parameters:
vm_pu
: Voltage magnitude at the external grid bus.p_mw
: Active power load.q_mvar
: Reactive power load.vn_lv_kv
: Low voltage side nominal voltage of the transformer.init_vm_pu
: Initial voltage magnitudes for the power flow calculation.
-
Large Networks with High Generation Injection (
HighGenSegmentedNet
)- This network simulates a high generation injection scenario with multiple segments.
- It consists of:
- A source bus at 10kV.
- Multiple segments with lines and distributed generation.
- An external grid connected to the first bus.
- Parameters:
vm_pu
: Voltage magnitude at the external grid bus.total_p_gen
: Total active power generation distributed across segments.total_q_gen
: Total reactive power generation distributed across segments.p_mw
: Active power generation at the last bus.q_mvar
: Reactive power generation at the last bus.init_vm_pu
: Initial voltage magnitudes for the power flow calculation.
-
Large Networks with High PU Transformer (
TrafoHighPuSegmentedNet
)- This network simulates a transformer with high per-unit values and multiple segments.
- It consists of:
- Two buses at 10kV.
- A transformer connecting the two buses.
- Multiple segments with lines, 10kv bus, and distributed generation.
- An external grid connected to the first bus.
- Parameters:
vm_pu
: Voltage magnitude at the external grid bus.vn_lv_kv
: Low voltage side nominal voltage of the transformer.total_p_gen
: Total active power generation distributed across segments.total_q_gen
: Total reactive power generation distributed across segments.init_vm_pu
: Initial voltage magnitudes for the power flow calculation.
The net_gen.py
script provides functions to generate multiple instances of these networks with randomized parameters within specified ranges:
-
sample_net_high_gen_inj_xs(N)
:- Generates
N
instances ofHighGenInjectionNet
with randomized parameters. - Parameter ranges:
VM_PU_RANGE = [0.9, 3.0]
P_MW_RANGE = [0.0, 1000.0]
Q_MVAR_RANGE = [0.0, 0.5]
INIT_VM_PU_MIN = 0.9
INIT_VM_PU_MAX = 3.0
- Generates
-
sample_net_trafo_high_pu_xs(N)
:- Generates
N
instances ofTrafoHighPuNet
with randomized parameters. - Parameter ranges:
VM_PU_RANGE = [0.9, 3.0]
P_MW_RANGE = [0.0, 1000.0]
Q_MVAR_RANGE = [0.0, 0.5]
VN_LV_KV_RANGE = [0.9, 3.0]
INIT_VM_PU_MIN = 0.9
INIT_VM_PU_MAX = 3.0
- Generates
-
sample_net_high_gen_segmented_xl(N)
:- Generates
N
instances ofHighGenSegmentedNet
with randomized parameters. - Parameter ranges:
VM_PU_RANGE = [0.9, 3.0]
TOTAL_P_GEN_RANGE = [0.0, 1000.0]
TOTAL_Q_GEN_RANGE = [0.0, 0.5]
P_MW_RANGE = [0.0, 1000.0]
Q_MVAR_RANGE = [0.0, 0.5]
INIT_VM_PU_MIN = 0.9
INIT_VM_PU_MAX = 3.0
- Generates
-
sample_net_trafo_high_pu_segmented_xl(N)
:- Generates
N
instances ofTrafoHighPuSegmentedNet
with randomized parameters. - Parameter ranges:
VM_PU_RANGE = [0.9, 3.0]
VN_LV_KV_RANGE = [0.9, 3.0]
TOTAL_P_GEN_RANGE = [0.0, 1000.0]
TOTAL_Q_GEN_RANGE = [0.0, 0.5]
INIT_VM_PU_MIN = 0.9
INIT_VM_PU_MAX = 3.0
- Generates
These functions return lists of network instances that can be used for training or analysis purposes.
You can call these functions and classes like the fllowing:
from data import HighGenInjectionNet, sample_net_high_gen_inj_xs
nets = sample_net_high_gen_inj_xs(2)
nets[0].run_power_flow()