IoT Technology for Intelligent Management of Energy, Equipment and Security in Smart House

—The Internet of Things means that many of the daily devices used by humans will share their functions and information with each other or with humans by connecting to the Internet. The most important factor of the Internet of Things is the integration of several technologies and communication solutions. Identification and tracking technologies, wired and wireless sensors and active networks, protocols for increasing communication and intelligence of objects are the most important parts of the Internet of Things. In this article, an attempt has been made to determine the parts that can be used to make a house smart among the concepts and technologies related to web-based programs based on Internet of Things technology. Since it is very time-consuming to investigate the effect of all the Internet of Things technologies in smart homes, by studying and examining various types of research, the web-based program based on the Internet of Things is selected as an independent variable, and its effect on smart home management is investigated. For this purpose, a web-based program based on the Internet of Things for intelligent building energy management, intelligent equipment management, and intelligent security has been designed and implemented. As experimental results shown the proposed method the proposed method achieves better results compared to other existing methods in energy consumption by 33.8% reducing energy usage.


I. INTRODUCTION
At the end of the 20th century, with the development of smart technologies, the development of communication networks and the Internet, the development of sensor networks and sensors, extensive efforts and studies began to use these technologies in order to provide solutions to improve human life [1][2][3][4][5]. One of the important applications of these technologies was communication with objects and obtaining information through these objects. This paradigm was presented for the first time by Kelvin Ashton in 1998 in a mockery. In fact, solutions are presented that could be used to communicate with anything through the Internet at anytime and anywhere and to identify them in the network. Access to environmental information and its status provided new forms of communication between people and objects and even between the objects themselves. It led to the introduction of the Internet of Things, which, in addition to people and information, also contained objects [6,7]. The definition of objects, according to European research projects on the Internet of Things, are all active participants in business, information, and processes that can interact and communicate with each other and with the surrounding environment and exchange data and information in the environment. They deal with sensitive things, and they also have the possibility of reacting to real and physical world events. Objects have an effective role in the running processes. They also have the possibility of creating actions and services with or without direct human intervention. The Internet of Things is one of the new technologies that can be used in exploration and production processes, refineries, petrochemicals, pipelines, transportation, and distribution. This technology in the industry increases employee security, identifies health and safety issues, optimizes production, tolerates errors, and reduces operating costs. After the publication of the Internet of Things as a solution to communicate with objects and collect information from them, architectures were presented to establish and implement this solution.
IoT, which also includes machine-to-machine (M2M) communication, is a new technology that is used to connect all objects through the Internet for remote measurement and control. The Internet of Things uses several other technologies, such as wireless sensor networks, robotics, Internet technology, and smart devices. Conceptually, Internet of Things technology means a network of real-world entities, each of these entities or objects has a unique address and communicates and interacts with each other based on standard communication protocols. In fact, the Internet of Things technology makes it possible for objects around humans or objects in a building and house to exchange information with each other virtually, and by creating synergy; it causes a significant growth in optimal energy consumption and human life quality [8][9][10]. Currently, Internet of Things technologies are available, and its services and achievements can be used in various fields. Knowing the capacity and potential of the above technology is very important. While choosing the correct path to use in business and life, its opportunities and threats should be considered. Intelligence is one of the topics that has attracted the attention of many researchers in all branches of the modern science in today's world. Even today, cities can have the concept of intelligence. A smart city is where traditional networks and services are made flexible, efficient, and sustainable using information, digital, and communication technologies to improve city operations for the benefit of its residents and create a greener, safer smart city. They are more, faster, and friendlier [11][12][13][14]. These components make cities smart and efficient. Information and communication technology (ICT) is the key to transforming traditional cities into smart ones. Two 63 | P a g e www.ijacsa.thesai.org technological infrastructures named IoT and big data (BD) make smart cities efficient and responsive.
The construction industry is not exempted from this category. Significant actions have come to the fore during the last three decades. One of the most important developments in the construction industry is the issue of smart homes, which is manifested in residential and non-residential buildings of the 21st century with the advancement and integration of new technologies and with the help of electronic, computer, and network sciences. The possibility of its increasing development during the coming years has been provided. A collection of tools, techniques, and technologies for better management and control of homes to increase the comfort and peace of the home space is referred to as a smart home. In general, a smart home is a type of building equipment to create a pleasant environment that can turn the home space into a building with higher security, optimal energy consumption, and more security [15][16][17][18]. Nowadays, the development of smart homes to help people live more comfortably has been the focus of many researchers. Helping elderly and disabled people, creating more security [19], energy consumption management [20], and medical care [21] are among the motivations for the development of such environments.
The main work and the items needed for the temporary implementation of this research work is a browser that can communicate directly with an active device on the Internet. Devices that can cooperate have the ability to communicate with sensors, actuators, and other devices. One of the important features of web-based programs is their usability. The web pages in these programs are not simple pages that only contain a series of colors and simple images; each of these pages works like a web-based program, and due to the quick modifications, that can be made in the usability of the content of these pages. The web has happened. The content of web-based programs can be presented to users more dynamically than before. These programs extract data online from various sources and display it on web pages through browsers. Also, the growth and expansion of the smart grid are accompanied by fundamental changes in the distribution networks. These changes cover different areas from consumers to distribution companies and electricity retailers. On the one hand, electric energy retailers confront consumers with real-time or near-real-time changes in the price of delivered electric energy. On the other hand, with the growth and advancement of technology, scattered products in home sizes and with an acceptable initial cost will be available to consumers. Therefore, home consumers face a problem in the time and amount of use of the electric energy sources they need. In addition to this issue, the time of using the required household appliances during the day, taking into account the level of consumer satisfaction, adds to the complexity of the problem. With the growth and expansion of factors in smart electric networks, this article considers the design of a decision factor to solve this issue. The purpose of this factor is the optimal use of various sources of electric power supply available to the consumer, including sources of distributed household production and electricity purchased from the grid, taking into account the level of satisfaction of the consumer from the time of using their household appliances [22][23][24][25].
In control systems, different approaches are used to receive information, measure the situation, and how make decisions and react. One of the widely used and common approaches in control systems is the fuzzy approach and fuzzy logic. Fuzzy logic is a form of logic used in expert systems and artificial intelligence applications [26,27]. Fuzzy logic is more general than other conventional logical approaches. The main factor of this generality can be seen in having the attitude of solving a complex problem in the form of a search space and making a decision based on the status of the question, answer, and control. This logic provided a basis for developing new tools, interacting with natural language, and displaying knowledge. An automatic lighting control system automatically turns off unnecessary lighting sources. Automatic lighting control systems by turning on and off lighting sources at different times and situations, as well as reducing the brightness of the lighting source based on the state of external factors around that source, will reduce energy consumption and increase the lifespan of lighting equipment [28][29][30]. Conventional control design methods use mathematical models to develop control systems and controllers. Fuzzy control refers to the concept of control from the point of view of linguistic description. Standard fuzzy logic can be easily applied and used in industry and industrial applications because it has a simple control structure, and its design is not a complicated and costly process. Based on fuzzy logic studies, dynamic fuzzy logic control has a more suitable performance than fuzzy logic control. In order to control the controller, several dynamic fuzzy technologies have been proposed, as examples of which we can point out the regulation of membership, the regulation of the input/output scale factor, and the regulation of descriptive rules. In this study, a fuzzy control system will be used to regulate the input and output of electricity and control the voltage of the smart home. For this purpose, after examining the fluctuations in the input voltage of the house, the designed system decides to turn off or light the house in such a way that the goal is to create maximum stability of the activity of the smart home components. The main goal is to design and implement a smart building management system using Internet of Things technology.
The main objectives of this study are as follows: 1) To develop a method to determine the parts that can be used to make a house smart among the concepts and technologies related to web-based programs based on Internet of Things technology. 2) To implement a sensor-based automation system based on the Internet of Things for intelligent building energy management, intelligent equipment management, and intelligent security has been designed and implemented.

3)
To use a fuzzy inference system to control smart home operations in Internet of Things technology. www.ijacsa.thesai.org

II. LITERATURE REVIEW
The improvement of energy management, home security, environmental control, and other areas of smart home automation systems has been the focus of several research publications and existing literature. For analysis, prediction, and classification purposes, machine learning techniques have also been used in the IoT sector. The articles in this section of the IoT library address machine learning applications in intelligent systems and smart home automation.
A smart home automation system leveraging IoT technologies was presented by Govindraj et al. [34] to replace the current home automation system. Through the use of a satellite station and a radio frequency transceiver, the suggested system employs an Android application to monitor and regulate household appliances, temperature, motion, and gases. The ThingSpeak cloud platform is used to store sensor data. The essential commands for home control are delivered by a base station. Additionally, a mobile application with a graphical representation of sensor readings was developed to connect to the satellite station, base station, and cloud server for overall control of the house.
Rani et al. [35] suggested an artificial intelligence (AI) and natural language processing (NLP)-based voice-controlled home automation system. Voice commands are sent to a mobile phone to operate household appliances, and the phone's built-in natural language processing system decodes them. The system was simply utilized to operate household appliances; it was not expanded to include other parts of home automation like control, monitoring, and motion and intrusion detection.
A low-cost smart home system design and prototype implementation was presented by Aadel and Ali [36]. The system was made to regulate the temperature, power, lights, and doors in the house. An Arduino board, servo motors, LED lights, temperature, and motion sensors were used to demonstrate a prototype implementation of the system. The INA219 high-side DC sensor was used to monitor the drop and supply of power, the DHT11 temperature and humidity sensor was used to measure the temperature and humidity in the house, and the door and windows were controlled by servo motors. The communication method employed by the system was Bluetooth, which has a limited range of communication.
Parsa et al. [37] suggested a system for the optimal and autonomous regulation of electrical home equipment. By automatically turning on and off the smart plugs connected to certain home appliances at the proper times, the suggested system is designed to reduce power usage. To choose the ideal period of use prior to implementing the automatic switch in accordance with the established criteria, an optimization approach was applied. The system's design gives the supplier the upper hand over the household's electrical user.
The design of an embedded smart house control and monitoring system employing an STM32 microcontroller was presented by Xiaodong and Jie [38]. Their technology was created for home control and interior environmental conditions monitoring (temperature, humidity). To communicate remote control and Zigbee terminal connectivity between the home gadgets, the authors used a GSM and GPRS module. Their method was implemented using a combination of coordinated remote control, feedback, and embedded real-time operating system (COS-II) for home appliances.

III. PROPOSED METHOD
The proposed load model assumes that each user has different devices with different energy needs, power demands, and working hours. Equipment can be divided into two categories: permanent load and temporary load, and each load model have its characteristics. Devices with constant load (refrigerator, heating, cooling, water heater, electric kettle, air conditioning, etc.), this type of load are known as energy consumption/production, which covers the entire time interval of the energy simulation program. Temporary load devices, this type of load is known by the start time and end time of the operation. This subcategory can be divided into two other subcategories such as (TV, lighting, cooking, hair dryer, etc.). The first one represents the devices that are the main choice of users and cannot be used backward (such as laptop chargers, washing machines, etc.), which is a "transferable burden". The second subcategory is more flexible and can be used at other times. Each of these two load models can be control or binary devices. Control devices are devices with different states to stay on, and binary devices have only two states, on or off. The proposed system of this research combines different factors that react to their environment based on a set of predetermined instructions. An agent is an entity that is created to perform tasks. An intelligent agent is an autonomous entity that perceives its environment through sensors and responds to the environment using stimuli [31]. This agent tries to maximize his desired productivity.

A. Coordinating Agent Modeling
Considering a set of A={a 1 , a 2 ,…,a N } devices in which each device has its proportional energy consumption. For each a ϵ A, the energy consumption vector of Y a is calculated as equation (1) Where H=24 hours, H is the timing range that indicates the number of hours per day that can be used by a ϵ A device. The coordinating agent considers the computational domain H to decide on the energy consumption schedule. y i a (iϵ{1..H}) represents the energy consumption for a device (a) in one hour. For each a ϵ A, the user specifies the convenience of the (a a <β a ) a a , β a ϵH range, while the beginning and end of a time make it possible to schedule energy consumption for the device. But (β a -a a ) must be greater than the time required for (t a req ) to complete the normal process of the device (a) as described in equation (2).
where a is the start time of the device operation, β is the end time of the device operation. Also, the total daily energy consumption for each device is defined as equation (3) where δ a min is the minimum standby power level, and δ a max is the maximum power level. For each center, the total energy consumption per hour must be less than or equal to the predetermined energy threshold (E max ), as calculated in eq. (5).
where E max and EC oTotal are used as the input/output of the fuzzy system, respectively as an index of the fuzzy threshold limit and power demand. By combining eq. (3) to (5), energy consumption timing vector choices are determined. Therefore, the timing set Y for all y a can be determined as eq. (6) where y=(y a ;A a ϵA) represents the energy consumption scheduling vector that contains all the variables for all devices. Therefore, a vector y is true only when yϵY is true.

B. Permanent Factor Modeling
The permanent factor is related to any permanent load device. In this subcategory, loads flow regularly and depend on the device's internal temperature. Also, the comfort range depends on the high and low levels of [T ac min , T ac max ] temperature. The permanent agent tries to maximize the satisfaction function of each permanent load device.
A constant load device's satisfaction function depends on its descriptive variable. For example, the air conditioning service is dependent on its temperature (T), which is seen in Fig. 1, and a user is satisfied if the temperature of the room in which he is sitting is 21 o C to 22 o C.
In order to avoid the peak load demand without affecting the user's comfort, the permanent agent uses the scheduling operation method, shown in relations (4) and (5). The flexibility of this service comes from the possibility of editing the quantities of energy consumed/produced in all periods. Therefore, it increases or decreases the factor with the assumed limits [δ a min , δ a max ] of each device.

C. Temporal Agent Modeling
The temporary factor is related to any temporary load device. Mandatory execution load starts when the user requests execution. Since the force consumption is constant, there is no other option but to regulate its operations in the normal force demand and these tasks do not need scheduling. However, in periods of high-power demand of the provider, the operator is instructed to use the fuzzy system to control the required load operations. The transferable load starts its duty when the temporary factor (such as the dishwasher) is according to the comfort zone of the user [a a , β a ] and the limit of the relationship (3) of the operation of each device. The satisfaction function of a temporary load device is dependent on the transfer time in service [a a , β a ], which is also dependent on the optimal time of the user's request, shown in equation (8). For example, the user wants his clothes to be cleaned at 9:30 AM, which can be seen in Fig. 2 The temporary agent used the existing list of priorities prepared by the coordinator and then used three types of fuzzy logic based on the control strategy as an efficient solution to transfer the required power of the devices in periods of high demand. In this section, the proposed fuzzy inference system is discussed. Principally the controlling of smart devices in IoT systems is not contained absolute value to control the various processes. Therefore many-value with approximate number ids www.ijacsa.thesai.org required to use in these systems Fuzzy logic is a form of manyvalued logic in which the truth value of variables may be any real number between 0 and 1. It is employed to handle the concept of partial truth, where the truth value may range between completely true and completely false [33]. Fig. 3 shows the block diagram of the proposed fuzzy inference system.
The proposed method has two inputs and one output variable. In the fuzzification stage, the fuzzy controller receives the inputs and maps them to their membership functions, called fuzzy sets. The degree of membership in the fuzzy set μ for the input ϰ is determined in the fuzzification step. This degree of numerical membership is between 1 and 1. The value 0 means that ϰ is not a member of the fuzzy set; the value 1 means that ϰ is completely a member of the fuzzy set. The values between 0 and 1 specify the fuzzy members, each of which partially belongs to the fuzzy set. The membership function (MF) is a curve that specifies how to map each point in the input space to the membership value (or degree of membership) between 0 and 1. Sometimes the entrance space of the community is also called the entrance. The most used shapes for membership functions are triangular, trapezoidal, and Gaussian. In the proposed method, membership functions assigned to input and output variables are considered triangular. The edges of the triangle can be specified by the triplet (a, b, c) (where a<b<c). The parameters {a, b, c} of the x coordinates of the three edges of the desired triangular function are specified. Fig. 4 shows a triangular membership function (2,4,6). Point 4 has the largest value in the membership function.
In this study, the fuzzy set includes a maximum of 4 states, which are different for each input membership function, which is explained in the following sections.

A. Input Power Membership Function
It is assumed that the number of input power modes equals (normal, less than normal, medium, and weak). The value of 0 indicates that the input power is weak, and more care should be taken regarding its distribution. While the value of 500 indicates the normality of the input power. The triangular membership function maps the number of input power states www.ijacsa.thesai.org from 0 to 500 watts according to the degree of membership into 4 fuzzy sets (Weak, Medium, Less Than Normal, and Normal). This allocation is shown in Fig. 5.
According to Fig. 5

B. Priority Membership Function
The Priority membership function determines the priority of the device, which in this research includes (low, medium, important, and very important) states. A value of zero for this function indicates a low priority state, a value of 1 indicates a medium priority, a value of 2 indicates an important priority, and 3 indicate a very important state. The triangular membership function maps the number of device priority states from 0 to 3 according to the degree of membership into 4 fuzzy sets (Low, Medium, Important, Very Important).
This assignment is shown in Fig. 6

C. Device Usage Membership Function
The Device Usage member function specifies the amount of device usage. In this study, the Device Input Type variable is determined, which includes (control and binary) modes. Suppose it is a control device such as a fan. In that case, the amount of consumption of the device is decided by reducing the input power and the priority of the device. This type's device consumption includes (off, low, medium, and high) modes. For example, a ceiling fan with a consumption value of [65 75], a value of zero for this function indicates that it is off, a value of 65 low consumption and 120 consumption It is average, and the value of 175 shows a high state. The triangular membership function maps the number of device usage states to 4 fuzzy sets (Off, Low, Medium, High) according to membership degree. This allocation is shown in Fig. 7 If the type of input device is binary, we will have only two states, off and on, which determine the amount of consumption of the device. In this case, the Device Usage membership function will be Fig. 8.
The fuzzy set of this function in this type of device is {Off: triangle [0 0 1]}, {On: triangle [0 1 1]}. The input variable states with these diagrams do not change quickly from one state to the next. Instead, when the input changes, it loses a value in one membership function while gaining another value in the next state. In other words, an input variable with a specific membership degree is a part of two membership functions. For example, in Fig. 7, when the Input Power is equal to 200 watts, the input completely belongs to the membership function of Medium. However, when the Input Power is equal to 280 watts, the input is partially (0.5 each) a part of two membership functions, Medium and Important. Generally, a fuzzy system is formed based on human experience and expert information. The limits of the modes are also defined in the same way.

D. Fuzzy Inference System
An inference engine is equipped with fuzzy rules to decide on an output channel based on the current state of the network. An inference engine with a set of linguistic statements to describe the system using the number of conditional rules (ifthen) where the if-then part is specified by (precedence) and the then part is specified by (tail). Usually, the knowledge of an expert is used to form the rules of the fuzzy inference system. Table I contains rules used in the proposed method for control devices with two fuzzy inputs and one fuzzy output. This table contains different output values for different input ranges. Filling a data table with fuzzy attributes (scalability) is a matter of taste.
Table II contains rules that are used in the proposed method for binary devices with two phased inputs and one phased output. These tables are prepared based on basic knowledge about the effect of each criterion on the overall performance of the proposed method.
The fuzzy rules usually combine several assumptions using fuzzy operators such as fuzzy intersection (AND) and fuzzy union (OR). If the rule uses the AND relationship to map two input variables, at least these values are used as output. In contrast, for the OR relationship, the maximum is used. In the proposed method, the AND operator is used to combine the fuzzy inputs.
The example in Fig. 7 helps clarify the issue. Input Power and Priority parameters have values of 250 and 1.8, respectively. As shown in Fig. 9, Input Power is a part of the membership functions of Medium and Less Than Normal, and the part of each membership function is 0.5. The Priority entry is a part of Medium and Important membership functions, shown in Figure 10. In this case, the degree of membership for membership functions Medium and Important is 0.

E. Composition and Defuzzification
Defuzzification is the process of producing a measurable result in fuzzy logic and converting the fuzzy control action to a definite value. The output of all rules must be collected and converted into a single output. Two methods are widely used for defuzzification. Method 1 Center of Gravity (CoG): This method finds the geometric center. Also, this method selects the output with the largest area. Method 2: Maximum mean (MoM): This method gives the values that have the maximum degree of membership according to the fuzzy membership function. www.ijacsa.thesai.org It is simpler but loses useful information, while CoG, which is used as a common method, is more efficient. CoG is our chosen defuzzification method to produce a definite value in this research. In the phase of defuzzification, the four output values obtained in Fig. 11 are combined, and a single output is extracted using the center of gravity method. As shown in Fig. 12, the fuzzy outputs of the membership function with the same output are added together, while the values in different membership functions are taken together (that is, their maximum value is considered).
The output value can be calculated from eq. (9).
In this case, the output value is equal to eq. (10(.

Obtained DeviceUsage Obtained DeviceUsage
Degree of Membership Fanctions  According to this formula, the degree of the membership function of each rule is multiplied by the maximum value in the membership functions in the output value and then divided by the sum of all the values of the membership function. In this example, the power consumption of the device is set to Medium in Fig. 13.        The washing machine and dishwasher are binary devices with only two states, on or off. Therefore, the temporary agent predicts its consumption and gives users the price of electricity at the time of use, which the provider provides. The user can benefit from washing at night at a lower price. For example, the user expects the dishes to be ready by dinner, so he sets the time of use as α=2 PM and β=6 PM. So, suppose it is at the peak of electricity consumption or during the electricity fluctuation. In that case, this device will be turned off and transferred to a more suitable time. Television is a device whose power level is flexible. The TV has three functions with three levels, so the temporary agent uses a scheduling policy. If the threshold is soon reached, and some devices cannot be stopped, the agent switches the TV's function to ambient light or standby mode. Be with the level. TV is a device whose power level is flexible. The TV has three functions with three levels, so if the threshold is reached soon, the temporary agent will use the timing policy. Some devices cannot be stopped, so that the agent will adjust the TV function to the ambient light or mode. Ready to work with level y a =δ a min . The water heater is very important when the user wants a quick shower. However, for the user who has planned his bath time, the agent can heat the water before the specified time. In addition, this factor can cut off the boiler's power for an hour without the user noticing. The permanent factor controls the daily energy of the water heater using the scheduling policy.
In this section, we analyze the power consumption control in three types of devices in the state of peak power demand in Fig. 14. The simulation was divided into 15-minute segments during the hours of the day. A set of (t ϵ Time) time segments was created in which Time={1,2,3,…etc.} is The minimum and maximum power of the devices used in the strategy are refrigerator (140 to 420 W) control device, with priority 4, TV (100 to 300 W) control device, with priority 2, water heater (750 to 1800 W) control device, with Priority 3 and time satisfaction function 22-24, air heater (500 to 1500 watts) control device, with priority 3 and temperature satisfaction function 20-22 degrees Celsius, dishwasher (2000 watts) binary device, with priority 1 and time satisfaction function 14-18. Fig. 14 shows the output phase system of the refrigerator. Power below 140 watts will cause the refrigerator to turn off, and 300 watts will cause low consumption of the refrigerator, and the most consumed time of the refrigerator is 420 watts. Fig. 15 shows the fuzzy system of TV output. Power below 100 watts will turn off the TV, and power of 200 watts will cause low consumption of the TV, and the most consumed time of the TV is equal to 300 watts. Fig. 16 shows the output phase system of the water heater. Power below 750 watts will turn off the water heater, and 1400 watts will cause low consumption of the water heater, and the most consumed time of the water heater is 1800 watts. Fig. 17 shows the output phase system of the air heater. Power below 500 watts will turn off the air heater, and 1000 watts will cause low consumption of the air heater and the most time-consuming air heater is 1500 watts. Fig. 18 shows the fuzzy output system of the dishwasher. Power below 2000 watts causes the dishwasher to turn off, and power below 2000 watts causes the dishwasher to stay on.
In one hour, the house's energy is calculated based on equation (4) and should be a maximum of 300 watts (E max =3000). If all the devices are on and have their maximum consumption, the total consumption power is calculated according to equation (11). The total power consumption is 6020 watts, which is more than the maximum consumption. Therefore, the coordinating agent predicts the peak power and performs some tasks in advance. The operation of the dishwasher can be moved to midnight. The TV will work in a low-power mode. The refrigerator can be used for one hour as long as the door is closed. The agent of the satisfaction function checks the water heater and the air heater, schedules their operations in case of peak power demand, and cuts off the devices with a low priority. The power consumption output by the proposed system is shown in Fig. 19. www.ijacsa.thesai.org In the first 15 minutes of the simulation, the refrigerator consumes 210 watts, the television consumes 267.6 watts, the water heater consumes 1274.2 watts, the air heater consumes 666.7 watts, and the dishwasher consumes zero watts. Therefore, the TV and dishwasher are turned off, and the refrigerator, water heater, and air heater are on with low consumption. In 15 minutes of the 20th simulation, the refrigerator consumes 250 watts, the television 150 watts, the water heater 900 watts, the air heater 1023.2 watts, and the dishwasher consumes 0 watts. Therefore, the dishwasher is turned off, and the refrigerator, TV, water heater, and air heater are on with low consumption. In the 56th 15 minutes of the simulation, which is the time dependent on the satisfaction of the dishwasher, the refrigerator consumes 140 watts, the television 100 watts, the water heater zero watts, and the air heater 750 watts, and the dishwasher consumes 2000 watts. Therefore, the water heater is turned off, the refrigerator and air heater are on with low consumption, and the dishwasher started working for half an hour. After the dishwasher is finished, the water heater is turned on and continues its operation. The reduction of 15 minutes is due to the reduction in water heater consumption. In all cases, the red line in Fig. 19 shows the amount of energy consumption without the proposed research method. As can be seen, the consumption of the proposed method is always lower than the method of the article [31]. The amount of energy saving can be obtained by equation (12).
Where EUAfter indicates the energy consumption after the proposed algorithm and EUBefore indicates the energy consumption before the proposed algorithm. In fact, building energy saving is defined as the difference ratio of energy use before and after the implementation of the proposed algorithm in the same period. Energy saving has been calculated in two intervals. In the interval [1 1], the first 15 minutes, the total energy consumption is calculated in eq. (13). In this case, the force has been reduced by 39%. In [32 39], the total amount of consumed energy was equal to 2990, and the proposed method reduced the energy by 29.1%.   The proposed load model assumes that each user has different devices with different energy needs, power demands, and working hours. Devices are divided into two subgroups: permanent load and temporary load, each of these two "load" electricity amount models can be controlled or binary devices. The proposed model of this research consists of two inputs named (amount of input power) and (device priority) and one output (device consumption). Decision-making for an output channel based on the current state of the network is equipped with fuzzy rules. The number of input power modes equals (normal, less than normal, medium, and weak). The priority of the device includes modes (low, medium, important, and very important). Suppose the device is of a control type. In that case, the device's consumption is decided by reducing the input power and the device's priority. This type's device consumption includes (off, low, medium, and high) modes. Suppose the type of input device is binary. In that case, we will have only two states, off and on, determining the device consumption amount. Building energy saving is defined as the difference ratio of energy use before and after implementing the proposed algorithm in the same period. This criterion has been used to evaluate the proposed method. According to comparison result among the proposed method with other existing methods, this method achieves better results compared to methods in energy consumption by 33.8% reducing energy usage.

Conflicts of Interest:
The authors declare no competing interests.

Data Availability Statement:
The authors do not have permission to share data.