Code Monkey home page Code Monkey logo

flep-sgs2's Introduction

FLEP-SGS2

A Flexible and Low-cost Evaluation Platform for Smart Grid Systems Security assessment. Power systems simulation tools are integrated with open-source software running on Raspberry Pis. FLEP-SGS2 allows to investigate the performance of the testbed components and evaluate different cyber-attack scenarios on the power system operation while providing a user-friendly interface.

Cite FLEP-SGS2

If you find our code useful, please cite

@inproceedings{konstantinou2019isgt,
    title={FLEP-SGS$^2$: a Flexible and Low-cost Evaluation Platform for Smart Grid Systems Security},
    author={Konstantinou, Charalambos and Sazos, Marios and Maniatakos, Michail},
    booktitle={Innovative Smart Grid Technologies (ISGT), 2019 IEEE PES},
    pages={1--5},
    year={2019},
    organization={IEEE}
}

Getting started

Follow the instructions below to instantiate FLEP-SGS2.

Equipment needed:

Raspberry Pi 2 with a UniPi extension board as the Bus6 overcurrent protection relay. 
Raspberry Pi 2 as the SCADA monitoring system. 
Raspberry Pi 2 as the State Estimation algorithm calculation. 
NI USB-6001 DAQ device as the data acquisition for the HIL simulation.
A Windows machine to run the Matlab/Simulink IEEE 9bus model and Labview code for UDP/Modbus communication.

The platform:

alt text

The testbed architecture:

Prerequisites

PLC code uploader - OpenPLC

PLC ladder logic programming- PLCOpenEditor

SCADA monitoring software - pvbrowser

Instructions

  1. Make sure that the devices are assigned the following static IPs:
SCADA RPi IP: 192.168.1.1
Relay RPi IP: 192.168.1.2
State Estimation (SE) RPi IP: 192.168.1.3
Matlab/LabView PC IP: 192.168.1.4
  1. Install OpenPLC and PLCOpenEditor software on the relay RPi (with the UniPi board).

  2. Connect the push buttons, the relay outputs and the analog input to the UniPi board:

FAULT P1: I01
FAULT P2: I02
FAULT P3: I03
LOCAL TRIP: I04
LOCAL CLOSE: I05
TRIP OUTPUT: Relay 1 (normally open)
CLOSE OUTPUT: Relay 2 (normally open)
Analog output from USB 6001 DAQ : AI1
  1. To run the software necessary for the OpenPLC please follow the below steps:
Open RPi terminal
$ cd PLCopen\ Editor/
$ python PLCOpenEditor.py (to load the programming interface)
file->Open
PLCopen Editor->RelayIOR.xml (Instantaneous Overcurrent Relay)
File->Generate Program
Pi->OpenPLC_v2->st_files->relay
Open new terminal
$ cd OpenPLC_v2/
$ sudo nodejs server.js
Open RPi web browser
Type 127.0.0.1:8080 at URL
Choose file
OpenPLC_v2->st_files->relay.st (choose all files on the right bottom to appear)
Upload program
Repeat steps to change the type of the relay (IOR, DTOR, IDMTOR)
  1. Install the pvbrowser software on the SCADA RPi.

  2. To run the software necessary for the pvbrowser please follow the below steps:

Copy the folder smart_grid
Open RPi terminal
$ pvdevelop
file->open->smart_grid->pvs.pvproject
Deamon->Modbus->Open->SE.mkmodbus->Compile
Close
Deamon->Modbus->Open->MATLAB.mkmodbus->Compile
Close
Deamon->Modbus->Open->PLC.mkmodbus->Compile
Close
Open new terminal
$ cd smart_grid
$ ./SE
$ ./MATLAB
$ ./PLC
Go to pvdevelop interface
Action->Make
Action->StartServer
Action->pvbrowser
  1. For the codes of the State Estimation as well as detailed documentation please go to the below GitHub repository:

FLEP-SGS2 - State Estimation

  1. Choose the simulation software and code of your choice and connect the Analog/digital signals from the NI-USB6001 to the relay RPi. If you choose Matlab/Simulink to develop your model use those blocks for UDP communication, real time simulation and for connection to the DAQ device:

Simulink UDP send

Simulink UDP receive

Simulink real time sync

Simulink data acquisition

  1. PCAP traffic snapshots, captured on Wireshark software, of the following 2 scenarios are included at this repository:

SCADA Monitoring:
a) Send trip command to the relay
b) Send close command to the relay

Relay Monitoring:
a) Fault detected by the relay
b) Trip coil activated and report the trip coil to SCADA
c) Close command sends back to the relay after the fault is clear

  1. For Man-In-The-Middle attacks you can install and use the Ettercap software.

For more information or additional data from this setup please contact Marios Sazos at [email protected]

flep-sgs2's People

Contributors

mariossa avatar momalab avatar

Watchers

 avatar  avatar

Forkers

jiweitian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.