Smart Home Energy Management System

Home energy management system has been selected as an attractive research issue due to its ability to enhance energy security by including devices, entertainment systems, security systems, environmental controls, etc. Home automation is incorporated as a potential technology to ensure efficient electricity performance without interruption, solve power demand problems and coordinate devices with innovative technologies. In this context, our proposal seeks to implement an accurate home energy management system. The proposed approach aims to improve uninterrupted electricity production and provide comfortable services to families. To implement correct system operations and meet each device's power demand, a Reel Time Energy Management System (RT-EMS) will be implemented and discussed through some required tasks using the Multi-Agent System (MAS). Each agent will be determined according to some criteria to implement the appropriate design and meet each device's power demand. The obtained results will show that the proposed system meets the general objectives of RT-EMS. Keywords—Home energy management; multi-agent system; real-time system; energy recovery


I. INTRODUCTION
Home Energy Management System has been selected as a potential technology for connecting devices, sensors, etc., using communication technologies and platforms. Innovative home technologies are gradually integrated into our daily activities and our physical and emotional relationships with our communities [1] - [2]. This means that we are starting to create a separate structure with transparent social interaction. This concept is similar to that predicted by Mark Weiser in 1991 [3]. The authors suggest in [4] that the idea of home automation is designed to interfere with specific components, especially labels, air conditioning, light switches, default rates and many consumer activities. Simultaneously, the authors stated in [5] that this trend could be primarily justified by the lower cost and financial advantages of industrial manufacturing and technologies in academic research. In this context, the economic impact of improving knowledge will also have the potential to generate $ 5-7 trillion in the economy during 2025. The authors mentioned in [6] that in the past, the smart home was limited to strategic sectors (engineering, infrastructure and satellites) but that it is now actively interested in domestic activities, for example, network control systems, intelligent park systems and smartphone applications.
In [7], innovative technologies are designed and incorporated to ensure comfort, enhance excellence and improve safety and health. To achieve this goal, the automation house has developed a detection and management system capable of using the integrated data of various detectors and hierarchical sensors. While the authors have shown in [8] - [9] that the home automation environment will create a considerable amount of data, it helps to build new approaches and branches of research such as the Internet of Things (IoT), Big Data, artificial intelligence etc. In [10], the smart home's conception has changed due to different contexts (domestic platforms, innovative technologies, IoT, etc.). Besides, smart home technologies are aimed at identifying, monitoring and coordinating devices. The authors have shown in [11] that the intelligent home is chosen as an environment in which consumers are integrated into all these modern innovations, which are also appreciated. Software-defined network (SDN) has been seen as a good research question and has been explicitly used to replace older innovative home instruments [12]. The authors mention in [13] - [14] that SDN seems to offer new ways of proposing cross-platform concepts. The control and application of machine learning technology quickly update SDN capabilities. The authors reported in [15] - [16] that data from the QianJia.com survey show that smart homes' future growth in China is about 20%, to 357.6 billion yuan, from 2012 to 2020. Improving the age of smart homes will dramatically improve people's daily lifestyles. The authors report in [17] that at CES, the smart home continued to evolve aggressively two years later. Many new elements, including the Parrot flowerpot and the robot Soma bar, have attracted attention.
In [18], the smart home consists of an infrastructure that provides precise communication between devices and equipment using a combination of wired and wireless technologies. This combination allows for seamless integration that facilitates access to home systems and provides a personalized home environment. In [19], several methods were selected and implemented to coordinate, collect and process data between the two devices. The authors suggest in [20] that machine learning was chosen as an exciting research question because of their opportunities and their efficiency in processing the data collected between devices. Computing and data challenges in innovative home systems focus on effective ways to manage data sharing between devices [21]. In [22], several approaches including advanced measurement infrastructure (AMI), intelligent sensor technology, home energy storage system (HESS), intelligent home systems and local area network (HAN).
Home Energy Management (HEM) was seen as a potential solution due to its ability to manage appliances and control energy demand in a smart home. HEM refers to using energy management systems to monitor and collect data that includes generation, distribution, and transmission of electricity [23]. HEM is a monitoring and data collection application for energy management systems, covering power grid production and delivery, i.e. the idea of an intelligent grid. This definition has been widely supported to suggest a way forward for electricity supply [24]. In [25], HEM is the key to successful, intelligent grid management on the demand side for home system users. HEM works with real-time monitoring and regulation of various home appliances according to user needs through smart assistive devices controlled by human interfaces in intelligent homes to reduce electricity prices and improve energy efficiency. The authors have mentioned in [26] that due to growing concerns about the sustainability of renewable energies and environmental emissions, HEM was created to manage renewable energies locally (wind turbines, solar panels, etc.). The authors stated in [27] that according to the rapid developments in the field of advanced innovations in electricity and sustainable energy, these intelligent systems could be introduced in HEM. SHEM was faced with a crucial concern in a decentralized generation, demand reduction and peak periods to provide consumers or service providers with adequate solutions [28].
The smart home is a growing emerging technology continuously now. It incorporates many new technologies to improve the quality of human life. Indeed, Home automation devices often do not handle issues independently, as most are single-use tools. However, it is different when it comes to a home automation system connecting various devices and applications to all data. For this reason, households are also looking for forms and methods to change their lifestyle by taking advantage of newly accessible IoT technologies. Energy demand and measurement are considered the primary goal of householders. For this reason, this paper extends the ideas of previous studies by using: (+) As we are convinced, an intelligent HEM is confident that the used energy management systems are still incapable of controlling and coordinating properly among sources.
(+) we tend to monitor and request power for each device, which will help us in the future to keep costs and electricity consumption under control and extend the life of appliances. We intend to make intelligent devices capable, through some agents of the predictive control system, to forecast, control and measure voltage, which can regulate power consumption. A HEM system will be implemented and discussed through many required tasks using MAS to implement correct system operations and meet each device's power demand.
(+) we introduce the Smart Home Device Scheduling (SHDS) issue that formalizes the MAS scheduling problem.
The remaining part of the paper is organized as follows: Section I introduces Introduction and related works. Section II provides a brief description of the whole system. Section III discusses in details the Hierarchical Home Energy management. Section IV discusses the obtained results "Finding and results". We conclude our work in Section V.

II. DESCRIPTION OF THE WHOLE PROPOSED SCHEME
This sub-section describes the overall Home energy management system using MAS given by Fig. 1(a); the presented hierarchical scheme explains the relationship between appliances and Smart home blocks based on MAS. So, the proposed Smart Home agents tend to produce an enormous amount of data that can be calculated in the local server, limiting access to service requirements. Additionally, each agent will transfer data collected from a neighbor agent using intelligent devices, IoT applications, and wireless to perform tasks (see Fig. 1(b)). As we can see, the proposed scheme is composed of three main blocks, which are: The Supervising agent is used to administer a new system control measure based on the updated BLOCK C data, ensuring: • All (BLOCK A and BLOCK C) should be synchronized in decisions allowing each agent to minimize slow reaction response and increase performance speed during data processing.
• Send new control measures to alert agent devices to prestop those with a high peak using a fixed system parameter threshold, thereby minimizing power consumption levels.
Request: Send current energy consumption to Recovery Agent in real-time. The monitoring agent should verify and confirm the following tasks: • Data is already broadcast in real-time per hour.
• The broadcast data is then compared appropriately controlled with the user's need to recover the energy demand.
• All decision functions of each agent are synchronized at the regional level.
• Any data change will be tracked after being compared and permitted by the alert outside the threshold.
• Rotate a new loop request for fresh input Action: Send the updated household appliance consumption data to the supervisor agent to confirm the following tasks: • According to its highest consumption level, data is collected in an orderly fashion, the lowest level in a recovery agent.
• Recovery agent compares data high/low peaks are measured between current and past.
• Check for simultaneous changes to update the system panel, informing the supervisor agent of the decisions to be involved in the coming hours.
• The changes determine the user's pre-request for the following hours, which devices should be chosen to minimize his operation during the daily routine. To execute the proposed model in real-time, quick prototyping is used, providing that the quick concept checks with the versatility to produce acceptable outcomes is done with the right environment. Since the design will be evaluated on Python / Thread Simulator AOP ( Fig. 2(a)), which has an interacting Toolbox dealing with real-time control diagrams, the algorithms established can quickly be loaded into a microcontroller STM32 Discovery F4. Thus, the coordination between the STM32F4 board and device can be carried out quickly without any problems with a Processor-in-the-Loop (PIL) simulation check. In reality, the design can be run in the discovery board of STM32F4 while holding a PIL block. The method can also be used in the STM32F4 discovery board via the development of the PIL block while keeping the simulation on the device connected to the on-board board via ST-LINK (see Fig. 2(b)). PIL verification allows loading and executing a hexadecimal output file launched on the goal microcontroller with understandable map generation from the software. Modelling system constraints is vital in achieving overall action arrangements, including interconnections and interaction with other agents and systems to automate and plan challenges (see Fig. 3). Our work evaluates four different types of residential loads, storage loads and moving non-moving and thermal loads. To exploit their complex behaviors for intelligent home automation, we consider several electrical devices representing each charged class (see Table I). Two periods (T H , T L ) are considered to assess and control energy demand. Thus, these periods denote high and low peak hours.
T H : High Peak hours and Shoulder Peak hours T L : Low Peak hours and Off-Peak hours

A. Device Schedule
We need to define the behavior of smart devices operating in Smart Home (SH) over the time horizon to monitor the energy needs [29]. The scheduling time horizon for household appliances is generally fragmented into an amount of times slots that are expressed by: The consumed power by equipment during time slots is shown as follows:

III. HOME ENERGY MANAGEMENT
Home Energy Management's main objective is to provide a smooth, continuous electrification operation in housing developments, with a demand rationalization that facilitates the reductions in energy product prices. Thus, a practical and intelligent supervisory approach may be used to preserve, on the one side, an equilibrium between demand and output and, therefore, regulating the allocation of household electricity to change the system stability. Furthermore, activating/deactivating household appliances, the data on each household appliance's power usage, the overall consumption, and the house's self-generated electricity through the provided power, carry out the monitoring. These intelligent devices can remotely process and evaluate all home appliances. Thus, using an appropriate communication protocol between smart devices becomes a necessity that must be partnered with the Energy Management Unit to achieve steady and optimal performance. More broadly, in automated systems management, multi-agent technology has proven its efficiency and sustainability. In this vein, the multi-agent system is based on the concept of agent interaction that can be integrated into hardware or software hardware. Thus, this proposal aims to develop an energy management unit based on hierarchical agents created to control the distribution of flows to provide a comfortable and intelligent electrification service for the household. The proposed design methodology is defined through a state machine model that offers the opportunity to describe the system events encountered and the transitions from one state to another. Home Apps produces early large volumes of streaming data, the sensor is configured to extract that flow of data in hours frequently skips so it can to take benefit of this data, warn agent input the system a new data each time with the correct data intervals 24\7 (Fig. 3), and then track agent responds to changes from the real-time agent Simultaneously outputting the results throughout the pc simulations. Fig. 4 describes the status of each appliance using agent coordinators. As seen, a supervisory agent's value is found by decision-making sent to each agent after obtaining its state of knowledge. The two primary system processes, "Total Energy" and "Energy Recovery," are outlined as noted. The diagram summarizes both previously mentioned states and transformations as well as the two apparent states (ST'4"/SR"4) "relevant total energy and recovery Agent, respectively. The state of SR "4" illustrates the system's response against incapability to provide energy demand. In this situation, the system controls the operation of household appliances to align the energy dues with the output of flows taking into consideration the following activities: Task1: Set the number of home appliances on; Task2: Check the threshold by comparing the levels, response time, and recovery rate via agent recovery; Task3: Turn off household devices one by one considering operation priority until reaching the power balance between the production and demand; State machine Control: Home appliances and energy demand and consumption are cited as below: • Onset Storage Process (SS "1" ): Time Ts= "1".
• Appliances Operation Control (SR"4") : Time Ts= "4". The home appliances control system aimed to equilibrate the energy efficiency dues with the flows, considering the following everyday household priority.
• Track 1: Set the lower and highest priority energy usage during Morning/Night of home appliances; • Track 2: Check the high and regular peak updates of consumed power level thresholds from each appliance via recovery agent; • Track 3: Switch off/on household appliances one by one consider the higher operation level consumption prioritized until reaching the stable power between the production, and demand which can be recovered from the recovery agent deficiency; In the multi-agent system, the behavior is presented and discussed in Fig. 5. The Multi-Agent System presented four agents: • A Supervisor Agent, which controls and synchronizes all system agents. The Supervisor Agent is also in charge of making data requests, triggering alerts for energy consumption outside the established thresholds and training a Machine Learning model capable of predicting the system's energy consumption.
• The Tracker Agent is the type of agent that monitors and controls each device, providing consumption data to the Supervisor Agent and the Alert Agent.
• The Alert Agent is the type of agent who receives the Supervisor Agent's alert requests when the Tracker Agent has notified energy consumption outside the established thresholds.
• The Recovery Agent is the type of agent in charge of data persistence in the system. The Recovery Agent also receives data request requests from the Supervisor Agent to train the Machine Learning model of power consumption.

IV. FINDING RESULTS
To assess and demonstrate the feasibility of the developed system and the sophistication of the approach to energy management, a real-time prototype home energy design is tested, taking into account the regular use of various appliances in the Python AOP / Simulation real-time environment. The sustainable energy demand includes multiple electrical devices, the energy source, and energy recovery for the backup and storage unit. To perform the test simulation, a home energy database is used to collect the devices' actual energy profiles on four consecutive days during High Peak hours, Shoulder peak hours, and Low peak hours and off-peak hours. The calculated device profiles of different household appliances.
We have chosen the Matlab / Simulink environment to increase the feasibility of the proposed control approach, demonstrate the autonomous hybrid-electric system's capacity, and satisfy the load demand, whatever the instances. The analysis involves a variety of electric equipment, photovoltaics sources, and energy recovery and storage systems. For more than four days, the KSA forecast database offered advice on actual solar radiation and ambient temperature profiles, grouped into two successive periods: T H : High Peak hours and Shoulder peak hours T L : Low Peak hours and Off-Peak hours We have often used a realistic load profile that is the most critical aspect for designing any electric power system. In reality, the load variance typically represents the electricity usage of various appliances, taking into account different household requirements. Fig. 6 and Fig. 7 Display measured household appliance consumption profiles during T H and T L periods.
According to the obtained results, solar energy supply generates less power in T L than during T H . This belongs to the irradiation change influenced by climate change. Low power consumption was reported due to the lack of frequent electricity systems (see Fig. 8). Both phase and deficit levels are observed simultaneously during winter and summer system operations. The transition between the states monitored by the original power management defines the flow of power distribution and the behavior of the system. The above requests to multiple control situations are to determine decision (Fig. 9) appropriately. To analyze system performance, Table II 241 | P a g e www.ijacsa.thesai.org summarizes the average distributed power flow over four consecutive days. The device achieves consumption peaks, evidenced by the intense activity of household appliances, for the reported performance. The transported active flows are mainly affected by changing conditions.

V. CONCLUSION
The current research has been performed on a precise home energy management system (EMS). The proposed HEM is designed to control the power requirements between the home appliances and the power supply components meet to meet the MAS's Home load demand. The proposed system has been combined as a renewable source database and home appliances. The HEM approach, based on a multi-agent system, was implemented to control energy production and consumption. This approach aimed to improve system performance by speeding up response times and enhancing synchronization between all components during T H and T L periods.

ACKNOWLEDGMENT
The preferred spelling of the word "acknowledgment" in America is without an "e" after the "g". Avoid the stilted expression "one of us (R. B. G.) Thanks ...". Instead, try "R. B. G. thanks...". Put sponsor acknowledgments in the unnumbered footnote on the first page.