Home

Awesome

Copyright © 2023, Georgia Institute of Technology. All rights reserved.

ml4acopf benchmark

Machine Learning for AC Optimal Power Flow(ACOPF) benchmark for VNNCOMP

Environment Setup

To set up the environment, follow these steps:

  1. Create the environment using the command: conda env create -f env.yaml
  2. Activate the environment using the command: conda activate onnx-vnnlib-env

The benchmark files are located in the onnx and vnnlib folders:

To reproduce vnnlib files, run: python generate_properties.py

Vnnlib description

Input:

+- a% perturbation of the reference active and reactive load + random noise between -b% and b%, where a and b are self-defined values.

Output:

Check the properties of the NN output

For example, we are interested in if power balance violation is within some threshold:

for each bus i

where pd_i and qd_i refer to the active and reactive load at each bus respectively.


Inference

The code to run inference is presented in the main.py file.

Example

Take 14-bus system as an example:

Parameters


Onnx model description

Input: pd/qd

dim: (2L) = 22

Output: pg/qg/vm/va/pf/pt/qf/qt/thrm_1/thrm_2/p_balance/q_balance

dim: (2G + 4N + 6E) = 186

Compute graph