Non-Intrusive Load Monitoring Based on Novel Transient Signal in Household Appliances with Low Sampling Rate

Nowadays climate change problems have been more and more concerns and urgent in the real world. Especially, the energy power consumption monitoring is a considerate trend having positive effects in decreasing affecting climate change. Non-Intrusive Load Monitoring (NILM) is the best economic solution to solve the electrical consumption monitoring issue. NILM captures the electrical signals from the aggregate energy consumption, feature extraction from these signals and then learning and predicting the switch ON/OFF of appliances used these feature extracted. This paper proposed a NILM framework including data acquisition, data feature extraction, and classification model. The main contribution is to develop a new transient signal in a different aspect. The proposed transient signal is extracted from the active power signal in the low-frequency sampling rate. This transient signal is used to detect the event of household appliances. In household appliances event detection, we applied to Decision Tree and Long Short-Time Memory (LSTM) models. The average accuracies of these models achieved 92.64% and 96.85%, respectively. The computational and result experiments present the solution effectiveness for the accurate transient signal extraction in the electrical input signals.


Introduction
Developing countries with rapid urbanization in high buildings construction and the high power demand are a reason for the need for conversation and efficient energy program.The program requires monitoring of customer appliances energy consumption in real-time.Using smart meter had led to NILM enables estimation of individual power consumption used for aggregate power consumption in energy management recently.
In the factory field, researchers are working on Factory Energy Management System (FEMS) for efficient electric energy use.In recently, FEMS has been linked with to the Cyber-Physical Systems (CPS) of Industry 4.0.And the related researches will be more significant in this area [1].At resident homes, NILM provides the households understand their consumption usage via a cost-effective real-time monitoring appliances system.The customers need giving up unwanted activities to avoid producing unnecessary energy consumption such as the appropriate appliances usage time and appliances usage optimization.These activities can be obtained showing to customers the consumption of each appliance in the sum of the total billing to detect excesses or malfunction [2].Furthermore, it could be possible notify users of possible savings in their billing electricity.In contrary to this, Kelly et al. [3] have argued that it is not proven yet that above activity and the additional feedback which become saving energy.In addition, there is an increase in micro-grids and renewable energy facility installation also continuous growth in recently.In purpose of increasing efforts these saving, automating energy measurement, energy monitoring, and the power management system are needed.In the load measurement of a power system, load monitoring has the main role that the process of acquiring and identifying the load [4].This load monitoring will determine the status of appliances and their consumption.Besides, it supports to understand the behavior of each load in the whole power system.There are two types of the load monitoring including Intrusive Load Monitoring (ILM) and Non-Intrusive Monitoring (NILM).
In ILM, the term "intrusive" means that there is the meter device in the resident house and close to the appliances to monitor.ILM deploys a measurement of the energy consumption of one or more household appliances using meter devices.In the ILM ecosystem, more low-end meter devices are needed.This makes hard to install, maintain, expand as well as expensive.In contrary to ILM, the term "non-intrusive" in NILM means that no extra equipment is installed in the house.NILM is a process which gives data from whole house energy consumption.This process includes installing a sensor device at the panel level and then the appliances will be inferred with being used.NILM preferred using than ILM because it is cheaper and easier installation.Instead of at least one-meter device per room, this technique requires only one-meter device for each energy entrance to the house.Energy disaggregation is another synonym for NILM.This technique estimates the power demand for each appliance from a single meter which contains the overall demand for several appliances.
A NILM system has three roles including capturing the signals from the aggregate consumption, extracting the feature uniquely from the load signal and classifying to identify which appliances are turned ON based on these features extracted.To identify the individual signature of each device, the NILM system requires several steps such as signal sampling (data acquisition), feature extraction based on signal analysis from the electrical signals.This paper presents a NILM framework including data acquisition, data feature extraction, and classification model.The contributions in this NILM study are: (1) propose a NILM framework, (2) collect the household appliances energy consumption data set in low-frequency sampling rate, (3) propose the algorithm to extract a new transient signal in low-frequency sampling rate, (4) improve the performance of NILM model in event detection as well as load identification.
The main contribution to be presented in this paper is a new approach to extract the transient uniquely.The proposed transient signal is extracted from the active power signal in the low-frequency sampling rate.This transient signal is used to detect the event of household appliances.Besides, an embedded board, Jetson TX2, is used to build the proposed NILM application system.This board has two roles to use in this research.The first role is to connect with the sensor to request and storage energy data (data acquisition).The second one is to build machine learning and deep learning models with high-performance training and testing.It is integrated Graphic Processing Unit (GPU) related to deep learning and its performance such as LSTM model.Furthermore, NILM Web application can be built for visualizing NILM result at this board.On the other hand, it can be replaced Jetson TX2 by other hardware that integrated GPU or normal personal computer (PC) without accelerated computing.Hence, the roles of Jetson TX2 is the same role with PC that integrated GPU to perform deep learning model.In summary, Jetson TX2 can connect to the sensor to storage data.Besides, it can build the machine learning, deep learning models, training, predicting and visualizing the result Jetson board or the PC has GPU with support high computation in a deep neural networks.
This paper is organized as follows.The next Section introduces the NILM system concept and presents a related literature works.In Section 3, a NILM framework is proposed.The core of this NILM framework is to propose the algorithm to develop a new transient signal from power signal in low-frequency sampling rate.The experimental setup is described and experimental results are presented in Section 4. Finally, conclusions and future works are drawn in Section 5.

Related Works
The initial NILM approach was proposed by Hart in 1990s [5].The author introduced the Non-Intrusive Appliance Load Monitor(NALM) is a software which was able to analyze single point electrical data and then obtained energy used correspond to individual electrical appliances.Figure 1 shows the first concept of general NILM.In recently, there are a number of studies have applied and extended this approach by using directly sampled which is increased the resolving power of the ∆P − ∆Q space such in [6,7].This approach has a limitation which cannot distinct appliances has similar in power signal and their operational principles, for example, hairdryer and iron.Hence, Laughman et al. [8] proposed another advanced solution.The capable of this idea based on the transient shapes of appliances to recognize individual load.Besides, they proposed the analysis of the spectral envelopes for continuously variable loads.However, they have not solved the electric noise of appliance usage yet.Therefore, Patel et al. [9] proposed a method to avoid the electric noise via combination software and hardware in household-level current sampling task at 1 MHz.They applied Support Vector Machine (SVM) model to trained the data to achieve accuracy at 90%.However, this technique has a limitation which requires high sampling rate with more kHz.Because of the meter device limitation, it is hard to apply in the real world environment.Furthermore, the need for an adjusting the prediction models on different data on training data is another drawback.The NILM algorithm needs to detect the appliance operation status (ON and OFF) from the power measurements.The NILM approaches can be classified as event-based or state-based based on different event detection strategies.
Event-based methods generated the state transient edges of appliances.This approach uses a change detection algorithm to determine the start and end of an event such in [10,11].The significant information needs to extract to identification the event has occurred, for example, appliance signatures such as active power, rising or falling edge etc.These extracted features are analyzed to detect the event based on the appliances and their power consumption estimated.The researcher [12] has used different classification methods such as K-Means, K-Nearest Neighbour (KNN), SVM, Hidden Markov Model (HMM) and HMM's variations to detect event appliance.However, the performance of the event-based approach is not high because of the fixed threshold in the change detection algorithm, the large noise, and the similar among steady state signatures.Furthermore, false positive rate or false alarm rate may arise in the detection of edges methods.
State-based methods do not base on event detection.The idea is how to determine each appliance operation based on a state machine which is a different state transient using usage pattern of appliances [13].When the appliance is turned ON/OFF or is changed running states, the method creates new state power signal through a probability distribution to match to the original power signal of the appliance.HMM and its variants [14][15][16][17] are used in state-based NILM.However, state-based approaches have several limitations.Firstly, the need for expert knowledge to set a prior value for each appliance by long training periods.Secondly, they have the complexity to compute [13,18].Finally, there is not a good way to handle states may stable unchanged for long time intervals [19].The requirement for an effective NILM algorithm is unique features or signatures have to characterize appliance behavior.Appliance signatures are a unique energy consumption pattern of all appliances.Ahmed Z., et al. [17] used appliance signatures to uniquely identify and recognized appliance operations from the aggregated load measurements.In feature selection, two main appliance features are used by NILM research to identify loads including steady-state and transient state [20].
Steady state is extracted when an appliance changes its running states related to sustained changes in power characteristics.The factors are used in this method including active power, reactive power, current, and voltage.The steady state signatures extraction of current and voltage do not demand high-end meter devices.Features at low frequency are used in the most commonly in steady state features in advance researches.However, the performance of this approach is limited by similarities among steady state signatures.In recently, deep neural network (DNN) in deep learning field becomes more attractive and widely system recognition applied in several areas such as handwritten recognition, speed recognition etc.Specifically, LSTM model is a kind of DNN model which is applied to classification applications have time series data.In NILM, this model is applied to load identification on the UK Domestic Appliance-Level Electricity (UK-DALE) dataset using active power by Kelly et al. [21].However, the author pointed out the performance limitation on the appliances have informative events in power signal can be many time steps such as washing machine.Besides, Kim et al. [22] applied LSTM model on the variant power signals are generated from active power in low frequency on several public datasets.This method overcomes the long gaps between event may present a challenge in LSTM.In future NILM works, LSTM model may become more and more promising and effecting learning method for researchers.
Contrary to the steady state features, before settling into a steady state value, transient state features are short-term fluctuations in current or power.To create transient feature uniquely, the authors [17] defined appliance state transients which are shapes, size, duration, and harmonics by sampling current and voltage waveforms at high frequency.Hence, these transient features can achieve signal uniquely to a high degree.Besides, they capture all operation cycles in high sampling rates in longer monitoring time [23].For example, Patel et al. [9] proposed a custom hardware built to detect the transient noise in range 0.001 kHz to 100 kHz frequency.Then, the authors used the fact that each appliance in-state operation transmits noise back to the power line.However, the high sampling rate required is the major drawback to obtain transient features such as current spikes, transient response time, repeatable transient power profiles, spectral envelopes, etc. [24].When using a high sampling rate, the system demands a costly hardware and complicated to be installed in the home to detect these transient features [24].The cause is smart meters report only low-frequency power.In the transient state analysis, the researchers [25,26] analyzed and captured the load signatures based on wavelet transform and transient energy algorithm.Artificial Neural Network (ANN) and HMM are used to improve the performance of NILM in these researches, respectively.Although the results were very much significant, there are still the little drawbacks.For example, the authors [25] sampled at high frequency for current and voltage waveform data to capture the transient effect.Nevertheless, doing this will increase the cost of energy meters because modern energy meters are not equipped with such functionality.Besides, the authors [26] used the data which have the repeatable transient energy signature for load identification because of the varying transient with these waveforms.Therefore, the sampling of the instantaneous load profile for each turn ON transient is required much diligence.In addition, the authors [27] applied the Wavelet Transform Coefficient (WTC) based on ON/OFF transient signal identification in data acquisition.Although WTC works better than Fourier Transform, WTC requires much longer computation time.Besides, it needs larger machine resource like memory usage.
In summary, the low-frequency or high-frequency data collected is used in classifying appliance recognition systems based on signature feature extraction.A low-frequency data sampling rate is implemented in without additional installation by using existing meter infrastructure.Contrary to this, high-frequency data sampling rate needs adding more hardware installing in data acquisition.Especially, the limitations of high sampling rate data acquisition are more expensive cost and more complex in signature database management [28,29].However, a more accurate and precise analysis can be provided with more information and assistance [30].Hence, using a low-frequency sampling rate is more promising in event detection appliances based on analysis the active power and/or reactive power.A new necessary technique of NILM has valid three most important factors to introduce into services for end-users.First thing is an ability to widely appropriately applied in household.The second thing is the usage of the low-cost device to retrieve the energy consumption.The third thing is able to recognition appliances with the same power signal and appliances with variable power signals in the low-frequency sampling data.Hence, in this work, new transient signal is extracted from the active power signal in the low-frequency sampling rate to overcome the problem in advance studies.

The Proposed NILM Framework
The proposed NILM framework is introduced in this Section.Figure 2 shows the proposed NILM system.The proposed NILM system includes several components such as energy stream data, sensing device MCP39F511 (Microchip Technology Inc., Chandler, AZ, USA), an embedded board Jetson TX2 (NVIDIA Corporation, Santa Clara, CA, USA), transient signal extraction and recognition, and energy monitoring and consumption prediction system.

Energy Stream Data
In data acquisition, several household appliances and the multi-tab power (HJ04009-10010C, KC Electric Company, Seoul, Korea) to collect energy data are prepared.Five appliances are collected including Air-purifier (LG Electronics Inc., Seoul, Korea), Fan (Cixi Xiongsheng Electrical Appliances Co., Ltd., Ningbo, China), Hairdryer (Korea Hanil Electronics, Seoul, Korea), LG monitor (LG Electronics Inc., Seoul, Korea), and Samsung monitor (Samsung Electronics Inc., Suwon, Korea).These appliances are connected to sensing device MCP39F511 via a multi-tab and the sensor's port.Table 1 describes models and power consumption of five appliances which are used to collect energy data.Besides, twenty test cases data are also collected.The purpose of testing data collection is to obtain variant transient signals of five appliances.Each test case corresponds to set up that require the number of appliances is different.To each appliance, four combinations between this appliance and 1, 2, 3, or 4 other appliances are create in this work.Therefore, each appliance has four different transient signals in this collecting process.The process to collect testing data includes two steps as follows.The first step is to turn ON simultaneously all appliances required for each test.The second step is to make one appliance transient by turn OFF and then turn ON while other appliances are still ON.Table 2 presents the process to collect twenty test cases in detail.

MCP39F511
The MCP39F511 is a power monitoring device that can measure input power in real time for the consumer, power distribution units, AC/DC power supplies.This sensor supports 2-wire serial protocols and Universal Asynchronous Receiver/Transmitter (UART)with enabling select full speed at up to 115.2 kbps.This sensor has a Power Monitor Demonstration Board which is a fully functional single-phase power.The system calculates and displays active power, reactive power, RMS current, RMS voltage, active energy (both import and export), and four quadrants reactive energy.MCP39F511 changes data acquisition mode compare to a conventional method.In the conventional method, data acquisition mode is getting energy data stored in registers by sending a command from PC.In this sensor device, the mode is getting energy data via connecting to Jetson TX2 (see Figure 3) via some steps as follows.

•
Step 1: Jetson TX2 sends a command to switch to single wire mode.This single wire mode includes twenty bytes such as Header Byte (0 × AB), Header Byte 2 (0 × CD), Header Byte 3 (0 × EF), Current RMSs with Byte 0 to Byte 3, Voltage RMSs with Byte 0 to Byte 1, Active Power with Byte 0 to Byte 3, Reactive power with Byte 0 to Byte 3, Line Frequency with Byte 0 to Byte 1, and final is check sum.

•
Step 2: Single wire mode is automatically sent whenever the sensing device updates energy data.

•
Step 3: The sampling rate is in 15 Hz (see Figure 4).
There is a coherent sampling algorithm to phase lock the sampling rate to the line frequency based on an integer number of sample per line cycle in the computation cycle of MCP39F511.After that, it reports all power output quantities at a 2 N number of line cycles.The power outputs include RMS current, RMS voltage, apparent power, active power.The accumulation interval is defined as an 2 N number of line cycles, where N is the value in the Accumulation Interval Parameter register.Equations ( 1)-( 5) system calculate and display RMS current (I RMS ), RMS voltage (V RMS ), Apparent power (S), Active power (P), Reactive power (Q), and Power factor as follows.
RMS current equation (I RMS ) with unit is Amps (A): RMS voltage equation (V RMS ) with unit is Volt (V): Apparent power equation (S) with unit is Volt-Amps (VA): Active power equation (P) with unit is Watts (W): In the MCP39F511, Reactive power (Q) with Volt-Amps-Reactive unit (VAR) is measured based on a θ-degree phase shift in the voltage channel.The common degree is 90-degree phase shift.Accumulator Unit (ACCU) acts as the accumulator where has the similar accumulation principles applied to Active power (P).In the Gain Reactive power register, Gain is corrected.In the Reactive power register, an unsigned 32-bit value is located which is the final output.P is measured by the formula below.
The ratio of P to S or Active power divided by Apparent power is Power factor (PF) measurement.

Jetson TX2
Jetson is the low-power embedded platform in the world's leading.Besides, it enables server-class AI to compute performance everywhere.Jetson's features include an integrated 256-core NVIDIA Pascal GPU, a hex-core ARMv8 64-bit CPU complex, and 8GB of LPDDR4 memory with a 128-bit interface.Figure 5 shows the CPU complex which combines a dual-core NVIDIA Denver 2 alongside a quad-core ARM Cortex-A57.
Table 3 shows  It is a necessary to configure the system for collecting energy data from the appliances.The stream energy data is calculated in the power sensing device (MCP39F511).When the embedded board (Jetson TX2) sends a power data request, the sensing device will transfer power data via a single wire mode transmission frame 15 times per second.After that, Jetson TX2's processor operates to sort data received from MCP39F511 and save the data result to database management (MongoDB).For instance, Figure 6 shows the system configuration diagram to collect data from five household appliances (Air-purifier, Fan, Hairdryer, LG monitor, and Samsung monitor).To collecting and storing the energy data, this paper proposes Algorithm 1.The algorithm consists of four steps as follows.

•
Step 1. Setting up serial connect from NVIDIA Jetson TX2 to MCP39F511 • Step 2. Checking frame with 20-byte frame • Step 3. Calculating power data including current, voltage, active power, reactive power, frequency

end if 14: end while
In this algorithm , it defines two functions.The first function is check_frame() to check frame with 20-byte frame in single wire mode.The second one is calculate_power_data() to measure energy data information in Root Mean Square (RMS).

Transient Signal Extraction and Recognition
Based on literature observation above, this paper states three problems needing solve as follows.This study selects active power factor which is a unique input in this approach.Figure 7 shows in detail of the proposed solution.The Figure 7a displays the process of this solution.The Figure 7b is to illustrate the process in Figure 7a  The main idea of this task is how to detect whether or not rising and falling signals from the active power signal.The rising signal means appliance is operating (ON state).The falling signal means appliance is changing state from ON to OFF.Sliding window size of time series data is used to trace power signal to detect changing signals.Hence, the performance of the changing detection algorithm does not depend on the fixed or adaptive threshold, the large measure noise, and similarities among steady state signatures.Figure 8 shows the changing signals from active power signal of the appliance.end if 14: end for 15: return S Algorithm 3 is to extract new transient signal from active power signal, denoted by T. T value is determined based on calculating prior P data (pre_data) and post P data (post_data).To assign pre_data and post_data values, the requirement is to use the window size w of P time series data and time shifting time series data of P is +1 for post_data value.The size of w depends on the sample size of P and periodicity of the data.To get smaller smoothing moving the average of time series data, there is an initialization of w value is 5. Hence, confidence intervals for the smoothed values are get.T signal extracted from this algorithm becomes to the input of Algorithm 4. If T value has negative value it means corresponding to P active power has falling signal, and then setting appliance's label is OFF event.In contrast to this, the active power has a rising signal, and then setting appliance's label is ON event.T ←− T | | T_sum 13: end for 14: return T In labeling task, this paper generates ON/OFF labeling by the proposed Algorithm 4. T signal and state of the appliances are extracted by Algorithms 2 and 3, respectively.They become to the input of this algorithm.The task of Algorithm 4 is to generate ON_label or OFF_label from T signal.This study defines threshold value is −5 which is a maximum threshold value to determine whether event status changing from ON to OFF event.If T value extracted at time t smaller than −5 it means that at that time has occurred event changing from ON to OFF.In case S variable has 0 value, it means that no event operation.If T value is smaller than threshold, it is assigned label is OFF_label; else it is assigned label is ON_label.OFF_label value or ON_label value of each appliance are different values.For example, there are two appliances including Air-purifier and Fan.This paper defines sets of ON/OFF labels of these appliances as follow.Labels of Air-purifier device are OFF_label=1 and ON_label=2.And labels of Fan device are OFF_label=3 and ON_label=4.For setting ON/OFF labeling values of each appliance and twenty-test cases data, this paper mentions the labels for testing data in next Section.end if 12: end for 13: return ON_OFF_label In the classification task, this paper evaluates the proposed method using the models in both Machine Learning (ML) and Deep Learning (DL) fields.For learning T signal and ON/OFF labeling signal, Decision Tree and Long Short-Term Memory (LSTM) models are selected in ML and DL, respectively.

•
Decision Tree is a supervised learning method.It is used in both classification and regression tasks.The input feature of this model is used to infer the output feature by learning simple decision rules.CART [31] (Classification and Regression Trees) is similar to C4.5, however, two different to C4.5 are it supports the regression task in numerical target variable and does not need to compute rule sets.This algorithm builds binary trees based on the feature and threshold with the largest information gain at each node.In a decision tree algorithm, it needs training vectors x i ∈ R n , i = 1, . . ., l and a vector y ∈ R l .This algorithm needs to recursively partition such that grouping the same labels in a group together.A feature f and threshold thre f , partition the data into T le f t and T right subsets are contained in each candidate split θ = (j, thre f ) The impurity is the choice of the classification or regression task.The impurity at j is calculated based on an impurity function H(j).
Select the parameters that minimizes the impurity is formulated by θ * as follows.
Recurse for subsets T le f t (θ * ) and T right (θ * ) reaching the maximum allowable depth, N j < min samples or N j = 1.In the classification task, the output classification represents a region R j with N j observations taking on value 0, 1, . . . ,K − 1, for node j.
be the proportion of class k observations in node j.I(.) is a spitting criterion that makes used of the impurity measure.
Common measures of impurity are Gini index which is calculated as follows.
• LSTM has been designed by Hochreiter and Schmidhuber in 1997 [32].LSTM is an elegant Recurrent Neural Network (RNN).The LSTM architecture is combined memory cells by replacing the regular units of the neural network.A memory cell consists of three gates: an input gate, a forget gate, an output gate and the state of memory cell is called cell state (Figure 9a).In particular, at the input gate, it allows incoming signal to alter the cell state or block it.On the other hand, the output gate can allow the cell state to have an effect on other neurons or prevent it.Finally, the forget gate can modulate cell state of the memory cell.Besides, it allows the cell to remember or forget its previous state as needed.The difference between LSTM and the original RNN is hidden units.In LSTM, the hidden units are replaced by LSTM cells.Figure 9b shows an architecture of LSTM having two input units, three LSTM cells as hidden units and three output units.The equations below describe how LSTM processes data.Assumption that X t = [x 1 t , x 2 t , x 3 t , ..., x n x t ] is an input vector and .., c n c t ] are hidden, output and cell vector, respectively.The elements of each vector are units for layers of LSTM.n x , n h , n c and n y are a number of each units.σ is the logistic sigmoid function, and i, f and o are the input gate, forget gate and output gate, respectively.The weight matrix superscripts have the obvious meaning.For example, W hi t is the hidden-input gate weight matrix and W xo t is the input-output gate weight matrix.b i t , b f t , b c t and b o t are bias terms at time t.First is to compute the value for f t , the activation of the forget gate.The output range of f t is from 0 to 1 and the output value will be multiplied by c t−1 when calculating c t .Therefore, f t means an activation rate of the previous cell state.
Second is to compute the value for the input gate i t .In common with f t , i t is the activation ratio of the input value x t .
Third is to compute the value for the cell state c t .Two factors are combined.The first factor is the previous cell state activated by the forget gate and the second factor is the input value activated by the input gate.
Final is to compute the value of their output gates and use it for the memory block output.
Equations ( 13)-( 17) are processed in one LSTM cell.After all process are done in the hidden layer, it can be calculated for the output units with the hidden vector H t .

Energy Monitoring and Consumption Prediction System
This is a web application to display the energy disaggregation results.This paper uses Node.js,Javascript, and HTML to build the user interface for NILM system.The results of classification are passed to energy monitoring system.

Experiments
This section points data preparation for experiment and experiment results in this approach.The results including T signals extracted and classification ON/OFF event.This study sets up the environment for implementation as following Intel R CoreTM i7-4790 CPU @3.60GHz; GPU: NVIDIA GeForce GTX 750 (NVIDIA Corporation, Santa Clara, CA, USA) ; RAM: 16GB and Operating System (OS) : Windows 10; the language programming in Python.
Besides, this paper uses confusion matrix (CM) to evaluate the approach classification model.CM includes four categories such as True Positive (TP), False Positive (FP), True Negative (TN) and False Negative (FN).This paper assumes that the positive event means an appliance is turned ON and when the appliance is turned OFF that it is the negative event.Hence, Recall, Precision, Accuracy, F1-score are calculated for evaluating the NILM model based on CM.Recall is a ratio of the number correctly classified to the total number of actual positive samples.
Precision is a ratio of the number of correctly classify to the total number of predicted positive samples.
Accuracy is a ratio of correctly classify to the total test data.
F1-score is the harmonic average of Recall and Precision.
Furthermore, this paper measures loss of NILM model using Loss function such as Mean Squared Error (MSE).
where Y t is the expected output of sample data, Y p is the predicted output of sample data by NILM approach model.

Data Preparation for Experiment
Five appliances data individual and twenty test cases are collected and saved in *.csv files.As mentioned in the previous Section, this paper selected active power data for input feature in the experiments.Figure 10 illustrates the active power signals from five active power data of five appliances.In testing data, this paper named twenty-test cases data files following in Table 4. Besides, this paper plotted twenty active power signals from twenty test cases in Figure 11.

State of Appliance, Transient Signal and ON/OFF Label Results
Firstly, this paper determined and declared ON/OFF label value to use in Algorithm 4. Tables 5  and 6 show ON/OFF labels for five appliances and twenty test cases, respectively.Secondly, this paper implemented Algorithms 2 and 3 to extract State of the appliance and T signals, respectively.After that, the Algorithm 4 are implemented to label ON/OFF based on each T signals from five appliances and twenty test cases data.The left, middle, and right of Figure 12 are State S, T and ON/OFF_label signals obtained from five appliances data, respectively.From observing these T signal results in this figure, this paper can determine the number of changing status of event ON/OFF in each appliance.There are two, three, three, five, and four times changing status from ON to OFF corresponding to air-purifier, fan, hairdryer, LG monitor, and Samsung monitor.
In summary, this paper recognizes that when T signal changes the value from positive to negative value and smaller than − 5, the event ON/OFF on device will occur.In particular, when the T signal obtains positive values, it means that the appliance is operating (ON).Contrast to this, the appliance switches to OFF.
For visualizing the results of twenty test cases, this paper pointed the S, T, and ON_OFF label results of test 1 to test 4 in Figure 13.Besides, the S, T, and ON_OFF label results of test 5 to test 20 are plotted in Figures A1-A3 at Appendix A, respectively.Table 7 is classification report for each event detection of five appliances using other performance metrics such as precision, recall, F1-score.The average accuracy of event detection model on these appliances data obtained 93%.
where pr is predicted output and ex is expected output.

Applying the Proposed Method on a Publicly Available Dataset
There are several NILM available datasets such as Building-Level fUlly-labeled dataset for Electricity Disaggregation (BLUED), UK-DALE, Residential Energy Disaggregation Dataset (REDD), The Almanac of Minutely Power dataset (Version 2) (AMPds2) etc.This paper applied the proposed method on AMPds2 [33] dataset which is low sampling rate data.Although several data file formats are published such as Original file format, Tab-delimited, Rdata format, Variable metadata, etc.The original file format in CSV is used in this paper.In this dataset, there are 19 appliances data in isolation have already collected and tested in electricity data.There are no publicly aggregated data between the loads in this dataset.Therefore, this paper only performed and tested on individual load.Among available loads, 5 appliances data are randomly selected to use in this experiment.These appliances are Master and South Bedroom, Basement Plugs and Lights, Instant Hot Water Unit, Entertainment: TV, PVR, AMP, Kitchen Fridge.Besides, ON/OFF label value are determined and declared from 1 to 10 corresponding to each appliance.The information of these appliances and their ON/OFF labels are described in Table 10 as follows.
Table 10.Five appliances information in AMPds2 dataset selected [34].About processing dataset, in this dataset, there are 11 electric data features in each appliance data.Timestamp (TS) feature is Unix timestamp value in this dataset.Electricity measurement is at one minute intervals.This dataset was collected to total of 1,051,200 readings per meter for 2 years of monitoring from 2012 to 2014.Therefore, these loads data are big dataset.In testing performance of the presently proposed methodology, the range of TS in the first 500 readings/samples value data from 1333263600 to 1333323540 is selected.This range of TS value is converted to Universal Time Coordinated (UTC) corresponding to the date time range from 2012-4-01 7:00 a.m. to 2012-4-01 15:19 p.m.The total of time series data is 500 min.Because real power P is active power data, hence P is selected for the input data in the experiment.Figure 17   About feature extraction result, this paper applied the proposed solution to generate and extract S, T, ON/OFF label signals of each appliance.Figure 18 illustrates these results of each appliance.About classification result, this paper applied two approached learning models on this selected dataset.

•
In ML, the classification result of Decision Tree model is presented in Figure 19.Furthermore, Table 11 presents the event detection results in detail of this confusion matrix result.The average classification performance of Decision Tree model on this dataset achieved 98.6% accuracy and loss rate was 0.488.In summary, the presently proposed method achieved high-performance accuracy for load identification on the AMPds2 dataset with over 96% accuracy on both approached learning models.

Conclusions and Further Works
This study built a complete NILM framework including data acquisition, appliance feature extraction, classification data and monitoring energy data.First, this paper collected the personal NILM data in low-sampling rate including five household appliances energy data and twenty tests case data in the data acquisition task.Secondly, state of the appliance and transient signals are extracted to generate ON/OFF label on personal data in feature extraction task.The proposed transient signal is a transient signal to detect ON/OFF event of appliances.Thirdly, two models in ML and DL fields are stated to detect event on loads.In particular, the Decision Tree model and LSTM model are applied to perform two classification models with average accuracies achieved 92.64% and 96.85%, respectively.Finally, in monitoring energy data, a website platform system are developed to display the results of load identification.Besides, the proposed method is applied on a publicly available dataset, AMPds2.Both approach models obtained over 96% on this sub-data.In future work, this solution can be applied to extract transient signal on other publicly available datasets to widely apply the proposed methodology.

Data Availability
The household appliances energy consumption data set was downloaded from the figshare repository with DOI https://figshare.com/articles/NILM_EnergyData/7269692, and other data generated or analyzed during this study are available from the corresponding author on reasonable request.

Figure 1 .
Figure 1.The first concept of NILM based on a single point measurement by Hart [5].

Figure 4 .
Figure 4.The low sampling rate format data collected in 15 Hz of Air-purifier device.

Figure 6 .
Figure 6.System configuration diagram collection data.

Problem 1 .
Analyzing and extracting new transient signal from original power signal in low sampling rate data in feature extraction.Problem 2. Labeling ON/OFF data on new transient signals extracted.Problem 3. Improving the performance for event detection as well as load identification using a new transient signal results and machine learning/deep learning models.
, respectively.The proposed method includes three processes, such as feature extraction, labeling, and classification.The first, the feature extraction task is to generate the state of the appliance and to extract the transient signal of appliances.The second, labeling task is to label ON/OFF data with state and transient signals of appliance after extracting.The final, classification task is to learn and classify the ON/OFF appliance based on the transient signal and ON/OFF label signal.

Figure 7 .
Figure 7.The proposed technique for transient signal extraction and recognition.(a) The proposed concept; (b) The illustration of the proposed process.In feature extraction task, to label ON/OFF for appliance data, this work generates two signals including State of appliance signal and Transient signal.Hence, this paper proposes two algorithms, Algorithms 2 and 3.The main idea of this task is how to detect whether or not rising and falling signals from the active power signal.The rising signal means appliance is operating (ON state).The falling signal means appliance is changing state from ON to OFF.Sliding window size of time series data is used to trace power signal to detect changing signals.Hence, the performance of the changing detection algorithm

Figure 8 .Algorithm 2
Figure 8.The analysis of active power signal with rising and falling signal.Algorithm 2 is to generate State of the appliances, denoted by S. S value extracted is used for the input of Algorithm 4.

Figure 14 .
Figure 14.Confusion matrix of Decision Tree model for classification ON/OFF label.

Figure 15 Figure 15 .Figure 16 .
Figure 15 presents the results of LSTM model for classification ON/OFF of five appliances data.Besides, LSTM model's results on test 1 to test 4 data are shown in Figure 16 and the others tests' results in Figure A4 at Appendix A. The average accuracy of LSTM model obtained 96.85% for detecting ON/OFF appliances.The loss of LSTM model (RMSE) obtained 0.60632.
visualizes five real power P signals time series data were selected.

Figure 17 .
Figure 17.Active power signal of appliance data: (a) Master and South Bedroom; (b) Basement Plugs and Lights appliance; (c) Instant Hot Water Unit appliance; (d) Entertainment: TV, PVR, AMP appliance; (e) Kitchen Fridge appliance.

Figure 18 .
Figure 18.State S, T & ON/OFF label signals of 5 appliances: (a-c) Master and South Bedroom device; (d-f) Basement Plugs and Lights device; (g-i) Instant Hot Water Unit device; (j)-l) Entertainment: TV, PVR, AMP device; (m-o) Kitchen Fridge device.

Figure 19 .
Figure 19.Confusion Matrix of Decision Tree model for classification ON/OFF label on five appliances data in AMPds2.

Figure 20 .
Figure 20.Classification results of LSTM model on 5 appliances data selected in AMPds2: (a) Master and South Bedroom; (b) Basement Plugs and Lights appliance; (c) Instant Hot Water Unit appliance; (d) Entertainment: TV, PVR, AMP appliance; (e) Kitchen Fridge appliance.

Table 1 .
Specifications of five appliances.

Table 2 .
Twenty tests data information.
[Air-purifier, LG monitor, Samsung monitor, Fan, Hairdryer] are ON simultaneously.Turn OFF and then turn ON [Air-purifier] while the other appliances are still ON. 2 Test 2 [Air-purifier, LG monitor, Samsung monitor, and Fan] are ON simultaneously.Turn OFF and then turn ON [Air-purifier] while the other appliances are still ON. 3 Test 3 [Air-purifier, LG monitor, Samsung monitor] are ON simultaneously.Turn OFF and then turn ON [Air-purifier] while the other appliances are still ON. 4 Test 4 [Air-purifier and LG monitor] are ON simultaneously.Turn OFF and then turn ON [Air-purifier] while the other appliance are still ON. 5 Test 5 [Fan and Air-purifier] are ON simultaneously.Turn OFF and then ON [Fan] while the other appliance are still ON.6 Test 6 [Fan, Samsung monitor, and Air-purifier] are ON simultaneously.Turn OFF and then ON [Fan] while the other appliance are still ON.7 Test 7 [Fan, Samsung monitor, LG monitor, Air-purifier, and Hairdryer] are ON simultaneously.Turn OFF and then ON [Fan] while the other appliance are still ON.8 Test 8 [Fan, Samsung monitor, LG monitor, and Air-purifier] are ON simultaneously.Turn OFF and then ON [Fan] while the other appliance are still ON.Turn OFF and then turn ON [LG monitor] while the other appliance are still ON.15 Test 15 [LG monitor, Samsung monitor, and Fan] are ON simultaneously.Turn OFF and then turn ON [LG monitor] while the other appliance are still ON.16 Test 16 [LG monitor and Samsung monitor] are ON simultaneously.Turn OFF and then turn ON [LG monitor] while the other appliance are still ON.

Table 2 .
Cont.Hairdryer, Fan, Samsung monitor, LG monitor, and Air-purifier] are ON simultaneously.Turn OFF and then turn ON [Samsung monitor] while the other appliance are still ON.18 Test 18 [Samsung monitor, Fan, LG monitor, and Air-purifier] are ON simultaneously.Turn OFF and then turn ON [Samsung monitor] while the other appliance are still ON.19 Test 19 [Samsung monitor, LG monitor, and Air-purifier] are ON simultaneously.Turn OFF and then turn ON [Samsung monitor] while the other appliance are still ON.20 Test 20 [Samsung monitor and Air-purifier] are ON simultaneously.Turn OFF and then turn ON [Samsung monitor] while the other appliance are still ON.

Table 4 .
Twenty-test cases data file name.

Table 5 .
Labeling ON/OFF for each appliance.

Table 6 .
Labeling ON/OFF for twenty test cases.

Table 7 .
Classification result for event detection ON/OFF of each appliance.Table8pointed the average performance of the approached model.The performance classification of our approach model achieved 92.64% and loss rate was 1.67.

Table 8 .
Classification result of Decision Tree model on energy data.
•In DL, LSTM model is used for classification ON/OFF event of appliances.Similar to Decision Tree model, this paper used T signals and ON/OFF labeling for input and output features, respectively.For testing data, this research also used twenty T signals of twenty tests data.Setting up hyper-parameters of LSTM model are described in Table 9 as follows.

Table 9 .
Hyper-parameter of LSTM model in the approach.To evaluate LSTM model, this paper uses accuracy metric and Root Mean Square Error (RMSE) for measuring performance and loss of the model, respectively.RMSE is the standard deviation of the residuals (prediction errors).The formula to calculate RMSE is as follows.

Table 11 .
Classification result for event detection ON/OFF of each appliance in AMPds2.In DL, the classification result of LSTM model obtained 96.78% accuracy and RMSE was 0.5124.Figure20illustrates the predicted results ON/OFF label of 5 appliances compare to the expected outputs.