Skip to content

About

ModelicaGridData 的个人研究修改版,用于电力系统仿真与电压、电流数据处理。 | A personal research adaptation of ModelicaGridData for power-system simulation and voltage/current data processing.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModelicaGridData

ModelicaGridData allows to generate data using an OpenIPSL phasor-domain simulation model fed with power flow solutions computed using real load data patterns. The simulations are run on a local computer to take advantage of existing computing infrastructure.

Personal research adaptation

This repository keeps the ModelicaGridData simulation workflow and adds experiment-specific voltage/current extraction and HDF5/MAT conversion scripts. Examples include hdf52mat.py, IEEEvoltage.py, IEEEcurrent.py, and the SMIB/SevenBus variants. Review hard-coded paths, model names, and sample ranges before use.

本仓库为个人研究修改版,在原有电力系统仿真流程上增加了电压、电流数据提取及 HDF5/MAT 处理脚本。运行前需要按自己的实验修改路径、模型名和样本范围。下方保留原项目安装与工作流说明;历史依赖版本不代表已验证兼容当前环境。

Quick Start

Running ModelicaGridData from a Virtual Machine

Two VirtualBox virtual machines were prepared with ModelicaGridData already set up for off-the-shelf testing. Both machines are intended for demonstration only. For configuration, check the documentation.

  • Ubuntu:
    • Login: ModelicaGridData
    • Password: ModelicaGridData
  • Windows:
    • Login: DeepGrid
    • Password: DeepGrid

To use the virtual machines, first open a terminal and activate the modgriddata conda environment.

conda activate modgriddata

Next, navigate the to the directory where ModelicaGridData is located (Documents/ModelicaGridData), and run any command. For example, to download the data from the NYISO website, do:

python main.py nyiso

Please run your nyiso script after 12:00 pm NY time. NYISO updates the data in their website at this time and uploads the measurements from the previous day.

By default, the working directories are located inside Documents in the virtual machines (both located on the main user directory): Dymola/_working_directory for Dymola and OpenModelica/_working_directory for OpenModelica. The OpenIPSL libraries are located inside Documents/ModelicaLibraries.

Installation

We recommend to install the tool dependencies in a new virtual environment with Python 3.7. Once the new environment is set up, install the following dependencies using pip:

pip install psutil && pip install matplotlib && pip install pandas && pip install tqdm && pip install sdf && pip install pyyaml && pip install h5py && pip install EMD-signal==1.2.0

Then, proceed installing the following dependencies in order:

  1. GridCal: we recommend to stick with release 4.2.0. However, newer versions should also be compatible.
  2. OMPython
  3. Dymola - Proprietary software. A license is needed. Testing has been carried out with Dymola 2021. It is not encouraged to work with newer Dymola releases (to do so, please guarantee that the Modelica Standard Library version is set to 3.2 instead of the 4.0+ release).

The OpenIPSL library has to be downloaded separately.

  • OpenIPSL - Compatible with release 1.5.0 and version 2.0.0 beta (with Dymola). OpenModelica (tested with release 1.16.2 on both Linux and Windows) is supported for version 1.5.0 only. A safe copy of the OpenIPSL versions used to develop and test this project is found here.

The installation is summarized in the step-by-step guideline in the documentation.

Description

This tool implements several functionalities such as data scrapping, massive time series power flow computations, power flow validation, massive phasor-domain dynamic simulation, and small-signal labeling.

ModelicaGridData represents a full end-to-end tool that can be used to generate big data for power systems. Such big data can be used in applications such as system identification and training for Machine Learning modules. By default, the tool uses the IEEE 14 bus model as a study case, but it can be replaced by any OpenIPSL model. The repository is shipped with the following models:

  • SMIB (SMIB)
  • Kundur Two Area (TwoAreas)
  • AVRI (AVRI)
  • IEEE9 (IEEE9)
  • IEEE14 (IEEE14)

Unfortunately, we have no function that links the power flow records to the models. It has to be done manually.

How to Use

The functionalities to validate power flow results and dispatch massive time-domain simulations are widely customizable. For this reason, the arguments are specified using the .yaml corresponding files: val_params.yaml for power flow validation and sim_params.yaml for massive time domain simulation. Check the accompanying tutorial to gain insight into the tool mechanics.

Examples

To run NYISO data from 2015 up to now, we can use the command:

python main.py nyiso --year 2015

Likewise, to run a time series power flow using the information from yesterday's load and forecast, varying three loads simultaneously, do

python main.py run_pf --loads 3

Further examples with the nyiso module are provided as Jupyter Notebooks. These files illustrate some functionalities that are not necessarily used in the code but included within the submodules.

An example on how to extract data from the is available here (Jupyter Notebook).

Troubleshooting

  • In Windows, open a Command Prompt as Administrator (important). Make sure the working directory is writable (i.e., folders and files and be created and deleted during runtime).

License

This project is licensed under the GNU Affero General Public License (GNU AGPL).

About

ModelicaGridData 的个人研究修改版,用于电力系统仿真与电压、电流数据处理。 | A personal research adaptation of ModelicaGridData for power-system simulation and voltage/current data processing.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages