How islam4562/diplom-scada-edp120 works
This repository is a browser-based SCADA simulator for an electric arc furnace, with operator controls, live process monitoring, alarms, trends, and AI-assisted analysis. The main workflow is: the operator uses the web interface to control or monitor a simulated heat; the FastAPI backend advances the furnace model, distributes snapshots, and invokes AI processing; operators can review anomaly findings and analysis history. PostgreSQL stores process and AI records, while Groq provides optional LLM analysis. The README is empty, and sampled excerpts omit some wiring, so uncertain relationships are not shown.
Main entry points: main.py FastAPI service · db.py Database access · ai_engine.py AI facade · scada.js WebSocket client
Components 18
Operator interface
- SCADA pages
frontend - WebSocket client
frontend/static/scada.js - Trends view
frontend/trends.html - Alarms view
frontend/alarms.html - Journal view
frontend/journal.html - Parameters view
frontend/params.html - AI view
frontend/ai.html
Simulation runtime
- FastAPI service
backend/main.py - Furnace simulator
backend/simulator.py - Trend history
backend/main.py - Alarm state
backend/simulator.py
AI analysis
- AI facade
backend/ai_engine.py - Anomaly detector
backend/ai_engine.py - LLM analyst
backend/ai_engine.py
Persistence
- Database access
backend/db.py - PostgreSQL
Other components
- Operator
- Groq API
Connections 22
- Operator → SCADA pages: uses
- SCADA pages → WebSocket client: loads
- WebSocket client → FastAPI service: sends controls
- FastAPI service → WebSocket client: streams snapshots
- FastAPI service → Furnace simulator: advances and reads
- Furnace simulator → FastAPI service: returns snapshot
- FastAPI service → Trend history: records points
- FastAPI service → AI facade: processes snapshots
- FastAPI service → Alarm state: reads and acknowledges
- AI facade → Anomaly detector: detects anomalies
- AI facade → LLM analyst: requests analysis
- LLM analyst → Groq API: requests completion
- Anomaly detector → Database access: loads history
- AI facade → Database access: saves findings
- LLM analyst → Database access: saves analyses
- FastAPI service → Database access: reads history
- Database access → PostgreSQL: queries and writes
- Operator → Trends view: reviews trends
- Operator → Alarms view: reviews alarms
- Operator → Journal view: reviews journal
- Operator → Parameters view: views parameters
- Operator → AI view: requests analysis