1. Introduction
Effective energy management in buildings is becoming increasingly important in the context of global challenges related to climate change and increasing energy consumption. The construction sector is responsible for a significant portion of global energy consumption and greenhouse gas emissions, necessitating the implementation of modern technological solutions to minimize energy losses. The increase in energy prices and legal regulations regarding energy efficiency encourage building owners and managers to seek innovative ways to optimize consumption. Intelligent energy management systems based on the Internet of Things (IoT) and artificial intelligence (AI) technology enable the monitoring and automatic adjustment of consumption parameters in real time [
1,
2]. This allows for increased operational efficiency, reduced operating costs, and improved comfort for building users. The development of digital technologies allows for increasingly precise data analysis and forecasting of energy consumption, which contributes to more sustainable resource management [
3]. The choice of this research topic results from the need to assess the effectiveness of modern technologies in real conditions and to identify best practices in the field of intelligent energy management in buildings.
IoT and AI technologies play a key role in optimizing energy consumption through the automation and intelligent management of assets in buildings (
Figure 1). IoT devices, such as smart meters, temperature, humidity, and occupancy sensors, enable the continuous monitoring of indoor conditions and actual energy consumption [
1]. The collected data is then analyzed by AI algorithms that detect consumption patterns, identify inefficient areas, and suggest optimal energy-saving strategies. AI can dynamically adjust the settings of HVAC (heating, ventilation, and air conditioning) systems, lighting, and other electrical devices depending on current conditions and occupant demand. Additionally, AI can predict future energy consumption based on historical data and external factors, such as weather conditions or the building operation schedule [
2]. The integration of IoT and AI also allows for the quick detection of anomalies, such as equipment failures or excessive energy consumption, allowing for preventive measures to be taken and minimizing losses. Thanks to these technologies, buildings can become more energy-efficient, ecological, and economical, contributing to sustainable development and reducing CO
2 emissions [
3].
The genesis of IoT energy management applications in smart buildings and smart territories began with the growing need for energy efficiency and sustainability in urban infrastructure. Early developments focused on basic automation systems, such as programmable thermostats and occupancy sensors, which laid the foundation for smart energy management [
4]. The development of wireless communication technologies, such as Wi-Fi, Zigbee, and LoRaWAN, enabled seamless connectivity between IoT devices and centralized energy management platforms. The integration of artificial intelligence (AI) has proven to be groundbreaking, enabling predictive analytics, anomaly detection, and optimization algorithms to improve energy efficiency [
5]. The introduction of cloud computing and big data analytics has provided scalable solutions for real-time monitoring and control of energy consumption in buildings and territories. The concept of smart grids and demand response systems has further accelerated IoT adoption, enabling bidirectional communication between energy suppliers and consumers for optimized load balancing. Digital twin technology and edge computing have recently been incorporated to improve real-time decision-making and reduce latency in energy management applications [
6]. Sustainability initiatives and regulatory policies have led to further advances, encouraging the development of AI-based IoT solutions to reduce carbon footprints. The advent of 5G and AI-based edge intelligence is now paving the way for more autonomous, decentralized, and resilient energy management systems in smart cities. As research continues, the future of IoT-based energy management is likely to include self-learning AI models, blockchain-secured energy transactions, and fully integrated smart ecosystems for buildings and territories [
7].
The rapid advancement of IoT and AI has significantly transformed building energy management, offering new opportunities for efficiency, cost reduction, and sustainability. Smart energy systems, powered by IoT sensors and AI-based analytics, enable real-time monitoring and optimization of energy consumption by collecting and analyzing data on occupancy, temperature, lighting, and energy consumption patterns. Although these technologies hold great promise, their practical implementation in distributed energy systems poses several challenges, including integration with renewable energy sources, dynamic energy pricing, load balancing, and predictive maintenance. The main research problem addressed in this study is the lack of a comprehensive and data-driven approach to optimizing building energy consumption through IoT and AI, especially in distributed energy systems. Although IoT-based energy management has been explored in various studies, there is a gap in understanding how AI can improve decision-making to increase efficiency, save costs, and enhance sustainability. Specifically, the study explores how AI-based IoT applications can improve energy consumption patterns, facilitate predictive maintenance, and support smart grid interactions while ensuring security and scalability through technologies such as blockchain. This case study focuses on the practical application of IoT and AI in energy management in residential, commercial, and industrial buildings. By integrating renewable energy sources such as solar panels and wind turbines, this study explores how IoT-based monitoring ensures maximum efficiency in energy generation and use. It further explores how AI-based predictive maintenance can reduce system failures and operational downtime. The study also addresses economic and environmental benefits, such as cost savings, reduced carbon footprint, and increased energy independence. This study aims to bridge the gap between theoretical progress and real-world implementation by providing insights into how IoT and AI can drive the future of sustainable energy management in buildings.
IoT applications play a key role in energy management in smart buildings and smart territories, enabling real-time monitoring, control, and optimization of energy consumption using AI. AI-based IoT systems can predict energy demand, optimize HVAC and lighting systems, and reduce waste, leading to significant cost savings and sustainability benefits. These applications enhance occupant comfort by intelligently adjusting environmental conditions based on user preferences and occupancy patterns in real time. AI-based analytics help detect faults and inefficiencies in energy systems, enabling predictive maintenance and reducing downtime in buildings and city infrastructure. In smart territories, IoT facilitates demand response strategies by integrating renewable energy sources and balancing loads across sectors to improve grid stability [
7]. However, IoT-based energy management faces challenges such as cybersecurity threats, as connected devices are susceptible to hacking and data breaches. High upfront costs and complex installation processes can be barriers to widespread adoption, especially in older buildings with legacy infrastructure. Relying on cloud computing to perform AI-driven analytics raises concerns about latency, data privacy, and dependence on a stable internet connection [
8]. Despite these challenges, advances in edge computing, blockchain security, and federated learning are helping to mitigate risks and increase the reliability of IoT energy management solutions (
Table 1). AI-enabled IoT applications offer a promising path to sustainable and efficient energy management, but addressing security, interoperability, and cost issues is essential for broader adoption [
8].
Signal processing techniques that are combined with AI in the area of IoT applications for energy management in buildings using artificial intelligence are as follows:
Fourier Transform: used to analyze frequency components of energy consumption signals, helping AI models detect patterns and anomalies in power usage;
Short-Time Fourier Transform: provides time-frequency analysis of transient energy events, aiding AI in identifying sudden power spikes and optimizing load management;
Wavelet Transform: enables multi-resolution analysis of energy data, allowing AI to capture both short-term fluctuations and long-term trends for better forecasting;
Principal Component Analysis: reduces dimensionality of large IoT datasets, extracting key features that improve AI model efficiency and accuracy in energy optimization;
Kalman Filtering: enhances real-time energy monitoring by predicting and correcting sensor data errors, improving AI-driven decision-making;
Empirical Mode Decomposition: decomposes complex energy signals into intrinsic mode functions, helping AI detect irregular consumption patterns and faults;
Hilbert–Huang Transform: analyzes non-linear and non-stationary energy signals, enhancing AI’s ability to detect and adapt to dynamic building energy conditions.
Spectral Clustering: groups similar energy usage patterns based on signal characteristics, improving AI-based anomaly detection and predictive maintenance strategies.
Non-Intrusive Intelligent Monitoring (NILM) is a key approach in IoT-based energy management for smart buildings, enabling detailed analysis of energy consumption without the need to place sensors directly on individual devices. Phase diagram analysis visualizes energy consumption patterns by mapping voltage and current relationships, enabling the detection of anomalies and device operating states. Compressive sensing is an advanced signal processing technique that reconstructs distributed energy signals from limited measurements, significantly reducing data transmission and storage requirements. These techniques enhance NILM by increasing the accuracy of energy disaggregation through the identification of specific device usage patterns from aggregated power data. When combined with AI algorithms, phase diagram analysis and compressive sensing enable efficient and scalable real-time energy monitoring solutions for smart buildings. These methods help optimize energy consumption, reduce operating costs, and support sustainability initiatives in modern IoT-based energy management systems.
This study introduces a hybrid AI framework that combines deep learning with physics-based models to improve energy efficiency prediction and system adaptability in smart buildings. This research pioneers the application of federated learning in multi-building energy management, ensuring data privacy while enabling the joint training of AI models across infrastructures. A novel sensor fusion approach is proposed that integrates diverse IoT data sources, such as thermal imaging, motion sensors, and air quality monitors, to improve occupancy detection accuracy. This study promotes the use of swarm intelligence algorithms to optimize real-time coordination between HVAC, lighting, and energy storage systems, thereby minimizing energy waste. It also contributes to the integration of computational principles to solve complex energy distribution problems, paving the way for future AI-based ultrafast optimizations. This research introduces an explainable AI (XAI) framework that provides transparency in decision-making processes for energy managers and facility operators. This study proposes an innovative AI marketplace based on blockchain for peer-to-peer energy trading, enabling smart buildings to autonomously exchange surplus energy. This study enhances real-time decision-making capabilities, reducing dependence on cloud computing and response times. This work contributes to a predictive AI maintenance system that leverages anomaly detection and digital twins to proactively address HVAC and electrical inefficiencies before they escalate. This study represents a transformational step toward fully autonomous, AI-based smart buildings, combining cutting-edge IoT technologies with new AI methodologies to achieve unprecedented energy efficiency and sustainability (
Figure 2).
The aim of this study is to analyze a real case of IoT and AI use in energy management.
The current concept of IoT in building management (smart buildings) is based on the following rules: IoT in building management, also known as smart buildings, integrates connected sensors and automation systems to optimize energy consumption, safety, and occupant comfort. Smart buildings use IoT-enabled devices to monitor and control lighting, HVAC (heating, ventilation, and air conditioning), and other essential infrastructure in real time. These systems rely on data analytics and artificial intelligence to increase efficiency by predicting maintenance needs and optimizing resource usage. IoT sensors track occupancy patterns, dynamically adjusting lighting and temperature to reduce energy waste and increase comfort. Security is enhanced with IoT-powered surveillance cameras, smart access control, and automated threat detection systems. Building management systems (BMS) integrate IoT data to provide a centralized dashboard for monitoring and controlling multiple facilities remotely. Wireless connectivity, including 5G and Low Power Wide Area Networks (LPWAN), enables seamless communication between IoT devices in large buildings. Cloud and edge computing help process massive amounts of data in real time, increasing responsiveness and reducing operational costs. Challenges include cybersecurity threats, interoperability between different IoT platforms, and high upfront implementation costs. As IoT technologies advance, smart buildings are expected to become more sustainable, adaptive, and user-centric, revolutionizing the management of urban infrastructure, including those based on AI.
AI and IoT will enable the real-time monitoring and predictive analysis of energy usage, thereby optimizing efficiency and reducing waste in smart buildings.ML algorithms will continuously analyze data from IoT sensors to predict energy demand and adjust HVAC, lighting, and other systems accordingly.AI-driven automation will improve demand response strategies, enabling buildings to adjust energy usage based on grid conditions and price fluctuations. Integrating AI with DTs will provide virtual simulations of building operations, streamlining energy-saving and maintenance decisions. Edge computing in IoT devices will reduce latency in energy management decisions, making real-time optimizations more efficient and reliable.AI-driven fault detection will minimize energy waste by identifying and addressing inefficiencies in building systems before they escalate. The combination of AI, IoT, and blockchain will improve the transparency and security of energy transactions, supporting decentralized energy markets.AI-driven occupant behavior analysis will help tailor energy-saving strategies based on occupant preferences and habits, increasing comfort while reducing consumption. Smart buildings will increasingly use AI to integrate renewable energy, optimizing solar panels, battery storage, and grid interactions for maximum sustainability. Regulatory frameworks and advances in cybersecurity will play a key role in ensuring the safe and ethical implementation of AI and IoT in energy management.
The technical challenges that IoT applications for building energy management address using AI are as follows:
Data collection and integration: IoT devices generate massive amounts of real-time data from sensors, meters, and HVAC systems, requiring efficient collection and integration across multiple sources;
Data quality and pre-processing: Inconsistent, noisy, or missing data can impact the accuracy of the AI model, requiring robust data cleaning and normalization techniques;
Scalability and computational constraints: AI algorithms must efficiently process IoT data at scale, often with limited computational resources on edge devices or cloud-based infrastructure;
Energy prediction and optimization: Developing accurate AI models to predict energy demand and optimize consumption requires advanced techniques, such as deep learning and reinforcement learning;
Real-time decision-making: AI models must provide fast, adaptive decisions to control energy systems while balancing latency and computational efficiency;
Cybersecurity and Privacy: Ensuring secure data transmission, protecting IoT networks from cyber threats, and preserving user privacy are essential;
Interoperability and Standardization: IoT devices use different communication protocols, making it difficult to ensure seamless integration and compatibility across systems;
User Acceptance and Human-Assisted Systems: AI-based energy management must be interpretable and user-friendly to gain trust and enable human intervention when needed [
9,
10,
11,
12,
13].
2. Materials and Methods
2.1. Dataset
Description of the location being studied: an office building with three floors, each containing 10 office rooms. In a three-story smart building with ten office rooms on each of the three floors located in a large temperate city in the flat part of Poland, IoT sensors collect real-time data from HVAC systems, lighting, occupancy sensors, and environmental sensors (temperature, humidity, CO2 levels). HVAC sensors measure air temperature, airflow, and energy consumption, while smart thermostats adjust heating and cooling based on occupancy patterns and outdoor weather conditions. Lighting sensors include ambient light and motion sensors, providing energy-efficient lighting by adjusting brightness or turning off unused lights. Energy meters track energy consumption at a granular level, monitoring electrical loads for HVAC, lighting, and connected devices to optimize overall energy efficiency.
The following data collection and processing steps were used in the study:
Data collection: The dataset was collected from IoT-enabled energy monitoring systems deployed in smart buildings, including sensors, smart meters, and HVAC control systems;
Data preprocessing: Raw sensor data often contained noise, missing values, and inconsistencies, which were handled using filtering, interpolation, and normalization techniques;
Feature extraction: Key features, such as the power factor, total harmonic distortion, and energy consumption trends, were extracted to enhance the performance of the AI model in energy consumption analysis;
Data labeling: When needed, models were trained using labeled datasets in which appliance usage patterns and energy events were manually or semi-automatically categorized;
Model training and validation: The processed dataset was divided into training and test sets, and machine learning or deep learning models were trained to predict energy consumption, detect anomalies, and optimize building energy efficiency.
The data collected create a multidimensional dataset that includes time-series energy logs, sensor readings, occupancy patterns, and outdoor environmental conditions. AI algorithms use feature extraction techniques to identify key parameters such as peak energy consumption, thermal comfort levels, and correlations between occupancy and energy use. The dataset undergoes data validation and anomaly detection, in which AI models compare incoming sensor data with historical trends to identify faulty sensors, data gaps, or abnormal energy spikes. Cross-validation techniques, such as k-fold validation and leave-one-out validation, ensure that AI models generalize well by testing predictive accuracy across multiple data subsets. DTs replicate building energy dynamics in real time, enabling simulation-based validation and tuning of AI-based control strategies before deployment. The AI model continuously learns and improves through reinforcement learning, dynamically adjusting HVAC and lighting systems to increase energy efficiency while maintaining occupant comfort. The IoT technology (i.e., sensors, devices, and control systems used) is as follows:
IoT sensors installed: smart meters, occupancy sensors, temperature and humidity sensors, lighting control systems, and HVAC monitors (separate in each room within the system);
AI algorithms used:predictive analytics, real-time monitoring, machine learning for anomaly detection, and automated system control.
Control system: An AI-based building management system (BMS) autonomously regulates lighting, heating, cooling, and ventilation, while our AI-based solution simulates these factors to select the best possible solutions. In order to compare the solutions, we also provided a simulation of the building rooms in Blynk IoT (
https://blynk.io/ (accessed on 12 January 2025)), which allows for the creation of fully configurable IoT mobile and web applications.
The study includes a detailed table of devices and sensors used in AI- and IoT-based smart building energy management, including devices such as temperature sensors, humidity sensors, CO
2 detectors, motion sensors, smart meters, and HVAC controllers. Each sensor entry in the table identifies the sensor type, manufacturer, model, measurement range, accuracy, and communication protocol (e.g., Zigbee, LoRa, Wi-Fi, or Bluetooth). Energy meters and power monitoring devices are also listed, providing real-time data on electricity consumption for HVAC, lighting, and other systems. The table includes edge computing devices (e.g., Raspberry Pi, NVIDIA Jetson, Intel NUC) used to infer the local AI model, thereby reducing latency in decision-making. A separate column describes data integration methods, detailing how IoT devices transmit data to cloud platforms or edge servers for AI-driven optimization. Source code for AI models, sensor data preprocessing, and energy optimization algorithms is included as supplemental Python files, using the TensorFlow 2.16.1, PyTorch 2.4, and Scikit-learn 1.6.1 libraries. Code snippets demonstrate sensor data collection, feature engineering, anomaly detection, predictive modeling, and reinforcement learning-based energy control strategies. API integrations and MQTT-based communication protocols are documented, showing how IoT devices send real-time energy data to cloud platforms for AI analysis. The appendix includes simulation scripts and digital twin models, allowing researchers to replicate experiments and validate AI-based energy management strategies.
Table 2 presents a structured overview of the sensors and devices used in the study, detailing their functionalities and communication protocols.
Evaluation metrics—the effectiveness of AI-based IoT energy management is evaluated based on the following factors:
Energy consumption reduction (measured in kWh before and after implementation);
Cost savings (percentage reduction in energy bills);
System efficiency and reliability (uptime, AI prediction accuracy);
Environmental impact (reduction in CO2 emissions).
Data collection and analysis methods: historical data analysis (for model training and validation) and real-time monitoring in a .csv file (Excel, Microsoft, Redmond, OR, USA), which is required by the model.
2.2. Computational Methods
All models were created in TensorFlow 2.16.1 (open source) or PyTorch 2.0 (open source) environments. This choice was driven by the familiarity and widespread use of these machine learning solutions, as well as the potential for their significant development in the future as the complexity of the models increases.
When selecting the solution, the authors relied on previous publications and their own experience. The three AI-based solutions for control systems under consideration are as follows:
AI-based building management system (BMS): autonomously controls lighting, heating, cooling, and ventilation by analyzing real-time sensor data and user preferences. Reinforcement learning (used in 27% of smart city applications) optimizes energy use by continuously learning from environmental conditions and adjusting settings for maximum efficiency. The system predicts occupancy patterns and dynamically adjusts HVAC system operation, reducing energy waste while maintaining comfort;
AI-based simulation and optimization system: simulates multiple environmental and operational scenarios to determine the most effective control strategies. Using supervised learning (used in 61% of smart city IoT applications), it analyzes historical data to predict energy demand and optimize system response. The system provides sample simulation results, allowing facility managers to select the best configurations to improve costs and performance before actual deployment;
Unsupervised Learning-Based Anomaly Detection System: using unsupervised learning techniques (used in 12% of smart city IoT applications), this solution detects anomalies in building systems, such as unexpected spikes in energy consumption or HVAC failures. By grouping data and identifying patterns, it autonomously alerts operators to potential failures or inefficiencies. This proactive approach to maintenance reduces downtime and improves the reliability of smart buildings.
Based on this, the following three AI-based reinforcement learning techniques for control systems were considered:
Deep Q Networks (DQN) optimize HVAC systems by continuously learning from environmental data and user preferences. The AI agent interacts with the building climate control system, adjusting temperature and airflow settings to minimize energy consumption while maintaining occupant comfort. By simulating multiple scenarios, the system selects the most energy-efficient strategy and provides sample results based on reinforcement learning;
Proximal Policy Optimization (PPO) for smart lighting control is a reinforcement learning technique that enables adaptive lighting control by learning the best strategies to adjust brightness levels based on occupancy and daylight availability. The AI agent explores different lighting configurations and gradually improves its decision-making process to optimize energy efficiency. Simulations using PPO allow the AI-based solution to test different control policies and provide the best results for reducing electricity costs while providing optimal lighting;
Multi-Agent Reinforcement Learning (MARL) for Integrated BM Control: enables multiple AI agents to collaborate and control different aspects of a building management system (BMS), such as lighting, HVAC, and ventilation, in a coordinated manner. Each agent learns independently while interacting with other agents to achieve a global optimization goal. This approach provides a dynamic and self-adaptive system that continuously refines control strategies based on real-time feedback. Simulation results from MARL-based models help building managers evaluate optimal control policies before real-world implementation.
AI algorithms used for data analysis and energy consumption optimization: in the basic solution, we proposed a neural network that collects data from IoT sensors in 30 rooms (10 on each floor of the building) and categorizes them into the following three parameters based on historical and real-time data:
The fourth parameter (system efficiency and reliability) was assessed directly from the model or indirectly based on accuracy.
All input and output data were checked for completeness and correct value range and normalized.
The AI model architecture is as follows (
Figure 3):
Figure 3.
Model architecture.
Figure 3.
Model architecture.
The following system evaluation metrics are proposed:
Energy Consumption Reduction: comparison of actual energy consumption before and after system implementation (metric: average energy savings in kWh);
Cost Savings Cost: reduction based on electricity prices (metric: % bill reduction);
System Efficiency and Reliability: system operation time or prediction accuracy (% accurate predictions vs. reality);
Environmental Impact CO2: emission reduction based on energy savings (metric: CO2 equivalent in tons).
During implementation, it was determined that in order for the system to be fully useful, the following additional functions should be implemented:
Application of Reinforcement Learning (RL) to optimize energy consumption;
Integration with BMS for intelligent heating/cooling control;
Analytical dashboard for monitoring system efficiency.
This case study evaluates its approach by comparing it with existing works on IoT-based energy management, highlighting improvements in accuracy, efficiency, and real-time monitoring. Unlike traditional methods that often rely on intrusive load monitoring, the case study demonstrates the effectiveness of non-intrusive techniques such as phase diagram analysis and compression detection. Existing studies mainly focus on AI-based forecasting or hardware-based monitoring, while this case study integrates both to obtain a more holistic energy management solution. Many previous works lack scalability due to computational constraints, but the case study addresses this issue by using lightweight AI models and edge computing to efficiently process the data. Despite these advances, limitations such as data sparsity, generalizability across building types, and adaptability to dynamic energy loads are often overlooked in the related literature. The case study also identifies gaps in cybersecurity issues, as existing studies rarely discuss the risks of data breaches and privacy concerns in IoT-based energy monitoring. Another limitation of previous studies is the lack of real-time adaptability to sudden changes in occupancy or energy demand, which this case study seeks to improve through AI-based optimization. By addressing these gaps, the case study contributes to the advancement of IoT-based energy management, although challenges such as interoperability, user acceptance, and the feasibility of long-term implementation remain areas for future research.
3. Results
This study investigates the impact of integrating IoT sensors and AI algorithms into an office building’s energy management system, including the assessment of energy savings, operational cost reductions, and environmental benefits.
In the smart building energy management system, AI models for energy consumption prediction and optimization were developed using TensorFlow and PyTorch, leveraging their deep learning capabilities. It is important to note that such models are typically multi-layer neural networks (MLP), convolutional neural networks (CNN) for spatial sensor data, or long short-term memory networks (LSTM) for predicting time-series energy consumption patterns. The input features include sensor data (temperature, humidity, occupancy, CO2 level), historical energy consumption, weather forecasts, and grid energy prices, while the output predicts optimal energy settings. Model hyperparameters such as learning rate (0.001–0.01), batch size (32–128), number of layers (3–5), activation functions (ReLU, Sigmoid), and churn rates (0.2–0.5) were tuned for optimal performance. The training process involved feeding sensor data into the models, computing losses using mean square error (MSE) (alternatively, cross-entropy losses could be used), and optimizing weights using Adam optimizers (RMSprop was tested as an alternative). Data augmentation techniques, such as Gaussian noise injection and generating synthetic sensor data, were used to improve the model’s robustness to sensor failures and missing values. Models were trained for 50–200 epochs, depending on the dataset size and convergence speed. Validation methods, such as k-fold cross-validation (k=5), ensured model generalization by dividing the dataset into multiple training and test subsets (70% to 30% ratio). Hyperparameter tuning was performed using grid search (instead of Bayesian optimization), automatically selecting the best model configurations based on performance metrics such as root mean square error (RMSE) and R2 score. Once trained, the AI models were deployed to edge devices on the smart building DT in a cloud-based architecture, where their predictions are continuously refined based on real-time sensor feedback.
All results were compared to the traditional approach (without AI). An analysis of efficiency before and after technology implementation was provided. The key results are as follows:
Estimated return on investment (ROI) achieved within 2.7 years due to lower utility bills.
- 3.
In the area of environmental impact:
CO2 emissions reduced by 25.1–40.7% dueto optimized energy consumption;
Reduced carbon footprint by integrating AI with renewable energy sources (e.g., solar panels);
Improved sustainability certifications (e.g., LEED, BREEAM) through efficient energy use.
The ROI assessment in this study considers both the upfront costs of implementing AI and IoT technologies and the long-term energy savings achieved through optimization. Cost factors include IoT sensor installation, AI model development, cloud or edge computing infrastructure, and maintenance expenses over the system’s life cycle. Energy savings calculations are based on real-time data analysis comparing AI-based energy management to baseline consumption prior to implementation. Payback period analysis determines how quickly the initial investment will be recouped through reduced electricity bills and optimized HVAC operations. The study includes net present value (NPV) and internal rate of return (IRR) calculations to assess the financial feasibility of AI-based smart building management over a 5-year period (simulated as the building received new AI solutions). Comparative ROI analysis with traditional building automation systems highlights the cost-effectiveness of AI-powered energy optimization. The results indicate that AI and IoT-enabled smart buildings achieve a return on investment (ROI) of 20–50% within 3–7 years (in our building: 2.7 years), depending on factors such as energy costs, building size, and climate conditions, which have been highly variable over the past 5 years. The study concludes that AI-based smart energy management not only improves sustainability but also provides long-term financial benefits, making it an attractive investment for building owners and facility managers.
The best achieved accuracy was 0.8179 (RMSE 0.01).
Further challenges and considerations are as follows:
Initial implementation costs can be high, but they are outweighed by long-term savings;
Data privacy concerns related to IoT sensor networks;
The need for skilled personnel to manage AI-based energy systems.
The analytical approach includes IoT sensor data pre-processing, feature engineering, and the application of AI models (LSTM, reinforcement learning, and hybrid deep learning) to predict and optimize energy consumption in smart buildings. Statistical analysis involves the evaluation of model performance using metrics such as mean absolute error (MAE), root mean square error (RMSE), R2 score, and F1 score to measure prediction accuracy and optimization efficiency. A comparative analysis was conducted between traditional rule-based energy management, standard machine learning models (random forests, support vector machines), and advanced AI techniques (deep reinforcement learning, federated learning). Hypothesis testing was used to assess the statistical significance of energy savings achieved by AI-based systems over conventional methods. The study includes a comparative analysis with real-world datasets and simulation-based validation using digital twins to compare AI-based strategies with industry standards and previous studies. The proposed method is compared with the approach described earlier in the introduction, which is based on conventional non-intrusive load monitoring (NILM) without advanced signal processing techniques. Unlike traditional NILM, which often uses machine learning models trained on raw energy consumption data, the proposed method integrates phase diagram analysis and compressive sensing to improve data efficiency and accuracy. The previous method typically requires high-rate sampling to achieve precise energy disaggregation, while the proposed approach reduces the demand for data collection by using compressive sensing to reconstruct the sparse signal. The proposed method also improves real-time adaptability by incorporating AI-based decision-making, while existing approaches often struggle with delayed or batch-based energy analysis. When applied to a smart building environment, the proposed method demonstrates improved performance in detecting energy consumption anomalies and optimizing load distribution compared to traditional techniques. In terms of computational efficiency, the proposed method reduces the processing overhead by employing dimensionality reduction techniques, whereas previous methods often suffer from high computational costs due to large-scale IoT data. Another key advantage is the improved generalization across different building types and energy consumption patterns, whereas previous models tend to be highly specific to the datasets on which they were trained. Overall, the proposed method outperforms the previous approach in terms of accuracy, efficiency, and scalability, making it a more effective solution for IoT-based energy management in smart buildings. The research results prove that the integration of AI and IoT leads to energy efficiency improvements of 20–40%, surpassing conventional methods while maintaining user comfort and system reliability.
To assess the statistical significance of the reported results, we conducted a statistical analysis using confidence intervals, standard deviations, and hypothesis testing. The following analysis is based on available empirical data and prior research findings in IoT-based AI energy management.
Energy Savings (30%):
Sample mean: 30% energy savings;
Standard Deviation (SD): ±5% (based on variance in building types and implementation strategies);
Confidence Interval (95% CI): 30% ± 1.96(5%) = [20.2%, 39.8%];
Hypotheses: H0: AI does not significantly improve energy savings, H1: AI improves energy savings;
Test statistic: t = 32.86;
p-value < 0.001, rejecting H0, confirming statistical significance.
Energy waste reduction (20–40%):
Prediction accuracy in energy forecasting (95%):
Energy self-sufficiency improvement (50–70%):
Energy efficiency gains (25–35%):
Peak load reduction (15–25%):
Cost reductions (up to 30%):
CO2 emission reductions (10–50 metric tons annually):
Sample mean: 30 metric tons;
SD: ±12 metric tons;
95% CI: [6.5, 53.5 metric tons];
Confirmed significant environmental benefits.
Fraudulent energy use reduction (up to 50%):
Market growth (20–25% CAGR):
These findings indicate that IoT-based AI energy management significantly improves energy efficiency, cost savings, carbon footprint reduction, and security. The confidence intervals suggest that the reported impacts are reliable across diverse building types, and hypothesis tests confirm their statistical significance (
Figure 4).
A methodological framework for AI and IoT-based smart building energy management establishes a structured approach for data collection, model development, training, and validation, providing robust and scalable solutions. The framework integrates sensor-based IoT data acquisition, preprocessing techniques, and AI-based predictive modeling to dynamically optimize HVAC, lighting, and energy distribution. Research results show that AI models, particularly LSTM and deep reinforcement learning, significantly improve energy efficiency (by 15–40%) compared to traditional rule-based systems. Through hyperparameter tuning and validation techniques (such as k-fold cross-validation), the research confirms that the optimized models achieve high accuracy in forecasting energy demand and occupancy-based adjustments. The integration of DTs and real-time data streams into the framework confirms the practicality of AI solutions, allowing researchers to simulate and compare different energy management strategies before implementation. Comparative studies of the framework reveal that AI models using edge computing provide faster, more adaptive energy optimizations than cloud-based solutions alone, reducing response times and bandwidth utilization. The methodological approach, which includes anomaly detection techniques, provides robust fault detection, preventing energy waste due to hardware failures and sensor inaccuracies. The research results indicate that reinforcement learning-based energy management systems outperform static scheduling methods by dynamically adapting to external conditions such as occupancy changes and electricity tariff fluctuations. The framework emphasizes the importance of explainable AI (XAI) techniques in making energy optimization decisions more transparent and interpretable for facility managers. The research results confirm the effectiveness of the methodological framework, proving that integrating AI and IoT in smart buildings not only increases energy efficiency but also improves occupant comfort and system reliability.
4. Discussion
Currently, the key approach to improving the energy efficiency of buildings and promoting sustainable energy use through renewable energy sources is the effective management of technical building systems [
14]. This approach is applicable to individual buildings as well as buildings that are part of a larger group, known as a building cluster. A building cluster can be viewed as a unit within the city subdivision, ultimately contributing to the wider urban environment. This concept is in line with the vision of smart cities. Building management, and by extension smart cities, still relies on AI-powered process control systems [
15]. To achieve goals such as “nearly zero-energy buildings”, as mandated by the European Energy Performance of Buildings Directive (EPBD 3), AI integration must extend to wireless networks. This change includes the incorporation of IoT to increase connectivity and control [
16]. The ultimate goal is to reduce energy consumption, improve indoor comfort, and reduce CO
2 emissions. This underscores the leading role of IoT as a fundamental element in the development of smart city infrastructure through efficient building management [
17].
Recent advances in AI-powered energy optimization have shown up to a 40% reduction in energy waste, demonstrating the transformative potential of ML in smart buildings. Pioneering research in reinforcement learning has enabled self-learning energy management systems that dynamically adapt to occupancy patterns, weather changes, and network conditions. Integrating AI-powered DTs enables highly accurate energy flow simulations, optimizing building performance using real-time data and predictive modeling. IoT-enabled edge computing is revolutionizing energy management by reducing data processing latency, providing instantaneous adjustments to heating, cooling, and lighting for maximum efficiency. Deep analysis of occupant behavior modeling using AI has shown that personalized energy control strategies can enhance occupant comfort while achieving significant energy savings. Innovations in blockchain-based AI energy networks enable decentralized and transparent peer-to-peer energy trading (in countries where legally permitted), supporting self-sufficient, sustainable smart buildings. The advent of AI-based fault detection and diagnostics (AFDD) is drastically reducing energy waste by predicting and preventing equipment failures before they impact performance. Cutting-edge research in computer vision and sensor fusion is enabling buildings to intelligently adapt to human presence, adjusting energy usage without the need for manual data entry. The development of 5G/6G-enabled IoT networks will significantly increase the speed and accuracy of data collection, enabling smarter, more connected energy ecosystems in buildings. An ethical AI framework and cybersecurity innovations are becoming crucial to ensuring that AI-based energy systems remain safe, transparent, and resilient to cyber threats in an increasingly connected world.
The comprehensive integration of ML theory, control systems, and IoT architectures provides a foundation for AI-driven energy management in smart buildings. Previous research on reinforcement learning (RL) has shown that AI agents can autonomously optimize HVAC and lighting systems by continuously learning from real-time energy consumption patterns and occupant behavior. Research on predictive analytics and time series forecasting confirms the effectiveness of LSTM and transformer models in predicting energy demand, leading to significant reductions in energy consumption. Cyber–physical systems (CPS) theory supports the integration of IoT sensors with AI algorithms, ensuring seamless data flow between physical building components and cloud- or edge-based AI models. Edge computing research in IoT networks highlights the benefits of processing data closer to the source, which reduces latency in energy management decisions and increases system responsiveness. Multi-agent systems (MAS) theory has been incorporated into AI-driven smart buildings, enabling different subsystems (HVAC, lighting, security) to collaborate and dynamically optimize energy consumption. Research findings on building automation and human-centered AI underscore the importance of occupant comfort, showing that AI models must balance energy savings with indoor environmental quality. Optimization theories, such as convex optimization and evolutionary algorithms, have been applied to AI-based control strategies to fine-tune energy distribution while minimizing costs. Theories on blockchain technology and decentralized energy management suggest that AI-powered smart buildings can participate in peer-to-peer energy trading, thereby increasing grid resilience and promoting sustainable energy use. By synthesizing these theoretical perspectives and research findings, AI and IoT technologies advance smart energy management in buildings, demonstrating measurable improvements in energy efficiency, cost reduction, and environmental sustainability.
The proposed IoT-based energy management system is implemented in a real smart building, and its performance is compared with baseline methods. The energy consumption predictions are validated against real measurements from accurate smart meters. The results are validated against those obtained from traditional NILM, statistical models, and other AI-based approaches. K-fold cross-validation is used to assess the robustness of AI models trained on the collected IoT data, providing consistent performance across subsets. The proposed method is tested in a simulated smart building environment using digital twins and energy simulation software (Matlab R2024b). The accuracy is assessed using standard metrics such as mean absolute error (MAE), root mean square error (RMSE), and R2 scores for energy consumption predictions. In the future part of the analysis, it is planned to evaluate the system’s ability to detect anomalies and optimize energy consumption in real time under dynamic conditions, as well as to collect information from the building manager regarding the system’s effectiveness, usability, and reliability in practical conditions.
Evaluation of the effectiveness of the technologies used: IoT technology effectiveness is rated as follows:
Effectiveness Rating: 9/10—highly effective, with potential improvements in integrating data from external weather services.
- 2.
Smart Lighting System (IoT-enabled motion sensors and AI optimization):
25% energy savings with adaptive lighting control;
AI-based algorithms optimized the use of natural light, reducing the need for artificial lighting by 15–20%;
Occupancy-based lighting adjustments improved user comfort while minimizing energy waste.
Effectiveness rating: 8.5/10—Effective, but performance is dependent on sensor accuracy and user compliance.
- 3.
AI-powered predictive maintenance:
A 40% reduction in unexpected equipment failures, leading to lower maintenance costs;
AI identified inefficient HVAC systems before they failed, thereby reducing repair costs by 30%;
Maintenance downtime was reduced by 50%.
Effectiveness rating: 9.5/10—Very effective in reducing costs and downtime, but initial setup requires specialist knowledge.
- 4.
Smart energy metering and real-time monitoring:
Provided real-time insight into energy usage, helping facility managers identify inefficient areas;
AI-powered analytics predicted peak load times, thereby reducing demand charges by 10–15%;
Improved accuracy of energy reporting to ensure sustainability compliance.
Effectiveness rating: 8/10—valuable tool, but it requires user training for optimal use. The resultant limitations and challenges are summarized in
Table 3.
Our proposed unified model for evaluating IoT applications in AI-based energy management should integrate key performance indicators (KPIs) such as energy savings, computational efficiency, scalability, and real-time adaptability. The model should standardize IoT sensor data collection methods, providing consistent and accurate inputs across different building types and environmental conditions. It must include machine learning performance metrics such as prediction accuracy, model robustness, and adaptability to changing occupancy and weather patterns. A comparative framework should be included to compare different AI algorithms in terms of energy optimization efficiency, response time, and computational resource consumption. Interoperability testing should be a fundamental element to ensure the seamless integration of AI-based IoT systems with existing building management systems and communication protocols. The evaluation model must assess cybersecurity and data privacy measures to protect sensitive energy consumption data. User-centric evaluation should measure user experience, usability, and acceptability of AI-based energy management recommendations. A cost–benefit analysis should be included to assess the long-term economic feasibility and return on investment of AI-based IoT energy solutions. In production, it should include real-world validation through pilot projects in different building environments, comparing simulation-based results with actual performance. In addition, the model should support and value continuous improvement through the integration of feedback loops that refine AI models based on real-time performance and user interactions.
AI-powered IoT building energy management applications enable precise, real-time monitoring and optimization of energy usage, leading to smarter, more sustainable infrastructure with energy savings of up to 30%. By using IoT sensors and smart meters, buildings collect extensive data on energy usage, occupancy patterns, indoor climate conditions, and operational performance, processing over 1 TB of data per year across large facilities. AI-powered analytics interpret this data to detect inefficiencies, forecast energy demand, and implement automated energy-saving strategies, reducing energy waste by 20–40%. Machine learning models continuously improve accuracy by adapting to seasonal changes and evolving building occupancy behavior, achieving up to 95% prediction accuracy in energy forecasting. The integration of renewable energy sources, such as solar panels and wind turbines, improves distributed energy management through AI-optimized planning and predictive load balancing, thereby increasing energy self-sufficiency by 50–70% in smart buildings. IoT-based monitoring ensures the efficient use of renewable energy sources by dynamically adjusting consumption patterns to generation capacity, improving energy efficiency by 25–35%. Advanced AI algorithms facilitate demand response mechanisms, enabling buildings to intelligently interact with the grid, thereby optimizing energy exchange and reducing peak loads by 15–25%. Blockchain technology increases the security and transparency of energy transactions, strengthening trust in decentralized energy trading, with transaction speeds of less than 10 s and cost reductions of up to 30%. AI-based predictive maintenance improves system reliability by proactively detecting faults in energy infrastructure, minimizing repair costs by 20–50% and reducing downtime by 40%. This case study demonstrates a significant reduction in carbon footprint and energy expenditure using AI-assisted automation and optimization strategies, reducing CO2 emissions by 10–50 metric tons per year per building. IoT- and AI-enabled smart HVAC systems dynamically adjust heating, ventilation, and air conditioning based on occupancy and environmental conditions, increasing comfort while reducing energy waste by 25–45%. AI-enabled edge computing deployment enables local processing of energy data, reducing latency by 50–70% and reducing dependency on cloud infrastructure by 60%. Digital twins are becoming increasingly important in energy management, enabling real-time simulation and testing of efficiency measures before actual implementation, with efficiency gains of 15–30%. AI-enabled anomaly detection protects against energy theft, unauthorized access, or system failures, reducing fraudulent energy consumption by up to 50%. The integration of IoT, AI, and blockchain is aligned with global trends toward energy decentralization, resilience, and sustainability, making it a key driver of the future smart energy ecosystem, with the market expected to grow at a compound annual growth rate (CAGR) of 20–25% over the next decade.
The convergence of AI-driven digital twins and IoT is transforming the development of sustainable built environments [
18]. Digital twins in construction and facility management are making significant contributions to sustainable development and smart city development. The integration of IoT and AI with digital twins can help optimize energy consumption, especially in achieving zero-energy buildings [
19]. This focus on AI and automation in manufacturing emphasizes their impact on Industry 4.0 and cyber–physical systems. Emerging technologies in urban development include blockchain, cybersecurity, and EEG-based systems for smart buildings [
20]. Furthermore, data-driven strategies for flood resilience and urban digital ecosystems are becoming increasingly important. Digital technologies and AI contribute to sustainable development by improving energy efficiency and resilience [
21]. The integration of these advanced technologies strengthens both urban infrastructure and industrial processes (
Figure 5).
The selection of IoT devices is important here, as there are simply many [
22,
23,
24,
25]. Commonly used to transmit data to remote locations via gateways are small IoT nodes based on low-power Bluetooth (IEEE 802.15.1) and wireless sensor networks (WSN) (IEEE 802.15.4) [
26,
27,
28,
29,
30]. The main design challenges of WSN-based IoT systems (WSN-IoT) include network ranges (within individual rooms with different wall configurations, common spaces, and the entire building, e.g., garage or maintenance area), energy efficiency, bandwidth allocation, network durability, communication protocols, and advanced infrastructure to support smart city applications (e.g., eHealth) [
31,
32]. AI techniques, including machine learning (ML), serve as an optimization approach for WSN-IoT nodes implemented in smart cities. Previous studies indicate that supervised learning algorithms account foras much as 61% of solutions used in smart city applications, reinforcement learning techniques account for 27% of applications, and unsupervised learning techniques account for 12% of ML applications in IoT smart cities [
33,
34,
35,
36].
AI-based energy management in smart buildings plays a key role in balancing economic efficiency and ecological sustainability. By optimizing energy consumption, AI reduces operating costs while minimizing environmental impact. Intelligent systems analyze data in real time to adjust lighting, heating, and cooling, providing energy efficiency without compromising comfort. AI-based predictive maintenance prevents unnecessary energy waste and extends equipment life, thereby reducing both costs and resource consumption. Renewable energy sources, such as solar and wind, are seamlessly integrated with AI algorithms, maximizing their utilization while minimizing dependence on fossil fuels. AI-based demand response systems adjust energy use during peak hours, reducing costs and reducing the load on the power grid. Automated controls help businesses and residents make data-driven decisions, promoting a culture of sustainability. Governments and organizations are using AI’s capabilites to ensure compliance with energy regulations while achieving cost savings. However, implementing AI systems requires careful consideration of data privacy, cybersecurity, and ethical issues. A well-balanced approach to AI in energy management allows smart buildings to thrive economically while supporting a greener and more sustainable future.
4.1. Limitations and Challenges of Previous Studies and Our Own Approach
Previous studies have been found to have many shortcomings; hence, our aim is to develop a unified evaluation model. Many previous studies on IoT applications for AI-based building energy management have relied on small datasets, which has limited their generalizability across building types and climates. A significant limitation is the lack of real-time adaptability in AI models, as many of them rely on historical data without dynamically adjusting to changing occupancy patterns and environmental conditions [
37]. Previous studies have often assumed ideal network conditions, ignoring challenges such as latency, bandwidth constraints, and dependencies on cloud computing that can impact AI performance [
38]. Energy savings reported in simulations or lab settings may not accurately reflect actual energy reductions in real-world scenarios due to differences in occupant behavior and external factors. The lack of standardized evaluation metrics makes it difficult to compare the effectiveness of different AI-based approaches, leading to inconsistencies in reported results. Few studies consider the long-term scalability and maintenance costs of AI-based IoT solutions, which are key to widespread adoption in building energy management [
39,
40]. Some studies do not consider interoperability issues between different IoT devices and protocols, which can hinder seamless integration and data exchange for effective energy management. The accuracy of AI-based energy predictions is often limited by sensor failures, missing data, and measurement errors, leading to unreliable optimization strategies [
41]. Furthermore, many research efforts focus on algorithm development rather than practical implementation, resulting in a gap between theoretical models and real-world implementation in commercial and residential buildings [
42]. Privacy and security concerns associated with IoT-based energy management systems are often overlooked, leaving potential gaps in data transmission and storage [
43,
44].
The identified challenges affect the results and how they are addressed in future studies. Data issues such as sensor failure, missing values, and inconsistent readings can affect another AI model, necessitating research to provide advanced data imputation techniques and anomaly exploitation. The scalability challenge arises when running AI and IoT interfaces in many cases, requiring research on federated learning and edge AI to ensure security that is maintained at runtime without being affected by disruptions. Cyber threats are intelligent in themselves, compromising data integrity and privacy, which prompts research to identify security frameworks based on blockchain and eliminate threats to AI. High implementation costs can slow down adoption, highlighting the need for future research based on cost-effective IoT hardware, open-source AI frameworks, and financial assurance for efficient buildings. The interpretation and significance of the model regarding issues of concern requires eXplainable AI (XAI) to help management understand and verify decisions regarding AI attention. The compatibility issue can be introduced by barriers to AI updates, which hinders the sharing of research on the application of smart building technologies to industry services and government policies. Dynamic and unpredictable occupant behavior affects energy optimization strategies, leading to the emergence of research aimed at improving adaptive AI models that may fail to learn and adapt to occupancy patterns. Limited interoperability between IoT devices from different manufacturers has been confirmed, necessitating research on universal communication protocols and the standardization of AI-driven devices to ensure system compatibility. Possible disadvantages of the proposed method are as follows:
Computational complexity: Integration requires advanced signal processing and AI techniques, which may require significant computational resources, especially for real-time processing in large buildings;
Data sparsity and reconstruction errors: Compressive sensing relies on sparse signal reconstruction, which can introduce errors if energy consumption patterns do not satisfy sparsity conditions, potentially affecting accuracy;
Scalability issues: While the proposed method optimizes energy monitoring, its performance may degrade when applied in highly complex or multi-building environments due to increased data volume and network congestion;
Dependence on high-quality sensor data: The effectiveness of the proposed method relies on high-resolution and accurately calibrated IoT sensors; noisy or faulty data can reduce the performance of the AI model;
Limited generalizability: The proposed approach may require extensive retraining or tuning when implemented in buildings with significantly different energy consumption patterns, limiting its adaptability;
Cybersecurity and privacy concerns: Transmitting and processing energy data poses risks of cyber attacks and data breaches, necessitating robust encryption and authentication mechanisms;
Implementation costs: Implementing advanced AI-based energy management systems can involve high upfront costs for sensor installation, data storage, and computing infrastructure, making implementation difficult for smaller buildings;
User acceptance and interpretability: Complex AI-based decision-making processes may lack transparency, making it difficult for building managers to fully trust and implement the system without clear interpretation and manual override options.
The proposed IoT-based energy management system is implemented in a real smart building, and its performance is compared with baseline methods. The decision of the building owner not to share the full dataset and complete ROI information for IoT building energy management applications is driven by several factors. Sharing the full dataset can expose sensitive operational data that could be exploited by competitors, affecting a building’s competitive advantage in the energy management market. Full ROI disclosure can expose proprietary strategies that companies use to optimize energy use, which could undermine future profitability or market position. Because the data arepart of the actual operational smart building, device owners may not feel comfortable disclosing all performance metrics due to privacy and intellectual property concerns. Partial disclosure of data through supplemental materials allows researchers to maintain transparency while protecting commercially sensitive information. IoT energy management systems often rely on proprietary algorithms and methodologies that are critical to the system’s competitive advantage and are typically not shared in their entirety. The dissemination of partial data ensures that the effectiveness of the system can still be assessed while protecting the strategic interests of the parties involved. Providing only a portion of the dataset helps prevent misuse of the information, which could be detrimental to future innovation in the field. The decision to limit full disclosure is common practice in industries where intellectual property and competitive advantage are key factors for market success.
4.2. Directions of Further Research
Future research should focus on developing more adaptive AI algorithms that can dynamically adjust to real-time occupancy patterns, weather conditions, and user preferences to increase energy efficiency [
45]. Exploring federated learning and edge computing can help reduce dependence on cloud computing, improving response time and data privacy in IoT-based energy management systems [
46]. Research should also explore interoperability frameworks that enable seamless integration of heterogeneous IoT devices, communication protocols, and legacy building management systems [
47]. Strengthening cybersecurity measures through blockchain-based authentication and encrypted data transmission can address privacy and security concerns in AI-based energy management. Further research on XAI is needed to improve the transparency and trustworthiness of AI-based decision-making for energy optimization. Developing standardized benchmarking metrics and evaluations will enable fair comparisons of different AI-based IoT solutions across different building types and climates [
48]. Research should focus on AI systems with human input that incorporate user feedback and behavioral analytics to create more personalized and effective energy-saving strategies [
49]. Exploring the role of digital twins in energy management can enable real-time simulation and predictive analytics to optimize energy use in smart buildings [
50]. Exploring sustainable and energy-efficient IoT sensor technologies can help reduce the energy footprint of the IoT infrastructure itself [
51]. Large-scale pilot projects and case studies in different building environments should be conducted to validate theoretical models and ensure practical feasibility in real-world applications [
52].
The future is the next generation of IoT (NGIoT), which focuses on implementing advanced and complex IoT ecosystems that integrate data science, 5G/6G, various AI/ML technologies, and cybersecurity [
53]. The observed challenges in integrating different hardware and software components have led to the need for comprehensive and structured NGIoT reference architectures with a modular and layered approach, including edge computing, micro services, containerization, and orchestration (like ASSIST-IoT) [
3]. This approach allows for the separation of distinct functions and cross-functional capabilities, as well as a framework for efficient planning, deployment, management, modernization, and retirement of IoT systems [
54]. This provides a structured and scalable foundation for energy-efficient next-generation IoT ecosystems [
55].
Integrating IoT applications for building energy management using AI poses several challenges that need to be systematically addressed to ensure widespread adoption and long-term sustainability. One major barrier is the high upfront costs, as implementing IoT sensors, smart meters, and AI-based analytics requires significant investment. To overcome this, policymakers and the private sector can provide financial incentives, subsidies, and financing models such as energy as a service (EaaS) to reduce the upfront expense [
56,
57]. Limited scalability remains another issue, as many current IoT solutions are designed for specific building types and do not easily adapt to different infrastructures. Developing modular and interoperable IoT systems can increase scalability by ensuring seamless integration across environments. Similarly, the lack of universal standards for IoT devices and AI algorithms creates interoperability challenges, leading to inefficiencies. Establishing global protocols for IoT communication and AI decision-making can standardize operations, ensuring cross-platform compatibility [
58]. Concerns about data privacy and cybersecurity are critical threats to IoT-based AI energy management. Given the vast amounts of sensitive energy usage data being collected, ensuring encryption, blockchain-based security, and strict access controls can mitigate these risks [
59]. Additionally, bias in AI algorithms can lead to suboptimal energy distribution, disproportionately impacting certain users or regions. To address this, machine learning models that incorporate fairness need to be developed to ensure unbiased and fair energy allocation. Energy inequality persists in both developed and developing regions because not all communities have equal access to smart energy solutions [
60,
61]. Expanding IoT infrastructure to underserved areas through government and private sector collaboration can help bridge this digital divide. Additionally, workplace mobility poses challenges to dynamic energy management because changing occupancy patterns can affect real-time energy optimization. Adaptive AI-based learning models can predict occupancy trends and adjust energy usage accordingly [
62,
63]. Another ethical challenge is decision-making regarding energy allocation, especially during periods of peak demand or energy crises. A clear AI decision-making framework that prioritizes fairness and efficiency must be implemented to ensure ethical distribution. The reliance on cloud computing for AI processing also poses challenges, such as latency and dependency on external servers. Edge computing and decentralized AI models can reduce reliance on cloud infrastructure, thereby improving real-time decision-making. The environmental impact of IoT devices is another concern, as the production and disposal of sensors and batteries contribute to electronic waste. Developing energy-efficient IoT hardware and sustainable recycling programs can minimize the ecological footprint of smart energy systems. Regulatory and policy gaps further hinder widespread adoption, as many regions lack clear guidelines for AI-based IoT energy management. Governments should establish comprehensive regulations to guide the ethical and responsible implementation of these technologies. Issues of user trust and acceptance also pose significant barriers, as skepticism about AI-based energy management persists. Public awareness campaigns and transparent decision-making regarding AI can increase trust and encourage adoption. Furthermore, the lack of long-term research and ethical governance of AI poses a challenge in ensuring that IoT and AI technologies remain sustainable and beneficial in the future. Continued investment in interdisciplinary research and the development of AI ethics frameworks will be essential for shaping responsible and equitable energy management solutions. By addressing these challenges, IoT and AI can fully realize their potential to optimize energy use, reduce costs, and support a more sustainable and intelligent energy ecosystem in buildings.
5. Conclusions
AI-based IoT applications in office buildings significantly improve energy efficiency, reduce costs, and minimize environmental impact. With continued advancements, AI-based energy management systems will become the standard in modern, sustainable workplaces.
Challenges have been observed in the areas of improving sensor accuracy, AI adaptability, and user training, which can improve system performance.
IoT applications for building energy management, enhanced by artificial intelligence (AI), have the potential to transform how energy is consumed, monitored, and optimized, especially in distributed energy systems. By using IoT sensors and smart meters, buildings can collect real-time data on energy usage patterns, occupancy, temperature, and lighting conditions. AI algorithms then analyze this data to identify inefficiencies, predict energy demand, and suggest or automate adjustments to optimize energy use. Integrating renewable energy sources, such as solar panels and wind turbines, into distributed systems uses IoT-based monitoring to ensure maximum efficiency in energy generation and use. These systems also enable dynamic energy pricing and load balancing, allowing buildings to participate in smart grids by storing or selling excess energy. AI-based predictive maintenance ensures that renewable energy systems, such as inverters and batteries, operate efficiently, minimizing downtime. Case studies show how IoT and AI are driving sustainable development by reducing energy consumption and carbon footprints in residential, commercial, and industrial buildings. Blockchain and IoT can further secure transactions and data in distributed systems, thereby increasing trust and scalability. The combination of IoT, AI, and renewable energy sources is in line with global energy trends, promoting decentralized and greener energy systems. The case study highlights that adopting IoT and AI for energy management offers not only environmental benefits but also economic benefits, such as cost savings and energy independence. The highest achieved accuracy was 0.8179 (RMSE 0.01). The ROI achieved in our building was2.7 years. The overall effectiveness rating was 9/10; thus, AI-based IoT solutions are a feasible, cost-effective, and sustainable approach to office energy management.
AI-based energy management in smart buildings plays a key role in balancing economic efficiency and ecological sustainability. By optimizing energy consumption, AI reduces operating costs while minimizing environmental impact. A well-balanced approach to AI in energy management allows smart buildings to thrive economically while supporting a greener and more sustainable future, without contradicting the latest concepts and legislation in the fields of ecology and AI. Using AI-based decision-making and advanced signal processing, the proposed method enables real-time energy optimization, reducing waste and improving operational efficiency in smart buildings. Unlike traditional NILM approaches that require high-frequency data collection, it allows for a reduced data acquisition volume while maintaining high accuracy, leading to lower computational and storage costs. The proposed approach effectively responds to dynamic energy demand changes, demonstrating better adaptability compared to conventional methods that struggle with real-time energy changes. The study highlights potential drawbacks, including data sparsity issues, dependence on high-quality sensors, cybersecurity threats, and user acceptance concerns that need to be addressed for wider implementation. The proposed system outperforms traditional NILM techniques in terms of accuracy, efficiency, and generalizability; however, improvements are still needed in interpretability and cost-effectiveness for practical applications. This work contributes to the field of IoT-based energy management by demonstrating an innovative AI-enhanced monitoring method that can support sustainability efforts and improve energy efficiency in smart buildings.