Python implementation of a method to locate the source of forced oscillations in a power system.
Interarea oscillations are emerging as serious operational concerns in modern power systems because of changing intermittent generation patterns and unusual transmission power flows. Moreover, forced oscillations can interact with natural electromechanical modes and the resonant oscillations can be observed in wide regions of the interconnections (e.g. January 11, 2019 eastern system event). Source location of such resonant forced oscillation events is especially challenging. Oscillations may be observed using synchrophasors, but their installation costs and communication requirements are such that the power grid observability using synchrophasors remains limited.
On the other hand, SCADA measurements have been in implementation since the 1970s and they outnumber the synchrophasors. Specifically, SCADA measurements are available at almost every synchronous generator as well as at the bulk interconnection interface for most of the renewable generators in the power grid.
Since SCADA data is sampled asynchronously and in a somewhat random fashion, they may be sufficient in order to locate the source of forced ocillation.
The code in this github project is an implementation of a statistical method for localizing the source of forced oscillations in a power system using SCADA data.
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 is licensed under the terms of the Mozilla Public License V2.0. See LICENSE for more information.
If you use this implementation in your work or research, it would be appreciated if you could quote the following document in your publications or presentations:
SCADA-Based Detection and Analysis of Oscillations with Inferential Statistics
- Python >= 3.8.10
It is recommended to install the package and its dependencies within a python virtual environment:
python3 -m venv venv
source venv/bin/activateMake sure that pip is up-to-date:
pip install --upgrade pipInstall the necessary libraries:
pip install -r requirements.txtThe test case data are expected to be provided as a json file:
{
"osc_start": "20210430_04h53m00",
"osc_end": "20210430_05h07m00",
"scada_file": "path/to/scada_data.csv"
}The scada_file should be either the absolute path, or the relative path from the working directory.
Its content is expected to be formatted like below, using the comma as separator.
| time | P1 | P2 |
|---|---|---|
| 20210411 1h45 | 0 | -336 |
| 20210411 1h45 | 0 | -338 |
If using the web interface, the settings will be read from
the default settings file : resources/settings.yaml.
If using the command line interface, it is possible to specify a different custom settings file.
However, these values must be modified with caution.
The command line has the following form:
python3 sources/oasis_run.py --input-file nrt/template_test_case/template_test_case.jsonIn addition to --input-file , it is possible to specify two other parameters:
- --output-folder (optional): the folder where the outputs will be written.
By default they will be written in
default_output_folder/within the OASIS project folder. - --settings-file (optional): a yaml file describing the settings.
The default file is
resources/settings.yaml.
- Call streamlit from the command line in order to open a web browser:
streamlit run sources/oasis_gui.py- Load the json file that contains the SCADA data using the Browse files button.
- The various parameters that are being used in the algorithm can be checked (optional)
- Click the Run algorithm button.
The following files will be found in the output folder:
- A log file (.log)
- The plots of the SCADA values for the channels that have been evaluated as suspicious (.html)
- A json file (.json) that provides useful information when using OASIS in an automated environment
