# Sensor Fault Detection and Classification Using Multi-Step-Ahead Prediction with an Long Short-Term Memoery (LSTM) Autoencoder

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

- A Long Short-Term Memory autoencoder (LSTM AE)-based univariate multi-step-ahead forecasting approach is proposed for sensor fault detection and classification. This method uses only normal sensor data for training.
- A feature extraction step is integrated into the prediction model to enable the detection of multiple types of faults. Additionally, three influential statistical features are reported that better represent bias, drift, and stuck faults in sensors.
- Results obtained from two different datasets are presented to demonstrate the functionality of the proposed approach.

## 2. Related Works

## 3. Materials and Methods

#### 3.1. Datasets

#### 3.1.1. Bias Fault

#### 3.1.2. Drift Fault

#### 3.1.3. Stuck Fault

#### 3.2. Signal Pre-Processing:

#### 3.3. Feature Importance Analysis

#### 3.4. Long Short-Term Memory

#### 3.5. LSTM Autoencoder

#### 3.6. Fault Detection and Classification

Algorithm 1 Multi-step prediction-based fault detection and classification. |

Inputs: Training data: Time series sequence with $\mathcal{T}$ data points, $\mathcal{T}=\left\{{x}_{1},{x}_{2},{x}_{3},\cdots \cdots ,{x}_{\mathcal{T}}\right\}$, Encoder: $\mathcal{E}\left(\xb7\right)$, Decoder: $\mathcal{D}\left(\xb7\right)$, Window size: $\mathcal{w}$, Prediction horizon: $\mathcal{h}$Outputs: Decision on fault detection and fault typeTraining Autoencoder:Create input and output sequences $\left({X}_{i},{Y}_{i}\right)$ for $i=1,2,\cdots ,\mathcal{T}-\mathcal{w}+1$ do${X}_{i}=\left\{{x}_{i},{x}_{i+1},\cdots ,{x}_{i+\mathcal{w}-1}\right\}$ ${Y}_{i}=\left\{{x}_{i+\mathcal{w}},{x}_{i+\mathcal{w}+1},\cdots ,{x}_{i+\mathcal{w}+\mathcal{h}-1}\right\}$ end forfor Each training epochs doEncoder output: ${\mathcal{d}}_{i}=\mathcal{E}\left({X}_{i}\right)$ Decoder output: $\widehat{{Y}_{\mathcal{h}}}=\mathcal{D}\left({\mathcal{d}}_{\mathcal{i}}\right)$ Calculate loss: $\mathcal{L}\left(\widehat{{Y}_{i}},{Y}_{i}\right)={\displaystyle \frac{1}{\mathcal{h}}}{\sum}_{t=1}^{\mathcal{h}}{\left(\widehat{{y}_{i,t}}-{y}_{i,t}\right)}^{2}$ Optimize the model parameters, $\phi $: $\underset{\phi}{minimize}\mathcal{L}\left(\widehat{{Y}_{i}},{Y}_{i}\right)$ end forPrediction, Fault detection and classification:Predict the output sequence: $\widehat{{Y}_{\mathcal{h}}}=D\left(\mathcal{E}\left({X}_{i}\right)\right)$ Compute the four selected features: ${f}_{1}\left(\widehat{{Y}_{\mathcal{h}}}\right),{f}_{2}\left(\widehat{{Y}_{\mathcal{h}}}\right),{f}_{3}\left(\widehat{{Y}_{\mathcal{h}}}\right),{f}_{4}\left(\widehat{{Y}_{\mathcal{h}}}\right)$ Fault detection: ${\mathcal{C}}_{\mathcal{1}}\left({f}_{1},{f}_{2},{f}_{3},{f}_{4}\right)$ = $faul{t}_{detect}$ if $faul{t}_{detect}=True$ thenClassify the fault type: ${\mathcal{C}}_{\mathcal{2}}\left({f}_{1},{f}_{2},{f}_{3},{f}_{4}\right)$ = $faul{t}_{type}$ end ifReturn: Fault detection decision: $faul{t}_{detect}$ Fault classification result: $faul{t}_{type}$ |

## 4. Results and Discussion

#### 4.1. Feature Selection Using SHAP

#### 4.2. Multi-Step-Ahead Prediction by the Autoencoder

#### 4.3. Sensor Fault Detection

#### 4.4. Fault Classification

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Famá, F.; Faria, J.N.; Portugal, D. An IoT-based interoperable architecture for wireless biomonitoring of patients with sensor patches. Internet Things
**2022**, 19, 100547. [Google Scholar] [CrossRef] - Filho, I.d.M.B.; Aquino, G.; Malaquias, R.S.; Girão, G.; Melo, S.R.M. An IoT-Based Healthcare Platform for Patients in ICU Beds During the COVID-19 Outbreak. IEEE Access
**2021**, 9, 27262–27277. [Google Scholar] [CrossRef] - Forcén-Muñoz, M.; Pavón-Pulido, N.; López-Riquelme, J.A.; Temnani-Rajjaf, A.; Berríos, P.; Morais, R.; Pérez-Pastor, A. Irriman platform: Enhancing farming sustainability through cloud computing techniques for irrigation management. Sensors
**2021**, 22, 228. [Google Scholar] [CrossRef] [PubMed] - Mendes, J.; Peres, E.; Neves dos Santos, F.; Silva, N.; Silva, R.; Sousa, J.J.; Cortez, I.; Morais, R. VineInspector: The vineyard assistant. Agriculture
**2022**, 12, 730. [Google Scholar] [CrossRef] - Ahmed, M.A.; Gallardo, J.L.; Zuniga, M.D.; Pedraza, M.A.; Carvajal, G.; Jara, N.; Carvajal, R. LoRa based IoT platform for remote monitoring of large-scale agriculture farms in Chile. Sensors
**2022**, 22, 2824. [Google Scholar] [CrossRef] - Bates, H.; Pierce, M.; Benter, A. Real-time environmental monitoring for aquaculture using a LoRaWAN-based IoT sensor network. Sensors
**2021**, 21, 7963. [Google Scholar] [CrossRef] - Khan, F.; Siddiqui, M.A.B.; Rehman, A.U.; Khan, J.; Asad, M.T.S.A.; Asad, A. IoT based power monitoring system for smart grid applications. In Proceedings of the 2020 International Conference on Engineering and Emerging Technologies (ICEET), Lahore, Pakistan, 22–23 February 2020; pp. 1–5. [Google Scholar]
- Shashank, A.; Vincent, R.; Sivaraman, A.K.; Balasundaram, A.; Rajesh, M.; Ashokkumar, S. Power analysis of household appliances using IoT. In Proceedings of the 2021 International Conference on System, Computation, Automation and Networking (ICSCAN), Puducherry, India, 30–31 July 2021; pp. 1–5. [Google Scholar]
- Kumaran, K. Power theft detection and alert system using IOT. Turk. J. Comput. Math. Educ. (TURCOMAT)
**2021**, 12, 1135–1139. [Google Scholar] - Alam, T. Cloud-based IoT applications and their roles in smart cities. Smart Cities
**2021**, 4, 1196–1219. [Google Scholar] [CrossRef] - Padmanaban, S.; Samavat, T.; Nasab, M.A.; Nasab, M.A.; Zand, M.; Nikokar, F. Electric vehicles and IoT in smart cities. In Artificial Intelligence-Based Smart Power Systems; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2023; pp. 273–290. [Google Scholar]
- Sunny, A.I.; Zhao, A.; Li, L.; Sakiliba, S.K. Low-cost IoT-based sensor system: A case study on harsh environmental monitoring. Sensors
**2020**, 21, 214. [Google Scholar] [CrossRef] [PubMed] - Aryal, S.; Baniya, A.A.; Santosh, K. Improved histogram-based anomaly detector with the extended principal component features. arXiv
**2019**, arXiv:1909.12702. [Google Scholar] - Li, D.; Wang, Y.; Wang, J.; Wang, C.; Duan, Y. Recent advances in sensor fault diagnosis: A review. Sens. Actuators A Phys.
**2020**, 309, 111990. [Google Scholar] [CrossRef] - Wu, H.; Zhao, J. Deep convolutional neural network model based chemical process fault diagnosis. Comput. Chem. Eng.
**2018**, 115, 185–197. [Google Scholar] [CrossRef] - Jan, S.U.; Lee, Y.D.; Shin, J.; Koo, I. Sensor fault classification based on support vector machine and statistical time-domain features. IEEE Access
**2017**, 5, 8682–8690. [Google Scholar] [CrossRef] - Peng, D.; Yun, S.; Yin, D.; Shen, B.; Xu, C.; Zhang, H. A sensor fault diagnosis method for gas turbine control system based on EMD and SVM. In Proceedings of the 2021 Power System and Green Energy Conference (PSGEC), Shanghai, China, 20–22 August 2021; pp. 682–686. [Google Scholar]
- Cheng, X.; Wang, D.; Xu, C.; Li, J. Sensor fault diagnosis method based on-grey wolf optimization-support vector machine. Comput. Intell. Neurosci.
**2021**, 2021, 1956394. [Google Scholar] [CrossRef] - Naimi, A.; Deng, J.; Shimjith, S.; Arul, A.J. Fault detection and isolation of a pressurized water reactor based on neural network and k-nearest neighbor. IEEE Access
**2022**, 10, 17113–17121. [Google Scholar] [CrossRef] - Abed, A.M.; Gitaffa, S.A.; Issa, A.H. Quadratic support vector machine and K-nearest neighbor based robust sensor fault detection and isolation. Eng. Technol. J
**2021**, 39, 859–869. [Google Scholar] [CrossRef] - Saeed, U.; Jan, S.U.; Lee, Y.D.; Koo, I. Fault diagnosis based on extremely randomized trees in wireless sensor networks. Reliab. Eng. Syst. Saf.
**2021**, 205, 107284. [Google Scholar] [CrossRef] - Huang, J.; Li, M.; Zhang, Y.; Mu, L.; Ao, Z.; Gong, H. Fault detection and classification for sensor faults of UAV by deep learning and time-frequency analysis. In Proceedings of the 2021 40th Chinese Control Conference (CCC), Shanghai, China, 26–28 July 2021; pp. 4420–4424. [Google Scholar]
- Gou, L.; Li, H.; Zheng, H.; Li, H.; Pei, X. Aeroengine control system sensor fault diagnosis based on CWT and CNN. Math. Probl. Eng.
**2020**, 2020, 5357146. [Google Scholar] [CrossRef] - Zhao, T.; Zhang, H.; Zhang, X.; Sun, Y.; Dou, L.; Wu, S. Multi-fault identification of iron oxide gas sensor based on CNN-wavelelet-based network. In Proceedings of the 2021 19th International Conference on Optical Communications and Networks (ICOCN), Qufu, China, 23–27 August 2021; pp. 1–4. [Google Scholar]
- Toma, R.N.; Piltan, F.; Kim, J.M. A deep autoencoder-based convolution neural network framework for bearing fault classification in induction motors. Sensors
**2021**, 21, 8453. [Google Scholar] [CrossRef] - Majidi, S.H.; Hadayeghparast, S.; Karimipour, H. FDI attack detection using extra trees algorithm and deep learning algorithm-autoencoder in smart grid. Int. J. Crit. Infrastruct. Prot.
**2022**, 37, 100508. [Google Scholar] [CrossRef] - Jang, K.; Hong, S.; Kim, M.; Na, J.; Moon, I. Adversarial Autoencoder Based Feature Learning for Fault Detection in Industrial Processes. IEEE Trans. Ind. Inform.
**2022**, 18, 827–834. [Google Scholar] [CrossRef] - Thill, M.; Konen, W.; Wang, H.; Bäck, T. Temporal convolutional autoencoder for unsupervised anomaly detection in time series. Appl. Soft Comput.
**2021**, 112, 107751. [Google Scholar] [CrossRef] - Liu, X.; Lin, Z. Impact of Covid-19 pandemic on electricity demand in the UK based on multivariate time series forecasting with Bidirectional Long Short Term Memory. Energy
**2021**, 227, 120455. [Google Scholar] [CrossRef] - Du, S.; Li, T.; Yang, Y.; Horng, S.J. Multivariate time series forecasting via attention-based encoder–decoder framework. Neurocomputing
**2020**, 388, 269–279. [Google Scholar] [CrossRef] - Gangopadhyay, T.; Tan, S.Y.; Jiang, Z.; Meng, R.; Sarkar, S. Spatiotemporal attention for multivariate time series prediction and interpretation. In Proceedings of the ICASSP 2021–2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada, 6–11 June 2021; pp. 3560–3564. [Google Scholar]
- Han, P.; Ellefsen, A.L.; Li, G.; Holmeset, F.T.; Zhang, H. Fault detection with LSTM-based variational autoencoder for maritime components. IEEE Sens. J.
**2021**, 21, 21903–21912. [Google Scholar] [CrossRef] - Kim, Y.; Lee, H.; Kim, C.O. A variational autoencoder for a semiconductor fault detection model robust to process drift due to incomplete maintenance. J. Intell. Manuf.
**2021**, 34, 529–540. [Google Scholar] [CrossRef] - Jana, D.; Patil, J.; Herkal, S.; Nagarajaiah, S.; Duenas-Osorio, L. CNN and Convolutional Autoencoder (CAE) based real-time sensor fault detection, localization, and correction. Mech. Syst. Signal Process.
**2022**, 169, 108723. [Google Scholar] [CrossRef] - Bai, Y.; Zhao, J. A novel transformer-based multi-variable multi-step prediction method for chemical process fault prognosis. Process. Saf. Environ. Prot.
**2023**, 169, 937–947. [Google Scholar] [CrossRef] - Saha, S.; Haque, A.; Sidebottom, G. Analyzing the Impact of Outlier Data Points on Multi-Step Internet Traffic Prediction using Deep Sequence Models. IEEE Trans. Netw. Serv. Manag.
**2023**, 20, 1345–1362. [Google Scholar] [CrossRef] - Wan, X.; Farmani, R.; Keedwell, E. Gradual Leak Detection in Water Distribution Networks Based on Multistep Forecasting Strategy. J. Water Resour. Plan. Manag.
**2023**, 149, 04023035. [Google Scholar] [CrossRef] - Zhao, H.; Chen, Z.; Shu, X.; Shen, J.; Liu, Y.; Zhang, Y. multi-step-ahead voltage prediction and voltage fault diagnosis based on gated recurrent unit neural network and incremental training. Energy
**2023**, 266, 126496. [Google Scholar] [CrossRef] - Guo, B.; Zhang, Q.; Peng, Q.; Zhuang, J.; Wu, F.; Zhang, Q. Tool health monitoring and prediction via attention-based encoder–decoder with a multi-step mechanism. Int. J. Adv. Manuf. Technol.
**2022**, 122, 685–695. [Google Scholar] [CrossRef] - Liu, W.X.; Yin, R.P.; Zhu, P.Y. Deep Learning Approach for Sensor Data Prediction and Sensor Fault Diagnosis in Wind Turbine Blade. IEEE Access
**2022**, 10, 117225–117234. [Google Scholar] [CrossRef] - Hasan, M.N.; Jan, S.U.; Koo, I. Wasserstein GAN-based digital twin-inspired model for early drift fault detection in wireless sensor networks. IEEE Sens. J.
**2023**, 23, 13327–13339. [Google Scholar] [CrossRef] - Kwon, H.; Lee, S. Friend-guard adversarial noise designed for electroencephalogram-based brain–computer interface spellers. Neurocomputing
**2022**, 506, 184–195. [Google Scholar] [CrossRef] - Ko, K.; Kim, S.; Kwon, H. Multi-targeted audio adversarial example for use against speech recognition systems. Comput. Secur.
**2023**, 128, 103168. [Google Scholar] [CrossRef] - Safavi, S.; Safavi, M.A.; Hamid, H.; Fallah, S. Multi-sensor fault detection, identification, isolation and health forecasting for autonomous vehicles. Sensors
**2021**, 21, 2547. [Google Scholar] [CrossRef] - Darvishi, H.; Ciuonzo, D.; Eide, E.R.; Rossi, P.S. Sensor-fault detection, isolation and accommodation for digital twins via modular data-driven architecture. IEEE Sens. J.
**2020**, 21, 4827–4838. [Google Scholar] [CrossRef] - Zhou, H.; Zhang, S.; Peng, J.; Zhang, S.; Li, J.; Xiong, H.; Zhang, W. Informer: Beyond efficient transformer for long sequence time-series forecasting. AAAI Conf. Artif. Intell.
**2021**, 35, 11106–11115. [Google Scholar] [CrossRef] - Suthaharan, S.; Alzahrani, M.; Rajasegarar, S.; Leckie, C.; Palaniswami, M. Labelled data collection for anomaly detection in wireless sensor networks. In Proceedings of the 2010 sixth international conference on intelligent sensors, sensor networks and information processing, Brisbane, QLD, Australia, 7–10 December 2010; pp. 269–274. [Google Scholar]
- Saeed, U.; Lee, Y.D.; Jan, S.U.; Koo, I. CAFD: Context-aware fault diagnostic scheme towards sensor faults utilizing machine learning. Sensors
**2021**, 21, 617. [Google Scholar] [CrossRef] - Gao, L.; Li, D.; Yao, L.; Gao, Y. Sensor drift fault diagnosis for chiller system using deep recurrent canonical correlation analysis and k-nearest neighbor classifier. ISA Trans.
**2022**, 122, 232–246. [Google Scholar] [CrossRef] [PubMed] - Sun, Y.; Zhang, H.; Zhao, T.; Zou, Z.; Shen, B.; Yang, L. A new convolutional neural network with random forest method for hydrogen sensor fault diagnosis. IEEE Access
**2020**, 8, 85421–85430. [Google Scholar] [CrossRef] - Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; pp. 4765–4774. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Comput.
**1997**, 9, 1735–1780. [Google Scholar] [CrossRef] - Suresh, V.; Aksan, F.; Janik, P.; Sikorski, T.; Revathi, B.S. Probabilistic LSTM-Autoencoder Based Hour-Ahead Solar Power Forecasting Model for Intra-Day Electricity Market Participation: A Polish Case Study. IEEE Access
**2022**, 10, 110628–110638. [Google Scholar] [CrossRef] - Aksan, F.; Li, Y.; Suresh, V.; Janik, P. Multistep Forecasting of Power Flow Based on LSTM Autoencoder: A Study Case in Regional Grid Cluster Proposal. Energies
**2023**, 16, 5014. [Google Scholar] [CrossRef] - Jan, S.U.; Lee, Y.D.; Koo, I.S. A distributed sensor-fault detection and diagnosis framework using machine learning. Inf. Sci.
**2021**, 547, 777–796. [Google Scholar] [CrossRef]

**Figure 11.**Fault detection performance for different classifiers: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

**Figure 12.**Fault classification performance for different classifiers: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

**Figure 13.**Improved fault classification performance for different classifiers: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

**Figure 14.**Fault detection performance for different classifiers with the WSN dataset: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

**Figure 15.**Fault classification performance for the different classifiers with the WSN dataset: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

**Figure 17.**Fault classification performance from the different classifiers with the WSN dataset when considering multiple prediction horizons: (

**a**) random forest, (

**b**) XGBoost, (

**c**) SVM, (

**d**) KNN, and (

**e**) LightGBM.

Reference | Dataset | Time Series Type | Model | Features | Task |
---|---|---|---|---|---|

[16] | Temperature signal collected by Arduino | Univariate | SVM | Statistical features | Classification |

[17] | Gas turbine sensor data collected from simulator | Univariate | SVM | EMD based features | Classification |

[18] | Sensor data published by Intel lab | Multivariate | SVM with Grey-Wolf Optimization | Feature extracted by Kernel Principle Component Analysis | Classification |

[19] | Various sensor data collected from pressurized water reactor | Univariate | SVM, KNN, NN | - | Classification |

[21] | Temperature and humidity sensor signal from a wireless sensor network setup | Multivariate | SVM, RF, DT, Extra-Trees | - | Classification |

[22] | Altitude barometer sensor signal collected from an UAV | Univariate | CNN | Time frequency images | Classification |

[23] | Various sensor data collected from aeroengine control system | Univariate | CNN | CWT scalograms | Classification |

[33] | Sensor signal from semiconductor manufacturing process | Univariate | VAE | - | Classification |

[34] | Synthetic data generated from shear-type structure and experimental data from an arc bridge structure | Mutivariate | CNN and CAE | - | Detection, classification, and correction |

[44] | Sensor data derived from autonomous driving dataset | Univariate | 1D CNN and DNN | Time domain statistical features | Detection, classification, and isolation |

[45] | Sensor data from air quality dataset, WSN dataset, and Permanene Magnet Synchronous Dataset | Multivariate | ANN based digital twin concept | - | Detection, classification, and accommodation |

Feature Name | Mathematical Expression |
---|---|

Minimum | $min\left({\mathit{y}}_{\mathit{i}}\right)$ |

Maximum | $max\left({\mathit{y}}_{\mathit{i}}\right)$ |

Mean | $\mu ={\displaystyle \frac{1}{N}}{\sum}_{i=1}^{N}{\mathit{y}}_{\mathit{i}}$ |

Standard deviation | $\sigma =\sqrt{{\displaystyle \frac{{\sum}_{i=1}^{N}{\left({\mathit{y}}_{\mathit{i}}-\mu \right)}^{2}}{N}}}$ |

Kurtosis | $\mathcal{K}={\displaystyle \frac{1}{N}}{\sum}_{i=1}^{N}{\displaystyle \frac{{\left({\mathit{y}}_{\mathit{i}}-\mu \right)}^{4}}{{\sigma}^{4}}}$ |

Skewness | $\mathcal{S}={\displaystyle \frac{1}{N}}{\sum}_{i=1}^{N}{\displaystyle \frac{{\left({\mathit{y}}_{\mathit{i}}-\mu \right)}^{3}}{{\sigma}^{3}}}$ |

Root mean square (RMS) | ${\mathit{y}}_{RMS}=\sqrt{{\displaystyle \frac{1}{N}}{\sum}_{i=1}^{N}\left|{{\mathit{y}}_{\mathit{i}}}^{2}\right|}$ |

Crest factor | $\mathcal{C}\mathcal{F}={\displaystyle \frac{max\left({\mathit{y}}_{\mathit{i}}\right)}{{{\mathit{y}}_{\mathit{i}}}_{RMS}}}$ |

Shape factor | $\mathcal{S}\mathcal{F}={\displaystyle \frac{{\mathit{y}}_{RMS}}{\frac{1}{N}{\sum}_{i=1}^{N}\left|{\mathit{y}}_{\mathit{i}}\right|}}$ |

Impulse factor | $\mathcal{I}\mathcal{F}={\displaystyle \frac{{\mathit{y}}_{peak}}{\frac{1}{N}{\sum}_{i=1}^{N}\left|{\mathit{y}}_{\mathit{i}}\right|}}$ |

Clearance factor | $\mathcal{C}\mathcal{L}\mathcal{F}={\displaystyle \frac{{\mathit{y}}_{peak}}{{\left(\frac{1}{N}{\sum}_{i=1}^{N}\sqrt{\left|{\mathit{y}}_{\mathit{i}}\right|}\right)}^{2}}}$ |

Variance | ${\mathcal{S}}^{2}={\displaystyle \frac{{\sum}_{i=1}^{N}({\mathit{y}}_{\mathit{i}}-\mu )}{n-1}}$ |

Energy | $\mathcal{E}={\sum}_{n=-\infty}^{\infty}{\left|{\mathit{y}}_{n}\right|}^{2}$ |

Power | $\mathcal{P}={lim}_{N\to \infty}{\displaystyle \frac{1}{N}}{\sum}_{n=0}^{n=N-1}{\left|\mathit{y}\left(n\right)\right|}^{2}$ |

Peak to rms | $\frac{{y}_{peak}}{{\mathit{y}}_{rms}}$ |

Range | ${\mathit{y}}_{max}-{\mathit{y}}_{min}$ |

Model 1 | ||||
---|---|---|---|---|

Input Window | Prediction Horizon | Batch Size | Epochs | MSE |

20 | 20 | 64 | 200 | 0.0588 |

20 | 20 | 32 | 200 | 0.0572 |

20 | 20 | 20 | 200 | 0.0582 |

Model 2 | ||||

20 | 20 | 64 | 100 | 0.0410 |

20 | 20 | 32 | 100 | 0.0596 |

20 | 20 | 16 | 100 | 0.0531 |

Classifier | Accuracy | Precision | Recall | F1 Score |
---|---|---|---|---|

Random forest | $93.39\%$ | $95.47\%$ | $91.98\%$ | $93.70\%$ |

XGBoost | $93.84\%$ | $95.12\%$ | $93.25\%$ | $94.18\%$ |

SVM | $92.34\%$ | $92.00\%$ | $93.81\%$ | $92.90\%$ |

KNN | $93.24\%$ | $95.467\%$ | $91.70\%$ | $93.54\%$ |

LightGBM | $93.47\%$ | $94.83\%$ | $92.83\%$ | $93.82\%$ |

Random Forest | ||||
---|---|---|---|---|

Bias Fault | Drift Fault | Stuck Fault | Average | |

Precision | $64.21\%$ | $72.48\%$ | $100\%$ | $78.90\%$ |

Recall | $63.54\%$ | $73.91\%$ | $99.04\%$ | $78.83\%$ |

F1-Score | $63.87\%$ | $73.19\%$ | $99.52\%$ | $78.86\%$ |

Accuracy | $81.82\%$ | $78.89\%$ | $99.60\%$ | $86.77\%$ |

XGBoost | ||||

Precision | $66.32\%$ | $74.80\%$ | $100\%$ | $80.37\%$ |

Recall | $66.67\%$ | $75.10\%$ | $99.36\%$ | $80.38\%$ |

F1-score | $66.49\%$ | $74.95\%$ | $99.68\%$ | $80.37\%$ |

Accuracy | $83.00\%$ | $83.27\%$ | $99.74\%$ | $88.67\%$ |

SVM | ||||

Precision | $66.39\%$ | $65.85\%$ | $99.68\%$ | $77.31\%$ |

Recall | $42.19\%$ | $84.58\%$ | $99.04\%$ | $75.27\%$ |

F1-score | $51.59\%$ | $74.05\%$ | $99.36\%$ | $75.00\%$ |

Accuracy | $79.97\%$ | $80.24\%$ | $99.47\%$ | $86.56\%$ |

KNN | ||||

Precision | $63.54\%$ | $71.16\%$ | $100\%$ | $78.23\%$ |

Recall | $59.90\%$ | $75.10\%$ | $99.04\%$ | $78.01\%$ |

F1-score | $61.60\%$ | $73.08\%$ | $99.52\%$ | $78.07\%$ |

Accuracy | $81.16\%$ | $81.55\%$ | $99.60\%$ | $87.44\%$ |

LightGBM | ||||

Precision | $64.97\%$ | $74.40\%$ | $100\%$ | $79.79\%$ |

Recall | $66.67\%$ | $73.52\%$ | $99.36\%$ | $79.85\%$ |

F1-score | $65.81\%$ | $73.96\%$ | $99.68\%$ | $79.81\%$ |

Accuracy | $82.48\%$ | $82.74\%$ | $99.74\%$ | $88.32\%$ |

Random Forest | |||
---|---|---|---|

Normal | Faulty | Average | |

Precision | $96.98\%$ | $97.82\%$ | $97.40\%$ |

Recall | $97.67\%$ | $97.18\%$ | $97.43\%$ |

F1-score | $97.33\%$ | $97.50\%$ | $97.41\%$ |

Accuracy | $97.42\%$ | $97.42\%$ | $97.42\%$ |

XGBoost | |||

Precision | $97.29\%$ | $97.28\%$ | $97.28\%$ |

Recall | $97.09\%$ | $97.46\%$ | $97.28\%$ |

F1-score | $97.19\%$ | $97.37\%$ | $97.28\%$ |

Accuracy | $97.28\%$ | $97.28\%$ | $97.28\%$ |

SVM | |||

Precision | $96.18\%$ | $97.07\%$ | $96.62\%$ |

Recall | $96.86\%$ | $96.43\%$ | $96.65\%$ |

F1-score | $96.52\%$ | $96.75\%$ | $96.63\%$ |

Accuracy | $96.64\%$ | $96.64\%$ | $96.64\%$ |

KNN | |||

Precision | $96.98\%$ | $97.55\%$ | $97.26\%$ |

Recall | $97.37\%$ | $97.18\%$ | $97.27\%$ |

F1-score | $97.17\%$ | $97.27\%$ | $97.27\%$ |

Accuracy | $97.27\%$ | $97.27\%$ | $97.27\%$ |

LightGBM | |||

Precision | $96.77\%$ | $97.36\%$ | $97.07\%$ |

Recall | $97.17\%$ | $96.99\%$ | $97.08\%$ |

F1-score | $96.97\%$ | $97.18\%$ | $97.07\%$ |

Accuracy | $97.08\%$ | $97.08\%$ | $97.08\%$ |

Reference | Model | Faults Considered | Task | Performance Metric (Accuracy) |
---|---|---|---|---|

[16] | SVM | Drift, bias, stuck, spike, erratic | Fault classification | $100\%$ |

[21] | ET | Drift, bias, stuck, spike, erratic, dataloss, random | Fault classification | $81\%$ |

[48] | ET | Drift, bias, stuck, spike, erratic, dataloss, random | Fault classification | $90\%$ |

[45] | Multi-layer perceptron | Drift, bias | Fault detection and classification | $89.8\%$ and $86\%$ |

[22] | DNN | Drift, bias | Fault classification | $99.6\%$ |

[49] | BLCCA | Drift | Fault classification | $92.40\%$ |

[55] | FDNN | Drift, bias, stuck, spike, degradation | Fault classification | $92.89\%$ |

This paper | LSTM-based multi-step prediction | Drift, bias, stuck | Fault detection and classification | 93∼97% and $100\%$ |

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

**MDPI and ACS Style**

Hasan, M.N.; Jan, S.U.; Koo, I.
Sensor Fault Detection and Classification Using Multi-Step-Ahead Prediction with an Long Short-Term Memoery (LSTM) Autoencoder. *Appl. Sci.* **2024**, *14*, 7717.
https://doi.org/10.3390/app14177717

**AMA Style**

Hasan MN, Jan SU, Koo I.
Sensor Fault Detection and Classification Using Multi-Step-Ahead Prediction with an Long Short-Term Memoery (LSTM) Autoencoder. *Applied Sciences*. 2024; 14(17):7717.
https://doi.org/10.3390/app14177717

**Chicago/Turabian Style**

Hasan, Md. Nazmul, Sana Ullah Jan, and Insoo Koo.
2024. "Sensor Fault Detection and Classification Using Multi-Step-Ahead Prediction with an Long Short-Term Memoery (LSTM) Autoencoder" *Applied Sciences* 14, no. 17: 7717.
https://doi.org/10.3390/app14177717