Anomaly Detection for Electric Energy Consumption in Smart Farms

Yi-Bing Lin, Yun-Wei Lin*, Ling-Han Kao

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review


Electric energy prediction is an important issue and has been studied for many years. The prediction approaches have evolved from traditional statistical methods, conventional machine learning methods, deep learning (DL) methods, and then hybrid deep learning methods. This article proposes ElectricityTalk, an Internet of Things (IoT) platform for smart farms, which integrates the artificial intelligence (AI) mechanism with farming IoT devices for electric energy prediction and anomaly detection. The AI mechanism called AItalk is designed with modified convolution neural network (CNN) and long short-term memory models. Traditional electric energy prediction approaches only consider the information provided by smart meters. This article shows that with the extra IoT switch status information in the smart farm and postprocessing with a simple yet novel random walk model, the performance of ElectricityTalk is significantly improved (by 34.5%) as compared with the AI mechanism without the farming IoT switch information. We show that the mean absolute percentage error of AItalk is 8.62% (for the UCI dataset) and 1.53% (for the Bao farm dataset), which outperforms the previous solutions. We also show that ElectricityTalk detects all anomalies in real farm operations, and can achieve recall of 1 and precision larger than 0.994, which also outperforms the previous solutions. In particular, our mechanism can detect all anomalies in three minutes, which has not been reported in previous studies.
Original languageAmerican English
Pages (from-to)2-14
Number of pages13
JournalIEEE Transactions on AgriFood Electronic
Issue number1
StatePublished - Jun 2023


  • Anomaly detection
  • Internet of Things
  • Energy consumption
  • smart agriculture
  • Predictive models
  • Feature extraction
  • farming


Dive into the research topics of 'Anomaly Detection for Electric Energy Consumption in Smart Farms'. Together they form a unique fingerprint.

Cite this