An Event Matching Energy Disaggregation Algorithm Using Smart Meter Data
Abstract
:1. Introduction
- An algorithm was proposed for the formation of a consumer-specific event database (EVD) containing all aggregate demand events (ADEs), due to the activation of target appliances in all possible states considering their state flags. K-means clustering was applied to determine the power states of appliances using limited data of individual appliance consumption. ADEs in EVD were sorted in ascending order for easy matching.
- An EMEDA was devised to reduce the computational complexity exhibited by metaheuristic and combinatorial optimization techniques. Unlike conventional techniques attempting to match an ADE by aggregating multiple probable appliance combinations, the proposed EMEDA just tallies the test ADE in the sorted EVD to minimize the estimation error.
- Besides computational cost savings during matching in EVD, a data compression algorithm, inspired by event-driven metering, was applied to reduce the number of test samples/events to be matched for energy disaggregation. This data compression led to significant savings in terms of storage memory and computational time.
- A post-processing algorithm was devised to encounter the effects of transient dips/spikes occurring during the state transition of appliances. Erroneous appliance detections due to these transients, which may deteriorate the performance of the proposed algorithm, were handled during post-processing.
2. Mathematical Modelling
3. Proposed Methodology
3.1. State Estimation by K-means Clustering
3.2. Algorithm for Event Database Formation
Algorithm 1: Proposed Algorithm for EVD Formation |
Inputs: |
Power states of all target appliances computed by K-means clustering. |
Outputs: |
EVD in sorted form. |
Method: |
Step 1: Prepare power levels sets () for all target appliances such that and . |
Step 2: Perform the cartesian product among all acquired in Step 1 to get all the probable state combinations of appliances. |
Step 3: Designate relevant flags = to represent appliance states in combinations developed in Step 2. |
Step 4: Take the summation of appliance power levels for all combinations developed in Step 2 to constitute all possible ADEs. |
Step 5: Arrange the ADEs obtained in Step 4 in ascending order to obtain sorted EVD. |
3.3. Event-Driven Data Compression
Algorithm 2: Algorithm for Event-Driven Data Compression |
Inputs: |
List containing the uncompressed samples of ADEs as [, ,], where , and represent the index number, timestamp, and power of uncompressed samples, respectively. |
Power threshold () for event detection. |
Outputs: |
A list of compressed samples of aggregate demand as . |
Dummy Variables and Symbols: |
: Variable to save the first power sample of uncompressed data upon the detection of an event. |
q: Pointer variable to iterate through . |
%: To indicate comments. |
Method: |
In , assign from the first entry of . |
In , assign from the first entry of . |
Initialize = 0 |
FOR q Length of |
IF |
=() |
Value computed by Equation (14) taking values of from to . |
Append by the entry . |
% Initializing values for the next entry of . |
() |
= |
END IF |
% To ensure the attainment of the last compressed sample of on arriving at the last sample of |
% uncompressed time series . |
IF (q = |
= () |
Value computed by Equation (14) taking values of from to . |
Append by the entry . |
END IF |
END FOR |
3.4. Event Matching Optimization Algorithm
Algorithm 3: Event Matching Optimization Algorithm |
Inputs: |
Consumer-specific EVD. |
List of compressed testing ADEs as . |
Initial values of ASFs. |
Outputs: |
Array containing estimated ALDs and ASFs. |
List containing indexes of transient events. |
Method: |
Declare an empty array . |
Declare an empty list . |
FOR each compressed ADE |
IF ( for current ADE in ) |
Declare the current ADE as a transient ADE. |
Retain initial ASFs and add an entry in with zero powers for all appliances. |
Append the index of the current ADE according to in . |
ELSE |
Step 1: Add two empty columns in EVD to get an extended EVD. |
Step 2: Put the absolute difference between the test ADE and the records in EVD items in the first empty column. |
Step 3: Fill the second empty column with the number of state variations obtained by comparing earlier state flags of appliances with ASFs associated with EVD records. |
Step 4: Arrange the extended EVD with respect to the absolute difference obtained in Step 2. |
Step 5: Pick the EVD record with the minimum absolute difference and no more than one state variation as matched ADE. |
Step 6: Extend with the matched ADE obtained in Step 5. |
Step 7: Reset the initial values of ASFs in accordance with the matched ADE for the next compressed testing ADE. |
END IF ELSE |
END FOR |
3.5. Post-Processing Algorithm
Algorithm 4: Proposed Post-Processing Algorithm |
Inputs: |
Array of estimated ALDs and ASFs returned by EMEDA. |
List containing indexes of transient events in . |
Outputs: |
Array of estimated ALDs and ASFs after post-processing. |
Method: |
WHILE ( Length of |
Step 1: Extract the index of the current transient event/sample as = |
Step 2: Extract the current transient event |
Step 3: Extract the non-transient events from preceding and succeeding the current transient event. |
Step 4: Update ALDs and ASFs of the current transient event according to preceding and succeeding non-transient events, respectively. |
Step 5: Calculate the absolute differences between ALDs of succeeding and preceding non-transient events. |
Step 6: Pick the appliance in the transient phase based on the maximum value of absolute differences calculated in the previous step. |
Step 7: Evaluate the absolute difference between the sum of ALDs updated from the preceding non-transient event and aggregate power of the transient event. |
Step 8: Designate the absolute difference of Step 7 as the estimated demand of the appliance transitioning its state. |
END WHILE |
4. Results and Discussion
4.1. State Estimation and Data Compression Results
4.2. NILM Results by EMEDA
4.3. Computational Time Analysis
4.4. Comparison with Recent Existing Approaches
5. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Balta, S.; Zavrak, S.; Eken, S. Real-Time Monitoring and Scalable Messaging of SCADA Networks Data: A Case Study on Cyber-Physical Attack Detection in Water Distribution System. In Proceedings of the Electrical and Computer Engineering, Cham, Switzerland, 9–12 February 2022; pp. 203–215. [Google Scholar]
- Eken, S. An exploratory teaching program in big data analysis for undergraduate students. J. Ambient. Intell. Humaniz. Comput. 2020, 11, 4285–4304. [Google Scholar] [CrossRef]
- Erdem, T.; Eken, S. Layer-Wise Relevance Propagation for Smart-Grid Stability Prediction. In Proceedings of the 5th Mediterranean Conference on Pattern Recognition and Artificial Intelligence, Istanbul, Turkey, 17–18 December 2021; Djeddi, C., Siddiqi, I., Jamil, A., Ali Hameed, A., Kucuk, İ., Eds.; Springer International Publishing: Cham, Switzerland, 2022; pp. 315–328. [Google Scholar]
- Breviglieri, P.; Erdem, T.; Eken, S. Predicting Smart Grid Stability with Optimized Deep Models. SN Comput. Sci. 2021, 2, 1–12. [Google Scholar] [CrossRef]
- Diawuo, F.A.; Sakah, M.; Pina, A.; Baptista, P.C.; Silva, C.A. Disaggregation and characterization of residential electricity use: Analysis for Ghana. Sustain. Cities Soc. 2019, 48, 101586. [Google Scholar] [CrossRef]
- Liaqat, R.; Sajjad, I.A.; Waseem, M.; Alhelou, H.H. Appliance Level Energy Characterization of Residential Electricity Demand: Prospects, Challenges and Recommendations. IEEE Access 2021, 9, 148676–148697. [Google Scholar] [CrossRef]
- Rasool, G.; Ehsan, F.; Shahbaz, M. A systematic literature review on electricity management systems. Renew. Sustain. Energy Rev. 2015, 49, 975–989. [Google Scholar] [CrossRef]
- Khalid, Q.; Arshad, N.; Khan, N.; Hassan, T.; Javed, F.; Ikram, J. Home energy management system using NILM and low-cost HAN. J. Electron. Sci. Technol. 2014, 12, 20–25. [Google Scholar]
- Iqbal, M.M.; Sajjad, M.I.A.; Amin, S.; Haroon, S.S.; Liaqat, R.; Khan, M.F.N.; Waseem, M.; Shah, M.A. Optimal scheduling of residential home appliances by considering energy storage and stochastically modelled photovoltaics in a grid exchange environment using hybrid grey wolf genetic algorithm optimizer. Appl. Sci. 2019, 9, 5226. [Google Scholar] [CrossRef] [Green Version]
- Gopinath, R.; Kumar, M.; Prakash Chandra Joshua, C.; Srinivas, K. Energy management using non-intrusive load monitoring techniques—State-of-the-art and future research directions. Sustain. Cities Soc. 2020, 62, 102411. [Google Scholar] [CrossRef]
- Zeinal-Kheiri, S.; Shotorbani, A.M.; Mohammadi-Ivatloo, B. Residential Load Disaggregation Considering State Transitions. IEEE Trans. Ind. Inform. 2020, 16, 743–753. [Google Scholar] [CrossRef]
- Carrie Armel, K.; Gupta, A.; Shrimali, G.; Albert, A. Is disaggregation the holy grail of energy efficiency? The case of electricity. Energy Policy 2013, 52, 213–234. [Google Scholar] [CrossRef] [Green Version]
- Hart, G.W. Nonintrusive appliance load monitoring. Proc. IEEE 1992, 80, 1870–1891. [Google Scholar] [CrossRef]
- Pereira, L.; Nunes, N. Performance evaluation in non-intrusive load monitoring: Datasets, metrics, and tools—A review. Wiley Interdiscip.Rev. Data Min. Knowl. Discov. 2018, 8, e1265. [Google Scholar] [CrossRef] [Green Version]
- Dash, S.; Sahoo, N. Electric energy disaggregation via non-intrusive load monitoring: A state-of-the-art systematic review. Electr. Power Syst. Res. 2022, 213, 108673. [Google Scholar] [CrossRef]
- Makonin, S.; Popowich, F.; Bajić, I.V.; Gill, B.; Bartram, L. Exploiting HMM sparsity to perform online real-time nonintrusive load monitoring. IEEE Trans. Smart Grid 2015, 7, 2575–2585. [Google Scholar] [CrossRef]
- Kong, W.; Dong, Z.Y.; Hill, D.J.; Ma, J.; Zhao, J.; Luo, F. A hierarchical hidden Markov model framework for home appliance modeling. IEEE Trans. Smart Grid 2016, 9, 3079–3090. [Google Scholar] [CrossRef]
- Parson, O.; Ghosh, S.; Weal, M.; Rogers, A. An unsupervised training method for non-intrusive appliance load monitoring. Artif. Intell. 2014, 217, 1–19. [Google Scholar] [CrossRef]
- Liu, Q.; Kamoto, K.M.; Liu, X.; Sun, M.; Linge, N. Low-Complexity Non-Intrusive Load Monitoring Using Unsupervised Learning and Generalized Appliance Models. IEEE Trans. Consum. Electron. 2019, 65, 28–37. [Google Scholar] [CrossRef]
- Kaselimi, M.; Doulamis, N.; Doulamis, A.; Voulodimos, A.; Protopapadakis, E. Bayesian-optimized Bidirectional LSTM Regression Model for Non-intrusive Load Monitoring. In Proceedings of the ICASSP 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK, 12–17 May 2019; pp. 2747–2751. [Google Scholar]
- Tabatabaei, S.M.; Dick, S.; Xu, W. Toward Non-Intrusive Load Monitoring via Multi-Label Classification. IEEE Trans. Smart Grid 2017, 8, 26–40. [Google Scholar] [CrossRef]
- Piccialli, V.; Sudoso, A.M. Improving Non-Intrusive Load Disaggregation through an Attention-Based Deep Neural Network. Energies 2021, 14, 847. [Google Scholar] [CrossRef]
- Precioso, D.; Gómez-Ullate, D. NILM as a regression versus classification problem: The importance of thresholding. arXiv 2020, arXiv:2010.16050. [Google Scholar]
- Huber, P.; Calatroni, A.; Rumsch, A.; Paice, A. Review on Deep Neural Networks Applied to Low-Frequency NILM. Energies 2021, 14, 2390. [Google Scholar] [CrossRef]
- Kong, W.; Dong, Z.Y.; Wang, B.; Zhao, J.; Huang, J. A Practical Solution for Non-Intrusive Type II Load Monitoring Based on Deep Learning and Post-Processing. IEEE Trans. Smart Grid 2020, 11, 148–160. [Google Scholar] [CrossRef]
- Yang, D.; Gao, X.; Kong, L.; Pang, Y.; Zhou, B. An Event-Driven Convolutional Neural Architecture for Non-Intrusive Load Monitoring of Residential Appliance. IEEE Trans. Consum. Electron. 2020, 66, 173–182. [Google Scholar] [CrossRef]
- Song, J.; Wang, H.; Du, M.; Peng, L.; Zhang, S.; Xu, G. Non-Intrusive Load Identification Method Based on Improved Long Short Term Memory Network. Energies 2021, 14, 684. [Google Scholar] [CrossRef]
- Kim, I.; Kim, H.; Kim, S.Y.; Shin, S. Spectogram analysis of active power of appliances and LSTM-based energy disaggregation. J. Korea Converg. Soc. 2021, 12, 21–28. [Google Scholar] [CrossRef]
- Chen, K.; Zhang, Y.; Wang, Q.; Hu, J.; Fan, H.; He, J. Scale- and Context-Aware Convolutional Non-Intrusive Load Monitoring. IEEE Trans. Power Syst. 2020, 35, 2362–2373. [Google Scholar] [CrossRef] [Green Version]
- Liang, J.; Ren, Z.; Wang, L.; Tang, B.; Liu, J.; Liu, Y. Deep Neural Network in Sequence to Short Sequence Form for Non-intrusive Load Monitoring. In Proceedings of the 2019 IEEE 3rd Conference on Energy Internet and Energy System Integration (EI2), Changsha, China, 8–10 November 2019; pp. 565–570. [Google Scholar]
- D’Incecco, M.; Squartini, S.; Zhong, M. Transfer Learning for Non-Intrusive Load Monitoring. IEEE Trans. Smart Grid 2020, 11, 1419–1429. [Google Scholar] [CrossRef] [Green Version]
- Zhao, Q.; Xu, Y.; Wei, Z.; Han, Y. Non-Intrusive Load Monitoring Based on Deep Pairwise-Supervised Hashing to Detect Unidentified Appliances. Processes 2021, 9, 505. [Google Scholar] [CrossRef]
- Ahmed, A.M.; Zhang, Y.; Eliassen, F. Generative Adversarial Networks and Transfer Learning for Non-Intrusive Load Monitoring in Smart Grids. In Proceedings of the 2020 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Virtual, 11–13 November 2020; pp. 1–7. [Google Scholar]
- Bhotto, M.Z.A.; Makonin, S.; Bajić, I.V. Load Disaggregation Based on Aided Linear Integer Programming. IEEE Trans. Circuits Syst. II Express Briefs 2017, 64, 792–796. [Google Scholar] [CrossRef] [Green Version]
- Azizi, E.; Shotorbani, A.M.; Hamidi-Beheshti, M.-T.; Mohammadi-Ivatloo, B.; Bolouki, S. Residential Household Non-Intrusive Load Monitoring via Smart Event-based Optimization. IEEE Trans. Consum. Electron. 2020, 66, 233–241. [Google Scholar] [CrossRef]
- Lin, S.; Zhao, L.; Li, F.; Liu, Q.; Li, D.; Fu, Y. A nonintrusive load identification method for residential applications based on quadratic programming. Electr. Power Syst. Res. 2016, 133, 241–248. [Google Scholar] [CrossRef] [Green Version]
- Piga, D.; Cominola, A.; Giuliani, M.; Castelletti, A.; Rizzoli, A.E. Sparse optimization for automated energy end use disaggregation. IEEE Trans. Control. Syst. Technol. 2015, 24, 1044–1051. [Google Scholar] [CrossRef]
- Egarter, D.; Elmenreich, W. Load disaggregation with metaheuristic optimization. In Proceedings of the Energieinformatik, Karlsruhe, Germany, 12–13 November 2015; pp. 1–12. [Google Scholar]
- Liu, H.; Yu, C.; Wu, H.; Chen, C.; Wang, Z. An improved non-intrusive load disaggregation algorithm and its application. Sustain. Cities Soc. 2020, 53, 101918. [Google Scholar] [CrossRef]
- Shahroz, M.; Younis, M.S.; Nasir, H.A. A Scenario-Based Stochastic Optimization Approach for Non-Intrusive Appliance Load Monitoring. IEEE Access 2020, 8, 142205–142217. [Google Scholar] [CrossRef]
- Kolter, J.Z.; Johnson, M.J. REDD: A public data set for energy disaggregation research. In Proceedings of the Workshop on Data Mining Applications in Sustainability (SIGKDD), San Diego, CA, USA, 21 August 2011; pp. 59–62. [Google Scholar]
- Ajani, O.S.; Kumar, A.; Mallipeddi, R.; Das, S.; Suganthan, P.N. Benchmarking Optimization-Based Energy Disaggregation Algorithms. Energies 2022, 15, 1600. [Google Scholar] [CrossRef]
- Hua, D.; Huang, F.; Wang, L.; Chen, W. Simultaneous disaggregation of multiple appliances based on non-intrusive load monitoring. Electr. Power Syst. Res. 2021, 193, 106887. [Google Scholar] [CrossRef]
- Tan, P.-N.; Steinbach, M.; Kumar, V. Introduction to Data Mining; Pearson Education India: New Delhi, India, 2016. [Google Scholar]
- Simonov, M.; Chicco, G.; Zanetto, G. Event-Driven Energy Metering: Principles and Applications. IEEE Trans. Ind. Appl. 2017, 53, 3217–3227. [Google Scholar] [CrossRef]
Segment | Start (D-M-Y H:M:S) | End (D-M-Y H:M:S) | Length | Weekdays/ Weekend |
---|---|---|---|---|
Training data | 19-04-2011 09:30:00 | 02-05-2011 09:29:59 | 14 days | Both |
Testing data 1 | 23-05-2011 19:00:00 | 24-05-2011 07:00:03 | 12 h | Weekdays |
Testing data 2 | 07-05-2011 12:00:06 | 08-05-2011 12:00:01 | 1 day | Weekends |
Testing data 3 | 09-05-2011 00:00:02 | 10-05-2011 23:59:57 | 2 days | Weekdays |
Testing data 4 | 02-05-2011 09:30:03 | 07-05-2011 09:30:03 | 5 days | Both |
Appliance | Number of Operating Modes | Power Levels in Various Modes (Watts) | |||
---|---|---|---|---|---|
1 | Kitchen outlets | 2 | 1 * | 1068 | |
2 | Microwave | 2 | 4 * | 1519 | |
3 | Oven | 3 | 0 | 3366 | 4091 |
4 | Refrigerator | 3 | 6.5 * | 193 | 424 |
5 | Washer dryer | 2 | 0 | 2692 |
Testing Period | Time Span | Uncompressed Samples | Compressed ADEs | Compression Ratio | Computational Time for Data Compression |
---|---|---|---|---|---|
Period #1 | 0.5 days | 11,347 | 30 | 378:1 | 0.0130 s |
Period #2 | 1 day | 22,551 | 87 | 259:1 | 0.0254 s |
Period #3 | 2 days | 44,562 | 166 | 268:1 | 0.0496 s |
Period #4 * | 5 days | 51,135 | 124 | 412:1 | 0.0609 s |
Total | 8.5 days | 129,595 | 407 | 318:1 | 0.1489 s |
Appliance | Ground Truth | Before Post-Processing | After Post-Processing | ||||
---|---|---|---|---|---|---|---|
Kitchen outlets | 0.0551 | 0.0542 | 0.0029 | 0.0154 | 0.0541 | 0.0004 | 0.0186 |
Microwave | 0.1947 | 0.1928 | 0.0036 | 0.0093 | 0.1929 | 0.0050 | 0.0090 |
Oven | 0.0446 | 0.0443 | 0.0001 | 0.0047 | 0.0442 | 0.0001 | 0.0098 |
Refrigerator | 0.6818 | 0.6860 | 0.0354 | 0.0063 | 0.6855 | 0.0034 | 0.0055 |
Washer dryer | 0.0238 | 0.0224 | 0.0292 | 0.0585 | 0.0233 | 0.0009 | 0.0216 |
Appliance | Before Post-Processing | After Post-Processing | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed EMEDA | Proposed EMEDA | SEBO [35] | SEBO [35] | Proposed EMEDA | Proposed EMEDA | SEBO [35] | SEBO [35] | OLDA [11] | IP [11] | ALIP [11] | Multi-Label KNN [35] | Multi-Label KNN [35] | |
Kitchen outlets | 0.9971 | 0.9857 | 0.96 | 0.85 | 0.9996 | 0.9867 | 0.96 | 0.86 | N/A | N/A | N/A | 0.84 | 0.73 |
Microwave | 0.9963 | 0.9835 | 0.83 | 0.77 | 0.9949 | 0.9844 | 0.84 | 0.80 | 0.99 | 0.50 | 0.50 | 0.81 | 0.79 |
Oven | 0.9999 | 0.9890 | 0.75 | 0.86 | 0.9999 | 0.9890 | 0.86 | 0.91 | 0.5 | 0.50 | 0.50 | 0.68 | 0.79 |
Refrigerator | 0.9500 | 0.9793 | 0.83 | 0.94 | 0.9951 | 0.9812 | 0.83 | 0.94 | 0.91 | 0.85 | 0.89 | 0.82 | 0.94 |
Washer dryer | 0.9707 | 0.9751 | 0.91 | 0.94 | 0.9990 | 0.9886 | 0.92 | 0.96 | 0.87 | 0.52 | 0.50 | 0.91 | 0.93 |
Testing Data | Computational Time | |||||
---|---|---|---|---|---|---|
Data Compression (DC) | DC+ Energy Disaggregation (ED) | DC+ ED+ Post-Processing | Time/day for DC + ED+ Post-Processing | ED+ Post-Processing | Time/Day for ED+ Post-Processing | |
Period #1 (12 h) | 0.0130 s | 0.5930 s | 0.7105 s | 1.4210 s | 0.6975 s | 1.3950 s |
Period #2 (24 h) | 0.0254 s | 1.1974 s | 1.4309 s | 1.4309 s | 1.4055 s | 1.4055 s |
Period #3 (48 h) | 0.0496 s | 2.2749 s | 2.7010 s | 1.3505 s | 2.6514 s | 1.3257 s |
Period #4 (5 days) * | 0.0609 s | 2.6792 s | 3.1823 s | 0.6365 s | 3.1214 s | 0.6242 s |
Total (8.5 days) | 0.1489 s | 6.7445 s | 8.0247 s | 0.9441 s | 7.8758 s | 0.9266 s |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liaqat, R.; Sajjad, I.A. An Event Matching Energy Disaggregation Algorithm Using Smart Meter Data. Electronics 2022, 11, 3596. https://doi.org/10.3390/electronics11213596
Liaqat R, Sajjad IA. An Event Matching Energy Disaggregation Algorithm Using Smart Meter Data. Electronics. 2022; 11(21):3596. https://doi.org/10.3390/electronics11213596
Chicago/Turabian StyleLiaqat, Rehan, and Intisar Ali Sajjad. 2022. "An Event Matching Energy Disaggregation Algorithm Using Smart Meter Data" Electronics 11, no. 21: 3596. https://doi.org/10.3390/electronics11213596
APA StyleLiaqat, R., & Sajjad, I. A. (2022). An Event Matching Energy Disaggregation Algorithm Using Smart Meter Data. Electronics, 11(21), 3596. https://doi.org/10.3390/electronics11213596