How gauravpanjwani889/finalyearproject works
This is a Smart Grid stability and fault-diagnosis platform. Operators configure grid and protection parameters in the dashboard, submit a simulation, and receive Simulink-derived waveforms, electrical metrics, breaker telemetry, and ML fault diagnosis; they can also inspect past runs and model health. The graph includes the frontend, backend orchestration and analytics, the MATLAB/Simulink engine, and the ML diagnosis branch. Several feature modules are represented from the README and source index; their internal wiring is omitted where the excerpts do not establish it.
Main entry points: routes.py Simulation Routes · views Monitoring Views · App.tsx Dashboard Shell · api_router.py ML API & Run Results
Components 23
Operator Dashboard
- Dashboard Shell
frontend/src/App.tsx - Grid Controls
frontend/src/views/ControlsView.tsx - Monitoring Views
frontend/src/views - Network Schematic
frontend/src/components/NetworkSchematic.tsx - Breaker Telemetry
frontend/src/components/TripBreakerChart.tsx - Waveform Charts
frontend/src/components/WaveformChart.tsx - Diagnosis Card
frontend/src/components/MlDiagnosisCard.tsx - Typed API Client
frontend/src/services/api.ts
Backend API
- FastAPI Application
backend/main.py - Simulation Routes
backend/routes.py - Request & Result Schemas
backend/models.py - Run Result Store
backend/routes.py
Simulation & Analytics
- Simulation Runner
backend/sim_runner.py - MATLAB Session Manager
backend/matlab_engine.py - Simulink Solver
matlab/main_model.slx - Electrical Analytics
backend/analytics.py
ML Diagnosis
- ML API & Run Results
fault_ml/api_router.py - Fault Predictor
fault_ml/ml_predict.py - Signal Features
fault_ml/ml_features.py - Signal Preparation
fault_ml/ml_signals.py - Classifier Training
fault_ml/train.py
Other components
- Grid Operator
- MATLAB Engine
Connections 26
- Grid Operator → Grid Controls: configures
frontend/src/views/ControlsView.tsx - Grid Controls → Dashboard Shell: updates parameters
frontend/src/App.tsx - Dashboard Shell → Typed API Client: submits simulation
frontend/src/App.tsx - Typed API Client → Simulation Routes: HTTP requests
frontend/src/services/api.ts - FastAPI Application → Simulation Routes: mounts routes
backend/main.py - FastAPI Application → ML API & Run Results: mounts routes
backend/main.py - Simulation Routes → Request & Result Schemas: validates & returns
backend/routes.py - Simulation Routes → Simulation Runner: runs simulation
backend/routes.py - Simulation Runner → MATLAB Session Manager: uses session
backend/sim_runner.py - MATLAB Session Manager → MATLAB Engine: starts session
backend/matlab_engine.py - MATLAB Engine → Simulink Solver: executes model
README.md - Simulation Routes → Electrical Analytics: processes telemetry
backend/routes.py - Simulation Routes → Run Result Store: stores results
backend/routes.py - Simulation Routes → ML API & Run Results: stores run prediction
backend/routes.py - ML API & Run Results → Fault Predictor: requests prediction
fault_ml/api_router.py - Fault Predictor → Signal Features: extracts features
fault_ml/ml_predict.py - Fault Predictor → Signal Preparation: prepares signals
fault_ml/ml_predict.py - Classifier Training → Signal Features: uses features
fault_ml/train.py - Classifier Training → Signal Preparation: uses signals
fault_ml/train.py - Dashboard Shell → Monitoring Views: selects view
frontend/src/App.tsx - Monitoring Views → Network Schematic: renders schematic
frontend/src/views/OverviewView.tsx - Monitoring Views → Breaker Telemetry: renders telemetry
frontend/src/views/OverviewView.tsx - Monitoring Views → Waveform Charts: renders waveforms
frontend/src/views/WaveformsView.tsx - Monitoring Views → Diagnosis Card: renders diagnosis
frontend/src/views/DiagnosticsView.tsx - Typed API Client → ML API & Run Results: fetches run diagnosis
frontend/src/services/api.ts - Run Result Store → Dashboard Shell: returns run results