Detection of Anomalies in Daily Activities Using Data from Smart Meters
<p>Global architecture of the proposed system.</p> "> Figure 2
<p>Available input data (energy consumed each hour) from the Wibeee device installed in a test house with four tenants: (<b>a</b>) the whole period under analysis; (<b>b</b>) the first week under analysis.</p> "> Figure 3
<p>General scheme of the different LSTM topologies studied.</p> "> Figure 4
<p>General scheme of the different CNN topologies studied.</p> "> Figure 5
<p>Real and estimated energy consumption on an hourly sampling basis (one sample per hour) for the four considered solutions: (<b>a</b>) LSTM; (<b>b</b>) CNN; (<b>c</b>) RF; and (<b>d</b>) DT. Note that the values have been normalized over a maximum of 4.5 kWh.</p> "> Figure 5 Cont.
<p>Real and estimated energy consumption on an hourly sampling basis (one sample per hour) for the four considered solutions: (<b>a</b>) LSTM; (<b>b</b>) CNN; (<b>c</b>) RF; and (<b>d</b>) DT. Note that the values have been normalized over a maximum of 4.5 kWh.</p> "> Figure 6
<p>Activities’ alarm generation for the four considered solutions: (<b>a</b>) LSTM; (<b>b</b>) CNN; (<b>c</b>) RF; and (<b>d</b>) DT. The breakfast alarm <span class="html-italic">A<sub>b</sub></span> is denoted by a red circle, the lunch alarm <span class="html-italic">A<sub>l</sub></span> by a magenta cross, and the sleeping alarm <span class="html-italic">A<sub>s</sub></span> by a green asterisk. Note that the ground truth is only included for the LSTM (<b>a</b>) because it is the same for the other topologies. The energy values are normalized over a maximum of 4.5 kWh.</p> "> Figure 7
<p>Summary of activities’ alarm generation for the four considered solutions: LSTM, CNN, RF and DT. The breakfast alarm <span class="html-italic">A<sub>b</sub></span> is still denoted by a red circle, the lunch alarm <span class="html-italic">A<sub>l</sub></span> by a magenta cross, and the sleeping alarm <span class="html-italic">A<sub>s</sub></span> by a green asterisk. The energy values are normalized over a maximum of 4.5 kWh.</p> ">
Abstract
:1. Introduction
- The study of different machine learning algorithms capable of predicting the energy consumption of a household after a training period. Four algorithms are considered hereinafter: a convolutional neural network (CNN), a long short-term memory (LSTM) network, a decision tree (DT), and a random forest (RF).
- The definition of short-term alarm, which is able to launch warnings when there is a divergence in the house between the predicted energy consumption and the real measured one, during the test period after training. In particular, three alarms have been implemented related to the following daily activities: sleeping, breakfast and lunch.
- The proposal has been successfully validated with experimental data coming from a real household with four tenants. A commercial on-the-shelf smart meter has been used to acquire electrical samples during a period of six months, which proves the feasibility and readiness for implementation of the algorithms and methods described here.
2. Global Architecture Overview
3. Energy Consumption Prediction Model
4. Short-Term Alarm Generation
- The breakfast alarm Ab is activated when the averaged predicted energy provided by the model between 8 a.m. and 11 a.m. is higher than the averaged measured value or real one for the same interval plus three times the standard deviation σe[n] of the error between the predicted and the measured energies in that same interval (1). The limit of three times the standard deviation implies that the current difference between the predicted and the measured energies is significantly apart from the usual error from a Gaussian point of view. This means that breakfast activity did not take place as usual.
- The lunch alarm Al is activated in the range from 1 p.m. to 4 p.m. if the averaged predicted energy by the forecasting model in that interval is greater than the averaged real one plus three times the standard deviation of the prediction error for that interval, similar to (1), assuming then that the lunch was different from usual.
- The sleeping alarm As is generated in the range from 12 p.m. to 6 a.m. when the averaged measured energy is higher than the averaged energy consumption predicted by the model plus the error standard deviation for that interval (2), indicating unusual activity during nighttime hours.
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- European Commission; Directorate-General for Economic and Financial Affairs, EC; Economic Policy Committee of the European Communities. The 2015 Ageing Report: Economic and Budgetary Projections for the 28 EU Member States (2013–2060); Publications Office: Luxembourg, 2015. [Google Scholar]
- Galeotti, F.; Giusti, A.; Meduri, F.; Raschetti, R.; Scardetta, P.; Vanacore, N. Epidemiological Data on Dementia. ALzheimer COoperation Valuation in Europe (ALCOVE), Synthesis Report, 2013. Available online: https://www.alcove-project.eu/images/synthesis-report/ALCOVE_SYNTHESIS_REPORT_WP4.pdf (accessed on 1 June 2022).
- European Commission Joint Research Centre, European Commission Joint Research Centre, Smart Metering Deployment in the European Union, Report, 2021. Available online: https://ses.jrc.ec.europa.eu/smart-metering-deployment-european-union (accessed on 1 June 2022).
- Fakhar, M.Z.; Yalcin, E.; Bilge, A. A survey of smart home energy conservation techniques. Expert Syst. Appl. 2023, 213 Pt B, 118974. [Google Scholar] [CrossRef]
- Ruano, A.; Hernández, A.; Ureña, J.; Ruano, M.; García, J.J. NILM Techniques for Intelligent Home Energy Management and Ambient Assisted Living: A Review. Energies 2019, 12, 2203. [Google Scholar] [CrossRef]
- Kaselimi, M.; Protopapadakis, E.; Voulodimos, A.; Doulamis, N.; Doulamis, A. Towards Trustworthy Energy Disaggregation: A Review of Challenges, Methods, and Perspectives for Non-Intrusive Load Monitoring. Sensors 2022, 22, 5872. [Google Scholar] [CrossRef] [PubMed]
- Hosseini, S.S.; Agbossou, K.; Kelouwani, S.; Cardenas, A. Non-intrusive load monitoring through home energy management systems: A comprehensive review. Renew. Sustain. Energy Rev. 2017, 79, 1266–1274. [Google Scholar] [CrossRef]
- Ghosh, S.; Chatterjee, D. Non-intrusive identification of harmonic polluting loads in a smart residential system. Sustain. Energy Grids Netw. 2021, 26, 100446. [Google Scholar] [CrossRef]
- Lai, Q.H.; Lai, C.S. Healthcare with Wireless Communication and Smart Meters. IEEE Consum. Electron. Mag. 2023, 12, 53–62. [Google Scholar] [CrossRef]
- Alcalá, J.M.; Ureña, J.; Hernández, A.; Gualda, D. Sustainable Homecare Monitoring System by Sensing Electricity Data. IEEE Sens. J. 2017, 17, 7741–7749. [Google Scholar] [CrossRef]
- Bousbiat, H.; Leitner, G.; Elmenreich, W. Ageing Safely in the Digital Era: A New Unobtrusive Activity Monitoring Framework Leveraging on Daily Interactions with Hand-Operated Appliances. Sensors 2022, 22, 1322. [Google Scholar] [CrossRef]
- Suryadevara, N.K.; Biswal, G.R. Smart Plugs: Paradigms and Applications in the Smart City-and-Smart Grid. Energies 2019, 12, 1957. [Google Scholar] [CrossRef]
- Rehman, A.U.; Lie, T.T.; Vallès, B.; Tito, S.R. Event-Detection Algorithms for Low Sampling Nonintrusive Load Monitoring Systems Based on Low Complexity Statistical Features. IEEE Trans. Instrum. Meas. 2020, 69, 751–759. [Google Scholar] [CrossRef]
- Zhao, B.; Li, X.; Luan, W.; Liu, B. Apply Graph Signal Processing on NILM: An Unsupervised Approach Featuring Power Sequences. Sensors 2023, 23, 3939. [Google Scholar] [CrossRef] [PubMed]
- Akarslan, E.; Dogan, R. A novel approach based on a feature selection procedure for residential load identification. Sustain. Energy Grids Netw. 2021, 27, 100488. [Google Scholar] [CrossRef]
- Ciancetta, F.; Bucci, G.; Fiorucci, E.; Mari, S.; Fioravanti, A. A New Convolutional Neural Network-Based System for NILM Applications. IEEE Trans. Instrum. Meas. 2021, 70, 1–12. [Google Scholar] [CrossRef]
- Holweger, J.; Dorokhova, M.; Bloch, L.; Ballif, C.; Wyrsch, N. Unsupervised algorithm for disaggregating low-sampling-rate electricity consumption of households. Sustain. Energy Grids Netw. 2019, 19, 100244. [Google Scholar] [CrossRef]
- Alcalá, J.; Ureña, J.; Hernández, A.; Gualda, D. Assessing Human Activity in Elderly People Using Non-Intrusive Load Monitoring. Sensors 2017, 17, 351. [Google Scholar] [CrossRef]
- Devlin, M.A.; Hayes, B.P. Non-intrusive load monitoring and classification of activities of daily living using residential smart meter data. IEEE Trans. Consum. Electron. 2019, 65, 339–348. [Google Scholar] [CrossRef]
- Belley, C.; Gaboury, S.; Bouchard, B.; Bouzouane, A. An efficient and inexpensive method for activity recognition within a smart home based on load signatures of appliances. Pervasive Mob. Comput. 2014, 12, 58–78. [Google Scholar] [CrossRef]
- Patrono, L.; Primiceri, P.; Rametta, P.; Sergi, I.; Visconti, P. An innovative approach for monitoring elderly behavior by detecting home appliance’s usage. In Proceedings of the 2017 25th International Conference on Software, Telecommunications and Computer Networks (SoftCOM), Split, Croatia, 21–23 September 2017; pp. 1–7. [Google Scholar]
- Kim, G.; Park, S. Pre-trained non-intrusive load monitoring model for recognizing activity of daily living. Appl. Intell. 2023, 53, 10937–10955. [Google Scholar] [CrossRef]
- Noury, N.; Berenguer, M.; Teyssier, H.; Bouzid, M.J.; Giordani, M. Building an index of activity of inhabitants from their activity on the residential electrical power line. IEEE Trans. Inf. Technol. Biomed. 2011, 15, 758–766. [Google Scholar] [CrossRef]
- Liao, J.; Stankovic, L.; Stankovic, V. Detecting household activity patterns from smart meter data. In Proceedings of the 2014 International Conference on Intelligent Environments, Shanghai, China, 30 June–4 July 2014; pp. 71–78. [Google Scholar]
- Chalmers, C.; Fergus, P.; Montanez, C.A.C.; Sikdar, S.; Ball, F.; Kendall, B. Detecting activities of daily living and routine behaviors in dementia patients living alone using smart meter load disaggregation. IEEE Trans. Emerg. Top. Comput. 2020, 10, 157–169. [Google Scholar] [CrossRef]
- Nordahl, C.; Persson, M.; Grahn, H. Detection of residents’ abnormal behaviour by analysing energy consumption of individual households. In Proceedings of the 2017 IEEE International Conference on Data Mining Workshops (ICDMW), New Orleans, LA, USA, 18–21 November 2017; pp. 729–738. [Google Scholar]
- Lentzas, A.; Vrakas, D. Machine learning approaches for non-intrusive home absence detection based on appliance electrical use. Expert Syst. Appl. 2022, 210, 118454. [Google Scholar] [CrossRef]
- Klyuev, R.V.; Morgoev, I.D.; Morgoeva, A.D.; Gavrina, O.A.; Martyushev, N.V.; Efremenkov, E.A.; Mengxu, Q. Methods of Forecasting Electric Energy Consumption: A Literature Review. Energies 2022, 15, 8919. [Google Scholar] [CrossRef]
- Hora, S.K.; Poongodan, R.; de Prado, R.P.; Wozniak, M.; Divakarachari, P.B. Long Short-Term Memory Network-Based Metaheuristic for Effective Electric Energy Consumption Prediction. Appl. Sci. 2021, 11, 11263. [Google Scholar] [CrossRef]
- Peng, L.; Wang, L.; Xia, D.; Gao, Q. Effective energy consumption forecasting using empirical wavelet transform and long short-term memory. Energy 2022, 238 Pt B, 121756. [Google Scholar] [CrossRef]
- Jin, N.; Yang, F.; Mo, Y.; Zeng, Y.; Zhou, X.; Yan, K.; Ma, X. Highly accurate energy consumption forecasting model based on parallel LSTM neural networks. Adv. Eng. Inform. 2022, 51, 101442. [Google Scholar] [CrossRef]
- Mahjoub, S.; Chrifi-Alaoui, L.; Marhic, B.; Delahoche, L. Predicting Energy Consumption Using LSTM, Multi-Layer GRU and Drop-GRU Neural Networks. Sensors 2022, 22, 4062. [Google Scholar] [CrossRef] [PubMed]
- Rashid, H.; Singh, P.; Stankovic, V.; Stankovic, L. Can non-intrusive load monitoring be used for identifying an appliance’s anomalous behaviour? Appl. Energy 2019, 238, 796–805. [Google Scholar] [CrossRef]
- Khosravani, H.; Castilla, M.; Berenguel, M.; Ruano, A.; Ferreira, P. A Comparison of Energy Consumption Prediction Models Based on Neural Networks of a Bioclimatic Building. Energies 2016, 9, 57. [Google Scholar] [CrossRef]
- Voyant, C.; Notton, G.; Kalogirou, S.; Nivet, M.-L.; Paoli, C.; Motte, F.; Fouilloy, A. Machine learning methods for solar radiation forecasting: A review. Renew. Energy 2017, 105, 569–582. [Google Scholar] [CrossRef]
- Nazir, A.; Shaikh, A.K.; Shah, A.S.; Khalil, A. Forecasting energy consumption demand of customers in smart grid using Temporal Fusion Transformer (TFT). Results Eng. 2023, 17, 100888. [Google Scholar] [CrossRef]
- Wu, H.; Liu, H. Non-intrusive load transient identification based on multivariate LSTM neural network and time series data augmentation. Sustain. Energy Grids Netw. 2021, 27, 100490. [Google Scholar] [CrossRef]
- Smilics Technologies, S.L., Wibeee Box Mono, Technical Description, 2021. Available online: https://smilics.com/ (accessed on 1 November 2019).
- Langevin, A.; Carbonneau, M.-A.; Cheriet, M.; Gagnon, G. Energy disaggregation using variational autoencoders. Energy Build. 2022, 254, 111623. [Google Scholar] [CrossRef]
- Hernández, A.; Nieto, R.; Fuentes, D.; Ureña, J. Design of a SoC Architecture for the Edge Computing of NILM Techniques. In Proceedings of the 2020 XXXV Conference on Design of Circuits and Integrated Systems (DCIS), Segovia, Spain, 18–20 November 2020; pp. 1–6. [Google Scholar]
- Tapiador, M.; de Diego-Otón, L.; Hernández, A.; Nieto, R. Implementing a CNN in FPGA Programmable Logic for NILM Application. In Proceedings of the 2023 38th Conference on Design of Circuits and Integrated Systems (DCIS), Málaga, Spain, 15–17 November 2023; pp. 1–6. [Google Scholar]
No. of Weeks | 1 | 2 | 3 |
---|---|---|---|
No. of inputs | 170 | 338 | 506 |
Structure: LSTM + LSTM + dense + dense | 168/168/672/1 | 336/336/1344/1 | 504/504/2016/1 |
Trainable parameters | 19,309,925 | 153,096,389 | 515,158,565 |
Batch size | 70 | 68 | 65 |
MAE | 0.0598 | 0.0587 | 0.0590 |
MSE | 0.0105 | 0.0107 | 0.0102 |
LSTM Structure | Structure Size | Trainable Parameters | MAE | MSE |
---|---|---|---|---|
LSTM + dense + dense | 336/1344/1 | 152,191,877 | 0.0601 | 0.0106 |
LSTM + dense + dense | 336/512/1 | 58,259,077 | 0.0589 | 0.0106 |
LSTM + LSTM + dense + dense | 336/336/1344/1 | 153,096,389 | 0.0587 | 0.0107 |
LSTM + LSTM + dense + dense | 336/168/512/1 | 29,697,061 | 0.0616 | 0.0107 |
LSTM + LSTM + LSTM + dense + dense | 336/168/84/512/1 | 15,331,381 | 0.0611 | 0.0108 |
CNN Structure | Structure Size | Trainable Parameters | MAE | MSE |
---|---|---|---|---|
CNN + dense + dense | 16/200/1 | 9,620,165 | 0.0645 | 0.0116 |
CNN + CNN + dense + dense | 16/64/200/1 | 14,879,205 | 0.0728 | 0.1340 |
CNN + CNN + CNN + dense + dense | 16/64/64/200/1 | 21,144,101 | 0.0716 | 0.0129 |
Kernel Size | Trainable Parameters | MAE | MSE |
---|---|---|---|
3 × 3 | 9,620,165 | 0.0645 | 0.0116 |
5 × 5 | 7,438,021 | 0.0664 | 0.0117 |
7 × 7 | 5,281,605 | 0.0627 | 0.0130 |
9 × 9 | 3,150,917 | 0.0657 | 0.0113 |
11 × 11 | 1,045,957 | 0.0597 | 0.0107 |
Number of Estimators | MAE | MSE |
---|---|---|
400 | 0.0598 | 0.0098 |
200 | 0.0588 | 0.0097 |
100 | 0.0586 | 0.0097 |
50 | 0.0589 | 0.0099 |
Number of Leaf Nodes | MAE | MSE |
---|---|---|
50,000 | 0.0777 | 0.0211 |
10,000 | 0.0777 | 0.0211 |
5000 | 0.0777 | 0.0211 |
500 | 0.0759 | 0.0211 |
50 | 0.0640 | 0.0143 |
Topology | Features | MAE | MSE |
---|---|---|---|
LSTM | LSTM (336) + dense (512) + dense (1) | 0.0589 | 0.0106 |
CNN | CNN (16, 11 × 11) + dense (200) + dense (1) | 0.0705 | 0.0128 |
RF | 200 estimators | 0.0588 | 0.0097 |
DT | 50 node leafs | 0.0640 | 0.0143 |
LSTM | CNN | RF | DT | |
---|---|---|---|---|
Negative cases (NC) | 895 | 895 | 895 | 895 |
Positive cases (PN) | 12 | 12 | 12 | 12 |
True positive (tp) | 10 | 3 | 4 | 7 |
True negative (tn) | 892 | 892 | 893 | 892 |
False positive (fp) | 2 | 3 | 2 | 3 |
False negative (fn) | 3 | 9 | 8 | 5 |
Accuracy | 0.99 | 0.99 | 0.99 | 0.99 |
Precision | 0.77 | 0.75 | 0.67 | 0.70 |
Recall | 0.83 | 0.25 | 0.33 | 0.58 |
F1-score | 0.80 | 0.38 | 0.44 | 0.63 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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
Hernández, Á.; Nieto, R.; de Diego-Otón, L.; Pérez-Rubio, M.C.; Villadangos-Carrizo, J.M.; Pizarro, D.; Ureña, J. Detection of Anomalies in Daily Activities Using Data from Smart Meters. Sensors 2024, 24, 515. https://doi.org/10.3390/s24020515
Hernández Á, Nieto R, de Diego-Otón L, Pérez-Rubio MC, Villadangos-Carrizo JM, Pizarro D, Ureña J. Detection of Anomalies in Daily Activities Using Data from Smart Meters. Sensors. 2024; 24(2):515. https://doi.org/10.3390/s24020515
Chicago/Turabian StyleHernández, Álvaro, Rubén Nieto, Laura de Diego-Otón, María Carmen Pérez-Rubio, José M. Villadangos-Carrizo, Daniel Pizarro, and Jesús Ureña. 2024. "Detection of Anomalies in Daily Activities Using Data from Smart Meters" Sensors 24, no. 2: 515. https://doi.org/10.3390/s24020515
APA StyleHernández, Á., Nieto, R., de Diego-Otón, L., Pérez-Rubio, M. C., Villadangos-Carrizo, J. M., Pizarro, D., & Ureña, J. (2024). Detection of Anomalies in Daily Activities Using Data from Smart Meters. Sensors, 24(2), 515. https://doi.org/10.3390/s24020515