Color-Theory-Based Geographical Energy-Efficient Routing Featuring Fuzzy Logical Control for Wireless Sensor Networks

Methods of enhancing the energy efficiency of wireless sensor networks (WNSs) have been studied extensively in an effort to prolong the lifetime of and achieve effective geographic routing in WSNs; these methods involve the use of a sparse number of anchors, and color theory is employed in them to estimate the location of sensor nodes. In this paper, two methods of network-topology coverage are presented. In the first method, the mechanism of relay-node election is modified; this method differs from color-theory-based energy-efficient routing, and the use of the proposed method can reduce the transmission cost of a cluster head and thus create an energy-saving routing. In the second method, the fuzzy logical control (FLC) algorithm is used for selecting the cluster head and achieving an energy-consumption balance among all the nodes of a cluster. The simulation results presented here indicate that the use of the proposed methods not only reduces the energy required for the cluster head to transmit to the base station, but also substantially increases the efficiency of the transmission from the sensor nodes to the cluster heads.


Introduction
Because wireless sensor networks (WSNs) and very large scale integration (VLSI) technologies have developed rapidly, small and low-cost sensor devices (or nodes) are now widely used for monitoring hazardous locations and collecting and reporting data to relevant base stations. As a result of the advances in low-cost wireless communication, numerous applications of WSNs have been developed and these are already used in military applications, habitat monitoring, and object tracking. (1)(2)(3) Currently, a key area of research involves studying the means of transmitting collected data from nodes to the base station. (4) Typically, WSNs consist of hundreds or thousands of sensor nodes that can all communicate with each another or communicate directly with the base station. However, sensor nodes can potentially exhaust their energy, and because the number of nodes used in a network cannot be increased indefinitely, a WSN might become nonfunctional as a result of the failure of nodes. Therefore, energy efficiency is critical for the functioning of WSNs.
Performing routing in WSNs is demanding because, one, the entire network topology cannot be readily covered, and this makes identifying a routing path challenging; and two, the activities of the sensor nodes are limited by the amount of energy used. Thus, to prolong the lifetime of WSNs, the resources available for the nodes, especially energy, must be managed efficiently. One type of algorithm that is widely used for achieving an energy-efficient operation of nodes is cluster routing. (5)(6)(7)(8) In the cluster-routing approach, sensor nodes are divided into a certain number of clusters; in each cluster, one sensor node serves as the cluster head, which collects the sensed data from all other nodes, aggregates the data, and reports the data to the base station. Thus, the number of nodes in the cluster that is used for communicating with the base station is lowered. Although clustering can reduce energy consumption, the primary drawback is that energy consumption is concentrated in the cluster head. To overcome this shortcoming, it is crucial to determine how to efficiently distribute energy consumption in cluster routing. A representative solution for this problem is low-energy adaptive cluster hierarchy (LEACH), in which a probability model is used for distributing the energyconsumption periods. However, because LEACH depends only on a probabilistic model, certain cluster heads might not operate efficiently, and the presence of these inefficient cluster heads inhibits the maximization of energy efficiency. (9)(10)(11)(12) In order to improve the performance of LEACH and power efficient gathering in sensor information system (PEGASIS), an improved energy-efficient chain-based sensor network (IECBSN), (13) was proposed.
Recently, pivotal design requirements have become necessary for the networks to support several applications, such as Internet of Things (IoTs) applications and mobiles. (14) It is important to consider the energy efficiency. An Energy-Efficient Ad Hoc On-demand Distance Vector version 2 (E2AODVv2) (15) was implemented to achieve higher performance in terms of energy consumption and load balancing. An energy-efficient probabilistic routing (EEPR) algorithm (16) was proposed to satisfy the consumption of the residual energy of each node more evenly. Chang et al. (17) introduced a color-theory-based energy-efficient routing (CEER) method designed for clusters, which is based on a range-free color-theory-based dynamic localization algorithm (18) and in which a set of RGB values represents the location of a sensor node. When the RGB values of each sensor node are recognized, the possible position of a node can be determined by referring to the location database in the server. By this method, energy consumption can be lowered. Chen et al. (19) also applied a sparse number of anchors and color theory to estimate the location of sensor nodes. The election of relay node, which differs from the CEER algorithm, is modified. This approach can reduce the cost of cluster head transmission and achieve energy-efficient networks. In this paper, two methods developed for energy-efficient routing are introduced, namely, colortheory-based geographical energy-efficient routing (CGEER) and color-theory-based geographical energy-efficient routing featuring fuzzy logical control (CGEERF), both of which are divided into three phases: clustering phase, relay-election phase, and transmission phase. Some of the factors that might affect WSN lifetime are defined in this paper, and on the basis of these factors, the mechanisms of cluster-head and relaynode election were modified in order to extend network lifetime.
The remainder of the paper is structured as follows. In § 2, we introduce in detail the network used in this study and the wireless model used under the proposed protocol; in § 3, we describe the CGEER and CGEERF methods; in § 4, we present the simulation results; and in § 5, we provide the study conclusions.

LEACH
LEACH is one of the clustering architectures used for achieving energy efficiency in WSNs. In each round of operation, a cluster head is randomly selected from among the nodes. The algorithm operates periodically, and each node has a certain probability of becoming a cluster head in each period, which ensures that each node will become a cluster head at least once within 1/P rounds, where P is the preset cluster-head percentage. It is shown as where K is the total number of nodes deployed in a WSN, P i (t) is the probability that the node i will become a cluster head (based on a certain probability function), k is the cluster quantity, and r is the current round. Each node acts once as a cluster head for an average period of K/k round. C i (t) = 1 indicates that a given node did not previously act as a cluster head, whereas C i (t) = 0 indicates that the node has acted as a cluster head. After all the nodes have acted as a cluster head, the status value will be reset to 1 [i.e., all the nodes are set to C i (t) = 1]. In this manner, energy efficiency can be maximized. However, in LEACH, certain critical points must be considered, such as the density of the sensor nodes and the remaining energy of the sensor nodes, because this approach depends only on the probability model.

CEER
CEER is based on color theory: the location of a sensor node i is represented as three values, (R i , G i , B i ). The location of a sensor node can be tracked using the RGB values that are assigned for each sensor node. The following notations are used in this approach. D avg is the average distance of a hop, which is based on DV-Hop; h ij is the count of the hop between the sensor nodes i and j; and D ib is the distance of the hop between the anchor b and the sensor node i, D ib = D avg × h ib . Each sensor node i maintains a value of (R ib , G ib , B ib ), where b represents the bth anchor.
Here, (H ib , S ib , V ib ) is a set of HSV values of the anchor b, which are converted from (R ib , Here, (R ib , G ib , B ib ) represents the RGB values of the sensor node i that corresponds to an anchor b.
Here, n is the number of anchors; the RGB values of a sensor node i are received by the node from the relevant anchor. The aforementioned procedure is used in CEER in order to track the location of sensor nodes, and each sensor node can determine the remaining energy of every node by comparing the RGB values. Therefore, energy-efficient routing is achieved.

Fuzzy logical control (FLC)
FLC, which was introduced in 1965 by L. Zadeh, (20) is a commonly used method that has been the focus of numerous research fields. In WSNs, FLC has been used in order to enhance performance, reform decision-making, and reduce resource consumption. To increase network scalability, Gupta et al. (9) introduced FLC for the purpose of clusterhead election, and the goal was to reduce the overhead of the cluster-head election; Kim et al. (21) presented a method of distributed cluster-head election that is performed using FLC, named CHEF, which eliminates the overhead of collecting and calculating the fuzzy-related information by the base station. Other related works have exploited cluster-head election, routing, (22) and quality of service (QoS). (23) Chen et al. (24) proposed an FLC-based power-control method combined with window-based transmissionrate management in order to increase the transmission rate in CDMA cellular systems. Furthermore, Chen et al. (25) also introduced an FLC-based method that was designed for obtaining suitable transmission-rate management and power control, and Chen and Lai (26) proposed using FLC to adjust the transmission rate in a wireless multimedia network. Moh'd Alia (27) proposed a decentralized fuzzy clustering protocol (DCFP) to minimize the total network energy dissipation in order to promote maximum network lifetime.
Fuzzified values are processed by using "if-then" statements according to a set of predefined rules derived from the domain knowledge provided by experts. In this stage, the inference of maps inputs fuzzy sets to the output sets. Finally, a defuzzifier computes an exact result from the fuzzy sets and then outputs the basis of the rules. The exact output value represents the control decision that should be considered. These four steps involved are called fuzzification, rule base development, inference engine use, and defuzzification.

Communication energy dissipation model
In WSNs, the strength of the transmission signal is amplified by an amplifier, and the strength of a received signal is primarily affected by the distance. A network model was used in this study as shown in Fig. 1, which follows that used in LEACH.
E Tx is the energy dissipation when the transmitting node must transmit l bits of data, E Rx is the energy dissipation when the nodes must receive l bits of data, and E Tx and E Rx are calculated as follows: where l represents the number of bits to be transmitted in the transmitting node; E elec represents the energy dissipation of each bit; ε FS and ε MP represent the amplifier model at the transmitting end; d represents the distance between the transmitting node and the receiving node; and α represents the radio wave attenuation exponent. In the free-space model, α is 2, and in the multipath-attenuation model, α is 4. The threshold value d 0 can be defined as

Proposed Methods
In this paper, two routing methods are proposed, CGEER and CGEERF, and these are described in detail in § § 3.1 and 3.2, respectively.

CGEER
CGEER is divided into three phases: the setup phase, the routing phase, and the transmission phase. The setup phase is similar to that used in CEER: four anchors are placed in the corners, the sensing field is divided into four grids by using these anchors, and the sensor nodes are deployed randomly in a field of area R × R, where R is the radio range of a sensor node, such that all sensor nodes in a cluster are within the radio range of their cluster head. Next, each of the anchors broadcasts the RGB values assigned to it to the sensor nodes, and then using the signal broadcast by the anchor, each sensor node can obtain the RGB value and the average hop distance to the anchor. The server can calculate the location of each sensor node and choose a cluster head that is near the center of the grid as shown in Fig. 2; each cluster head receives the sensed data from the nodes in the cluster.
In the routing phase, the CGEER method differs from CEER. Because of the reduced cost associated with using the cluster head, three virtual searching range methods of the relay node are proposed. The first method involves choosing a relay node within a virtual searching range; the distance between the cluster head and the anchor can be calculated, and then the point that lies exactly between the cluster head and the anchor can be obtained. The radius of the virtual searching range is the distance from the cluster head to the middle point. On the basis of this information, the relay node that contains the maximal amount of remaining energy can be selected to act as the cluster head, as shown in Fig. 3. By this approach, the transmission cost of the cluster head is lowered and efficient routing is enabled. In the second range method, if no active nodes are located within the virtual searching range, the cluster head will select a relay node in the sensing range; the selected relay node contains the maximal amount of remaining energy. In the third range method, if no active nodes are present within the sensing range of the cluster head, the selected cluster will transmit the sensing data to the anchor directly. In the transmission phase, the sensor nodes transmit the sensed data to the cluster head, which aggregates the data and transmits them to the relay node, and the relay node receives and relays the aggregated data to the anchor. In this manner, the use of CGEER reduces the  cost of transmission from the sensor node to the cluster head and also reduces the cost of transmission from the cluster head to the anchor via the selected relay node. Thus, using the proposed CGEER method can enhance energy efficiency because the mechanism of relay-node election is more efficient than that used in CEER; this, in turn, is because the position of the relay node is more favorable than that of the relay node in CEER.
The notations used in the setup and routing phases in CGEER are listed in Table 1. The pseudocode used for the election of the cluster head and the relay node in CGEER is provided in Algorithm 1, which is described in Table 2. 3.2 CGEERF CGEERF, like CGEER, is also divided into setup, routing, and transmission phases, but the setup phase is distinct from those in CEER and CGEER. After clusters are formed using color theory, the sensor nodes can obtain three factors by exchanging messages with the anchor node. The three factors are the location of the sensor node, the energy of the sensor node, and the distance between the sensor nodes and the anchors. To develop an energy-efficient network, FLC is used to define the membership function of each sensor node. Thus, the cluster head is selected dynamically, which balances the energy consumed by all the sensor nodes. FLC consists of four components: a fuzzification interface, the rule base, an inference engine, and a defuzzification interface. Three inputs and one output are used in the proposed mechanism of cluster-head election. The input membership function of each sensor node includes the remaining energy E i for the node i, the number of neighbors of the sensor node, N i , and the distance from the sensor node i to the anchor, D toanchor . The output P CH is the probability that a sensor node will become a cluster head; the method of cluster-head election is shown in Fig. 4. The initial energy of a sensor node is 0.25 J, the number of neighbors of a sensor node is set from 0 to 25 (because the average number of sensor nodes in each grid is 25), and the distance from a sensor node to an anchor is defined as where A x , A y and i x , i y are the coordinates of the anchor and the sensor node, respectively. Figures 5(a)-5(c) present the three input membership functions, namely, E i , N i , and D toanchor . Figure 5(d) presents the output membership function, the probability that a sensor node will become a cluster head, P CH . In Fig. 5(a), the values are fuzzified and mapped onto the fuzzy variables less (Le), medium (Me), and much (Mu) in the membership function E i ; in Fig. 5(b), the fuzzy variables are little (Li), mean (Me), and many (Ma) in the membership function N i ; and in Fig. 5(c), the fuzzy variables are near (Ne), moderate (Mo), and far (Fa) in the membership function D toanchor . Figure 5(d) shows the single output membership function, which is expressed as a level of probability: very low (VL), low (L), little low (LL), medium (M), little high (LH), high (H), and very high (VH), in the membership function P CH .  Table 2 Algorithm for CGEER in the election of a cluster head and a relay node.
M P is equal CH P and the A P central point; end if 10 end if 11 P = P + 1; In FLC, a fuzzy database is used for delineating linguistic control rules and fuzzy data operations. The control rule is developed on the basis of the characterization of the control target and the control policy of the domain expert by using a set of linguistic control rules. In CGEERF, the FLC rules contain a total of 3 × 3 × 3 fuzzy rules, which are listed in Table 3.
The inference engine provides the decision-making mechanism of the FLC, and it controls the fuzzy variable and infers the fuzzy rule. The fuzzified input values that contain the degree to each part of the antecedent of a fuzzy rule must be combined using a fuzzy value in order to acquire a single value. The engine maps the input linguistic variables onto output linguistic variables based on "if-then" statements.
The defuzzification interface derives a single crisp value for a concrete realworld control action from the inferred fuzzy output values; thus, the defuzzification interface converts a fuzzy control decision into a crisp, nonfuzzy control signal. The Table 3 Fuzzy rules for the election of the cluster head.
Le defuzzification output is computed using the centroid-defuzzifier method, and the probability of the cluster-head selection P CH is calculated as where n is the number of fuzzy output sets, U i is the ith node in the universe of discourse, and u i is the membership value of U i . In the routing phase, CGEERF is similar to CGEER and, once again, three virtual searching range methods of the relay node are used. These methods are exactly the same as those described in § 3.1 (second paragraph). Thus, the use of the proposed CGEERF method increases energy efficiency because the cluster head is elected dynamically, and the mechanism of relay-node election is more efficient than that used in CEER because the positioning of the relay node is improved compared with the corresponding positioning in CEER.

Simulation Results
In this section, we describe the investigation of the performance of the CEER, CGEER, and CGEERF methods in terms of numbers of surviving nodes and node energy dissipation. By each method, 1000 rounds were implemented in order to obtain the averaged calculated results.
First, 100 sensor nodes were deployed randomly in a field of 100 × 100 m 2 ; the initial energy of each node was E init = 0.25 J. Four anchors were placed in the four corners of the field, and the anchors received the aggregate data collected from the cluster head. The remaining parameters are presented in Table 4.
Each simulation was continued until all the nodes had exhausted all their energy. The simulation results support the proposed performance of the CGEER and CGEERF methods; the use of both methods prolonged the network lifetime and generated an energy-efficient network. Figure 6 shows 100 sensor nodes deployed randomly in a field of 100 × 100 m 2 and a package size of 4000 bits. In the simulations performed using CEER, CGEER, and CGEERF, the first dead nodes appeared in the 275th, 556th, and 626th rounds, respectively. Thus, both the proposed methods markedly outperformed the CEER method. Under a package size of 4000 bits, Fig. 7 shows that at the 300th round, the total remaining energies in the simulations performed using CEER, CGEER, and CGEERF were 17.9, 17.97, and 17.72 J, respectively. Figures 8 and 9 show 100 sensor nodes deployed randomly in a field of 100 × 100 m 2 with a package size of 1016 bits. In the simulations performed using CEER, CGEER, and CGEERF, the first dead nodes appeared in the 500th, 1400th, and 3000th rounds, respectively. Thus, both the proposed methods markedly outperformed the CEER method. Figure 9 shows that at the 1000th round, the total remaining energies in the    simulations performed using CEER, CGEER, and CGEERF were 18, 18.5, and 19 J, respectively.
The two simulations were also performed using sensor nodes deployed randomly in a field of 200 × 200 m 2 with a package size of 4000 bits, and the results are shown in Figs. 10 and 11. The proposed CGEER and CGEERF methods again outperformed the CEER method. In simulations performed using CEER, CGEER, and CGEERF, the first dead nodes appeared in the 32nd, 84th, and 230th rounds, respectively, as shown in Fig. 10. Figure 11 shows that at the 300th round, the total remaining energies in simulations performed using CEER, CGEER, and CGEERF were 12.5, 13.25, and 14.75 J, respectively. Thus, the proposed CGEER and CGEERF methods outperformed CEER in terms of the active nodes and the total remaining energy.

Conclusions
In this paper, the CGEER and CGEERF methods are proposed for enhancing network lifetime. In CGEER, geographic routing is used for selecting the relay node; this can reduce the transmission cost of the cluster head and thereby enhance the network lifetime. In CGEERF, fuzzy decisions are used for selecting the cluster head dynamically, with the main goal being to select a cluster head that possesses more than the average amount of the remaining energy of the nodes, features the largest number of adjacent nodes, and is closest to the anchor; using this approach can balance the energy consumption of the sensor nodes and thereby enhance network lifetime. The use of CGEER and CGEERF not only prolongs the network lifetime when compared with the lifetime obtained by the CEER method, but also generates an energy-efficient network.