This Python toolbox is designed to compare the output of Dynawo simulations with PMU measurements. In case of abnormal differences, a dedicated module helps identify the model parameters that are most likely erroneous.
- About
- Contributors
- License
- Reference paper
- Requirements
- Installation
- Settings
- How to use
- Getting started
Transmission System Operators (TSOs) ensure the safe operation of the power system through various daily simulations. The quality of these simulations heavily relies on the accuracy of the models describing the behavior of different assets.
It is crucial for TSOs to validate that the models they use accurately represent the actual behavior of the assets, particularly the generators.
One effective method to achieve this is by utilizing PMU data records to replay past events and compare the simulation outputs against the PMU measurements.
Typically, the test system consists of a generator connected to an infinite bus, where the PMU records (phase and magnitude of the voltage) serve as inputs to the simulation, conditioning the active and reactive power generation of the generator.
In cases where there are significant differences between the P and Q values from the simulation and those from the PMU, the model parameters should be adjusted to calibrate the model to better represent the actual behavior.
The toolbox in this project enables users to:
- Compare the output of a Dynawo simulation against PMU measurements.
- Perform sensitivity analysis to detect the model parameters that are most likely to influence the results.
- Manually calibrate the model parameters.
- Automatically calibrate the model parameters using optimization modules.
This code has been developped by Washington State University and RTE (French Transmission System Operator).
The main contributors are listed in AUTHORS.md.
This project and is licensed under the terms of the Mozilla Public License V2.0. See LICENSE for more information.
More details on the tool and methods used can be found in the following reference:
S. Ghimire, V. M. Venkatasubramanian and G. Torresan,
"Analysis of Optimization Algorithms for Multiple Parameter Estimation in Model Validation Problems,"
2023 North American Power Symposium (NAPS),
Asheville, NC, USA, 2023, pp. 1-6,
doi: 10.1109/NAPS58826.2023.10318793.
- Python >= 3.8.10
The package and its dependencies should be installed in a python virtual environment. First, create a virtual environment called venv:
python -m venv venvActivate the virtual environment:
source venv/bin/activateMake sure that pip is up-to-date:
(venv) pip install --upgrade pipInstall the necessary libraries:
(venv) pip install -r requirements.txtThe toolbox expects a zip file to be uploaded. This zip file must contain:
- The input files for Dynawo (job file and associated files)
- A file named measured_data.csv that contains the P and Q values measured by the PMU.
The file resources/settings.yaml needs to be updated with the path
to your dynawo exe file.
Run the main script:
streamlit run sources/main_gui_streamlit.pyThis will open a new tab in your web browser :
From there, upload the zip file.
Then, navigate to the Run Dynawo Simulation tab and click
on the Run Dynawo Simulation for the base case button.
Once the simulation has been run, the simulation and measured
plots will be available in the Visualize plots tab.
If they do not match well, it is advised to run a sensitivity
analysis to identify the parameters that are the most likely to
be erronous. Go to the Sensitivity Analysis tab, select the
parameters to consider, then click the Run Sensitivity Analysis button.
A sorted table on the right will highlight the parameters that
are most likely to need calibration.
The next step is to run the automatic calibration.
Move to the Automatic Parameter Calibration tab, then select the
parameters to calibrate, choose the optimization engine,
and click on the Run Calibration button.
New plots will be displayed in the Visualize Plots tab.
It is strongly advised to limit the number of parameters
to calibrate to a small number.
Finally, you can use the Custom Parameter Calibration tab
to manually modify the model parameters and observe
their effect in the Visualize Plots tab.
Two dummy examples are provided in the test_cases directory.
For each example, a Dynawo simulation was run using a defined set of generator parameters. Afterwards, some of these parameters were manually modified. The objective is to use the toolbox to identify which parameters were changed.
