**IMPROVEMENT of MULTIPLE ROUTING BASED on FUZZY CLUSTERING and PSO ALGORITHM IN WSNS TO REDUCE ENERGY CONSUMPTION**

Gholamreza Farahani

Department of Electrical Engineering and Information Technology, Iranian Research

Organization for Science and Technology (IROST), Tehran, Iran

**ABSTRACT**

One of the most important issues discussed in Wireless Sensor Networks (WSNs) is how to transfer information from nodes within the network to the base station and select the best possible route for transmission of this information, taking into account energy consumption for the network lifetime with maximum reliability and security. Hence, it would be useful to provide a suitable method that would have the features mentioned. This paper uses an Ad-hoc On-demand Multipath Distance Vector (AOMDV) as a routing protocol. This protocol has high energy consumption due to its multipath. However, it is a big challenge if it can reduce AOMDV energy consumption. Therefore, clustering operations for nodes are of high priority to determine the head of clusters which LEACH protocol and fuzzy logic and Particle Swarm Optimization (PSO) algorithm are used for this purpose. Simulation results represent 5% improvement in energy consumption in a WSN compared to AOMDV method.

**KEYWORDS**

Energy Aware Routing Protocol, Fuzzy Logic, Ad-hoc Multipath, LEACH, Particle Swarm Optimization Algorithm

**1. INTRODUCTION**

The use of WSNs in a variety of sectors, such as military, industrial, agriculture, medicine, etc. is a unique feature of the world today due to its ease of use.

The deployment of nodes in a random or predefined manner in a specified two-dimensional or three-dimensional form as sensor nodes for gathering information creates a WSN. One of the issues that is considered a challenge in WSNs is the routing issue, along with reducing energy consumption. So far, various mechanisms have been introduced to collect, send and process data in WSN. One of these operation mechanisms is network clustering. Clustering is one of the methods used to collect and send packets in a WSN. This operation has advantages such as system scalability, increased network lifetime, and reduced redundancy in sending and consuming energy. Choosing the cluster head in clustering nodes is an important step, because clustering requires energy consumption and may be wasted a lot of energy. One of the most famous protocols in clustering is LEACH [1].

As discussed, routing should be aware of energy usage. One of the routing protocols is the Ad-hoc On-demand Distance Vector (AODV) [2], which has high power consumption due to its multipath and multichannel packet sending during routing time. In order to improve the efficiency of the AODV protocol, a method called the AOMDV is proposed [3], the most important effect being the addition of multipath capability in the AODV classical protocol. The introduction of node states to enhance the AODV’s efficiency in selecting the main path is an important goal of this new protocol. In the path discovery process, the rules for updating the route will calculate the node’s weight for each path, as well as sorting the path size in descending order in the list of paths, and a route will choose that provide more path weight for data transfer. There is also the use of Route Request (RREQ) packet delay to send packets on the network as well as the threshold of energy to simplify network congestion. Therefore, evolutionary methods need to be developed to solve this problem in order to improve the energy consumption for the longer lifetime of nodes and ultimately the network [4].

In this paper, a method for energy aware routing in WSN will be presented. In the proposed method, fuzzy logic and PSO algorithm are used to improve the AOMDV routing protocol and the LEACH clustering protocol, and a new routing scheme with minimum energy consumption is proposed.

In the field of WSNs energy aware routing, there are many studies. In DAM et al. [5] and Kevin [6], pipeline and power techniques are suggested for cryptosystem to reduce power consumption. In addition, it is expected to increase the level of security and achieve high performance that makes it suitable for uninterrupted applications, as discussed in Nguyen et al. [7].

In Rages and Baskaran [8], estimating the lifetime of a Body WSN with use of probabilistic analysis and Monte Carlo simulation is proposed. This framework makes possible to control the uninterrupted health of patients with wearable vital signal wireless sensors. In the control of health, the loss of critical or emergency information is a serious issue. Therefore, ensuring the quality of service provision is essential. It is important to have an estimated lifetime of the network to replace or change batteries because the loss of important information is not acceptable. The lifetime of the body WSN is defined as the duration of the failure of the first node due to battery drain. The heart rate and blood glucose levels are controlled in a centralized location in a health / medical environment managed to evaluate the performance of the physical WSN.

In the other research, in Singh and Verma [9], a homogeneous protocol has been presented that is sensitive to the optimal energy consumption distributed on the adaptive threshold based on the middle layer routing protocol. In this research, probabilistic weight is assigned to cluster heads of each cluster from the network, and the purpose of the research is to provide a new protocol for reducing distributed energy consumption during routing.

Ke et al. [10] has proposed a hierarchical clustering approach to reduce energy consumption in the WSN during routing, which named the proposed protocol as novel energy-aware hierarchical cluster-based (NEACH).

Yigit et al. [11] has presented channel aware routing and the multichannel timing priority for routing is used. Channel selection is carried out during routing time with minimizing energy consumption. The use of a Link-Quality-Aware Routing Algorithm (LQ-CMST) along with the Priority and Channel-Aware Multi-Channel (PCA-MC) for intelligent WSN applications are considered.

In [12], the base station is considered as the Region of Interest (ROI). The simultaneous use of two protocols, called On-Hole Children Reconnection (OHCR) and On-Hole Alert (OHA), with their distributed natural properties, can solve the power consumption problem in remote locations. Two mentioned protocols have been identified using two Degree Constraint Tree (DCT) and Shortest Path Tree (SPT) that has been able to contribute up to 50% to energy storage.

Vimalarani et al. [13] proposed an Enhanced PSO-Based Clustering Energy Optimization (EPSO-CEO) algorithm for WSN in which clustering and clustering head selection are done by using PSO algorithm with respect to minimizing the power consumption in WSN.

Some researches focus on the metaheuristic methods. Kuila and Jana [14] are proposed Linear/Nonlinear Programming (LP/NLP) formulations of energy efficient clustering and routing followed by two algorithms for the same based on PSO. The routing algorithm is developed with an efficient particle encoding scheme and multi-objective fitness function. The clustering algorithm is presented by considering energy conservation of the nodes through load balancing. The results of algorithms demonstrate their superiority in terms of network life, energy consumption, dead sensor nodes and delivery of total data packets to the base station in comparison with other methods.

Balaji et al. [15] presented a fuzzy based PSO routing technique to improve the network scalability. Significantly, in the cluster formation procedure, fuzzy based system is used to solve the uncertainty and network balancing. Cluster heads are calculated using PSO algorithm to reduce the energy consumption. Their simulation results show that the proposed routing protocol can perform load balancing effectively and reduce the energy consumption of cluster heads.

In other recent research, a Trust-Based Secure Routing (TBSR) scheme using the traceback approach has been proposed to improve the security of data routing and maximize the use of available energy in Energy-Harvesting WSNs (EHWSNs) [16].

Fardin Far and Alaei [17] are proposed a method to increase the efficiency of the Optimized Link State Routing Protocol (OLSR) [18] by generating new parameters and considering the amount of nodes energy. They have selected the optimal route based on the remained energy in the middle nodes, the distance between the nodes and the number of steps with use of the Genetic algorithm-based approach for optimal routing in the OLSR protocol.

An Energy-Balanced Routing Protocol (EBRP) for WSNs is proposed in [19]. In EBRP, the network is divided into several clusters by using K-means++ algorithm [20] and select the cluster head by using the Fuzzy Logical System (FLS). To get the fuzzy rules for different networks, Genetic Algorithm (GA) is used. EBRP compared with the routing protocols such as LEACH, Low-Energy Adaptive Clustering Hierarchy-Centralized (LEACH-C) [21], and Stable Election Protocol (SEP) [22], which prolongs the network lifetime (first node dies) by 57%, 63%, and 63%, respectively.

Kamran Khan et al. [23] proposed routing algorithm for the transmission of data, cluster head selection algorithm, and a scheme for the formation of clusters named Energy-Efficient Multistage Routing Protocol (EE-MRP). Based on the energy analysis of the existing routing protocols, they proposed a multistage data transmission mechanism. They adopted an efficient cluster head selection algorithm and exterminated unnecessary frequency of reclustering. Static clustering is used for efficient selection of cluster heads. They compared the performance and energy efficiency of their routing protocol with other routing protocols and observed their routing protocol (EE-MRP) has performed well in terms of overall network lifetime, throughput, and energy efficiency.

Other research uses a geographic routing protocol to route the packets. The geographic routing protocol route packets in a hop-by-hop way, where a node selects a relay node to forward packets among the neighboring nodes based on the geographic location information of the neighboring nodes. To employ geographic routing protocols, two neighboring nodes need to exchange the location information with each other periodically. In a mobile ad hoc network, however, a packet transmitted between two neighboring nodes may be lost due to the out-of-date location information, which result in demanding extra energy to retransmit the packet.

Tang et al. [24] by considering the out-of-date neighboring location information, proposed two methods capable of augmenting geographic routing protocols to reduce energy consumption in mobile ad hoc networks. The first one uses a tradeoff between the progress distance and the energy consumption when selecting a relay node. The second one uses energy consumption when selecting a relay node, to consume minimum energy to route a packet between a source-destination pair in the continuous domain. Their results shown method of Tang can reduce the energy consumption while preserving the high packet delivery rate.

Also, to exchange energy-efficient messages among neighboring nodes, the reactive type EAO (Energy-Aware One-to-one routing) [25] and LEU (Low-Energy Unicast Ad-hoc routing) [26] protocols are proposed to unicast messages to the destination node. In the EAO protocol, the total electric energy of nodes and delay time from a source node to a destination node can be reduced compared with the ESU [27] and AODV protocols. However, a source-to-destination route may not be found if the communication range of each node is shorter.

To solve this problem IEAO (Improved Energy-Aware One-to-one routing) protocol [28] is proposed. In IEAO protocol, after a shortest route is found to the destination node, a more energy-efficient prior node is found in nearest neighbor of each node starting from the destination node. Therefore, a neighbor node which has an uncovered neighbor node is selected as a prior node for each node to make a route.

At continuation of paper in section 2, model of the system is explained, then section 3 will describe the proposed method. Simulation results are presented in section 4 and finally section 5 concludes the paper.

**2. MODEL OF SYSTEM**

In this section, first, some definitions and models to calculate power consumption in WSN is explained.

**2.1. Definition**

a) Sensing range

It is range that a sensor can sense a particular area. As shown in figure 1, a sensing range of sensor S is a circle with radius r

**Figure 1** Sensing range of sensor S is inside of circle with radius r

b) Communication range

It is range that sensor can communicate with another sensor.

c) Degree of coverage

When an area is covered by a sensor S, then the degree of coverage of that area is one because it is covered within the sensing range of only one sensor.

**2.2. Condition of intersection**

If two sensors S1 and S2 are considered. Both two sensors are intersect with each other when sum of radius is less than and equal to distance between centers. Therefore, following condition could be raised.

a) Case 1: Two sensors sensing range has intersection (figure 2).

**Figure 2** Two sensors S1 and S2 sensing range has intersected with each other

b) Case 2: Two sensors sensing range has touch without creating any intersection area (figure 3).

**Figure 3** Two sensors S1 and S2 sensing range has touch with each other

c) Two sensor sensing range separate with each other (figure 4).

**Figure 4**Two sensors S1 and S2 sensing range separate with each other

d) One sensor is within another sensor sensing range (figure 5).

**Figure 5**Two sensors S1 and S2 have intersect with each other

**2.3. Determination of intersection area**

To calculate intersection area, according to figure 6, the two following equations should be

solved.

**Figure 6**Two intersect S1 and S2 sensors

If the line y=x is drawn on the graph, the intersection area will split into two equal pieces (figure 7).

**Figure 7 **Two equal pieces of intersection area

Now, notice that we can form a triangle in the S1 circle, from the dashed line to the center at

(1,1). It will be a 45º-45º-90º right triangle (figure 7).

The area of quarter of the circle with radius 1 is π/4 and the area of the triangle is 1/2. Therefore,

the area of S1 circle above the line y=x is as equation (3).

The equation (3) is half of the intersection area, therefore, the entire intersection area is:

Thus, the intersection area on the case of radius for both sensing range equal 1 is calculated. If radius of sensing range of sensors equal with r, the intersection area with be as equation (5).

**3. PROPOSED METHOD**

In this section, the proposed algorithm to reduce energy consumption in WSN will explain. Initially, a series of points and positions are defined by default, so that sensor nodes can be identified and replace at routing time. It should be noted that all of the sensor nodes deployed at the default points are fixed and are in fact static. The base station, announcing the target and targets calculate the remaining energy in each round through equation (6) and then maintain the remaining energy.

In equation (6), Initial is the initial energy, ( ) E t i is the energy of node and r is the current cycle. It should consider a region for sensing. If there are two s1 and s2 sensors, both of these sensors intersect with each other when the total radius of the area is less than and equal to the distance between each center in of that area and its relation is given by equation (7) (figure 2).

As can be seen in equation (7), the Euclidean distance is considered that r1 is the first sensing range radius, r2 is the secondary sensing range radius, (x1 ,y1) and (x2,y2) are coordinates in the Cartesian system for S1 and S2 sensors respectively.

There are several special cases that should be investigated. When the sensing range from one sensor to another sensor is separated, there is equation (8).** **

When a sensor is located within the sensing range of another sensor, there will be equation (9).

When two sensors are only touched, without creating an intersected area, the equation (10) will exist.

**Considering the three conditions of the equations (8) to (10) is vital. It is also important to determine the area for intersection the sensing range of sensing nodes. When the sensing range of the sensors cross each other, a zone will create in the form of equation (11).**

**After specifying the intersected area, the degree of coverage for the AODMV protocol settings can be determined for multipath. When the two sensing range of sensors intersected with each other, their coverage is equal to one that is defined by the definition of the coverage. The relationship between the degree of coverage for the two sensors s1 and s2 is a proven equation (12) [29]**

**If a sensor covers a region, the coverage degree will be equal to one, and if two sensors cover a region, the coverage degree of that area will be equal to 2, which is calculated from the proven equation (13) [29].**

**By replacing equation (13) is equation (12), will result equation (14).**

**Now after finding the intersected area between nodes of WSN, the AOMDV protocol is considered as a multipath method and a clustering operation is performed. The purpose of using fuzzy logic in the paper is to identify and distinguish cluster patterns in the network. First, a known node will select as a cluster head. The cluster head collects other information and sends it to the central station. The cluster head functions like a local central station sensor. Selection of the cluster in this paper is carried out with the help of fuzzy membership functions and fuzzy rules. Therefore, in order to better distribute the load between the sensor nodes, the same cluster that includes the cluster head, will be used.**

In the network, there are several clusters, each with a cluster head, and each node belongs to a cluster that is geographically distributed throughout the network. Cluster head is used to increase network life and reduce energy consumption. The cluster is dynamically selected according to its energy.

The default protocol in clustering and choosing the cluster head is LEACH that fuzzification is carried out on it. The AOMDV protocol consists of two steps, clustering, and scheduling for nodes that operate on packet transmissions in the network, and each node produces a random number between 0 and 1.

The nodes that have values below the threshold are selected as the cluster head. Hence, due to the uncertainty, a fuzzy relation can be considered for nodes (Equation (15)).

**In equation (15), p is a value that checks if the node has cluster head condition. r is the number of cycles to select the cluster head and G is a set of nodes that are not selected as cluster heads. Initially, the network area is divided into two regions, called region 1 and region 2, which nodes in region 1 have a higher probability to select as a cluster head. It should be noted that the base station is located as a fixed area in the center of the network region. The base station calculates the distance from the sink node to compare with threshold value (equation (16) derived from equation (12)).****where TR is the threshold and a and b are coordinated in the Cartesian system. In equation (16), nodes whose distance is greater than the threshold will discard, and the node that is near the center with less energy is chosen as the sink node.**

In the proposed method, the two AOMDV and LEACH protocols will fuzzy simultaneously. Two important parameters that are used as fuzzy inputs to select the cluster head in the AOMDV protocol are the energy level and the center of the node in a set with respect to its neighboring nodes and two other important input parameters for the LEACH protocol, are amount of energy consumed in the packet sending path that is used by the node and the number of steps in the path. Calculation of energy consumption for each cluster and the packet sending path is critical to minimizing energy consumption. The two parameters of the AOMDV protocol are updated at the request of the packet from one node to the other node in a cluster or outside the cluster. Then the first node that has the destination path sends two values of the LEACH protocol for clustering and packet response on the network.

Until the node for sending respond is not on the destination, there will be a packet request in the network until it reaches the destination. This is due to determination the amount of energy consumed on the path. Then the output results of the fuzzy segment will be the input of the routing section for the AOMDV protocol again, which will first find the optimal route, and second, the least amount of energy will be consumed.

The number of nodes in each path other than the source node and destination node is known as a step. After clustering and choosing a cluster head based on fuzzy logic and LEACH and AOMDV algorithms, an optimization algorithm is required to improve the routing of the AOMDV protocol. Hence, PSO algorithm is used with regard to its advantages. Perhaps one of the most important reasons for using the PSO algorithm is the high convergence rate compared to other evolutionary algorithms. The best value to improve energy consumption in the routing process is named Pbest and the best position ever known by the particle population is named Gbest . After finding the best

values, the velocity and position of each particle are updated using equations (17) and (18), respectively.

**where v[] is the particle velocity, position[] is the current particle (solution), rand () is a random number between (0,1) and C1, C2 are learning factors. usually C1 = C2 = 2.**

The right side of equation (17) consists of three parts: the first part is the current velocity of the particle, and the second and third parts are particle velocity change and its rotation towards the best personal experience and best experience of the group.

If the first part of equation (17) is not taken into account, then the particle velocity is determined only by the current position and the best experience of the particle and the best group experience. In this way, the best particle of the group stays in place and the others move toward that particle. In fact, the mass movement of particles without the first part of Equation (17) will be a process in which the search space gradually becomes small and a local search around the best particle forms. In contrast, if only the first part of equation (17) is taken into account, particles will go their own way to reach the boundary wall and perform a kind of global search.

The convergence rate is another important issue in the PSO algorithm. Several methods have been proposed to increase the convergence speed of the optimal particle swarm algorithm. This scheme usually involves changes to the PSO algorithm update equations, without altering the structure of the algorithm. Therefore, there is usually a better result in local optimization performance, which is sometimes carried out with a slight change in functional performance.

One of the advances in PSO algorithm is the use of weight inertia. The weight inertia is a factor in scaling the speed associated with the previous step. As a result, a new equation for updating speeds can be found in equation (19).

**Considering the results of the PSO algorithm, w(t) has been considered in the interval [0, 1.4], but over time, the results of the experiments show that there is a certain amount in the interval [0.8, 1.2], which results in greater convergence. In some cases, for simplicity, the w(t) value is equal to 1. The acceleration coefficients C1 and C2 in equation (19), and in essence, control the extent to which a particle will move in a single repeat. Values for both coefficients are set to 2.**

The performance of the PSO algorithm depends on the parameter settings, which include the weight inertia w(t), acceleration coefficients C1 and C2, the maximum number of repetitions T, and the initialization of the population. Weight inertia usually decreases uniformly from the maximum number of repetitions T.

When a particle is moved to a new position, a new solution is found for each object. This solution is evaluated by a fitness function.

A WSN with a number of nodes is considered as T={τ1,τ2,…,τN} and the number n of potential position as P={p1,p2,…,pn} to reduce energy consumption during routing time. After the production of particles, it is necessary to derive the fitness function.

The fitness function is obtained by choosing the minimum number of potential positions with less energy consumption (Equation (20))

**In equation (20), K is a potential positions and M is a potential point. The cost of point coverage (τi) should be calculated as an equation (21).**

**From the combination of equations (20) and (21), equation (22) is produced to calculate energy consumption with respect to sensor coverage.**

**Now that the fitness function was produced for coverage, the fitness function for connecting sensor nodes should also be calculated. For this purpose, equation (23) is used.**

In equation (23), ( ) Connection si is the set of sensor nodes within the i s range.

In order to calculate the fitness function for calculating energy consumption with respect to sensor connection, equation (24) is used.**In this paper, for creation of multi-objective fitness function, the sum of weights method is used.The method of sum of weights is a classical method for solving multi-objective optimization problems. In this approach, weight Wi is multiplied by any of the targets. Finally, all of the multiplied quantities are grouped together to convert multiple targets into a scalar target function. This action generates a general fitness function as equation (25).**

**Optimization of equation (25) leads to improved energy aware routing in the multipath AOMDV protocol, and can be used efficiently in WSN by using the information gathered from the cluster head during energy aware routing.**

**4. SIMULATION**

In this paper, simulation will carry out in the MATLAB 2017b environment. In the proposed method, fuzzy logic is used to fuzzy the LEACH and AOMDV protocols. The fuzzy inference process includes membership functions, fuzzy operators, and if-then rules. The type of fuzzy inference system used in this paper is Mamdani. In this method, the fuzzy membership functions must be non-fuzzy. This will increase the efficiency of non-fuzzy. Figure 8 shows the parameters of the fuzzy system in the MATLAB environment.

**Figure 8**. Fuzzy Inference System Parameters

As shown in figure 8, the fuzzy inference system has 4 inputs, 22 rules, and 1 output. The inputs and outputs of the fuzzy system are indicated in figure 9.

A total of fuzzy rules between these inputs and the linguistic variables are 22 rules that can improve clustering and routing [9]. Figure 10 illustrates the fuzzy rules between membership functions.

The fuzzy rules are based on “and” that the combination of four input variables along with 22 combinational rules between them leads to a level of probability. In figure 11, inputs (hops) in the x-axis and routing energy in the y-axis with the output of the probability in the z-axis are shown.

According to figure 11, the high blue colored sections in the environment have the highest energy consumption during cluster-based routing and cluster head selection. Whatever moves upwards, the green or yellow color will result in the best possible fuzzy output, indicating the best rules and the combination of input variables in that section.

The probability of selecting a node as a cluster head depends on the inputs and classification. After obtaining which node is selected as a cluster head in the network, the non-fuzzy operator will be used. In non-fuzzy, the exact value of a fuzzy number is obtained. Therefore, the definite number is introduced as the representation of the fuzzy number.

There is a variety of methods for non-fuzzy, in which the center of gravity of the fuzzy number is used in this paper. In other words, the point that has the degree of belonging to maximum is considered as the gravity center of that fuzzy number.

**Figure 9 **a) Membership functions and input linguistic variables of the clustering energy, b) membership

functions and input linguistic variables of centrality, c) membership functions and input linguistic variables

of the routing energy, d) membership functions and input linguistic variables of hops, e) membership

functions and output linguistic variables of probability

**Figure 10**. Fuzzy rule set

**Figure 11**.Presentation of a level of fuzzy sets

The output of the fuzzy part causes the cluster head to be selected. The WSN parameters used in this paper are shown in Table 1.** ****Table 1**. WSN Parameters

At first, nodes are randomly deployed in the network environment. The difference between the network length and the actual position of the sensor node in the network for random deployment, determines the power of the nodes at start time, as determined by equation (26).

**Figure 12**.Deployment of the node in the first round along with the two cluster heads with black color

Typically, the number of cluster heads can be increased up to 5. To obtain the distance between the clusters in a network environment and also the closest node to another node in a cluster, the Euclidean distance in the m-dimensional space is used, as shown in equation (27).

**At continuation, the PSO algorithm will be used which will be able to find the optimal path and can maximize the amount of mathematical expectation for all states in the clusters. After fuzzy logic clustering operations, routing optimization operations are performed to reduce energy consumption. Figure 13 shows the current status of routing with the AOMDV protocol in normal mode and the selection of clusters head with fuzzy logic.**

**Figure 13**.The status of routing with the AOMDV and Fuzzy Logic methods

During the selection of the cluster head, the AOMDV-based routing operation is also running and energy consume. The network continues to operate until the end of its energy consumption. The probability of selecting an optimal node for a cluster head is 0.5.

Finally, the deployment output and cluster heads of figure 12 will be as in figure 14 with minor variations in each round of training due to the deployment of the initial node in the environment as well as space change.

**Figure 14**.Deployment of nodes in the last round

As shown in figure 14, there are several cluster head nodes, and the nodes, due to their overlap, are nodes that are more energy-consuming in the environment, which, of course, are outside the cluster. In this paper, three values for the size of the packet to be transmitted in the network are defined in bits of different sizes, in order to determine the energy consumption versus distance in the WSN.

The first packet size is 10 bits. Then the PSO algorithm is used to reduce energy consumption in the AOMDV protocol, which the result of using the PSO algorithm is shown in figure 15.

In the upper part of figure 15, the cluster heads are optimized by the PSO algorithm, and nodes that have high energy consumption are identified that the reduction of energy consumption during routing takes into account these nodes.

The lower part of figure 15 shows the energy consumption by using the PSO algorithm that the PSO algorithm repeatedly reduces energy consumption, and the optimization rate is applied. Clearly, as a new packet is sent, the energy consumption of the network will rise to a certain extent but will not be as high as the initial energy consumption, as the paths predefined by the proposed algorithm are mostly optimal and for the new packages only just make some adjustments to the previous path.

Now that the energy consumption is optimized, the packets enter the network to get the result. In figure 16(a), shows energy consumption versus distance with packet size10-bit on the network. A packet with a length of 12 bits is shown in figure 16(b), and a packet length of 16 bits is shown in figure 16(c).

Figure 16 results that with increasing data values from 10 to 16 bits at a given distance, the growth rate of energy consumption is reduced. The reason for this is the use of clustering based on the proposed method, which has an effective result on the WSN to reduce energy consumption. Figure 17 shows the current status of the routing with the AOMDV protocol at working time and improvement of AOMDV with the PSO algorithm.

**Figure 15**.The result of PSO algorithm for optimization

**Figure 16**. a) The result of energy consumption versus distance of 10 bits, b) The result of energy

consumption versus distance of 12 bits, c) The result of energy consumption versus distance of 16 bits

**Figure 17**. Routing based on AOMDV and its improvement with PSO algorithm

**5. CONCLUSIONS**

Increasing the efficiency of WSNs is measured and evaluated with a series of parameters. One of these parameters is the network lifetime that is very important because the nodes in the WSN have battery limits. Hence, increasing the life of the network in terms of energy consumption in different situations is important.

Another important parameter is the routing that consumes energy. A methodology that can make energy aware routing and increase network efficiency is an effective way. Therefore, providing a method that can address these parameters can be used as an effective method in the WSN.

This paper uses smart methods to reduce energy consumption during routing. The proposed approach is that uses AOMDV routing protocol and the LEACH clustering protocol. In the clustering and cluster selection method due to the uncertainty that exists in the LEACH method, in this paper fuzzy logic including membership functions and fuzzy rules are used. The PSO algorithm, by optimizing the AOMDV multipath routing protocol with regard to energy consumption, has shown that the proposed method is an effective and efficient technique and can reduce 5% energy consumption in WSN compared to AOMDV method.

**REFERENCES**

[1] Heinzelman, W. R., Chandrakasan, A. & Balakrishnan, H., (2000) “Energy-Efficient Communication Protocol for Wireless Microsensor Networks”, Proceedings of the Hawaii International Conference on System Sciences, 4-7 January, Maui, Hawaii.

[2] Houda, L. (2010) Wireless ad hoc and Sensor Networks, Vol. 6, John Wiley & Sons.

[3] Marina, M. K. & Das, S. R., (2001) “On-demand Multipath Distance Vector Routing for Ad Hoc Networks”, Proceeding of 9th IEEE International Conference on Network Protocols, pp14-23, Riverside, 11-14 November, California, USA.

[4] Amine, D. A., Kamel, A. M. & Bouabdellah, K., (2014) “Formal Verification of a New Version of AOMDV in ad hoc Network”, Procedia Computer Science, Vol. 37, pp160-167.

[5] Dam, M. T., Nguyen, V. C., Nguyen, T. T. & Tran Le, T. D., (2014) “Low-Power and HighPerformance Design for Cryptosystem Using Power Aware and Pipeline Techniques”, International Conference on Advanced Technologies for Communications (ATC), 15-17 October, Hanoi, Vietnam.

[6] Kevin, J. (2009) Security and Privacy Controls for Federal Information Systems and Organizations, Revision 3, NIST SP. 800–53.

[7] Nguyen, T. T., Nguyen, V. C. & Pham, H. M., (2012) “Enhance the performance and security of SOC using pipeline and dynamic partial reconfiguration”, International Conference on Integrated Circuits and Devices in Vietnam (ICDV), 13-15 August, Danang, Vietnam.

[8] Rages, G. K. & Baskaran, K., (2012) “A Survey on Futuristic Health Care System: WBANs”, Procedia Engineering, Vol. 30, pp889–896.

[9] Singh, R. & Verma, A. K., (2017) “Energy efficient cross layer based adaptive threshold routing protocol for WSN”, AEU – International Journal of Electronics and Communications, Vol. 72, pp166- 173.

[10] Ke, W., Yangrui, O., Hong, J., Heli, Z. & Xi, L., (2016) “Energy aware hierarchical cluster-based routing protocol for WSNs”, The Journal of China Universities of Posts and Telecommunications, Vol. 23, Issue 4, pp46-52.

[11] Yigit, M., Gungor, V. C., Fadel, E., Nassef, L., Akkari, N. & Akyildiz, I. F., (2016) “Channel-aware routing and priority-aware multi-channel scheduling for WSN-based smart grid applications”, Journal of Network and Computer Applications, Vol. 71, pp50-58.

[12] Mohemed, R. E., Saleh, A. I., Abdelrazzak, M. & Samra, A. S., (2017) “Energy-Efficient Routing Protocols for Solving Energy Hole Problem in Wireless Sensor Networks”, Computer Networks, Vol. 114, pp51-66.

[13] Vimalarani, C., Subramanian, R. & Sivanandam, S. N., (2016) “An Enhanced PSO-Based Clustering Energy Optimization Algorithm for Wireless Sensor Network”, The Scientific World Journal, Vol. 2016.

[14] Kuila, P. & Jana, P. K., (2014) “Energy efficient clustering and routing algorithms for wireless sensor networks: Particle swarm optimization approach”, Engineering Applications of Artificial Intelligence, Vol. 33, pp127–140.

[15] Balaji, S., Golden Julie, E., Rajaram, M. & Harold Robinson Y., (2016) “Fuzzy Based Particle Swarm Optimization Routing Technique for Load Balancing in Wireless Sensor Networks”, International Journal of Computer, Electrical, Automation, Control and Information Engineering, Vol. 10, No. 7, pp1418-1427.

[16] Tang, J., Liu, A., Zhang, J., Xiong, N. N., Zeng, Z. & Wang, T., (2018) “A Trust-Based Secure Routing Scheme Using the Traceback Approach for Energy-Harvesting Wireless Sensor Networks”, Sensors, Vol. 18, No. 3, pp1-44.

[17] Fardin Far, S. & Alaei, M., (2018) “A New Method to Reduce Energy Consumption in Manet Network Routing based on OLSR Protocol and Genetic Algorithm”, Journal of Advances in Computer Research, Vol. 9, No. 3, pp55-70.

[18] Jacquet, P., Muhlethaler, P., Clausen, T., Laouiti, A., Qayyum, A. and Viennot, L., (2001) “Optimized Link State Routing Protocol for Ad Hoc Networks”, Proceedings IEEE International Multi Topic Conference (INMIC), 30-30 December, Lahore, Pakistan.

[19] Li, L. & Li, D., (2018) “An Energy-Balanced Routing Protocol for a Wireless Sensor Network”, Journal of Sensors, Vol. 2018.

[20] Arthur, D. & Vassilvitskii, S., (2007) “k-Means plus plus: the advantages of careful seeding”, Proceedings of the 18th Annual Acm-Siam Symposium on Discrete Algorithms, New Orleans, LA, USA, 7-9 January, pp1027–1035.

[21] Heinzelman, W. B., Chandrakasan, A. P. & Balakrishnan, H., (2002) “An application-specific protocol architecture for wireless microsensor networks”, IEEE Transactions on Wireless Communications, Vol. 1, No. 4, pp660–670.

[22] Tewari, M. & Vaisla, K. S., (2014) “Performance study of SEP and DEC hierarchical clustering algorithm for heterogeneous WSN,” International Conference on Computational Intelligence and Communication Networks, Bhopal, India, 14-16 November, pp385–389.

[23] Kamran Khan, M., Shiraz, M., Ghafoor, K. Z., Khan, S., Safaa Sadiq, A. & Ahmed, G., (2018) “EEMRP: Energy-Efficient Multistage Routing Protocol for Wireless Sensor Networks”, Wireless Communications and Mobile Computing, Vol. 2018.

[24] Tang, Y. J., Lee, C. W., Lin, M. H., Liu, B. H. & Tsai M. J., (2017) “Energy consumption reduction methods of geographic routing protocols with out-of-date location information in mobile ad hoc networks”, IEEE International Conference on Communications (ICC), 21-25 May, Paris, France.

[25] Ogawa, E., Nakamura, S., Enokido, T. & Takizawa, M., (2017) “An Energy-aware One-to-one Routing Protocol in Wireless Ad-hoc Network”, Proceeding of the 20th International Conference on Network-Based Information Systems (NBiS), 24–26 August, Toronto, Canada, pp1162-1168.

[26] Ogawa, E., Nakamura, S., Enokido, T. and Takizawa, M., (2017) “A Low-energy Unicast Ad-hoc Routing Protocol in Wireless Networks”, Proceeding of the 12th International Conference on BroadBand Wireless Computing, Communication and Applications (BWCCA), 8–10 November, Barcelona, Spain, pp1162-1168.

[27] Ogawa, E., Nakamura, S. & Takizawa, M., (2017) “An Energy-saving Unicast Routing Protocol in Wireless Ad-hoc Network”, Proceeding of the 11th International Conference on Innovative Mobile and Internet Services in Ubiquitous Computing (IMIS), 10-12 July, Torino, Italy, pp1162-1168.

[28] gawa, E., Nakamura, S., Enokido, T. & Takizawa, M., (2018) “Unicast Routing Protocols to Reduce Electric Energy Consumption in Wireless Ad-Hoc Networks”, 32nd International Conference on Advanced Information Networking and Applications Workshops (WAINA), Krakow, Poland, 16-18 May.

[29] Patra, R. R. & Patra, P. K., (2011) “Analysis of k-Coverage in Wireless Sensor Networks”, International Journal of Advanced Computer Science and Applications, Vol. 2, No. 9, pp91-96.

**AUTHOR**

Gholamreza Farahani received his BSc degree in electrical engineering from Sharif University of Technology, Tehran, Iran, in 1998 and MSc and PhD degrees in electrical engineering from Amirkabir University of Technology (Polytechnic), Tehran, Iran in 2000 and 2006 respectively. Currently, he is an assistant professor in the Institute of Electrical and Information Technology, Iranian Research Organization for Science and Technology (IROST), Iran. His research interest is computer networks especially routing.

%d bloggers like this: