An occupancy-based strategy employing computer vision for reducing cooling energy consumed in buildings

Received Aug 30, 2020 Revised Mar 20, 2021 Accepted Apr 30, 2021 The energy expended to cool the occupied areas by air conditioners represents a substantial share of the total energy exhausted in buildings. Therefore, developing strategies to reduce this energy is crucial. One of the preponderance strategies adopted to depreciate energy consumption in buildings is the occupancy-based strategy. In this research, an innovative model was established to achieve the goal of reducing cooling energy consumed in buildings based on occupancy-based combined with a constant temperature setpoint strategy in two phases, and each phase engrosses in 20 days. Phase one is to identify the extent of cooling energy employed according to the use of room occupants and its costs in consumption was 276.01 kWh after completion of this phase. Sequentially, constructing phase two intended to reduce cooling energy consumption by employing an automatic air-conditioner (AC) control strategy relying on an improved human detection algorithm with a 25°C as temperature setpoint, resulting in 112.45 kWh of consumption. To complement the motives for elaboration, the human detection measurement using you only look once (YOLO) improved by applying pre-processing algorithms to reach an average human detection enhancement of 21.2%. The proposed model results showed that potential savings associated with the embraced strategy decreases by more than anticipated as the amount of reduced energy reached 59% savings.


INTRODUCTION
Energy consumption has increased speedily worldwide causing the depletion of energy resources and a negative environmental impact. At present, the buildings sector consumes an extensive proportion of aggregated energy and responsible for a significant part of CO2 emissions globally [1]. Until the total energy consumption of the buildings sector reached 40% of the total energy consumed [2]. To be more specific, the cooling and heating framework inside the buildings have the largest share of this consumption, in particular 50% of the power consumption [3]. Thus, reducing energy consumption is a critical issue. Former researchers demonstrated that a massive proportion of energy is wasted in unoccupied areas [4].
As a consequence, information about space occupied essentially to reduce energy consumption. In numerous countries including Egypt, the electricity demand has increased dramatically to overcome the peak that led to frequent power outages, especially in the summer season. In Egypt, one temperature increases

RESEARCH METHOD
To show the effectiveness of occupancy-based increasing of setpoint temperature on the energy and the consumption of the building. A sample model of a room was taken and simulation results concluded.

Model architecture
Building architecture: The applied model is carried out into a typical Egyptian single-family residence in a 6-floor building based on Egyptian code to improve energy efficiency in residential buildings which were presented by Housing and Building National Research Centre in Egypt in 2005 based on international standards (ASHRAE 90.1) [19], [20].
Hardware architecture: To finish the objectives of introducing this model and get some significant data, some inexpensive cost hardware embraced:  Arduino Uno/1.0 board.  Sensors current transformer-13 (SCT-013) to measure consumed cooling energy.  Infrared (IR) emitter sensor to control AC.  Detection humidity temperature (DHT11) sensor to measure temperature degrees.  Camera with night vision capability.
Temperature control: The climate of Egypt is considered warm in the summer season and susceptible to changes, with continuing to increase the proportions of temperature, the thermal conditions suitable for living and practicing various work activities in buildings will be imbalanced [21]. Many researchers have embraced comfortable temperature regulation of the human, the recommended cooling temperatures, taking into account the nature of the room activity, range from 20.5°C to 24.9°C [22]. Accordingly, the cooling temperature set-point was determined to be 25°C throughout the proposed model implementation phases. The proposed model was previewed in the summer season between July and August to note the amount of energy consumed in cooling that can be saved.
Human detection based on deep learning algorithms: Researchers have adopted many devices such as passive infrared (PIR) sensor, ultrasonic sensor, sound sensor, smart device-based sensing, and camera sensor. For improving the performance of applications that require accurate occupancy information to improve energy consumption rates. Cameras are significant devices that answer their presence inside any building, conferring much important information such as presence, location, and tracking. Thereof, giving sufficient information about zone occupancy assistance in controlling heating and cooling devices [23], [24]. One of the key challenges in this work is to identify a suitable object detection algorithm for the indoor environment to detect the presence of humans.
A significant improvement in methods of object detection appeared based on the use of convolution neural networks (CNNs) in recent years. Newfangled algorithms concerning object detection which depend on CNNs such as faster R-CNN [25], single shot multibox detector (SSD) [26], and you only look once (YOLO) [27]. With the aim of precisely adjudicate these algorithms, the working environment for all of them is standardized, is being as; graphics processing unit (GPU) is Nvidia Tesla K80, RAM of GPU is 12 GB, random access memory (RAM) is 13 GB, and operating system is Ubuntu 18.04.3 LTS. This work focus is on the test time performance and mean average precision (mAP) of these algorithms. Figure 1 describes the framework of SSD and faster regional convolutional neural network (RCNN) algorithms [28], [29]. SSD technique utilizes a single feed-forward convolutional network to directly predict classes an anchor offsets, dispensing with a second stage per-proposal classification operation. At variance with faster-RCNN object detection occurs in two stages: 1) Region proposal network and 2) region of interest (ROI) pooling layer, as shown in Figure 1. YOLO proposes the essential endowment for real-time detection of full images and webcam. It is at odds with the region-based algorithms. Therefore, a single CNN determines the bounding boxes with their class probabilities [28], [30]. Table 1 illustrates the test time performance, mean average precision (mAP), and frame per second (FPS) of the object detection algorithms.
According to the evaluation mentioned in Table 1, it is observed that YOLOv3 is very fast, possesses a standard precision with the best two-phase identifiers. The aforementioned makes it a remarkable object detection model for our proposed model. To achieve the best result in detecting the human factor using YOLO, a pre-processing step was combined to improve the detection results. When starting work with YOLO, it was noted that the rate of detection of the human factor in which video was captured in night vision at some angles is helpless and in some cases lacking. Therefore, some adjustments have to be made to get the best results. With experience, it was observed that the application of pre-processing techniques for the captured image in night vision mode considerably improved the ratio of detection of the human factor using YOLO. Especially in those pictures where the human is located in a light-poor area. To test the application of the pre-processing algorithms, the following set of steps were applied:  Step 1: The video split at a rate of 3 frames per second.  Step 2: Test and record the human detection rate using YOLO.  Step 3: Pre-processing algorithms will be used made up of two phases, a. Apply the dehazing algorithm on the image. b. Apply histogram equalization algorithm on dehazed image.
To clarify the previous steps, the video in the night lighting split into a set of frames with a rate of 3 frames per second to show the difference in movement during one second. Subsequently, the human detection rate on the tested image using YOLO without any advance adjustment to the image is recorded. As illustrated by pre-processing algorithms used, the first pre-processing step is to apply the dehazing algorithm on the image to restore illumination. In the second pre-processing step, the resulted image of applying the dehazing algorithm applied to histogram equalization to adjust image contrast.
After completing the previous steps, the image is ready to reveal the human factor present in it using YOLO. The results are distinctly illustrated in the RESULT AND DISCUSSION section. Consequently, the proposed model constructed on the above-mentioned architecture model, and this model is composed of combination phases illustrated in the following sections.

Model phases
Phase one: This phase target enumerating the actual electric energy utilized by the air conditioner of the cooling aforementioned area without any conditions according to the normal use of the room's occupants. The cooling energy used by AC was measured for 20 days, measuring every day's cooling consumption. Throughout the day, six different hours manipulated energy measured, adjusting air conditioner temperature to 25 ℃. Employing an energy meter sensor to infer the expended energy from air conditioner excluding remain devices, as shown in Figure 2.  Step 1: Six separate hours were specified throughout the day.  Step 2: An energy meter installed.  Step 3: Record the maximum and minimum temperature for the day.  Step 4: A temperature sensor is used to measure hourly temperature in six specified hours.  Step 5: Adjust the air conditioning cooling temperature to 25° C.  Step 6: Record the amount of cooling energy consumed via: a. Consumed energy per specified hour. b. Energy consumption is measured throughout the day by adding up the consumption of the specified six hours. To quantify energy utilized and due to temperature variation, all day long six separate hours were specified throughout the day, 3 hours in the morning, and 3 hours in the evening with a time difference between each hour. In which the measurement captures the difference in the energy spent in different temperatures throughout the day. An energy meter is established to measure the electricity consumption of the air conditioning if activated through the specified hours. Then, air conditioning operating cooling temperature is installed at 25°C due to proving that the efficiency of the air conditioner increases at this degree, and it is the ideal temperature reducing the energy consumption of refrigeration and appropriate for room occupants. Simultaneously, the amount of cooling energy expended per hour is recorded, from which the energy is calculated over six hours per day. Consequently, phase 2 was established to compare its results with phase 1, and to observe the variation in the amount of cooling energy consumed.
Phase 2: This phase aims to reduce cooling energy in architecture identical to phase one and engross in 20 days. Established on an automatic air conditioner control compact with cooling temperature setpoint at 25℃. Controlling is based on the human detection system of the room based on streaming data using a live broadcast camera, thus image analysis to infer the presence of human factors, see Figure 2. Accordingly, give a decision to operate the air conditioning. The proposed model reduced cooling energy by 59%, as illustrated in the result section.  Step 1: Six separate hours were specified throughout the day.  Step 2: An energy meter installed.  Step 3: Record the maximum and minimum temperature for the day.  Step 4: A temperature sensor is used to measure the hourly temperature in the specified hours.  Step 5: A camera installed, navigating the adopted space.  Step 6: The system starts to operate automatically at every specified hour.  Step 7: Human detection activated, if: a. Occupant detected, then go to step 8. b. Occupant not detected, and then sends turn-off signal to AC.  As previously mentioned, the hours selected as the hours specified in phase 1 with the same distribution. To perceive the variation in electricity consumption under applying the system. An energy meter is installed to measure the electricity consumption of the air conditioning if it turned on. Supplementary, a camera is installed to navigating the adopted space for observing the presence of the human factor. After setting all the devices, the system starts to operate automatically at every specified hour. Posteriorly, the camera is activated to observe any occupant in a room after starting the system operation interacting with AC automatic control.
The occupant detection state determines the nature of the system operation. The occupant presence active state requires the system to measure room temperature to operate one of two decisions; if the measured temperature is greater than 25℃, the system sends a turn-on signal to the AC. Otherwise, if the measured temperature is less than 25℃, the AC remains off unless the occupant of the room operates it manually. Room occupant entry and exit times were recorded for every specified hour. The number of entry times has been calculated for room occupant, at that point estimating the all-out time spent in the room during each hour. To perceive the full duration of the air conditioner operation and remark its impact on the spent cooling energy. After adjusting all the necessary environment to implement the proposed model and record the required data of phase 2. Comparison of the results of phase 1 and phase 2 was addressed, the proposed model reduced cooling energy by 59%, which are detailed illustrated in the results and discussion section.

RESULT AND DISCUSSION
The effectiveness of the proposed model that employed occupancy-based combined with a temperature setpoint strategy presented in this section, illustrating each phase results and the results of applying human detection using improved YOLO.

Proposed model
The proposed model results were provided over twenty days in Table 2. The results are separated into two stages, stage one introduced results for expended cooling energy with no conditions showing that total cooling energy consumed in six hours per day ranges from 8.9 to 17.03 kWh. In the wake of ascertaining the energy expended for twenty days, it is found that the aggregate sum of cooling energy 276.01 kWh in phase one. The energy employed under model conditions is compared to estimate potential savings associated with occupancy-based control merged with the temperature setpoint. The results showed that cooling energy decreases by more than anticipated as the amount of reduced energy reached 59% savings as illustrated in Figure 3. Cooling energy consumed in each day of phase 2 ranged from 4.06 kWh to 8.25 kWh and the aggregate sum of cooling energy 112.45 kWh. To better clarify the results, Table 3 and Table 4    Subsequently, the total cooling energy for both phases one and two were calculated, and the total energy saved between the use of the two phases was calculated for each hour. For the post Meridiem period, total energy utilized for hours 1, 2, and 3 through phase 1 Figure 4 illustrates the diversity in cooling energy consumption between phase 1 and phase 2 in each specified hour. From this, the results show the extend of savings upon depending the proposed strategy.

Human detection based on improved YOLO
To obtain the best results in detecting the presence of the human factor using YOLO, a preprocessing step was added to improve the detection results. Experience has shown that the pre-processing 1737 step before the direct use of YOLO enhances the required image information. The results showed that the average YOLO detection reaches 71.17%, with the reverse of improved YOLO reaches 92.37%. The average improvement of use these algorithms on the image before the detection stage of the human factor using YOLOV3 is 21.2%, as shown in Figure 5.

CONCLUSION
This research built an occupancy-based model combined with a constant temperature setpoint for reducing cooling energy in buildings. This strategy employing human detection for detecting humans using Improved YOLO consolidated with 25℃ as a temperature setpoint. It was implemented in two phases in a single room of an Egyptian single-family residence. The strategy is performed in two different phases to investigate the cooling energy consumed with and without the applied conditions for this strategy. The findings of the proposed model effectively reduce cooling energy under built model conditions showed that cooling energy decreases by more than anticipated as the amount of lessened energy reached 59% savings. To make this strategy deliver the most dependable results, its refined human detection, the detection measurement of YOLO was improved by applying pre-processing algorithms to reach an average improvement of 21.2%.