EGAT BESS RCU Firmware Documentation¶
Welcome to the EGAT Battery Energy Storage System (BESS) Rack Control Unit (RCU) Firmware documentation.
Project Overview¶
The BESS RCU Firmware is an industrial control system designed for battery rack management and safety monitoring in EGAT's energy storage installations. This firmware runs on ARM64-based industrial gateways, managing communication between PLCs, Power Conversion Systems (PCS), and Battery Management Systems (BMS).
Core Functionality¶
- 🔌 Multi-Protocol Communication
- Modbus TCP/RTU (PLC integration)
- CAN Bus J1939 (PCS/BMS communication)
-
Digital I/O (Safety interlocks)
-
⚡ Power Control
- Bidirectional power commands (0-100kW)
- Real-time PCS control
-
Safety limit enforcement
-
🛡️ Safety Systems
- Emergency stop handling (<50ms response)
- Gas detection monitoring
- Multi-level fault management
-
Watchdog protection
-
📊 Data Management
- Multi-rack BMS monitoring (up to 8 racks)
- Real-time logging
- Status reporting to SCADA
Quick Start¶
Installation¶
# Clone repository
git clone https://github.com/DDC-NDRS/EGAT_BESS_RCU_FW.git
cd EGAT_BESS_RCU_FW
# Install dependencies with Poetry
poetry install
Basic Usage¶
from bess_rcu.drivers.modbus import ModbusTCPDriver, DriverMode
from bess_rcu.drivers.can import SocketCANDriver
# Initialize Modbus server for PLC communication
modbus_driver = ModbusTCPDriver(
host="0.0.0.0",
port=502,
mode=DriverMode.SERVER
)
# Initialize CAN driver for PCS/BMS communication
can_driver = SocketCANDriver(
channel="can0",
bitrate=500000
)
# Start drivers
await modbus_driver.connect()
await can_driver.connect()
Running Tests¶
# Run all tests
poetry run pytest
# Run with coverage
poetry run pytest --cov --cov-report=html
# Run specific test module
poetry run pytest tests/test_drivers.py -v
Architecture¶
┌─────────────────────────────────────────────────────┐
│ Application Layer (Python) │
│ - State Machine, Business Logic, Safety Monitor │
├─────────────────────────────────────────────────────┤
│ Protocol Layer │
│ - Modbus Server/Client (PLC, Gas Sensor) │
│ - CAN Bus (PCS, BMS) │
├─────────────────────────────────────────────────────┤
│ Hardware Abstraction Layer │
│ - GPIO, CAN, Serial, Watchdog │
├─────────────────────────────────────────────────────┤
│ Operating System (Debian ARM64) │
│ - Linux kernel, drivers, systemd │
└─────────────────────────────────────────────────────┘
Technology Stack¶
- Platform: ARM64 Debian 12 (Bookworm)
- Python: 3.11+
- Communication:
pymodbus- Modbus TCP/RTUpython-can- CAN Bus interfacecantools- DBC file parsing- Testing: pytest, pytest-cov
- Quality: black, pylint, mypy
- Documentation: MkDocs, mkdocstrings
Key Features¶
Protocol Drivers¶
Unified driver architecture supporting both server and client modes:
- Modbus TCP/RTU: PLC communication and sensor polling
- CAN Bus: PCS and BMS integration with DBC support
- Digital I/O: Safety interlocks and status indicators
Safety-Critical Systems¶
- Emergency stop processing (<50ms)
- Hydrogen gas monitoring (Cubic ATRS-1032)
- Insulation resistance monitoring (isoCHA425HV)
- Multi-level fault escalation
- Watchdog timer protection
Multi-Device Support¶
- Up to 8 battery racks per RCU
- Concurrent PLC connections
- BMS data aggregation
- PCS power coordination
Project Status¶
- Current Version: 0.0.1 (Development)
- Python: 3.11+
- Platform: ARM64 Linux
- License: Proprietary (EGAT Project)
Development Phases¶
- ✅ Phase 1: Foundation & Core Protocols
- 🔄 Phase 2: Device Integration
- 📋 Phase 3: Safety Systems
- 📋 Phase 4: Testing & Validation
- 📋 Phase 5: Deployment
Navigation¶
For Developers¶
- Development Setup - Get started with development
- Project Architecture - System design overview
- API Reference - Complete API documentation
For Project Managers¶
- Task Roadmap - 204 tasks across 5 phases
- Agile Scrum Framework - 15 sprints, 844 story points
- GitHub Projects - Issue tracking workflow
For Contributors¶
- Contributing Guide - How to contribute (see CONTRIBUTING.md in repository)
- Code of Conduct - Community guidelines (see CODE_OF_CONDUCT.md in repository)
Support¶
For questions or issues:
- 📧 Email:
es@ndrsolution.com - 🐛 Issues: GitHub Issues
- 📖 Documentation: This site
Built with ❤️ by NDR Solution Team