Abstract
It is significant to improve fault tolerance and transmission reliability for improving the overall performance of wireless sensor networks. Related studies on this issue become the hotspot at present. For issues that nodes fault or link quality can affect the transmission stability and reliability of the network, mechanism of immune system based multipath fault tolerant routing algorithm is presented for wireless sensor networks. Firstly, mechanism of immune system is adopted to establish the hierarchical clustering topology with superior performance of clustering compactness. Then nodes' comprehensive measurement (CM) values are calculated and the contour lines are established among cluster heads according to nodes gradient. Mechanism of immune system is applied to do the variation on the initial antibody population, namely, the multiple disjoint paths, to establish the final optimal transmission paths. Mathematical model is established to do the theoretical analysis on the performance of the algorithm. Through the simulation on the packet receiving rate, accuracy rate, and energy efficiency, the algorithm improves the transmission reliability, energy efficiency of the network, and shows superior performance of fault tolerance.
1. Introduction
Reliability of packet transmission is an important index to evaluate the performance of wireless sensor networks (WSNs). Stable topology based routing is established to realize reliable packet transmission which gives consideration to the balance of energy consumption and low transmission delay, and so forth [1]. However, owing to the characteristics of no center network, dynamic topology, source restriction on computing, transmission and energy, as well as the unpredictability of working scenario especially brought by vibration and electromagnetic interference, it often meets the fault of nodes or links which leads to the packet loss or retransmission. This seriously affects the network performance such as the packet receiving rate, accuracy rate, and average transmission delay. Finally, the fault lowers the transmission stability and reliability, weakens the reserved function, and brings great challenges to the existing network technologies [1].
Fault tolerance is the key technology to improve the transmission stability and reliability of the network. It attracts numerous attentions and becomes the hotspot in the study on wireless sensor networks [2]. Network with superior performance has characteristics of reliable data transmission, efficient energy consumption, and low transmission delay. When the malfunction occurs, the network can adaptively adopt the reasonable control scheme to deal with the fault and continues to provide highly credible computational service. Study on fault tolerance mainly includes the protocol design in each layer and multilayer combination optimal control [1]. Fault tolerance in the network layer is mainly achieved by the multipath transmission technology and network coding. Better performance can be obtained by the effective combination of multimethods of fault tolerance and multilayer optimization control [3].
Biological immune system has the information processing mechanisms such as memory learning, feedback regulation, and no memory distributed autonomy [4]. Artificial immune system, based on the biological immune theory, has the basic immune methods including immune recognition, immune learning, immune memory, and clonal selection. It provides no teachers learning and self-organization mechanism. So, it has the characteristics of open, distributed, dynamic, and robustness, and so forth. Similar to the distributed self-organizing wireless sensor networks, biological immune system needs to maintain its stability in the constantly changing scenario. So, the mechanism of immune system provides a novel approach to the fault-tolerant control issue for wireless sensor networks. It can overcome the defect of the traditional solution and be a significant study direction [5–7].
For the issue that the fault can affect the transmission stability and reliability of the network, multipath fault-tolerant routing algorithm presented in this study mainly includes two parts: immune mechanism based network clustering and the establishment of gradient multipath routing. The main contribution of this paper includes the following. (1) Definition of the related issues of the immune system mechanism in the scenario of wireless sensor networks, such as antibody, antigen, and the affinity during the clustering process, as well as the node coding, path coding, fitness calculation, memory generation, and antibody variation rules during the process of multipath routing establishment. (2) Immune mechanism is applied to cluster the network and nodes' comprehensive measurement (CM) values are calculated to determine the nodes gradient. Immune evolutionary theory is applied to establish the gradient disjoint multipath routing to improve the performance of fault tolerance and transmission stability. (3) Mathematical model is established to do the theoretical analysis and simulation is carried out to test the performance of clustering compactness, algorithm's convergence, efficiency of energy consumption, and fault tolerance.
The rest of this paper is organized as follows. related work is in Section 2. Section 3 presents a multipath fault-tolerant routing algorithm based on the immune system mechanism. It mainly includes the establishment of clustering topology and multipath fault-tolerant routing. Section 4 is the theory analysis and simulation test. The conclusion is in Section 5.
2. Related Works
Multipath fault-tolerant routing algorithm mainly applies the mechanism of immune system into the establishment of clustering topology and gradient multipath routing. So this section briefly makes a survey on the study of immune mechanism in the WSNs, clustering topology based gradient routing, and multipath fault-tolerant routing.
Immune mechanism provides innovative ideas and methods to fault tolerance in wireless sensor networks and the related study shows good performance of fault tolerance [8–13]. Yongjun et al. established frequency control mathematical model and controlling method of minimum energy consumption inspired by the artificial immune theory [8]. Salmon et al. presented collaborative monitoring and intrusion detection mechanism inspired by the immune system. Salmon et al. presented an IDS framework inspired from human immune system to be applied in the context of wireless sensor network [9]. Ya-Qi and Xiao-Yuan presented the clustering topology evolution model with the function of fault tolerance based on immune mechanism [10]. Lim applied immune mechanism to diagnose and repair the failures of nodes or links in order to improve the stability. Bokareva et al., presented the fault-tolerant structure SASHA which is based on the biological immune mechanism [5]. Amir et al. applied the theory of clonal selection, immune affinity, and immune network to establish the network model by simulating self-learning, self-organization, memory, and information processing mechanism in the biological immune system or nerve immune system [6, 7].
Multipath transmission technology for fault tolerance is to transmit the split fragments along multiple paths established between the source node and the destination node. Certain amount of fragments received at the destination node are reconstructed into the source data. By the mechanism of redundant transmission, load balance and transmission bandwidth are improved to realize the reliability and fault tolerance. Energy efficient reliable multipath routing using network coding (NC-EERMR) [3] is to establish the multipath routing in a distributed way through multiple hops. Subbranch multipath routing protocol (SMRP) [11], based on secure and efficient intrusion-fault-tolerant protocol (SEIF) which is DM model, improves the fault tolerance and credibility by multiple routing selection in a distributed authentication way. Self-selecting reliable path routing (SRP) [12] which is based on SSR (self-selecting routing) and SHR (self-healing routing) establishes multiple paths to realize the transmission fault tolerance. Mixed multipath mechanism H-SPREAD [13] is based on the mechanism of hybrid multipath data acquisition and adopts the key sharing and backup path for any node to improve security and reliability of data transmission. Network coding based multipath reliable transmission route (NC-RMR) [14] adopts BM mode to establish the logical backup for any path. DD (Directed Diffusion) [15] establishes the multipath transmission mode to deal with node failure and topology changes through three phases: flooding the interests, establishing the gradient, and dynamically optimizing transmission routing. DD based multipath routing algorithm [16] strengthens the multiple paths with superior quality and low transmission delay. [17] presents DM based distributed multipath routing algorithm with high energy efficiency and scalable characteristic which can adjust data flow by load balance mechanism. VR (Distance Vector Routing) [18] establishes the paths by light-weight flooding only when the data needs transmitting.
Nodes in the network are divided into different hierarchies according to gradient values defined by the distance or hops to the destination node, nodes' energy level, and transmission delay. Gradient based transmission routing is established along the gradient direction by a certain strategy. The energy balance nonuniform clustering gradient based routing (EBCAG) [19] transmits the packets along the gradient descent direction to the destination node according to the gradient value decided by the minimum hops. GBR (Gradient-Based Routing) [20], which contains competitive algorithm GBR-C and adaptive GBR-C, is to establish two forward hops to minimize the probability of data retransmission. FGS (Fine-grain Gradient Sinking) [21] introduces average weighted mechanism based on the HGS (Hop Gradient Sinking) model and converts hop count information into fine gradient information as the reference to establish data transmission strategy. DAR (Data Aggregating Ring) [22] classifies the nodes by the hops, the packets are not always transmitted along the gradient direction to the destination node through multiple hops, and they can be directly forwarded to the destination node through only one hop by load balance mechanism. In [23], nodes are divided into different hierarchical rings based on the nodes' nonuniform distribution strategy, the shortest transmission path is established among different hierarchical rings. MR2-GRADE (Gradient based maximally radio disjoint multipath routing) [24] presents GRADE-GF (Grade based greedy forwarding) and GRADE-RF (Grade based restricted flooding). [25] studies the gradient model based network's upper and lower bounds of the survival time. Gradient broadcast (GRAB) [26] allows nodes with low gradient values to forward packets simultaneously to form the multipath routing. However, it lowers the transmission reliability owing to the conflicts of twice forwarding.
Immune system mechanism is adopted to establish the mathematical model to save the energy consumption, establish intrusion detection system, cluster the network, diagnose the faults and so on. Gradient mechanism shows the advantages especially in the routing establishment and energy consumption. Multipath transmission mechanism has been proved with good performance on improving the stability and reliability of packet transmission. However, little study is mentioned to adopt immune system mechanism into the gradient multipath transmission in wireless sensor networks to improve the performance of transmission stability and fault tolerance.
3. Mechanism of Immune System Based Multipath Fault-Tolerant Routing Algorithm
3.1. Mechanism of Immune System
Biological immune system adopts the mechanisms of self-recognition, mutual stimulation, and restriction to constitute a dynamic balance network according to the basic immune methods such as immune recognition, immune learning, immune memory and clonal selection, and so forth. Biological immune system is a highly distributed, safe, efficient, and adaptive learning system with hierarchical topology. It has good robustness and high complexity due to the information processing mechanism such as self-learning, feedback regulation, and no-center distributed autonomy. Artificial immune system, based on the biological immune theory, has the basic immune methods including immune recognition, immune learning, immune memory, and clonal selection. It provides no teachers learning and self-organization mechanism. So, it has the distributed and dynamic characteristics as well as robustness. These can overcome the defect of traditional methods to the establishment of clustering topology and provide novel solutions to the issues.
3.2. Idea of Multipath Fault-Tolerant Routing Algorithm
The algorithm mainly adopts immune mechanism to cluster network and establishes multipath transmission mechanism to improve reliability of data transmission and performance of fault tolerance. Immune mechanism based clustering topology uses the affinity function defined by energy and distance factor to calculate the affinity of antibody and antigen. Some excellent antibodies are selected into the memory according to the threshold value to form the new antibodies population by variation and output the optimal antibody solution, namely, the optimal clustering topology. Node’ gradient is calculated according to the comprehensive measurement function; then the node and path are encoded. Finally, immune mechanism is adopted to antibodies' variation to ultimately establish multiple transmission paths.
3.3. Immune System Mechanism Based Clustering Algorithm
3.3.1. Problem Definition
Antibody. Defined as cluster heads in wireless sensor networks, namely, the solution to the problem. Nodes in the network are divided into two categories, one is average node and another is the cluster head. Comparing cluster head, average node only concentrates on data gathering and transmission exclude taking charge of other nodes.
Antigen. Defined as the average nodes randomly deployed in the network, namely, the problems needing to be solved.
Antigen Recognition. For the issues of clustering topology optimization in the network, antigen corresponds to each node in the network, antibody corresponds to each cluster head, so the antigen recognition is defined as the process that cluster head exchanges information with its neighbor nodes within the sending power coverage.
Initial Antibody Populations. A number of average nodes are randomly selected as cluster heads and the initial antibody population is formed. Each cluster head has its location and energy information.
Affinity. Affinity reflects the matching degree between the antigen and antibody or between the antibody and antibody. The greater the affinity value is, the greater the antibody matches the antigen. The affinity function is defined as follows:
Encoding. Natural number is selected as the coding method for node's coding.
Antibody Memory. It selects the antibodies with high affinity values into the memory as the candidates for optimal cluster heads.
3.3.2. Clustering Algorithm Idea
Firstly, ordinary nodes are randomly selected as the initial clusters by the probability which names the initial antibodies. Distance factor is adopted to form the initial antibody population. Then the affinity of antibody and antigen is calculated by the affinity function defined by the nodes' energy and distance. Some excellent antibodies are selected into the memory according to the threshold value to do the variation. The affinity is recalculated and the optimal antibody solution is outputted by the terminating condition. Finally, clustering topology is formed with the good performance of clustering compactness as well as giving consideration to the energy factor.
3.3.3. Algorithm Steps
Step 1.
Initialize the parameters, set the basic parameters of immune algorithm.
Step 2 (antigen recognition).
Antigen recognition reflects the communication process between the cluster head and its neighbor nodes within the power coverage.
Step 3 (establish the initial antibody population).
μ average nodes are randomly selected as the initial cluster heads by the probability P, namely, the initial antibodies. It calculates the distance from the nodes to the cluster head itself within its power coverage. Nodes nearer to the cluster head are to be selected to establish the initial antibody population, namely,
Step 4 (fitness calculation).
The defined affinity function is used to calculate the affinity of antibody and antigen.
Step 5 (memory generation).
Cluster heads which have
Step 6 (generate new antibody population by variation).
According to the calculation of affinity between antibody and antigen, antibodies with affinity value being higher than the set threshold are selected into the next iteration. New antibody populations are generated by the variation of antibody gene. Nodes in the network are coding in natural number; for example, i is the natural number code of node
Step 7 (set termination condition and output the optimal solution).
When meeting the condition of iteration n and
Step 8 (confirm the clustering).
Antibodies in the final memory library are selected as the cluster heads and they exchange packets with the member nodes to confirm the clustering.
3.4. Immune System Mechanism Based Multipath Fault-Tolerant Routing Algorithm
3.4.1. Establishment of Node Gradient and Contour Line
(1) Definition and Calculation on Cluster Heads' CM. More packets will be lost or retransmitted due to path's poor quality. This will cause more local energy consumption and serious congestion. Path quality has direct influence on the reliability of packets forwarding. The residual energy determines the survival time of the network. Therefore, the way only using hops as a criterion to evaluate the quality of routing has failed to meet the requirements of service quality. Therefore, nodes' quality is comprehensively evaluated by the hops to the destination node, residual energy, and transmission delay. So, the nodes with higher CM are preferentially selected to establish the optimal transmission path. This has great significance to improve the transmission reliability.
Definition 1.
Comprehensive measurement (CM) is defined to set the appropriate weighting factor to calculate CM for each cluster head according to parameters of hops to the destination nodes, residual energy, and transmission delay. The node's comprehensive measurement function is defined by (4).
(2) Definition and Establishment of CM Based Contour Line
Definition 2.
All nodes' CM values are hierarchically divided, the nodes with equal hierarchy values have similar CM values, and the connection line among the cluster heads with the same hierarchy value is defined as CM based contour line.
Each cluster head's CM is calculated by (4) and divides the nodes into n hierarchies

Contour lines among cluster heads.
3.4.2. Immune Problem Definition
Antibody. Defined as the established n optimal paths along the gradient direction from the source node to the destination node.
Antigen. Defined as the cluster heads in the static clustering topology.
Node Coding. The routing is established among the cluster heads. So, all the cluster heads with gradient values need to be encoded in binary code according to the maximum number of gradient and cluster heads in each gradient. It contains two parts: gradient code and node code; for example, the code of 6th node with gradient 5 is as follows:
The former three binary codes represent the gradient coding of a cluster head, namely, the gradient value being 5. The last four binary codes represent the node coding, namely, the 6th node in this gradient.
Path Coding. The destination node is coded in 000. If a path established from the source node to the destination node has four gradients, the path code can be represented by the combination of cluster heads' codes, shown as follows:
1000111 0110110 0100100 0010010 000.
Fitness Calculation. Path fitness is closely related to each cluster head's CM decided by the hops to the destination node, residual energy, and transmission delay. It is defined and calculated by
Memory. Among all the multiple transmission paths
Antibody Variation. Antibody variation has two scenarios as follows. (1) The established paths only have to mutate its node codes excluding its gradient codes. (2) The established paths to the destination node not always being along each gradient direction can mutate its node coding as well as its gradient coding. The variation rule is 0 randomly mutate to 0 or 1, 1 randomly mutate to 0 or 1.
3.4.3. Routing Algorithm Idea
Cluster heads' CM is calculated based on the clustering topology according to the immune mechanism and the virtual gradient contour lines are to be established. Nodes on the same contour line are coded in the same hierarchical value. Source node selects the cluster head within its power coverage as the next hop along the gradient direction. Thus, multiple disjoint paths to the destination node are established as the initial antibodies. It calculates paths' affinity and selects the path with the affinity being greater than a certain threshold into the memory and does the variations. Multiple optimal disjoint paths are finally established by outputting the optimal antibodies to improve the performance of fault tolerance and transmission stability.
3.4.4. Algorithm Steps
Step 1.
Initialization of the parameters.
Step 2.
Calculate the cluster heads' CM and gradient values by (4), to determine the CM based contour lines among the cluster heads. When firstly calculating the nodes' CM, set the parameters
Step 3.
To code the cluster heads according to the coding rules.
Step 4 (to generate the initial antibody and establish multiple transmission path).
Source node firstly selects the cluster head along the gradient direction within its power coverage as the next hop to establish the first path. Source node then selects the cluster head along the gradient direction within its power coverage with the second minimum distance but does not belong to the established paths as the next hop to establish the second path. Therefore, multiple disjoint paths to the destination node are established and each path is an antibody.
Step 5 (to calculate the fitness).
Fitness of the clusters is calculated by (5).
Step 6 (to generate the memory population).
According to the established transmission paths
Step 7 (antibodies mutation).
Excellent antibodies in the memory are mutated according to the variation rules and new antibodies are generated. Then, new antibody population is constituted with the original antibodies and mutated antibodies. Then, it calculates
Step 8 (terminate the iteration and output the optimal solution).
The Optimal K antibodies with minimum
Step 9.
Source node sends the confirmation packets to the destination node along all the established paths and receives the replies from the destination node to confirm the establishment of optimal transmission paths.
4. Theoretical Analysis and Simulation Test
4.1. Performance Analysis
4.1.1. Clustering Compactness
Compactness and alienation are adopted to evaluate the clustering performance of the network. Compactness reflects the minimal sum of the distance between cluster head and member nodes. Alienation reflects the distance from one cluster to another. Compactness of a cluster is calculated by
Lemma 3.
Mechanism of immune system based clustering in wireless sensor networks has better clustering effect, namely,
Proof.
Because
4.1.2. Performance of Convergence
(1) Convergence of Clustering Algorithm. It has been proved that the immune algorithm has good performance of convergence. Mechanism of immune system based clustering in wireless sensor networks needs good convergence. Good convergence reflects good calculation performance of algorithm and is of great significance to energy restrained wireless sensor networks. The convergence of immune system based clustering can be calculated by Lemma 4.
Lemma 4.
Proof.
In Lemma 4, R is the operation rounds of the network. It has
(2) Convergence of Multipath Establishment. Multiple optimal transmission paths are established based on clustering topology by the mechanism of immune system. Convergence of multiple paths establishment is to apply immune system's characteristics such as learning, memory, and variation to establish the initial multipaths as the antibodies. After the antibodies' variation, the excellent antibodies which are greater than a certain threshold are saved into the memory as the population waiting to mutate next time. Finally, multiple paths are established.
Firstly, initially n disjoint transmission paths
Therefore, at the kth round iteration of immune mechanism based multipath algorithm, it has the following according to the sequence of paths' quality:
For N antibodies selected into the memory,
Among multiple paths at the kth round operation, it has
Among the established multiple paths at
It has
4.1.3. Performance of Energy Consumption
Energy consumption of the algorithm mainly reflects in two aspects: immune mechanism based network clustering and multipath establishment.
(1) Energy Consumption of Network Clustering. Energy consumption model of data transmission is defined as
For the ordinary node i sending k bits packets, the residual energy is as follows:
Because
From (12) and (14), the residual energy of member nodes in one cluster is directly related to the distance between itself and the cluster head. It also has close relationship with affinity function value from (14). The greater the distance is, the less the affinity function value is, the smaller the residual energy is.
For the cluster head in the jth cluster, giving the consideration on receiving the packets from member node and transmitting packets to neighbor cluster heads, the residual energy is
Owing to
From (16), residual energy of the jth cluster after one round packets transmission is related to the transmission distance
The residual energy of the whole network after one round packets transmission is
From (17), the residual energy of all nodes in the network after one round packets transmission is related to two factors: cluster head's transmission distance
Mechanism of immune system based network clustering has achieved the optimal clustering pattern, namely,
(2) Energy Consumption on Multipath Establishment. Multipath establishment is firstly sponsored by the source node and the next gradient node is selected as the next hop to establish the connection. Now, if the energy consumption of sending the confirmation packet after receiving a packet is ignored, the energy consumption of establishing a path is as follows:
4.1.4. Performance Analysis of Fault Tolerance
Fault tolerance reflects that the source node can find the right paths to transmit the packets to the destination node successfully when the fault of nodes or links occurs. So, packet is avoided lost at the destination node whether the nodes' fault exists in the network. Multipath routing is an effective method to solve this issue. Packets are transmitted in the form of coded or split fragments along multiple paths, and the received fragments at the destination node will be decoded or reconstructed into the source packet to avoid its loss. The multipath fault-tolerant model is as follows.
(1) DM (Disjoint Mode) Based Multipath Transmission Fault Tolerance. DM means that multiple disjoint paths are established between the source node and the destination node. However, the new mutated antibodies may have the same node with the original antibody. Variation rules are set as follows: the gradient coding does not need to be mutated on each gradient, only the node coding needs to be mutated but not equal to itself. So, the mutated antibodies are disjointed as shown in Figure 2.

DM based multipath transmission.
Among the established paths
Fault tolerance embodies that any path with fault will not affect the other path during the data transmission. A certain number of packets received at the destination node will be reconstructed into the source packets.
(2) BM (Braided Mode) Based Multipath Transmission Fault Tolerance. For each node's variation in the antibody population between the source node and the destination node, elusion rules on nodes' code variation are set as follows: the gradient coding does not needed to be mutated on each gradient, only the node coding needs to be mutated. It exists the case that mutated node maybe itself. Therefore, BM based multipath transmission mode is established, as shown in Figure 3.

BM based multipath transmission.
Among the established transmission paths
There are also three established main paths from the source node to the destination node. However, the first path has the common node with the second. The second path also has the common node with the third. Fault tolerance embodies that if one node is faulted, it affects at most two paths' packet transmission. A certain number of packets received at the destination node will be reconstructed into source packets and it realizes the source packet successful transmission. Comparing with BM, it has been proved with better performance of fault tolerance.
(3) Primary-Backup Path Transmission Mode. The limited primary disjoint transmission paths (

Primary-backup based multipath transmission.
Between two established transmission paths
4.2. Simulation Analysis
Assumptions: (1) network node is static and each node’ location is known; (2) the initial state of the nodes is equal, each has the same parameters and initial energy; (3) the network node in full duplex work mode; and (4) the nodes are randomly uniformly distributed in the rectangular area.
Communication model is based on the clustering topology. Parameters are set as follows: probability
4.2.1. Performance and Compactness of Immune Clustering
(1) Clustering Performance. Simulation is based on clustering topology of the network according to the immune mechanism. Figure 5 shows that 150 nodes are randomly deployed in the area [200, 200]. The destination node is located in the right side of the area. Figure 6 shows the initial randomly selected cluster heads which are not based on the immune mechanism. It adopts K-means algorithm to establish the clustering topology by the distance factor. Figure 7 shows the clustering topology based on the immune mechanism by repeated antibody variations. From the comparison analysis of Figures 6 and 7, clustering based on immune mechanism in Figure 7 is more uniform and optimal.

Randomly deployed network nodes.

Initial clustering not based on immune mechanism.

Immune mechanism based optimization clustering.
(2) Clustering Compactness. The compactness value is calculated by

Performance of clustering compactness.
Figure 8 shows the variation tendency of clustering compactness of immune mechanism based network. The compactness values at each iteration round of antibody variation are calculated by
4.2.2. Multipath Routing
Before establishing multipath routing, gradient values of cluster heads should be calculated according to their CM. Cluster heads with the same gradient values will be connected together, as shown in Figure 9. The network is divided into seven gradient areas.

Gradient contour lines based on clustering topology.
Figure 10 shows that three paths are established based on the gradient clustering topology. From Figure 10, the established three paths from the source node to the destination node are disjoint and along the gradient direction. The fault tolerance of multipath transmission routing reflects that the existing fault node or link quality cannot affect the stability and accuracy of the packets transmission from the source node to the destination node. A certain number of packets received at the destination node will reconstruct into the source packets to improve the receiving accuracy rate.

Gradient based multipath routing.
4.2.3. Performance of Fault Tolerance
Packets receiving rate and accuracy rate are adopted to evaluate the performance of data transmission. They can reflect the link quality and performance of fault tolerance. Packet receiving rate is defined as the ratio of received packets at the destination and source packets sent at the source node. The higher the packet receiving rate is, the lower the packet loses during the transmission and the better the quality of links is. Now, the comparison is made among the following three methods: (1) immune mechanism based multipath routing algorithm presented in this paper (ISM-MR); (2) network coding based reliable disjoint and braided multipath routing (NC-MR) [14]; and (3) an energy-aware multipath routing algorithm (EA-MR) [17]. Simulation of packet receiving rate is shown in Figure 11.

Comparison of packet receiving rate.
Figure 11 shows the comparison of packet receiving rate. Now, it gives the ratio of the received packets and all source packets when network runs at 1000–2000 times. Method 1 presented in this paper keeps a higher data receiving rate in [0.97, 1] than methods 2 and 3. Furthermore, it is relatively stable. The packet receiving rate of methods 2 and 3 varies in [0.93, 0.98], the packet receiving rates are relatively low and decline dramatically in the later operation stage.
Data accuracy is defined as the ratio of the received packet that can be reconstructed into source data and the source packets. It reflects the accuracy of data decoding or reconstruction, as shown in Figure 12.

Comparison of packet accuracy rate.
Figure 12 shows the comparison of the packet accuracy rate among these three methods. It shows that the data accuracy rate is higher than the data receiving rate at the same network operation times, because the data decoding transmission mechanism allows certain coded packets loss and does not affect the reconstruction into the source packet. This means that it still has higher data accuracy rate even if some coded packets are lost. The accuracy rate of method 1 presented in this paper varies steadily, it stays higher than methods 2 and 3, it is within [0.98, 1] when the network runs at 1000–2000 times.
4.2.4. Performance of Energy Consumption
The residual energy of all nodes in the network is calculated at different operation rounds. Now, the comparison is done among these three methods. Simulation on the performance of energy consumption is as shown in Figure 13.

Efficiency of energy consumption.
Figure 13 shows the comparison of average residual energy of all the nodes, including the cluster heads and members among these three methods when network runs at 1000–2000 times. From Figure 13, the average residual energy of the nodes among three methods appears not to be much different. At any operation rounds when network runs, Method 1 presented in this paper has more residual energy than any other method.
5. Conclusion
Transmission reliability and stability are important indexes to evaluate the performance of wireless sensor networks. However, node failure or link quality can affect it. So, the network protocol is needed to be with fault tolerance. Immune system has the information processing mechanism such as memory-learning, feedback regulation, and no center distributed autonomy. It provides a novel method to the issues of fault tolerance in wireless sensor networks. Immune mechanism based multipath fault-tolerant routing algorithm presented in this paper mainly includes two parts: immune mechanism based clustering and multipath gradient routing establishment. It gives the definition of related issues of immune evolutionary mechanism in the scenario of wireless sensor networks. System model is established to do the theoretical analysis and simulation test on the network performance. The result confirms the validity of immune mechanism based clustering and multipath gradient routing. Through analysis on the packet receiving rate, data accuracy rate, and efficiency of energy consumption, this algorithm has good performance of fault tolerance.
Footnotes
Conflict of Interests
The authors state that they ensure the scientificalness and independence of the study in the forms of paper which has no conflict of interests with other teams or schemes. They have no conflict of interests among them. Activities related to the paper including reviewing and evaluating will not be affected by factors such as interpersonal relationships, economic interests, and professional preferences. The paper can be open to the public.
Acknowledgments
This work was supported by the National Science and Technology Major Projects of China (no. 2009ZX07528-003-09) and (2011BAJ03B13), the Specialized Research Fund for the Doctoral Program of Higher Education of China (no. 20100191110037), the Chongqing Key Project of Science and Technology of China (no. CSCT2010AA2036), the Chongqing Key Project of Science and Technology of China (no. cstc2012gg-yyjs40008), the Science and Technology Project of Chongqing City Board of Education Committee (KJ131117), Wanzhou Science and Technology Projects of China (no. 201203037) and ([2010]23), Youth Project of Chongqing Three Gorges University of China (no. 12QN14) and Science and Technology Projects of Chongqing Three Gorges University ([2011]52).
