A Python package for analyzing and creating SEL (Schweitzer Engineering Laboratories) .rdb relay database files.
Developed by AOUF Nihed, Electrical Engineering student at ESGEE (École Supérieure de Génie Électrique), during an internship with Ateam Pro-tech (official partner of SEL Schweitzer Engineering Laboratories), as part of building SEL_Connect.
The package provides utilities to:
- Analyze SEL .rdb files and extract their internal structure
- Extract logic sections containing protection and control logic
- Convert text-based relay settings into valid .rdb format
- Work with SEL relay configuration data programmatically
pip install SEL_Rdbpip install -e ".[dev]"git clone https://github.com/<your-username>/SEL_Rdb.git
cd SEL_Rdb
pip install .#### Analyze an RDB file
sel-rdb-analyze path/to/file.rdb
#### List streams in an RDB file
sel-rdb-list path/to/file.rdb
#### Extract logic sections
sel-rdb-extract-logic path/to/file.rdb
#### Create an RDB file from a text file
sel-rdb-create path/to/settings.txt path/to/output.rdbimport sel_rdb
#### Analyze an RDB file
sel_rdb.analyze_rdb_file("path/to/file.rdb")
#### List streams
streams = sel_rdb.list_streams("path/to/file.rdb")
#### Extract logic
logic = sel_rdb.extract_logic_from_file("path/to/file.rdb")
#### Create an RDB file
sel_rdb.create_rdb_file("path/to/settings.txt", "path/to/output.rdb")The package includes three real-world case studies demonstrating different types of SEL relays:
- SEL-710 Motor Protection Relay - Comprehensive motor protection with overcurrent, voltage, and frequency protection
- SEL-710-5 Advanced Motor Protection Relay - Enhanced motor protection with additional features
- SEL-751A Feeder Protection Relay - Distribution feeder protection with reclosing and breaker failure functions
These case studies are located in the Case_Study directory and can be converted to RDB format using the package.
For detailed instructions, see the Case Studies Documentation or try the
examples/case_studies_workflow.py script.
- SEL .rdb files use the OLE2 structured storage format.
- Streams typically store configuration, logic equations, device info, communications, and metering data.
- Implementation uses the olefile library for parsing and a template-based approach for creating valid .rdb files.
- Python 3.6+
- olefile
- openpyxlIf you use this package in your research, please cite it as:
@misc{SEL_Rdb,
author = {Aouf, Nihed},
title = {SEL_Rdb: A Python toolkit for SEL relay .rdb database files},
year = {2025},
journal = {GitHub},
howpublished = {\url{https://github.com/AoufNihed/SEL_Rdb}},
}
