Next Article in Journal
Extreme Rainfall Analysis and Return Period Estimation Based on Extreme Value Theory
Previous Article in Journal
Electrochemical Synthesis of Ortho- and Para-Hydroxybenzoic Acids Using CO2: Experimental and Simulation-Based Optimization
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Smart Community Energy Forecasting and Management System Based on Two-Layer Model Architecture †

Department of Electronic Engineering, National Taipei University of Technology, Taipei 10608, Taiwan
*
Author to whom correspondence should be addressed.
Presented at 2025 IEEE International Conference on Computation, Big-Data and Engineering (ICCBE), Penang, Malaysia, 27–29 June 2025.
Eng. Proc. 2026, 128(1), 26; https://doi.org/10.3390/engproc2026128026
Published: 12 March 2026

Abstract

Here, we develop a digital community management application (APP) and an energy prediction and analysis system for smart communities. The system integrates the internet of things (IoT) technology and multiple prediction models to improve the intelligence and automation of community energy management. The developed APP has the following functions: user classification, announcement notification, express delivery management, GPS positioning navigation, calendar, and energy forecast. The hardware architecture of the system consists of a voltage/current sensing module, a Wireless Fidelity (Wi-Fi) module, and an Arduino platform, allowing real-time feedback and display of power consumption data. The energy forecasting part proposes a two-layer hybrid model architecture. This architecture combines Seasonal Trend decomposition using Loess (STL) time series decomposition, extreme gradient boosting (XGBoost), and Seasonal Autoregressive Integrated Moving Average (SARIMA) models to predict residential electricity consumption trends over the next 3 years. The results of the model prediction are verified using the data on Taiwan’s electricity consumption. The model accurately predicts the average monthly residential electricity consumption with a relative error of 5.8%, an acceptable energy management accuracy. This system integrates APP applications and efficient prediction models, demonstrating its great potential in smart community energy management and enhanced resident interaction.

1. Introduction

Developing smart communities and smart homes has become one of the core strategies for energy management and sustainable living. With the development of IoT and AI, monitoring and controlling energy use in homes and communities has become more immediate, accurate, and intelligent. Many IoT sensors and energy management platforms have been used in smart homes. These devices reduce electricity costs by up to 50% and increase the rate of utilization and self-sufficiency of green energy within the community [1]. Smart communities use integrated energy systems and multi-time scale management strategies to effectively balance the uncertainty of renewable energy and user demand response, thus improving power supply stability [2]. Therefore, the development of an IoT-based energy management infrastructure has become a focus of global smart cities and sustainable community policies.
IoT technology and monitoring apps have been widely used in real-time data collection, device control, and user behavior analysis in smart homes and community energy management. Its typical applications include smart sockets, energy dashboards and apps, and enable users to monitor electricity usage in real-time through the operating interface, receive energy-saving suggestions, or schedule home appliance switches, improving participation and energy efficiency. On this basis, deep learning algorithms further enhance the system’s prediction and control capabilities. Long short-term memory (LSTM) networks are adopted to predict power load, while convolutional neural networks (CNNs) learn indoor environment features.
These algorithms learn implicit patterns from large amounts of time series and heterogeneous data, thus improving the accuracy and responsiveness of energy scheduling. LSTM effectively captures the daily periodic behaviors and helps the system schedule load transfer in advance [3]. CNN gathers information from multiple spatial nodes to detect abnormal power consumption or facility anomalies in specific areas [4]. However, these deep algorithms also have corresponding limitations. Due to the high demand for computing resources, the real-time computing capabilities of edge devices may be insufficient and require the use of cloud support. When the model is poorly interpretable, it is difficult for users or system managers to understand how the algorithm makes energy-saving recommendations or control decisions, reducing their trust. When high-quality and representative training data are lacking, the model’s prediction accuracy becomes unstable and may even lead to misjudgments. Therefore, the IoT and APP monitoring application model combined with machine learning has great potential to improve energy efficiency and interactivity.
Therefore, it is required to support a sustainable digital community by emphasizing energy conservation and security through appropriate technologies and a multi-level strategic framework. Smart energy management has been developed by combining APPs and algorithms recently. In [5], a home energy management system is proposed that combines smart sockets and AI algorithms. The system uses the Smart Life APP to monitor and remotely control devices in real time and combines demand response mechanisms to mitigate peak loads. In [6], a community energy management system was developed by integrating mixed integer programming and a bird-eye optimization algorithm. The system supports solar and battery energy storage, combining a dynamic electricity price model with a peer-to-peer (P2P) energy trading mechanism. At the same time, the system realizes power sharing and optimization through the user APP, significantly reducing community electricity bills by 72% and increasing local energy self-sufficiency.
In [7], a smart response mechanism for electrical appliances is developed for the home based on digital algorithms. This mechanism integrates the APP feedback and the JavaScript object notation format communication protocol. The system effectively synchronizes electricity consumption and renewable energy production within the community, improving the flexibility and efficiency of overall energy use. These results demonstrate that APPs serve as a monitoring interface and are closely integrated with algorithms to achieve intelligent, flexible, and real-time energy management at the community level.
By integrating mobile application development, IoT monitoring, and AI load forecasting, this paper developed a complete closed-loop system from data collection and cloud analysis to decision feedback. The system improves the efficiency of interaction between residents and managers through the multi-functional APP and reduces the electricity consumption with the IoT architecture. The system combines a two-layer prediction model and achieves a mean absolute error (MAE) of 15.58 kWh by comparing it with each household’s actual monthly data, verifying the system’s high accuracy and practicality.

2. Related Works

2.1. IoT Digital Community Management

IoT is a new communication model that provides many new smart services for communities and residences [8]. A smart community is a new type of community model that uses IoT to improve quality of life from multiple perspectives [9]. As environmental electricity and renewable energy have been widely used, many communities have begun to plan and manage energy use. In [10], a decentralized community energy management system centered on residents is proposed. The central control equipment of the system distributes energy according to the energy consumption of residents and can effectively reduce this. In [11], the application and development of smart communities and digital buildings are discussed, emphasizing smart energy appliances, and explaining that smart buildings are the future trend in total electricity costs.

2.2. Regional Electricity Consumption Forecast and Analysis

To maximize energy use, short-term load forecasting (STLF) and planning of electricity demand are also important for the community. STLF employs statistical methods or AI technology. A hybrid model adopts variational mode decomposition (VMD) and LSTM [12]. To improve performance, the model eliminates seasonal factors and error corrections. In [4], a CNN and LSTM network model is proposed. This model effectively improves the accuracy of STLF. In [13], LSTM and an efficient and parallel Genetic Algorithm are combined to improve accuracy and reduce errors.
IoT and AI have become key to the development of smart communities. IoT improves community management and energy usage efficiency, and AI models predict electricity consumption and effectively improve accuracy and reduce errors. These technologies are important in the development of smart communities.

3. Digital Community Management APP

The information management system is important for community management automation. The APP for the management of digital communities is developed on the Adalo platform in this study. The main functions of the APP include user login, community announcement management push, express management notification, GPS positioning navigation, community calendar, and home energy monitoring management, as shown in Figure 1.

3.1. User Level Management

To distinguish between managers and residents, users must register and log in before using the APP (Figure 1a). The information of all registered personnel is recorded in the cloud database and the APP compares it with the information in the database. At the same time, the APP opens the corresponding usage permissions according to the user’s identity level to distinguish between managers and residents.

3.2. Community Announcement Management

To help managers communicate important issues within the community more efficiently, the app displays different screens based on user identity levels. Meanwhile, residents can access administrator announcements at any time, as illustrated in Figure 1b.

3.3. Express Management Notice

This function helps managers quickly manage express delivery and provide residents with efficient express delivery collection services. When the manager receives the express, the manager logs the express into the APP. The APP simultaneously notifies the corresponding residents to come and collect it, as shown in Figure 1c.

3.4. GPS Location Guide

The APP links to Google Maps 25.27.04.777251107 version using the application programming interface and provides new users with a quick overview of the stores and facilities in the community, as shown in Figure 1d.

3.5. Community Calendar

Each user freely adds and views all activities in the community calendar, as shown in Figure 1e. This increases interaction and mutual assistance among residents.

3.6. Home Energy Monitoring

The application displays a household’s real-time electricity consumption, enabling the community to use energy effectively, as shown in Figure 1f. The energy management system’s forecast data is uploaded to the cloud database via Wi-Fi, and the APP outputs the cloud database into reports for residents to view.

4. Community Energy Management System

4.1. System Architecture

The system architecture is shown in Figure 2. The architecture integrates a voltage measurement module, a current measurement module, a Wi-Fi module, and an Arduino UNO R3. After the system starts, Arduino UNO R3 confirms the connection status with the Wi-Fi and cloud database (Adalo) and whether the API is successfully connected. The system then reads the voltage data obtained by the voltage measurement module, transmits it to the Internet via Wi-Fi, and uploads it to the cloud database. After uploading the data, the system performs a power consumption forecast analysis and sends the results back to the community management APP for display. Users immediately monitor the changes in voltage and the prediction results. At the same time, the system compares the existing data to confirm if new data has been generated. New measurement data will be updated to the database in real time to ensure the timeliness and accuracy of the information.

4.2. Electricity Consumption Forecasting Model Framework

The two-layer hybrid prediction architecture is shown in Figure 3. The first layer uses STL to automatically decompose the monthly electricity consumption series into three sub-sequences: trend, season, and resid. Then, Extreme Gradient Boosting (XGBoost) is used with rolling time series cross-validation to evaluate the performance and obtain the final residual prediction. In the future, residual is generated monthly in a recursive manner. The second layer models the trend component and predicts the trend value for the next 36 months. The seasonal component season is periodically extended. Finally, the predicted trend, season, and residual are recombined to obtain the result of the forecast of the monthly average electricity consumption of a single household of three years.

4.2.1. Seasonal-Trend Decomposition Using Loess

In the forecasting process, STL decomposes the original monthly electricity consumption series into three interpretable components: trend, season, and residual. This method adopts the additive model form; that is, it satisfies Equation (1) [14] to effectively extract the stable seasonal cycle and slow-changing trend from the original non-stationary time series and retain the irregular fluctuation part for further modeling. This paper uses the three decomposed components as inputs to the XGBoost and SARIMA models for prediction, thus improving the accuracy and robustness of overall forecasts.
Y v = T v + S v + R v
where S v is the seasonality, T v is the trend, and R v is the residual.

4.2.2. XGBoost

In the prediction model proposed in this article, XGBoost is mainly used to predict the residual component (resid), which is the first layer of the model. This comes from the random short-term fluctuation part after STL decomposition. This paper uses 1–12 as residual delay values as feature vectors to evaluate stability and optimal parameter combination using time series cross-validation (TimeSeriesSplit). After the validation is completed, the XGBoost model is retrained with all historical data and the future residual values are predicted monthly in a recursive manner. The loss function of the XGB model is as follows [15].
L t n = 1 n L y i , y ^ i 1 + g i f i x i + 1 2 h i f i 2 x i
g i = f t = L y i , y ^ t 1 y ^ t 1
h i = f x = 2 L y i , y ^ t 1 y ^ t 1

4.2.3. Seasonal ARIMA Model

The seasonal autoregressive integrated moving average model (Seasonal ARIMA, SARIMA) is used for modeling and forecasting trends and is the second layer of the model. In this study, the model order is set to SARIMA p = 1 , d = 1 , q = 1 × P = 0 , D = 1 , Q = 1 , where the seasonal period is s = 12. To effectively capture annual periodicity and long-term change characteristics, SARIMA is employed during the forecasting stage. The model takes the complete trend series as input and generates forecasts for the next 36 months, as defined in Equation (5) [16]. Here, B denotes the Backshift operator (Equation (6)), S represents the seasonal cycle length set to 12 months in this study, and Yt is the differenced series defined in Equation (7), indicating that d nonseasonal differences and D (the seasonal differences) are applied. The SARIMA forecast trend is then combined with the residual component and the extended seasonal component predicted by XGBoost to reconstruct the full electricity consumption curve. This integrated design strengthens the robustness of long-term electricity consumption modeling and improves overall forecasting performance.
ϕ B Φ B S Y t = θ B Θ B S e t
B α X t = X t α
Y t = 1 B d 1 B s D X t

4.3. Electricity Consumption Data Description

This paper uses the average monthly electricity consumption of the residents of Taiwan Electric Power Company and the date (year/month) in the electricity bill statistics corresponding to the average electricity consumption per household in the current period (kWh/household) as input data. The average electricity consumption curve is shown in Figure 4 [17]. The complete information covers the average residential electricity consumption in the current period from January 2018 to March 2025 (kWh/household), the average residential electricity consumption in the same period last year (kWh/household), the residential tax-included electricity bill in the current period (yuan/household), and the residential tax-included electricity bill in the same period last year (yuan/household).

5. Results and Discussion

This paper uses the average monthly residential electricity consumption (kWh/household) from January 2018 to December 2021 as a model input to verify the precision of the experimental predictions. The trained prediction model is used to predict the average residential electricity consumption for each month from January 2022 to March 2025. To evaluate the prediction results, this paper uses the mean absolute error (MAE) as the main evaluation indicator of point prediction accuracy, defined as Equation (8) [18].
MAE = 1 H i = 1 H y t + i y ^ t + i
where yt is the actual monthly electricity consumption (kWh/household), y ^ t is the corresponding predicted value, and H is the number of evaluation samples.
The prediction results and the corresponding actual data are shown in Figure 5. The peak of raw data occurred in September 2023 and September 2024, and the corresponding power consumption was 404 and 423 kWh. The predicted results for the corresponding months were 430.99 and 428.15 kWh, reflecting the higher electricity consumption in Taiwan in the summer. Based on 27 months of test data from January 2023 to March 2025, the MAE of the proposed model is 15.58 kWh/month per household. The relative error calculated based on the average actual electricity consumption of the sample (about 270 kWh/month) is about 5.8%, indicating that the model maintains an absolute deviation of less than 6% at the residential level, which reaches an acceptable level of accuracy for practical energy management systems.

6. Conclusions

This paper develops an innovative community platform system that integrates digital community management and energy prediction analysis. The APP designed for community management integrates functions for user classification, express notifications, community announcements, calendars, and energy monitoring to achieve comprehensive digital management of community information and energy usage. At the same time, the two-layer hybrid forecasting architecture is combined with STL time series decomposition, XGBoost, and SARIMA models to effectively predict residual and trend changes, respectively, and reconstruct a highly accurate electricity consumption forecast curve. The experimental results show that the MAE of the proposed model in 27 months of test data is 15.58 kWh, and the prediction error is less than 6%, which meets the needs of practical energy management applications. Modular design, edge computing integration, and support for P2P energy trading and flexible load scheduling functions need to be added to the developed system to strengthen the application potential of smart communities in sustainable energy governance and independent decision making.

Author Contributions

Conceptualization, M.-A.C., J.-H.Z., Z.-X.Z., and C.-C.H.; methodology, M.-A.C., J.-H.Z., Z.-X.Z., and C.-C.H.; software, M.-A.C., J.-H.Z., Y.-J.Y., J.-H.C., M.-C.H., and C.-W.L.; hardware, P.-H.C., Y.-H.S., and R.-Q.L.; validation, M.-A.C., J.-H.Z., Z.-X.Z., and Y.-J.Y.; formal analysis, M.-A.C., J.-H.Z., Z.-X.Z., J.-H.C., and Y.-H.S.; investigation, M.-A.C., J.-H.Z., C.-C.H., J.-H.C., M.-C.H., and R.-Q.L.; resources, M.-A.C., J.-H.Z., Z.-X.Z., and C.-C.H.; writing—original draft preparation, M.-A.C., J.-H.Z., Z.-X.Z., and C.-C.H.; writing—review and editing, M.-A.C., J.-H.Z., Z.-X.Z., and C.-C.H.; visualization, M.-A.C., J.-H.Z., Y.-J.Y., and M.-C.H.; supervision, M.-A.C., J.-H.Z., and Z.-X.Z.; project administration, M.-A.C., J.-H.Z., Z.-X.Z., and P.-H.C.; funding acquisition, M.-A.C., and J.-H.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All data are included within manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Saif, A.; Khadem, S.K.; Conlon, M.F.; Norton, B. Impact of Distributed Energy Resources in Smart Homes and Community-Based Electricity Market. IEEE Trans. Ind. Appl. 2023, 59, 59–69. [Google Scholar] [CrossRef]
  2. Han, F.; Wang, N.; Chen, A.; Liu, T. Multi-time Scale Energy Management Strategy for Smart Community Considering Demand Response. In 2022 4th International Conference on Smart Power & Internet Energy Systems (SPIES); IEEE: Piscataway, NJ, USA, 2022. [Google Scholar]
  3. Kong, W.; Dong, Z.Y.; Jia, Y.; Hill, D.J.; Xu, Y.; Zhang, Y. Short-Term Residential Load Forecasting Based on LSTM Recurrent Neural Network. IEEE Trans. Smart Grid 2019, 10, 841–851. [Google Scholar] [CrossRef]
  4. Rafi, S.H.; Nahid Al, M.; Deeba, S.R.; Hossain, E. A Short-Term Load Forecasting Method Using Integrated CNN and LSTM Network. IEEE Access 2021, 9, 32436–32448. [Google Scholar] [CrossRef]
  5. Aidell, A.I.S.B.; Junaidi, N.B.; Kipli, K.B.; Bt Wan Masra, S.M.; Lit, A.B. IoT-Enabled Demand Response and Energy Management System for Smart Homes: Development and Performance Analysis. In 2024 IEEE Sustainable Power and Energy Conference (iSPEC); IEEE: Piscataway, NJ, USA, 2024; pp. 479–483. [Google Scholar]
  6. Abdelhameed, E.H.; Abdelraheem, S.; Mohamed, Y.S.; Abouheaf, M.; Marey, S.A.; Diab, A.A.Z. An enhanced energy management system for coordinated energy storage and exchange in grid-connected photovoltaic-based community microgrids. J. Energy Storage 2024, 99, 113311. [Google Scholar] [CrossRef]
  7. Powroźnik, P.; Szcześniak, P. Energy Management of Home Devices With Smart Response for the Energy Generation Profile. IEEE Trans. Ind. Inform. 2024, 20, 6995–7007. [Google Scholar] [CrossRef]
  8. Li, F.; Yang, H.; Gao, X.; Han, H. Towards IoT-based sustainable digital communities. Intelligent and Converged Networks 2022, 3, 190–203. [Google Scholar] [CrossRef]
  9. Tang, J. Design and Research of Intelligent Community Management System Based on Intelligent Internet of Things. Mob. Inf. Syst. 2022, 2022, 8106990. [Google Scholar] [CrossRef]
  10. Yao, L.; Teo, J.C.; Wang, C.-H. Resident-Centric Distributed Community Energy Management System. IEEE Trans. Sustain. Energy 2023, 14, 849–863. [Google Scholar] [CrossRef]
  11. Zhang, R.; Li, H. Digital Residential Communities and Smart Buildings. In 2023 3rd International Conference on Digital Society and Intelligent Systems (DSInS); IEEE: Piscataway, NJ, USA, 2023. [Google Scholar]
  12. Lv, L.; Wu, Z.; Zhang, J.; Zhang, L.; Tan, Z.; Tian, Z. A VMD and LSTM Based Hybrid Model of Load Forecasting for Power Grid Security. IEEE Trans. Ind. Inform. 2022, 18, 6474–6482. [Google Scholar] [CrossRef]
  13. Tsegaye, S.; Padmanaban, S.; Tjernberg, L.B.; Fante, K.A. Short-Term Load Forecasting for Electrical Power Distribution Systems Using Enhanced Deep Neural Networks. IEEE Access 2024, 12, 186856–186871. [Google Scholar] [CrossRef]
  14. Cleveland, R.B.; Cleveland, W.S.; McRae, J.E.; Terpenning, I. STL: A seasonal-trend decomposition. J. Off. Stat. 1990, 6, 3–73. [Google Scholar]
  15. Massaoudi, M.; Refaat, S.S.; Chihi, I.; Trabelsi, M.; Oueslati, F.S.; Abu-Rub, H. A novel stacked generalization ensemble-based hybrid LGBM-XGB-MLP model for Short-Term Load Forecasting. Energy 2021, 214, 118874. [Google Scholar] [CrossRef]
  16. Williams, B.M.; Hoel, L.A. Modeling and forecasting vehicular traffic flow as a seasonal ARIMA process: Theoretical basis and empirical results. J. Transp. Eng. 2003, 129, 664–672. [Google Scholar] [CrossRef]
  17. National Development Council. Residential Electricity Consumption Data (Monthly) [Dataset]; National Development Council: Taipei, Taiwan, 2024. Available online: https://data.gov.tw/en/datasets/29935 (accessed on 25 February 2026).
  18. Xia, Z.; Zhang, R.; Ma, H.; Saha, T.K. Day-Ahead Electricity Consumption Prediction of Individual Household–Capturing Peak Consumption Pattern. IEEE Trans. Smart Grid 2024, 15, 2971–2984. [Google Scholar] [CrossRef]
Figure 1. The proposed digital community management APP architecture: (a) User login: (b) Community announcement; (c) Express notification; (d) GPS navigation; (e) Community calendar; (f) home energy monitoring.
Figure 1. The proposed digital community management APP architecture: (a) User login: (b) Community announcement; (c) Express notification; (d) GPS navigation; (e) Community calendar; (f) home energy monitoring.
Engproc 128 00026 g001
Figure 2. Community energy management system architecture.
Figure 2. Community energy management system architecture.
Engproc 128 00026 g002
Figure 3. Architecture of the two-layer hybrid forecasting model.
Figure 3. Architecture of the two-layer hybrid forecasting model.
Engproc 128 00026 g003
Figure 4. Average monthly residential electricity consumption in Taiwan from 2018 to March 2025.
Figure 4. Average monthly residential electricity consumption in Taiwan from 2018 to March 2025.
Engproc 128 00026 g004
Figure 5. Monthly average residential electricity consumption forecast and actual measurement results from 2022 to March 2025.
Figure 5. Monthly average residential electricity consumption forecast and actual measurement results from 2022 to March 2025.
Engproc 128 00026 g005
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chung, M.-A.; Zhang, J.-H.; Zhang, Z.-X.; Hsu, C.-C.; Yao, Y.-J.; Chou, J.-H.; Chen, P.-H.; Hsieh, M.-C.; Lin, C.-W.; Shen, Y.-H.; et al. Smart Community Energy Forecasting and Management System Based on Two-Layer Model Architecture. Eng. Proc. 2026, 128, 26. https://doi.org/10.3390/engproc2026128026

AMA Style

Chung M-A, Zhang J-H, Zhang Z-X, Hsu C-C, Yao Y-J, Chou J-H, Chen P-H, Hsieh M-C, Lin C-W, Shen Y-H, et al. Smart Community Energy Forecasting and Management System Based on Two-Layer Model Architecture. Engineering Proceedings. 2026; 128(1):26. https://doi.org/10.3390/engproc2026128026

Chicago/Turabian Style

Chung, Ming-An, Jun-Hao Zhang, Zhi-Xuan Zhang, Chia-Chun Hsu, Yi-Ju Yao, Jin-Hong Chou, Pin-Han Chen, Ming-Chun Hsieh, Chia-Wei Lin, Yun-Han Shen, and et al. 2026. "Smart Community Energy Forecasting and Management System Based on Two-Layer Model Architecture" Engineering Proceedings 128, no. 1: 26. https://doi.org/10.3390/engproc2026128026

APA Style

Chung, M.-A., Zhang, J.-H., Zhang, Z.-X., Hsu, C.-C., Yao, Y.-J., Chou, J.-H., Chen, P.-H., Hsieh, M.-C., Lin, C.-W., Shen, Y.-H., & Liu, R.-Q. (2026). Smart Community Energy Forecasting and Management System Based on Two-Layer Model Architecture. Engineering Proceedings, 128(1), 26. https://doi.org/10.3390/engproc2026128026

Article Metrics

Back to TopTop