RMTD: Robust Moving Target Defence Against False Data Injection Attacks in Power Grids
Real-time detection performance.
This repo contains the code and extra simulation results supporting the paper 'Robust Moving Target Defence Against False Data Injection Attacks in Power Grids' by Wangkun Xu, Imad M. Jaimoukha, and Fei Teng. The authors are with the Control and Power Group, Dept. of EEE, Imperial College London.
Note: The current version is incomplete, detailed algorithms are coming soon.
Installation
This project requires Python packages to run. The testing OS is Windows.
- Install the latest version Anaconda to your OS.
- Create a new env in Anaconda Prompt by
conda create -n robust-mtd python=3.8.12
. - Direct to the env by
conda activate robust-mtd
. - Install all requirements by
conda install --file requirements.txt
. - Download everything to your PC in
your_path
and redirect to your path bycd your_path
.
Packages
PYPOWER
POPOWER is a power flow and optimal power flow solver. It is part of MATPOWER to the Python programming language. We will use PYPOWER as the environment to build the system matrices, implement attacks and implement the MTD.
SciPy
SciPy provides algorithms for optimization, integration, interpolation, eigenvalue problems, algebraic equations, differential equations, statistics and many other classes of problems. In specific, we use the open source optimization solve 'Sequential Least Squares Programming (SLSQP)' to solve the nonlinear programming problem.
Running and Testing
-
Change the test system, algorithm, and constraints, e.g. change everything in
input_setting.py
under the line:""" EDIT HERE : CHANGE YOUR SETTINGS HERE! """
Do not change elsewhere!
The current support tests include:
- case: IEEE case-6ww, case-14, and case-57;
- MTD perturbation ratio: $\tau=0.2,0.3,0.4,0.5$;
- Placement of D-FACTS devices: All, outcome of the 'D-FACTS Devices Placement Algorithm' (using the minimum number of D-FACTS devices to have minimum k while covering all necessary buses), and the outcome of the 'D-FACTS Devices Placement Algorithm' (using the minimum number of D-FACTS devices to have minimum k);
- hidden_MTD: True or False. Normally, the robust algorithm with complete MTD configuration is not tested with the hiddenness;
- column_constraint: True or False. If True, the constraint in principle 2 is added.
You can also change:
- The measurement noise covariance matrix;
- The FPR of BDD;
- The attack strength under test;
The code is flexible. You can also add your own system as long as it uses PYPOWER or MATPOWER to formulate.