You are on page 1of 6

sCalib: A Warehouse Sensor Fault Detection and

Self-Calibration Technique for Sustainable IoT


Aparna Sinha Debanjan Das
2021 IEEE 18th India Council International Conference (INDICON) | 978-1-6654-4175-9/21/$31.00 ©2021 IEEE | DOI: 10.1109/INDICON52576.2021.9691676

Dept. of Electronics and Communication Engineering Dept. of Electronics and Communication Engineering
IIIT Naya Raipur IIIT Naya Raipur
Chhattisgarh, India Chhattisgarh, India
Email: aparna.sinha@ieee.org Email: debanjan@ieee.org

Abstract—The utility of the deployment of IoT sensor nodes of to communicate sensor health for efficient and sustainable
in Smart Cities is mainly dependent on the accurate data Smart Warehouse service, as shown in Fig. 1.
generated by the sensors. Hence, automatic detection of sensor
faults and self-calibration of the faulty sensors is essential for
the uninterrupted operation of Sustainable IoT. This paper
presents the sCalib technique for this purpose, considering the
temperature sensors in a warehouse as an example. Suppose
one of the sensors in the warehouse becomes inaccurate due to Cloud
drift or similar reasons; in that case, sCalib can identify the fault Server
and automatically calibrate the faulty sensor using another non-
faulty sensor, which is placed nearby, as a standard sensor. The
fault identification module was trained using several Machine IoT
Learning algorithms, among which the K Nearest Neighbours Smart Gateway
(KNN) produced highest accuracy results. The calibration mod- Warehouse
ule uses a straightforward algorithm, has low computational
complexity and is capable of calibrating the sensor in a few User
IoT
minutes. This mechanism uses edge as a service for automatic Interface
Sensors
fault detection and self-calibration and ensures that the deployed
sensors can work for a long time without external interference. Fig. 1. Overview of the proposed IoT-based solution for a Smart Warehouse.
Index Terms—Sustainable IoT, Sensor, Self-calibration, Fault
detection.
Some of the most commonly occurring sensor faults
are drift, bias, precision degradation, and complete failure.
I. I NTRODUCTION
Among these, the sensor drift fault is a time-varying offset,
The Internet of Things (IoT) comprises of a network where the sensed data deviates from the original formula of
of physical objects embedded with sensors, actuators, and calibration at a very slow rate [5]. The sensor’s structural
software connected to the internet, that can exchange their parameters or the surrounding environment give rise to drift.
data for value. The physical and virtual integration of IoT in It is challenging to detect drift initially, and so its early
factories or everywhere, as the core application, resulted in detection and correction is crucial [6]. The fault detection
the “Industry 4.0 policy” [1]. The Smart Warehouse stores can be done using Machine Learning (ML)-based algorithms
raw materials and manufactured goods in one place and uses with low complexity, since the model must be deployed in the
robotics, IoT, and Artificial Intelligence (AI) to manage the edge.The ML models such as Naı̈ve Bayes (NB) Classifier, k-
various operations, save resources and create a more efficient Nearest Neighbour (KNN), Support Vector Machine (SVM),
working place [2]. Sensors are an essential part of the IoT Decision Tree Classifier, etc. were considered in this paper,
network as they assist in the data acquisition process. Like and the algorithm with the highest accuracy was selected for
every electronics component, sensors are also fault-prone fault detection.
due to manufacturing variation, hardware malfunction, aging, After the fault is detected, attempts must be made to
misplacement, or harsh environmental conditions [3]. The calibrate the faulty sensor. However, faults due to hardware
failure of sensors in critical systems may lead to system desta- defects cannot be rectified and must be replaced. For the
bilization [4]. If the sensor malfunctions, then the erroneous practical deployment of IoT, multiple low-cost redundant
data may indicate a fault in the related system. Therefore, the sensors are placed in the same region to add robustness and
early detection of sensor faults is essential so that they may make the systems fail-safe [7]. In this paper, these redundant
be corrected in time for an uninterrupted supply of accurate sensors are used to self-calibrate the faulty sensors used to
sensor data. A resilient IoT-based solution has been thought monitor a Smart Warehouse.
978-1-6654-4175-9/21/$31.00 ©2021 IEEE The major contributions of this paper are:

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.
Fault Identification
Is
Module
Yes Calibration No
Successful
?
Fault Identification IoT Gateway
Module
Fault Detected

Fault Identification Search for


Module Similar Sensor
No Fault in the vicinity Cloud Server

Sensor
Fault Identification Found
User Alert
Module
Self-Calibration
Module
Smart Warehouse Layout
Edge Computation

Fig. 2. sCalib for Sensor Fault Detection and Self-Calibration - Our Vision.

• This paper proposes a straightforward method that not sensory devices forms an elaborate network that monitors
only detects sensor fault, but also automatically self- the optimal conditions inside the warehouse. This ensures
calibrates the sensor. The complete automation makes the state of the materials stored and also the overall safety
it fit for low-power IoT applications. A small training of the warehouse. In this paper, we have proposed a self-
dataset was used, so the storage requirement is reduced. sustaining IoT network that monitors its surroundings and can
• The proposed sCalib technique can operate completely identify the faults in its sensors and automatically calibrating
on-board. Only the message related to failed calibration when needed. The overall vision of the sCalib is depicted in
is transmitted to the Cloud. This reduces the power Fig. 2. When the fault identification module detects a fault
required by the transmitter, making it suitable for low- in any sensor, it searches for a non-faulty sensor of the same
powered IoT applications. kind in the vicinity. The faulty sensor is calibrated, taking the
• When the sensor fault is detected, the sCalib automati- non-faulty sensor as the standard. It is to be noted that the
cally selects a non-faulty sensor of a similar type in the sensor node transmits correct monitoring data even when the
vicinity for self-calibration. Hence, the sensor nodes can calibration mode is on. In cases of unsuccessful calibration,
operate for a long time without any human intervention. the system sends an alert to the authorities to change the faulty
The rest of the paper is organised as follows: IoT-based sensor.
sCalib technique is mentioned in Section II. Existing related III. R ELATED P RIOR R ESEARCH AND R ESEARCH G APS
research works are stated in Section III. The methodology
An IoT-based smart Warehouse Management System
used for fault detection and self-calibration are explained in
(WMS) that used several sensors and RFID tags to track
Section IV. The accuracy and the efficiency of the sCalib
the location and safety of the goods was proposed in [1].
are summed up in Section V. Finally, the complete paper is
Another smart WMS concept that covers the entire workflow
summarized in Section VI.
in the warehouse and is capable of anomaly detection in the
processes was discussed in [2]. But none of these methods
II. S C ALIB : O UR V ISION FROM A B ROAD S MART
considered the faults occurring in the sensors deployed in the
WAREHOUSE P ERSPECTIVE
smart warehouse.
The Industrial IoT (IIoT) involves developing futuristic Real-time sensor drift fault detection using several Machine
applications so that the maximum level of automation may be Learning (ML) models was proposed in [8]. Several types
achieved with minimum human interference. This reduces hu- of sensor faults were identified using SVM in [9]. A sensor
man error, time, and cost and increases the overall efficiency fault forecasting technique using the ARIMA model was
of the industrial sectors. In this work, a Smart Warehouse is given in [4]. But, the sensor calibration technique was not
considered as an example where IoT is deployed. The com- covered in these works. A Calibration method using a multi-
bination of computational hardware, software, and physical sensor data fusion technique was discussed in [7], but it needs

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.
specialized sensor hardware for the purpose. Neural Network-
based Air Pollution Monitoring Sensor Calibration methods
were proposed in [10] and [11], where other correlated
environmental parameters were used to calibrate the faulty
sensor. A calibration technique using a complex Finite State
Machine (FSM) is presented in [3] for Smart Agriculture, but
the farmer needs to insert the standard sensor manually for the
calibration process to begin when the fault is detected. The
major research gaps that have been addressed in the current
paper are:
• Although several papers exist regarding sensor fault
Fig. 4. The drift fault increasing linearly from the normal signal.
identification, only a few of them talks about sensor
calibration.
• One of the most explored calibration research areas is linearly from the normal condition. Since the faulty data was
the Air Pollution Monitoring Sensor Calibration. The injected in the original data through simulation, the output
model depends upon complex statistical calculations of temperature Tdrif t for temperature T is given in Eq. (1) [8]
correlations between different environmental parameters,
which alter with changing climatic conditions. Tdrif t = T + x, (1)
• In Smart Agriculture applications, the calibration process
where x is the drift fault value, ranging between 0.001-0.005.
is not fully automated as the farmer needs to add the non-
Fig. 4 shows a part of the dataset along with the injected drift
faulty sensor to begin the calibration process. Thus, this
fault if no sensor calibration is done.
method is not suitable for remote IoT applications.
For feature extraction and dimension reduction, only one
IV. T HE P ROPOSED FAULT I DENTIFICATION AND extracted feature was considered for data-driven algorithms.
S ELF -C ALIBRATION T ECHNIQUE : A DATA -D RIVEN As the overall mean of the signal amplitude is affected by the
A PPROACH occurrence of the fault so the feature Mean (x) is extracted,
which is given by the Eq. (2)
The process flow to detect and self-calibrate the sensor
n
fault is depicted in Fig. 3. The following subsections contain 1X
x= xi . (2)
detailed description of the sCalib technique. n i=1

Normal Data
This extraction of single feature reduces the computational
Data Dataset
complexity and allows the model to execute easily in the edge.
Acquisition Formation
Temperature
Faulty Data
B. Fault Detection Module
Sensor SX Fault Injection
Feature Extraction Several powerful Machine Learning algorithms, such as
Search for Similar Yes Is Fault ML Model Training SVM, Decision Tree, Naı̈ve Bayes and KNN, were applied
No
Sensor in the Detected
?
to the dataset. The most efficient algorithm can be considered
vicinity Testing
for deployment in the Fault Detection module.
Data Self-Calibration Output The SVM categorizes the two-classes by extracting a hy-
Collection Module Fault Identification perplane from the dataset of each class [9]. The mathematical
Temperature Module
Sensor SY expression for the optimized hyperplane is given in Eq. (3)
Is
Calibration Failed! No
wT x + b = 0,
Calibration Yes
Please change the
Sensor!
Successful (3)
? Calibration
Table for SX
Sample from SX
Sample from SY
where w, x, and b are the weights vector, input vector, and
the bias respectively. The built-in SVC-function is used for
Fig. 3. A simple flowchart representing the process flow for sensor fault training the SVM. The kernel function of SVM is shown in
identification and self-calibration. Eq. (4)
K(x, y) = φ(x)T φ(y). (4)
A. Data Acquisition and Feature Extraction The commonly used kernels are Linear, Radial Basis Function
The dataset used in this paper is drawn from experiments (RBF), and Polynomial. Among these, the Polynomial kernel
performed in the Intel Berkeley Research lab [12]. Only a part gave the highest accuracy. The cost parameter (C) was set as
of the temperature sensor data for Mote 1 was considered. 1 (default value).
Since the data was noisy, so the moving average method The Decision Tree Classifier is an all-purpose ML algo-
was applied to the dataset for noise reduction. When the drift rithm, in which the data is broken into smaller subsets to
fault occurs, the sensor’s output tends to increase or decrease form a tree with leaf nodes and decision nodes [8]. The

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.
DecisionTreeClassifier function was utilised for training the Algorithm 1 : Self-Calibration Algorithm
model. 1: Receive Calibration Request for Sx with Sensor ID
The NB Classifier uses the Bayes theorem to classify the 2: Select Nearby Similar Sensor Sy
data probabilistically as given in Eq. (5) [8] 3: for (∀ a in Tx ) do
P (B|A)P (A) 4: State = Initial
P (A|B) = , (5) 5: Receive sample ay from Sy
P (B)
6: if Error 6 2% then
where P (A) and P (B) are probabilities of occurrence of 7: State = Steady.
events A and B respectively. P (A|B) refers to the probability 8: else
of A when B is true, and P (B|A) is the probability of B 9: Tx (VX ) ← ay .
when A is true. Although there are various NB Classifiers 10: State = Transient.
available, such as Multinomial, Bernoulli and Gaussian, the 11: end if
GaussianNB function was utilized in this work for fault 12: if State = Steady then
detection due to its higher accuracy. 13: Send Calibration Successful Message.
The KNN algorithm is a simple, widely-used, non- 14: else
parametric classification method, which selects the k nearest 15: Send Calibration Failed Message.
neighbours. Choosing the parameter k (the number of nearest 16: end if
neighbours to a selected object) is very crucial in case of 17: end for
KNN. In this paper, Minkowski distance metric is utilized with
k = 2. The ML algorithm that gives the highest efficiency and
accuracy will be deployed in the Fault Identification module. V. R ESULTS AND D ISCUSSION
C. Automatic Self-Calibration Algorithm
A. Fault Identification
In sCalib, we created a technique to automatically calibrate
a faulty sensor. The Calibration function is incorporated by In the case of the sensor data, the incorrect data is usu-
associating each sensor deployed in a Smart Warehouse with a ally much less compared to correct data. Hence, the class
Calibration Table. So, the temperature sensor Sx is associated imbalance issue arises. The Confusion Matrix provides more
the Calibration Table Tx . The most recent data from Sx is insight into the fault prediction module’s performance than the
stored in the variable Vx . At the beginning, Sx does not need Accuracy value for classifying an imbalanced dataset. It gives
calibration and Tx is empty; hence sample ax from Sx is a clear idea of which classes are predicted accurately and the
filled into Tx . When the Fault Identification Module detects types of error being made [14]. The Confusion Matrices for
a fault in Sensor Sx , the sCalib automatically searches for a SVM, Decision Tree Classifier, Naı̈ve Bayes, and KNN are
non-faulty Sensor Sy in the vicinity, that has the same type given in Fig. 5.
as Sx . The Calibration Table Tx is modified by data collected
Confusion Matrix Confusion Matrix
from Sy to be used in the Calibration method.
The Calibration method is dependent on the value of error
True Labels

calculated between the samples obtained from Sx and Sy ,


True Labels

which is shown in Eq. (6)


Tx (Vy ) − ay
δx (ay ) = , (6)
ay
where the output from Sx and Sy at the same time are Predicted Labels
(a)
Predicted Labels
(b)
denoted by ax and ay respectively. The maximum permissible Confusion Matrix Confusion Matrix
error between the standard sensor and the faulty sensor under
consideration is 2% [13]. If the error value is less than or equal
True Labels

True Labels

to 2%, then the program reaches Steady state. If it is greater


than 2%, then it goes to Transient state and the Calibration
Table Tx gets modified by ay . The details of the Calibration
process is given in Algorithm 1.
For better results, the if-else statements from Step 6 to Predicted Labels Predicted Labels
(c)
Step 11 may be repeated several times for a specific sample. (d)

However, more repetitions will increase the computation time Fig. 5. Confusion Matrix for (a) SVM using polynomial kernel, (b) Decision
to a large extent. So, the repetition is allowed only twice to Tree Classifier (c) Naı̈ve Bayes Classifier (d) KNN with k=2.
optimize the performance of the Self-Calibration module [3].
If the final state is Transient, then the calibration process fails. The performance metrics such as Precision, Recall, F1-
If the final state is Steady, then the sensor is successfully Score, and Accuracy are obtained from the Confusion Matrix
calibrated. by the Equations (7)-(10).

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.
(b) (c) (d)

(a) (b)

(c) (d)

Fig. 6. Examples of successful calibration (a) Complete dataset considered with drift fault generated randomly in three regions, (b) Enlarged view of Region
1, (c) Enlarged view of Region 2, (d) Enlarged view of Region 3.

TABLE I
TP S IMULATION R ESULTS C OMPARISON FOR D IFFERENT ML A LGORITHMS
P recision = (7)
TP + FP
ML Fault Preci- F1-
TP Recall Accuracy
Used Condition sion Score
Recall = (8)
TP + FN SVM
Drift 98% 97% 97%
97.84375%
Normal 98% 98% 98%
2 × P recision × Recall Decision Drift 97% 97% 97%
98.125%
F 1 − Score = (9) Tree Normal 99% 99% 99%
P recision + Recall Naı̈ve Drift 100% 82% 90%
93.15625%
Bayes Normal 90% 100% 95%
TP + TN Drift 97% 99% 98%
Accuracy = (10) KNN
Normal 100% 98% 99%
98.65625%
TP + FN + TN + FP
where TP, TN, FP, and FN refer to True Positive, True
Negative, False Positive, and False Negative respectively.
Precision is the percentage that is truly positive among all for Fault Identification Module in this paper. The KNN
the predicted positive. Recall is the percentage of predicted outperformed other classifiers because the dataset is small,
positive, out of the total positive. F1-Score refers to the low-dimensional and has no outliers. The Naı̈ve Bayes gave
harmonic mean of Precision and Recall. Even if the data is the lowest values for accuracy and recall.
imbalanced, the efficiency of the model can be determined Computational Efficiency: The time taken for the KNN
from these metrics. The value of precision and recall must be model to operate is less than one second; this evaluation was
high for the model to work well. The performance metrics conducted in an off-the-shelf computing device that has 1 GB
values for the different Machine Learning algorithms applied RAM capacity and 900 MHz CPU clock speed.
are shown in Table I.
From the Table I, we can observe that KNN, SVM and B. Self-Calibration
Decision Tree give high and nearly similar values for Pre- In this example, the drift fault has been injected randomly
cision and Recall. Hence, all the three models are suitable in three separate regions to test the efficiency of the Self-
for deployment in the sensor nodes for fault detection. But calibration module. The sensor goes into the calibration mode
since the accuracy of the KNN is highest, so it is considered when the Fault Identification Module detects the fault. After

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.
the sensory data gets calibrated successfully, the sensor gives Warehouse. Apart from fault identification, a sensor fault
correct data readings. The example results are depicted in Fig. prediction model can also be built to forecast sensor health.
6, where it can be seen how the calibration is done efficiently Thus, a comprehensive IoT-based solution can be regarded for
within a short time. The dotted lines depict the faulty sensor future work that can efficiently predict, identify, and calibrate
data if no calibration is done. all types of sensor faults.

TABLE II R EFERENCES
T IME TAKEN BY THE S ELF -C ALIBRATION M ODULE TO C ALIBRATE THE [1] W.-T. Sung and C.-Y. Lu, “Smart Warehouse Management Based on
FAULTY S ENSOR IoT Architecture,” in 2018 International Symposium on Computer,
Consumer and Control (IS3C). IEEE, 2018, pp. 169–172.
Drift Fault Time to Start Time taken for [2] E. Žunić, S. Delalić, K. Hodžić, A. Beširević, and H. Hindija,
Region “Smart Warehouse Management System Concept with Implementa-
Value Calibration (s) Calibration (s)
tion,” in 2018 14th Symposium on Neural Networks and Applications
1 0.005 148 98 (NEUREL). IEEE, 2018, pp. 1–5.
2 0.003 240 120 [3] Y.-W. Lin, Y.-B. Lin, and H.-N. Hung, “CalibrationTalk: A Farming
3 0.004 172 114 Sensor Failure Detection and Calibration Technique,” IEEE Internet of
Things Journal, vol. 8, no. 8, pp. 6893–6903, 2020.
[4] K. Thiyagarajan, S. Kodagoda, and L. Van Nguyen, “Predictive An-
Table II shows the time taken by the Self-calibration model alytics for Detecting Sensor Failure Using Autoregressive Integrated
to calibrate the sensor for different fault values. The time Moving Average Model,” in 2017 12th IEEE Conference on Industrial
Electronics and Applications (ICIEA), 2017, pp. 1926–1931.
taken to calibrate the sensor data is only a few minutes, and [5] X. Dai, F. Qin, Z. Gao, K. Pan, and K. Busawon, “Model-based On-line
it decreases when the fault value is more. It is to be noted that Sensor Fault Detection in Wireless Sensor Actuator Networks,” in 2015
the sensor transmits correct data even when it is in Calibration IEEE 13th International Conference on Industrial Informatics (INDIN).
IEEE, 2015, pp. 556–561.
mode. [6] D. Li, Y. Wang, J. Wang, C. Wang, and Y. Duan, “Recent Advances in
Sensor Fault Diagnosis: A Review,” Sensors and Actuators A: Physical,
C. Sustainability of the Model vol. 309, p. 111990, 2020.
As seen from the results, the sCalib can be used for low- [7] P. Ferrer-Cid, J. M. Barcelo-Ordinas, J. Garcia-Vidal, A. Ripoll, and
M. Viana, “Multisensor Data Fusion Calibration in IoT Air Pollution
powered IoT applications. IoT sensor nodes can monitor the Platforms,” IEEE Internet of Things Journal, vol. 7, no. 4, pp. 3124–
sensor health by this method and calibrate the sensor when 3132, 2020.
a fault occurs. The entire calculation is executed on-board, [8] U. Saeed, S. U. Jan, Y.-D. Lee, and I. Koo, “Machine Learning-
based Real-Time Sensor Drift Fault Detection using Raspberry Pi,”
and the user is alerted only when calibration fails and the in 2020 International Conference on Electronics, Information, and
sensor needs to be replaced. Since the model uses a nearby Communication (ICEIC). IEEE, 2020, pp. 1–7.
non-faulty sensor of the same type as the standard sensor for [9] S. U. Jan and I. S. Koo, “Sensor Faults Detection and Classification
using SVM with Diverse Features,” in 2017 International Conference
calibration, the model is fully automated and can work for on Information and Communication Technology Convergence (ICTC).
a long time without human interference. The sensor node is IEEE, 2017, pp. 576–578.
integrated with renewable power sources such as Solar cells, [10] P. Han, H. Mei, D. Liu, N. Zeng, X. Tang, Y. Wang, and Y. Pan,
“Calibrations of Low-Cost Air Pollution Monitoring Sensors for CO,
making it clean and environment-friendly. NO2 , O3 , and SO2 ,” Sensors, vol. 21, no. 1, p. 256, 2021.
[11] K. Yamamoto, T. Togami, N. Yamaguchi, and S. Ninomiya, “Machine
VI. C ONCLUSION AND F UTURE S COPE learning-based Calibration of Low-cost Air Temperature Sensors using
Environmental Data,” Sensors, vol. 17, no. 6, p. 1290, 2017.
The failure of the sensors in the IoT sensor nodes can be [12] P. Bodik, W. Hong, C. Guestrin, S. Madden, M. Paskin, and R. Thibaux,
disastrous as inaccurate monitoring data will be transmitted, “The Intel Lab at Berkeley Dataset,” http://db.csail.mit.edu/labdata/
leading to the loss of vital information. The accurate and labdata.html, 2004.
[13] Y. Wang, C. J. Simonson, R. W. Besant, and W. Shang, “Transient Hu-
efficient fault identification and auto-calibration method for midity Measurements—Part I: Sensor Calibration and Characteristics,”
the sensors without consuming too much computational and IEEE Trans. Instrum. Meas., vol. 56, no. 3, pp. 1074–1079, 2007.
storage capability of the low-powered and remotely operated [14] J. Brownlee, “How to Calculate Precision, Recall, and F-Measure
for Imbalanced Classification,” https://machinelearningmastery.com/
IoT devices is a challenge. To mitigate these problems, an precision-recall-and-f-measure-for-imbalanced-classification, 2020.
automated sCalib technique has been proposed in this paper
for the sensor nodes deployed in a Smart Warehouse. The
major conclusions are summarized as follows: (1) A single
feature Decision Tree-based model for efficient drift fault
detection with a low computational burden. (2) A simple
Self-calibration algorithm to automatically calibrate the faulty
sensor within a short period. (3) The model’s efficiency
has been established from the different performance metrics
(Precision, Recall, F1-Score, and Accuracy) obtained from the
Confusion matrix.
As the future prospects of the proposed method, the sensor
faults apart from drift can be considered. Also, further work
can be done on the other types of sensors deployed in a Smart

Authorized licensed use limited to: East China Univ of Science and Tech. Downloaded on June 03,2023 at 01:41:48 UTC from IEEE Xplore. Restrictions apply.

You might also like