Introduction

Wireless sensor networks (WSNs) are commonly used in industrial practices for environmental detection due to their low power consumption and high sensitivity. However, due to the complex and variable working environment of sensor nodes, the failure of sensor nodes is inevitable. Hence, it is crucial to diagnose faults in WSN nodes to ensure industrial production safety and timely data collection1.

The commonly used methods for fault diagnosis of WSN nodes are model-based methods, data-driven methods, and hybrid information-based methods2,3. The modelling analysis approach realizes fault diagnosis through mathematical mechanisms and functions4,5,6,7, which is the most frequently used method. However, the accuracy of this method is limited due to the high complexity of the actual environment system. The data-driven method has higher model accuracy and relies on analysing data samples8. However, in the harsh environment where the sensors are located, the existence of interference factors will lead to the unreliable data involved in training, which will lead to a reduction in the diagnostic accuracy9. The hybrid information-based methods can realize the combination of different methods10. This type of approach integrates qualitative knowledge and quantitative data through the use of various models. However, there is a common problem with both model-based and data-driven approaches. It is difficult to ensure the effectiveness and accuracy of the model in different environments11.

To solve the above problems, this paper proposes a WSN node fault diagnosis model based on BRB-AAW, where AAW denotes adaptive attribute weights. The main contributions of this paper are listed as follows:

  1. (1)

    A new belief rule base with adaptive attribute weights (BRB-AAW) model is constructed, and the concept of adaptive attribute weights is proposed. The original static attribute weights are improved, and reasonable attribute weights are assigned to all rules, thus improving the performance of BRB in the presence of unreliable data.

  2. (2)

    A WSN fault diagnosis method based on BRB-AAW is proposed to obtain more reasonable attribute weights under different conditions, which can effectively improve the accuracy of the diagnosis results.

The article follows the following structure. "Introduction" provides an overview of the current state of research on node fault diagnosis in WSNs, highlighting the benefits of the approach proposed in this paper. "Related work" describes the popular WSN node fault diagnosis methods and compares them with the BRB-AAW-based diagnosis methodology approach. "Problem formulation" addresses the challenges experienced in WSN node fault diagnosis and presents the underlying model architecture. "Establishment of the WSN nodes fault diagnosis model based on BRB-AAW" elaborates on the extraction process of data features, the model inference process, and the approach used for parameter optimization. In "Case study", the proposed fault diagnosis method is validated through the examination of the specific case. In "Conclusion", the proposed fault diagnosis methods and outlined potential future study directions are summarized.

Related work

Because of the expanding range of WSN applications, an increasing number of scholars have taken the fault diagnosis of WSN nodes as a research topic10,11. Abdalzaher et al. proposed a method for estimating missing sensor data12. Mohamed et al. worked through two attack defense methods based on a Stackelberg game to protect sensor nodes from attacks13. Seddik et al. presented an improved Stackelberg game method that can detect damaged sensor transmission data more efficiently14. Selvakumar et al. provided a trust estimation model based on a fuzzy expert system to evaluate nodes and predict possible future changes based on inference mechanisms15. Ullah et al. proposed a novel data aggregation scheme based on node clustering and extreme learning machines that effectively reduces redundant and erroneous data9. Laiou et al. used a machine learning-based decision tree algorithm to detect and diagnose faults to detect and classify fault data from WSNs16.

Most of the above methods are model-based methods and data-driven methods, so these diagnostic methods have common disadvantages. First, all of these methods require a large and uniform number of samples for training parameters. Second, these methods all set many parameters that have no physical meaning, leading to their low interpretability.

Using a hybrid information-based approach, the belief rule base (BRB) has emerged as a potent method for effectively modelling intricate systems. In 2006, a belief rule-based reasoning method known as RIMER was introduced by Yang et al., employing an evidential reasoning (ER) approach17. The utilization of an expert system composed of BRB and ER rules allows for enhanced flexibility in representing a multitude of uncertain information, enveloping vagueness, unpredictability, and ignorance. The determination of parameters within the BRB is entrusted to domain experts, drawing upon empirical knowledge and imbuing them with substantial physical significance within the model. This distinctive characteristic empowers the BRB to attain precise outcomes while relying on minimal training data. Expanding upon these advancements, Zhang et al. presented a method based on wavelet packets and BRB18. Nevertheless, it is important to note that this approach still has limitations when dealing with fault data that is not entirely reliable.

In 2020, a fault diagnosis method utilizing a belief rule base with mixed reliability was presented by Cheng et al.19. This method specifically considers two disruptive factors that impact the observed data: sensor performance and external environmental influence. These factors are quantified as static reliability and dynamic reliability attributes within the belief rule base (BRB)20,21. However, it is worth noting that the current approach for calculating hybrid reliability may not be suitable for input data characterized by substantial variations. In 2022, Sun et al. proposed the BRB fault diagnosis model with an adaptive quality factor (BRB-SAQF)21. The method adds the attribute quality factor as a new input attribute to reduce the impact of unreliable data features on fault diagnosis accuracy. Nevertheless, it is notable that the attribute quality factor approach does not take into account the needed changes in attribute weights for different environments.

It is necessary to design a method to mitigate the effect of inaccurate data on the identification process and address the limitation in calculating the reliability of static attribute weights19, and a BRB-AAW-based fault diagnosis model for WSN nodes is proposed. First, the concept of adaptive attribute weights is proposed, which can distinguish fault types more effectively. Second, the calculation method of adaptive attribute weights is redesigned on the basis of the static attribute weight calculation method. In addition, the proposed method requires fewer training samples than the neural network method due to the advantage of BRB in utilizing small samples for training22. Finally, because the parameters in BRB are established by experts and possess physical significance, this methodology offers a higher level of interpretability compared to neural network approaches. To demonstrate that BRB-AAW can effectively improve the accuracy of diagnostic results, it is compared with popular algorithms that can be used for binary classification.

Problem formulation

In the following section, the issues in the diagnosis of WSNs are identified, and the structure of the model is constructed based on these issues. The notation dictionary is described in "Dictionary of notations", the basic BRB composition is documented in "Basic belief rule base", and the problem is formulated by the formula in "Problem formulation".

Dictionary of notations

The notations dictionary, which encompasses the symbols used throughout this article, is provided for clarity and comprehension, as shown in Table 1.

Table 1 Dictionary of notations.

Basic belief rule base

The BaseBRB effectively harnesses engineering experience and expert knowledge, showcasing its capability to integrate limited samples of monitoring data and possessing robust nonlinear modelling capabilities. It operates as a modelling approach rooted in IF–THEN rules, comprised of a series of belief rules. The belief rules can be described by Eq. (1).

$$\begin{gathered} R_{k} :if{\kern 1pt} a_{1} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{1} {\kern 1pt} \cap {\kern 1pt} {\kern 1pt} a_{2} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{2} {\kern 1pt} \cap ... \cap a_{W} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{W} {\kern 1pt} \, \hfill \\ Then{\kern 1pt} {\kern 1pt} {\kern 1pt} result{\kern 1pt} {\kern 1pt} is{\kern 1pt} \left\{ {\left( {H_{1} ,D_{1} } \right),\left( {H_{2} ,D_{2} } \right),...,\left( {H_{N} ,D_{N} } \right)} \right\} \hfill \\ with{\kern 1pt} {\kern 1pt} rule{\kern 1pt} {\kern 1pt} weight{\kern 1pt} {\kern 1pt} \theta_{k} \hfill \\ and{\kern 1pt} {\kern 1pt} attribute{\kern 1pt} {\kern 1pt} weight{\kern 1pt} {\kern 1pt} \delta_{1}^{{}} ,\delta_{2}^{{}} ...\delta_{w}^{{}} \hfill \\ \end{gathered}$$
(1)

In the expression of belief rules, \(R_{k}\) denotes the \(W{\text{th}}\) belief rule, \(a_{1} \left( t \right),...,a_{W} \left( t \right)\) represents a sample with \({\text{W}}\) prerequisite attributes, \({\text{F}}_{1} ,...,{\text{F}}_{W}\) represents the reference value corresponding to the W prerequisite attributes, \(H_{1} ,...,H_{N}\) represents the \(N\) possible outcomes, \(D_{1} ,...,D_{N}\) represents the belief degrees associated with each outcome under the \({\text{k - th}}\) belief rule, \(\theta_{1} ,...,\theta_{k}\) denotes the rule weight of the \(k{\text{th}}\) belief rule, and \(\updelta _{1}^{{}} {,}...,\updelta _{w}^{{}}\) represents the attribute weight of each prerequisite attribute.

Problem formulation

A typical WSN consists of four main components: the sensor nodes, the wireless transmission channels, the sink node, and the information processing center. The wireless sensor nodes are responsible for collecting various types of environmental data. The wireless transmission channels facilitate communication between different nodes. The sink node detects connections between the region and external networks. Finally, the processing center aggregates and processes data sent by different sensors.

Fault diagnosis can be divided into four parts: obtaining characteristics of faulty sensor data, determining adaptive attribute weights based on different environments, diagnosing faults by combining various information sources, and improving model parameters using optimization algorithms. The four problems are described as follows:

Problem 1: The fault diagnosis model necessitates extracting diverse data features as input attributes. In the realm of WSNs, data obtained from distinct sensors exhibit resemblances, encompassing temporal and spatial correlations. Upon the failure of a WSN node, these correlation features undergo alterations. Hence, it becomes imperative to scrutinize the raw data collected by the sensors and extract data features that bear time-based or spatial associations. These extracted features are employed as input variables. The extraction of data features can be described by Eq. (2).

$${\text{a}}_{1} \left( t \right){\text{,a}}_{2} \left( t \right),...,{\text{a}}_{w} (t) = \mu ({\text{X}},\Lambda )$$
(2)

The function \(\mu ()\) is employed to denote the extraction of features from the raw data acquired by the WSN, where \(\Lambda\) signifies the parameters involved in this process. Specifically, \({\text{a}}_{1} \left( t \right){\text{,a}}_{2} \left( t \right),...,{\text{a}}_{w} \left( t \right)\) represents the \({\text{w}}\) attribute data features over a given time interval, while \(X\) denotes the raw data gathered by the sensor device within that time duration. The variable \({\text{t}}\) refers to a specific moment within the time interval.

Problem 2: The model is designed to improve the reliability of fixed attribute weights and initialize adaptive attribute weights on its basis. The reliability of the information collected by WSN nodes is affected by the harsh working environment, which leads to deviation in the input attributes and thus affects the accuracy of the attribute weights. In addition, when the diagnostic model is too complex, the update time of the model parameters is long, and the timeliness of its modelled attribute weights is limited. Therefore, expert knowledge is needed to construct an accurate diagnostic model. The process of building adaptive attribute weights can be expressed as Eq. (3).

$$\delta_{{\text{j}}}^{{\text{i}}} = {\text{g}}(\delta_{{\text{j}}}^{{}} ,\Xi ),\quad i = 1,...,K,j = 1,...,W$$
(3)

\(\delta_{{\text{j}}}^{{\text{i}}}\) is the adaptive attribute weight, and K represents the total number of rules in the BRB model.\(\delta_{{\text{j}}}^{{}}\) represents the previous fixed attribute weight, \(\Xi\) represents the expert knowledge used to initialize the adaptive attribute weight, and \(g()\) indicates the function for calculating the adaptive attribute weight.

Problem 3: The fault diagnosis model needs to combine multiple sources of information to reason about the diagnosis results. Restricted by the monitoring environment of WSNs, a large amount of high-value data cannot be collected. The accuracy of models constructed solely from expert knowledge is insufficient. Therefore, it is necessary to consider how the different information collected can be aggregated into the following fault diagnosis model. This BRB inference process with adaptive attribute weights can be expressed as Eq. (4).

$$S\left( t \right) = f({\text{a}}_{1} \left( t \right){\text{,a}}_{2} \left( t \right)...{\text{a}}_{w} \left( t \right),\tau )$$
(4)

where \(S\left( t \right)\) is the predicted fault state of the diagnostic system. \(\tau\) represents the other parameters involved in this process.

Problem 4: To enhance the accuracy of diagnosis outcomes, optimization algorithms are essential for refining the initial parameters of the model. Due to the high complexity of the working environment of WSNs, experts cannot provide highly accurate information to construct the fault diagnosis model, so the initial parameters of the model provided by them are not optimal. Therefore, it is necessary to use parameter optimization algorithms to improve the parameters. This parameter optimization process can be denoted as Eq. (5).

$$\tau_{{{\text{best}}}} {\text{ = h}}\left( {\tau ,\beta } \right)$$
(5)

The optimized parameters are represented by \(\tau_{{{\text{best}}}}\), where \(\tau_{{}}\) denotes the parameters to be optimized. The optimization algorithm's parameters are indicated by \(\beta\), and \(h()\) represents the parameter optimization algorithm.

Establishment of the WSN nodes fault diagnosis model based on BRB-AAW

The BRB-AAW technique is employed to address the main issues encountered during the fault diagnosis of WSN nodes in "Establishment of the WSN nodes fault diagnosis model based on BRB-AAW". This section will put forth resolutions to tackle these predicaments. The structure of the BRB-AAW-based WSN fault diagnosis model is described in "Basic structure of the model", the selection process of data features is recorded in "Extraction of data features", the modelling process of BRB-AAW is presented in "Formulation of rules and reasoning process of the BRB-AAW", the optimization process of model parameters by the P-CMA-ES algorithm is documented in "Optimization process of the model", and the overall modelling process of the BRB-AAW-based WSN fault diagnosis model is illustrated in "Model building process".

Basic structure of the model

The faults of the WSN nodes are diagnosed using the BRB-AAW approach, which involves breaking down the diagnosis model into four main components. First, data features that are beneficial for fault diagnosis are extracted from the original data. Second, the adaptive input attribute weights, initialized based on expert knowledge, are incorporated. The third component comprises the generation of rules and reasoning module, where the rules in BRB-AAW are initialized and the reasoning process is performed while considering the adaptive attribute weights. Finally, a constrained optimization algorithm is employed to refine the initial parameters of the model, in order to obtain more precise diagnosis outcomes. Figure 1 provides an illustration of the fundamental structure of the model.

Figure 1
figure 1

Elements of the BRB-AAW model.

Extraction of data features

To distinguish the types of faults occurring in the nodes, various data features should be derived from the data collected by the WSN nodes. In the present study, MeanGap and Kurtosis are used as data features extracted to distinguish different types of faults23, with MeanGap helping to assess overall variability and Kurtosis highlighting extreme observations or critical thresholds in the dataset. In addition, both data features are time-varying and can be calculated using Eq. (6).

The MeanGap between moments \(Q\) and \(Q + T\) can be calculated using Eq. (6). \(T\) indicates a time interval.

$$M{\text{ean}}G{\text{ap}}_{i} = \left| {\frac{{w\sum\limits_{t = Q}^{{Q{ + }T}} {{\text{a}}_{i} \left( t \right) - } \sum\limits_{t = Q}^{{Q{ + }T}} {\sum\limits_{j = 1}^{w} {{\text{a}}_{i} \left( t \right)} } }}{{w\left( {T{ + }1} \right)}}} \right|,i = 1,...,w$$
(6)

Kurtosis is a critical feature of the number distribution curve that characterizes the degree of sharpness or flatness of its peak. It can be calculated using Eq. (7).

$$Kurtosis_{i} = \frac{{\sum\limits_{t = Q}^{{Q{ + }T}} {\left[ {{\text{a}}_{i} \left( t \right) - \overline{{{\text{a}}_{i} }} } \right]^{4} } }}{{\left( {T{ + }1} \right)\upalpha ^{4} }}_{{}} i = 1,...,w$$
(7)

The average value of the data is represented by \(\overline{{{\text{a}}_{i} }}\). The standard deviation of the data is denoted by \(\upalpha ^{4}\).

Formulation of rules and reasoning process of the BRB-AAW

After extracting the input data features, the next step is to use the data features as input attributes and then build the rules for the BRB-AAW model. The structure of the \({\text{kth}}\) rule \(R_{k}\) is outlined in Eq. (8).

$$\begin{gathered} R_{k} :if{\kern 1pt} a_{1} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{1} {\kern 1pt} \cap {\kern 1pt} {\kern 1pt} a_{2} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{2} {\kern 1pt} \cap ...{\kern 1pt} \cap a_{W} \left( t \right){\kern 1pt} is{\kern 1pt} \, F_{W} {\kern 1pt} \, \hfill \\ Then{\kern 1pt} {\kern 1pt} {\kern 1pt} result{\kern 1pt} {\kern 1pt} is{\kern 1pt} \left\{ {\left( {H_{1} ,D_{1} } \right),\left( {H_{2} ,D_{2} } \right),...,\left( {H_{N} ,D_{N} } \right)} \right\} \hfill \\ with{\kern 1pt} {\kern 1pt} rule{\kern 1pt} {\kern 1pt} weight{\kern 1pt} {\kern 1pt} \theta_{k} \hfill \\ and{\kern 1pt} {\kern 1pt} attribute{\kern 1pt} {\kern 1pt} weight{\kern 1pt} {\kern 1pt} \delta_{1}^{k} ,\delta_{2}^{k} ,...,\delta_{w}^{k} \hfill \\ \end{gathered}$$
(8)

The model has \({\text{w}}\) input attributes denoted by \({\text{a}}_{{\text{i}}} (t)(i = 1,2...,w)\), and the set of reference values used to evaluate these attributes is represented by \(F_{{\text{i}}} (i = 1,2...,w)\). The BRB-AAW model produces \(N\) fault state evaluation results, denoted by \(H_{{\text{i}}} (i = 1,2...,N)\). Each of these results corresponds to a belief degree \(\theta_{{\text{i}}} (i = 1,2...,k)\) under the \(k{\text{th}}\) belief rule. The \(i - th\) belief rule has a rule weight of \(\theta_{i}\), and there are \({\text{k}}\) such belief rules. Additionally, \(\delta_{1}^{{\text{k}}} ,...,\delta_{W}^{{\text{k}}}\) represents the adaptive attribute weights in the \(i - th\) belief rule in the set of adaptive attribute weights \(\left[ {\updelta _{1}^{1} {,}\updelta _{2}^{1} ,...,\updelta _{w}^{1} } \right],...,\left[ {\updelta _{1}^{k} {,}\updelta _{2}^{k} ,...,\updelta _{w}^{k} } \right]\), which is obtained based on the simulation judgment results of data features and expert knowledge. Adaptive attribute weights can avoid the influence of unreliable data features in different environments.

After completing the rule construction process, the next step is to incorporate the adaptive attribute weights into the inference process of the BRB model. This study's BRB model inference process, considering adaptive attribute weights, consists of five distinct steps.

Step 1: The initial step in the inference process involves calculating the matching degree of attributes. This is accomplished by inputting attribute data and calculating the corresponding matching degree with reference points, utilizing input and reference values as a basis. The calculation process is described by Eq. (9).

$$\uprho _{{\text{i}}}^{{\text{j}}} { = }\left\{ \begin{gathered} \frac{{F_{{\text{i}}}^{{\text{k + 1}}} - a_{i} \left( {\text{t}} \right)}}{{{\text{F}}_{{\text{i}}}^{{\text{k + 1}}} - {\text{F}}_{{\text{i}}}^{{\text{k}}} }},j = K \hfill \\ \frac{{a_{i} \left( {\text{t}} \right) - {\text{F}}_{{\text{i}}}^{{\text{k}}} }}{{{\text{F}}_{{\text{i}}}^{{\text{k + 1}}} - {\text{F}}_{{\text{i}}}^{{\text{k}}} }},j = K{ + 1} \hfill \\ {\text{0,j = 1,2,}}...{\text{,K,j}} \ne {\text{K,j}} \ne {\text{K}} + 1 \hfill \\ \end{gathered} \right.$$
(9)

The equation encompasses the matching degree of the \(j{\text{th}}\) reference value of the \(i{\text{th}}\) attribute, denoted as \(\uprho _{{\text{i}}}^{{\text{j}}}\), the current value of the input attribute denoted by \(a_{j}\), and the \(k{\text{th}}\) reference value of the \(i{\text{th}}\) attribute denoted by \(F_{{\text{i}}}^{{\text{k}}}\). This formula can be utilized to compute the degree of match of the attribute reference value when the condition represented by \({\text{F}}_{{\text{i}}}^{{\text{k}}} \le a_{i} \left( {\text{t}} \right) \le {\text{F}}_{{\text{i}}}^{{\text{k + 1}}}\) is fulfilled.

Step 2: Initialization of adaptive attribute weights is considered. In this step, the fixed attribute weights are initialized to different adaptive attribute weights based on the initialization information provided by expert knowledge24. The initialization process is shown in Eq. (3):

Step 3: The matching degree of the \(k{\text{th}}\) rule is computed by computing the attribute matching. Subsequently, the match of the rule in BRB needs to be determined. If the match of the rule is nonzero, the rule is activated; otherwise, it remains deactivated. Equation (10) illustrates the formula for calculating the matching degree of a rule.\(\rho_{{\text{k}}}^{{\text{i}}}\) represents the matching degree of the \(i{\text{th}}\) attribute in the \(k{\text{th}}\) rule.

$$\uprho _{k} = \prod\limits_{i = 1}^{W} {\left( {\uprho _{k}^{i} } \right)}$$
(10)

Step 4: Once the matching degree of the rules has been calculated and the activated rules have been identified, the next step is to calculate the activation weights of the rules. The activation weights can be computed using Eq. (11).

$$\mho_{i} = \frac{1}{{\sum\limits_{j = 1}^{K} {\theta_{j}\uprho _{j} } }}\theta_{i}\uprho _{i} ,i = 1,2,...,K$$
(11)

In the equation above, the variable \(\theta_{i}\) represents the weight of the \(k{\text{th}}\) rule, while the variable \(\rho_{i}\) represents the matching degree of the same rule. The symbol \(K\) represents the total number of rules in the BRB model. Only the rules that are activated have a nonzero activation weight, while the activation weight for nonactivated rules is zero.

Step 5: After identifying the activated rules, they are integrated using an ER algorithm to obtain a fused belief degree25. The calculation method for this is demonstrated through Eqs. (13) and (14).

$$\psi = \left[ {\sum\limits_{n = 1}^{N} {\prod\limits_{i = 1}^{K} {\left( {\mho_{i} D_{n,i} + 1 - \mho_{i} \sum\limits_{j = 1}^{N} {D_{j,i} } } \right)} - \left( {N - 1} \right)} \prod\limits_{i = 1}^{N} {\left( {1 - \mho_{i} \sum\limits_{j = 1}^{N} {D_{j,i} } } \right)} } \right]^{ - 1}$$
(13)
$$D_{n} = \psi \frac{{\left[ {\prod\limits_{i = 1}^{K} {\left( {\mho_{i} D_{n,i} + 1 - \mho_{i} \sum\limits_{j = 1}^{N} {D_{j,i} } } \right) - } \prod\limits_{i = 1}^{K} {\left( {1 - \mho_{i} \sum\limits_{j = 1}^{N} {D_{j,i} } } \right)} } \right]}}{{1 - \psi \prod\limits_{i = 1}^{K} {\left( {1 - \mho_{i} \sum\limits_{j = 1}^{N} {D_{j,i} } } \right)} }}$$
(14)

The framework for identifying fault diagnosis models consists of \(N\) levels, denoted as \(N\), while the number of rules that have been triggered is represented by \(K\). The activation weight of a rule is denoted by \(\mho_{i}\), while the belief degree of consequent \(j\) in rule \(i\) is represented by \(D_{j,i}\). The expert knowledge determines the initial belief degree. By using Eqs. (12) and (13) for calculation, Eq. (14) shows the resulting output.

$$S\left( {\text{t}} \right) = \sum\limits_{i = 1}^{N} {p\left( {H_{i} } \right)D_{i} }$$
(14)

where \(p\left( {H_{i} } \right)\) is the utility of the \(i{\text{th}}\) fault diagnosis, determined by the expert based on the actual fault state. \(S\left( {\text{t}} \right)\) represents the final diagnosis result obtained by the fault diagnosis model.

The above analysis presents an introduction to the inference process of BRB-AAW. Figure 2 illustrates the entire inference process in graphical format.

Figure 2
figure 2

Reasoning process of the BRB-AAW.

Optimization process of the model

The initial values for rule weights, belief degrees of BRB-AAW, and adaptive attribute weights are determined by expert knowledge, as explained in "Extraction of data features". However, in cases where the model comprises a large number of parameters and the experts' experience and knowledge are insufficient, the initial parameter settings may not be reasonable. This could have an adverse impact on the model diagnosis accuracy. To address this issue, this paper proposes a model optimization process that employs the projection covariance matrix adaptive evolution strategy (P-CMA-ES) to optimize the model parameters26,27. The optimized parameters that require optimization must satisfy the following conditions.

$$\begin{gathered} \min MSE(\tau ) \hfill \\ s.t. \hfill \\ \sum\limits_{{{\text{n}} = 1}}^{N} {D_{{\text{n,i}}} } \le 1,i = 1,2,...,K \hfill \\ 0 \le D_{{\text{n,i}}} \le 1,n = 1,2,...,N,i = 1,2,...,W \hfill \\ 0 \le \theta_{{\text{i}}} \le 1,i = 1,2,...,K \hfill \\ 0 \le \delta_{i}^{j} \le 1,i = 1,2,...,W,j = 1,2,...,K \hfill \\ \end{gathered}$$
(15)

To optimize the model, the objective function employed is the mean square error (MSE), represented by MSE. Equation (15) provides the expression for this objective function.

Once the parameters to be fine-tuned and the constraints have been established, it is necessary to define a metric that reflects the efficacy of the optimization. Suppose that the outcome of the optimization procedure is \(S({\text{t}})_{{{\text{expected}}}}^{{}}\), whereas the initial output from the dataset for training purposes is \(S(t)_{{}}^{{}}\). Based on the analysis above, the optimization process of the model can be interpreted as the quest for the minimum threshold of the mean square error (MSE) between the predicted results and the actual results. The MSE is calculated using Eq. (16), where NUM signifies the count of data points employed in the optimization of the parameters. The optimization of model parameters is carried out using the P-CMA-ES algorithm, which is illustrated in Fig. 3.

$$MSE(\tau_{{}} ) = \frac{{\sum\limits_{{{\text{i}} = 1}}^{NUM} {\left( {S(t)_{{{\text{expected}}}}^{{}} - S(t)_{{}}^{{}} } \right)^{2} } }}{NUM}$$
(16)
Figure 3
figure 3

Optimization process using the P-CMA-ES algorithm.

Model building process

Upon analysing the contents of this section, the process of creating a WSN node diagnostic fault model using BRB-AAW can be broken down into the following steps, as shown in Fig. 4:

Figure 4
figure 4

BRB-AAW-based fault diagnosis model for WSN nodes.

Step 1: Extract the WSN node's data features from the original data and employ them as the initial attributes of the BRB-AAW model.

Step 2: Improve the static attribute weights and obtain reasonable attribute weights based on expert knowledge.

Step 3: The parameters are given initial values, and rules are integrated by the ER parsing algorithm.

Step 4: To enhance the diagnostic accuracy of the model, the initial parameters are optimized using the P-CMA-ES algorithm.

Case study

Within this section, a comparative analysis is performed between BRB-AAW and other fault diagnosis methods using sensor data sourced from Intel Berkeley Research Lab. The findings demonstrate a notable enhancement in the accuracy of fault diagnosis results for WSN nodes when utilizing the BRB-AAW method. The sensor distribution is shown in Fig. 5. The necessary information for the Intel Labs data is shown in Table 2. The process of obtaining the observed data and the fault identification framework setup is formulated in "Dataset setting", the initial parameters needed for the BRB-AAW model are calculated in "Construction of the BRB-AAW model", the metrics observed in the example are documented in "Training and testing of the model", the results of the comparisons between the parameter optimization algorithms are shown in "Comparison of optimization algorithms", the results of the comparative experiments with multiple metrics are shown in "Results of the experiment", and the comparison of the BRB and the BRB-AAW with the multiple rounds of the control variable experiments are documented in "Comparison with other methods".

Figure 5
figure 5

Distribution of laboratory sensors.

Table 2 Information about the dataset.

Dataset setting

Step 1: The dataset undergoes preprocessing to establish the diagnostic result set of the model. It comprises thermal conditions, atmospheric moisture, brightness, and electrical potential data gathered by sensors deployed within a laboratory room. Taking into account the sensor arrangement and the trajectory of the data 28, temperature readings collected by sensors 1 through 4 recorded between March 1 and 7 were selected for further analysis. Preprocessing is necessary due to data gaps. Furthermore, to showcase the model's capacity to effectively address noisy data, Gaussian noise is added during dataset simulation.

After processing, the dataset comprises a total of 2016 data points with a 5-min interval between successive records. Figure 6 illustrates the temperature data recorded by sensors 1 through 4.

Figure 6
figure 6

Sensor data after preprocessing.

Step 2: This paper endeavors to identify sensor states, including normal, fixed-value faults, outlier faults, high-noise faults, and offset faults. To achieve this, the simulation of the aforementioned five sensor state types on sensor 1 was carried out using a software-based approach that aligns with specific characteristics of faults. The technique employed for simulating state data is presented in Table 3, and Fig. 7 illustrates the resulting simulated state data. In Fig. 7, 1–399 indicates normal data, and 400–799 indicates offset fault data. 800–1199 is high noise fault data, 1200–1599 is abnormal value fault data and 1600–2016 is fixed value fault data.

Table 3 Fault simulation methods.
Figure 7
figure 7

Sensor data after adding Gaussian noise.

Step 3: According to the dataset in the case study, the framework for identifying fault diagnosis models produces five separate states: normal states (NS), offset faults (OSF), high noise faults (HNF), outlier faults (OLF), and fixed value faults (FVF). These states are defined by Eq. (17), with their respective reference values provided in Eq. (18).

$$\{ NS,OSF,HNF,OLF,FVF\}$$
(17)
$$\{ 0,1,2,3,4\}$$
(18)

Construction of the BRB-AAW model

Step 1: Following data preparation, the data features were extracted utilizing the approach outlined in "Dataset setting". Specifically, the \(MeanGap\) and \(Kurtosis\) were extracted as input features of the model. The duration for feature extraction was set to 12, and the resulting features were normalized. Figure 8 illustrates the extracted data features. The mean gap data feature in the 800–1199 part of Fig. 8 is more effective in distinguishing between differentiated fault types than the \(Kurtosis\) data feature in the same part of Fig. 8. Therefore, this serves as an important basis for expert knowledge to provide the set of adaptive attribute weights.

Figure 8
figure 8

Mean gap data feature image.

Step 2: After the extraction of data features, it is necessary to determine the reference values and reference points for each attribute. To accomplish this, the data distribution characteristics of Figs. 8 and 9 were considered. Specifically, benchmark values and reference points for the MeanGap and Kurtosis were established. For the MeanGap, reference points were established as small (S), relatively small (RS), medium (M), relatively large (RL), and large (L), with corresponding reference values presented in Table 4. Conversely, Kurtosis was characterized by reference points of small (S), relatively small (RS), relatively large (RL), and large (L), with associated reference values displayed in Table 5.

Figure 9
figure 9

Comparative results of optimization algorithms.

Table 4 Reference value of mean gap.
Table 5 Reference value of kurtosis.

Step 3: The optimization of other parameters of the model is performed by applying the P-CMA-ES approach described in "Optimization process of the model". The optimized parameters are presented in Table 6, where each row corresponds to a rule. After optimization, the model inference process described in "Formulation of rules and reasoning process of the BRB-AAW" is employed in conjunction with the optimized parameters for the purpose of sensor fault diagnosis and result generation.

Table 6 Tolerance range parameters of data features.

Training and testing of the model

Training data and iterative data are determined, and data features are extracted from the simulated fault data. The data samples are randomly divided into 3:7, 4:6, 5:5, 6:4, 7:3, and 8:2 according to the commonly used training and test set ratios.

The evaluation criteria for the fault diagnosis model are established. To assess the effectiveness of the method, the evaluation metrics chosen include overall accuracy, false negative rate (FNR), false positive rate (FPR), true positive rate (TPR), true negative rate (TNR), and precision. In this context, samples without faults are considered negative samples, while samples with faults are considered positive samples. The equations representing these metrics are provided as follows: Eq.  (19) for \(Accuracy\), Eq. (20) for \(FNR\), Eq. (21) for \(FPR\), Eq. (22) for \(TNR\), Eq. (23) for \(TPR\), and Eq. (24) for \(Precision\).

$$A{\text{ccuracy = }}\frac{{NUM_{{{\text{right}}}} }}{{NUM_{{{\text{brochure}}}} }}$$
(19)

The variable \(NUM_{{{\text{brochure}}}}\) indicates the quantity of correctly diagnosed samples by the model. The term \(NUM_{{{\text{right}}}}\) refers to the overall number of samples analysed.

$$FNR = \frac{FN}{{TP + FN}}$$
(20)

The variable FN represents the quantity of samples that were falsely diagnosed as negative, while TP indicates the number of samples that were accurately diagnosed as positive.

$$FPR = \frac{FP}{{FP + TN}}$$
(21)

The variable FP denotes the quantity of samples that were falsely diagnosed as positive, while TN indicates the number of samples that were correctly diagnosed as negative.

$$TNR = \frac{TN}{{TN + FP}}$$
(22)

The variable TN denotes the quantity of samples judged negative and actually negative.

$$TPR = \frac{TP}{{TP + FN}}$$
(23)

The variable TP denotes the quantity of samples judged positive and actually positive, while TN indicates the number of samples that were correctly diagnosed as negative.

$$\Pr {\text{ecision}} = \frac{TP}{{TP + FP}}$$
(24)

Comparison of optimization algorithms

Expert knowledge is utilized to set parameters such as adaptive attribute weights and rule weights, but these initial parameter settings may not be the best. Therefore, optimization algorithms are employed to achieve more precise diagnosis results. Three common optimization algorithms for BRB, namely, particle swarm optimization (PSO), the genetic algorithm (GA), and the P-CMA-ES method, are tested on six distinct datasets of varying sizes, as described in "Training and testing of the model". The test outcomes are illustrated in Fig. 9. First, the GA exhibits the highest MSE value and the least favorable optimization effect. The PSO algorithm and P-CMA-ES algorithm yield similar MSE values. Second, in terms of optimization time, the GA algorithm and P-CMA-ES algorithm demonstrate comparable performance. However, the GA exhibits an excessively high MSE value. Finally, the P-CMA-ES algorithm emerges as the most effective optimization algorithm for the model. The optimized results are presented in Table 7.

Table 7 Optimized model parameters.

Results of the experiment

To verify that the BRB-AAW-based WSN node fault diagnosis method can effectively reduce the influence of noisy data on the WSN node fault diagnosis process, experiments were conducted using BRB-AAW, artificial neural network, Gaussian regression, SVM, decision tree, and boosting tree at different ratios of training samples to test samples. In addition to the above methods, it can be compared with algorithms such as logistic regression, plain Bayesian classifier, K-nearest neighbor classification, and K-mean clustering, and the comparison metrics include the overall accuracy, false negative rate (FNR), false positive rate (FPR), true positive rate (TPR), true negative rate (TNR), and precision. The experimental results are presented in Fig. 10. Indicators data for different methods at different ratios of training samples to test samples can be seen in Table 8.

Figure 10
figure 10

Experimental results for different ratios of training samples to test samples.

Table 8 Indicators data for different methods at different ratios of training samples to test samples.

Comparison with other methods

To assess the effectiveness of the method proposed in this paper and the advancements made by the BRB method, a comparison with other methods was carried out. The fault diagnosis results were compared to those obtained using the BRB method, as illustrated in Fig. 11. The average values of the assessment indicators for each method are presented in Fig. 12. Taking the ratio of training samples to test samples as 7 to 3 as an example, the values of all assessment metrics of each method are shown in Fig. 13.

Figure 11
figure 11

Evaluation of the diagnostic results of the BRB-AAW in comparison to the BRB.

Figure 12
figure 12

The average results of BRB-AAW compared with other methods.

Figure 13
figure 13

All results of BRB-AAW compared to other methods at the same training to test sample ratio.

Upon conducting a comparison between the outcomes of the BRB-AAW and BRB, it becomes apparent that the BRB-AAW values more accurately reflect the real scenario, particularly when the standard value is 0. The test results indicated that BRB-AAW's overall accuracy, narrow neural networks, and SVM were 92.25%, 90.29%, and 87.98%, respectively, while the corresponding values for BRB were 90.24%, 23.35%, and 1.09%29. The scattered diagnostic results of the BRB approach can be attributed to the use of static attribute weights, which can lead to incorrect fault type identification based on attribute weights. To address this issue, adaptive attribute weights are obtained by improving static attribute weights, which enhances the relevance of diagnosis and effectively identifies fault types.

Based on the comparison of evaluation indexes among different methods, the following conclusions can be drawn. First, the BRB-AAW and BRB methods generally outperform other approaches in relation to \(Accuracy\). Second, the BRB-AAW method exhibits a low occurrence of false positives, which reduces the likelihood of nodes being misdiagnosed as faults. Finally, there are minor discrepancies in the false-negative rate across all methods, fluctuating by approximately 1.3% or less, and there are no significant differences observed.

These results can be attributed to several factors. First, the BRB-AAW method incorporates adaptive attribute weights and enhances the calculation methodology for attribute weights, enabling the identification of reliable fault types and more precise adaptive attribute weights. Second, the reasoning approach employed by BRB-AAW is similar to that of BRB and can effectively deal with ambiguous information, including vagueness, unpredictability, and ignorance. Finally, the configuration of the model parameters for BRB-AAW is based on expert knowledge and experience, resulting in more reasonable parameter values. The synergistic effect of these factors contributes to the improved accuracy of diagnosis in the BRB-AAW method.

Conclusion

After analysing the relevant literature, there are three problems with the current fault diagnosis methods used for WSNs. First, these methods do not take into account the effect of environmental noise on sensor readings during fault diagnosis. Second, the neural network-based methods require a large number of uniform fault samples to train the model parameters, which makes them less practical. Finally, the attribute reliability calculation of BRB methods cannot consider unreliable data with large variations in attribute values in the middle section, which leads to inaccurate fault diagnosis. To address these drawbacks, in this paper, the BRB-AAW model is proposed as a fault diagnosis method.

Nevertheless, the BRB-AAW method has some limitations. Future research will focus on solving the combinational explosion problem in the BRB-AAW model by reducing the number of rules. A network structure with a BRB will also be designed to minimize the number of rules per submodule and help parameter initialization. In addition, the construction method of the BRB network structure will be explored and designed to enhance its model consistency with the underlying working mechanism.