—In the midst of environmental concerns, and soaring energy costs and energy shortages, the efﬁciency of electrical household water heaters (EWHs) has been identiﬁed as an area with signiﬁcant potential for savings. The beneﬁts of applying optimised scheduling control for EWHs has been proven by var- ious studies, however, little has been done to measure individual behaviour. This paper presents an alternative to the invasive and expensive solution of using water ﬂow meters. A hardware and algorithmic solution is presented that uses thermal transients at the outlet of an EWH to measure consumption patterns. The results show that the approach is able to detect usage events with an accuracy of 91%. Despite the challenges related to thermal inaccuracies, event durations are estimated to within 2 minutes accuracy 79% of the time. I. I NTRODUCTION Electrical water heaters (EWH) are commonly used to heat water for household consumption in developing countries where gas is not readily available. South Africa is one such country, and boasts 5.4 million EWHs. Similar to many de- veloping countries, South Africa’s national electricity utility, Eskom, is unable to meet the energy demands of the country and must cut service provision in certain areas through load shedding during periods of high demand, to ensure that the generation capacity of the grid is not exceeded. Water heating is responsible for 7% of the countrys demand, and 20% of the residential demand [1]. However, during peak hours, it consti- tutes between 30% and 50% [2]. Part of the energy consumed by EWCs is to replenish heat dissipated to the environment. This type of energy is referred to as standing losses, and could be as much as 20% of the EWCs consumption. These standing losses can be virtually eliminated if a timer control is applied to only heat the water before warm water is needed [3]. Demand side management (DSM) aims to ﬂatten utilities’ demand curve (e.g. peak shaving and valley ﬁlling) by shifting customer energy usage and reducing losses on the load side. This is advantageous to utilities as it allows for the deferral of infrastructure development to increase generation capacity by, instead, reducing the demand [4]. EWHs are well-suited to DSM programs as they are able to store energy. However, many of these devices are mismanaged and suffer from large standing losses as warm water is available throughout the day, even for extended periods where no usage occurs. DSM control techniques and programs have been created to more effectively manage the energy consumption of residentialEWHs. However, for these controllers or programs to be effec- tive, an accurate water usage proﬁle is essential to coordinate the switching times for EWHs [5]. This is because consumer usage patterns vary between users, seasonally, and between regions. For example, in South Africa, it was found that warm water consumption increased by up to 70% from summer to winter [6] and that low-income households consumed up to four times more warm water than high-income households [6]. If generic assumptions are made about these patterns of use, they may be inaccurate and result in consumption being adversely affected. For indirect load management programs, where consumers are responsible for the control of their devices, customer participation is important. Users need to be able to control and understand their energy consumption in a simple and convenient manner. This is not currently the case with EWHs, which are often positioned in hard to reach locations (such as on roofs or in attics). Additionally, users don’t always know the best means of controlling their EWH to energy savings. For example, they may not know when to switch it on and off to reduce energy consumption but still have warm water on demand when needed. An obvious way to detect warm water consumption patterns is to use water ﬂow meters. However, they are expensive (around $50 per standards-approved device) and their installa- tion is invasive and labour-intensive. A. Contribution This paper presents a novel and non-invasive hardware solution and matching algorithm to support the identiﬁcation and classiﬁcation of warm water usage events without the use of invasive and expensive water metering technologies. The approach uses temperature ﬂuctuations apparent on the outlet pipe of a water heater to identify the start and end times of usage events. The approach is intended to be used as the sensing mechanism of an optimised scheduled control scheme for electrical water heaters, in which heating schedules are optimised to meet usage patterns to save energy and costs. Additionally, the algorithm is implemented as part of a smart- phone application which provides users with proposed heating schedules based on their usage, and presents an estimate of the potential energy savings as a result of its implementation. The rest of this paper is organised as follows: section II describes related work in reducing the standing losses andPreprint of https://ieeexplore.ieee.org/document/7266530 energy usage of EWHs; section III presents the event detection algorithm used for detecting events using outlet temperature; section IV presents an Android mobile application that imple- ments the event detection algorithm to optimise the control schedule of a residential EWH; section V details the results and accuracy of the event detection algorithm using outlet temperature data compared to water meter data; section VI outlines future work to be done; and section VII concludes the paper. II. R ELATED WORK Atikol [4] examined the static and dynamic cooling behaviour of EWH storage tanks and possible heating schedules to avoid peak hours. Experimental results indicated that, if the DSM programs are carefully designed for each household, it would be possible to use timers control to activate the EWHs for once or twice a day to provide enough warm water to meeting the daily demand. This was based on the ﬁndings that, even when the warm water is kept standing in the tank for 12 hours after an initial withdrawal of 64 litres (i.e. three typical showers), it would still be possible to have warm water at temperature above 40C in the top 15 percent of the tank. In order for this type of DSM program to be effective it is imperative to examine at which times users are taking showers on typical days in order to propose an effective schedule to meet their warm water needs. Catherine et al. [7] presents a usage proﬁling system to improve the efﬁciency of household EWHs. This system was installed in ten households and made use of a ﬂow meter to determine the frequency and duration of warm water usage events during a day. A day was comprised of twelve 2 hour intervals, each of which would implement one of three different service levels (i.e. temperature set points) based on the amount of warm water used. The three service levels were deﬁned as: high, which implements a temperature setting of 65C; medium, which keeps the water temperature at 55C; and low, where the set temperature was reduced to 45C. This system was found to reduce the average temperature of a EWH by approximately 10C, resulting in a reduction in the standing losses (and therefore energy usage) of the EWH while still satisfying users’ warm water demands. III. E VENT DETECTION The purpose of the event detection algorithm is to identify warm water usage events using only the outlet temperature reported in by a temperature sensor attached to the outlet pipe of the EWH, as shown for the EWH conﬁguration in Figure 1. The identiﬁed consumption patterns can then be used to create an optimised control schedule for users. This is done by allowing the EWH element to turn on only for a period of time before expected usage events occur, which signiﬁcantly reduces standing losses. When a usage event occurs, warm water is drawn from the tank and ﬂows through the outlet pipe, which is at approximately room temperature and much cooler than the water in the tank. The outlet pipe conducts the heat from the warm water, resulting in a sudden increase in its surface temperature. Similarly, when a usage event has ended, water stops ﬂowing through the outlet pipe and the remaining heat Fig. 1. Hardware conﬁguration of intelligent EWH. is dissipated from the water that remains in the pipe to its surroundings. The temperature of the water in the outlet pipe decays as this heat is dissipated which, in turn, decreases the surface temperature of the outlet pipe towards the ambient air temperature. The outlet pipe temperature is measured using the temperature sensor attached to the surface of the metallic (usually copper) outlet pipe, and is sampled, in our system, every minute. Figure 2 shows the typical temperature proﬁle at the outlet for an isolated usage event. The event detection algorithm determines the start and stop times of events by analysing the slope of the outlet pipe temperature. In this example, a start event is classiﬁed as an increase of at least 4C over two minutes (two samples). After an event has started, the detector tries to identify a subsequent stop event, which is classiﬁed as a decrease of at least 2C over seven minutes (seven samples). These values were derived empirically for the EWH that was used during testing and are optimised for a one minute sampling interval and a temperature sensor with an accuracy of 1C. The ﬂuctuations in temperature that deﬁne start and stop events are dependent on the difference between the set temperature of the EWH and the ambient temperature of its environment, and will vary between setups. However, it is reasonable to assume that a residential EWH will have a set temperature higher than 50C to prohibit the growth of the harmful bacteria, Legionella pneumophila [8]. It should be noted that this algorithm will not work for low water temperatures as well as instances where the ambient temperature exceeds the temperature of the warm water. Fig. 2. Measured outlet temperature for isolated usage event. As shown in Figure 2, there is an increase in temperature of 6C (T1) between minutes 2 and 4, which meets the criteria for a start event. However, it is clear from the ﬁgure that the start of the usage event is at minute 3, and not minute 2, because this is where the outlet temperature begins to increase. The detection algorithm will compare the temperature values at minute 2 and 3 to determine if they are equal and, if so, shift the starting index one sample later. Between minute 6 and 13, there is a decrease in tempera- ture of 2C (T2), which constitutes a stop event. However, it can be seen from Figure 2, that the stop event is situated at minute 7. The algorithm was therefore adapted to take the subsequent sample as the end of the event. due to the fact that the decay of the temperature in the pipe is gradual and the duration of events was being overestimated by the algorithm. When events occur within a few minutes of one another (i.e. events are not well isolated), the algorithm will not shift the start event sample forward as described in the previous paragraph. Figure 3 shows a scenario with two back-to-back events. The ﬁrst event at minute 6 is detected using the temperature increase ( T3) in a similar manner as an isolated event and the start event is shifted forward to minute 7. For the second event at minute 17, however, the temperature of the outlet pipe is still signiﬁcantly higher than the ambient temperature. In this case, the start event is not shifted forward because the increase in temperature ( T4), as a result of the usage event, is indeed occurring at minute 17. Fig. 3. Measured outlet temperature for two consecutive usage events. The duration of the events is then determined by taking the difference, in minutes, between the start and stop times of the event. If this duration is greater than 20 minutes, the event is discarded as the length is too long for a typical usage event. This value was chosen based on the length of events seen for the 49 days of data that was analysed. The longest events that were registered for this data were 17 minutes in length and used up to 100 litres of warm water. IV. M OBILE APPLICATION This section describes a part of the Android smartphone application ﬁrst presented as a proof-of-concept in [9]. Initially, the application only allowed users to monitor the status and usage data of their EWHs. The functionality and user interfacehave since been enhanced to allow control of the EWH and determine a recommended heating schedule that is catered to user consumption patterns. Additionally, a one-node EWH model as used by [10] was implemented on the mobile application to model and display to users the impact on energy consumption of control changes, and to provide recommended heating schedules. This allows users to obtain immediate feedback on the effects of modifying the heating schedule or set temperature of their EWH, as shown at the bottom of the Optimise tab (left) in Figure 4 . Fig. 4. Optimise (Left) and Control (Right) tab of smartphone application. A. Recommended Schedule Generation Figure 4 shows: the Optimise tab within the smartphone application, which is responsible for generating recommended heating schedules; and the Control tab that allows users to control the various settings for their EWH from their mobile device. In order to generate a recommended schedule, the user selects a day that represents their typical usage. The outlet temperature for this day is obtained from the server and used by the event detection algorithm to determine when warm water is being consumed. Users can then select the events that are part of their daily routine, from the list of events that are detected, to ensure that the algorithm doesn’t take into account atypical events. The results displayed in the Optimise tab of Figure 4 are identical to those shown in Figure 5. The recommended schedule, based on the usage of the selected day, is displayed to the user, as well as potential Fig. 5. Screenshot of software developed to analyse usage patterns and to compare water meter data with the thermal event detection algorithm. energy savings as a result of implementing this schedule, in comparison to the user’s existing control settings. Additionally, the user can manually implement further changes to the schedule or set temperature of the EWH via the Control tab, shown in Figure 4. This tab also provides an estimate of the increase or decrease in the energy consumption of the EWH as a result of any changes to the settings of the EWH (e.g. lowering the set temperature). The estimates indicating the difference in consumption are calculated using the one-node model for the EWH [10]. V. R ESULTS A water meter was installed on the water inlet pipe of the EWH, as shown in Figure 1, to determine actual warm water consumption events. The water meter outputs a pulse for every 0.5 litres of water used, but requires a ﬂow of more than 2 litres per minute. The total number of pulses generated in a sampling interval (typically a minute) is reported to an online server. Figure 5 shows a screenshot of the software that was developed to determine the accuracy of the event detection algorithm. Using the water meter data, the start of a water usage event was classiﬁed as a non-zero value detected after at least twozero values. The end of a water usage event was classiﬁed as two consecutive zero values following the start of an event. Two consecutive zeroes were chosen for water usage events that occur sufﬁciently close to one another to be considered as a single usage event. The water usage events registered by the water meter were compared to the events detected by the thermal system, to determine the accuracy of the algorithm in terms of detecting events and estimating their duration. The event detection algorithm was tested on 49 days of outlet temperature and water meter data sampled at a frequency of once per minute, from a 150 litre EWH with a 3 kW element installed in a residential household. Water usage events were classiﬁed into three categories according to the volume of warm water used: small events, which were less than 15 litres (10 percent of the EWH tank volume); medium events, which between 15 and 30 litres (between 10 and 20 percent of the EWH tank volume); and large events, which were greater than 30 litres (more than 20 percent of the EWH tank volume). The results of the algorithm are shown in Table I. TABLE I. R ESULTS OF EVENT DETECTION ALGORITHM # Detected # Missed # False Positives % Accuracy Small 48 6 Unknown 88 Medium 44 0 Unknown 100 Large 34 1 Unknown 97 Total 126 7 5 91 The results show that the algorithm was able to detect 91% of usage events successfully. Of the 7 events that were not detected by the algorithm, 6 of these were small usage events where less than 2.5 litres of water was used. These events were too small to cause a large enough increase in the outlet temperature and, hence, were not detected by the algorithm. The large event that was missed by the event detector was an event that occurred 7 minutes after another large water usage event. The temperature of the outlet had not decayed sufﬁciently after the ﬁrst event, which meant the increase in outlet temperature was below the detection threshold of 4C. However, the algorithm was able to correctly detect two large usage events that occur within 10 minutes of one another. False positives are events indicated by the algorithm where no warm water usage was registered by the water meter. Five such events were detected and are caused by one of two possible scenarios: a low ﬂow rate warm water draw that causes hot water to ﬂow through the outlet pipe but it below the minimum ﬂow rate required by the water meter (i.e. 2 litres per minute); low volume usage events that are less than the minimum volume of water that would cause the water meter to generate a pulse (i.e. 0.5 litres per pulse). The algorithm was also tested on 5 days data (separate to the 49 days with usage events) where the tank was heated but no usage events occurred. The outlet temperature on these days ﬂuctuated by over 4C due to changes in ambient temperature and no events were detected by the algorithm as these ﬂuctuations occurred over the course of the day and not over a small number of samples. The estimation of the duration is inaccurate for very short usage events (i.e. one minute events). This is because the temperature decay takes much longer than the rapid increase in temperature at the start of an event. Also, a minimum of 3 samples is required to create an event (i.e. a start event followed directly by a stop event) so the algorithm cannot accurately estimate the duration of the event if it is less than 2 minutes in duration. Additionally, the duration of longer events (i.e. greater than 10 minutes) is underestimated when smaller amounts of water are used towards the end of the event. For example, slight adjustments to the temperature of a bath after it has been ﬁlled. For these longer events, smaller amounts of warm water (typically less than 1 litre) are drawn from the EWH sev- eral minutes after the initial usage event. These small draws maintain the temperature of the outlet at a high level, causing the algorithm to incorrectly estimate the duration of an event. Sixteen such usage events were omitted from the 126 total events detected to produce the results shown in Table II. The results show that 79% of the 110 events considered have a duration estimation error of less than 2 minutes. Some longer events (between 7 - 10 minutes) had a higher estimation error of around 3 to 4 minutes. This is due to the more rapid decrease in the outlet temperature as a result of the warm water in the tank being replaced with cold water from the inlet pipe (which, in turn, travels through the outlet pipe) after a long period of usage. TABLE II. D URATION ESTIMATION ERROR RESULTS 0 minutes 1 minute 2 minutes 3 minutes >3 minutes Small 18% 29% 33% 16% 4% Medium 26% 47% 19% 3% 5% Large 15% 19% 23% 16% 27% Total 20% 33% 26% 11% 10% VI. F UTURE WORK The one-node EWH model implementation for the mobile application currently makes use of the warm water usage measured by the water meter to determine the amount of energy consumed by a usage event. The purpose of the event detection algorithm is to eliminate the need for the invasive and costly water meter and, therefore, the next version of the mobile application will include a drop down list for each detected event that will allow users to specify the type of event that was detected, to derive the volume used. Users are familiar with their daily routine and would, therefore, be able to select whether an event is a bath, shower or small warm usage event (e.g. washing dishes in a sink). Additionally, the duration of an event and the time of day at which it occurs can be used as an initial estimate of the event type. For example, a 5 minute event occurring between 6 and 8 in the morning is most likely a shower. Furthermore, the EWH model could then allocate a speciﬁc amount of energy that is typically required by a certain type of usage event. For example, a shower requires a warm water ﬂow rate of 7 litres per minute for a warm water temperature of 65C. Depending on the set temperature of the EWH, the ﬂow rate for a speciﬁc event could be scaled up or down to provide the required energy to produce a usage event using the ﬁrst law of thermodynamics [6]. This ﬂow rate can then be used by the one node model to determine the amount of energy consumed by a usage event when providing an estimateof the change in energy consumption of the EWH for various schedule and set temperature settings. VII. C ONCLUSION This paper presented a hardware and algorithmic solution that uses thermal transients at the outlet of an EWH to measure consumption patterns. The solution was tested using 49 days of data which included 127 usage events and was found to accurately detect usage events with an accuracy of 91%. However, the event duration is within 2 minutes accurate 79% of the time.This algorithm is only able to estimate the duration of events and has no means of knowing or estimating the volume of an event. The algorithm does, however, detect very small usage events (0.5 litres was detected successfully) and can be used to accurately determine hot water usage patterns for use in DSM. ACKNOWLEDGMENT The authors would like to acknowledge: Trinity Telecoms for their technical support and guidance, and providing access to the SMART M2M-enabling system; and MTN for their continued support and funding through the MTN Mobile Intelligence Lab.