Distance Aware Gateway Placement Optimization for Machine-to-Machine (M2M) Communication in IoT Network

In the research field, network performance for different smart applications plays an important role in the IoT network. Several factors, such as packet delay, network throughput, energy consumption, heterogeneity, proper gateway placement and load balancing, have a greater impact on network performance. In this article, two factors, such as optimal gateway placement and energy consumption, are investigated in order to improve the performance of the IoT network. Various methods are used to find the lo-cation of the Coordinating Devices (CDs) and to place constraint gateways in such a way that all CDs within the network should be covered by at least one gateway in order to allow the dissemination of data within the net-work. All of these CDs in the wireless network send their data to their near-by gateway based on Euclidean distance optimization. Euclidean distance performance is better than linear data transmission. During data transmission, nodes are unable to transmit data due to obstacles encountered in the path to the destination which result in a minimal energy efficiency improvement. Our proposed system solves the issue of gateway location optimization based on different distancebased approaches called Euclidean Distance (ED) and Manhattan Distance (MD) used in the wireless network to achieve the objective of reducing energy consumption.


Introduction
In the recent IoT technology world, the number of connected devices will be about 50 billion by 2020 [5]. Devices can interface over a network using a range of network protocols such as Wi-Fi (802.11), ZigBee (802. 16) or Bluetooth (802. 15) and are integrated with compatible sensors and actuators. The IoT is considered to be one of the third-famous waves of state-of-the-art in-formation technologies after the mobile communication network and the Internet, which have incorporated capabilities of comprehensive meaning and data measurement, network interoperability and smart intelligence. These new smart IoT technologies can successfully incorporate and monitor smart de-vices, utilities and services, as well as merge the physical world into the digital world. IoT applications areas are disaster management, smart urban areas, infrastructure building, smart agriculture, public de-fence, intelligent environment safety, smart industry, new urbanization and smart business services [2]. This is possible due to advancement of IoT technology in the recent world.
The term of IoT was first suggested in 1999 by MIT Auto-ID, which explored the detection of two key facets of networking, entity localization and state recognition, applied to WSNs and RFID (Radio frequency identification) technologies [3]. The next innovation in 2009 of "Smart-Planet" added embedded sensors that can be found in many applications, such as waste management, railway, city malls, traffic areas, power grids, buildings and smart processing technologies, to serve as smart objects for all of these embedded objects. IBM [5] presents the idea of embedding sensors in physical objects. The IoT framework will process state-of-the-art, supervised and controlled decision-making and collaboration between any of these items independently without human interference with support for mobile and wireless connectivity, machine-to-machine communication, advanced networking and the latest cloud computing technology.
It is often known to be Internet access to physical devices and everyday objects. IoT consists of integrated systems, wireless networks, wireless sensor networks (WSNs), various control systems, automation, and several other areas. WSN consists of hundreds or thousands of sensor nodes used to track and gather data as the environment changes. This changes in the environment are recorded and processed as data using sensors and cameras. These aggregated data are to be sent to the Coordinating Devices (CDs) such as the sink, base station, RFID reader or access point. For the successful execution of the application and the provision of the intended service, obtained and processed data should be transmitted from any of these CDs to a server or cloud over the Internet. In the wireless IoT network, data from the source node to the destination node is often transmitted via different intermediate heterogeneous nodes (coordinating devices and intermediate gateways) as multi-hop heterogeneous networks [9]. Multi-hop wireless networks composed of nodes such as routers, coordinating devices, gateways and sensor networks. These intermediate nodes are either mobile or stationary. They can access the Internet via a gateway to the Internet. All traffic is heading into the gateway. As the number of Internet gateways is smaller, an adequate range of gateways is re-quired to improve network efficiency in the sense of network throughput. The location of these gateways is also essential for pre-serving the efficiency of Main contribution of this article is first time introduction of a position-based approach as a solution to the almost optimum location of gateway problems to achieve energy efficiency. The proposed optimisation strategy is accomplished by considering various parameters, such as the reduction of the number of hops comprising the route be-tween the normal node and the coordinating device or the coordinating device and the gateway (considered the closest gateway in terms of hops) based on the distance method. Other requirements are to minimize the number of paths that share the same connection and also to minimize the number of gateways.
In this paper, section 2 elaborates about motivational work in the field of IoT network in M2M communication for gateway placement optimization issues, section 3 focuses on optimal gateway selection problem to achieve energy efficiency in IoT network. Proposed system is discussed in section 4 to highlight the main contribution of our paper. Evaluation of the proposed algorithm is measured in terms of important network parameters such as throughput, latency, average load, transmission rate and energy consumption are discussed in section 5.

Related Work
Most researchers have suggested various Gateway Positioning algorithms for different networks such as WMN, LPWAN, MANET and VANET. Many approaches are used to enforce gateway placement, such as PSObased methods [23], clustering methods [8,15,32], greedy placement methods [1,13,23] and load-balanced approaches [30,31,33]. Clustering approaches for gateway positioning are used in existing networks to boost network efficiency. Multiple clustering heuristics correlated with gateway positioning between cluster heads to gateways by identifying clusters as a network partition containing cluster heads and gateways. The efficient strategy used in wireless net-works is to minimize energy consumption by considering network coverage clustering. As gateways are deployed across diverse network types, the expected propagation range of cluster heads varies greatly. The transmission range of cluster heads can vary across network types resulting in different network deployment areas [7]. This is the key explanation for the optimum location of gateways with two problems such as distance and traffic. In order to maximize the life of the net-work, minimizing energy usage is key to this scenario. Recent studies have shown that communication energy plays an important role than computing, storage and sensing requirements.
In order to form a broad intelligence network as an information col-lection system, IoT requires a wide variety of sensing devices and systems such as RFID reading devices, barcodes and two-dimensional code devices, sensor networks, and other short-range wireless ad hoc networks and global positioning systems by considering the ma-chine-machine communication model (M2M) by combining the different access networks including internet [5].
The [7,10,13,34] concentrated on placement of gateways with QoS constraints in WMNs to accomplish the goal of minimizing the costs of placement of gateways. In order to incorporate the proposed model, the current definition of a limited dominant set (LDS) in the graph is discussed in this paper.
Much research work cantered on the strategic location of a smaller number of gateways to reduce energy usage and to optimize through-put latency. Deployment of gateways that are called upgraded nodes with more power backup and transmission range is more than most nodes in the network. Past studies [9] concentrated on traffic features and the static existence of the wireless network in the wireless mesh network, but variability was not regarded in those situations as the bulk of traffic is between cluster heads and gateways. In these experiments, a centralized method was built on the basis of a heuristic principle, considering Manhattan size, Euclidean distance, number of hops and traffic load on each cluster head in a wireless mesh network. For Gateway Placement, a variety of algorithms are proposed for various approaches, such as position-based approaches [11,14], load-balanced approaches [30,31,33] and interference-based approaches [21]. Optimal alignment of gateways based on the Euclidean distance is assigned to position-based approaches. Position-based heuristics are introduced in a variety of algorithms. It depends on the amount of in-formation that is sent from routers to gateways. For this case, two major decision considerations, such as the number of hops or the geographical size, are usually based on the Euclidean distance. These considerations may or may not impact the deployment of gateway sites, depending on the capacities of the network devices. In the standard method, the number of hops is assumed to be a routing parameter due to ease of computation. Many current routing algorithms efficiently measure the number of hops between source and destination. In the event of hardware failure or traffic overload, network efficiency can be reduced by congestion in the network direction.
In Euclidean-based approaches [11], connecting the gateway to the cluster header set depends on the location. In order to find its optimum location, this scenario localization algorithm is to be applied. The drawback of this strategy is that gateways cannot be evenly distributed and, depending on the decision, the number of hopes from cluster to gateway can lead to a longer route. In several of the tests, several scholars researched balanced load heuristics. On this approach [24], the optimum position of the gateway parameters used is load on the cluster header and can also be used to determine the path from the cluster header to the gateway and the gateway to the gateway. Load referred to in this method is the volume of traffic sent by routers to gateways or routers assisted by gateways.
In this section, we addressed a variety of approaches to optimum gateway positioning, based on various factors, such as distance and load balancing. For Gateway Placement Approaches, the routers or cluster head to Gateways scenario for Gateway Placement Decision. The key conclusion is that distance is known to be a significant problem of most research results. Many of the methods used Euclidean distance as a distance metric or location parameter. In the pro-posed algorithm, the optimum location of the gateway-based approach with load on each cluster head is taken into account. We based on both Euclidean distance and Manhattan distance as distance parameters for the measurement of distance for routers to gateways. In the next segment, we explored the ideal position-based approach to gateway positioning along with the outcome to illustrate the performance of the approach. As per discussion in this section, it is concluded that large volume of data is fed into the data systems by various sensors, and devices in recent IoT network scenario. This ample amount of data needs to processed and transmitted over IoT net-work. To handle complex, diverse and dynamic data from various sources is big challenge in current scenario. Traditional approaches are used to conserve energy will not be able to fulfill data transmission through gateways. To manage and process this complex and heterogeneous data, gateways should be placed at proper locations with mini-mum count is challenging task. Our proposed system is used as a solution to this problem is discussed in next sections.

Optimal Gateway Selection Problem
The Internet Gateway Placement Problem is described as finding ideal locations for setting up gateways such that internet access is preserved by covering all CDs within the network. To identify suitable positions for gateways, a distance-based approach is used. If the distance from a node to a CD or a CD to a gateway or a gateway to a gateway is larger, more energy is expended and vice versa. In this article, distance is known to be the correct placement of the gateway, and energy usage and optimization strategies are also minimized.
Problem is defined as the design and implementation of a system to improve energy efficiency by solving the problem of gateway placement. Number of Coordinating Devices (CDs) s is distributed uniformly at random with support for various technologies, where t < s. Group of CDs are known to be S where |S|=s and Set of Technologies, H where |H|=t Each CD, c such as c S and have a transmission range rd (radius). Assumption is that all communication between CDs can only be made possible by one standard technology and should be linked to at least one gateway.
Two intermediate gateways are connected if they are within each other's range and should accept at least one standard wireless technology. On the wireless network, CDs transmit data to the closest intermediate gateway.
Every intermediate gateway forwards this data to the internet gateway within its range. Each internet gateway has a direct link to the Internet over a wired connection. The data received from the intermediate gateways shall be sent to the application servers. Set of location of the candidate, L. Each candidate position is referred to as b € L and the binary variable Bc is allocated. Binary variable is to be 1 to mean that the gateway is to be set else it is 0. It is presumed that any CD should be protected by at least one gateway for the efficient transmission of data.
The key objective of the Gateway Positioning Problem is to find the optimal locations for the placement of the Gateway with the restriction that all CDs are enclosed and the Internet Gateway is linked to the Internet.

Proposed algorithm
There are two stages to be undertaken to solve the gateway placement problem. You must pick the candidate position in the first level. In the second stage, the optimal location of the candidate is chosen by applying the algorithm. In our proposed model, a candidate position selection process is used that is based on a network intersection point. Algorithm 1 to find a point of intersection is given as, Algorithm 1: Selection of candidate location procedure CD_Select(C) N ← ф for all dk ∈ C do for all dj≠k ∈C do n ← Point_Intersection (dk, dj ) N ← N U {c} end for end for return N end procedure In this intersection function, the intersection point of the coordinating devices shall be determined using the Euclidean distance and the Manhattan distance between their positions and their transmission range as follows,

Position Based Approach with Euclidean Distance
In the Euclidean Distance position-based method, distance is measured as a straight distance formula between two points. = √ ( − ) 2 + ( − ) 2 (1) The equation (1) is used to measure the distance between the CD and the gateway or the gateway, which takes into account x and y-coordinates of matching nodes. Euclidean distance to perform well for compact or isolated clusters in wireless networking [13]. The Euclidean distance constraint is that if no attribute values in two data vectors are normal, then the distance between these two vectors may be smaller than a pair of other data vectors with the same attribute values [15]. Largest-scale feature of this distance has the possibility to dominate others is another problem in case pf Euclidean distance which is considered to be a family of the Minkowski metric. Thus, in our paper, Euclidean Distance Measure is used as a distancing-based optimization technique along with Manhattan Distance, as described in the next section

Position Based Approach with Manhattan Distance
This paper uses a distance-based optimization approach to the proper positioning of gateways. Manhattan Distance (MD) is also used as a distance parameter in this Article. The proposed method is updated and contrasted with the current work [13,30,33]. This modification improved the overall efficiency of the network. As discussed, earlier ED limits during data transmission that network efficiency would be reduced due to barriers such as buildings, tall towers, etc. Manhattan distance is also referred to as the city block distance which is the sum of the absolute difference between the respective coordinates of the node equation of the calculation in this approach is given in equation (2), For p as the order of Minkowski distance, the special case of Minkowski distance at p = 1 is referred to as Manhattan distance. MD is sensitive to outsiders. The expense of the Euclidean distance is high as the number of squares and the root square is used. But the measure is precise. In this article, updated distance measurement techniques for computer-optimized candidate locations are proposed. Our main objective is to save resources and increase the efficiency of the wireless network.
Optimal location of gateways or intermediate gateways is determined in the second step. In order to find an optimum position, the coordinator count, i.e., the total number of CDs within the transmission range, is considered. The main purpose of the proposed model is to provide gateway access to all small networks with a minimum number of gateways inside the network in order to prevent under-utilities and improve network performance. To accomplish this, the maximum coordinator count must be chosen for each iteration. The iteration process will continue until all CDs have been covered.
Finally, the location of the internet gateways that send data to the server is to be computed. Instead of putting a new internet gateway in each cluster, the location of the IoT gateway is finalized along with load balancing and link capacity. The Intermediate Gateway with the highest throughput value is known to be load balancing as an internet gateway that transmits maximum data to the internet.
In the second stage of the proposed algorithm, the position of the gateway is selected by applying Algorithm 2,

Algorithm 2: Gateway Location Selection
Continue until all the CDs are covered. It returns an optimum set of unique gateway locations that fulfil network coverage constraints.
procedure Gateway_select (M) G ← ф CDs_uncovered ← m While CDs_uncovered ≥ 0 do Select ci ∈ C with max(network_countc) G ← G υ {ci} Mc' = Mc' -Mc ∀ c' ≠ c and c' ∈ C CDs_uncovered ← CDs_uncovered -|Mc| end while return G end procedure The proposed model prevents the placement of new IoT gateways within each cluster within the IoT network. The location of the IoT gateway is finalized on the basis of two main parameters, the load factor (lft) and the wireless technology assisted by the connection (lWt) are considered. In each cluster, the Internet Gateway is chosen with the highest throughput Tg value of the file, to ensure that the maximum data is transmitted to the Internet. Throughput is calculated based on load factor and wireless technology is shown in equation (3),

Results and discussion
The evaluation of the proposed algorithm is to be completed on the basis of some significant network parameters such as throughput, latency, average load, transmission rate and energy consumption. On the basis of these perforation metrics, the current existing algorithm to find the optimal position of the gateway, such as kmeans, PSO-based, agglomerative and mean change, could be contrasted with the proposed algorithm. In order to assess the efficiency of the proposed algorithm, the most common and important performance metrics considered are latency or average delay, throughput and energy consumption.
The efficiency and quality of the proposed method is compared with the current clustering approach and the PSO-based approach is further elaborated in this section.
The evaluation was carried out using the Java simulator. In order to evaluate the current algorithm, a Smart City scenario has been implemented with heterogeneous protocols and standards. We used 802.11 (Wi-Fi), ZigBee, Bluetooth and RFID for simulations on the IoT network. As stated earlier, these technologies are randomly distributed across CDs across the current network. The Internet gateways are connected directly to the Internet through the Internet Protocol. Setup of network simulation as shown in Figure 1. Firstly, a heterogeneous network is generated dynamically depending on the number of nodes. The cluster header is chosen by applying algorithms. After selecting the location of the cluster header, different algorithms are used to optimize the selection of the gateway. In order to minimize energy consumption during data transmission from source to destination, the network intersection candidate position algorithm is used to quantify distances between Euclidean and Manhattan. In our proposed algorithm, we considered Euclidean and Manhattan distance to determine the optimum position of gateways within the network.
Current algorithms such as k-means, agglomerative and mean shift clustering strategies are tested to compare the performance of the proposed method. Based on the simulation results, it has been shown that the energy consumption in the Manhattan distance method of the proposed system is substantially reduced compared to the other current clustering mechanisms used for gateway placement.

Figure 1. Selection of Optimum Gateway location
In the k-mean clustering scheme, more energy is expended as a result of overhead communication for the cluster head setup process. In addition, k-mean and agglomerative approaches consume relatively large quantities of energy in the cluster head selection process. In the proposed method, it is revealed that if more clusters are formed within the network, energy will be saved because the transmission gap between cluster heads is reduced. In the Novel IoT Gateway Select algorithm, it is observed that minimum energy is consumed because, at a significant stage, the energy of the cluster head can be managed by the gateway by distributing transmission tasks other than that of the K-means and the agglomerative algorithm, as the energy used by the cluster heads is also to be included. Algorithm 1 selects the position of the cluster head or candidate, C, by measuring the intersection points for the location of the gateway. For this intersection point, the transmission range of cluster heads or access points shall be considered. Gateways are positioned using an intersection algorithm as shown in Figure 2.

Figure 2. Gateway Placement
In algorithm 2, the optimum set of gateway locations located at a minimum distance from cluster heads is determined 'S' by taking into account the requirements for network coverage constraints. The efficiency of this distance dependent approach is compared in terms of packets sent to the CD and the gateway or base station is shown in figures 3 and figure 4.  Algorithms are used to determine the optimal position of the gateways from selected candidate locations as an output of algorithm 2. By considering all the linked components of the IoT network, clusters of cluster heads are established. It is known to be a cluster header. In the proposed algorithm, instead of building a new gateway, the current gateway is substituted to improve the efficiency of the network by using existing gateways to identify the optimal location of the gateway.
Our proposed algorithm is based on the location of a distance-based gateway. The proper location and number of gateway nodes improves the life of the network. Figure 5 shows the average delay per packet in seconds for the proposed algorithm, k-mean, agglomerative and PSO-based method for both Euclidean and Manhattan approaches. Figure 5 shows that our proposed Manhattan approach algorithms have shown superior delay efficiency. The average delay is influenced by three factors, such as the initial location of the gateways, the proximity of these allocated gateways and the optimum positioning of the gateways. Figure 5 shows that the increase in the number of gateways reduces latency or average delay as more gateways will result in improved positioning. Figure 6 shows the energy consumed during the simulation phase, depending on the number of gateways inside the network being deployed. The proposed model results in a reduced energy usage as more gateways are added to the optimal route availability, however as a result of new constraints, there could be a risk of more time requirements. Traffic variations in the dynamic wireless network can affect the efficiency of the network.

Conclusion
In this article, the solution to the problem of gateway placement ensures an improvement in the overall efficiency of the IoT network as a large volume of data is created to support different applications in smart cities such as smart waste management. Several methods are studied in order to optimize the selection of the minimum number of gateways by considering various network parameters such as heterogeneity, failure of link, traffic demand, gateway failure, network throughput, link bandwidth, node capability, delay, congestion, etc. in order to achieve better network efficiency. In the IoT scenario, maximizing the number of Internet gateways has become important, but the target of network throughput and total network costs cannot be ignored. In this paper, the efficacy of the proposed algorithms is calculated by contrasting the proposed algorithm with the existing algorithm in terms of the gateway being deployed. Apart from the proper position of the gateway, energy efficiency is also a demanding parameter so that network life and throughput can be improved. In this article the distance-based optimization of the energy-efficient system is designed to achieve the optimum throughput of the wireless network. Link failure and gateway failure will be discussed in future work for IoT network to improve network capacity.