Have a personal or library account? Click to login
Challenges in Predicting Smart Grid Stability Linked with Renewable Energy Resources Through Spark MLlib Learning Cover

Challenges in Predicting Smart Grid Stability Linked with Renewable Energy Resources Through Spark MLlib Learning

Open Access
|Dec 2025

Full Article

1.
Introduction

In the pursuit of achieving a sustainable and resilient energy future, the integration of renewable energy resources into smart grids has become a pivotal focus. As the global energy landscape undergoes a profound transformation, the need for accurate and efficient stability prediction tools in smart grids has never been more critical. This article presents a comprehensive numerical analysis that delves into the predictive stability of smart grids, intricately linked with the dynamics of renewable energy resources. Our approach involves harnessing the power of SparkMLlib machine learning tools to develop a sophisticated predictive model, enabling a deeper understanding of the complex interplay between renewable energy integration and smart grid stability.

The escalating adoption of renewable energy sources, such as solar and wind, introduces unique challenges and opportunities for power system operators. Unlike conventional power sources, the intermittent and variable nature of renewable energy necessitates advanced predictive analytics to ensure grid stability. Smart grids, equipped with modern communication and control technologies, offer a promising framework for addressing these challenges. The integration of machine learning techniques, particularly those offered by SparkMLlib, holds immense potential to enhance the predictive capabilities required for maintaining the stability and reliability of smart grids amidst the growing share of renewable energy in the energy mix. This research is motivated by the imperative to bridge the gap between the dynamic nature of renewable energy generation and the stability requirements of smart grids. A robust predictive model can empower grid operators with timely insights, enabling them to proactively manage and mitigate potential stability issues. By leveraging the capabilities of SparkMLlib, which provides scalable and distributed machine learning algorithms, we aim to contribute to the development of advanced tools that can adapt to the evolving nature of smart grids in the era of renewable energy dominance.

The primary objectives of this article are:

  • -

    Investigate the impact of renewable energy resource integration on the stability of smart grids.

  • -

    Develop a predictive model using SparkMLlib to forecast smart grid stability under varying conditions of renewable energy generation.

  • -

    Evaluate the effectiveness of the proposed model through rigorous numerical analysis and simulations [1].

The advent of the Internet of Things (IoT) and big data has brought about a significant transformation in the field of smart buildings. Smart buildings are designed to be more energy-efficient, sustainable, and responsive to the needs of their occupants [25]. By integrating IoT technologies and harnessing big data [6], these buildings can optimize energy consumption, improve occupant comfort, and enhance overall operational efficiency [7,8]. One key aspect of smart buildings is the collection and analysis of vast amounts of data generated by various sensors and devices installed within the infrastructure. These sensors continuously monitor different parameters, such as temperature, humidity, occupancy, lighting, and energy usage, among other aspects [913]. The data collected is then processed and analyzed using sophisticated algorithms and artificial intelligence techniques to gain valuable insights into building performance and occupant behavior [14].

Energy consumption is a major concern in modern society, and smart buildings aim to tackle this challenge by employing IoT-based sensor networks for real-time data collection. The data collected from these sensors allows building managers to optimize heating, ventilation, and air conditioning (HVAC) systems, lighting, and other energy-consuming components, leading to reduced energy wastage and cost savings [1517]. Moreover, the integration of smart building technologies enables better prediction and control of energy demand, which is particularly crucial in today’s energy-constrained world. Advanced energy storage solutions, such as smart phase change material (PCM) walls, can help store excess energy and release it during peak demand periods, making buildings more energy independent and resilient [18]. Additionally [1519], smart buildings promote occupant well-being by monitoring indoor environmental quality (IEQ) factors, such as air quality, temperature, and humidity. IoT-based air quality sensors can detect common insulation problems and ensure healthy indoor environments by timely detection and address of issues related to ventilation and air circulation. The combination of IoT and big data technologies has opened up new possibilities for enhancing energy consumption in smart buildings. Through the integration of intelligent systems, data-driven decisionmaking, and optimized resource utilization, smart buildings are revolutionizing the way we construct, manage, and inhabit our built environments, leading us towards a more sustainable and energy-efficient future.

The increasing interest in intelligent buildings and the emergence of new technologies in this area has resulted in a number of studies that aimed at implementing different types of applications. These include energy optimization, simplifying building management, improving resident comfort, reactive alarm management, personal protection, asset protection, intrusion management, and more. Recent research has suggested describing buildings with consistent metadata modeling. These practices are based on sensory ontologies, subsystems and relationships, ensuring interoperability and portability of applications. At present, we cannot talk about smart buildings without mentioning two inseparable components, namely the Internet of Things (IoT), which is made of all the connected sensors and the storage environment for the data generated by these sensors. It has become the key technological element in smart buildings. Any modern construction designed to be smart needs to incorporate connected objects. In addition, it is impossible to make such buildings smart and dynamic without analyzing the data generated by this mass of connected objects. One of the most recent advances in this field is the intelligent building, which is a highly energy efficient architecture capable of controlling the

storage, distribution, and supply of energy. It aims to achieve a rational consumption by using the technologies of connected objects (IoT) and mass data processing. This notion calls for a concept called “smart grids”, currently used in electricity distribution networks, to manage energy in the best possible way. This involves taking into account all the actions of stakeholders (consumers, users, and producers) in order to modify the production and distribution of energy according to fluctuations in demand, particularly consumption peaks. This method reduces waste and improves energy supply. The inhabitants of a building can be assured of a balanced production and distribution of energy by applying this idea to that specific structure. The main purpose of this work is to examine existing documentation on smart buildings, focusing on IoT and Big Data, which are the two major technology components in our context. This paper is structured as follows:

It introduces the concept of intelligent buildings and related technologies. Then it focuses on the field of the Internet of Things, its architecture and its applications. This section is followed by an operations test and examines analytical approaches applied based on a big data ecosystem. A conclusion for this paper is a final step. The paper is organized as follows: the introduction; the related work in section 2; section 3 provides an overview of smart grids; section 4 discusses big data predictive analytics for smart grid stability; the results and discussion in section 5, finally section 6 for conclusion and perspective.

2.
Related Work

This section concerns the analysis of buildings to understand energy use. The initial solutions were mainly aimed at using nondeterministic models based on simulations. A variety of simulation tools are available with different capacities. Park et al. estimated that research into the application of big data to smart city construction involves building a technical framework for the development of smart cities from the point of view of exploring, managing, analyzing, and applying data paths. Talaris et al. have analyzed these and found that, while search angles are varied, these searches are based on web API information integration. Metadata, semantic aggregation, and knowledge graphics technology remain at the conceptual level, and how to make good use of big data technology needs further clarification. Simon et al. discuss that if a larger system is required to extract data from the energy efficiency management platform at a later stage, this is often not feasible. Even where possible, it is necessary to customize the development of interfaces and corresponding transmission protocols, which is lengthy and expensive. At present, the development and construction of smart buildings at home and abroad are in the development and exploration stage. Jiang et al. believe that the energy efficiency of buildings depends on the use of intelligent technologies for measuring the energy consumption of buildings and analyzing the energy efficiency of equipment, adoption of systems integration methods in order to build platforms for measuring and managing energy consumption, and through global management of the energy efficiency of buildings in the supply of hot water, lighting, appliances, and other aspects in order to obtain better energy saving effects. In Chrysi et al. (2020), Energy Efficiency in Smart Buildings, opportunities in the power sector of smart cities present practical approaches to enhance energy efficiency and environmental sustainability through the adoption of smart building technologies and IoT-based energy management strategies. This is achieved by a non-linear model linking power demand to the required temperature profile. A genetic algorithm based on such a model is then used to optimize energy allocation, to match the user thermal constraints, and therefore to allow the mixed-integer deterministic optimization algorithm to determine the remaining energy management actions. Consequently, a more integral vision is needed to provide accurate models of energy used in buildings [21].

3.
Theoretical Study
3.1.
Smart Grids

A “smart grid” refers to an electrical energy distribution system that autonomously adjusts to production and demand. To achieve optimal safety and energy efficiency, the smart grid integrates and modifies production and consumption models. This is facilitated by a network of sensors, real-time data transmission, analysis tools, big data, and other advanced techniques.

3.2.
Characteristics of Smart Grids

The smart grid emerges as a proposed solution to address a myriad of challenges plaguing traditional electricity grids, including low reliability, frequent outages, high greenhouse gas emissions, economic inefficiencies, safety concerns, and energy security issues [34]. Defined as a communication network overlaid onto the electricity grid, the smart grid aims to collect and analyze data from diverse power grid components, enabling the prediction of power supply and demand for effective power management [8].

For a comprehensive understanding of the characteristics and advantages of the smart grid, a thorough comparison with conventional power grids, and an exploration of the general requirements for communication networks within a smart grid, extensive insights can be found in existing literature [7]. The National Institute of Standards and Technology has proposed a model that identifies seven domains within the smart grid, each with defined roles facilitating information exchange and decision-making [7].

Key functionalities essential for the implementation of the smart grid include:

  • -

    Communication Networks: Involving public, private, wired, and wireless communication networks, serving as the infrastructure for smart grid communication [36].

  • -

    Cybersecurity: Addressing measures to ensure the availability, integrity, and confidentiality of communication and control systems essential for managing, operating, and safeguarding smart grid infrastructures [37].

  • -

    Distributed Energy Resources: Encompassing various forms of generation, including renewable energies, and storage systems integrated into distributed systems [38].

  • -

    Distribution Grid Management: Striving to optimize the performance of distribution system components, enhance efficiency, and integrate them with transmission systems for increased reliability and improved management of distributed renewable energy sources [39].

  • -

    Electric Transportation: Integrating plug-in electric vehicles on a large scale [27].

  • -

    Energy Efficiency: Providing mechanisms for customers to adjust their energy usage during peak hours and optimizing the balance between power supply and demand [28].

  • -

    Energy Storage: Utilizing direct or indirect energy storage technologies such as pumped hydroelectric storage [29]. Other critical components of the smart grid include:

  • -

    Wide-Area Monitoring: Monitoring power system components over a large geographic area to optimize performance and prevent issues proactively [30].

  • -

    Advanced Metering Infrastructure (AMI): Serving as a bidirectional communication network between smart meters and the utility system for collecting, sending, and analyzing consumer energy consumption data [31].

AMI, an enhanced version of automatic meter reading, plays a crucial role in self-healing, adaptive power pricing, demand-side management, energy efficiency improvement, reliability enhancement, interoperability, power quality monitoring, outage management, and communication between the central system and smart meters [32]. The AMI components include a central system, two-way communication networks, data concentrators, and smart meters. These elements enable functions such as direct load control, where smart meters provide power consumption overviews and schedule times for device operation to shift the load within the smart grid. The interconnectivity of distributed energy resources, electric vehicles, gateways, home energy displays, smart devices, smart meters, and tools for power consumption control is facilitated through a home area network using technologies like Bluetooth, IEEE 802.11b, IEEE 802.11s, IEEE 802.3az-2010, power line communication, and ZigBee [33]. Smart meters send data to data concentrators through a neighborhood area network (NAN). NANs, resembling the coverage of a field area network (FAN), utilize various communication networks and technologies such as family standards of IEEE 802.11, wireless cellular networks (e.g., LTE, WiMAX), and optical networks [34]. Data concentrators play a crucial role in aggregating and compressing data from smart meters in uplink connections and relaying data to smart meters in downlink connections. While enhancing scalability and reliability, data concentrators reduce power consumption of smart meters but introduce a slight delay in transmitting data [35]. Some data concentrators connect to the central system through a wide area network (WAN) using long-range, high-bandwidth communication technologies like fiber optic and wireless cellular networks (e.g., WiMAX, LTE, and LTE advanced) [36]. The central system, connected via a local area network, collects and analyzes data from smart meters, incorporating components such as a meter data management system, geographic information system, outage management system, consumer information system, power quality management, and load forecasting systems [36]. For instance, a meter data management system receives smart meters’ data, stores it in databases, and processes it [33].

3.3.
Internet of Things (IoT)

The “Internet of Things” (IoT) refers to a distributed network connecting physical objects capable of communicating with each other, other devices, or computers. These objects can detect or act upon their environment. The data transmitted by these devices can be collected and analyzed to reveal insights and suggest actions that save money, increase productivity, or improve the quality of goods and services.

3.4.
Connected Objects

In the context of the Internet of Things, a “connected object” denotes any electronic device capable of communication and information exchange via a PC, portable computer, tablet, or any device equipped with wireless or Bluetooth connectivity.

3.5.
Characteristics of Connected Objects

Connected objects possess the following distinctive attributes:

  • -

    Identification: Each object has a unique identification code, such as a barcode, IP address, or RFID tag.

  • -

    Environmental Awareness: These objects are equipped with detection, analysis, treatment, and alerting capabilities, making them sensitive to their surroundings. They can measure parameters like temperature, humidity, gas levels, and energy consumption.

  • -

    Interactivity: The connection between an object and the network can be permanent or temporary, depending on the object’s specific needs and function.

  • -

    Virtual Representation: Each connected object has a unique signature and physical manifestation, represented virtually in the IoT system.

3.6.
The Constituent Parts of IoT

Five essential components constitute the IoT system:

  • -

    Sensor: Measures external parameters in the environment.

  • -

    Embedded Software: Allows the connected object to store, retrieve, process, and evaluate data before transmission.

  • -

    Transmission Chip: Facilitates data transmission after processing.

  • -

    Customer Interface: Renders transmitted information understandable and useful to the user.

  • -

    Battery: Provides power to the connected objects, enabling their functionality.

4.
Home Automation and its Objectives
4.1.
Home Automation

The term “demotics” derives from the contraction of the words “house” and “automatic”, and refers to the technological field that deals with the automation of the house. It is the setting up of networks linking the different equipment in the house (such as the hifi system, the home automation, the kitchen and bathroom appliances).

It includes a wide range of services allowing the integration of contemporary technologies in the home.

As a result, we may distinguish between two areas of application home automation:

  • -

    The management of energy flow (water, gas, and electricity), which includes the control of heating, lighting, ventilation, and household appliances.

  • -

    The control of information flow coming from the computer, radio, and phone.

4.2.
Objectives of Home Automation

Home automation contributes significantly to the realization of a perfect life to the human being, with four main objectives (comfort, security, energy saving and health).

Comfort

  • -

    Open doors and windows without force using the cell phone.

  • -

    Turn on and off the light remotely.

  • -

    Air conditioning of the house (hot in winter and cold in summer).

  • -

    The refrigerator declares its need for food through a message on mobile.

  • -

    Create life scenarios and automate your home.

The security

  • -

    Protect the house against theft.

  • -

    Avoid accidents of burnt gas, fire and electrocution.

  • -

    Centralize the house (all doors and windows close).

  • -

    Monitor the house remotely through cameras and alarms.

  • -

    The fixed telephone automatically call the fire department in case of emergency.

Energy saving

  • -

    Control the lighting of the house.

  • -

    Set the machines for a certain period of time, like washing machines.

  • -

    Turn off energy consuming objects if you are not going to use them, for example if you are sleeping and leave the TV on.

  • -

    Control the thermal exchanges with the outside.

Optimization of domestic hot water production

Health

  • -

    Home automation helps the elderly and disabled to handle things in the houses.

  • -

    Sensors and measurements of the health of patients such as blood pressure, body temperature and blood sugar levels.

  • -

    Make medical visits remotely through special equipment placed in the home.

Fig.1. Representing the connected objects used in the simulation
Figure 1.

Architecture IoT connected objects [37].

  • 1)

    Internet of Things (IoT) can be characterized as the interconnection of individuals and objects regardless of time, location, and the means employed, involving anything and anyone. This broad definition encompasses aspects such as convergence, content, repositories (collections), computing, communication, and connectivity. In this context, a seamless interconnection is established between people or humans and things, and/or among different things

  • 2)

    Programmable objects and test objects: for the test we will use objects like fire, and for the movement, we use the movement of the mouse, as well as using programmable cards like the MCU.

  • 3)

    The intermediate equipment: The router, the switch,

Home Getway, the modem, the cloud, the servers to control our system and an antenna for the cellular network are some of the intermediate devices we used.

4.3.
Configuration Outside the Building
  • 1)

    Router configuration: The two IoT and DNS servers, as well as the Cloud, the central office server and the Switch, are all connected to the router through its three Gigabit Ethernet ports. We will configure it on the CLI.

  • 2)

    Configuration of the servers: We have two servers to configure IOT server and DNS server, for both we will specify an IP address plus the address of Getway and DNS.

  • 3)

    The 3G/4G cellular network: We have chosen a cellular network (3G/4G), which allows us to connect to the server via a smartphone at great distances, in order to have the possibility to remotely control all the equipment connected to the IoT server.

4.4.
Configuration Inside the House
  • 1)

    Home Getway: its role is to link all connected objects either wired or wireless and give them IP addresses. We have secured the system against hackers by WPA2-PSK authentication with a password. This type is the most effective and takes a long time for the hacker to access the network.

  • 2)

    The connected objects: We have connected the objects with the Home Getway in a wireless way where we have made a modification in the network card (change to WiFi type) and require users to click on the Smart Device button so that they have the possibility of accessing the network. The programming will use the microcontroller “Boards MCU”. This equipment is programmable to control and command a task in the desired way. We have chosen the Script language described in Fig.2.

Figure 2.

Programming the MCU Board.

The creation of the conditions requires that the objects work at the same time or one according to the other: there will be a master object and slave objects. When the master object turns on, the slave objects also turn on and the same goes for turning off.

Intelligent building planning (Fig.3) simulates just one apartment in the building. Its prototype is composed of a bedroom, a living room, a kitchen, a bathroom, and a corridor.

Figure 3.

Intelligent building planning.

We have placed our objects in the apartment in a homogeneous way in order to cover all the apartment, We have placed the Home Getway so that it is convergent to all the objects and so that there will not be cuts of connection or a weakening of flow when we control some tasks, namely:

  • -

    the security system:

    by using the surveillance camera equipped with a motion detector and a siren. Thus, when the detector detects a movement, the webcam records everything that happens and the alarm sounds.

  • -

    Fire detection system:

    We also tested the fire detection system, and found that as soon as a fire is detected, the doors open, the alarm goes off, giving people time to escape the building.

  • -

    Building temperature control system:

    In this system, we placed a thermostat that measures the temperature of the building after it turns on the air conditioner or the furnace according to the measured temperature.

  • -

    Control of doors and windows:

    One of the functions of an intelligent building is the remote control of doors and windows. As these are connected to the home network, we can open and close them using our smartphones.

  • -

    Lighting control:

    We can also control the light in the smart building either automatically with the motion sensors or with the smartphone using the IoT monitor application. As shown in Fig. 4, we can access the network and the IoT server through our smartphone, PC, and tablet.

Figure 4.

Server interface to control the objects.

5.
Energy Efficiency in the Field of Intelligent Buildings

When the building"s equipment is intelligently and effectively interconnected, we can easily manage and control the energy consumption through a remote control that enables the piloting of these connected devices through a cell phone. By doing so, we can instantly detect any unusual value that will be higher than the average consumption by energy class and identify more quickly the errors, flaws, and irregularities in the functioning.

When we talk about the reduction of energy consumption, we are necessarily talking about buildings, since they offer a high potential for energy savings and represent more than 40% of the total energy consumption.

Daily life requires a lot of energy (see Fig.5): cooling in summer, lighting at night, hot water and many other activities. Our energy supply relies largely on fossil fuels, the combustion of which generates CO2 emissions.

Figure 5.

World energy consumption.

Buildings are responsible for the largest share of CO2 emissions in developed cities.

Buildings can be classified according to energy classes ranging from class A – from 0 to 50 kWh/m2 per year (most efficient housing) – to class G of 451 kWh/m2and more (very energy intensive). We consider a low energy building (BBC) when the conventional consumption of primary energy of the building for heating, cooling, ventilation, hot water production and lighting is less than or equal to 50% of the conventional consumption reference (50 kWh/m2/year). Consumption is expressed in kWh of energy and brought back to the square meter of surface.

The main objective is to reduce the needs – “passive” energy efficiency – and to supervise and manage the technical equipment of the building - “active” energy efficiency.

This gives energy gains by acting on different human and material parameters. Among best practices is the use of efficient products, to reduce energy consumption. It is essential to choose equipment with the best possible energy efficiency, that is to say the best ratio between energy consumed and the service provided.

On the other hand, the integration of renewable energies, the use of these energies in an approach of energy improvement, allows one to obtain a part of the energy necessary to the building (electricity, heating, sanitary hot water) in a renewable way and thus to decrease or even eliminate the external energy contribution. Thus metering/measurement of consumption is needed: the energy management of a building consists first of all in counting/measuring the consumption.

For electrical and gas, a classic installation includes a general meter which provides the global consumption for their invoicing by the energy distributor. An optimized installation includes, in addition to the general meter, permanent sub-meters. Their main role is to establish the distribution of energy consumption by item (heating, domestic hot water, ventilation, etc.).

The counting or measurement of consumption allows the realization of the energy balance, the awareness by the user or manager of consumption, and is used for the estimation of the energy saving potential. It also guarantees a follow-up in time of the energy performance.

  • -

    multiply the power of your appliances (in KW) by the time of use (in hours);

  • -

    then multiply it by the price per kilowatt-hour. The result will allow you to know which appliances consume excessive amounts of energy.

6.
Relationship of Big Data with Intelligent Buildings

Faced with the evolution of science, technologies are evolving at the same time, among them the IoT, or Internet of Things. It connects objects to the Internet, and this generates the flow of data that has been generated through the objects. These innovations can then be linked to Big Data.

The IoT and Big Data coexist, to allow for significant technological advances, as the volume of data exchanged increases as the number of objects connected to the Internet multiplies.

The data collected by the connected devices can be used in real time operations, such as monitoring energy consumption, and can enable reactions according to the situation: change or repair or other proposals.

The system can incorporate functions to control the energy consumed by the devices according to the wishes of the user. The application is therefore notified if electricity consumption, for instance, exceeds a threshold value set by the user.

Smart IoT devices can collect energy usage data from each unit and store it in a database that can be analyzed and reported on for energy conservation and analysis.

Buildings cannot be made intelligent or dynamic without first examining the data produced by this vast network of interconnected things. Setting up a proper ecosystem to store, clean, and prepare the data is the first step in the analysis process. But for smart buildings, storing and retrieving vast amounts of data in real time is a difficult operation.

In general, there are three tiers that make up an intelligent system in an intelligent building: At the input data infrastructure level, all the data sources produced by the linked building objects are represented, including energy usage, humidity levels, indoor and outdoor temperatures, etc. The system infrastructure level, which enables the gathering, processing, combining, and storage of data in a NoSQL database, serves as the brain of the intelligent system. As a result, it permits the use of this data for reporting purposes only, or for knowledge extraction by data mining algorithms or machine learning by artificial intelligence algorithms. The system’s catalog of services that are available to building managers, inhabitants, energy suppliers, etc. is represented by the service level.

Three layers make up the IoT architecture:

  • -

    The layer of perception is in charge of sensing and data gathering.

  • -

    Data transit is handled by the network layer, which also enables the fusion of different devices and communication infrastructure.

  • -

    The top layer where users interact is known as the application layer.

Several applications, including the following, will result from the use of IoT in smart buildings: Access to building facilities that is flexible and real-time. Energy management which is the macro view of energy usage in relation to building energy efficiency. Location of resources and occupants, increasing indoor comfort.

Fig.6 represents the choice of big data technology. An enormous amount of data is generated every second in this context of intelligent buildings, and it approaches critical levels. For processing massive amounts of data, numerous solutions have been put forth. Although Spark and Hadoop, the two most popular products on the market, are both large-scale data frameworks, their applications are somewhat different. If the operating and reporting requirements are largely static and we can wait for the batch processing to finish, the MapReduce method of operation might be enough. On the other hand, we will probably need to use Spark if we need to analyze streaming data, such as analyzing sensor data in a smart building, or if the applications call for a series of actions.

Figure 6.

General architecture of smart buildings.

Spark is the ideal solution in this situation. The process of examining various forms of data to draw patterns and information using various data mining techniques is known as knowledge extraction from data. The analysis of this massive amount of data contributes to the realization of the worldwide goal of smart buildings, which is to simplify building management, cut energy use, secure resources and people, and provide a more convenient living environment.

7.
Application and Evaluation

In order to examine energy consumption, we utilized a dataset named “HomeC” which comprises various objects and rooms that have been modeled after real-life counterparts.

In Fig.7, we discover the energy consumption of each individual room and object. We observed that some rooms had higher consumption levels than others. Our goal was to reduce this consumption. To achieve this, we analyzed the objects present in these rooms to identify potential candidates for removal or replacement.

Figure 7.

Overall energy consumption per month.

7.1.
Dataset Description

Our dataset is thus in the form of a CSV file, including weather data as well as household appliance measurements from a smart meter for 365 days in a period of 1 minute. The types of variable are important for data visualization:

Use [kW]: Total energy used,

Gen [kW]: Total energy produced using solar or other energy sources,

House overall [kW]: Represents the overall energy consumption of the building.

Data Exploration

After reading the data from Spark, we will perform data preprocessing. This involves renaming the columns to remove spaces and the unit [kW], deleting the values, grouping some columns (such as the consumption of the kitchens we have in the building), and changing the format of the time in seconds to Y-m-d H-M-S. Thus, the information will be available from 2021-01-01 5:00:00 to 2021-12-17 03:29:00. Then we will reorganize the columns. The data in Fig. 8 represent information and will appear like this :

Figure 8.

Information about the data.

We can differentiate between energy data and weather data.

To determine the month in which we will consume the most energy, we can see the total energy consumption for all the months.

A furnace consumes electricity to power the fan that circulates heated air throughout a building, as well as to ignite the gas or oil used to generate heat. Fig. 9 represents consumption for devices. Electricity consumed by a furnace depends on several factors, including the size of the unit, the efficiency rating, and the length of time it is in use. In our data, the furnace consumes more than 63% of electrical energy.

Figure 9.

Consumption for devices.

We utilized the K-means technique, which divides the data into a predetermined number of clusters, to identify the classes. As a result, there are two classes of room energy:

' Home office,” “Wine cellar,” “Kitchen,” “Barn,” and “Living room.” There is also a class of devices energy that comprises “Dishwasher,” “Furnace,” “Fridge,” “Garage Door,” “Well,” and “Microwave.”

Let’s assume the class of rooms in order to better understand how we can manage the energy consumption of the connected machines in the intelligent building. We will monitor the consumption of each member of the class so that, if one of them exceeds the average of 0.22054800000000002 kW, we must decide to remove it. This is made possible by

communication between devices. Here we have analyzed the case of one day only, but we can generalize it later for all the days.

Fig.10 shows that the kitchen uses a significant amount more energy than the average.

Figure 10.

Home activity in day 2021-10-4.

8.
Conclusion

In conclusion, this paper provided an overview of the Internet of Things (IoT) as a network of networks, delving into its historical evolution and exploring three key visions and associated developments. The focus then shifted to the smart grid, a pivotal application of IoT. The discussion encompassed the architecture and components of a smart grid, followed by an exploration of IoT architectures tailored for smart grids. Additionally, the paper scrutinized the prerequisites for integrating IoT in smart grids, delving into applications and services within this context. Finally, challenges were identified, and potential avenues for future research were outlined in the realm of IoT applications in smart grids.

DOI: https://doi.org/10.14313/jamris-2025-036 | Journal eISSN: 2080-2145 | Journal ISSN: 1897-8649
Language: English
Page range: 70 - 81
Submitted on: Apr 28, 2023
|
Accepted on: Sep 4, 2024
|
Published on: Dec 24, 2025
In partnership with: Paradigm Publishing Services
Publication frequency: 4 issues per year

© 2025 Amal Zouhri, Ismail Boumhidi, Ismail Boumhidi, Abderahamane Ez-Zahout, Said Chakouk, Mostafa El Mallahi, published by Łukasiewicz Research Network – Industrial Research Institute for Automation and Measurements PIAP
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.