0% found this document useful (0 votes)
8 views

isi_30.02_05

This paper presents the design and implementation of an Intelligent Power Management System (IPMS) aimed at optimizing energy consumption in buildings through the integration of wireless sensor networks and a machine learning model. The system utilizes local units with ESP32 microcontrollers for data collection and a central unit based on Raspberry Pi4 for processing, employing a Random Forest model to determine optimal HVAC operational modes. The IPMS demonstrates significant energy conservation and effective real-time monitoring via a Node-RED dashboard.

Uploaded by

mohamedbeniysa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

isi_30.02_05

This paper presents the design and implementation of an Intelligent Power Management System (IPMS) aimed at optimizing energy consumption in buildings through the integration of wireless sensor networks and a machine learning model. The system utilizes local units with ESP32 microcontrollers for data collection and a central unit based on Raspberry Pi4 for processing, employing a Random Forest model to determine optimal HVAC operational modes. The IPMS demonstrates significant energy conservation and effective real-time monitoring via a Node-RED dashboard.

Uploaded by

mohamedbeniysa30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Ingénierie des Systèmes d’Information

Vol. 30, No. 2, February, 2025, pp. 335-347


Journal homepage: http://iieta.org/journals/isi

Implementation of an Intelligent Power Management System for Building Using Machine


Learning Model
Marwa Mushtaq Talib1* , Muayad Sadik Croock2
1
Department of Computer Engineering, University of Mosul, Mosul 00964, Iraq
2
Department of Control and Systems Engineering, University of Technology, Baghdad 00964, Iraq

Corresponding Author Email: [email protected]

Copyright: ©2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license
(http://creativecommons.org/licenses/by/4.0/).

https://doi.org/10.18280/isi.300205 ABSTRACT

Received: 18 September 2024 This paper discusses the design and implementation of an intelligent power management
Revised: 13 December 2024 system (IPMS) with the goal of optimizing energy consumption within buildings. The
Accepted: 14 January 2025 system incorporates wireless sensor networks (WSNs), a machine learning (ML) model,
Available online: 27 February 2025 and embedded hardware for monitoring and controlling the power consumption of Heating,
Ventilation, and Air Conditioning (HVAC) systems, which are the predominant energy
consumers in buildings. The IPMS architecture comprises of local units (LUs) which are
Keywords: equipped with ESP32 microcontrollers and a range of environmental sensors. Additionally,
power management system, smart buildings, there is a central unit (CU) which is built on a Raspberry Pi4. The CU utilizes a Random
machine learning, WSN, MQTT protocol, Forest machine learning model to analyze real-time sensor data and ascertain the optimal
Node-RED operational mode for each room. This includes transitioning between Shutdown, Select, and
Full modes based on factors such as occupancy and environmental conditions. The system
is effectively managed and closely monitored using a Node-RED dashboard, which offers
a user-friendly interface for seamless control and comprehensive data visualization in real
time. The proposed system shows a remarkable level of accuracy in forecasting operational
modes and attains substantial energy conservation, as confirmed by different case studies.

1. INTRODUCTION powerfully processing this data, artificial intelligence systems


can generate insightful analysis and support real-time
From residential environments to production facilities, decision-making [3]. In line with what was already discussed,
power management systems are quite crucial for maximizing our study's goal is to present an IPMS that seeks to maximize
efficiency and energy allocation in many different fields. power usage by carefully controlling the running of HVAC
Given the global need for energy, these technologies are systems, as they are considered the main source of energy
vitally necessary in promoting sustainability and the energy consumption in buildings [4].
economy. Efficient energy management lowers wasteful This study implements a system to enhance power
power usage and carbon emissions, therefore cutting running consumption in buildings, the developed system incorporates
costs and environmental damage. One of the main and rising real-time sensor data with AI-driven decision-making
causes of climate change is the building and construction analysis. The system contains several local units (LUs) and a
sector as over forty percent of world energy consumption and main central unit (CU). Each local unit with ESP32
one-third of annual greenhouse gas emissions come from it microcontroller function attached to sensors is located in a
[1]. An improved method of tracking and regulating a room as sensor nodes gathering environmental data including
building's energy consumption is building energy temperature, humidity, light intensity, and occupancy status.
management systems or BEMS. Apart from controlling On the other hand, the central unit driven by a Raspberry Pi4,
energy, the system might control a broad spectrum of other acts as a processing center and a gateway. It incorporates a
building components, whether it is industrial, commercial, or machine learning (ML) model to examine local unit incoming
private buildings [2]. Therefore, intelligent control and data to make decisions depending on predefined criteria for
monitoring systems offer appealing energy savings and a three classification decisions: Full, Select, and Shutdown. To
return on investment for newly built and retrofitted buildings control and monitor the system, node-red; which is a cloud-
when employed at scale. based programming tool is used for creatively wiring physical
Integrating cutting-edge energy and technical technology, turns on devices, APIs, and online services in innovative
the smart building idea offers a transforming method for combinations.
controlling energy use within buildings. Embedded systems The paper is structured as follows: Section 2 specifies
integration with WSNs and AI technologies completes the related works in energy optimization solutions. Section 3
concept of smart buildings. embedded systems along with indicates the suggested intelligent power management
WSNs create enormous volumes of data. Quickly and system. Section 4 discusses the results, whereas Section 5

335
concludes the findings and suggests future studies. technology and artificial intelligence to create a smart system
for an educational lab managing energy use. Different
controllers in the real system such as Arduino Mega 2560 and
2. RELATED WORK Siemens S7-1200 PLC—help to increase system
dependability and efficiency. Node MCU ESP8266 sends and
Examining studies on how to enhance power management receives data through Wi-Fi from and to PLCs and Arduinos
shows that, particularly in recent years, power management while Bylink and the ThingSpeak platform create the IoT
has been thoroughly studied in the literature. Many research facilities. The suggested prototype of building management
papers have addressed the idea of Building Energy system (BMS) was tested in a laboratory coupled with several
Management Systems (BEMS) and the degree of the kinds of sensors. The collected data is Fed to an Artificial
influence of new technology in enhancing this notion. By Neural Network (ANN), enabling the BMS to regulate air
allowing better energy solutions, embedded systems, WSN, conditioning, ventilation, firefighting, lighting,
and AI are considered a transformation in power management and temperature forecasting.
in buildings. The literature lacks systematic approaches for The importance of real-time power monitoring and
sensor-actuator integration, which led Fernandes et al. [5] to adaptive management for smart homes and smart grid-based
present the SmartLVEnergy framework, intended to upgrade infrastructure was addressed by Saluja et al. [8]. The
outdated low-voltage systems. This framework employs a suggested solution was a smart energy control system using
retrofitting strategy that integrates decentralized sensing, smart home appliances for infrastructure. The presented
distributed computation, and predictive analytics. Following solution allowed modern automation and energy usage
Artificial Intelligence of Things (AIoT) and small machine management by combining real-time sensor data across smart
learning (TinyML) concepts, the framework was used to devices with sophisticated AI-driven analysis. The solution
upgrade the energy distribution panel of a legacy guarantees flawless connection between the client appliances
manufacturing facility with sensor devices supporting remote (Arduino) and the centralized server (Raspberry Pi) through a
monitoring and decentralized statistical analysis using fifteen- ZigBee-based personal area network in a star topology. This
min energy demand forecasting models based on two-layer enabled quick energy-saving techniques to be applied always.
long-short-term memory (LSTM) networks. This AIoT Using defense-in-depth with several levels of protection, the
architecture represented a breakthrough in sensor-actuator suggested method also emphasizes a safe system to guard data
retrofitting—that is, combining digital technologies with around the smart grid. Implementing real-time monitoring and
older systems for smart energy management and low-cost control energy systems have been investigated thoroughly as
end-to-end IoT system design for smart building energy revised in references [9-17].
monitoring and control.
One of the crucial elements for energy control and
monitoring in smart buildings includes developing a low-cost 3. PROPOSED IPMS
end-to-end system as represented by Kök et al. [6] where edge
computing enabled ML models were created to forecast In this section hardware and software implementations are
building energy use. Based on edge computing, they discussed. Emphasizing the design, functioning, and
suggested a four-layer IoT architecture to estimate energy integration of the system will help grasp the technical
usage in smart buildings, therefore enabling real-time elements and data processing in real time.
monitoring of energy use. Four-layer IoT system architecture
provided comprising physical device layer, edge layer, fog 3.1 System structure
layer, and cloud layer. With the use of artificial intelligence
and IoT, test findings reveal that the suggested method may Using a network of microcontrollers and sensors, the
be applied in rapid, efficient, and interpretable building intelligent power management system is meant to effectively
energy management. monitor and control energy use inside a specific area, such as
In the same context, Essa et al. [7] discussed using IoT a building or room.

Figure 1. System prototype overview

336
Two main components—the Central Unit (Raspberry Pi4) 3.2 ML model
and the Local Units (ESP32 microcontrollers)—form the
architecture as indicated in Figure 1. The CU acts as the ML model plays a major role in this system by processing
system's brain. It receives data from the LUs, runs ML real-time sensor data and making smart decisions. Based on
algorithms on it, and decides how best to control energy use. the results from our previous work [18] Random Forest RF is
Using the Message Queuing Telemetry Transport (MQTT) best suited to be adopted as the ML model for this system. RF
protocol, the Raspberry Pi4 also manages the local units' and incorporates several decision trees as shown in Figure 3 to
its own communications. It processes data using a pre-trained improve prediction accuracy with the final forecast derived by
machine learning model, follows particular MQTT topics to averaging the findings of all the trees, this method produces
receive sensor data and control requests, and subsequently reduced bias and variation as shown in Eq. (1) [19]:
generates control actions back to the local units.
As mentioned before, local units consist of sensors and
actuators attached to ESP32 microcontroller. Every ESP32 is
linked to three sensors: light sensors (LDR), infrared (IR)
sensors for occupancy detection, and temperature and
humidity sensors (DHT22). Real-time environmental data
collected by these sensors is localized by the ESP32 and then
sent to the Raspberry Pi via MQTT. The ESP32 units also
follow Raspberry Pi control commands, which they utilize to
run actuators such as LEDs that symbolize three modes of
operations.

Figure 3. RF classifier [20]

1
𝑋𝑋 ∗ = 𝜋𝜋 �𝛰𝛰(𝑐𝑐)�𝛽𝛽 = 𝑘𝑘 ∗ � , 𝑘𝑘 ∗ (1)
𝑘𝑘 ∑𝑘𝑘=1 𝑥𝑥𝑙𝑙𝑙𝑙 �𝑓𝑓(𝑐𝑐)�

where, X* is the ideal points; O(c) is the observation; β is the


learning rate variable; K is the number of decision trees; f is
feature transform and lk is a leaf node of the decision tree.
In order to guarantee reliability, the RF approach utilized in
this study was configured with particular hyperparameters
which employ a total of 1000 estimators (trees) and the
maximum depth is set to five to prevent overfitting. Other
parameters include a bootstrapping sample technique to
increase stability and the Gini impurity being criteria for node
splitting.
The CU initially handles and scales real-time sensor data to
fit the demands of the model. The ML model then receives the
processed data and generates an input-based prediction. After
that, the label encoder decodes this prediction back into a
legible action, say "Shutdown," and sent to the pertinent topic
to guide the LU on the necessary action.

3.3 Dataset structure

ML model is pre-trained by a measured data set taken from


a floor office in a university building over one year [21] where
both indoor and outdoor measures were acquired. Occupancy-
related models can be developed and validated among other
Figure 2. Flow chart of the proposed system uses for the obtained data as a result, the development of the
model in this study considers indoor elements such as
To enable the management and control of this system temperature, humidity, occupant presence, and light
remotely Node-red is implemented which is a web-based tool conditions. Depending on occupancy status and temperature,
to visualize the integration of hardware devices, API’s and a new feature called Mode was included in the dataset to
online facilities. Leveraging Node-RED, one can remotely classify it based on the three described modes (Shutdown,
operate and manage the system by means of real-time data Select and Full). As shown in Figure 4 which indicates the
graphical representation, control interfaces, and autonomous distribution of operational modes class Shutdown dominates
decision-making capability. A flow chart for the proposed other classes, to address this limitation of imbalanced data,
system is presented in Figure 2. upscaling measurements are implemented to even out all
classes and prevent bias issues. After this point, data is labeled

337
by tagging them such that the model may recognize the classes subscribe to those topics. This will make the LUs switch from
by use of tags then features are scaled to improve algorithm one mode to another and that’s represented in this prototype
performance by balancing the influence of all the elements on system by turning ON/OFF LEDs which correspond to each
distance computation. Feature scaling is crucial since the scale mode of operation.
of these features may exceed their values; this can be solved The MQTT protocol is utilized for allowing light-weight
by scaling the features into a designated range [22]. The final and effective communication between the CU and the LUs as
step is dividing data set into 80% training sets and 20% testing a result Quality of Service measurements (QoS) is set to zero,
sets making it ready for the training and testing phase. this ensures the fastest message delivery without
acknowledgment to lower latency and resource usage which
is suitable for real-time applications. To overcome this
limitation, the system checks the MQTT connection between
CU and LUs constantly. In case the connection is lost, LUs
intended to automatically re-connect with the MQTT broker
and continue Publish/Subscribe with topics. Besides that, to
reduce the possibility of missed communications, the LUs
transmit regular updates to the CU at five-second intervals. If
a message is not received, it shall be substituted by the
subsequent update to ensure dependable real-time
performance for critical decision-making processes.
Figure 4. Distribution of operational modes (2) Mode handling
The CU is responsible for running two separate modes:
3.4 Hardware implementation Manual Mode and Automatic Mode. The default mode,
Automatic Mode, uses the ML model and autonomous
Three LUs and one CU together implement the hardware. decision-making to continuously process sensor input. The
Specifications for each component are discussed here in CU handles received sensor data, forecasts required actions,
detail. and transmits commands to the ESP32 nodes to drive
actuators like LEDs. Manual Mode lets the system wait for
3.4.1 Central unit implementation user commands instead of making automatic decisions based
As mentioned before, CU (Raspberry Pi4) as shown in on sensor data. To switch from Automatic Mode to Manual
Figure 5, acts as the core of the system and it takes several Mode a message is received from a subscribed topic like
steps to accomplish the whole process as discussed below: manual_mode_room1 which is controlled by Node-Red web
application. In this mode, the user can directly send
commands to LUs from the application dashboard.
(3) Multi-room coordination
In order to guarantee efficient power utilization in a multi-
room situation, the CU combines and controls data among
several LUs. Every LU is given a distinct MQTT client ID to
set it apart from others, therefore allowing the CU to access
and handle data from individual nodes. Every LU sends its
real-time sensor data that is: temperature, humidity,
occupancy and light to distinct MQTT topics including room
1, room 2, and room 3. The CU functions as both the MQTT
broker as well as client, subscribing to the selected topics and
Figure 5. CU (Raspberry Pi4) at the same time processing the incoming data. Upon
processing, the CU employs the RF machine learning model
(1) MQTT communications to predict the suitable mode for each room. Then the decisions
MQTT is a lightweight protocol, which makes it perfect for made from CU are sent back to LUs through topics like
IoT applications, making it efficient for the communication action_room1, action_room2 and action_room3. Each LU
between CU and LUs. Raspberry Pi acts as an MQTT broker defines its related control message through its distinct MQTT
and MQTT client which subscribes to particular topics to get identifier and as a result, reacts accordingly.
data from the LUs. For example, it follows topics like room 1,
room 2, and room 3 where every topic relates to a specific 3.4.2 Local unit implementation
room. Sensor data including temperature, humidity, LU which consists of an ESP32 microcontroller and
occupancy, and light level abound in these subjects. The CU, (temperature, humidity, light, and occupancy status) sensors
being subscribed to a certain topic, gets the data payload right attached to it responsible for the data acquisition process as
away when LU gathers real-time sensor data. Apart from shown in Figure 6. ESP32 is a strong and flexible
gathering sensor data, the Raspberry Pi also follows topics microcontroller well-known for its integrated Wi-Fi and
like manual_mode_room1 that influence the operational Bluetooth capabilities. Its dual-core CPU and plenty of GPIO
mode of the system. These topics switch from automatic to pins support a broad spectrum of sensors and peripherals
manual modes depending on commands sent via a user helping it to effectively manage functions including data
interface, which is in our case a Node-RED dashboard. collecting, processing, and communication. Three types of
CU not only receives data from LUs but also processes sensors are connected to ESP32 which are DHT22 for
them through the ML model and publishes the actions (e.g., temperature and humidity, light sensors represented by LDR
Shutdown, Select, or Full) to topics like action_room1, sensor which measures light intensity, and Occupancy status
action_room2, and action_room3 to which the LUs already sensor which is an IR sensor that can detect motions. LU also

338
handles three LEDs each one corresponding to one of the three by linking physical devices, APIs, and many internet services
modes of operation (Shutdown, Select, and Full), LU is as a cloud-native platform. Node-RED's cloud-based
subscribed to a topic such as action_room1, and upon architecture lets several users build, run, and administer apps
receiving the command from the topic, it updates the status of from anywhere with internet access, therefore facilitating
the LEDs according to that command. real-time access and teamwork. In current distributed systems,
where flawless integration between many devices and
services is crucial, this feature is especially helpful. Utilizing
Node-RED's cloud deployment, scalability is also supported,
therefore enabling applications to expand and change with
system demands. Node-RED uses the cloud to streamline the
creation and upkeep of IoT solutions, thereby providing an
easily available and strong tool for field practitioners as well
as researchers.

4. RESULTS OF THE PROPOSED SYSTEM

The proposed IPMS prototype is implemented as shown in


Figure 7 where three nodes of LUs correspond to a room, so
they represent room1, room2, and room3 respectively. Three
Figure 6. Local unit
cases were discussed to verify the real-time data processing
for the prototype system as clarified below:
The ESP32 gathers regular interval data from the DHT22,
LDR, and IR sensors. The sensor readings, temperature and
humidity, for the DHT22 are numerical values that are not
needed for further processing. The IR sensors accumulate
binary outputs, either motion or non-motion, that are used to
determine occupancy levels over time. LDR sensor measures
light intensity and based on a specific threshold it indicates
whether there is light or not. After that, the gathered data is
arranged into a structured payload. This payload is ready for
MQTT transfer to the central unit, therefore guaranteeing that
all pertinent environmental data is sent for centralized
processing.
It is worth mentioning that LU subscribes to related topics
(e.g., action_room1 and manual_mode_room1) and publishes
sensor data to topics like room1. Automatic reconnection is
also handled if the MQTT connection is lost. The loop
operation of the ESP32 constantly monitors the MQTT
connection and, in case of need, reconnects to guarantee
continuous data flow. Figure 7. IPMS prototype implementation

3.4.3 Local unit fault tolerance handling mechanisms 4.1 First case study
To guarantee the reliability and robustness of the system, a
specialized mechanism has been developed to identify and The first case study represents when there is no occupancy
manage LU failures. Failures in the LU may originate from in the room while maintaining the rest of the features.
two principal sources: the sensors failing to supply data or a
failure of the ESP32 microcontroller due to missing
connectivity or hardware failure. A central unit was
developed to identify the two types of errors by monitoring
for absent sensor data or a lack of connectivity from the LU.
Upon the identification of such issues, the CU isolates the
malfunctioning LU, and stops the
automatic decision processes associated with that unit. After
this point, CU publishes the status of malfunctioning LU to a
topic named (node_red/fault_status_room1), which the node-
RED already subscribed to, to initiate an alert in the
controlling dashboard to allow user intervention

3.5 Cloud central site

One cloud-based programming tool acknowledged as


helping IoT systems and services to be developed and
integrated is Node-RED [23]. Node-RED offers a scalable and
adaptable environment for users to build intricate processes Figure 8. Implementation for LU in room1

339
Figure 9. Web application monitoring for room1

Table 1. Serial monitor readings from room 1

Sensor Timestamp Occupancy Temperature (℃) Humidity (%) Light Action Timestamp Action
02:46:34.609 0.00 29.50 49.30 1 02:46:34.609 Shutdown
02:46:39.629 0.00 29.80 59.30 1 02:46:39.583 Shutdown
02:46:44.624 0.00 30.10 65.30 1 02:46:44.624 Shutdown
02:46:49.623 0.00 30.40 68.40 1 02:46:49.623 Shutdown
02:46:54.630 0.00 30.70 68.00 1 02:46:54.630 Shutdown
02:46:59.657 0.00 31.00 67.00 1 02:46:59.610 Shutdown
02:47:04.646 0.00 31.20 64.70 1 02:47:04.646 Shutdown
02:47:09.665 0.00 31.30 61.00 1 02:47:09.665 Shutdown
02:47:14.673 0.00 31.50 52.30 1 02:47:14.673 Shutdown
02:47:19.686 0.00 31.50 47.90 1 02:47:19.686 Shutdown
02:47:24.688 0.00 31.50 46.60 1 02:47:24.688 Shutdown
02:47:29.687 0.00 31.50 44.60 0 02:47:29.687 Shutdown

In this case no matter the parameters acquired from the depending on real-time sensor readings but when the
LUs, the IPMS shut down all the HVAC devices since there temperature drops from 25℃ to 24.80℃ in the time stamp
is no occupancy at all. This case will be represented as a red (16:25:14.312) the mode status did not change to shut down
LED turned on which indicates the Shutdown mode as shown in the upcoming reading (16:25:19.314), instead, it cahanges
in Figure 8. Figure 9 shows the Web application monitoring in the second upcoming reading (16:25:24.322) that means it
process in Automatic Mode for this room. takes approximately ten seconds to transit from one mode to
Readings are taken every five seconds and we take 120 another when specific changes happen. That could be justified
readings representing 10 minutes. The system accurately due to the predefined delay of 5 seconds between sensor
predicts the Shutdown mode in all readings. Table 1 implies a reading intervals.
window of one-minute serial monitor readings in LU for room
1.

4.2 Second case study

The second case study shows the implementation of the


proposed system in the case of Select Mode as Figure 10
implies. LUs will measure the occupancy levels and all
parameters and send them to CU for processing. It specifies
when the room is partially occupied within the specified
temperature range. Hence, there is no need to operate all
HVAC devices, and it is represented by a yellow LED. Since
the room is not fully occupied, this mode represents an
energy-saving approach in the smart system.
Figure 11 indicates the Automatic mode monitoring
through the web application while Table 2 shows the serial
monitor readings for room 2. From the readings, it could be
Figure 10. Implementation of room 2
seen that the system accurately predicts the mode of operation

340
Figure 11. Web application monitoring of room 2

Table 2. Serial monitor readings from room 2

Sensor Timestamp Occupancy Temperature (℃) Humidity (%) Light Action Timestamp Action
16:24:39.247 0.40 26.50 36.30 1 16:24:44.256 Select
16:24:44.256 0.40 26.20 32.40 1 16:24:49.263 Select
16:24:49.263 0.40 25.90 29.80 1 16:24:54.262 Select
16:24:54.262 0.40 25.50 28.20 1 16:24:59.270 Select
16:24:59.270 0.40 25.30 27.30 1 16:25:04.299 Select
16:25:04.299 0.40 25.20 26.70 1 16:25:09.287 Select
16:25:09.287 0.40 25.00 26.60 1 16:25:14.312 Select
16:25:14.312 0.40 24.80 26.40 1 16:25:19.314 Select
16:25:19.314 0.40 24.80 26.30 1 16:25:24.322 Shutdown
16:25:24.322 0.40 24.60 27.00 1 16:25:29.329 Shutdown
16:25:29.329 0.40 24.30 29.70 1 16:25:34.345 Shutdown
16:25:34.345 0.40 24.00 33.50 1 16:25:39.355 Shutdown

Table 3. Serial monitor readings from room 3

Sensor Timestamp Occupancy Temperature (℃) Humidity (%) Light Action Timestamp Action
16:40:58.945 0.50 25.90 41.60 1 16:41:03.949 Full
16:41:03.949 0.50 25.80 41.20 1 16:41:08.955 Full
16:41:08.955 0.50 25.70 41.00 1 16:41:13.976 Full
16:41:13.976 0.50 25.30 39.50 1 16:41:18.996 Full
16:41:18.949 0.50 24.90 38.80 1 16:41:23.978 Full
16:41:23.978 0.50 24.50 38.70 1 16:41:28.966 Shutdown
16:41:28.966 0.50 24.20 42.30 1 16:41:29.005 Shutdown
16:41:29.005 0.50 23.90 46.70 1 16:41:34.009 Shutdown
16:41:34.009 0.50 23.60 50.10 1 16:41:39.013 Shutdown
16:41:39.013 0.50 23.50 52.80 1 16:41:44.020 Shutdown
16:41:44.020 0.50 23.40 54.70 1 16:41:49.035 Shutdown
16:41:49.035 0.50 23.20 55.70 1 16:41:54.026 Shutdown

4.3 Third case study the total room capacity and the temperature is more than or
equal to 25C. As we noticed in case study 2, it takes one
This case study indicates the operation in Full mode. LUs reading to switch from one mode to another when sensor
will measure the occupancy levels and all parameters and send readings change.
them to CU for processing. When the occupancy and Manual mode could be activated at any time to manually
temperature exceed the threshold levels, IPMS will operate all control the system from the node-red web application. As
the HVAC devices in this room and a green LED turned on to previously mentioned, CU subscribes to topics named
represent this mode. The implementation for this case and the (manual_mode_room1, manual_mode_room2, and
web application monitoring are shown in Figures 12 and 13 manual_mode_room3) which correspond to each room
respectively. respectively where the user can active this mode and operate
Table 3 shows the serial monitor readings of room 3, It the LUs remotely to operate manually in one of the three
shows that the mode will be Full if the occupancy status is operation modes as shown in Figure 14 which indicates the
beyond the threshold which is more than or equal to 50% of manual control in room 3.

341
Figure 12. Implementation of room3

Figure 13. Web application monitoring for room3

Figure 14. Manual mode

342
4.4 Fourth case study by processing the sensor data using the pre-defined ML
model, from the figure it could be noticed that room 1 is in
Using a mix of hardware, cloud monitoring, and centralized Shutdown mode, room 2 is in Select mode while room 3 is in
control, three LUs are used concurrently in this case study to Full mode.
monitor and control various rooms within a building. LU1
represents room 1 which is in Shutdown mode LU2 signifies
room 2 in Select mode and LU3 denotes room3 in Full mode
as shown in Figure 15 which depicts the hardware
configuration for the three rooms, thereby highlighting how
each room has sensors and controllers linked to an ESP32
microcontroller (LUs), which is in charge of interacting with
the CU (Raspberry Pi), it could be seen that each LU operates
in different modes as implied by the various LEDs.
Real-time data from every room is presented in Figure 16
which shows the cloud monitoring and control interface using
Node-RED. Every room's occupancy, temperature, light, and
humidity levels may be viewed by users who can also change
between manual and automatic management modes.
Showing the run windows in the CU, Figure 17 shows the
execution of scripts matching every room. These scripts find
the suitable control action to be transmitted back to the LUs Figure 15. Hardware configuration for the three rooms

Figure 16. Node-red cloud monitoring and control

Figure 17. CU run window

343
Figure 18. Fault detection in CU

Figure 19. Notification for malfunctioning LU notification for malfunctioning LU

4.5 Fifth case study accuracy and classification time.

The implementation effectively illustrates the system's


capability to identify and isolate faults within a Local Unit.
Figure 18 illustrates that the CU is responsible for monitoring
the status of LUs. Upon detection of a fault, the CU takes
action to isolate the faulty LU by stopping decision-making
processes associated with that particular unit. Simultaneously,
the system provides notifications to the user via the Node-RED
dashboard. As illustrated through Figure 19, this notification
serves to quickly notify the user that one of the LU is not
responding.

4.6 Case studies analysis Figure 20. The accuracy results in reference [18]

For the above-mentioned case studies, a comparison is Moreover, it could be seen from the confusion matrix in
made between the results of this study and the results obtained Figure 21 that RF 100% accurately predicts all the classes and
from our previous study which investigated the optimal ML this is the exact situation in our study where it always gives
method in terms of accuracy [18]. In this work, the system accurate predictions in real-time measurements. With the RF
achieved a 100% accuracy rate by showing great accuracy in classifier being a common and ideal option in both systems,
predicting modes of operation (Shutdown, Select, and Full) in both use machine learning to show great efficiency in
real-time settings. This performance is in line with our controlling energy in buildings. This guarantees that,
previous research, in which the Random Forest (RF) classifier especially in using RF for precise and effective power
remained robust and also attained 100% accuracy as shown in management, our system is in line with the best practices and
Figure 20. Although this work mostly concentrates on real- results offered in the original study.
time hardware implementation with efficient processing of To measure the efficiency of the proposed approaches,
sensor data every 5 seconds, the original study provides a more power consumption is calculated for both Select mode and
general comparison of machine learning and deep learning Shutdown mode, lets first assume that each room has ten 2-ton
models; RF emerges as the most efficient in terms of both Air Conditioners (ACs) so the following calculations are done.

344
none of the AC units being active. The complete power
consumption for every mode for the eight-hour period is
broken out in Table 4.

Table 4. Energy consumption

Power Energy
Duration
Mode Consumption Consumption
(hours)
(kW) (kW/h)
Full 4 70.34 4 × 70.34 = 281.36
Select 3 35.17 3 × 35.17 = 105.51
Shutdown 1 0 1×0=0
Total 8 105.51 386.87

From Table 4 it could be inferred if the room runs in Full


mode for eight hours, the overall energy consumption may be
computed as follows:
Figure 21. Confusion matrix for RF in reference [11] 𝐸𝐸1 = 8 × 70.34kW = 562.72kWh
Convert tons to BTUs: By contrast, the total energy usage in the scenario whereby
The cooling capacity 𝑄𝑄𝐴𝐴𝐴𝐴 of an AC unit is measured in tons the system runs four hours in Full mode, three hours in Select
where 1 ton is equal to 12,000 British Thermal Units per hour mode, and one hour in Shutdown mode is:
(BTU/hr). Hence, for a 2-ton AC unit:
𝐸𝐸2 = 386.8kWh
𝑄𝑄𝐴𝐴𝐴𝐴=2∗12,000 𝐵𝐵𝐵𝐵𝐵𝐵/ℎ𝑟𝑟=24,000 𝐵𝐵𝐵𝐵𝐵𝐵/ℎ𝑟𝑟
We can apply the following calculation for system
Convert BTUs to watts: efficiency under the scenario as opposed to running in Full
The power consumption P in watts (W) can be calculated mode for eight hours:
by converting BTUs to watts where each 1 BTU / hr =
0.29307107 W. Thus, for a 2-ton AC unit: 𝐸𝐸1 − 𝐸𝐸2
𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸% = � � × 100%
𝐸𝐸1
𝑃𝑃𝐴𝐴𝐴𝐴= 𝑄𝑄𝐴𝐴𝐴𝐴 ∗ 0.29307107W = 24,000 ∗ 0.29307107W
≈ 7,033.7W Substituting the values:
Thus, for a room equipped with n = 10 ACs total power 562.72 − 386.87
consumption 𝑃𝑃𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 is: 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸% = � � × 100% ≈ 31.27%
562.72
𝑃𝑃𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 = 𝑛𝑛 ∗ 𝑃𝑃𝐴𝐴𝐴𝐴 = 10 ∗ 7,033.7W = 70,337W ≈ 70.34kW Operating with the mixed mode scenario (Full, Select,
Shutdown) generates an energy savings of roughly 31.27%
That means each room needs approximately 70.34 kW, now compared to running in Full mode for the whole 8-hour period.
let’s assume when “Select” mode is activated half of the ACs This shows that strategic usage of Full, Select, and Shutdown
(𝑛𝑛𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 5) will operate so the power consumption 𝑃𝑃𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 modes can considerably increase energy efficiency, hence
will be: lowering the power consumption by 31.27%. This efficiency
helps to use more sustainable energy as well as lowers running
𝑃𝑃𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 = 𝑛𝑛𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 ∗ 𝑃𝑃𝐴𝐴𝐴𝐴= 5 ∗ 7,033.7W = 35,168W expenses.
≈ 35.17kW

When Shutdown mode is activated none of the ACs will be 5. CONCLUSION


operated resulting in:
The deployment of the proposed IPMS shows the potential
𝑃𝑃𝑆𝑆ℎ𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢𝑢 = 0W for substantial energy conservation in building management.
Through the utilization of Internet of Things (IoT)
As a result, whereas the "Shutdown" mode yields a 100% technologies and a sophisticated machine learning model, the
power savings, the "Select" mode reduces power consumption system effectively monitors and controls the functioning of
by 50%. This notable lower in energy consumption HVAC systems by analyzing sensor data in real time. The
emphasizes the effectiveness and energy-saving possibilities findings from the case studies demonstrate that the IPMS
of using various running modes. possesses the capability to effectively forecast and transition
Let’s assume the working hours in a building are 8 hr/day, between operational modes, thus enhancing energy efficiency
and the AC system runs in Full mode for four hours, in which and minimizing unnecessary power consumption. The
case all ten of the units are active requiring 70.34 kW of power. incorporation of Node-RED into the system's framework
The system turns to Select mode for three hours, in which case significantly improves its usability and scalability for remote
just half of the AC units are operational, lowering power usage control and monitoring purposes. This study not only offers a
to 35.17 kW. The system is in shutdown mode throughout the pragmatic resolution for the management of energy in
last hour, in which case 0% power consumption results from intelligent buildings but also establishes the foundation for

345
upcoming improvements, such as the integration of on distributed IoT. Computers and Electrical
supplementary sensors for indoor settings to provide exact Engineering, 109: 108775.
monitoring and energy economy. Future research will examine https://doi.org/10.1016/j.compeleceng.2023.108775
how exterior sensors may be integrated to consider the impact [10] Ahmed, S.T., Al-Hamdani, R., Croock, M.S. (2019).
of outside environmental variables, thus enhancing the Developed third iterative dichotomizer based on feature
adaptability of the system. decisive values for educational data mining. Indonesian
Although the present model makes use of data from one Journal of Electrical Engineering and Computer Science,
building, future studies will try to include multi-building 18(1): 209-217.
datasets and the implementation of more sophisticated https://doi.org/10.11591/ijeecs.v18.i1.pp209-217
machine learning models to increase generality and flexibility [11] Espejel-Blanco, D.F., Hoyo-Montano, J.A., Chavez,
among several building kinds. These attempts will help to J.M., Hernandez-Aguirre, F.A., Cruz-Flores, I.A.,
improve the IPMS design so assuring its adaptability and Valenzuela-Soriano, F.J. (2024). Design of HVAC
efficiency under many operational environments. control system for building energy management systems.
In 2024 IEEE Conference on Technologies for
Sustainability (SusTech), Portland, OR, USA, pp. 1-5.
REFERENCES https://doi.org/10.1109/SusTech60925.2024.10553504
[12] Khudhur, D.D., Croock, M.S. (2021). Physical cyber-
[1] Ceballos-Fuentealba, I., Álvarez-Miranda, E., Torres- security algorithm for wireless sensor networks.
Fuchslocher, C., del Campo-Hitschfeld, M. L., Díaz- TELKOMNIKA (Telecommunication Computing
Guerrero, J. (2019). A simulation and optimisation Electronics and Control), 19(4), 1177-1184.
methodology for choosing energy efficiency measures in https://doi.org/10.12928/telkomnika.v19i4.18464
non-residential buildings. Applied Energy, 256: 113953. [13] Gözüoğlu, A., Ozgonenel, O., Gezegin, C. (2024).
https://doi.org/10.1016/j.apenergy.2019.113953 Modeling and implementation of demand-side energy
[2] Swathika, O.G., Karthikeyan, K., Padmanaban, S. (Eds.). management system. Sigma Journal of Engineering and
(2022). Smart Buildings Digitalization, Two Volume Natural Sciences, 42(5): 1628-1645.
Set. CRC Press. https://doi.org/10.14744/sigma.2023.00106
[3] Damodaram, D., Godi, R.K., Rao, D.D., Glory, K.B., [14] Dhaou, I.B. (2023). Design and implementation of an
Somu, K. (2023). Power control management system internet-of-things-enabled smart meter and smart plug
model using wireless sensor network. Measurement: for home-energy-management system. Electronics,
Sensors, 25: 100639. 12(19): 4041.
https://doi.org/10.1016/j.measen.2022.100639 https://doi.org/10.3390/electronics12194041
[4] Raed, A.A., Walid, A.A.H., Zubo, R. (2022). IMDC-IST [15] Khudhur, D.D., Croock, M.S. (2021). Developed
2021: Proceedings of 2nd International Multi- security and privacy algorithms for cyber physical
Disciplinary Conference Theme: Integrated Sciences and system. International Journal of Electrical and Computer
Technologies, IMDC-IST 2021, 7-9 September 2021, Engineering, 11(6): 5379.
Sakarya, Turkey. EAI Publishing. https://doi.org/10.11591/ijece.v11i6.pp5379-5389
https://books.google.iq/books?id=YNVzEAAAQBAJ. [16] Elkholy, M.H., Elymany, M., Yona, A., Senjyu, T.,
[5] Fernandes, R., Costa, C., Gomes, R., Vilaça, N. (2024). Takahashi, H., Lotfy, M.E. (2023). Experimental
SmartLVEnergy: An AIoT framework for energy validation of an AI-embedded FPGA-based real-time
management through distributed processing and sensor- smart energy management system using multi-objective
actuator integration in legacy low-voltage systems. IEEE reptile search algorithm and gorilla troops optimizer.
Sensors Journal, 24(13): 20726-20741. Energy Conversion and Management, 282: 116860.
https://doi.org/10.1109/JSEN.2024.3403484 https://doi.org/10.1016/j.enconman.2023.116860
[6] Kök, İ., Ergun, Y., Uğur, N. (2023). Explainable AI- [17] Gozuoglu, A., Ozgonenel, O., Gezegin, C. (2024). CNN-
powered edge computing solution for smart building LSTM based deep learning application on jetson nano:
energy management in green IoT. In Low-Cost Digital estimating electrical energy consumption for future smart
Solutions for Industrial Automation (LoDiSA 2023), homes. Internet of Things, 26: 101148.
Cambridge, UK, pp. 150-157. https://doi.org/10.1016/j.iot.2024.101148
https://doi.org/10.1049/icp.2023.1747 [18] Talib, M.M., Croock, M.S. (2024). Intelligent power
[7] Essa, M.E.S.M., El-shafeey, A.M., Omar, A.H., Fathi, management models for buildings: A comparative
A.E., Maref, A.S.A.E., Lotfy, J.V.W., El-Sayed, M.S. analysis. Journal Européen des Systèmes Automatisés,
(2023). Reliable Integration of Neural Network and 57(1): 95-103. https://doi.org/10.18280/jesa.570110
Internet of Things for Forecasting, Controlling, and [19] Dangeti, P. (2017). Statistics for Machine Learning.
Monitoring of Experimental Building Management Packt Publishing Ltd.
System. Sustainability, 15(3): 2168. [20] Khan, M.Y., Qayoom, A., Nizami, M.S., Siddiqui, M.S.,
https://doi.org/10.3390/su15032168 Wasi, S., Raazi, S.M.K.U.R. (2021). Automated
[8] Saluja, S., Prochnow, C., Couper, G., Zivko, F., Yu, X., Prediction of Good Dictionary EXamples (GDEX): A
Gromov, M., Saniie, J. (2024). Smart multi-building comprehensive experiment with distant supervision,
energy monitoring system. In2024 IEEE International machine learning, and word embedding-based deep
Conference on Electro Information Technology (eIT), learning techniques. Complexity, 2021(1): 2553199.
Eau Claire, WI, USA, pp. 342-347. https://doi.org/10.1155/2021/2553199
https://doi.org/10.1109/eIT60633.2024.10609877 [21] Mahdavi, A., Berger, C., Tahmasebi, F., Schuss, M.
[9] Sadeeq, M.A., Zeebaree, S.R. (2023). Design and (2019). Monitored data on occupants’ presence and
implementation of an energy management system based actions in an office building. Scientific Data, 6(1): 290.

346
https://doi.org/10.1038/s41597-019-0271-7 [23] Japón, B.R. (2022). Learn IoT Programming Using
[22] Ozdemir, S., Susarla, D. (2018). Feature Engineering Node-RED: Begin to Code Full Stack IoT Apps and
Made Easy: Identify unique features from your dataset in Edge Devices with Raspberry Pi, NodeJS, and Grafana.
order to build powerful machine learning systems. Packt Bpb Publications.
Publishing Ltd.

347

You might also like