Static Three-Dimensional Fuzzy Routing Based on the Receiving Probability in Wireless Sensor Networks

A Wireless Sensor Network (WSN) is a collection of low-cost, low-power and large-scale wireless sensor nodes. Routing protocols are an important topic in WSN. Every sensor node should use a proper mechanism to transmit the generated packets to its destination, usually a base station. In previous works, routing protocols use the global information of the network that causes the redundant packets to be increased. Moreover, it leads to an increase in the network traffic, to a decrease in the delivery ratio of data packets, and to a reduction in network life. In this paper, we propose a new inferential routing protocol called SFRRP (Static Three-Dimensional Fuzzy Routing based on the Receiving Probability). The proposed protocol solves the above mentioned problems considerably. The data packets are transmitted by hop-to-hop delivery to the base station. It uses a fuzzy procedure to transmit the sensed data or the buffered data packets to one of the neighbors called selected node. In the proposed fuzzy system, the distance and number of neighbors are input variables, while the receiving probability is the output variable. SFRRP just uses the local neighborhood information to forward the packets and is not needed by any redundant packet for route discovery. The proposed protocol has some advantages such as a high delivery ratio, less delay time, high network life, and less network traffic. The performance of the proposed protocol surpasses the performance of the Flooding routing protocol in terms of delivery ratio, delay time and network lifetime. OPEN ACCESS Computers 2013, 2 153


Introduction
Wireless Sensor Networks (WSN) have been considered during the last decades, as a result of wireless communication that has been in use since 1990 [1,2].WSN have been developed for different applications, such as environmental monitoring, military projects, automobile tracking, human monitoring or medical management [3][4][5][6].A WSN is a wireless network formed by a large number of sensors, including thermal, pressure or accelerator sensors, to name a few.These sensors can sense and detect the environmental statistics, including temperature, pressure, movement, etc. [7].Within the network, the sensors are referred to as nodes.Low cost, large-scale, and low power sensors are some of the main reasons to deploy wireless communication technology to sensor networks.Assuming that a node does not have any information about neighboring nodes and the overall topology of the network before its deployment, the node therefore needs to go through an initial self-organization phase.This self-organization causes nodes to be aware of the neighbors and other criteria of the network, which will subsequently be used in the routing procedure.There are three kinds of routing protocols: datacentric, hierarchical, and location based routing protocols [8].In data-centric routing, the data that is generated by one node is stored in another node determined by the name of the data.
One of the primary requirements in sensor networks is the design and development of an energy efficient routing protocol.Minimizing power consumption is another important attribute of routing algorithms in WSN.Nevertheless, network lifetime is the most useful attribute of a routing method's performance.Some routing algorithms, including the Dynamic Source Routing (DSR) [9] and the Hierarchical routing [10], have been proposed for wireless networks.While these algorithms can be applied in traditional wireless networks, they cannot be used in sensor networks: disagreements between both types of networks are the principal reason for this incompatibility [11,12].Further differences are the size of the networks, the node capacity, and the communication patterns.
Most of the previous routing protocols use the global information of a network to route data packets from sensor nodes to the base station, hence generating much more extra packets.The traffic load and the total energy consumption of these networks are high.This leads to a reduction of the network life, incomplete transmissions of data packets to the base station, and delays in forwarding data packets to the base station.
We here propose an inferential routing protocol called Static Three-Dimensional Fuzzy Routing based on the Receiving Probability (SFRRP), which uses the local neighborhood information of the network and a fuzzy procedure to take the best decision to forward packets towards the base station.Every node that has a sensed data or a gathered data packet that should be transmitted to the base station selects one of its neighbors as selected node by the proposed fuzzy system to forward the data packet to the base station.Selecting an appropriate neighbor node by a fuzzy procedure is done by considering two parameters, namely distance and number of neighbors.In fact, the proposed protocol applies an inferential manner based on the human reasoning to select a proper path from every node to the base station without participating much more intermediate nodes in the transmission path.These features lead the network life to be enhanced considerably, the number of data packets delivered to the base station to be increased, and more data packets being transmitted to the base station in an acceptable time.
The remainder of this paper is organized as follows: Section 2 presents previous, related works about routing protocols.A brief review on the fuzzy logic applications are given in Section 3. Section 4 introduces the features of the proposed routing protocol as well as the network model, the packet format used in the protocol, and the proposed fuzzy system to select the appropriate transmission path.In Section 5, the simulation model to evaluate the performance of the proposed routing protocol is described.The paper concludes in Section 6.

Related Works
The Flooding Protocol is a routing algorithm to distribute information of the nodes to every node in the neighborhood [13].Each node is aware of the identities of its neighbors.Naive Flooding is a Flooding algorithm wherein each node first receives a packet, then transmits it to the neighbors.In Controlled Flooding, certain nodes are designed as transmitter nodes, which are strategically placed on the lattice.These nodes, upon receiving a packet, transmit it to the neighbors.Random Walk is a Flooding algorithm in which each node, upon first receiving a packet from a neighbor, transmits it to the neighbors, and designates one in three neighbors as the next transmitter.In Random Flooding, each node, upon receiving a packet, transmits it with probability p (0, 1).All subsequent receptions of the same packets are ignored by the node.
A family of adaptive protocols is proposed by Heinzelman et al. [14,15] and is called Sensor Protocols for Information via Negotiation (SPIN).It broadcasts the information of the nodes to every node in the network.In this protocol, every node is a potential base station within the network.This property causes the users to request from the nodes and fetch the needed information.
Intanagonwiwat et al. proposed a popular data aggregation sample for WSN, which is called directed diffusion [16].Directed diffusion is presented according to the Data Centric (DC) paradigm.In DC, data coming from different sources are combined by eliminating redundancy and minimizing the number of transmissions.The events are measured by sensors in directed diffusion.
Another routing protocol is energy aware routing [17], which aims at increasing the network lifetime.This protocol is similar to directed diffusion, but it differs in the sensing operation: it memorizes a set of paths instead of memorizing and performing one optimal path.
Low Energy Adaptive Clustering Hierarchy (LEACH) [18] is a hierarchical clustering algorithm, meaning that it is a cluster based protocol, and has distributed cluster information.A few nodes are selected as cluster head (CH) nodes and compress data arriving from nodes that are in the respective cluster.
The Threshold-Sensor Energy Efficient Sensor Network (TEEN) and Adaptive Periodic Threshold-Sensor Energy Efficient Sensor Network (APTEEN) are both proposed for time critical applications [19,20].In the TEEN protocol, network nodes sense the environmental data continuously, but transmission of the sensed data is done in discrete times.In fact, when there is a small change in the sensed value, the node switches on its transmitter for transmitting the sensed parameter.Thus, threshold value tries to reduce the number of data transmission by sending data in a defined range.On the other hand, APTEEN is a protocol that uses periodicity, meaning threshold values for the TEEN protocol change scarcely.

Fuzzy Logic Applications
Fuzzy logic and fuzzy sets are powerful mathematical tools [33][34][35].They are used for modeling and controlling uncertain systems in industry, humanity and nature.They are the assistants for approximate reasoning in decision making in the absence of complete and precise information.A classic set is defined in such a way that all the members in a certain universe can be partitioned into two classes: those who belong to the set, and those who do not belong to the set.In addition, classic sets are called crisp sets to distinguish them from fuzzy sets.When a set A is assumed to be a crisp set defined over the universe U, it is defined as a subset of the universe U.In fuzzy logic, this feature is generalized.Thus, it is not required that x is either a full member or a non-member of the set, because x can be defined as a partial member of the set.In this logic, the characteristic function can be set to a value between zero and one.As an example, Figure 1 shows the fuzzy value for a room temperature  A Fuzzy Logic System (FLS) is a system that is defined as the nonlinear mapping of an input data set to a scalar output data.A FLS involves four main sections: fuzzification, rules, inference engine, and defuzzification.The general architecture and major components of a FLS are shown in Figure 2.
The procedures of the fuzzy logic are described in Algorithm 1: first, a crisp set of input data is received and then is converted to a fuzzy set using fuzzy linguistic variables, fuzzy linguistic terms, and membership functions.This phase is called fuzzification.Thereafter, an inference is made using a set of rules.Finally, the resulted fuzzy output is mapped to a crisp output by the membership functions.This phase is called defuzzification.The linguistic variables are the input or output variables of the fuzzy system.These variables are words or sentences of a natural language, instead of numerical values.The membership functions are used to quantify the linguistic terms.The common types of the membership functions are triangular, trapezoidal, and Gaussian shapes.A rule base is constructed to control the output variables in the FLS.A simple IF-THEN statement with a condition and a conclusion constructs a fuzzy rule.As an example, sample fuzzy rules for an air conditioning system are listed in Table 1.In this system, the fuzzy engine compares the room temperature and the target temperature periodically, and produces a command to heat or cool the room.Table 1.Sample fuzzy rules for air conditioner system.

Fuzzy Rules
1. IF (temperature is cold OR cool) AND (target is warm) THEN command is heat 2. IF (temperature is warm OR hot) AND (target is warm) THEN command is cool 3. IF (temperature is warm) AND (target is warm) THEN command is no-change

The Proposed Routing Protocol
The current routing protocols are not smart; they find the transmission paths according to the routing table or routing discovery using the global information of the network.In the routing table, network nodes have to maintain the discovered paths.Moreover, the paths have to be recovered and updated as some of the paths can be broken.Thereupon, route discovery causes increasing network traffic, while decreasing the network lifetime.To solve these potential problems, we propose a new routing protocol called the Static Three-Dimensional Fuzzy Routing Based on the Receiving Probability (SFRRP) in wireless sensor networks.The proposed protocol is an inferential routing protocol that uses a fuzzy procedure to find an appropriate path for transmitting the data packets from the sender nodes toward the base station.When a sensor node has a sensed data or a buffered data packet that should be transmitted to the base station, it chooses one of its neighbors called the selected node by the proposed fuzzy system for forwarding the packet through that node.To choose the appropriate node from its neighbors, the sender node needs only the local information on its neighbors instead of the global information of the network.Therefore, SFRRP does not generate any controlling packet for route discovery.In this way, the traffic load of the network is reduced, the energy consumption of the nodes decreased, the network life and data delivery ratio considerably enhanced, and the data packets delivered to the base station in an acceptable time.Note that the proposed routing protocol can be operated in the variant states of the WSN.Furthermore, it is not needed to maintain the paths and does not involve unnecessary intermediate nodes.

The Network Model
We consider a sensor network that consists of a base station and some sensor nodes that are energyconstrained immobile nodes and are deployed randomly in a complex region.It is considered that sensor nodes are not grouped into clusters or trees.Furthermore, most nodes cannot send the packet to base station directly, e.g., there exist obstacles or weak signals of sensor nodes.In this region, the sensors communicate with each other by short-haul radio communication, and most of the nodes cannot transmit their data packets to the base station directly.Thus, they are required to transmit the packets using hop-to-hop delivery.Moreover, each node knows its own location by the Global Positioning System (GPS) technology [42].Sensor nodes are known as three-dimensional positions to determine their neighbors correctly.Furthermore, all sensor nodes know the position of the immobile base station.After deploying the sensor nodes in a certain network, they will detect their neighbors by broadcasting a Neighbors Discovery (ND) message.Each node that received this message, responds to it by sending a Neighbors Acceptance (NA) message.When the sensor node receives the NA message, it searches the sender node in its neighbors list; if it does not exist, its sender ID is appended to the neighbors list.The sensor nodes perform two main functions: sensing and relaying.The sensing element probes its environment to track an event.Then, the sensed data are relayed to the base station trough selected nodes.It is necessary to express that data is generated by the Poisson distribution [36].The process of data generation is done in rounds, which are determined by this distribution.Note that the packets have no defined finite life time.In fact, time-to-live of packets are considered infinite until they are delivered to the base station.The network model for transmitting the data packets by the proposed protocol is shown in Figure 3.It consists of some sensor nodes deployed throughout the network and a base station located within the radio range of a small number of nodes.Furthermore, any node that has a new sensed data to transmit to the base station is called sender node.We apply the method Presented in [31,32] to estimate the communication energy consumption of the sensor nodes.In this model, the main energy parameters for communication are the energy/bit consumed by the transmitter electronics (α 1 ), dissipated energy in the transmit OPAMP (α 2 ), and energy/bit consumed by the receiver electronics (α 3 ).We assume a 1/d' n path loss, and the energy consumed is: Where, E t is the required energy for sending r b bits, and E r is the desired energy consumed for receiving r b bits; α 1 is the dissipated energy in the transmitter electronics (taken to be 50 nJ/b).In addition, α 3 is the dissipated energy in the receiver electronics; α 2 is the dissipated energy in the transmitter amplifier (taken as equal to 100 PJ/(b.m -2 )); r b is the number of bits in the transmitted packet; and d' n is the distance that should be traversed by packet.

Data Packet Format
In the proposed system, every data packet consists of seven main elements.The packet format and its elements are represented in Table 2. Every generated data packet involves the represented elements.
Every element explains one of the data packet features.Furthermore, the buffer structure of the sensor nodes consists of similar elements to facilitate transmitting the information of packets in the routing procedure.The buffer structure of the base station is also the same as the packet format of sensor nodes, because details of the transmitted data packets should be informed by the base station.It is assumed that in the packet format, the initiator ID indicates the sender node ID.The initiator sequence number represents the number of generated packets by that node.The partial route involves the node ID of the intermediate nodes that the data packet is transferred through them to the base station.The start round represents the time of network that the data is transmitted by the sender node, and the finish round indicates the time of network that the data packet is delivered to the base station.Moreover, the delay time represents the total time required to transmit the packet from the sender node to the base station.
When new data is sensed by a sensor node, a data packet is generated by that node based on the elements of the packet format.The sender node sets its node ID in the initiator ID part of the packet.Furthermore, it puts the incremented sequence number of all sensed data into the initiator sequence number of the data packet.This is done to inform the number of sensed data at sender node to the base station for future decisions.The data element of the packet is also valued by sensed data of the sender node.Moreover, the sender node sets the start round by local time of the network.Each node that receives a data packet, first appends its node ID to the partial route, then forwards that packet to the selected node from among its neighbors.In fact, the data packet is transmitted between the intermediate nodes in the transmission path until it is delivered to the base station.The delay time is finally calculated by the base station when the data packet is delivered.

The Proposed Fuzzy System
As mentioned in the prior subsections, the proposed protocol chooses one of its neighbors as selected node by the proposed fuzzy system to transmit the sensed data or the buffered data packet to the base station.The proposed fuzzy system consists of two input variables, distance and number of neighbors, and one output variable, receiving probability.The distance variable represents the threedimensional distance between each neighbor node and a point called nearest point.The nearest point is located on the radio range of the sender node which is closest to base station.Number of neighbors is the number of neighbors at each neighbor of the sender node.The receiving probability of each neighbor node is calculated by the proposed fuzzy system based on their input variables.
The set of linguistic variables for distance is D(t) ={very-near, near, medium, away, far-away} where t is the Node ID of the neighbor.Membership functions of input distance are determined by triangular membership functions [37].The graphical representation of the memberships for this input variable is shown in Figure 4.The set of linguistic variables for number of neighbors is N(t) ={feeble, few, medium, many, lots}.Membership functions of input number of neighbors are also specified by triangular membership functions, which are depicted in Figure 5.The set of linguistic variables for receiving probability is R(t) ={very-low, low, medium, high, very-high}.Membership functions of the output are defined by bell shaped membership functions [37].The graph of membership functions used in the output variable is shown in Figure 6.The rule base is created to control the output variables.Any rule base is composed of some fuzzy rules that are determined based on human reasoning.The fuzzy rules used in the proposed fuzzy system are determined based on experiences on a network.As it was mentioned previously, these rules are the simple IF-THEN rules of antecedent and consequent, which are represented in Table 3.Because both of the input variables are formed of five linguistic terms, the number of fuzzy rules is 5 2 = 25.Total rule is constructed by aggregation of these rules to determine the output variable by fuzzy inference system.Because the output variable resulted by a fuzzy system is a fuzzy set, it should be converted to a crisp value by a defuzzification method.The fuzzy set of receiving probability in the proposed fuzzy system is converted to the crisp value by means of center-of-gravity method [40] as follows: Where x i specifies element of output universal set, µ A (x i ) represents the membership degree of element x i , and n specifies the number of elements in the universal set.Table 3 represents the rule base used in SFRRP.Furthermore, Figure 7 illustrates the 3D combinational view of the determined rule base.if the base station is located in the node range, it directly sends the packet to the base station; otherwise it chooses one of its own neighbors as the selected node to forward the packet on its path to the base station.The sender node first updates its neighbors' information by broadcasting the ND message and receiving the NA messages from its neighbors.Moreover, every neighbor node sends its node ID, number of neighbors, and three-dimensional position to the sender node by the NA message.Then, the sender node feeds the gathered information of the neighbors into the inputs of the proposed fuzzy system to determine the receiving probability at each neighbor node.
The fuzzy sets of the input variables are determined by the related membership functions, before the fuzzy output set is extracted from the fuzzy system using fuzzy decision making.This decision making uses the fuzzy input variables, fuzzy rules, and the interference engine.Finally, the receiving probability at each neighbor is inferred by the proposed fuzzy system and is converted to a crisp value by the center-of-gravity method.The neighbor node with the maximum receiving probability is chosen as the selected node to forward the packet toward the base station.The selected node becomes one of the intermediate nodes in the transmission path.When a selected node gets a data packet, it becomes the sender node of the next step in the transmission path.
A schematic of SFRRP functionality to choice the appropriate selected node in a step of transmission procedure is shown in Figure 8.The distance between each neighbor node and the nearest point should be calculated before entering in the fuzzy system.For this purpose, first the straight-line distance between sender node and the base station is calculated by Equation (3) as follows: Then three-dimensional coordinates of the nearest point is calculated by Equation ( 4) based on the position of the sender node, radio range and distance between sender node and base station as: Finally, the distance between each neighbor node and the nearest point is determined by using the three-dimensional coordinates of each neighbor and the nearest point as follows: (P Neighbor ) (P Neighbor ) (P Neighbor ) Note that (BS x , BS y , BS z ) specifies the position of the base station, (Node x , Node y , Node z ) describes the position of the sender node, magV represents the straight-line distance between the sender node and the base station, R is the radio range of the sender node, (P x , P y , P z ) specifies the position of the nearest point, and (Neighbor x , Neighbor y , Neighbor z ) determines the position of each neighbor node.The primary design criterion of the routing protocols for WSN is usually the lifetime of the sensor nodes, which prolongs the lifetime of network.Total energy consumption of nodes, network traffic and delay time of the transmitted packet are some of the other important criterions for the performance evaluation of the routing protocols for WSN.In the proposed protocol, we have used SFRRP that applies a hop-to-hop delivery instead of the broadcasting method to decrease the network traffic and consumption of energy.SFRRP is an inferential smart algorithm that chooses the selected node from among the list of neighbors to transmit the data packet to the base station via that node.In this protocol, there is no need to maintain discovered paths.This feature causes the sensor nodes to need short buffer sizes.Moreover, SFRRP employs fewer intermediate nodes to transmit the data packets to the base station.Furthermore, the network traffic decreases and the network lifetime increases.Less network traffic causes a decrease in the delay time of the transmitted data to the base station.The work flow of SFRRP is shown in Figure 9.Note that the reconfiguring operation, applying a signal carrier, the real-time state of the network, and determination of the active or passive modes are considered based on the method presented in [41].
Fuzzy decision making is only one of several useful decision making procedures which are based on mathematical proofs and presented in the literature [33][34][35].However, the functional efficiency of the proposed protocol is also related to some parameters such as the number of nodes, initial energy of nodes, node buffer size and deploying method of the nodes in the whole network.Therefore, the efficiency of the proposed protocol is compared to another routing protocol with the same parameters in order to not exaggerate the functionality of the proposed approach.

Simulation Model
In this section, we simulate the Flooding and SFRRP routing protocols in MATLAB 7.10, to compare these protocols from the following points of view: data delivery ratio, data delivery delay, network life, total energy consumption of the nodes, number of live nodes, and percentage of filled node buffer.As there are variant factors [41] to evaluate the functionality of the connected wireless systems, we only used the above mentioned points to represent the performance of the SFRRP protocol compared to Flooding routing.Furthermore, we analyze the impacts of the experimental parameters on the mentioned protocols.The produced packets are transmitted by hop-to-hop delivery, because the base station is not in the range of nodes.We consider a region of 300 m × 300 m × 300 m, in which the sensor nodes are deployed in a static manner.The proposed network is considered as three-dimensional, because SFRRP uses threedimensional distance between nodes.All sensor nodes are static immobile and have the same initial energy of 5 Joule.The sensor nodes update their neighborhood information by broadcasting the ND message and receiving the NA messages from the neighbors, as described in Section 4.1.There is one base station in the network to which all the nodes have to send their data packets to.The transmission range of the sensor nodes is 75 m.The buffer size of each node is 60 packets.This network is simulated for 4,000 rounds.The simulation parameters and their default values are represented in Table 4.It is essential to notice that we have used from cycle in some results; the reason is that showing the results of all rounds is not clear.Thus, we have applied the results of some rounds that are candidate rounds.These rounds are called the cycle.Further, it is essential to notice that searching a special path in the discovered paths in the Flooding routing, and fuzzy decision making in the proposed protocol, are both done by consuming a bit of energy at the sender note, called the processing energy.In the simulations, we have neglected the processing energy for both of the simulated protocols.

Number of sensor nodes 50
Transmission range of sensor nodes (m) 75 Initial nodes energy (Joule) 5 Maximum buffer size of sensor nodes (packet) 60 Position of base station (m) (150 , 150 , 0)

Impact of Data Generation Rate
In this section, we illustrate the impact of the data generation rate to evaluate the performance of the two protocols under different transmission loads.As the data generation rate differs from 100 to 1,000 Round/Packet, the performance of the mentioned protocols will be shown as in Figure 10.
From Figure 10(a) we can see that SFRRP protocol achieves better performances than the Flooding protocol.The performance of SFRRP is high and efficient at each generation rate.However, as the data generation rate decreases, the performance of the Flooding partly increases.Flooding uses the broadcast method to transmit packets to the base station.Thus, the generated packets are transmitted with more delay, are more copies of the packets are transmitted over the network.This causes additional network traffic and delay time for the delivery of the packets.However, SFRRP uses fuzzy logic to select the best node to forward the packet towards the base station and a smaller number of nodes are involved in the routing process.Moreover, it will not produce any copy of the packet, and only one packet is sent to the selected node, which reduces network traffic and the delay time of transmitted packets.As shown in Figure 10(b), the average delivery of SFRRP is the same, partly because network traffic is low and all generated packets are transmitted to the base station quickly.Nevertheless, the average delivery of the Flooding goes up when the generation rate increases, because network traffic is high and several packets are.Therefore, the generated packets are transmitted to the base station too late.From Figure 10(c), we can demonstrate that the network life of the proposed protocol is higher than with Flooding.The reason is that the redundant packets in the Flooding routing are too many.Thus, the consumption energy of the sensor nodes will be high, which leads to low network life.

Impact of Buffer Size
To evaluate the impact of buffer size on the protocols' performances, the buffer size varies from 200 to 1,000 packets.The performance of the two protocols with various buffer sizes is shown in Figure 11.In this section, we investigate the effects of buffer size on the average delivery ratio, mean delay, and network life.From Figure 11(a), we find that the data delivery ratio of the SFRRP is higher than for the Flooding method for all of the tested buffer sizes.Furthermore, the data delivery ratio of both protocols goes up considerably when the buffer size of the nodes increases.The reason is that much more buffer space leads to more data packets to be transmitted to the base station.Indeed, Flooding is more sensitive to the buffer size compared to the SFRRP routing protocol.In Figure 11(b), it can be seen that the average delivery delay of the SFRRP protocol is less than that of Flooding routing.In the Flooding protocol, a larger node buffer size leads to more packet exchange between nodes.Furthermore, it causes the probability of network congestion to increase.Nevertheless, SFRRP needs less buffer size, and all generated packets are transmitted to the base station.Thus, average delivery delays of packets are identical.Figure 11(c

Impact of Node Initial Energy
The delivery ratio, delivery delay, and network life are greatly related to the initial energy.The following experiment in Figure 12 represent the network performance of the two protocols with different initial energies.As shown in Figure 12(a), the proposed protocol almost achieves the upper bound for delivery ratio compared to the Flooding routing.However, both of the protocols actually depend on the initial energy of the nodes to transmit more data packets to the base station.In Figure 12(b), we can find that the delivery time of packets in SFRRP is less than that of Flooding routing.The reason is that the traffic load of the network in the Flooding routing is more than that of the SFRRP protocol.The delay times of the transmitted packets goes up for both protocols when increasing the initial energy of nodes, because many more packets are transmitted to the base station with the increasing initial energy of the nodes.However, the changes of delay times in the Flooding routing are very high compared to the proposed SFRRP protocol.Figure 12(c

Buffer Size
Flooding SFRRP is higher than the Flooding routing protocol.However, the difference on their performance is very noticeable when initial energy of sensor nodes is low.

Total Energy Consumption of Nodes
Network life is one of the main factors to evaluate the network performance.Network life time is directly related to the energy consumption of the nodes.Thus, the presented protocol should decrease the energy consumption of the sensor nodes.As shown in Figure 13, the energy consumption of the nodes in the SFRRP protocol is mostly less than that of the Flooding protocol.The reason is that much more redundant packets are generated in the Flooding protocol, while in the SFRRP protocol, only a single packet is sent to the base station without any copied packets.The simulation results show that the network life in the SFRRP protocol is higher than that of the Flooding protocol.Total energy consumption in the proposed protocol will be zero after a short period, because all generated packets are transmitted to the base station in less time.However, the total energy consumption in Flooding is high most of the time, because much time is needed to transmit all generated packets to the base station.Furthermore, as the remaining energy of the node affects the number of live nodes and network

Number of Live Nodes
When more than half of the sensor nodes are dead, the network simulation is terminated.Thus, the number of live nodes is another important feature in the mentioned network.Figure 15 shows that the number of live nodes in the SFRRP protocol is more compared to that of the Flooding protocol.The reason is a high number of redundant generated packets in the Flooding protocol.This causes a high energy consumption of the network nodes.As shown by simulation results, the number of live nodes is equal in the SFRRP protocol.However, it decreases in the Flooding protocol after the half-life network.Furthermore, all the nodes are live in the proposed protocol, because energy consumption of the nodes is low.It leads to network life being high in this protocol.

Percent of Filled Node Buffer
One factor that causes late arrivals of the generated packets into the network is a high network traffic.The number of filled nodes buffer indicates the status of the network traffic.The number of filled nodes buffer is high when more packets are transmitted.Since the number of transmissible packets in the Flooding protocol is more than in the SFRRP protocol, the percentage of the filled nodes buffer in the Flooding protocol is more than that of the SFRRP protocol.This feature is illustrated in Figure 16.As shown in the simulation results, the percentage of the filled buffer is very low in the SFRRP protocol.However, this feature will gradually increase in the Flooding protocol.The reason is that redundant packets introduced to the network increase slowly.

Conclusions
The latest advances in wireless technology led to emerging Wireless Sensor Networks (WSN), which consist of low cost, large-scale and low power sensor nodes to monitor environmental conditions such as temperature, smoke or pressure.Routing protocols are considered as an important issue in the sensor network.In this paper, we proposed a static three-dimensional routing protocol using fuzzy logic, called SFRRP.It uses a single transmission path by finding an appropriate path using the proposed fuzzy system.The proposed system selects one of the neighbors of the sender node as the next-hop intermediate node, and forwards the data packet to the base station through that node.The number of neighbors, distance, and receive probability are the variables used in the proposed systemto select the appropriate intermediate nodes in the transmission path.This leads to an increase in the delivery ratio of the data packets, the data packets to be delivered to the base station within an appropriate time, and the network lifetime to be enhanced considerably.Simulation results presented the effectiveness and advantages of the proposed protocol compared to the Flooding routing in terms Figure.

Figure 1 .
Figure 1.The fuzzy value for a room temperature.

Figure 3 .
Figure 3.A network model to route the data packets by Static Three-Dimensional Fuzzy Routing Based on the Receiving Probability (SFRRP) in a typical Wireless Sensor Network (WSN).

Figure 4 .
Figure 4. Memberships of the input variable distance.

Figure 5 .
Figure 5. Memberships of the input variable number of neighbors.

Figure 6 .
Figure 6.Memberships of the output variable receiving probability.

Figure 7 . 4 . 4 .
Figure 7. Schematic of the fuzzy rules, (a) rules based on receiving probability and distance; and (b) rules based on receiving probability and number of neighbors.

Figure 8 .
Figure 8. Scheme of the SFRRP functionality to choose the selected node.

Figure 10 .
Figure 10.Impact of data generation rate, (a) average delivery rate; (b) average delay; and (c) network life.
) illustrates that network life based on SFRRP is Delivery Ratio Data Generation Rate (Round/Packet) the network based on the Flooding routing protocol.Note also that Flooding routing needs much more redundant packets to operate, reducing the network life.

Figure 11 .
Figure 11.Impact of buffer size, (a) average delivery rate; (b) average delay; and (c) network life.
) shows that network life in SFRRP

Figure 12 .
Figure 12.Impact of node initial energy, (a) average delivery rate; (b) average delay; and (c) network life.
residual energy of the node in the proposed protocol at simulation termination time is depicted in Figure14.

Figure 13 .
Figure 13.Total energy consumption of the nodes.

Figure 14 .
Figure 14.The residual energy of the nodes in the proposed protocol.

Figure 15 .
Figure 15.Number of live nodes.

Figure 16 .
Figure 16.Percent of filled node buffer.

Table 2 .
Packet format used in the proposed protocol.

Table 3 .
The fuzzy rules used in SFRRP.