A Fusion Load Disaggregation Method Based on Clustering Algorithm and Support Vector Regression Optimization for Low Sampling Data

: In order to achieve more efﬁcient energy consumption, it is crucial that accurate detailed information is given on how power is consumed. Electricity details beneﬁt both market utilities and also power consumers. Non-intrusive load monitoring (NILM), a novel and economic technology, obtains single-appliance power consumption through a single total power meter. This paper, focusing on load disaggregation with low hardware costs, proposed a load disaggregation method for low sampling data from smart meters based on a clustering algorithm and support vector regression optimization. This approach combines the k-median algorithm and dynamic time warping to identify the operating appliance and retrieves single energy consumption from an aggregate smart meter signal via optimized support vector regression (OSVR). Experiments showed that the technique can recognize multiple devices switching on at the same time using low-frequency data and achieve a high load disaggregation performance. The proposed method employs low sampling data acquired by smart meters without installing extra measurement equipment, which lowers hardware cost and is suitable for applications in smart grid environments.


Introduction
With energy consumption growing year after year, carbon emissions have become an important issue for many countries.In order to considerably reduce their annual carbon emissions by 2050, energy conservation has been a national important aim.For this reason, current electricity infrastructure is transitioning to smart grid, in which information flowing between energy generation and consumption points is obtained from dedicated devices called smart meters.As popular electricity measuring devices, smart meters will be collecting vast amounts of electricity consumption data.However, the data from smart meters are mainly household total electricity use, and the energy consumption of a single appliance will remain unavailable.For market utilities, detailed electricity information can improve the power grid planning scheme and ensure the safe and economic operation of power grids by load forecasting.In addition, elaborate feedback of appliances' consumption creates more savings in electricity [1,2] for consumers.Non-intrusive load monitoring (NILM), which disaggregates a household's aggregate electricity consumption to individual appliance [3], has been greatly developed.
The NILM approach research focuses on two issues.The first is the feature sets adopted to identify appliances.A variety of features have been extracted and applied, such as the apparent power [4][5][6][7][8], current and voltage [9], active and reactive power [10,11], the power phase angle and power factor.Current features include transient and steady-state features.Steady-state features are observed when a state transition of appliances has been completely over, and transient features are extracted when a state transition is in progress.As higher sampling rate data of kHz are required, transient features need more complex and costly hardware equipment [12].Except for the time domain features above, Fourier analysis and combination with other features of the time domain are used to identify appliances [13][14][15].Discrete wavelet transforms of power were employed in References [16,17] and Reference [11].
The second issue for NILM is learning algorithms applied to NILM.In literature, k-nearest neighbor (k-NN) [18,19] and neural networks [14,20] are widely applied to aggregate total consumption.Decision trees were used in References [21] and [16].Support vector machines have mainly been used as classifiers [22][23][24].The naïve Bayes classifier is occupied to identify the different combination value of various appliances [25].In recent years, deep learning based approaches have worked to load disaggregation [26,27].In addition, a similarity measure between two sequences plays an important role in classification [28].Dynamic time warping (DTW) has been employed to measure similarity, which can overcome time distortion [29].
To that end, although the existing NILM methods have achieved a good effect, there are still many problems discussed in recent works.The first, NILM technology using transient or high-frequency steady-state features, requires additional hardware equipment installed [30], which leads to high hardware cost.Smart meters are able to read 10-second resolution data.Thus, using electricity consumption data in 10-second resolution or even more is a benefit for the industrialization of NILM technology.
Secondly, event-based methods in literature are not suitable for features from low sampling rate data [5,8,9], because overlapping events inevitably happen, and the events of low power consumption appliances are difficult to detect due to the power variety of high-power consumption appliances.Factorial hidden Markov models (FHMM) have been used to solve the problem [31].However, FHMM needs prior distribution and has high computational complexity of the algorithm [32] for multi-state appliance.
The third problem to NILM methods is the poor power estimation accuracy caused by the power variety of appliances when operating.Generally, average powers are considered as the estimation value of power [9].Due to the complex components of electrical appliances, their power consumption shows pattern characteristics.In literature [32], DTW is used to estimate appliance consumption trajectories.
In this work, we considered the above three problems and propose a fusion load disaggregation method for low sampling data from smart meters.The combination of the K-median algorithm and DTW were used to identify the operation states of appliances and then estimate the power using optimized support vector regression (OSVR) according to the consumption pattern feature of the appliance.In literature [33], SVR estimates the power proportion of constant power loads to constant impedance loads.As an important branch of support vector machines (SVM), SVR was applied to NILM a few times.However, it has seldom been used to estimate power consumption.The proposed method is suitable for low sample data scenes and requires low computational complexity (only active power being used).
We developed a series of experiments to test the performance of our proposed method.We provide performance comparisons against the literature using the FHMM method and the approach using DTW, having analyzed the sensitivity of the proposed algorithm with the number of sample feature, proving that OSVR is better than SVR for power estimation.The remainder part of this paper is organized as follows.In Section 2, we describe our proposed method.We discuss our experiment setting and evaluation metrics in Section 3 and report the experimental result in Section 4. Finally, a summary conclusion is offered in Section 5.

Proposed Method
Home electrical appliances consist of complex components.After studying the power consumption characteristics of some typical devices, we found that every kind of everyday appliances shows a similar and unique power trend over time when operating.Even multiple devices with similar power have a special consumption pattern.Based on the above fact, we made the assumption that each appliance has its own consumption pattern and can be identified through the pattern.
Our approach includes three steps.At first, we extract power consumption pattern signatures of each appliance contributing to the total power, which will be used to estimate the power value of each appliance.Then, the aggregation powers are clustered, and the cluster with high power level is identified and retrieved.Finally, the result from last step is adjusted.The latter two steps are iteratively executed until every appliance is handled.The flowchart of the proposed method is shown in Figure 1.We detail the method in the following sections.setting and evaluation metrics in Section 3 and report the experimental result in Section 4. Finally, a summary conclusion is offered in Section 5.

Proposed Method
Home electrical appliances consist of complex components.After studying the power consumption characteristics of some typical devices, we found that every kind of everyday appliances shows a similar and unique power trend over time when operating.Even multiple devices with similar power have a special consumption pattern.Based on the above fact, we made the assumption that each appliance has its own consumption pattern and can be identified through the pattern.
Our approach includes three steps.At first, we extract power consumption pattern signatures of each appliance contributing to the total power, which will be used to estimate the power value of each appliance.Then, the aggregation powers are clustered, and the cluster with high power level is identified and retrieved.Finally, the result from last step is adjusted.The latter two steps are iteratively executed until every appliance is handled.The flowchart of the proposed method is shown in Figure 1.We detail the method in the following sections.

Power Consumption Pattern Signatures Extraction
When a kind of appliance is running, an integral duration includes a number of power states with different power level.In this section, we extract the power pattern signatures of each appliance during operation.The signatures are to be used to label the appliance after total power is clustered, and to retrieve the power via SVR training.Considering the need to minimize the intrusiveness and the impact of human activity on the power pattern, a week was taken into account.During the training period, several integral operation durations were extracted of each appliance contributing to the total power.After removing the trace noise by ignoring power value less than a threshold, each signature time series was spitted into a number of segments according to power states level (according to the operation modes of the appliance, different modes of a single appliance are recognized as multiple appliances [3]).The time series segments will be applied later.

Power Consumption Pattern Signatures Extraction
When a kind of appliance is running, an integral duration includes a number of power states with different power level.In this section, we extract the power pattern signatures of each appliance during operation.The signatures are to be used to label the appliance after total power is clustered, and to retrieve the power via SVR training.Considering the need to minimize the intrusiveness and the impact of human activity on the power pattern, a week was taken into account.During the training period, several integral operation durations were extracted of each appliance contributing to the total power.After removing the trace noise by ignoring power value less than a threshold, each signature time series was spitted into a number of segments according to power states level (according to the operation modes of the appliance, different modes of a single appliance are recognized as multiple appliances [3]).The time series segments will be applied later.

Aggregation Power Clustering and Appliance Identification through DTW
As we mentioned in the previous sections, each turned-on appliance contributes to the total power; the larger the contribution, the greater the impact is on the aggregation power.Therefore, clustering the values in total power time series, the largest contribution appliance will be the first division.
Given time window length p, we measured the total power readings, and the set of p samples is represented as x 1 , x 2 , . . ., x p .Then, the total power readings were divided into k clusters via the following simple version of K-median clustering [34]: where C i is the set of total power readings in the i-th cluster and c i is the median of the values in C i .
The value of k is determined by the minimum sum of the interclass distance.When k changes from 2 to 10, the total power values are clustered into k class, and the sum of the interclass distances is calculated, respectively.The k value corresponding to the minimum sum of the interclass distance is obtained.The largest contribution to total power makes the largest total power values, so the cluster with the maximum cluster center is when the largest contribution appliance is running.Finding the cluster C i with the maximum cluster center, each C i subsequence is taken from the time series, then the DTW distance between these subsequences and the signatures of each appliance are respectively calculated according to literature [35] to give the similarity of the two trajectories.As a larger DTW distance means a lower similarity, the subsequences are respectively labeled according to the DTW distances.

Power Retrieve
We received several total power consumption trajectories when the appliance with the largest power contribution was operating.Then, we used SVR to retrieve the power of the highest contribution appliance in the time window and then adjusted the result.
Support vector machines (SVM) were first introduced in 1992 [36].As one of two categories of support vector machines, a version of SVM for regression (SVR) was proposed by Vapnik [37].The parameters c and g have a large impact on the predicted results of the SVR model.Parameter c is the penalty factor.The higher the c, the lower the tolerance of error is, and overfitting is easy to happen.The smaller c is, the easier underfitting is.This means that the generalization ability is poor if c is too big or too small.Parameter g comes with an RBF (Radial Basis Function) as the kernel.The larger the g, the fewer the support vectors, and the smaller the g, the more the support vectors.The number of support vectors affects the speed of training and prediction.Genetic algorithms [38] are used for parameter c and g selection to optimize the SVR to estimate the power trajectory of the appliance.
In our paper, the power values of signature segments split in Section 2.1 were numbered from 1 min, and each signature segment represented the duration of an appliance.For example, the power values of signature segments of a refrigerator in an operating cycle are as follows: [ As each appliance has its own consumption pattern, the SVR model can use it to realize power estimation.We adopted time number in the above example to train the model.In order to improve the performance of the SVR model, the genetic algorithm was used to select c and g.The flowchart of optimized SVR (OSVR) is shown in Figure 2.

Result Correction
As the power estimated errors of the first appliance affect the next clustering and recognition, the current result is adjusted based on backtracking thinking.We considered the following situations: 1. Check the current total power time sequence, and negative values are considered estimation errors.In order to correct the estimation errors, the negative value was set as the average of the two numbers before and after it, and the estimation value was adjusted accordingly.
2. If the subsequence obtained after clustering was truncated by a few values which had been estimated formerly, these values were considered estimation errors.
3. The values, identified as multiple simultaneously operating states of the same appliance, were considered estimation errors.
We needed to correct the values to match right cluster for situation 2 and 3.The values were modified into the average value of their neighbor.

Data
We chose the AMPds (Almanac of Minutely Power dataset) [39] to test our proposed method.
AMPds contains power consumption readings in a single house in Canada over a long of time ( 2years) and provides metered data at the end-use level at 1 min resolution.We considered several typical indoor appliances, including the heat pump, clothes dryer, dish washer, and fridge.Since the measurement data of these appliances were given separately in AMPds, they were suitable for validating our method.As our algorithm does not apply to normally-open appliances (always in ON state), we did not take into account the normally-open appliances and undefined reading.The aggregation powers were attained by summing the powers of each appliance at the same time.The average powers for testing appliances were obtained by statistics as shown in Table 1.
Due to the possible seasonality effects on power consumption, we would like to extract the training and testing periods in the same season with a similar climate condition.As mentioned in  The newest total power time series were obtained by subtracting the retrieved power subsequence by SVR from the total power time series.Repeat the process in Section 2.2 until all the appliances are retrieved.

Result Correction
As the power estimated errors of the first appliance affect the next clustering and recognition, the current result is adjusted based on backtracking thinking.We considered the following situations: 1.
Check the current total power time sequence, and negative values are considered estimation errors.In order to correct the estimation errors, the negative value was set as the average of the two numbers before and after it, and the estimation value was adjusted accordingly.

2.
If the subsequence obtained after clustering was truncated by a few values which had been estimated formerly, these values were considered estimation errors.

3.
The values, identified as multiple simultaneously operating states of the same appliance, were considered estimation errors.
We needed to correct the values to match right cluster for situation 2 and 3.The values were modified into the average value of their neighbor.

Data
We chose the AMPds (Almanac of Minutely Power dataset) [39] to test our proposed method.AMPds contains power consumption readings in a single house in Canada over a long of time (2 years) and provides metered data at the end-use level at 1 min resolution.We considered several typical indoor appliances, including the heat pump, clothes dryer, dish washer, and fridge.Since the measurement data of these appliances were given separately in AMPds, they were suitable for validating our method.As our algorithm does not apply to normally-open appliances (always in ON state), we did not take into account the normally-open appliances and undefined reading.The aggregation powers were attained by summing the powers of each appliance at the same time.The average powers for testing appliances were obtained by statistics as shown in Table 1.Due to the possible seasonality effects on power consumption, we would like to extract the training and testing periods in the same season with a similar climate condition.As mentioned in Section 2.1, we extracted a week's data from April 1st 2012 to April 7th 2012 for SVR training, and we chose several weeks' data in different seasons for validation, which were the week from April 8th 2012 to April 14th 2012 (period 1), from June 1st 2012 to June 7th 2012 (period 2), and December 1st 2012 to December 7th 2012 (period 3).
The length of the time window was set to a day (1440 min).When retrieving, we chose the segment with same length and similar average active power as that of the OSVR training data.Since power values of all the appliances in our tests were greater than 30 watt, the noise threshold was set to 30 watt.

Performance Evaluation Metrics
The performance evaluation of disaggregation algorithms has been one of the main challenges of NILM.It is important to produce a complete evaluation.However, much of the literature focuses on the accuracy of on/off detection [9,25,29], and only few studies considered the retrieving appliances' consumption information.We adopted a set of metrics introduced in the literature [32].The set includes the following metrics: F-score, evaluating the capability of NILM algorithms on operation state detection of appliance i, with ranges from 0 (0% accuracy) to 1 (100% accuracy): where PC i and RC i are the recall and precision for appliance i, which are described as follows: where TP i is the number of examples correctly labeled as ON state (true positive), FP i means OFF state examples incorrectly labeled as ON state (false positive), and FN i represents the ON state ones labeled as OFF (false negative).
The PCE (power contribution error) estimates the power consumption contribution of each appliance according to the following formula: where y i and ŷi are the ground truth and estimated power consumption for appliance i.The more accurate the algorithm, the closer to 0 the PCE value is.The PCE provides more information feedback to end-user and demand management utilities.The R2 score evaluates the accuracy of trace retrieve.For each appliance i, it is defined as: In the comparison test, the root mean square error (RMSE) is used to measure estimation error.For each appliance i, it is defined as:

Results and Discussion
We tested the proposed method on one day data and calculated the three metrics to analyze the performance of the method.To further prove the performance of the algorithm, several comparison tests between our algorithm and another NILM method were conducted.Time consumption comparison of power trajectory estimation showed the estimation performance of OSVR, and estimation performance comparison between OSVR and SVR proved the improvement of the OSVR algorithm in power estimation.

The Load Disaggregation Results
The comparison of load disaggregation results and measured power for one day using our proposed method are shown in Figure 3.We calculated the cumulative estimated power and cumulative measured power of each appliance in one day and got the result in Figure 4.In Figure 3a, the dish washer and heat pump are simultaneously switched on at the 174th minute, and our method shows good performance in recognizing multiple devices when they are simultaneously turned on.We can see from Figure 3, there is a misidentification at the 345th minute due to an abnormal operating cycle of the fridge.Figures 3 and 4 show that the proposed algorithm has achieved disaggregation of four appliances, and the estimated aggregation consumption of each appliance is close to the measured consumption.In the comparison test, the root mean square error (RMSE) is used to measure estimation error.
For each appliance i, it is defined as:

Results and Discussion
We tested the proposed method on one day data and calculated the three metrics to analyze the performance of the method.To further prove the performance of the algorithm, several comparison tests between our algorithm and another NILM method were conducted.Time consumption comparison of power trajectory estimation showed the estimation performance of OSVR, and estimation performance comparison between OSVR and SVR proved the improvement of the OSVR algorithm in power estimation.

The Load Disaggregation Results
The comparison of load disaggregation results and measured power for one day using our proposed method are shown in Figure 3.We calculated the cumulative estimated power and cumulative measured power of each appliance in one day and got the result in Figure 4.In Figure 3a, the dish washer and heat pump are simultaneously switched on at the 174th minute, and our method shows good performance in recognizing multiple devices when they are simultaneously turned on.
We can see from Figure 3, there is a misidentification at the 345th minute due to an abnormal operating cycle of the fridge.Figures 3 and 4 show that the proposed algorithm has achieved disaggregation of four appliances, and the estimated aggregation consumption of each appliance is close to the measured consumption.
(a) (b)   To quantify the performance of our algorithm, Table 2 presents the three metrics values of four appliances using the adopted set of metrics.According to the description in Section 3.2, F-score ranges from 0 (0% accuracy in state detection) to 1 (100% accuracy in state detection), where the closer  is to 0, the closer the estimated contribution of appliance  is to the true contribution, and the more similar the estimated consumption trajectory is to the measured consumption trajectory, the closer R2 is to 1. Thus, since the F-score and the R2 values for four appliances are close to 1, and the PCE values are close to 0, it shows that the proposed algorithm performs well in identifying appliances states and estimating the power consumption assigned to each appliance and the power trace of each appliance.
Then, in order to test the performance of identification accuracy and decomposition accuracy for different periods, F-score and PCE values for different periods were counted separately.The results are listed in Tables 3 and 4. Tables 3 and 4 show that the performance for Period 1 is better than that for Period 2 and 3, due to the possible seasonality effects on power consumption.To quantify the performance of our algorithm, Table 2 presents the three metrics values of four appliances using the adopted set of metrics.According to the description in Section 3.2, F-score ranges from 0 (0% accuracy in state detection) to 1 (100% accuracy in state detection), where the closer PCE i is to 0, the closer the estimated contribution of appliance i is to the true contribution, and the more similar the estimated consumption trajectory is to the measured consumption trajectory, the closer R2 is to 1. Thus, since the F-score and the R2 values for four appliances are close to 1, and the PCE values are close to 0, it shows that the proposed algorithm performs well in identifying appliances states and estimating the power consumption assigned to each appliance and the power trace of each appliance.Then, in order to test the performance of identification accuracy and decomposition accuracy for different periods, F-score and PCE values for different periods were counted separately.The results are listed in Tables 3 and 4. Tables 3 and 4 show that the performance for Period 1 is better than that for Period 2 and 3, due to the possible seasonality effects on power consumption.

Performance Comparison
Hidden Markov models (HMMs) [31] have been tested and shown higher disaggregation accuracy in this context, so HMM-family methods are often adopted as benchmarks for algorithm testing and comparison.In literature [32], FHMM was adopted to identify the appliance states and only power consumption considered as signature.We compared the F-score values of each appliance between our approach and the FHMM in literature [32].The result is in Table 5.The F-score comparison shows that our approach is able to correctly detect the operating states of each appliance with a higher rate than FHMM.Based on the analysis in literature, the number of possible states for each appliance is limited to 2 in FHMM, and with the increase in the number of appliances and states, the calculation time of the FHMM algorithm increases dramatically.Yet, average power and the DTW-based method are used for power estimation separately in References [9] and [32].We implemented these two methods on AMPds.On the other metrics, the comparison of PCE and R2 values with the result of References [9] and [32] is in Tables 6 and 7. Obviously, the average power based method cannot show the power change during the operation of appliances, so its estimation performance in R2 is worse than that of the DTW-based method and our proposed method.The results showed that our proposed method performs better in providing information on the consumption patterns and contribution of each appliance to the total power except when it comes to the heat pump.Since the consumption pattern of the heat pump is affected by season, there was a slight deviation in the estimated value.

Time Consumption Comparison of Power Trajectory Estimation
To further test the performance of our proposed method, the computation time of proposed method was compared to the existing literature.In literature [32], the SDTW (Subsequence Dynamic Time Warping) method was applied to estimate the power trajectory of a single appliance.We operated our proposed method and the SDTW-based method in literature [32] for the power consumption estimation of fridge, and the computation times are shown in Table 8.From Table 8, we found that the OSVR-based method in our paper has an advantage on time consumption compared with the SDTW.As SDTW needs to scan the whole feature sequence and iteratively using DTW to search for best matched subsequence, the computation time is relative to the length of the signature time series.The OSVR-based method used the time feature for training, so only the subsequences with the same length duration were chosen for training, which reduced the computation time of the estimation algorithm.

Estimation Performance Comparison between OSVR and SVR
In order to quantify the estimation performance of OSVR, with the same training data as those selected in Section 4.3, RMSE of OSVR and SVR (parameters selection based on rule of thumb) were calculated, shown in Table 9.We can see from Table 9, through the optimization of the parameters of the SVR, the estimation performance has been significantly improved.

Method Limitations and Ways to Address Them
One of the method's limitations is that multiple normally-open appliances could not be disaggregated correctly.In the aggregation power clustering step, if multiple normally-open appliances contribute to the total power, the clustering method could not cluster to obtain the total power values when the largest contribution appliance is running.In order to overcome the limitation, after all the ON-OFF appliances are identified, the clustering phase is skipped, and the total power values are treated as one class for identification and estimation.
Another limitation of the method is it is not applicable to appliances whose features are not extracted.When a new load is added without extracting the feature and training the SVR model, it will be misidentified and estimated as the most similar features appliance whose features have been extracted.To notice misidentification of newly added appliances, a similarity threshold θ can be added to recognize whether there is a newly added load.If the minimum DTW distance from Section 2.2.1 is greater than θ, a newly added load is considered.When a new appliance is added, the features of the appliance need to be extracted to identify it, and the SVR model must be retrained to realize power estimation.

Conclusions
This paper proposed a new load disaggregation method for low sampling data from smart meters based on K-medians and OSVR.Our proposed method, using the power consumption pattern feature of appliances, clusters low sampling power consumption data and labels the appliance based on DTW.According to the fact that each appliance shows a similar and unique power trend over time when operating, OSVR is applied to estimate power consumption.We tested the proposed approach on an AMPds dataset and chose three metrics to evaluate the proposed algorithm.Several comparison tests were performed as well.The results demonstrated that the algorithm shows higher identification accuracy than FHMM, and better power estimation performance than the DTW-based method and average power method.The proposed algorithm has the advantage of quick execution, high applicability to multistates appliances compared to FHMM, and low-cost hardware without extra equipment installation.
In addition, for seasonal appliances (such as heat pumps), since the power consumption pattern is influenced by the surrounding temperature, estimated values deviate from true powers.Appliance features can be extracted from different seasons to avoid seasonal impact on performance, and further studies can focus on improving the estimation performance considering the impact of temperature of the surrounding environment.

Figure 1 .
Figure 1.The flowchart of the proposed algorithm in this paper.

Figure 1 .
Figure 1.The flowchart of the proposed algorithm in this paper.

Section 2 . 1 ,
we extracted a week's data from April 1st 2012 to April 7th 2012 for SVR training, and we chose several weeks' data in different seasons for validation, which were the week from April 8th 2012 to April 14th 2012 (period 1), from June 1st 2012 to June 7th 2012 (period 2), and December 1st 2012 to December 7th 2012 (period 3).

Future
Internet 2019, 11 FOR PEER REVIEW 7 of 13

Figure 3 .
Figure 3. Load disaggregation result and the measured power of four appliances for a day.From left: (a) Load disaggregation result of four appliances in a day; (b) measured power values of four appliances in a day.

Figure 3 .
Figure 3. Load disaggregation result and the measured power of four appliances for a day.From left: (a) Load disaggregation result of four appliances in a day; (b) measured power values of four appliances in a day.

Table 1 .
Average powers of testing appliances in AMPds.

Table 2 .
The disaggregation accuracy metrics for the proposed method.

Table 3 .
F-score for four appliances from three periods.

Table 2 .
The disaggregation accuracy metrics for the proposed method.

Table 3 .
F-score for four appliances from three periods.

Table 4 .
Power contribution error (PCE) (%) for four appliances from three periods.

Table 5 .
F-score values compared with the factorial hidden Markov models (FHMM) method.

Table 8 .
Computation time for power consumption estimation.

Table 9 .
The estimation error of OSVR and SVR.