Research Article

A Novel Fault Diagnosis Strategy for Heterogeneous Wireless Sensor Networks

Table 2

Pseudocode of the IABC-KELM algorithm.

SerialPseudocode of the IABC-KELM algorithm

1The bee colony algorithm is initialized, the population size is SN, the maximum number of iterations is MCN, the learning period is , the learning coefficient is λ, the probability is , and the location information of all populations are initialized
2The fitness value of each employed bee is calculated, and the global optimal fitness value is saved.
3While ()
4For to SN
5For all the employed bees in the colony, according to the corresponding the probability , a suitable strategy is selected by the roulette selection method
6Update location information according to the selected strategy
7Calculate the current fitness value
8If ()
9Set
10Else if and <
11Calculate the position information of the current colony
12Calculate the current fitness value
13If ()
14Set
15End if
16End if
17End for
18
19According to the fitness value in descending order [, , ,…,NP]
20For to SN
21Find the th strategy to generate the location information
22If
23Calculate the probability value according to formula (17)
End if
24Use formula (18) to calculate the probability value
25End for
26The next iteration until the termination condition is met
27End while
28Obtain the optimal regularization coefficient and the kernel parameter in the global optimal solution
29The obtained parameter values are used for kernel extreme learning machine training
30Test fault diagnosis sample data. Input: data sample set and algorithm parameter initialization, output: failure accuracy result
31Start
32For to SN
33Use IABC-KELM to obtain the optimal parameters (, ) on to train the nuclear extreme learning machine model. Perform the node fault diagnosis test of HWSNs on
End for
34Returns the average fault diagnosis accuracy rate of the fault diagnosis model on the node fault diagnosis test data set
35End