predicting and simulating TCN National Grid using Nigeria's 24-bus 330KV actual Data
# GridWatch - Real-time Grid Stability Monitor
A complete, modular solution for monitoring power grid stability using machine learning models trained on 24-bus and 50-bus systems.
## Features
- Real-time stability prediction with visual gauge
- Voice alarm system for critical events
- Demo replay mode with historical fault scenarios
- Support for 24-bus and 50-bus system models
- Risk trend visualization
- Mock mode for immediate testing without trained models
## Prerequisites
- Node.js (v16+)
- Python (3.9+)
- pip
## Quick Start
### Backend Setup
```bash
cd backend
pip install -r requirements.txt
uvicorn api:app --reload
```
The API will run on
localhost
### Frontend Setup
```bash
cd frontend
npm install
npm run dev
```
The app will run on
localhost
## Project Structure
```
grid-guardian-ai/
├── backend/
│ ├── api.py # FastAPI server
│ ├── model_loader.py # Model management
│ ├── adapter.py # Input transformation
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main application
│ │ ├── components/
│ │ │ └── Gauge.jsx # Risk gauge component
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ ├── package.json
│ └── tailwind.config.js
├── models/ # Place your .pkl files here
└── assets/
```
## Adding Your Models
Place your trained model files in the `models/` directory:
- `24bus_model.pkl` for 24-bus system
- `50bus_model.pkl` for 50-bus system
If models are not found, the system will use mock predictions for demo purposes.
## Demo Script (60 seconds)
1. (0:00) "This is GridWatch, a real-time stability monitor based on thesis work with 24 and 50-bus systems."
2. (0:15) Click '24-Bus', move sliders - "System in stable state. Low risk, green indicators."
3. (0:25) Click 'Replay Demo' - "Replaying historical fault scenario..."
4. (0:40) Gauge hits Red, Voice triggers - "AI detects voltage collapse precursor 3 seconds befo …