Next Article in Journal
Flexibility Management with Virtual Batteries of Thermostatically Controlled Loads: Real-Time Control System and Potential in Spain
Next Article in Special Issue
Assessing Insider Attacks and Privacy Leakage in Managed IoT Systems for Residential Prosumers
Previous Article in Journal
Co-Hydrothermal Liquefaction of Lignocellulosic Biomass in Supercritical Water
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Algorithm to Optimize the Energy Consumption Using IoT and Based on Ant Colony Algorithm

1
School of Computer and Communication, Beijing Information Technology College, Beijing 100101, China
2
School of Information and Communication Engineering, Beijing Information Science & Technology University, Beijing 100101, China
3
Beijing Key Laboratory of High Dynamic Navigation Technology, Beijing Information Science & Technology University, Beijing 100101, China
*
Author to whom correspondence should be addressed.
Energies 2021, 14(6), 1709; https://doi.org/10.3390/en14061709
Submission received: 4 February 2021 / Revised: 21 February 2021 / Accepted: 23 February 2021 / Published: 19 March 2021
(This article belongs to the Special Issue Advances and Trends in Smart Energy Communities)

Abstract

:
Internet of Things (IoT) is a new concept in the information and communication technology studies which indicates that any creature (human, animal, or object) can send and receive data through communication networks, such as the internet or intranet platform. Wireless sensors have limited energy resources due to the use of batteries to supply energy, and since it is usually not possible to replace the batteries of these sensors. In addition, the lifespan of the wireless sensor network is limited and short. Therefore, reducing the energy consumption of sensors in IoT networks for increasing network lifespan is one of the fundamental challenges and issues in these networks. In this paper, a routing protocol is proposed and simulated based on an ant colony optimization algorithm’s performance. The clustering is performed with a routing method based on energy level criteria, collision reduction, distance from the cluster-head to the destination, and neighborhood energy in the proposed method. The cluster head is selected based on the maximum residual energy, minimum distance with other clusters, and consumed energy. This energy is minimized to reach the base station. The node with more energy than the threshold is selected as the new cluster head. Then, four conditions are applied for routing: the shortest path, the leading path, the shortest distance to the source node and the destination node, and routing. Results show that after about 50 cycles of transferring information, only the average of 19.4% of the initial energy is consumed in the network nodes. Therefore, obtained results illustrate that the proposed method helps to retain the energy more than 40% comparing the available methods.

1. Introduction

The Internet connects all users, but this network’s structure is changing, and a new member is being added to the accumulation. This new member is not a user and is referred to as (Things) [1,2]. The word is derived from the phrase “of the Things.” A Thing may be addressed to any device that has a sensor for exchanging information [3]. In general, the Internet of Things is a network of physical objects embedded with electronic components [4], software [5], sensors [6], and connections [7]. Therefore, they can provide more value and services by exchanging information (at unprecedented speeds and scales) with manufacturers, operators, or other devices.
The Internet of Things can improve the quality of life in various areas, including medical services, smart homes, smart cities, industry, environmental and water protection, energy management and consumption, and more [8]. Data transfer is significant for communication and in human-to-human or human–machine or machine interaction, since time plays a vital role in data transfer, so that a message will reach its destination within a permitted period. Therefore, the data must use the minimum or shortest route to reach the destination in such a way. Routing is creating and maintaining paths between nodes in wireless networks and is an essential issue in Internet of Things (IoT) networks [9]. A significant challenge for researchers is to develop routing algorithms in IoT networks. Firstly, in IoT networks, the paths are continually changing due to the dynamic nature of the nodes in these networks, which causes frequent changes in network connectivity and segmentation and new routes need to be discovered for data transformation. There are two types of routing protocols based on topology and clustering criteria [10,11]. The topology criterion refers to nodes and objects orders in the network (based on the maintenance of routing information), and in the clustering technique, the nodes are grouped within a cluster [12]. In each cluster, a cluster head is selected, and the cluster head communicates with the other cluster heads to transfer the packet, which ultimately saves the node energy by communicating through the cluster head. Numerous studies were conducted on energy saving issues in wireless sensor networks [13].
The IoT system needs a robust network infrastructure and a proper routing structure. Energy consumption issues must be considered to increase the lifespan of the node in grid systems. There are essential features such as energy-saving and the life extension of wireless networks for nodes. A node spends most of its energy on transmitting and receiving packets. In the IoT, the primary source of power for the node is the battery. However, in most cases, it is difficult for users to reach the location of the nodes. Battery replacement is often impossible due to a large number of nodes. However, the battery power of a node is also limited. Therefore, energy conservation has become a significant concern in wireless networks. It is necessary to develop new and efficient energy-saving schemes to reduce energy consumption and extend the grid life. This paper aims to present a routing method based on machine learning algorithms to reduce energy consumption and increase network life in the IoT system. In these networks, it is possible to determine the best path to the optimal points (destination) using machine learning algorithms [12,13,14,15]. This paper aims to use the efficient, ultra-innovative, and nature-inspired optimization algorithm called the ant colony optimization algorithm to route IoT and optimize energy consumption and network life. This method is inspired by the routing of leading ants and placing a substance called a pheromone. This paper is organized into five sections. The second section reviews the previous work, and the third section describes the proposed algorithm for optimization. In the fourth section, the simulations’ results are presented, and a general comparison is made between the proposed design and some published references in recent years. In the fifth section, a summary of the proposed method and conclusions will be presented.
The main contributions of the paper can be listed as follows:
  • Applying simultaneous application of energy level criteria, reduction in collisions, and distance from the node to the destination and neighborhood energy in clustering.
  • Proposing a novel approach to optimize the pattern to route and send information.
  • Implementing the colony optimization method for the energy consumption of sensor networks in IoT.

2. Literature Review

2.1. Routing Algorithms in IoT Platform

In [16], to reduce delivery delays, a method was proposed and simulated for routing in the Internet of Things using a public algorithm. The proposed algorithm for synchronizing duplicate databases ensures a sufficient number of random data exchanges on the network so that all nodes can eventually receive all the messages. As a result, all messages are delivered to the destination. Available routing is similar to massive sending on a network because it tries to send every message to all network nodes. Of course, in each step, like massive sending, the message is not sent to all neighboring nodes, but it tries to determine the location of the recipient using several unique methods (such as using GPS) so that the network resource consumption (such as memory) is reduced. However, this method strongly requires bandwidth and buffer.
In [17], a simple routing method called direct forwarding was proposed, in which when the source node generated a message, it stores it in its buffer and carries it until a collision with a destination node and delivers the message to it. This method generates one copy of the message, and as a result, the least data transfer is performed to deliver the message, and the overhead is minimized on the network. However, the message’s delivery may be delayed too much because there are no restrictions on the delivery delay.
In 2016, researchers used content-oriented routing technology to solve the traffic congestion problem in the central network area [18]. With routing data related to intermediate relay nodes for processing, it is possible to achieve data at a higher speed, thus effectively reducing network traffic. As a result, a significant reduction in latency can be achieved. In addition, duplicate data transmission can be eliminated after data collection, which mainly reduces wireless communications’ energy consumption and saves battery life. Therefore, in this paper, two methods for implementing this technology were proposed and simulated. The first method is content-centric routing (CCR), and the second method is the integration of the first method with the Internet Engineering Task Force Routing Protocol for Low-Power and Lossy Networks (IETF RPL) protocol, both of which are implemented on the Contiki operating system using the TelosB platform. The simulation results show the superiority of the first method in low network latency, high energy efficiency, and reliability.
In 2015, after reviewing various IoT routing methods by researchers [19], an optimizing energy consumption algorithm called Energy-Efficient Content-Based Routing (EECBR) was proposed and simulated. The proposed algorithm uses a virtual topology that is centrally constructed, and routing is distributed in such a way that the path of the generated events is directed to the desired subscribers or sensors. This method has been implemented and simulated with Omnet ++ software, and the simulation results have better conditions in terms of the energy variance than the compared ones. A novel modelling framework has been introduced in [20] to model the security–energy–environment issues as the main features in considering the quality of service (QoS) for the applications of the Internet of Things. In [21], an overview on the energy management in the Internet of Things environment was presented. This review aims to recognize significant research trends of power consumption in Internet of Things platform.
A method for eliminating the shortcomings and deficiencies related to resource constraints in the field of memory, computing power, and the energy of the wireless sensor terminal node in the Internet of Things is presented in the reference [22], which is performed by the IoT routing method and based on the informed clustering of energy. This method is called resource-aware Ad hoc On Distance Vector (RA-AODVjr) and is designed by combining RA clustering and AODVjr routing protocol. In this protocol, the best neighbor in the terminal node is selected, and the network traffic is balanced when the source of the terminal node is limited, and the wireless routing network is used. The simulation results show that the conditions for achieving load equilibrium with energy-limited nodes are limited. Compared to the original AODVjr protocol, the method proposed in this paper achieves load balancing with better conditions, and this is due to better neighbor node access technology, which achieves better balance in the local network traffic, and the average latency due to better routing. In 2014, researchers proposed two methods for routing the Internet of Things based on the ant colony algorithm [23]. The EEPR method, which routes to missing packets, is probabilistic. The EEPR algorithm controls the requested packets to reduce missing packets and network traffic in the AODV protocol. A source node forwards Route Request (RREQ) packets to neighboring nodes to send the data packet. In all types of AODV protocols, each node that forwards an RREQ packet sends the same packet to neighboring nodes. In other words, any node that does not forward RREQ packets indicates that it has disconnected the entire connection. The energy distance function is used to implement the EEPR method. Therefore, in this paper, two different routings were developed. One is Expected Transmission Count (ETX), which creates a good connection between the nodes. Each node periodically receives packets from a small band and sends them to neighboring nodes. In the second method, through the energy variance of adjacent nodes, the probability of a link between two nodes is performed. The simulation results in an extensive network with a high lifetime using the cloning algorithm and showing better results than the AODV algorithm.
Spyropoulos et al. proposed a method called “distribution and focusing” to limit the overhead of delivering a message [24]. In this method, we first enter the distribution phase, in which the source generates L number up to the sending signal with each new message. The token means that the host node can generate and send another copy of a specific message. When a replay node has only one signal to send, we enter the focus phase, where the message can be sent to another replay node according to specific criteria. These sending criteria are based on timers that record the time elapsed since the two nodes met.
In 2018, Youssef et al. presented a clustering scheme to extend nodes’ lifespans in the Internet of Things [25]. One of the most critical problems and challenges in the Internet of Things is reducing power consumption to extend the network’s lifespans. The clustering method is one of the approaches which is used to consume energy efficiency. However, most of the clustering schemes are chosen randomly without considering important parameters or based on a centralized approach using a base station that can affect the network’s scalability. In addition, single-hop communications are used by clusters to send their measured data to clusters, leading to increased cluster energy consumption in large-scale networks. Therefore, in this paper, a clustering scheme based on a distributed approach is proposed. Different parameters are considered for cluster head selection as well as for multi-hop communication.
The results show that the proposed scheme has better performance in energy consumption and the number of viable nodes.
In 2015, Bouyer and colleagues proposed a new way to reduce energy consumption in the IoT. The optimal use of energy in these types of networks is crucial. Recent research shows that organizing network nodes in some clusters increases energy efficiency and ultimately increases network lifespan. Therefore, controlling the number and location of cluster heads and the size of the cluster in terms of the number of nodes leads to a balance in the energy use of the cluster heads and increases the network lifespan. Clustering-based routing protocols are energy-efficient protocols that improve the lifespan of an IoT-based network. The purpose of clustering is to minimize the total transfer power by adding it to a single path for a longer network life. In this paper, the fuzzy c-means (FCM) and C-means algorithms are used for the optimal number of cluster heads and their position. The application of FCM in routing helps to change Low Energy Adaptive Clustering Hierarchy (LEACH) parameters during execution. The results show that the hybrid algorithm increases the network lifespan compared to the LEACH algorithm [26].

2.2. Optimization Approach in IoT Routing

In 2015, Leo et al. proposed an energy-efficient clustering scheme for nodes’ lifespan in the IoT network with separate nodes. A suitable clustering algorithm for node classification can increase grid energy efficiency. However, clustering requires additional overhead, such as selecting and determining the cluster head and cluster construction. This paper proposes a new regional energy-conscious clustering method using separate nodes called REAC-IN. In REAC-IN, cluster heads are selected based on weight. The weight is determined based on each sensor’s static energy and the average regional energy of all sensors in each cluster. Improperly distributed clustering algorithms can separate nodes from clusters. These disconnected nodes communicate with the sink by consuming excessive amounts of energy. The average regional energy and the distance among the sensors and the sink are used to determine whether the isolated node sends its data to the threaded node in the previous node or the sink. This process is performed to increase the network’s lifespans. The simulation results of the current study showed that REAC-IN optimizes other clustering algorithms [27].
In 2015, Azharuddin et al. introduced a clustering algorithm and fault tolerance and energy-efficient routing algorithm for wireless sensor networks. Energy conversion and fault tolerance are two significant issues in deploying a wireless sensor network. The design of routing and clustering algorithms for large-scale wireless sensor networks should address these issues for long-term network operation. This paper proposes distributed clustering, and routing algorithms commonly referred to as Distributed Clustering and Routings (DFCRs). It has been further proven that this algorithm has optimal energy consumption and fault tolerance. The DFCR algorithm uses the distributed time retrieval of distributed sensor nodes due to a sudden error in the cluster vertices. This algorithm considers the sensor nodes without cluster heads in its communication domain. The researchers performed extensive experimental tests on the proposed algorithm using various network scenarios. Then, the experimental results are compared with the existing algorithms to show the algorithm’s performance power in terms of various metrics and achieve the desired results [28].

3. Ant Colony Optimization Algorithm

3.1. Motivation

The ant colony algorithm is inspired by scientific studies and observations on ant colonies. A moving ant leaves a certain amount of pheromones (in different sizes) which determine the path. Among the most critical and exciting behaviors of ants is their behavior to find the path, especially how to find the shortest path between the source and the original path. This type of ants’ behavior has a kind of mass intelligence that finds the best and shortest path based on the signs they leave [29,30]. Therefore, these algorithms are based on the ability of simple ants to solve complex problems through cooperation. The collective behavior of these ants can be used when calculating the routes.

3.2. Background

This paper’s primary purpose is to design an algorithm based on the decentralized performance of ants, using their natural ability to find the shortest path between the origin and destination by moving in the network, which uses routing criteria as optimal target functions and optimizes routing on the Internet of Things. In order to solve various problems with the ant colony algorithm, their necessary behavior must be considered:
- They likely choose the path that has the most pheromones, or in other words, the one more ants have already crossed.
- On the other hand, the methods by which some insects select a leader for decision-making lead us to the formation of a computer algorithm that can play an essential role in the network efficiencies.
The primary intellectual basis of the ant algorithm is: “Among the obstacles and limitations in nature, ants always choose the most optimal way from different permutations to reach food.”
According to pheromones and ant’s traveling, where more ants have already traveled, this leads to finding the shortest way to solve the routing problem and thus reduce energy consumption in this paper. Artificial ants are used as optimizing elements to implement ant colonies. Of course, these elements are fundamentally different from real ants, which are: memory, artificial barriers, life in a discrete environment [31].
Let A is a nest, E is a food source, FC is a barrier. According to the obstacles, the ant goes only through F or C from A to E or E to A; the distance between the points is shown in Figure 1. For each time unit, there are 30 ants from A to B, and 30 ants from E to D. When the quality content hormone (information) for ease of calculation is extracted during the material immobility at the initial time, the paths DC, DF, BC, BF, which have no information, is placed in B and E and ants choose a random path. From a statistical point of view, we can say that the probability of choosing DF, BC, BF, and DC is the same. After the time unit, the amount of information on the BCD path is twice the BFD information’s content. T is the red moment; there will be 20 ants from B to C, ten ants from B and D to F. Over time, ants choose the BC path with more probability. Finally, the path selection, D, is made from the nest to the food source to find the shortest path [31].
In the following subsections, the functions and elements of the ant algorithm are included:

3.3. Pheromone Function

In the first equation, the amount of k pheromone of ant is calculated on the dij edge and in the second equation, the total pheromone on that edge is calculated by traveling the m ants [31]:
Δ τ i j k t , t + 1 = Q d i j
Δ τ i j t , t + 1 = k = 1 m Δ τ i j k t , t + 1

3.4. Heuristic (Visibility) Function

η i j = 1 d i j
Equation (3) is also called the visibility relationship, and the ratio shows the inverse of the distance of each edge, and for any constant amount of pheromone, the shorter the edge length, the higher its density:

3.5. Probability Function

τ i j a η i j b l ϵ C i k τ i l a η i j b
This function determines the probability of selecting the next city and is calculated for all cities where the ant k can be selected from city i. For the maximum value of this function, the traveling is followed from i to the selected city based on the value of this function.

3.6. Update Function

When the next city is selected, and before starting the next step to identify the next possible city on the route, the pheromone function is updated to evaporate some of the pheromone that occurs over time to prevent rapid convergence in the algorithm:
τ i j t + 1 = 1 ρ τ i j t + Δ τ i j
Equation (5) calculates the amount of pheromones at time t + 1. This relationship consists of two components: (1) this section contains the total amount of secreted pheromones in the distance (t, t + 1); (2) since some parts of the pheromone evaporate over time, so this part of the relationship expresses the pheromone value of time t with a coefficient (ρ-1). Therefore, the whole relation calculates the net amount of pheromones at time t + 1 [31].

3.7. Ant Algorithm Process

  • Determine the initial value for the pheromone function and the heuristic function;
  • Enroll the city of origin for each ant in the banned list;
  • Calculate the probability function to select the next city for each ant in each city;
  • Normalize the population of cities for selecting each ant to the banned list of that ant;
  • Add the selected city of each ant to the banned list of that ant;
  • Determine the best route;
  • Update and go to step 3.

4. The Proposed Method

The proposed method for routing in the IoT is performed to reduce energy consumption in two phases. The steps of the proposed algorithm are depicted in Algorithm 1. The first phase is related to clustering, and the second phase is related to steady state for routing. For optimizing energy consumption in sensors in the Internet of Things, the clustering method is an effective way to reduce the energy consumption of sensors and raise their lifespan and thus increase the overall lifespan of the network. Clustering is used to reduce energy consumption in the grid, and dynamic cycles are used to prevent re-clustering.
Algorithm 1 proposed algorithm steps.
1:Phase one
2:Sensors clustering (inputs: energy and distances)
3:Cluster heads ← higher-energy nodes
4:Clinging other nodes to cluster heads based on their distance
6:Phase two
7:Steady-state for routing
8:Send data to cluster head
9:Selecting best route neighbor nodes (output: best node for transferring)
Several higher-energy nodes will be selected for network clustering as cluster heads based on the amount of residual energy in the sensor nodes. The other available sensor nodes will be attached to each selected cluster head based on the selected cluster heads’ distance and then become cluster members. Eventually, clusters will be generated in the network. Accordingly, member nodes sense data from the environment and send it to their cluster head. The cluster heads are then created based on routing, and the distance to the central station sends the aggregated data received from the nodes of their cluster to another cluster head as the next step in routing or directly to the base station.
Hierarchical clustering on the Internet of Things can significantly affect global scalability, lifespan, energy efficiency, and latency. Hierarchical routing is an efficient way to consume less energy within a cluster, aggregation, and data combination to reduce the number of sent messages to the base station. A single-level network may overload the cluster heads with increased sensor density.
Such an overload may lead to the unsuccessful proceeding of events. In addition, a single-level architecture is not scalable for a broad set of nodes that cover a large area because sensors cannot usually communicate over long distances. Hierarchical clustering is significant, especially in applications that require scalability. Scalability in this area requires load balancing and the proper use of resources and applications that require effective data aggregation. Clustering is part of routing protocols.
Clustering has numerous other benefits with different goals, such as supporting network scalability and reducing energy consumption (through data aggregation). In this paper, through the application of the clustering method based on the ant colony algorithm and the mentioned advantages, we also reduce the collisions, which are discussed as the newest challenges in wireless networks. On the other hand, clustering can stabilize the network topology at the sensor level and reduce the overhead and overall maintenance costs of the topology; this means that the sensors are maintained only when they are connected to their cluster heads and are not affected when there are changes in the levels between the cluster heads. The cluster head can also implement optimized management strategies, which will improve network performance and increase the battery life of nodes, thereby increasing network life.
Clustering-based routing protocols are one of the most important ways to reduce power consumption in wireless sensor networks. This new clustering protocol, called the ant colony algorithm based on clustering algorithm, clusters the network nodes based on the criteria including the energy level, collision reduction, and distance from the cluster node to the destination and neighboring energy, and tries to balance the energy in the cluster better and ultimately increase network life and maintain network coverage. This paper aims to improve the traditional idea of clustering (spatial clustering) to achieve the primary goal of wireless sensor networks, i.e., to increase network life while maintaining network coverage and provide an integrated method for clustering based on energy location. We believe that in presenting the new algorithm, energy-based clustering could create clusters with the same energy level and distribute energy consumption across network nodes. The flowchart of Figure 2 shows the main steps of the proposed method for routing in the target network.
As can be seen in the diagram, the routing in the proposed method has three necessary steps as follows:
  • Clustering;
  • Optimization of cluster centers;
  • Data transfer.
In the continuation of this section, each of these steps will be explained.

4.1. Clustering

This step of the proposed method’s primary purpose was to divide the sensor network nodes into clusters. The sensor node clustering phase consists of two stages. In the first stage, based on validation indicators, the optimal number of clusters is determined. The clustering algorithm depends on several factors, such as the number of clusters and the distance between clusters. One of the most critical issues in clustering is selecting the right number of clusters.
In general, the number of clusters is appropriate when:
- The samples in a cluster are as similar as possible. A common criterion for determining data density is data variance.
- Samples of different clusters should be as separate as possible.
The above conditions are also expressed so that the clusters should have maximum compaction, and their separation should be as high as possible. Clustering can be defined as an unsupervised classification method in which there is no prior knowledge of categories. The minimum default is to provide a suitable solution for clustering in all available methods to determine the number of clusters. It contradicts the basic assumption of unsupervised classification in the clustering definition. Traditional clustering algorithms are suitable methods for clustering that require the number of clusters at the beginning of the algorithm. The purpose of cluster validation is to find clusters that best fit the data. In general, it can be said that three methods are used to measure and calculate the separation of clusters, which are:
  • The distance between the nearest data from two clusters;
  • The distance between the farthest data from two clusters;
  • The distance between the centers of the clusters.
The primary purpose of sensor clustering is to divide the sensors into several different clusters based on their similarity. Therefore, each cluster’s sensors are more similar to each other, and the features in different clusters are less similar to each other. Most of the proposed methods for sensor clustering have drawbacks.
Among such shortcomings, one can mention the following cases:
- In most clustering methods, the number of clusters must be determined before performing the clustering algorithm. In other words, in most of these methods, parameter 𝑘, which specifies the number of clusters, must be specified by the user. In general, it is difficult to determine the number of clusters for the initial characteristics, and only the number of optimal clusters can be determined by trial and error.
- Data distribution in a cluster is one of the essential criteria in clustering, which is not considered in most previously proposed methods for clustering sensors. The degree of scattering of features in a cluster can significantly enhance the performance of the clustering algorithm.
- In most existing methods for clustering sensors, all features are considered the same during the clustering process and will have an equal effect on clustering. While in some cases, it is better to have a more significant impact on the clustering process for many features that are more similar to each other.
In this paper, to address these problems, a specific algorithm called the ant colony optimization algorithm was used to cluster sensor nodes.

4.2. Optimization of Cluster Centers

This step’s primary purpose was to select a cluster center from each cluster based on a set of defined criteria. The following combination of four criteria is used to select cluster centers:
  • The total energy of selected cluster centers;
  • The total distance of the nodes of that cluster from the center of the cluster;
  • No central node collision inside the cluster;
  • The total distance of the selected cluster centers from each other.
As the first criterion is increasing, and the other three criteria are lowered, the cluster centers are better positioned. As a result, the proposed method is a multi-objective algorithm that needs to be optimized. With the multi-objective nature of the fit function problem for selecting cluster heads, the proposed method is defined as follows:
- f 1:
Total energy of selected cluster centers;
- f 2:
The total distance of the nodes of that cluster from the center of the cluster;
- f 3:
No collision of the center node of the cluster with the nodes inside that cluster;
- f 4:
The total distance of the selected cluster centers from each other.
The ultimate fitness function is defined as Equation (6):
F i t n e s s = α f 1 + β 1 f 2 + γ f 3 + λ 1 f 4
Here γ, β, α are four fixed parameters that determine the impact of these four different criteria. The goal of optimization is to maximize the above objective function. Since the second and fourth criteria must be minimized, they are placed inversely in the fitness function. Using the ant colony optimization algorithm is to select a cluster head node in each cluster based on different parameters.
When clustering is performed, the distance between all nodes is measured with other cluster nodes, and the node with the least distance is selected as the cluster node. Nevertheless, the most important thing is not to collide in routing, and thus, the cluster head node may be changed and not measured only by distance and energy. Therefore, at each routing step, the amount of residual energy of the cluster head node will be compared to a predefined threshold, and if the energy level is less than this amount, another node in the same cluster will be selected with more residual energy than the cluster head and replaces the previous cluster head and acts as a member node. If there is no node with more residual energy than the cluster head in a cluster due to non-collision, re-clustering will be applied to the grid, which includes high energy overhead and reduces the grid’s life.

4.3. Data Transfer

When the clusters are formed, and the cluster heads of each cluster are selected, normal nodes send the sensed data to the relevant clusters. The cluster heads send the data packet to the base station after applying the community functions or data combination. In order to calculate the energy, first, the energy of each node is measured, and then the consumed energy to transmit k data bits to the distance d is calculated as equations (7) and (8):
E T x k , d = E T x k + E T x   a m p k , d
E T x k , d = k E e l e c k , d + k ε f r i s s d 2           i f         d < d c r o s s o v e r   k E e l e c k , d + k ε two ray amp d 4                               e l s e
Energy consumption to receive k data bits is calculated as Equation (9):
E R x k , d = E R x _ e l e c k = k E e l e c
In the above relationships, Eelec is the electronic transmit/receive energy, k, message size in terms of number of bits, d distance between receiver and transmitter, Etx_amp, amplification energy, ε f r i s s amplification factor, dcrossover, threshold distance whose transmit factor changes in it.
The following conditions are then considered for routing:
  • The most optimal path is selected as the shortest path to transmit a message between two nodes;
  • Routing is conducted in a progressive way to reach the goal;
  • The distance of the nodes is measured to select the path with the source node;
  • The distance of the desired nodes to the destination is also measured.
With the above conditions applied, a neighbor node condition is selected with all the above conditions. For optimization with the ant colony algorithm, these paths are entered in this algorithm. Then, a matrix is generally formed for each path. When this matrix is formed, the most optimal path is selected using the ant colony algorithm. For the nodes’ energy to be close together and the network not to put too much pressure on individual nodes, all nodes are used for routing during execution, and the energy variance is low.

5. Simulation Results

This section states the simulation process, expresses the results, and compares the proposed method with different methods. It should be noted that the hypothetical environment for simulating is a square environment with 200 × 200 dimensions, and the cycles are repeated 50 times. In order to simulate the proposed method, the MATLAB software environment was used. When different cycles of the algorithm are repeated, and successive changes have occurred in multiple cluster heads, and routing is performed for this cluster change, and the following figure shows the multiple traveled paths to transfer information after 50 cycles. The traveled routes for 50 rounds of simulation repetition can be shown in Figure 3.
It is seen that routing is performed between almost all nodes in different cycles in order to distribute energy consumption throughout the network. Figure 4 shows that after about 25 cycles of 50 cycles, the average of 28% of the initial energy is consumed in the network nodes. It indicates the high energy consumption of the sensor network in its initial stages. Figure 5 also shows the average residual energy in the nodes after 50 cycles of the algorithm. In these 50 repetition cycles, about 49% of energy is consumed, which indicates the optimality of the proposed method in increasing the network lifespan.
Figure 6 shows the mean energy variance in 50 times of simulation. This figure shows the low energy variance due to the close energy of the nodes in the network, as the goal is to use all nodes in routing.
The proposed method is compared with three different types of algorithms. The results of these three algorithms are shown with the proposed method. Figure 7 shows the residual energy of different algorithms with the comparison of the proposed method. For better comparison, each method is simulated and presented in 50 repetitions. Each method that preserves the energy is more effective and better. Hence, the lower slope of the lines demonstrates the higher performance of the method. This result shows that the proposed method was successful to retain the energy more after several cycles. The EEUC was the weakest method in energy consumption and the energy reached 0.030 from 0.107. This means that through the EEUC method, more than 71.96% of the energy is consumed after 50 cycles. Additionally, the four algorithms are compared in a column in Figure 8. All four algorithms were simulated with specific energies in 50 rounds, and the reduction percentage of initial energy and residual energy is shown. This figure shows that the proposed method with an ant colony algorithm has a more optimal percentage than the other three algorithms.
For further comparison, the number of dead nodes in 50 simulation cycles is compared for 100 nodes. Figure 9 and Figure 10 show a comparison of the number of dead nodes and the percentage of dead nodes, respectively. According to the results, the proposed method with an ant colony algorithm shows better results than other methods. In the initial iterations, due to the ant colony algorithm’s nature, the recovery percentage is slightly slower than subsequent iterations. Table 1 shows the results of the first time that one of the sensors in a node dies for different methods. It can be seen that the first node lasts during 21 cycles and after that the trends of defection are comparatively slow using the proposed method. Nonetheless, the first node dies very soon and in less than four cycles for other methods.

6. Conclusions

In this paper, we tried to improve the performance of energy savings in the Internet of Things based on the evolutionary algorithms. In order to achieve this purpose; the clustering method was applied to increase network life and control sensor nodes’ energy consumption in the Internet of Things platform. The ant colony optimization algorithm was used to optimize the routing method, and acceptable results were observed compared to other algorithms. Using the proposed method, the consumed energy for 25 repetitions was about 28% of its original energy, and the mean variance for energy indicated that the energy of the nodes is close to that of others due to the use of all nodes for simulation. These achievements demonstrate that the proposed method can simultaneously decrease the consumption of energy and increase the lifetime of the nodes. Moreover, according to the comparison with other algorithms, the proposed method is about 50% more advanced than the known algorithms and saves more energy and reduces the number of dead nodes by about 81%. One of the shortages of this method is the lack of an optimization approach in the clustering stage. It is suggested to use the ant colony algorithm or other suitable approaches for the clustering stage as one of the possible future research avenues to continue this work.

Author Contributions

Conceptualization, B.S., and Y.Z.; methodology, B.S., and Y.Z.; software, B.S., and Y.Z., validation, B.S., and Y.Z., formal analysis, B.S., and Y.Z.; investigation, B.S., and Y.Z.; resources, B.S., and Y.Z., data curation, B.S., and Y.Z.; writing—original draft preparation, B.S., and Y.Z.; writing—review and editing, B.S., and Y.Z.; visualization, B.S., and Y.Z.; supervision, B.S., and Y.Z.; project administration, B.S., and Y.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Beijing Information Science & Technology University, grant number 2020KYNH212.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Acknowledgments

This study was supported by the Scientific research level improvement project to promote the colleges connotation development of Beijing Information Science & Technology University in 2020 (NO.2020KYNH212).

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationship that could have appeared to influence the work reported in this paper.

References

  1. Thangaramya, K.; Kulothungan, K.; Logambigai, R.; Selvi, M.; Ganapathy, S.; Kannan, A. Energy aware cluster and neuro-fuzzy based routing algorithm for wireless sensor networks in IoT. Comput. Netw. 2019, 151, 211–223. [Google Scholar] [CrossRef]
  2. Magubane, Z.; Tarwireyi, P.; Adigun, M.O. Evaluating the Energy Efficiency of IoT Routing Protocols. In Proceedings of the 2019 International Multidisciplinary Information Technology and Engineering Conference (IMITEC), Vanderbijlpark, South Africa, 21–22 November 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–7. [Google Scholar]
  3. Maryam, S.; Hamid Reza, N. A Decentralized Energy Efficient Hierarchical Cluster based Routing algorithm for Wireless Sensor Networks. Int. J. Electron. Commun. 2015, 69, 790–799. [Google Scholar]
  4. Kharkongor, C.; Chithralekha, T.; Varghese, R. Trust and Energy-Efficient Routing for Internet of Things—Energy EvaluationModel. In Proceedings of the 5th International Conference on Frontiers in Intelligent Computing: Theory and Applications, March 2017; Volume 515, pp. 585–597. [Google Scholar]
  5. Roselin, J.; Latha, P.; Benitta, S. Maximizing the Wireless Sensor Networks Lifetime through Energy Efficient Connected Coverage. Ad Hoc Netw. 2017, 62, 1–10. [Google Scholar] [CrossRef]
  6. Iwendi, C.; Maddikunta, P.K.R.; Gadekallu, T.R.; Lakshmanna, K.; Bashir, A.K.; Piran, J. A metaheuristic optimization approach for energy efficiency in the IoT networks. Software Pract. Exp. 2020. [Google Scholar] [CrossRef]
  7. Sinde, R.; Begum, F.; Njau, K.; Kaijage, S. Refining Network Lifetime of Wireless Sensor Network Using Energy-Efficient Clustering and DRL-Based Sleep Scheduling. Sensors 2020, 20, 1540. [Google Scholar] [CrossRef] [Green Version]
  8. Balasubramanya, N.M.; Lampe, L.; Vos, G.; Bennett, S. DRX with Quick Sleeping: A Novel Mechanism for Energy Efficient IoT using LTE/LTE-A. IEEE Internet Things J. 2016, 3, 398–407. [Google Scholar] [CrossRef]
  9. Neamatollahi, P.; Naghibzadeh, M.; Abrishami, S. Distributed Clustering-Task Scheduling for Wireless Sensor Networks Using Dynamic Hyper Round Policy. IEEE Trans. Mob. Comput. 2017, 17, 334–347. [Google Scholar] [CrossRef]
  10. Kannan, G.N.; Raja, T.S.R. Energy efficient distributed cluster head scheduling scheme for two tiered wireless sensor network. Egypt. Inform. J. 2015, 16, 167–174. [Google Scholar] [CrossRef] [Green Version]
  11. Jin, S.; Zhou, H.; Wu, A.S. Sensor Network Optimization Using a Genetic Algorithm. In Proceedings of the 7th World Multiconference on Systemics, Cybernetics and Informatics, Orlando, FL, USA, 27–30 July 2003. [Google Scholar]
  12. Ye, M.; Li, C.F.; Chen, G.H.; Wu, J. EECS: An Energy-Efficient Clustering Scheme in Wireless Sensor Networks. In Proceedings of the IEEE International Performance Computing and Communication Conference, Phoenix, AZ, USA, 7–9 April 2005; pp. 535–540. [Google Scholar]
  13. Attea, B.A.; Khalil, E.A. A New Evolutionary-based Routing Protocol for Clustered Heterogeneous Wireless Sensor Networks. Appl. Soft Comput. J. 2011, 5, 933–938. [Google Scholar] [CrossRef]
  14. Lindsey, S.; Raghavendra, C.S. PEGASIS: Power-Effcient Gathering in Sensor Information Systems. In Proceedings of the IEEE Aerospace Conference, Big Sky, MT, USA, 9–16 March 2002; pp. 1125–1130. [Google Scholar]
  15. Razaque, A.; Abdulgader, M.; Joshi, C.; Amsaad, F.; Chauhan, M. P-LEACH: Energy-Efficient Routing Protocol for Wireless Sensor Networks. In Proceedings of the IEEE Long Island Systems, Applications and Technology Conference, Farmingdale, NY, USA, 29 April 2016; pp. 1–5. [Google Scholar]
  16. Vahdat, D.; Becker, A. Epidemic Routing for Partially Connected Ad Hoc Networks; University of Kansas: Lawrence, KS, USA, 2003. [Google Scholar]
  17. Chemodanov, D.; Esposito, F.; Sukhov, A.; Calyam, P.; Trinh, H. AGRA: AI-augmented geographic routing approach for IoT-based incident-supporting applications. Future Gener. Comput. Syst. 2017, 92, 1051–1065. [Google Scholar] [CrossRef]
  18. Jin, Y.; Gormus, S.; Kulkarni, P.; Sooriyabandara, M. Content centric routing in IoT networks and its integration in RPL. Comput. Commun. 2016, 89, 87–104. [Google Scholar] [CrossRef]
  19. Chelloug, S.A. Energy-efficient content-based routing in internet of things. J. Comput. Commun. 2015, 3, 9. [Google Scholar] [CrossRef] [Green Version]
  20. Venckauskas, A.; Stuikys, V.; Damasevicius, R.; Jusas, N. Modelling of Internet of Things units for estimating security-energy-performance relationships for quality of service and environment awareness. Secur. Commun. Netw. 2016, 9, 3324–3339. [Google Scholar] [CrossRef]
  21. Wang, D.; Zhong, D.; Souri, A. Energy management solutions in the Internet of Things applications: Technical analysis and new research directions. Cogn. Syst. Res. 2021, 67, 33–49. [Google Scholar] [CrossRef]
  22. Wang, X. Resource-aware clustering based routing protocol in the Internet of Things. In Proceedings of the 4th International Conference on Awareness Science and Technology, Seoul, Korea, 21–24 August 2012; IEEE: Piscataway, NJ, USA; pp. 20–25. [Google Scholar]
  23. Park, S.H.; Cho, S.; Lee, J.R. Energy-efficient probabilistic routing algorithm for internet of things. J. Appl. Math. 2014, 2014, 1–7. [Google Scholar] [CrossRef] [Green Version]
  24. Spyropoulos, T.; Psounis, K.; Raghavendra, C.S. Efficient mobility-assisted routing for heterogeneous and correlated mobility. In Proceedings of the Fifth Annual IEEE International Conference on Pervasive Computing and Communications Workshops, White Plains, NY, USA, 19–23 March 2007. [Google Scholar]
  25. Yousif, Y.K.; Badlishah, R.; Yaakob, N.; Amir, A. An Energy Efficient and Load Balancing Clustering Scheme for Wireless Sensor Network (WSN) Based on Distributed Approach. J. Phys. Conf. Ser. 2018, 1019, 012007. [Google Scholar] [CrossRef]
  26. Bouyer, A.; Hatamlou, A.; Masdari, M. A new approach for decreasing energy in wireless sensor networks with hybrid LEACH protocol and fuzzy C-means algorithm. Int. J. Commun. Netw. Distrib. Syst. 2015, 14, 400–412. [Google Scholar] [CrossRef]
  27. Leu, J.S.; Chiang, T.H.; Yu, M.C.; Su, K.W. Energy efficient clustering scheme for prolonging the lifetime of wireless sensor network with isolated nodes. IEEE Commun. Lett. 2015, 19, 259–262. [Google Scholar] [CrossRef]
  28. Azharuddin, M.; Kuila, P.; Jana, P.K. Energy efficient fault tolerant clustering and routing algorithms for wireless sensor networks. Comput. Electr. Eng. 2015, 41, 177–190. [Google Scholar] [CrossRef]
  29. Said, O. Analysis, design and simulation of Internet of Things routing algorithm based on ant colony optimization. Int. J. Commun. Syst. 2016, 30, e3174. [Google Scholar] [CrossRef]
  30. Kumar, S.; Kumar-Solanki, V.; Choudhary, S.K.; Selamat, A.; Gonzalez-Crespo, R. Comparative Study on Ant Colony Optimization (ACO) and K-Means Clustering Approaches for Jobs Scheduling and Energy Optimization Model in Internet of Things (IoT). Int. J. Interact. Multimed. Artif. Intell. 2020, 6, 107. [Google Scholar] [CrossRef]
  31. Ludwig, S.A. Applying ppaper swarm optimization to quality-of-service-driven web service composition. In Proceedings of the 2012 IEEE 26th International Conference on Advanced Information Networking and Applications, Fukuoka-shi, Japan, 26–29 March 2012; IEEE: Piscataway, NJ, USA; pp. 613–620. [Google Scholar]
Figure 1. The manner in which ants find the shortest path [31].
Figure 1. The manner in which ants find the shortest path [31].
Energies 14 01709 g001
Figure 2. Flowchart of proposed routing algorithm using Internet of Things (IoT).
Figure 2. Flowchart of proposed routing algorithm using Internet of Things (IoT).
Energies 14 01709 g002
Figure 3. The traveled routes for 50 rounds of simulation repetition.
Figure 3. The traveled routes for 50 rounds of simulation repetition.
Energies 14 01709 g003
Figure 4. Residual energy after 25 repetitions.
Figure 4. Residual energy after 25 repetitions.
Energies 14 01709 g004
Figure 5. Residual energy after 50 repetitions.
Figure 5. Residual energy after 50 repetitions.
Energies 14 01709 g005
Figure 6. Mean energy variance in 50 repetition cycles of the simulation.
Figure 6. Mean energy variance in 50 repetition cycles of the simulation.
Energies 14 01709 g006
Figure 7. Comparison between the residual energy of different algorithms with the proposed method.
Figure 7. Comparison between the residual energy of different algorithms with the proposed method.
Energies 14 01709 g007
Figure 8. Comparison of the percentage of residual energy reduction in 50 repetition cycles for different algorithms.
Figure 8. Comparison of the percentage of residual energy reduction in 50 repetition cycles for different algorithms.
Energies 14 01709 g008
Figure 9. The comparison between the number of dead nodes for the proposed method compared with other methods.
Figure 9. The comparison between the number of dead nodes for the proposed method compared with other methods.
Energies 14 01709 g009
Figure 10. Comparison between the number of dead nodes in different algorithms.
Figure 10. Comparison between the number of dead nodes in different algorithms.
Energies 14 01709 g010
Table 1. Numbers of cycles which last until that first node die.
Table 1. Numbers of cycles which last until that first node die.
MethodProposedEAMMHLEACH
No. of cycles2132
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Shi, B.; Zhang, Y. A Novel Algorithm to Optimize the Energy Consumption Using IoT and Based on Ant Colony Algorithm. Energies 2021, 14, 1709. https://doi.org/10.3390/en14061709

AMA Style

Shi B, Zhang Y. A Novel Algorithm to Optimize the Energy Consumption Using IoT and Based on Ant Colony Algorithm. Energies. 2021; 14(6):1709. https://doi.org/10.3390/en14061709

Chicago/Turabian Style

Shi, Baohui, and Yuexia Zhang. 2021. "A Novel Algorithm to Optimize the Energy Consumption Using IoT and Based on Ant Colony Algorithm" Energies 14, no. 6: 1709. https://doi.org/10.3390/en14061709

APA Style

Shi, B., & Zhang, Y. (2021). A Novel Algorithm to Optimize the Energy Consumption Using IoT and Based on Ant Colony Algorithm. Energies, 14(6), 1709. https://doi.org/10.3390/en14061709

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop