Modeling and Simulation of Indoor Temperature Dynamics Using Random Forest and Multi-Layer Perceptron Methods
Abstract
Modeling and simulating indoor temperature changes is crucial for improving the energy efficiency of HVAC systems in smart buildings. This study created and compared two models, Random Forest and Multi-Layer Perceptron (MLP), to study indoor temperature changes and make 24-hour temperature predictions. The dataset used contained 97,606 readings from IoT sensors on Kaggle, which were then processed into 38,334 observations with a 5-minute interval. The feature engineering process included creating lag features, moving statistics, and temperature differences in order to capture the time patterns and thermal properties of the building. The Random Forest model showed better results with MAE of 0.146°C, RMSE of 0.285°C, and R² of 0.986, far better than the MLP which had MAE of 0.470°C, RMSE of 0.731°C, and R² of 0.907. A 24-hour simulation proved the Random Forest's ability to make step-by-step predictions, achieving an MAE of 0.057°C and an R² of 0.993 without any cumulative errors. Random Forest was able to capture dynamic temperature changes (29.5-35°C), while MLP provided more stable results (32.5-35°C). The results of the study show that Random Forest is more efficient in modeling temperature changes, with the potential for HVAC energy savings of 15-25% through more precise settings based on predictions.