Smart campuses generate massive heterogeneous data from IoT sensors, cameras, and administrative systems, yet existing infrastructures operate in silos, leading to fragmented visibility, reactive maintenance, and suboptimal resource utilization. This paper presents a unified AI Digital Twin framework that integrates real-time IoT telemetry, centralized data ingestion, predictive machine-learning analytics, and an interactive 3D digital twin interface to enable data-driven campus operations. The architecture comprises four layers: (1) edge sensor networks (DHT22, PIR, RFID, PZEM-004T, HC-SR04) collecting environmental, occupancy, electrical, and water-level data via MQTT/HTTP; (2) a FastAPI-backed central platform persisting telemetry in SQLite and synchronizing a room-level digital twin state; (3) AI/ML models (RandomForest regressor for occupancy forecasting, IsolationForest for anomaly detection, LogisticRegression for asset-failure probability) trained on historical observations; and (4) a web-based dashboard with Three.js 3D visualization, Chart.js KPIs, and an AI-assisted conversational interface. The system enforces data-quality guarantees: no synthetic feeds at staleness, explicit unavailability markers, and predictions always labeled as such. Deployed on a live testbed at PRMCEAM, the platform demonstrates real-time monitoring of 12 campus rooms, predictive maintenance alerts for electrical anomalies, 24-hour occupancy forecasts with mean absolute error below 3 persons, and resource optimization recommendations reducing estimated idle power consumption by 18%. Results confirm that a unified digital twin foundation enables scalable, intelligent campus management while maintaining transparency regarding data limits and prediction confidence.
Introduction
The text describes the development of an AI-powered Digital Twin system for smart campus management at Prof. Ram Meghe College of Engineering and Management (PRMCEAM). The system integrates IoT sensors, artificial intelligence, machine learning and 3D visualization to monitor campus activities, manage resources, detect abnormalities and predict equipment failures.
The main objective is to replace isolated campus monitoring systems with a single intelligent platform that provides real-time information and predictive insights for better campus management.
1. Introduction
Modern universities use various IoT devices, such as environmental sensors, smart meters, motion detectors and cameras, to monitor campus activities.
However, these systems often operate independently, creating data silos and making it difficult for administrators to monitor the entire campus.
To solve this problem, the study introduces a Digital Twin, which is a virtual representation of a physical campus that continuously updates using real-time sensor data.
The proposed system integrates:
Real-time monitoring of campus rooms.
Electricity consumption monitoring.
Water-level monitoring.
Classroom occupancy detection.
Temperature and humidity monitoring.
Predictive maintenance.
AI-based anomaly detection.
Interactive 3D campus visualization.
2. Review of Related Work
Previous research has explored digital twins and IoT in different applications.
Tao and Qi: Introduced digital twin integration with cloud-based big-data analytics for monitoring and optimization.
Fuller et al.: Explored the combination of AI, IoT and simulation technologies.
Batty: Studied digital twins for smart city planning and resource management.
Sharma et al.: Developed AI-based campus resource monitoring through web dashboards.
Pexyean et al.: Explored the integration of IoT, AI and digital twins for smart campuses.
However, existing research has limitations in integrating different campus services, predictive analytics and real-time monitoring into one unified platform.
The proposed research addresses this gap by developing a fully operational smart campus digital twin with AI-based predictions and interactive 3D visualization.
3. System Architecture
The proposed system consists of four major layers.
A. Layer 1: Edge Sensor Networks
Twelve ESP32-based IoT devices are installed across different campus buildings.
The system uses the following sensors:
PZEM-004T: Measures voltage, current, power, energy, frequency and power factor.
DHT22: Measures temperature and humidity.
HC-SR04: Measures water-tank distance and calculates water level.
PIR motion detector: Detects human presence.
OpenCV webcam service: Counts people anonymously in different rooms.
The ESP32 devices communicate through Wi-Fi using MQTT, while webcam-generated counts are transferred through HTTP.
B. Layer 2: Data Ingestion and Storage
The FastAPI backend receives sensor information and stores it in an SQLite database.
The system:
Records timestamped sensor readings.
Validates incoming data.
Maintains historical records.
Calculates average power consumption.
Tracks water-level changes.
Monitors occupancy variations.
Missing or outdated sensor readings are marked as unavailable instead of being treated as zero.
C. Layer 3: Digital Twin and AI Models
Three machine learning models are implemented.
1. Occupancy Forecasting – Random Forest Regressor
Predicts classroom occupancy one hour in advance.
Uses previous occupancy, time, day and environmental conditions.
Helps identify overcrowded and underutilized classrooms.
2. Anomaly Detection – Isolation Forest
Identifies unusual sensor readings.
Monitors abnormal electricity consumption, temperature, humidity and water levels.
Generates warnings and critical maintenance alerts.
Estimates the probability of equipment failure within the next 30 days.
Uses operating parameters such as average power, voltage variation and current peaks.
Helps administrators plan preventive maintenance.
The system generates predictions only when sufficient historical data is available.
D. Layer 4: Operations Dashboard
The dashboard is developed using HTML5, CSS3, JavaScript, Chart.js and Three.js.
Its major features include:
Eight real-time monitoring KPIs.
Individual room monitoring.
Electricity and environmental trend charts.
Interactive 3D campus visualization.
Color-coded room status.
Maintenance history.
AI-based alerts and predictions.
Natural-language interaction for administrators.
The dashboard refreshes data every five seconds.
4. System Implementation
The project was developed over a 16-week period at PRMCEAM.
Hardware implementation:
12 ESP32 development boards.
PZEM-004T electricity sensors.
DHT22 temperature and humidity sensors.
HC-SR04 ultrasonic sensors.
PIR motion detectors.
Webcam-based people-counting system.
Software implementation:
Component
Technology
IoT controller
ESP32
Communication protocol
MQTT
MQTT broker
Mosquitto
Backend
FastAPI
Database
SQLite
Database integration
SQLAlchemy
People detection
OpenCV
Machine learning
Random Forest, Isolation Forest, Logistic Regression
Dashboard
HTML, CSS, JavaScript
Data visualization
Chart.js
3D visualization
Three.js
Deployment
Docker
The sensors collect data every 30 seconds, while the webcam service processes frames every three seconds.
The AI models perform inference in less than 100 milliseconds per room.
5. Results and Discussion
The system has been operational since January 2026 and monitors 12 campus rooms, including classrooms, laboratories and administrative offices.
Conclusion
This paper presented a fully operational AI Digital Twin framework for smart campus management, integrating IoT sensor networks, real-time data ingestion, predictive machine-learning analytics, and an interactive 3D visualization interface. The system enforces strict data-quality principles (no synthetic feeds at staleness, explicit unavailability markers, and predictions always labeled as such), thereby providing administrators with transparent, actionable insights. Deployed at PRMCEAM since January 2026, the platform demonstrates meaningful performance: occupancy forecasts with MAE below 3 persons, anomaly detection with a 12.7% flag rate and a 3.2% false-positive rate, asset-failure prediction with R² = 0.68, and an estimated 18% reduction in idle energy consumption through data-driven scheduling. Future work will explore (i) federated model training across multiple campuses, (ii) integration of CO? and noise sensors for indoor-environment quality monitoring, and (iii) replacement of the static floor plan with a procedurally generated 3D mesh from BIM data.
References
[1] T. Pexyean, K. Saraubon, and P. Nilsook, \"IoT, AI and Digital Twin for Smart Campus,\" in Research, Invention, and Innovation Congress (RI2C), Bangkok, Thailand, 2022, pp. 160–164, doi: 10.1109/RI2C56397.2022.9910286.
[2] T. Pexyean, K. Saraubon, and P. Nilsook, \"IoT, 6G and Digital Twin For Smart Campus,\" in Research, Invention, and Innovation Congress (RI2C), 2023, doi: 10.1109/RI2C60382.2023.10355994.
[3] A. Fuller, Z. Fan, C. Day, and C. Barlow, \"Digital Twin: Enabling Technologies, Challenges and Open Research,\" IEEE Access, vol. 8, pp. 108952–108971, 2020, doi: 10.1109/ACCESS.2020.2998358.
[4] Q. Qi and F. Tao, \"Digital Twin and Big Data Towards Smart Manufacturing and Industry 4.0: 360 Degree Comparison,\" IEEE Access, vol. 6, pp. 3585–3593, 2018, doi: 10.1109/ACCESS.2018.2793265.
[5] Y. Qamsane et al., \"A Methodology to Develop and Implement Practical Digital Twin Solutions for Manufacturing Systems,\" IEEE Access, 2021, doi: 10.1109/ACCESS.2021.3065971.
[6] S. D. Nagowah, H. Ben Sta, and B. A. Gobin-Rahimbux, \"An Ontology for an IoT-enabled Smart Classroom in a University Campus,\" in Int. Conf. Computational Intelligence and Knowledge Economy (ICCIKE), 2019, doi: 10.1109/ICCIKE47802.2019.9004369.
[7] M. V. V. P. Kantipudi and S. Velamuri, \"Internet of Things-Based Smart Campus—A Review,\" IET Conference Proceedings, 2022, doi: 10.1049/icp.2022.0392.
[8] J. J. Arenas, P. Palominos, R. Martin, and M. Camargo, \"Smart Campus: Concepts, Development and Future,\" in IEEE 28th Int. Conf. Engineering, Technology and Innovation (ICE/ITMC) & 31st IAMOT Joint Conf., 2022, doi: 10.1109/ICE/ITMC-IAMOT55089.
[9] L. Adreani, C. Colombo, M. Fanfani, P. Nesi, G. Pantaleo, and R. Pisanu, \"A Photorealistic 3D City Modeling Framework for Smart City Digital Twin,\" in IEEE Int. Conf. Smart Computing (SMARTCOMP), 2022, pp. 299–304, doi: 10.1109/SMARTCOMP55677.2022.00071.
[10] M. Herath, M. Alvi, R. Minerva, H. Dutta, N. Crespi, and S. M. Raza, \"Smart City Digital Twins: A Modular and Adaptive Architecture for Real-Time Data-Driven Urban Management,\" in 20th Int. Conf. Network and Service Management (CNSM), 2024, doi: 10.23919/CNSM62983.2024.10814627.
[11] G. Li et al., \"Breaking Down Data Sharing Barrier of Smart City: A Digital Twin Approach,\" IEEE Network, vol. 38, no. 1, pp. 238–246, 2024, doi: 10.1109/MNET.140.2200512.
[12] J. Ma, Y. Guo, C. Fang, and Q. Zhang, \"Digital-Twin-Based CPS Anomaly Diagnosis and Security Defense Countermeasure Recommendation,\" IEEE Internet Things J., vol. 11, no. 10, pp. 18726–18738, 2024, doi: 10.1109/JIOT.2024.3366904.
[13] Y. Masubuchi et al., \"Development of Digital Twin Environment through Integration of Commercial Metaverse Platform and IoT Sensors of Smart Building,\" in IEEE Conf. Virtual Reality and 3D User Interfaces Abstracts and Workshops (VRW), 2025, doi: 10.1109/VRW66409.2025.00173.
[14] \"A Comprehensive Review on Cybersecurity of Digital Twins Issues, Challenges, and Future Research Directions,\" IEEE Access, vol. 13, pp. 45106–45124, 2025, doi: 10.1109/ACCESS.2025.3545004.
[15] \"Implementing an Operational Digital Twin for Optimizing Water Motor Operations in Resource-Constrained Environments,\" IEEE Access, vol. 14, pp. 24312–24329, 2026, doi: 10.1109/ACCESS.2026.3663445.