Abstract
A Wireless Sensor Network (WSN) comprises a series of spatially distributed autonomous devices, each equipped with sophisticated sensors. These sensors play a crucial role in monitoring diverse environmental conditions such as light intensity, air pressure, temperature, humidity, wind, etc. These sensors are generally deployed in harsh and hostile conditions; hence they suffer from different kinds of faults. However, identifying faults in WSN data remains a complex task, as existing fault detection methods, including centralized, distributed, and hybrid approaches, rely on the spatio-temporal correlation among sensor nodes. Moreover, existing techniques predominantly leverage classification-based machine learning methods to discern the fault state within WSN. In this paper, we propose a regression-based bagging method to detect the faults in the network. The proposed bagging method is consisted of GRU (Gated Recurrent Unit) and Prophet model. Bagging allows weak learners to combine efforts to outperform a strong learner, hence it is appropriate to use in WSN. The proposed bagging method was first trained at the base station, then they were deployed at each SN (Sensor Node). Most of the common faults in WSN,such as transient, intermittent and permanent faults,were considered. The validity of the proposed scheme was tested using a trusted online published dataset. Using experimental studies, compared to the latest state-of-the-art machine learning models, the effectiveness of the proposed model is shown for fault detection. Performance evaluation in terms of false positive rate, accuracy, and false alarm rate shows the efficiency of the proposed algorithm.
Keywords
0 Introduction
Wireless Sensor Networks (WSNs) are networks of sensor nodes equipped with versatile transducers and communication infrastructure, with the primary goal of monitoring and recording environmental conditions across various locations[1-4]. Each sensor node within a WSN is equipped with one or more sensor units to capture environmental data, which is then processed locally[5-9]. They serve to observe various environmental parameters, including temperature, emissions, pressure, distance, and light intensity, transmitting gathered data to a sink node for processing. Renowned for their cost-effectiveness, computational capabilities, and bandwidth efficiency, WSNs are widely used in diverse applications. Despite their advantages, WSNs encounter challenges related to storage and processing capacity. WSNs are applied across a wide range of fields including military target tracking and monitoring, environmental hazard surveillance, health monitoring, habitat monitoring, and humanitarian disaster relief efforts[10-14].
Sensor nodes are typically densely deployed in an unstructured manner to perform tasks such as sensing, processing, and communication among themselves[2, 12]. These unstructured or unordered deployment of the sensor nodes poses a significant challenge for maintaining network's reliability and connectivity. The remote and often inaccessible deployment locations of sensor nodes further exacerbate difficulties in monitoring node failures, especially in disaster-prone areas. Factors such as natural disasters, sensor component failures, battery depletion, and coverage area gaps contribute to the inherent fault-prone character of sensor nodes. This attribute is intensified by the placement of sensor nodes in various and challenging environments. A fault in a sensor node potentially leads to imprecise measurements from the sensors, hence impacting the overall performance of the sensor network. At times, faults within the sensor network might spread to other parts of the network, resulting in a more substantial impact on the overall network. Fundamentally, sensor faults lead to deviation of the sensor values from the actual sensor values, which, if left unattended, can ultimately lead to sensor errors and sensor failures. The occurrence of these errors and failures in the sensor networks can significantly impact the overall computational efficiency of the WSN. Moreover, sensor networks' failure in critical applications such as health monitoring, enemy tracking, animal tracking, and environmental monitoring can pose a significant impact on the environmental, human life, and economic losses[2, 12].
The faults in a WSN may be classified into three categories depending on the behaviour of the sensor nodes: permanent faults, intermittent faults, and transient faults[1, 3, 9]. Intermittent and transient faults can be grouped together as short-term faults. Permanent faults persist throughout the entire lifespan of a sensor module, resulting in consistent unwanted behaviour. Intermittent fault, on the other hand, can infrequently lead to incorrect outcomes, making it challenging to gather and interpret data effectively. Moreover, due to the intermittent nature of this fault, it has a higher likelihood of developing permanent fault in the future. Although less common, transient fault can occur infrequently throughout a sensor module's lifetime. According to research, a sensor module is said to be suffering from permanent fault, if 81% to 100% of its sensor data are persistently incorrect over the entire time instance. A sensor module is said to be suffering from intermittent fault, if 31% to 80% of its sensor data are inaccurate across a given time instance. A transient fault occurs when the percentage of faulty data ranges from 5% to 30 % for a certain time instance. Since, both intermittent fault and transient fault exhibit dynamic nature in the sensor networks, researchers face significant challenges when it comes to detecting and diagnosing these faults in the network.
Existing fault detection methodologies, including centralized, distributed, and hybrid approaches, rely heavily on the spatio-temporal correlation among nodes to ascertain fault status[1, 8, 10, 13]. However, as the prevalence of anomalous sensor modules escalates within the WSN, these techniques often falter in accurately discerning fault status. Moreover, to ascertain the faulty state of all the sensor modules in WSN, these fault detection approaches need to send their sensing information to either the adjacent sensor nodes, sink node, or to their cluster head. Hence, as the number of nodes in sensor networks increases, there is a corresponding increase in the energy consumption and detection latency of these approaches, which ultimately results in a decline of the overall network lifetime. Additionally, these methodologies predominantly lean on supervised learning-based classification algorithms for fault detection[3-15]. While these classification algorithms have shown effectiveness in certain contexts, they encounter limitations when applied to WSNs. WSNs inherently capture data from the monitoring field and provide continuous measurements, creating a vast and dynamic dataset. Consequently, addressing faults within WSNs can be framed as a regression problem, where the objective is to predict continuous values representing the state of sensor nodes. However, prevailing fault detection strategies primarily utilize classification-based methodologies, which do not fully align with the nature of the data generated by WSNs. Moreover, the reliance on supervised learning approaches necessitates labelled training data, which can be challenging to obtain in real-world WSN deployments due to the dynamic and unpredictable nature of environmental conditions. In this paper, we propose a novel regression-based approach for fault detection, leveraging bagging techniques, aiming to effectively address the issues outlined above. Our proposed bagging method integrates Gated Recurrent Unit (GRU) , and Prophet models. Bagging, a robust ensemble learning technique, harnesses the collective power of multiple weak learners to surpass the performance of a single strong learner. It effectively mitigates variance, thereby reducing the risk of overfitting during model training. Moreover, our proposed technique involves training the bagging model at the base station and subsequently distributing the trained model to each sensor node within the network. This decentralized approach ensures that every sensor node actively participates in the fault diagnosis process using its locally collected data to determine its own fault status. By independently assessing its fault state based solely on its data, each sensor node contributes to the overall fault detection process. Consequently, our approach represents an optimal solution for resource-limited WSNs.
The main contributions of the paper are summarized as follows:
1) We propose a regression-based fault detection technique aimed at identifying various types of faults within the network, including permanent, intermittent, and transient faults.
2) We propose a bagging algorithm that does not depend on the sensor readings of neighboring nodes to detect faults in the network.
3) We implement the proposed fault detection algorithms using Google Colab with various parameter settings.
4) We evaluate the performance of the proposed algorithm using common metrics such as false positive rate, energy consumption, detection latency, accuracy, and false alarm rate, and conducted comparative assessments against existing state-of-the-art algorithms.
The rest of this paper is organized as follows: Section 1 reviews relevant research pertaining to fault detection in WSNs. In Section 2, we present a taxonomy of common faults observed in WSNs. Our proposed fault detection algorithm is discussed in detail in Section 3. Performance of the proposed method are presented in Section 4. At last, in Section 5, we conclude the paper with recommendations for future works.
1 Related Works
In this section, we discuss some significant contributions and key advancements made by the researchers in this domain.
Saeed et al.[11] proposed a hybrid-based fault detection approach using Extremely Randomized Trees (ETs) . ETs represent enhanced version of conventional random forest methods, incorporating increased randomness during the tree construction process. The performance of ET-based methods was evaluated against commonly utilized fault detection methods, such as random forests, decision tree, support vector machines, and multi-layers perceptron. Evaluation using real world WSN datasets demonstrated that ET performed better than other algorithms in terms of different parameters like accuracy, F1-score. The simulation results indicated that the ET-based model effectively managed the inherent uncertainties and the complexities in WSN. However, this approach requires each cluster member to send their sensing information to their cluster heads. Hence, this approach is energy inefficient as a significant amount of energy is dissipated in transmitting and receiving messages to the cluster head. Priya et al.[14] proposed a hybrid-based fault diagnosis approach for WSN using machine learning. The paper underscored the significance of feature selection in fault diagnosis for WSN with redundant features, classifying selection methods into filter, wrapper, and embedded types. This approach includes MRMR (Minimum Redundancy Maximum Relevance) for relevance and E-MRMR (Enhanced Minimum Redundancy Maximum Relevance) for feature set refinement, combining wrapper and filter methods. This paper employed SVM (Support Vector Machine) for detecting the anomalous nodes in WSN. The main drawback of this paper lies in its computational complexity. Given the limited resources of the sensor modules, this approach proved to be impractical due to its high computational demands. Swain et al.[1] proposed a fault diagnosis protocol to detect composite faults in the sensor networks. This protocol works in three distinct steps: Initially, all the nodes are grouped into clusters, with each cluster supervised by its cluster head. Subsequently, each cluster head collects data sensed by its cluster members, and leverages the spatial-temporal correlation between sensor modules, and applies statistical based Analysis of Variance (ANOVA) method to identify the presence of faults. In the following step, a PNN (Probabilistic Neural Network) is utilized to classify the type of detected composite fault. This algorithm specifically considers faults due to persistence, such as permanent fault, intermittent fault, and transient fault. While this approach offers effective fault detection for sensor networks, it suffers from some major drawbacks. A notable drawback is its implementation, as this approach relies on the cluster heads that must remain fault free for optimum operation.
Biswas et al.[12] proposed a hybrid-based fault diagnosis algorithm designed for sensor network, which leverages both SVM technique and Pearson's correlation coefficient. This algorithm uses the inherent spatial and temporal correlation present in the sensor data to detect the anomalous nodes in WSN. By incorporating Pearson's correlation coefficient with the self-normalizing features, this model enhances its capabilities for the spatially and temporally correlated sensor data in WSN. However, as the number of the faulty sensor nodes increases in the sensor networks, this algorithm suffers from a high false positive rate and lower accuracy. Swain et al.[9] proposed a comprehensive fault diagnosis protocol tailored specifically for WSN, with a focus on effectively detecting and diagnosing composite faults, such as permanent fault, intermittent fault, and transient fault in the network. This fault diagnosis protocol combined a fusion of gradient descent based backpropagation and evolutionary strategies with a feed forward neural network, providing a robust mechanism for diagnosing faults within the WSNs. This protocol was implemented through a well-structured sequence of five stages: communication, clustering, isolation, classification, and fault detection. Noshad et al.[16] presented a novel fault diagnosis protocol in their paper. This research used different classifier models, including convolutional neural network, probabilistic neural network, gradient descent, multilayer perceptron, and random forest, to identify faults in the WSN. This paper detected different types of faults in the networks such as spike, fixed bias, gain and out of bound faults. By using multiple classifier models, this research aimed to increase accuracy, reliability, and classification capabilities, thereby improving the fault detection in WSN. This approach suffers from significant detection delay as the number of nodes in the WSN increases, as the cluster head determines the fault status of each sensor module. Zidi et al.[8] proposed a comprehensive approach in WSN utilizing SVM for fault detection. This supervised learning-based approach works in two steps. Initially, the decision function and the support vectors are determined using the sensor data gathered from the neighbouring sensor modules. Subsequently, this decision function in then deployed on the cluster heads to classify the sensor modules into faulty and non-faulty categories. This research specifically considered faults such as offset, out of bound, gain, and struck-at faults. However, this approach has a notable drawback in its energy efficiency, as it requires each cluster member to send their sensing data to the cluster heads.
Gouda et al.[17] proposed a distributed based approach to diagnose faults in the wireless sensor network. This research focuses on identifying the temporary fault like intermittent fault in resource constrained WSN. This paper utilized the inherent spatial-temporal correlations that existed between the nodes to determine the anomalous nodes in the network. This method used the likelihood ratio test to analyse the statistical characteristics of the sensor readings, facilitating informed decision about fault diagnosis. This research offers effective solution for detecting and diagnosing faults in WSN. Sun et al.[18] addressed the challenge of fault diagnosis in WSNs by proposing a centralized based belief rule-based technique. This research acknowledged the inherent uncertainty and variability in sensor readings within the sensor networks. The use of rule-based reasoning and belief function theory provided a robust framework for handling complex scenarios, leading to lower false positive rate. This technique is not scalable for large scale sensor networks. Chanak et al.[15] proposed a comprehensive method for detecting data faults in sensor network. Each sensor module transmits its sensing information to its cluster head, which then computes mean and standard deviation using this data. Using this data, cluster head computes the two-population z test to detect the anomalous nodes in WSN. Sensor node having z score greater than a certain threshold is tentatively marked as soft fault. Cluster members then participate in voting to determine the anomalous status of each cluster member. The major disadvantage of this algorithm is that a sensor node is incorrectly identified as faulty when more than half of its cluster members are faulty. Singh et al.[19] proposed a novel approach for fault detection, harnessing the capabilities of an autoencoder classifier. This algorithm demonstrated superior performance compared to existing algorithms across various evaluation metrics. The autoencoder architecture, consisting of an encoder and a decoder, effectively transformed the input data into a lower dimensional space through the encoding process. In the subsequent step, this data was reconstructed to minimize the reconstruction error. This mechanism enabled the algorithm to effectively capture the underlying pattern in the data. By optimizing the autoencoder using Adam optimizer and employing the mean square error loss function, the algorithm accurately approximated the target values, leading to reliable fault detection outcomes. This robust training methodology ensured that the autoencoder effectively learned and captured the complex relationships with the sensor network data, facilitating accurate fault detection with lower false positive rate.
2 Network Model
Faults in the sensor networks can be classified based on their duration, indicating the timespan of the fault. These faults can be further classified into various categories, including in Refs. [1, 3, 9]:
2.1 Transient Faults
Transient fault, prevalent in sensor networks, are characterized by their temporary and short timespan nature. These faults occur due to temporary disturbance and disruptions within the systems, which include factors such as power fluctuation, battery issues, electromagnetic interference, or environmental influences. Unlike permanent fault, transient fault has a short time duration and typically does not persist over an extended period. Transient fault can be mathematically represented by the following Eq. (1) :
(1)
where, denotes the sensor node values that diverge from the actual sensor values during the transient time span ={1, 2, 3, ..., ts}, ts denotes the total number of time instances during which a transient fault occurs. Conversely, during regular time intervals ={1, 2, 3, ..., tr}, tr denotes the total number of time instances of regular (normal) operation. sensor node values align with the actual sensor values . It is noteworthy that , indicating that the transient divergence occurs over a shorter duration compared to the regular convergence. Additionally, Here, β = {1, 2, 3, ···, t} denotes the total time instances of the sensor node si, t represents the total number of time instances over which the sensor node is being observed.
2.2 Intermittent Faults
Intermittent faults in WSNs stem from unpredictable, erratic, and irregular malfunctions of the sensors. These faults manifest in an on-and-off behaviour and may arise due to various factors such as faulty components, unstable ambient conditions, or insufficient specifications. Owing to their random nature, detecting intermittent faults can be challenging; however, patterns of errors can be identified through statistical analysis or consistent monitoring of the parameters. Mathematically, Eq. (2) represents intermittent faults [1]:
(2)
In the time set β1= {1, 2, 3, ..., t1}, the sensor node values deviate from the actual sensor value . Conversely, during the time set β2= {1, 2, 3, ..., t2}, the sensor node value equals the actual sensor value . These sets, {β1, β2}, are subsets of the comprehensive time instance set β={1, 2, 3, ..., t} pertaining to the sensor node si. The duration of intermittent faults is typically longer compared to transient faults.
2.3 Permanent Faults
Permanent faults in WSNs are characterized by consistent discrepancies that persist in the system and may exhibit variability in behavior over time. These faults can arise due to factors such as aging, wear and tear, or eventual degradation of components within the sensors. Over time, permanent faults can significantly impact the accuracy, reliability, and integrity of the sensed data, with their behavior being either erratic or progressively deteriorating. Mathematical relations for permanent faults can be expressed through Eq. (3) , which outline the underlying characteristics and dynamics of these faults[1].
(3)
Each sensor node si is defined by sensor values for each time instance β= {1, 2, 3, ..., t}. These sensor modules' values drift from the actual corresponding sensor values due to the presence of permanent faults, which result in the reduced overall performance of the network, inaccurate data communication, and diminished long-term stability. Therefore, mitigating and addressing these faults effectively is important to ensure the reliability and integrity of the data sensed by the nodes in the WSN.
3 Methodology
This section provides the proposed ensemble-based bagging model and the proposed scheme.
3.1 Bagging
The bagging regression is an ensemble-based regression algorithm that randomly selects subsets of the modeling data and combines each regressor's prediction through the averaging method to get the final forecast[20-21]. By introducing randomizing approach into the prediction construction process, bagging regression effectively minimizes bias as well as variance stemming from the underlying regression procedure. Hence, this process demonstrates improved performance, particularly when dealing with complex model with low bias and variance. Bagging operates as a parallel ensemble approach aimed at mitigating model dispersion by incorporating additional training data. This approach involves non-probabilistic sampling with data replacement from the original set, where certain observations may be repeated in newly created datasets. Despite the size of the training dataset, the predictive power is minimally affected, and fluctuations can be significantly reduced by adjusting predictions to align with desired outcomes. Each dataset is routinely used to train new models, and the ensemble of these models utilizes the average of all forecasts. Because of the distinctive attributes of the aforementioned algorithm, this research combines two techniques, GRU and Prophet, within the bagging algorithm to capitalize on their individual advantages. The flowchart of the bagging algorithm provides a clear roadmap of the steps involved in achieving the desired output, as shown in Fig.1.
3.1.1 Gated Recurrent Unit (GRU)
The GRU was initially introduced by Chung et al.[22] in 2014, emerging as a prominent algorithm within the realm of Recurrent Neural Networks (RNNs) [23-24]. Primarily, GRU addresses the issue of vanishing gradients inherent in standard RNNs. It is often regarded as a variant of LSTM (Long Short-Term Memory) due to its comparable efficacy in various scenarios. GRU composed of two sigmoid layers: the update gate (zt) and the reset gate (rt) . These gates are pivotal in easing the vanishing gradient problem and determining the model's output. Fig.2 gives the detailed flowchart of GRU structure, showing the computational process involved in the hidden state and flow of information through the reset and update gates.
1) Update gate
Data processing in GRU initiates with the update gate, where the update gate zt is calculated for timestep t using the following mathematical formula:
(4)
here, input (xt) , hidden state (ht-1) are multiplied with their respective weights (wz) and summed together. In the next step, a sigmoid (σ) is used to normalize the result between 0 and 1. zt plays an important role in determining which past information should be retained or propagated to the future timesteps.
Fig.2GRU structure diagram
2) Reset gate
The reset gate rt is computed at timestep t using the following mathematical Eq. (5) .
(5)
where, xt, ht-1 are multiplied with their respective weights (wr) and summed together. Then, σ is used to normalize the output between 0 and 1. rt assists the GRU model in determining how much the past information should be disregarded.
3) Current memory content
This process involves the rt and entails introducing new memory content to utilize the rtand retain pertinent information from the past. Mathematically, this is represented by Eq. (6) .
(6)
here denotes the candidate hidden state.The computation begins with the multiplication of the input xt by its corresponding weight (w) . Next, element-wise multiplication is performed between thert and the previous output ht-1, allowing only the relevant past information to be retained. Subsequently, the results of these calculations are added together, and a tanh function is applied.
4) Final memory at current time step
Finally, the unit computes the vector, which contains information for the current unit and passes it further down the network. The zt plays a pivotal role in this process, as represented by the mathematical equation:
(7)
In this calculation, if the vector zt is close to 0, a significant portion of the current content will be disregarded as it is deemed irrelevant for prediction. Conversely, since zt will be close to 0 at this time step, (1-zt) will be close to 1, allowing the majority of the past information to be retained.
3.1.2 Prophet
The Prophet model, developed by the Facebook team, is an open-source library utilized for time series forecasting[25-26]. It operates on a decomposable model, offering impressive performance compared to traditional forecasting methods, even with simple parameters. The model has the capability to consider custom seasons and holidays, providing flexibility in modeling complex time series features. Based on Bayesian curve fitting, Facebook Prophet is an additive time series model that accommodates various seasonality's patterns, including yearly, monthly, weekly, and daily, as well as holiday effects. Eq. (8) illustrates the four primary components of a Facebook Prophet model, which account for trend, seasonality, and holidays.
(8)
where, y (t) denotes the output value, g (t) represents a trend function that captures non-periodic changes in the time series, s (t) signifies periodic changes such as weekly, monthly, or yearly seasonality, and k (t) accounts for the effects of holidays. The error term e (t) encompasses any irregular or random features in the dataset that cannot be explained by the model. To represent the trend component, a piecewise linear growth model is employed.This model is depicted in Eq. (9) .
(9)
The logical growth model is expressed as Eq. (10) :
(10)
The logical growth model is defined by Eq. (10) , where C (t) denotes the non-constant carrying capacity; p denotes the growth rate; a (t) is the adjustment rate that defines the effect of trend change points on the growth model; t represents the time steps or the timeline for the model; δ is the rate of adjustment at the trend change points, allowing flexibility in modelling shifts in the data trends; T indicates trend change points or specific intervals for model adjustments; γ means trend change points; and m denotes an offset parameter. During parameter determination, candidate values are enumerated, and the optimal model parameters are established using the grid search with cross-validation method.
The second term in y (t) denoted as s (t) , embodies the seasonal component, which captures cyclic variations occurring on a weekly, monthly, or annual basis. The Facebook Prophet model utilizes Fourier series to furnish a versatile model of periodic effects, as depicted in Eq. (11) .
(11)
(12)
In the Prophet model, the smoothing prior for seasonality is imposed using ζ~Normal (0, σ2) . Here, P is the period (time duration for one full cycle) ; N is the number of harmonics used to approximate the signal; ζ is the vector of the coefficients for the cosine and sine terms, which defines the shape and characteristics of the signal. The estimation of the holiday term k (t) relies on an indicator function to denote whether time t falls within a holiday event i. Each holiday is associated with a parameter ui, which governs the adjustments to the forecast corresponding to the holiday. Moreover, the Facebook Prophet model demonstrates resilience to challenges posed by outliers and missing data.
3.2 Proposed Scheme
Once the bagging algorithm predicts a value, the fault status of the WSN is determined by comparing the actual output with the bagging approximation model. If the disparity between them exceeds a predefined threshold, a sensor fault is identified. Specifically, for a sensor node i, denoted by its real output outputi (t) , and the bagging model output baggingi (t) , if baggingi (t) -outputi (t) ≥ηi, then a fault is detected at sensor node i.
To classify faults, each node compares its values with the predicted values from the bagging algorithm over the entire time instance. The classification criteria are based on the percentage of erroneous values within a given time instance. If more than 81% to 100% of the values are erroneous, the node is identified as having a permanent fault. If 31% to 80% of the values are erroneous, the node is classified as having an intermittent fault. If 5% to 30% of the values are erroneous, the node is classified as experiencing a transient fault. This method ensures precise fault classification, enabling appropriate fault management strategies. Table1 shows the default simulation parameters. The proposed scheme consists of two phases. Fig.3 presents the workflow of the proposed scheme. Initially, the bagging-based prediction model is trained at the sink node. Subsequently, this trained model is deployed at each module to detect its individual anomalous status.
Table1Simulation parameters
Fig.3Workflow of the proposed scheme
4 Results and Discussion
The proposed bagging-based ensemble method is evaluated in this section. First, a brief description of the datasets used is given. The next subsection presents, analyzes, and compares the outcomes of the proposed technique with the existing algorithms.
4.1 Dataset
The dataset published by the University of North Carolina was created by researchers at the university[8, 11, 16]. In this dataset, the researchers collected data that consists of measurements of temperature and humidity. For a6-hour period, these data were measured every 5 s. These data were collected using the TelosB mote from a multi-hop and a simple single-hop WSN. The labelled dataset that we have prepared is a set of sensor measurements into which we have injected different types of faults.
4.2 Result
The results presented in this article were simulated using Matlab and Google Colab. The performance of the proposed scheme has been evaluated by comparing it with the most recent fault detection techniques in WSN. These techniques were outlined and discussed in the literature section, which are ET[11], SVM[8], and PNN (Probabilistic Neural Network) [1]. This comparison is essentially based on five metrics: accuracy, FPR (False Positive Rate) , FAR (False Alarm Rate) , energy consumption, and detection latency. At each point of fault probability, the average value of that metric has been plotted after injecting each type of fault in our dataset. The first metric is accuracy, and it is defined as below[1, 9]:
(13)
where E represents number of faulty nodes detected, while S represents total number of faulty nodes.
The second comparison metric is FPR, which is defined as below:
(14)
here F stands for number of faulty nodes detected as fault free.
The third comparison metric is FAR, which is defined as below:
(15)
where J stands for number of fault free nodes detected as faulty, K represents total number of faulty free nodes.
The fourth comparison matric is energy consumption, which is defined as the aggregated energy utilized in the fault probability process[1, 9]. The final comparison metrics is detection latency, which is defined as the time taken by the sensor network to determine the fault status of all the sensor module in the network.
Fig.4 represents the graph between accuracy versus fault probability. Fig.5 represents the graph between FPR versus fault probability. Fig.6 represents the graph between FAR versus fault probability. By increasing the fault probability, the accuracy of all four algorithms decreases. By increasing the fault probability, the FRP, and FAR of all four algorithms rise respectively. The ET, PNN and SVM models are machine learning based classification algorithms. These algorithms fail to detect faulty sensor nodes when the faulty data closely resembles data from normal functioning. So, the accuracy of these algorithms is lower than the proposed algorithm. The ET, PNN and SVM algorithms performed well with permanent faults. However, these algorithms fail to detect transient and intermittent faults due to their high resemblance to the non-faulty data samples. So, these algorithms show a lower detection accuracy and higher FPR than the proposed algorithm. Moreover, ET, PNN and SVM algorithms depend on the sensor readings of the neighboring sensor nodes. So, these algorithms show a lower fault detection accuracy and higher FAR, FPR than the proposed algorithm. The proposed algorithm employs a regression-based bagging approach to detect faults in WSNs by leveraging the inherent correlations in the sensor data.
Fig.4Accuracy versus fault probability
This method utilizes each sensor node's own data to determine its fault status (does not depend upon neighboring sensor modules data) , leading to superior accuracy in fault detection. By aggregating multiple regression models, the bagging algorithm reduces variance and enhances prediction robustness. Hence, this approach outperforms existing algorithms in terms of accuracy, FPR, and FAR.
Fig.5FPR versus fault probability
Fig.6FAR versus fault probability
Figs.7, 8, and 9 depict the performance metrics of accuracy, FPR, and FAR concerning the number of sensor modules, respectively. The proposed model exhibits superior performance compared to existing models in terms of accuracy, false alarm rate, and false positive rate, as illustrated in Figs.7, 8 and 9.
Fig.7Accuracy versus number of sensor modules
Notably, as the number of modules within the WSN increases, the accuracy decreases while the false alarm rates and false positive rate increase. These results emphasize that the proposed model outperforms existing models, particularly with increasing sensor modules occurrences in the network. Regarding accuracy, the proposed model achieves an average of 97.6%, outperforming the ET algorithm with an average of 96.7%, as well as SVM and PNN algorithms with averages of 95.5% and 95%, respectively. In terms of average FAR, the proposed algorithm, along with ET, SVM, and PNN algorithms, achieves 0.6%, 1.1%, 1.3%, and 1.4%, respectively. Additionally, for average FPR, the proposed algorithm, ET, SVM, and PNN algorithms achieve2.2%, 3.2%, 4.5%, and 5%, respectively.
Fig.8FPR versus number of sensor modules
Fig.9FAR versus number of sensor modules
Fig.10 illustrates the relationship between accuracy and fault probability for various types of soft faults within the network. As observed, an increase in fault probability leads to a decrease in accuracy across all soft faults, including permanent, intermittent, and transient faults. For instance, the accuracy of permanent fault declines from 0.99 to 0.97, intermittent fault accuracy declines from 0.99 to 0.965, and transient fault accuracy declines from 0.98 to 0.965 with the rise in fault probability. Notably, among the soft faults, permanent fault exhibits the highest accuracy compared to intermittent and transient faults. Figs.11 and 12 present the FPR and FAR against fault probability for different soft faults, respectively. These figures demonstrate that an increase in fault probability corresponds to an increase in both FAR and FPR across all fault types. Particularly, transient fault exhibits higher FAR and FPR compared to other faults due to its unpredictable behaviour. Conversely, intermittent fault, characterized by uniformly random behaviour, shows higher FAR and FPR than permanent fault but lower than transient fault.
Fig.10Accuracy of SNN according to fault type
Fig.11FPR of SNN according to fault type
Permanent fault, known for its certain and continuous behaviour, demonstrates lower FAR and FPR compared to other faults. Analysing the average fault alarm rate values, permanent, intermittent, and transient faults exhibit 0.7%, 0.9%, and 1.5%, respectively. Similarly, the average fault positive rate for permanent, intermittent, and transient faults are observed to be2%, 2.5%, and 3%, respectively.
Fig.12FAR of SNN according to fault type
Table2 shows the average energy consumption and average fault detection latency for different algorithms (using100 nodes) . ET, SVM, and PNN utilize hybrid-based fault detection protocols. In hybrid algorithms, sensor modules are organized into clusters with a cluster head. Here, the cluster head collects the sensing information from its cluster members, and using these sensed data can decide the fault status of all its cluster members. Energy consumption of these algorithms depends on the volume of messages transmitted to the cluster head and the amount of energy required for data processing. The energy utilized in message transmitting and receiving far exceeds that used in the data processing[27-28]. Hence, the average energy consumption for these algorithms is higher compared to the proposed algorithm. In the proposed algorithm, each sensor node utilizes its own data to determine its fault status (does not depend on the spatial-temporal correlation between neighbouring sensor modules data) . Hence, this algorithm operates without the need of extensive messages exchanges between the nodes and utilizes only energy required for data processing. Hence, the energy consumption of the proposed algorithm is lower than that of existing algorithms. Similarly, detection latency of these existing algorithms like ET, SVM, PNN depends upon the time required for message transmission, and data processing. Hence, detection latency of these algorithms is higher than that of the proposed algorithm. Detection latency of the proposed algorithm depends only upon the time required for data processing. Hence, its detection latency is lower than that of existing algorithms.
Table2Comparison of average energy consumption and detection latency for different algorithms
5 Conclusions
In this paper, we propose a novel regression-based bagging diagnostic framework designed to efficiently detect and diagnose faults in WSNs in a timely manner. The proposed bagging method comprises GRU and Prophet models. Leveraging the ensemble learning technique of bagging allows weaker learners to collaborate and outperform a single strong learner, making it particularly suitable for the dynamic and complex nature of WSNs. Furthermore, we conduct a comprehensive performance comparison of our proposed scheme with several machine learning classification algorithms, including SVM, ET, and PNN. Performance analysis is conducted using an online dataset widely trusted within the research community, published by researchers at the University of North Carolina. This dataset encompasses sensor measurements collected from both single-hop and multi-hop networks and encompasses various common faults encountered in WSNs, such as transient, intermittent, and soft permanent faults. Through extensive experimental studies and comparisons with state-of-the-art machine learning models, we demonstrate the effectiveness of our proposed model for fault detection. Performance evaluation metrics, including FPR, energy consumption detection latency, accuracy, and FAR, highlight the efficiency and reliability of our proposed approach.
In the future, our research will explore several ideas to enhance fault detection in WSNs. Firstly, we plan to execute a mobile base station mechanism for fetching sensor module status reports. This approach will mitigate the impact of topological changes on the fault detection process, ensuring the reliability and accuracy of fault detection even in dynamic network environments. Secondly, we will explore the integration of advanced fault detection algorithms to enhance the system's resilience against various sources of noise and disturbances in the network. This will involve developing innovative techniques that can effectively mitigate fault detection processes.