Energy Management and Event Detection in Heater System for Safety Application

—In this article a method of analyzing and notification about an event in water heater is seen. Temperature, water flow and power consumption are main parameters for indication of alert data. For analyzing and the event detection data from the real-time measurement system is compared to the statistics from Influxdb, the temperature data was analyzed. The statistics in Influxdb is changing through the time by Moving Window function. The comparison of data from the real-time measurement system and Influxdb is performed with Gaussian distribution and applying of 3-sigma rule. Data which is indicated as not common and dangerous detects as the event. Information about the event detection is sent to the customer by email using Gmail service. As a result, the Gaussian distribution was built and the algorithm for the sending the message was written.


INTRODUCTION
New energy management systems have a lot of branches of improving and developing effective methods for energy using. One of the perspective of such methods is-informing about alert situations in the private residences which are occurred by power consumption and conterminal admeasurement in the house using water heater [1], [2]. In this article, the path that allows to inform the recipient's system in the residence about the alert event in heater system`s data has been constructed, between measurement and client system. In order to perform the aim of indicating and informing client about an alert, the system of data-collection, data-statistic, data-analysis, event detection and recipient informing were constructed.

II. DATA COLLECTION
Measurement system of the water heater has different type of data. For this type of analysis. Only few data subjects which are the most interesting in alert indication are taken: Temperature data in heater system are taken through temperature sensors and sent to the database by Raspberry.Pi.
For the data collection of water heater in the house the copy of the measurement system presented by Raspberry.Pi was used [3] which give an opportunity to work with measurements in straight way in Influxdb. It is automatically decreased the delay in the processing time and gives better platform for future improving of an alarm system, possible additions to the data collection process and works which based on the data from heater system in real-time and state data.
Data collection and analysis divided into two databases: • Data in real-time with which the analysis is made -Raspberry.Pi ( Fig. 1) • Data in which analysis is based, Influxdb [4] -Influxdb ( Fig. 1) At the Fig. 1, you can see the visual diagram of approach of data collection after which there are two branches. First one is the data from measurement system, and the second one is Influxdb.
For data-base in which data for analysis based Influxdb is used. The energy management system should indicate overflow of energy usage and generation amount for the optional operation of databased on the measured energy amount [5]. For this purpose data from measurement system are saved to the state file which will be charged or discharge with data from measurement system. This process performed with Influxdb and window function for data in real-time. So, when the new data is coming to the document the last one will be deleted [6]. For a sample i x the mowing window function will be: ,..., ,..., , where H and J are non-negative integers specifying the number of samples to include before and after the sample i x [6], after all of necessary performances with data, the window is shifted by one sample to 1 i x + . For the data from water heater shifting is each 5 sec or 25 samples.
Copyright (c) 2020 Охмак В. М. The approach of dividing databases in two part prevents bugging and minimize processing time. Of course, it takes more space in the storage, but by adding window's property the space is approximately defined and are not increasing with time.

III.
DATA STATISTIC In this part the statistic of the data from measurement system is built. The method of finding state that might be an alarm is sufficiently the same to the Threshold method presented in [7], Fig. 1.
The statistic of data presented by Gaussian (normal) distribution. Gaussian distribution is widely used for natural phenomena and statistics, in order to describe repetitive pattern of data [8]. The Gaussian distribution is represented by the following expression: The first step for preparing Gaussian distribution for the temperature is the indication of mean of the sequence of data. For this project it is moving average because the data set is changing through time. It is important because the mean indicates the results that meets with the biggest probability. After indication of mean, the next step is accomplishing the thresh value of data, in our case it is data which are out of 3sigma range. This approach is based on 3 sigma rule, detailed information about 3 sigma rule can be found in [9].
After applying formulas (3) and (4) to the large scale of data, statistics could be built. At the Fig. 2, you can see Gaussian distribution for data from Influxdb of water heater, p (t)the prohibition of temperature. Red point are indications of +/-3sigma.
The indication of issue in the system or alert is simple: if data from measurement system is out of range of mean +/-3 sigma of Influxdb, it will be indicated as unacceptable situation and automatically will be performed in the next step of alarm notification.
For water flow and power line the first point of alarm indication which equal to mean-3sigma are changed to 0 value, depending of nature of this data .Influxdb will help in building large range of available databased on measurement system.

IV. EVENT DETECTION
Missing data, critical cold or hot temperature, big water or power consumption in line, all of this event could be in the real heater system. Control system and customer should be notified about this. At the Fig. 3, you can see how the information is indicated.
Event detection is performed trough block Analysis in visual diagram Fig. 3. The data in real-time is compared with data from statistic in Influxdb [10] if any of incoming data are indicated as an event the information going to be computed ahead in the next step.
System sends an email to recipients with large description about an event. For that process Gmail service was chosen. It is large system with good protection and wide range of improving this path in the future. As an example system could be improved by adding notification to the service of the house, and instantly removed.

Електронні системи та сигнали
Copyright (c) 2020 Охмак В. М. Simplification of house routine can bring improving to any conformation. The Energy management system reads, saves, makes statistic and analysis on saved data, indicate alarm and notify system about that. Following by code it sends message to the recipient with all needed data and information about system. The result was that the message has been sent.