[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Next Article in Journal
Continuous Authentication against Collusion Attacks
Next Article in Special Issue
Self-Sovereignty Identity Management Model for Smart Healthcare System
Previous Article in Journal
Inertia–Acoustophoresis Hybrid Microfluidic Device for Rapid and Efficient Cell Separation
Previous Article in Special Issue
A Smarter Health through the Internet of Surgical Things
You seem to have javascript disabled. Please note that many of the page functionalities won't work as expected without javascript enabled.
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Planning and Optimization of Software-Defined and Virtualized IoT Gateway Deployment for Smart Campuses

by
Divino Ferreira, Jr.
1,2,
João Lucas Oliveira
2,
Carlos Santos 
3,
Tércio Filho
4,
Maria Ribeiro
5,
Leandro Alexandre Freitas
6,
Waldir Moreira
7 and
Antonio Oliveira-Jr
2,7,*
1
Campus Senador Canedo, Federal Institute of Education, Science and Technology of Goiás (IFG), Senador Canedo 75250-000, Brazil
2
Institute of Informatics (INF), Federal University of Goiás (UFG), Goiânia 74690-900, Brazil
3
Campus Palmas, Federal Institute of Education, Science and Technology of Tocantins (IFTO), Palmas 77021-090, Brazil
4
Institute of Biotechnology (IBiotec), Federal University of Catalão (UFCAT), Catalão 75705-220, Brazil
5
Institute for Systems and Computer Engineering, Technology and Science (INESC-TEC), 4200-465 Porto, Portugal
6
Campus Inhumas, Federal Institute of Education, Science and Technology of Goiás (IFG), Inhumas 75402-556, Brazil
7
Fraunhofer Portugal AICOS, 4200-135 Porto, Portugal
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(13), 4710; https://doi.org/10.3390/s22134710
Submission received: 8 April 2022 / Revised: 17 June 2022 / Accepted: 20 June 2022 / Published: 22 June 2022
(This article belongs to the Special Issue IoT Multi Sensors)
Figure 1
<p>The flowchart of the optimization model.</p> ">
Figure 2
<p>An example of area mapping using the Institute of Informatics, UFG.</p> ">
Figure 3
<p>An example of the results of device and gateway placement using the K-means method.</p> ">
Figure 4
<p>The Samambaia Campus and departments of UFG: (<b>a</b>) the Samambaia Campus; (<b>b</b>) the Institute of Informatics; (<b>c</b>) the academic blocks.</p> ">
Figure 5
<p>An example of how IoT points and devices are plotted within the desired area by generating an <span class="html-italic">x</span>,<span class="html-italic">y</span> coordinate matrix.</p> ">
Figure 6
<p>The plots of the devices and their respective gateways with a3% data link consumption (LP method): (<b>a</b>) BLE technology with 100 devices and 35 gateways; (<b>b</b>) BLE technology with 300 devices and 37 gateways; (<b>c</b>) Wi-Fi technology with 100 devices and 4 gateways; (<b>d</b>) Wi-Fi technology with 300 devices and 10 gateways; (<b>e</b>) LoRA technology with 100 devices and 4 gateways; (<b>f</b>) LoRA technology with 300 devices and 10 gateways.</p> ">
Figure 7
<p>The plots of the devices and their gateways (Wi-Fi technology): (<b>a</b>) the Samambaia Campus with 300 devices (outdoor environment); (<b>b</b>) the academic blocks with 300 devices (indoor environment).</p> ">
Figure 8
<p>The plots of the devices and their gateways (LoRa technology; outdoor environment): (<b>a</b>) the Samambaia Campus with 200 devices and 7 gateways; (<b>b</b>) the Samambaia Campus 300 devices and 10 gateways.</p> ">
Figure 9
<p>Graphs showing the results of the experiments with variations in the demand for data link consumption: (<b>a</b>) the data link consumption × quantity of gateways; (<b>b</b>) the silhouette coefficient.</p> ">
Figure 10
<p>The clustering of IoT devices and their respective gateways using the K-means model: (<b>a</b>) BLE technology with 100 devices and 35 gateways; (<b>b</b>) BLE technology with 300 devices and 37 gateways; (<b>c</b>) Wi-Fi technology with 100 devices and 4 gateways; (<b>d</b>) Wi-Fi technology with 300 devices and 10 gateways; (<b>e</b>) LoRa technology with 100 devices and 4 gateways; (<b>f</b>) LoRa technology with 300 devices and 10 gateways.</p> ">
Figure 11
<p>The clustering of IoT devices and their respective gateways using the PSO model (simple approach): (<b>a</b>) BLE technology with 100 devices and 35 gateways; (<b>b</b>) BLE technology with 300 devices and 37 gateways; (<b>c</b>) Wi-Fi technology with 100 devices and 4 gateways; (<b>d</b>) Wi-Fi technology with 300 devices and 10 gateways; (<b>e</b>) LoRa technology with 100 devices and 4 gateways; (<b>f</b>) LoRa technology with 300 devices and 10 gateways.</p> ">
Figure 11 Cont.
<p>The clustering of IoT devices and their respective gateways using the PSO model (simple approach): (<b>a</b>) BLE technology with 100 devices and 35 gateways; (<b>b</b>) BLE technology with 300 devices and 37 gateways; (<b>c</b>) Wi-Fi technology with 100 devices and 4 gateways; (<b>d</b>) Wi-Fi technology with 300 devices and 10 gateways; (<b>e</b>) LoRa technology with 100 devices and 4 gateways; (<b>f</b>) LoRa technology with 300 devices and 10 gateways.</p> ">
Figure 12
<p>The clustering of IoT devices and their respective gateways using the PSO model (hybrid approach): (<b>a</b>) BLE technology with 100 devices and 35 gateways; (<b>b</b>) BLE technology with 300 devices and 37 gateways; (<b>c</b>) Wi-Fi technology with 100 devices and 4 gateways; (<b>d</b>) Wi-Fi technology with 300 devices and 10 gateways; (<b>e</b>) LoRa technology with 100 devices and 4 gateways; (<b>f</b>) LoRa technology with 300 devices and 10 gateways.</p> ">
Figure 13
<p>The comparison of the total distances between the IoT devices and their gateways using the simple and hybrid PSO models.</p> ">
Versions Notes

Abstract

:
The Internet of Things (IoT) is based on objects or “things” that have the ability to communicate and transfer data. Due to the large number of connected objects and devices, there has been a rapid growth in the amount of data that are transferred over the Internet. To support this increase, the heterogeneity of devices and their geographical distributions, there is a need for IoT gateways that can cope with this demand. The SOFTWAY4IoT project, which was funded by the National Education and Research Network (RNP), has developed a software-defined and virtualized IoT gateway that supports multiple wireless communication technologies and fog/cloud environment integration. In this work, we propose a planning method that uses optimization models for the deployment of IoT gateways in smart campuses. The presented models aimed to quantify the minimum number of IoT gateways that is necessary to cover the desired area and their positions and to distribute IoT devices to the respective gateways. For this purpose, the communication technology range and the data link consumption were defined as the parameters for the optimization models. Three models are presented, which use LoRa, Wi-Fi, and BLE communication technologies. The gateway deployment problem was solved in two steps: first, the gateways were quantified using a linear programming model; second, the gateway positions and the distribution of IoT devices were calculated using the classical K-means clustering algorithm and the metaheuristic particle swarm optimization. Case studies and experiments were conducted at the Samambaia Campus of the Federal University of Goiás as an example. Finally, an analysis of the three models was performed, using metrics such as the silhouette coefficient. Non-parametric hypothesis tests were also applied to the performed experiments to verify that the proposed models did not produce results using the same population.

1. Introduction

Information technology has become essential in the daily lives of people and businesses and the Internet of Things (IoT) concept directly contributes to changes in everyday life [1,2,3,4,5,6,7]. The IoT is a communication paradigm in which objects communicate with each other and with users via network communication technologies, mostly wireless networks [8]. This paradigm enables interaction between several devices (called things), such as electronic appliances, home appliances, vehicles, hospital equipment, sensors, surveillance cameras, etc. The technologies that are used in the IoT context directly contribute to the evolution of services that are associated with smart cities and smart campuses. Hence, smart campuses are integrated work, study, and living environments that are based on the Internet of Things [9]. A multitude of data types that correspond to distinct applications are transmitted over the IoT infrastructure and need to be processed in different units [10].
Two of the main challenges that are analyzed and faced by IoT are interoperability and heterogeneity [11]. One solution to these challenges is the deployment of IoT gateways that support multiple communication technologies [12]. Deploying IoT gateways in smart campuses requires prior planning. Consequently, it is necessary to deploy IoT gateways that address the communication needs of IoT devices in university campuses, such as bandwidth, communication technologies, energy efficiency, etc. The SOFTWAY4IoT project was funded by the National Education and Research Network (RNP) and developed an IoT gateway that can establish communication within an Internet of Things environment. This gateway is virtualized, utilizes software-defined networking (SDN) and fog computing that is integrated with cloud computing, and supports multiple wireless communication technologies [13]. The area coverage of wireless networks is also a challenging problem. The challenges start with the choice of the communication technology that is to be used through to the architectural characteristics of the environment, the number of things or people that access the network simultaneously, the mobility of the people or things that connect to the network, etc. It is possible to find several works that have focused on area coverage in the literature.
We found several works in the literature that focused on area coverage [14,15,16,17,18,19]. Services that require communication infrastructures need a guarantee of the quality of the communication. Distributing the gateways within these environments is a big challenge comprising many factors that are relevant to the positioning and quantification of the devices that aim to meet the presented demand.
In this context, this work proposes a method for the planning and optimization of the deployment of IoT gateways, with the SOFTWAY4IoT IoT gateway as its motivation. Hence, this paper presents three optimization methods for gateway infrastructure planning that aim to minimize the number of required gateways and maximize the coverage area, considering the communication capacity of the data link and the range of the communication technology. A comparison of the models is also presented in order to evaluate the obtained results. The study focused on the LoRa, BLE, and Wi-Fi communication technologies.
The LoRa technology was chosen because it has a long communication range that increases the coverage area, as well as a low energy consumption. On the other hand, the BLE technology opposes LoRa technology in terms of range, as it covers a small area (personal area) but has a similarly low power consumption. Finally, we chose Wi-Fi because it is one of the most popular communication technologies within wireless networking. It has an area coverage that has a larger range than the BLE but a smaller range than the LoRa and has a high power consumption.
However, the determination of how many IoT gateways to use and where to place them in order to maximize the coverage area and minimize the number of gateways is an NP-hard problem, called the WMN node placement problem. The complexity of this problem grows exponentially with small changes in the size of the problem. Therefore, we tested three different hybrid methods to find near optimal solutions [20].
The presented optimization model aimed to minimize the number of required IoT gateways and to position them within the area to be covered, taking into account the size of the area, the range of the communication technology, and the location in which the devices are deployed. The gateway deployment problem was split in two steps: (a) the determination of the number of required gateways by solving a linear programming problem (LPP), which aimed to minimize the gateways quantities; (b) the K-means and particle swarm optimization (PSO) algorithms were employed to establish the gateway positioning.
The use case scenario was a university campus and the chosen areas and the size and characteristics of the environment (indoor/outdoor) are presented in Table 1. We tested larger and smaller areas with different architectural characteristics.
The contributions of this article can be summarized as follows:
  • The proposal of an optimization model that uses linear programming for the quantification and positioning of gateways to minimize network deployment costs;
  • The proposal of an algorithm that uses the K-means clustering method to define the positioning of gateways within a (predefined) area;
  • The proposal of an algorithm that uses the PSO clustering method to define the positioning of gateways within a (predefined) area via two different initialization approaches;
  • A comparative evaluation of the methods to establish which method produces the best results for area coverage, using the silhouette coefficient as the metric [21];
  • The employment of non-parametric hypothesis testing to verify that the different metaheuristics did not produce results using the same population [22].
This paper is organized as follows. Section 2 presents the related work. Section 3 presents the modeling of the optimization methods that were applied in this study. Section 4 presents the application scenario and Section 5 presents the evaluation of the results. Finally, the final considerations and directions for future work are presented in Section 6.

2. Related Works

We considered studies regarding the Internet of Things, intelligent environments, optimization models, clustering methods, and signal propagation, among others, as relevant to the development of this work [23,24,25,26,27,28]. Some studies have analyzed area coverage using equipment for different communication technologies; however, our research considered an intelligent environment using IoT gateways for heterogeneous networks.
The related works were found using the keywords “optimization”, “coverage”, “IoT gateway”, “placement”, and “planning”. These keywords were used to search for works that were related to area coverage and the placement of IoT gateways. We also searched for papers that were related to network signal propagation and smart environments (smart campuses, smart cities, etc.). Initially, the search focused on papers that were published from 2015 onward, but relevant papers were found also from earlier periods. As a search tool, we first used Google Scholar and then we mostly used the IEEE and Springer databases. The searches for related papers were based on the topics of wireless network area planning and coverage, with a greater focus on IoT networks, although this was not restrictive.
A proposal for multi-hop network planning that aimed to minimize hardware (gateways) and operational costs was presented by [14]. Path loss was also considered as an operational cost. The work presented a mathematical optimization model and used three evolutionary algorithms that were based on swarm intelligence [14]. Although the work had similar goals and metrics to this research, there was no application in real space. Our work presents results that were obtained directly from the study environment using three communication technologies and three optimization models.
The model presented by [29] aimed to minimize the latency of communication between fog nodes and gateways. To meet this objective, ref. [29] developed a mathematical formulation that considered the activation of a minimum number of fog nodes. Compared to the proposal presented in this paper, the model in question did not present any study of applied scenarios and adopted empirical parameters in the experiments. There was no quantification of the number of gateways, only a comparison of the executions that varied the numbers.
A study developed by [15] presented a model for application in IoT systems, with a focus on smart cities. The study aimed to reduce the costs of the deployment of an IoT system by considering the use of two gateway models for communication. One of the gateway models communicated with the Internet and the other did not. The presented study used three technologies (Wi-Fi, ZigBee, and RFID) to establish communication between the systems. The work also developed an algorithm to minimize the number of gateways, with the objective of reducing the costs of deployment, and a mechanism to tolerate communication failure.
A smart city scenario integrates several applications of different technologies and may have hundreds of networks using different domains. Each network is coordinated by a coordination device (CD) and each CD needs to transmit its data to the Internet via its own connection that is established using a gateway. To reduce costs, this work proposes two gateway models: an IGW (IoT gateway), which establishes communication using the Internet, and an SSGW (solution-specific gateway), which has no direct communication with the Internet. The gateway presented in our study has features such as SDN usage, virtualization, and integration between the edge and the cloud. These features allow all gateways to communicate with the Internet and can use anything from machines with low processing power, such as a Raspberry, to more robust machines, such as servers with high processing power.
A study on multi-objective planning in WLAN networks was conducted in [16]. The study developed a planning tool that was capable of finding the best position for an access point (AP) and load balance within a WLAN network, which minimized the interference between access points. In this work, a multi-objective evolutionary algorithm with a greedy heuristic was used. The IEEE 802.11 standard was also used, but the study did not address other communication technologies and was restricted to the communication that was established by the access points. For IoT scenarios, heterogeneity is a latent challenge and thus, a study that focuses on IoT needs to consider multi-technology communication. In this regard, our work presents an access point that can integrate multiple communication technologies, i.e., a gateway with multiple communication technologies.
The determination of gateway placements within a network to connect IoT devices is a crucial point when it comes to deployment costs. To solve this problem, ref. [10] presented a solution using integer linear programming (ILP) that minimized the total network costs in relation to deployed devices, while taking into account mandatory quality of service (QoS) requirements. A gateway could be placed anywhere within a given area, but an initial set of candidate positions was considered. Communication took place over multiple hops. To obtain the lowest deployment costs and guarantee the QoS of the fixed transmission range, the specific data rates, end device costs, gateway costs, generated traffic, and the distance between the nodes were used as data. In order to provide QoS, the capacity of the links had to be sufficient to handle multiple simultaneous transmissions.
An optimization approach for gateway deployment in heterogeneous sensor networks was presented by [17]. This study focused on ILP-based optimization and wireless gateway locations. The goal was to minimize the installation costs and maximize the energy efficiency of the wireless sensor network, considering multi-hop coverage and connectivity constraints. Although this study addressed the overheads of sensors that are considered to be critical, multiple hops could demand more time before the message reached its destination.
A gateway placement approach was presented by [18]. This approach aimed to optimize the number of gateways, the average number of mesh routers, and the variations in gateway loads within wireless mesh networks (WMNs). Minimizing the average hop count of the network was one of the objectives since long paths reduce the throughput. The proposed work used two stages to achieve their objectives.
The works of [10,17,18] took into consideration communication using multiple hops. Direct connections between devices and gateways may present higher costs, but the message delivery time tends to be shorter, thereby improving network performance. The particularities of each deployment environment have to be considered, along with issues regarding device density, which involve denser environments or more spacious environments, and other factors. The proposed work considered an intelligent scenario that focused on indoor and outdoor environments and direct communication using software-defined and virtualized gateways. Our optimization model aimed to minimize the number of required gateways as a function of the number of deployed devices to improve the range of the communication technology and the communication capacity of the gateways.
A study developed by [19] addressed the optimal deployment of IoT gateways in smart home environments (smart homes). The work in question solved the optimization problem using the branch and bound method with the goal of minimizing the gateway deployment costs, subject to the constraint that all service areas of the home must be covered. The smart home environment is relatively small compared to a smart campus or smart city. A small environment assumes the use of a single gateway and few devices. For a small environment, the model in question proved to be effective; however, its application in larger environments is necessary to evaluate the effectiveness of the model since there are large areas with high densities of IoT devices.
A literature review article presented by [20] surveyed the optimization approaches that have been implemented to solve the node placement problem in WMNs. In the literature, several WMN node positioning approaches have been proposed. This paper presented a classification that was based on the type of method that was used. The classification was split into four categories: methods that are based on exact approaches, methods that use heuristics, methods that use metaheuristics, and methods that apply hybrid approaches. Additionally, their paper presented a case study using the greedy algorithm (GA), simulated annealing (SA), particle swarm optimization (PSO), and the firefly algorithm (FA) to investigate the impacts of varying the number of mesh clients, the number of mesh routers, and the coverage radius.
Table 2 presents a comparison of the related work, according to network planning. There were works that did not have a focus on IoT networks and others that did not have a focus on gateways, but all of them proposed an optimization model for network planning. All of the works presented map positioning for the devices that established the network communication, although each paper had its own particularities and metrics for mapping. Hence, in this work (and contrary to the related work), our goal was to quantify and position IoT gateways (considering the range of the communication technology that was employed) and the maximum number of devices that could be supported by the gateways.
Section 3 presents the optimization models that were employed in this work and shows the particularities that were adopted in each model.

3. Optimization Model for IoT Gateway Planning, Coverage, and Positioning

Several wireless communication technologies are available that can meet the heterogeneous characteristics that guide the Internet of Things paradigm. The application scenarios of this paradigm may include residences, offices, stores, hospitals, industries, universities, cities, etc. The implementation of systems within the context of the Internet of Things demands prior study. In the first instance, this study aimed to analyze the coverage area, the devices that are to be deployed, and the communication technology that would best meet the needs of the environment.
The focus of this work was the planning of IoT gateway deployment within intelligent environments. This research evaluated the signal coverage of three communication technologies (Wi-Fi, LoRa, and BLE) in a smart campus scenario. LoRa is an emerging communication technology with a long range and low power consumption. Wi-Fi is a mid-range technology with a higher power consumption; however, it is widespread in communications and has great relevance to indoor environments. BLE is a short-range communication technology with a low power consumption and personal area coverage.
The proposed work was split into two steps. The first step defined the number of gateways using an optimization model with linear programming. In the second step, the linear programming model, the K-means clustering method, and the PSO method were used to define the positions of the IoT gateways, considering the number of gateways that was defined in the first step. Finally, a comparison was made between the three gateway positioning models, which had the aim of evaluating the results of each model. Figure 1 shows the flowchart of the optimization model.
The candidate points matrix was implemented with the goal of determining the possible installation sites for gateways and IoT devices. We considered the matrix to be a key point for area coverage as its implementation reproduced the floor plan of the scenario, which allowed the algorithm to check each point within the desired area.
The linear programming model developed in this work had a relevance to quantification. The constraints that were associated with the objective allowed for reductions in the deployment costs. The methods, such as K-means and PSO, were used based on the proposed locations of the gateways within the search space that was delimited by the floor plan of the scenario, which is reproduced in this paper in the form of points on a Cartesian plane. These details allowed the quantification and positioning to come closer to the real circumstances of the deployment.
The advantages of the linear programming model over the K-means and PSO models involved the gateway positioning being restricted by the range of the technology; in this case, no device could connect to a gateway when the distance between the points exceeded the range of the technology. On the other hand, the dispersion of devices in relation to the gateways was greater. In the clustering models, there was no restriction on range; however, the degree of dispersion was lower because the devices were positioned considering proximity to the gateways.
The presented models enabled the association of the devices and the experiments were implemented in a real environment with distinct architectures. In this way, it was possible to evaluate their applicability as close to reality as possible. It is noteworthy that the range of the technology needed to consider the study of signal propagation within the deployment scenario. Although this study did not consider the actual coordinates of the deployment of devices, the models were developed with this objective; therefore, when we had the coordinates of the installation site of a device, we inserted them as an input parameter and obtained a result that was even more realistic.

3.1. Gateway Quantification and Positioning Using Linear Programming

The planning and optimization of IoT gateway deployment for communication networks aimed to calculate the minimum gateway quantity that is required to cover a defined area and the number of IoT devices per gateway. For the quantification, the range of the employed wireless communication technology and the gateway communication link capacity were considered. The ultimate goal was to minimize the number of gateways while maximizing the coverage for devices within the desired area.
The area coverage was calculated based on the signal propagation of the communication technology. The signal propagation of each communication technology had distinct characteristics and also varied with respect to the propagation environment (indoor/outdoor). The signal propagation models allowed the range of the communication technology to be abstracted as a function of path loss.
The coverage area was an input parameter for the optimization model. Using Google Earth as a tool (available online: https://www.google.com.br/intl/pt-BR/earth/ (accessed on 10 May 2021)), it was possible to ascertain the measurements (dimensions) of the desired area. This area needed to be delimited and the possible locations of the devices and gateways needed to be plotted. In the optimization model, the points were plotted according to the coordinates of a Cartesian plane, as shown in Figure 2. In this case, we obtained an area of 2425 m2 that was considered for the possible device locations. Each m2 was one positioned point (i.e., a possible point in the desired area), totaling 2425 possible IoT device installation points.
Each pair of coordinates for the plotted points in the specific area was used as an input parameter for the linear programming-based optimization model. The proposed model chose the installation points of the IoT devices randomly using a seed, but they could also be defined according to the reality of their deployment (i.e., their real positions). When using the real positions, it was necessary to have the coordinates of the location in which the device was to be deployed.
As input parameters, we also used the range of the communication technology, the number of devices, the gateway data link capacity, and the IoT device link demands. The presented metaheuristic quantified the IoT gateways within the desired area, considering the coverage of the devices that were deployed in that area. Table 3 presents the parameters that were used for the optimization model that was based on linear programming. Considering the goal of minimizing the number of gateways, the decision variables were defined first. Then, we obtained:
  • X i , j as the matrix that associated a device to a gateway;
  • Y i as the vector that received the gateways that were activated to meet the demand of the devices.
Given the coordinates of the IoT devices ( D i , j ), the optimization model associated each device with a gateway ( Y i ). The gateway had to be within the range of the technology (r). This association occurred via the decision variables. Each device was assigned to a gateway but each defined gateway could have multiple devices associated with it. The model used these constraints to make associations that obeyed the necessary criteria in order to meet the proposed objective. The objective of the optimization model is represented by Equation (1):
m i n i = 1 n Y i
where Y i represents the active gateways. Equation (1) represents the objective of minimizing the number of gateways ( Y i ). Note that each D i , j is a candidate gateway point. Using this logic, a gateway could always be activated at one of the points D i , j , which was equivalent to an IoT device point.
Constraints were defined to achieve the goal of ensuring coverage for the IoT devices using the lowest number of gateways. As constraints, we used:
j = 1 n X i , j = 1 , i = 1 , , n .
X i , j M a t i v i , j Y i i , j = 1 , , n
j = 1 n X i , j c c b 0
X i , j 0 , i , j = 1 , , n
Y i 0 , i , j = 1 , , n
The restrictions caused by Equations (2) and (3) aimed to associate a device with a single gateway. Equation (4) limited the number of devices per gateway, considering the link transmission capacity, and did not allow for the exceedance of the defined maximum transmission capacity. In this case, when the maximum capacity was exceeded, another gateway was activated to meet the required demands. The constraints caused by Equations (5) and (6) were non-negative constraints.
Running the optimization model produced the active gateways ( Y i ) and the associations between the devices and their corresponding gateways ( X i , j ) as solutions. From those results, a graph could be plotted using the plant model represented by Figure 2, which showed the positions of the gateways and the respective IoT devices, thus forming a cluster.

3.2. Gateway Placement Using the K-Means Clustering Algorithm

The K-means clustering method is used in data mining [31]. This method aims to partition n observations into k clusters. In this research, the K-means algorithm was used to define the gateway placements and the distribution of devices per gateway.
The definition of a cluster quantity in the K-means approach was used as an input parameter. The input parameters that were used in this model are presented in Table 4.
The K-means method uses the distance between points for clustering and attempts to separate samples into n clusters of equal variance by minimizing a criterion, which is known as inertia, or the sum of squares within the cluster according to Equation (7):
j = 1 n ( x j μ 2 )
The proposed algorithm divided a set of n IoT devices into k groups. The center of the groups (centroid) represents the position of the IoT gateway and D i , j represents the coordinates/position of the IoT devices within the defined area A i , j . In the performed experiments, the devices ( D i , j ) were defined randomly using points within the desired area ( A i , j ) . It is worth pointing out that they were defined randomly because it was an experiment. The points of a device must have its position defined as coordinates on a Cartesian plane in a real situation.
As the number of gateways was defined by the results (C.f. Figure 3) of the first stage of execution, it was understood that the areas and positions of the devices had to be the same for the execution of the second stage (clustering). In order to retain the same position of the devices, the same seed was used for all execution steps. In this way, the devices were randomly chosen based on the same seed.
The K-means algorithm selected the position of the centroids randomly. The input K-means parameter from the scikit-learn library was applied to initialize the centroids more intelligently in order to speed up convergence. Using this parameter, the K-means algorithm randomly positioned a first centroid, then the other centroids were positioned so that they were as far away from each other as possible. This initial positioning helped the algorithm to converge faster.
Algorithm 1 positioned all gateways (c) and assigned to them the nearest devices ( D i , j ), so that all devices were associated with a gateway. The process of assigning and reallocating centroids was repeated until the positions of the centroids were stable (convergence). The goal was make the sum of the distances between the devices ( D i , j ) and the gateways (c) as small as possible.
Algorithm 1: The K-means pseudocode.
input N , k , A i , j , D i , j
Sensors 22 04710 i001output: Grouping the devices to the respective gateway forming the clusters
output: Reports with metrics related to the clustering process

3.3. Positioning of Gateways Using the PSO Optimization Algorithm

The particle swarm optimization model is so named because it is an evolutionary algorithm that arose from studies on algorithms that modeled the social behavior of animals (e.g., bird flocking and bee swarming behavior).
It had the same parameters as the K-means method: the number of gateways (c), the number of devices (n), the desired area ( A i , j ), and the device positions ( D i , j ). The number of particles (p) was a unique parameter for the PSO model. The number of particles was then defined as an input parameter. Each particle was a vector that contained the same number of positions as gateways, so we obtained P i = ( P 1 , P 2 , , P c ) .
Each particle in the population represented one possible solution. The particles moved around the search space, looking for the position that best met the objective function (fitness function). These particles moved at a certain speed (v) and had a “memory” that saved their best position ( p b e s t ). A “collective memory” was considered for the swarm and represented the best global position that was reached ( g b e s t ). Table 5 presents a summary of the variables that were applied to the PSO model that was developed in this research.
The initialization of the particles took place randomly within the search area. Once initialized, the g b e s t was updated with the positions of the particles. This model positioned the gateways considering the best global position of the particles. Following the flow, the particle velocity was updated, as presented in Equations (8) and (9), which updated the particle positions within a given iteration:
v i ( t + 1 ) = w ( t ) v i ( t ) + c 1 r 1 ( p b e s t i ( t ) p i ( t ) ) + c 2 r 2 ( g b e s t i ( t ) p i ( t ) )
where v i ( t + 1 ) is the velocity to be updated, w ( t ) is the inertia factor at iteration t, c 1 and c 2 are the cognitive and social coefficients, respectively, r 1 and r 2 are the random values between 0 and 1, and p b e s t i ( t ) is the best local point and best global point at iteration t.
p i ( t + 1 ) = p i ( t ) + v i ( t + 1 )
where p i ( t + 1 ) represents the new position of the particle, p i ( t ) is the current position of the particle, and v i ( t + 1 ) is the new velocity, as calculated by Equation (8).
The inertia factor (w) contributes to particle convergence. Larger values of w contribute to a global search that explores new areas of the search space. As values of w decrease, they favor local searches, which is interesting when the particles are close to a good solution. The presented PSO model applied a linear variation of the inertia factor over the number of iterations, as shown in Equation (10):
w ( t ) = w i n i t i a l ( w i n i t i a l w f i n a l ) t m i
where w ( t ) is the inertia at iteration t, w i n i t i a l is the initial inertia, w f i n a l is the inertia for the last iteration, t is the current iteration, and m i is the maximum number of iterations.
The coefficients c 1 , c 2 , and w i n i t i a l / w f i n a l were input parameters, while the coefficients r 1 and r 2 were random values between 0 and 1 that were calculated by the system.
The PSO updated the positions of the particles until it reached the maximum number of iterations, as presented in Algorithm 2. The particles converged to a point that was considered to be the best global position.
Algorithm 2: The PSO pseudocode.
Sensors 22 04710 i002output: Grouping of the devices to the respective gateway forming the clusters
output: Reports with metrics related to the clustering process

4. Description of the Application Environment

The proposed models were applied in a case study in order to evaluate their results. The models allowed for the quantitative measurement of gateway positioning within the coverage area.
From the point of view of the deployment of IoT devices in a smart campus, several possibilities are envisioned to meet diverse demands, such as: monitoring the environment, humidity, gas levels, and temperature; monitoring parking lots; access monitoring via video cameras; and intelligent lighting control. All of these examples contribute toward facilitating daily activities and improving the quality of life of the academic community.
This section discusses the case study scenario and presents the characteristics and parameters that were explored.

Scenario Description

Smart campus deployment is marked by the heterogeneity of services, assuming the heterogeneity of the technologies that can be used to deploy services within the environment. The application of the optimization model to three communication technologies was proposed in this work: one with a personal area coverage with low power consumption (BLE); one with local and commonly known area coverage (Wi-Fi); and one with long range areas with low power consumption (LoRa).
Each technology has a different range. It has also been observed in published studies in the literature that each environment has objects and structures that interfere with the propagation of wireless network signals. For the case study, we searched the literature for signal propagation studies regarding BLE, Wi-Fi, and LoRa technologies. The signal propagation studies were based on the received signal strength indication (RSSI). From the measurement of the RSSI and the application of signal propagation models, it was possible to determine the range of the technology. The RSSI for the range radii of the tested technologies was below −90 dBm. In this work, we adopted the range measurements according to Table 6.
The case study was applied in a smart campus scenario. As an outdoor environment, we could use the whole area of the Samambaia Campus at the Universidade Federeal de Goiás (UFG). In this work, we considered an area of 761,380 m 2 , excluding the woods and unbuilt areas (Figure 4a). The indoor environment was the INF with 2425 m 2 (Figure 4b) and an area of academic blocks with 26,664 m 2 (Figure 4c), comprising the Institute of Biological Sciences (ICB I and II), Institute of Chemistry (IQ), Institute of Physics (IF), Faculty of Philosophy (FAFI), Faculty of History (FH), and Faculty of Communication and Librarianship (FACOMB). The measurements were taken using Google Earth.
The presented optimization model recognized the desired area by defining points on a Cartesian plane (x and y coordinates). These coordinates indicated where an IoT device or gateway could be deployed. Figure 5 shows an example of plotting the points on a Cartesian plane, with an area of 100 m 2 containing 10 deployed IoT devices. The points in gray are all possible deployment points, while the points in red represent the deployed IoT devices.
A real application of the optimization model should have the coordinate pair of each device as an input parameter. For the purposes of these experiments, the coordinates of the IoT devices were set randomly among the points in the desired area. Once the device coordinates were defined, a distance matrix between the device points (see Table 7) was calculated, which was the basis for the generation of the gateway activation matrix (see Table 8).
The distance matrix was generated from the calculation of the Euclidean distance between one point and all of the other points. In the example presented in Table 7 and Table 8, 10 IoT devices and a range of 25 m were considered. The activation matrix was binary and was generated from the distance matrix. When the distance was less than the range, it was assigned the value of 1 (one); when the distance was greater than the range, it was assigned the value of 0 (zero).
The parameters that were used in the proposed models were presented in Section 3. In particular, the PSO model used the following values as the initial values for the execution of the experiments: w i n i t i a l = 0.9 , w f i n a l = 0.3 , n p = 20 , m i = 150 , c 1 = 2.1 , and c 2 = 1.9 .
In Section 5, the results of the experiments and an analysis of the comparison of the three metaheuristics are presented.

5. Presentation and Evaluation of Results

In order to achieve the proposed goal, the research aimed to present three algorithms that focused on planning and optimizing the deployment of IoT gateways. The first was based on linear programming, which aimed to quantify and position the gateways. The second and the third employed clustering using the K-means and PSO algorithms, which aimed to position the gateways.
The research relied on the case study to refine the results; then, the results were compared to evaluate the three methods that were applied to the case study. The initial parameters were set. A floor plan of the studied environment with the plots of the relevant points on a Cartesian plane and the definition of the points of the installed IoT devices were used as input parameters, as well as the range of the technologies and the capacity of the data links. The same parameters were applied to the three metaheuristics. After the experiments, the results were compared to analyze the positioning of the gateways and the distribution of the devices. Three environments were used in the case study (indoor and outdoor environments) to evaluate the behavior of the metaheuristics and the obtained results.

5.1. LP Optimization Model: Gateway Quantification and Positioning

The experiments presented in this section aimed to evaluate the optimization model that was based on linear programming. Table 9 presents the results of the run, considering the defined values.
The first experiment took into account the deployment of 100 or 300 devices for each communication technology. It was observed that for the BLE technology, with a demand of 0% or 3% of the data link for each device, we obtained the same results of 35 and 37 gateways, respectively. The value remained the same because the range was the parameter that prevailed in the definition of the quantity of gateways. The opposite was observed with the Wi-Fi and LoRa technologies. When Wi-Fi technology consumed 30% of the link demand, it was necessary to have 4 gateways to serve 100 devices and 10 gateways to serve 300 devices; the same occurred with LoRa. This equality between LoRa and Wi-Fi occurred because the same bandwidth consumption was defined for both technologies. Thus, when analyzing the same technologies with 0% bandwidth consumption, it was observed that Wi-Fi communication required 1 less gateway to serve 100 devices and 7 less gateways to serve 300 devices. It was also found that LoRa demanded 3 fewer gateways to serve 100 devices and 9 fewer gateways to serve 300 devices. This variation in the number of required gateways proved that the presented optimization model considered the range and the demand for the data links.
The main goal of this optimization model was to quantify the gateways. The model was proposed based on gateway activation criteria as a function of the Euclidean distance between the IoT devices and the corresponding gateway and the transmission capacity of the communication link to the gateway. When the gateway was activated, it was assigned the devices that were within its range, while obeying the established constraints. The process was repeated until the smallest possible number of gateways was found to serve all of the deployed devices.
The association between the devices and the gateway allowed for a map of their positions to be plotted, as shown in Figure 6. In the LP model, the association was defined considering the range of the communication technology, whereas in the clustering process, the association was based on the proximity of the devices to the gateway.
The association between the devices and the corresponding gateway is represented by the alternating colors of the devices in the graph. These figures were equivalent to the execution, the results of which are shown in Table 9. A device could be at different ends of the defined area, but when it was within the range of coverage, it could be associated with the gateway. There are two columns called “Silhouette” in Table 9: this metric is a coefficient that indicates how cohesive a data cluster is. This coefficient ranged from −1 to 1 in this study. The closer to 1 the coefficient, the more cohesive the data; the closer to −1, the wider the dispersion.
As mentioned above, the distribution of the gateway devices that is represented by Figure 6e had the lowest Silhouette coefficient, indicating that the distribution was the least cohesive. This coefficient proved that dispersion when distributing the devices was significant.
Although a graphical representation of the positions of the devices/gateways with a bandwidth consumption that was equal to zero is not presented, it was observed that the distribution was more cohesive, according to the silhouette coefficients that are seen in Table 9. The silhouette coefficient can only be calculated when there are two or more clusters, thus justifying the absence of this coefficient from some of the presented results.
The optimization model could be applied to different areas, each with its own architectural characteristics. In this work, it was applied in three areas: two indoor areas (INF and the UFG academic blocks) and one outdoor area (the entire Samambaia Campus area of the UFG). The measurements of these areas are presented in Table 1 and the ranges of the technologies are presented in Table 6.
The experiments that were performed in other areas produced the results that are shown in Figure 7a,b. In these experiments, we tested the Samambaia Campus with 300 IoT devices and 31 gateways to serve a 100-m range (Wi-Fi outdoor environment) with a 3 % bandwidth consumption and we tested 300 IoT devices and 19 gateways in the academic blocks of the Samambaia Campus with the same bandwidth consumption and a 25-m range (indoor environment).
The LoRa communication technology has as a remarkable long-distance range. Taking this characteristic into account, we conducted the experiments at the Samambaia Campus (outdoor environment). We considered a range of 500 m for the LoRa technology in the outdoor environment. The distribution of the gateways and IoT devices are presented in Figure 8. In the scenario in question, 7 gateways were required for 200 devices with 3% bandwidth consumption, as shown in Figure 8a. Figure 8b presents the results for the same scenario but for 300 devices with 3% bandwidth consumption, which demanded 10 gateways.
Table 10 presents a report of the execution of the optimization model when applied to the academic blocks of the Samambaia Campus. Table 10 shows the number of IoT devices that were served by each gateway. Taking into account the bandwidth consumption of 3%, each gateway could serve a maximum of 33 devices. In the presented results, the number of clusters/gateways that served the most IoT devices was the 17, serving 31 devices. The second column of the table shows the largest calculated distance between a device and the corresponding gateway within the respective cluster. It can be seen that no value in that column exceeded the range of the technology (25 m).
The results that are presented in these three scenarios show that the optimization model could be applied in different scenarios by changing the parameters according to the desired situation.
Some of the experiments that were applied to the INF scenario considered 100 devices that were communicating via Wi-Fi technology with varying demands for link capacity. The results are presented in Table 11. It can be seen that an increase in demand for bandwidth consumption caused an increase in the number of gateways, so the dispersion of the devices within the clusters was noticeable. Evidence for the dispersion can also be seen in the variations in the silhouette coefficient. Figure 9a shows the increases in the bandwidth demand and the number of gateways and Figure 9b shows the decrease in the coefficient.
The obtained results confirmed that varying the range of the communication technology and the demand for data link consumption directly influenced the required number of gateways.
It was also observed that the distribution of gateways and devices using this optimization model was not achieved using a clustering technique. In Section 5.2 and Section 5.3, the results from the placement of gateways using the K-means clustering model and the PSO model are presented, respectively.

5.2. K-Means Model: Clustering and Gateway Placement

The K-means clustering model uses Euclidean distance as a metric to divide the devices into n groups. The center of each group (centroid) is considered to be a gateway. This section presents the results of the application of the clustering model, taking into account the parameters presented in Table 9, which show the comparison between the three communication technologies (Wi-Fi, BLE, and LoRa) when varying the number of devices that were distributed in the area.
Table 12 presents the silhouette coefficients after running the K-means model. The results shown by the silhouette coefficients were good, proving the cohesion of the clustering. A comparative analysis between the silhouette coefficients from the K-means model and those from the other clustering models is presented in Section 5.4.
Graphically, it can be observed in Figure 10 that the clusters were formed by the devices that were close to the centroids, unlike the dispersion that was observed in Figure 6. The dispersion was verified by the silhouette coefficient. Analyzing the resulting positions from the K-means model using the LP model, it could be seen that the K-means model treated the gateways as the center of the cluster and, in this case, the radius of the technology was not a limiting factor in the clustering process (unlike the treatment from the LP model). In Section 5.3, the PSO model is addressed and in Section 5.4, a comparative analysis between the proposed models is presented, which found that in some cases with the clustering model, the distance between a device and a gateway could be greater than the range of the technology.

5.3. PSO Model: Clustering and Gateway Placement

The PSO positioning model was inspired by the collective movement of animals, such as a flock of birds or a school of fish. The model proposed in this research had two approaches: a simple PSO and a hybrid PSO. The difference between the approaches was in the initialization of the particles. In the simple approach, the particles initialized randomly within the search space and, depending on their initial position, moved during each iteration in search of the best global position. In the hybrid approach, the initialization of the particles occurred using the initialization model that was adopted in the K-means algorithm, called K-means++. The results of the two approaches are presented in Section 5.3.1 and Section 5.3.2, respectively.

5.3.1. Simple PSO

As with the K-means clustering model, Table 13 demonstrates the silhouette coefficient values from the simple PSO model. The variations in these coefficients came from variations in the adopted parameters, but they still showed good results regarding the cohesion of the clusters.
Figure 11 shows the distribution of gateways and IoT devices that was achieved using the PSO model (simple approach). In this model, it could be seen that the distribution of gateways allowed for a higher concentration in certain regions of the search area as well as other sparser regions, as shown in Figure 11b. This occurred because of the randomness of the initial positions of the particles, which interfered with the positioning results across the iterations. The initial positions could be concentrated in one region and by updating the positions of the particles using the velocity and the cognitive and social factors, this positioning was achieved.

5.3.2. Hybrid PSO

The hybrid PSO approach was a clustering model that aimed to improve the initial positioning of the particles using the initialization method that was adopted in the K-means model. The initialization was used in the first iteration and forced the centroids to be further away from each other.
When comparing the silhouette coefficients from the simple PSO model (Table 13) to those from the hybrid PSO model (Table 14), it could be seen that the larger coefficients were always from the hybrid approach, which confirmed that the better initial positioning of the particles resulted in better final positions.
The distribution of IoT devices and their corresponding gateways that resulted from the hybrid PSO model is presented in Figure 12. When comparing these results to those from the simple PSO model, it could be visually observed that the gateway positioning in the hybrid PSO model always maintained a better distribution within the desired area, especially when looking at Figures b and Figure 12b.
Figure 13 presents a comparison of the two PSO approaches. The comparison was carried out by summing the calculated Euclidean distances between the IoT devices and their respective gateways. The larger the sum of the distances, the less cohesive the cluster. In all of the presented runs, the hybrid PSO model had smaller sums of the distances, thereby proving that the clustering in the hybrid model was better.
The experiments presented in Section 5.1Section 5.3 were mainly aimed at testing how well the models worked. From those experiments, it was proved that it was possible to quantify, assign, and cluster the IoT devices and their gateways. A comparative analysis was performed to evaluate the four models: LP, K-means, simple PSO, and hybrid PSO. The analysis is described in Section 5.4.

5.4. Discussion: Comparative Analysis and Evaluation of Presented Results

The present work proposed three optimization models. The LP model aimed to quantify and position gateways by assigning IoT devices to a respective gateway within the desired area as a function of the radius and data link demand. The K-means model and the PSO model positioned the gateways according to the number that was defined by the LP model and distributed the IoT devices by considering the Euclidean distance between them.
For the three models in question, metrics could be abstracted for a comparative analysis. The silhouette coefficient was one of the metrics considered. Another factor taken into consideration was the sum of the Euclidean distances between the devices and their respective gateways. This result was calculated for each cluster and then totaled.
The models could be applied in several scenarios. In this work, we considered three scenarios: INF, the Samambaia Campus, and the academic blocks. The architecture of the buildings does not represent a regular geometric figure, which aroused interest in analyzing the behavior of the models.
Since we tested different scenarios, Table 15 presents the comparisons between the models within the same scenario. It can be seen that the total distances and the best silhouette coefficients were found by the K-means and hybrid PSO models. The K-means model defined the position of the centroids and, at each iteration, repositioned them to the center of the cluster. In this way, the clusters always had their gateways in the center. The hybrid PSO model defined the initial positions of the particles using the K-means initialization technique and led the particles to better initial positions, which was reflected throughout each iteration, thereby proving that once initialized well, particle movements tend to finalize well. The LP model showed good summations and silhouette coefficients, proving that they were cohesive. The simple PSO model did not perform as well as the hybrid approach in terms of clustering. When there was a good silhouette coefficient, it could be observed that the summation always tended to be lower because the devices were more cohesive with the centroid.
In relation to the greatest distance that was found between a device and a gateway (Table 15), it was observed that in some cases the greatest distance was greater than the range of the technology. In the LP model, this distance was always less than the radius, while in the K-means model and the simple PSO and hybrid PSO models, values that were greater than the range were found, which occurred because these models did not adopt the range as a restriction to the clustering process. Out of the proposed models, the only method that guaranteed the range was the LP model; on the other hand, this model was the only one to present a negative silhouette coefficient, as shown in Table 9. In the LP model, the gateways were activated to serve the devices that were in range. So, the larger the range, the more likely the silhouette coefficient was to be bad. Although the clustering models did not use the range as a criterion, they clustered the devices by considering the best position; in this case, it was a clustering process, not a gateway activation process.
In the presented clustering models, the number of gateways was informed based on the results of the LP model. It was possible to enter a larger number of gateways and obtain the greatest distance within the range of the technology. It is worth noting that the idea was to quantify the smallest possible number of gateways and the model achieved the expected result, as did the clustering process.
Throughout Section 5.1Section 5.3, the experiments were described considering the same parameters for each proposed model. It was concluded that the models corresponded to expectations. The experiments with the LP model only had one sample. In the performed tests, it was found that repetition with several samples and the same parameters returned the same result, matching the search for the best result. The clustering models presented different results for each sample because a random initial position was defined for each sample, which interfered with the final results. For evaluation purposes, 32 samples were run and the average of the silhouette coefficients and the total distances within the clusters were calculated to compare the models.
Table 16 presents the parameters that were applied in the experiments. In order to compare the results, six experiments were performed, all of which were applied in the INF scenario with an area of 2425 m 2 in an indoor environment.
The results presented in Table 17 and Table 18 show a comparison between the six experiments, using the total distance and the silhouette coefficient as metrics. The higher the total distance, the greater the distance between the devices and their respective gateways. The silhouette coefficient represented the cohesion of the clusters.
When analyzing the results, the smallest distance found was from the hybrid PSO model in Experiment 1 and the largest distance was from the LP model in Experiment 6. In almost all of the experiments, the largest distance found was from the LP model.
When comparing the total distances in each experiment, it was found that the hybrid PSO model stood out as having the smallest distance in four experiments; the K-means model was second in this ranking. Regarding the greatest distance, the LP model achieved the greatest total distance in four experiments, followed in the ranking sequence by the simple and hybrid PSO models.
The same evaluation was conducted for the silhouette coefficient. The lowest silhouette coefficient out of the experiments was verified using the LP model in Experiment 6, which was equivalent to the highest distance summation that was found. As can be observed in Figure 6f, there was no cohesion between the devices and the gateways as the negative coefficient that was ascertained by the model characterized a high degree of dispersion. The K-means model showed the best silhouette coefficient in Experiment 5, with a value above 0.5; the closer to 1, the more cohesive the cluster. There were other results of above 0.5: Experiment 3 with the hybrid PSO model ranked second; Experiment 3 with the K-means model and Experiment 5 with the hybrid PSO model ranked in joint third position. When only comparing the models within the same experiment, it could be seen that the hybrid PSO model stood out in four experiments (1, 3, 4, and 6) and the K-means model stood out in two (2 and 5). The smallest silhouette coefficients were from the LP model, which achieved the smallest results in four experiments (3, 4, 5 and 6), followed by the simple PSO model with the smallest results in Experiments 1 and 2.
It was possible to observe that each model had its own contribution that could be improved by inserting other parameters or constraints. The K-means and hybrid PSO models were the best models for clustering, but the linear programming model was the only one that restricted the devices within a range.
A statistical analysis using the Friedman test is presented in Section 5.5.

5.5. The Friedman Test

The Friedman test is a non-parametric statistical test that was developed by Milton Friedman, who was an economist, statistician, and writer [35]. This test is used to detect differences between treatments in various experiments, allowing a choice to be made between two or more hypotheses using the data from a given experiment. The objective of this test is to determine whether there are at least two samples that represent the populations of distinct means out of a set of n samples ( n 2 ). In this way, it is possible to detect significant differences between the behaviors of two or more metaheuristics [36].
The Friedman test was applied to our experiments in order to evaluate the optimization models. The arithmetic means of the silhouette coefficients and the summation of the distances were used as metrics.
The Friedman test is based on ranking the data, so the lowest ranking value is assigned to the best performing algorithm. This test returned a p-value that allowed the similarities between the proposed models to be evaluated. The p-value was compared to an α value, which represented the significance of the test. α = 0.05 was adopted; when the p-value < α , it was concluded that the algorithms were different. The degree of confidence was equal to 1 α . For α = 0.05 , we obtained a confidence level of 0.95 (or 95 % ).
Although the results showed whether or not there was a difference between the algorithms, it was not possible to know what was different. In view of this, the Friedman test compared the models and evaluated the differences between them. This comparison is called a post hoc test. Each comparison returned a value of p, which represented the similarity between the compared algorithms.
The tests were applied using the Keel (Knowledge Extraction based on Evolutionary Learning) software, which is a free software that was developed in Java by a group of researchers from Spain and the UK and is capable of performing various experiments involving data mining, including the Friedman test [36].
The test was applied using the data from the experiments presented in Table 17 and Table 18. The results are shown in Table 19, Table 20, Table 21 and Table 22. The standard deviations and the arithmetic means and medians of the silhouette coefficients were considered, along with the total distances between the gateways and the IoT devices.
When analyzing the ranking results presented in Table 19 and Table 21, it could be observed that the models all had a degree of similarity of less than 0.05 , indicating that the optimization models were different. When analyzing the rankings, the hybrid PSO model performed the best in terms of the silhouette coefficient metric. In terms of the sum of the distances between the devices and the gateways, we obtained a different result for each metric.
When evaluating the post hoc tests, which aimed to compare the models to each other, it was observed that the K-means and hybrid PSO models had a p-value of greater than 0.05 in all of the presented cases, which confirmed that these metaheuristics were similar. It is noteworthy that the hybrid PSO model initialized the particles using the same initialization technique as the K-means model, which justified the similarity that was found in the Friedman test. The LP and simple PSO models showed a similarity when evaluating the arithmetic means of the silhouette coefficients and the sums of the distances between the gateways and the IoT devices.
The four models presented in this paper contributed to the planning and deployment of IoT gateways in a smart campus environment. Based on the results, it was possible to choose which model best fit a specific case. In Section 6, the final considerations of this work are presented.

6. Conclusions

This paper presented an approach for planning and deploying IoT gateways in smart campus environments, using the minimum number gateways that was required for the desired area coverage. The application scenario for the experiments was the Samambaia Campus of the UFG. In this environment, some departments were chosen for indoor and outdoor experiments. The heterogeneity of IoT devices led us to think about environments with multiple communication technologies, considering the characteristics of each technology. Thus, the proposed model focused on the LoRa, Wi-Fi, and BLE technologies.
The linear programming-based model considered the desired area, the range of the technology, the consumption capacity of the data link, and the deployed IoT devices to return the lowest possible number of gateways and to subsequently position them. For positioning, we presented the linear programming, K-means, and PSO models.
The experiments were applied to four scenarios (INF, academic blocks, Samambaia Campus, and IFTO Palmas) and achieved considerable results for both the quantification model and the gateway positioning models. The problems that were addressed by the model have been considered as difficult to solve and as the number of devices increased, the size of the area and the demand for processing and memory also increased.
With the results of these experiments, a comparative analysis was conducted that allowed for the evaluation of the behavior of each model and the determination of their advantages. It was concluded that the results were satisfactory and proved the efficiency of the models in relation to the proposed objective. The IoT gateway quantification was accurate and respected the established range and data demands. The positioning models defined the positions of the gateways and created clusters of devices that were associated with a gateway.
With the presented optimization models, it would be possible to plan the required area coverage for establishing wireless communication technologies. This planning would reveal the amount of communication equipment that is needed and would define the best positions for that equipment to be installed.
This work offers contributions to the field of IoT gateway planning and deployment through the optimization model. Throughout the research, we envisioned studies that could be developed in the future.
For future work, we intend to improve the optimization models, both from a quantification and positioning point of view by:
  • Considering other parameters and constraints that may contribute to gateway quantification, with the goal of obtaining results that are even closer to the existing design;
  • Associating weights with the objective functions or processes that could improve gateway positioning using the clustering models;
  • Working on a model that can consider all three communication technologies simultaneously for gateway quantification.

Author Contributions

Conceptualization, D.F.J., C.S. and A.O.-J.; methodology, D.F.J., J.L.O., C.S., T.F., M.R., L.A.F., W.M. and A.O.-J.; software, D.F.J. and J.L.O.; validation, D.F.J., J.L.O., C.S., L.A.F. and A.O.-J.; formal analysis, D.F.J., C.S., L.A.F. and A.O.-J.; investigation, D.F.J., J.L.O. and C.S.; resources, W.M. and A.O.-J.; data curation, D.F.J.; writing—original draft preparation, D.F.J.; writing—review and editing, D.F.J., J.L.O., C.S., T.F., M.R., L.A.F., W.M. and A.O.-J.; visualization, D.F.J., J.L.O., C.S., T.F., M.R., L.A.F., W.M. and A.O.-J.; supervision, C.S., T.F., M.R., L.A.F., W.M. and A.O.-J.; project administration, A.O.-J.; funding acquisition, W.M. and A.O.-J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially funded by Fraunhofer Portugal (AICOS) and partially by the Federal University of Goiás (UFG). M.R. acknowledges financial support from the Fundação para a Ciência e a Tecnologia (FCT) under scholarship number SFRH/BD/138302/2018.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kumar, M.; Kumar, S.; Kashyap, P.K.; Aggarwal, G.; Rathore, R.S.; Kaiwartya, O.; Lloret, J. Green Communication in Internet of Things: A Hybrid Bio-Inspired Intelligent Approach. Sensors 2022, 22, 3910. [Google Scholar] [CrossRef] [PubMed]
  2. Spadaccino, P.; Crinó, F.G.; Cuomo, F. LoRaWAN Behaviour Analysis through Dataset Traffic Investigation. Sensors 2022, 22, 2470. [Google Scholar] [CrossRef] [PubMed]
  3. Almarzoqi, S.A.; Yahya, A.; Matar, Z.; Gomaa, I. Re-Learning EXP3 Multi-Armed Bandit Algorithm for Enhancing the Massive IoT-LoRaWAN Network Performance. Sensors 2022, 22, 1603. [Google Scholar] [CrossRef] [PubMed]
  4. Qadri, Y.A.; Nauman, A.; Zikria, Y.B.; Vasilakos, A.V.; Kim, S.W. The future of healthcare internet of things: A survey of emerging technologies. IEEE Commun. Surv. Tutor. 2020, 22, 1121–1167. [Google Scholar] [CrossRef]
  5. Dang, L.M.; Piran, M.J.; Han, D.; Min, K.; Moon, H. A survey on internet of things and cloud computing for healthcare. Electronics 2019, 8, 768. [Google Scholar] [CrossRef] [Green Version]
  6. Ghorbani, H.R.; Ahmadzadegan, M.H. Security challenges in internet of things: Survey. In Proceedings of the 2017 IEEE Conference on Wireless Sensors (ICWiSe), Kuching, Malaysia, 13–14 November 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–6. [Google Scholar]
  7. Said, O.; Masud, M. Towards internet of things: Survey and future vision. Int. J. Comput. Netw. 2013, 5, 1–17. [Google Scholar]
  8. Atzori, L.; Iera, A.; Morabito, G. The internet of things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
  9. Liu, X. A study on smart campus model in the era of big data. In Proceedings of the 2016 2nd International Conference on Economics, Management Engineering and Education Technology (ICEMEET 2016), Sanya, China, 12–13 November 2016; Atlantis Press: Dordrecht, The Netherlands, 2017. [Google Scholar]
  10. Gravalos, I.; Makris, P.; Christodoulopoulos, K.; Varvarigos, E.A. Efficient gateways placement for internet of things with QoS constraints. In Proceedings of the 2016 IEEE Global Communications Conference (GLOBECOM), Washington, DC, USA, 4–8 December 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 1–6. [Google Scholar]
  11. Venkatesan, V.P.; Devi, C.P.; Sivaranjani, M. Design of a smart gateway solution based on the exploration of specific challenges in IoT. In Proceedings of the 2017 International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud)(I-SMAC), Palladam, India, 10–11 February 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 22–31. [Google Scholar]
  12. Qiu, T.; Chen, N.; Li, K.; Atiquzzaman, M.; Zhao, W. How can heterogeneous internet of things build our future: A survey. IEEE Commun. Surv. Tutor. 2018, 20, 2011–2027. [Google Scholar] [CrossRef]
  13. Cardoso, K.; Jr, A.O.; Correa, S. SOFTWAY4IoT: SOFTware-defined gateWAY and fog computing for IoT (Internet of Things). In Proceedings of the WRNP 2019, Gramado, Brazil, 6–7 May 2019; Volume 1. [Google Scholar]
  14. Ali, H.M.; Liu, J.; Bukhari, S.A.C.; Rauf, H.T. Planning a secure and reliable IoT-enabled FOG-assisted computing infrastructure for healthcare. Clust. Comput. 2022, 25, 2143–2161. [Google Scholar] [CrossRef]
  15. Karthikeya, S.A.; Vijeth, J.; Murthy, C.S.R. Leveraging solution-specific gateways for cost-effective and fault-tolerant IoT networking. In Proceedings of the 2016 IEEE Wireless Communications and Networking Conference, Doha, Qatar, 3–6 April 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 1–6. [Google Scholar]
  16. Lima, M.P.; Carrano, E.G.; Takahashi, R.H. Multiobjective planning of wireless local area networks (WLAN) using genetic algorithms. In Proceedings of the 2012 IEEE Congress on Evolutionary Computation, Brisbane, Australia, 10–15 June 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 1–8. [Google Scholar]
  17. Capone, A.; Cesana, M.; Donno, D.D.; Filippini, I. Deploying multiple interconnected gateways in heterogeneous wireless sensor networks: An optimization approach. Comput. Commun. 2010, 33, 1151–1161. [Google Scholar] [CrossRef]
  18. Wu, W.; Luo, J.; Yang, M. Gateway placement optimization for load balancing in wireless mesh networks. In Proceedings of the 2009 13th International Conference on Computer Supported Cooperative Work in Design, Santiago, Chile, 22–24 April 2009; IEEE: Piscataway, NJ, USA, 2009; pp. 408–413. [Google Scholar]
  19. Lin, P.C. Optimal smart gateway deployment for the Internet of Things in smart home environments. In Proceedings of the 2015 IEEE 4th Global Conference on Consumer Electronics (GCCE), Osaka, Japan, 27–30 October 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 273–274. [Google Scholar]
  20. Taleb, S.M.; Meraihi, Y.; Gabis, A.B.; Mirjalili, S.; Ramdane-Cherif, A. Nodes placement in wireless mesh networks using optimization approaches: A survey. Neural Comput. Appl. 2022, 34, 5283–5319. [Google Scholar] [CrossRef]
  21. Rousseeuw, P.J. Silhouettes: A graphical aid to the interpretation and validation of cluster analysis. J. Comput. Appl. Math. 1987, 20, 53–65. [Google Scholar] [CrossRef] [Green Version]
  22. Friedman, M. The use of ranks to avoid the assumption of normality implicit in the analysis of variance. J. Am. Stat. Assoc. 1937, 32, 675–701. [Google Scholar] [CrossRef]
  23. Jinaporn, N.; Saengudomlert, P. Impact of Gateway Placement and Energy Consumption for Data Processing on Lifetime of IoT Networks. In Proceedings of the 2021 18th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Mai, Thailand, 19–22 May 2021; IEEE: Piscataway, NJ, USA, 2021; pp. 90–93. [Google Scholar]
  24. Rathod, N.; Sundaresan, R. Relay Placement Algorithms for IoT Connectivity and Coverage in an Outdoor Heterogeneous Propagation Environment. IEEE Access 2022, 10, 13270–13289. [Google Scholar] [CrossRef]
  25. Zhao, D.; Zou, Q.; Boshkani Zadeh, M. A QoS-Aware IoT Service Placement Mechanism in Fog Computing Based on Open-Source Development Model. J. Grid Comput. 2022, 20, 1–29. [Google Scholar] [CrossRef]
  26. Petroni, A.; Biagi, M. Interference Mitigation and Decoding Through Gateway Diversity in LoRaWAN. IEEE Trans. Wirel. Commun. 2022. [Google Scholar] [CrossRef]
  27. Majid, M.; Habib, S.; Javed, A.R.; Rizwan, M.; Srivastava, G.; Gadekallu, T.R.; Lin, J.C.W. Applications of Wireless Sensor Networks and Internet of Things Frameworks in the Industry Revolution 4.0: A Systematic Literature Review. Sensors 2022, 22, 2087. [Google Scholar] [CrossRef] [PubMed]
  28. Matni, N.; Moraes, J.; Oliveira, H.; Rosário, D.; Cerqueira, E. LoRaWAN Gateway Placement Model for Dynamic Internet of Things Scenarios. Sensors 2020, 20, 4336. [Google Scholar] [CrossRef] [PubMed]
  29. Maiti, P.; Apat, H.K.; Sahoo, B.; Turuk, A.K. An effective approach of latency-aware fog smart gateways deployment for IoT services. Internet Things 2019, 8, 100091. [Google Scholar] [CrossRef]
  30. Matni, N.; Moraes, J.; Rosário, D.; Cerqueira, E.; Neto, A. Optimal gateway placement based on fuzzy C-means for low power wide area networks. In Proceedings of the 2019 IEEE Latin-American Conference on Communications (LATINCOM), Salvador, Brazil, 11–13 November 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–6. [Google Scholar]
  31. MacQueen, J. Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Oakland, CA, USA, 1 January 1967; Volume 1, pp. 281–297. [Google Scholar]
  32. Thaljaoui, A.; Val, T.; Nasri, N.; Brulin, D. BLE localization using RSSI measurements and iRingLA. In Proceedings of the 2015 IEEE International Conference on Industrial Technology (ICIT), Seville, Spain, 17–19 March 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 2178–2183. [Google Scholar]
  33. Najnudel, M. Estudo de Propagação em Ambientes Fechados para o Planejamento de WLANs. Master’s Thesis, Pontifícia Universidade Católica do Rio de Janeiro, Departamento de Engenharia Elétrica, Rio de Janeiro, Brazil, 2004. [Google Scholar]
  34. Xu, W.; Kim, J.Y.; Huang, W.; Kanhere, S.S.; Jha, S.K.; Hu, W. Measurement, Characterization, and Modeling of LoRa Technology in Multifloor Buildings. IEEE Internet Things J. 2020, 7, 298–310. [Google Scholar] [CrossRef] [Green Version]
  35. Butler, E. Milton Friedman; Leya: Alfragide, Portugal, 2012. [Google Scholar]
  36. MESQUITA, E.d.M. Estudo Comparativo de Metaheurísticas Aplicadas ao Controle Preditivo Baseado em Modelo. Master’s Thesis, Universidade de Brasília, Brasília, Brazil, 2018. [Google Scholar]
Figure 1. The flowchart of the optimization model.
Figure 1. The flowchart of the optimization model.
Sensors 22 04710 g001
Figure 2. An example of area mapping using the Institute of Informatics, UFG.
Figure 2. An example of area mapping using the Institute of Informatics, UFG.
Sensors 22 04710 g002
Figure 3. An example of the results of device and gateway placement using the K-means method.
Figure 3. An example of the results of device and gateway placement using the K-means method.
Sensors 22 04710 g003
Figure 4. The Samambaia Campus and departments of UFG: (a) the Samambaia Campus; (b) the Institute of Informatics; (c) the academic blocks.
Figure 4. The Samambaia Campus and departments of UFG: (a) the Samambaia Campus; (b) the Institute of Informatics; (c) the academic blocks.
Sensors 22 04710 g004
Figure 5. An example of how IoT points and devices are plotted within the desired area by generating an x,y coordinate matrix.
Figure 5. An example of how IoT points and devices are plotted within the desired area by generating an x,y coordinate matrix.
Sensors 22 04710 g005
Figure 6. The plots of the devices and their respective gateways with a3% data link consumption (LP method): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRA technology with 100 devices and 4 gateways; (f) LoRA technology with 300 devices and 10 gateways.
Figure 6. The plots of the devices and their respective gateways with a3% data link consumption (LP method): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRA technology with 100 devices and 4 gateways; (f) LoRA technology with 300 devices and 10 gateways.
Sensors 22 04710 g006
Figure 7. The plots of the devices and their gateways (Wi-Fi technology): (a) the Samambaia Campus with 300 devices (outdoor environment); (b) the academic blocks with 300 devices (indoor environment).
Figure 7. The plots of the devices and their gateways (Wi-Fi technology): (a) the Samambaia Campus with 300 devices (outdoor environment); (b) the academic blocks with 300 devices (indoor environment).
Sensors 22 04710 g007
Figure 8. The plots of the devices and their gateways (LoRa technology; outdoor environment): (a) the Samambaia Campus with 200 devices and 7 gateways; (b) the Samambaia Campus 300 devices and 10 gateways.
Figure 8. The plots of the devices and their gateways (LoRa technology; outdoor environment): (a) the Samambaia Campus with 200 devices and 7 gateways; (b) the Samambaia Campus 300 devices and 10 gateways.
Sensors 22 04710 g008
Figure 9. Graphs showing the results of the experiments with variations in the demand for data link consumption: (a) the data link consumption × quantity of gateways; (b) the silhouette coefficient.
Figure 9. Graphs showing the results of the experiments with variations in the demand for data link consumption: (a) the data link consumption × quantity of gateways; (b) the silhouette coefficient.
Sensors 22 04710 g009
Figure 10. The clustering of IoT devices and their respective gateways using the K-means model: (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Figure 10. The clustering of IoT devices and their respective gateways using the K-means model: (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Sensors 22 04710 g010
Figure 11. The clustering of IoT devices and their respective gateways using the PSO model (simple approach): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Figure 11. The clustering of IoT devices and their respective gateways using the PSO model (simple approach): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Sensors 22 04710 g011aSensors 22 04710 g011b
Figure 12. The clustering of IoT devices and their respective gateways using the PSO model (hybrid approach): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Figure 12. The clustering of IoT devices and their respective gateways using the PSO model (hybrid approach): (a) BLE technology with 100 devices and 35 gateways; (b) BLE technology with 300 devices and 37 gateways; (c) Wi-Fi technology with 100 devices and 4 gateways; (d) Wi-Fi technology with 300 devices and 10 gateways; (e) LoRa technology with 100 devices and 4 gateways; (f) LoRa technology with 300 devices and 10 gateways.
Sensors 22 04710 g012
Figure 13. The comparison of the total distances between the IoT devices and their gateways using the simple and hybrid PSO models.
Figure 13. The comparison of the total distances between the IoT devices and their gateways using the simple and hybrid PSO models.
Sensors 22 04710 g013
Table 1. The measurements of the areas that were used in the use case.
Table 1. The measurements of the areas that were used in the use case.
Desired AreaSize of Area (m2)Type of Environment
INF2.425Indoor
Samambaia Campus761.380Outdoor
Academic Blocks26.664Indoor
Table 2. Comparison of network planning related works.
Table 2. Comparison of network planning related works.
AuthorObjectiveMethod of
Optimization
Technology
Comunication
Quantifies
Gravalos, Ilias, et al. [10]Minimize coast/
QoS
LP-Yes
Ali, Hafiz Munsub, et al. [14]Minimize coastevolutionary
algorithms
-No
Maiti, Prasenjit, et al. [29]Minimize latencyrandomized,
greedy,
k-median,
K-means and
simulated
annealing
-No

Karthikeya,
Surabhi Abhimithra,
J. K. Vijeth, and
C. Siva Ram
Murthy [15]
Minimize coastHeuristicsWi-Fi,
ZigBee,
RFID
Yes
Matni, Nagib, et al. [30]Minimize coast/
QoS
Fuzzy
C-means
LoraYes

Lima,
Marlon Paolo,
Eduardo G. Carrano,
and
Ricardo HC
Takahashi [16]
Minimize AP/
load
Genetic.
Algorithm
Wi-FiYes
Capone, Antonio, et al. [17]Minimize coast/
Max. energy efficiency
LP-Yes

Wu, Wenjia,
Junzhou Luo, and
Ming Yang [18]
Minimize gateways/
position
LP/
Heuristics
-No
Lin, Po-Chiang [19]Minimize coastLP-No
Table 3. The variables that were used for the LP optimization model, including the input parameters and data that were generated from the input parameters.
Table 3. The variables that were used for the LP optimization model, including the input parameters and data that were generated from the input parameters.
VariableDescription
rRange of the communication technology
nNumber of deployed devices
cDevice bandwidth consumption
c b Total link communication capacity
A i , j All possible points within the desired area
D i , j Coordinates of the deployed devices
M d i s t i , j Distance matrix (measured between the point of a
device and the points of the other deployed devices)
M a t i v i , j Binary matrix (where 0 indicates that the distance between the
devices is not within range and 1 indicates that the distance
between the devices is within the range of the technology)
Table 4. The variables that were used in the K-means clustering model, including the input parameters.
Table 4. The variables that were used in the K-means clustering model, including the input parameters.
VariableDescription
kNumber of gateways/devices to be deployed
equals the number of centroids
nNumber of deployed devices
D i , j Coordinates of the deployed devices
A i , j All coordinates of the possible points
within the desired area
Table 5. The variables that were used for the PSO model.
Table 5. The variables that were used for the PSO model.
VariableDescription
nNumber of deployed devices
gNumber of gateways/centroids
A i , j Desired area/all possible points
D i , j Coordinates of the deployed devices
wInertia factor ( w i n i t i a l / w f i n a l )
m i Maximum iterations
c 1 , c 2 Constants (equivalent to the cognitive and social coefficients)
r 1 , r 2 Random constants (generated with values between 0 and 1)
p b e s t i Best position of each particle
g b e s t Best global position
p i Position vector of particle i within the search space
v i Velocity vector of particle i
Table 6. The ranges of the communication technologies that were adopted in the use case.
Table 6. The ranges of the communication technologies that were adopted in the use case.
TechnologyRange (m)EnvironmentReference
BLE5Indoor[32]
Wi-Fi25Indoor[33]
LoRa70Indoor[34]
Table 7. The matrix of the distances between devices, which was used by the LP model to generate the activation matrix.
Table 7. The matrix of the distances between devices, which was used by the LP model to generate the activation matrix.
0123456789
00.025.510.210.4421.3811.711.421.9323.7722.36
125.50.018.3833.427.2813.8934.0620.225.03.16
210.218.380.015.2612.536.0815.8112.2115.2615.62
310.4433.4215.260.027.7819.81.023.0230.5330.48
421.387.2812.5327.780.010.028.313.042.836.08
511.713.896.0819.810.00.020.5215.8112.1710.82
611.434.0615.811.028.320.520.023.0931.0631.14
721.9320.2212.2123.0213.0415.8123.090.015.319.0
823.775.015.2630.532.8312.1731.0615.30.05.0
922.363.1615.6230.486.0810.8231.1419.05.00.0
Table 8. The matrix that was used by the LP model to generate the gateway activation.
Table 8. The matrix that was used by the LP model to generate the gateway activation.
0123456789
01011111111
10110110111
21111111111
31011011100
41110110111
51111111111
61011011100
71111111111
81110110111
91110110111
Table 9. The number of required gateways considering the INF area and bandwidth consumption variations.
Table 9. The number of required gateways considering the INF area and bandwidth consumption variations.
Tech
Comms
Quantity
Devices
Range
(m)
Gateways
(Demand 3%)
Silhouette
(Demand 3%)
Gateways
(Demand 0%)
Silhouette
(Demand 0%)
BLE1005350.35794350.35794
BLE3005370.28183370.29547
Wi-Fi1002540.1063530.35984
Wi-Fi3002510−0.0783330.33021
LoRa100704−0.233051-
LoRa3007010−0.159281-
Table 10. The result of the gateway quantification experiments in the academic blocks scenario with 300 devices that were communicating via Wi-Fi technology, as presented in Figure 7b.
Table 10. The result of the gateway quantification experiments in the academic blocks scenario with 300 devices that were communicating via Wi-Fi technology, as presented in Figure 7b.
Quantity of
Devices/Gateways
Increased Distance
Between Device/Gateway
Sum of the Distance Between
Device/Gateway
ClusterSilhouette
Coefficient
2125338.6200.31363
1925286.121
2124.7361.362
1724.02205.543
1624.7263.594
2025283.565
1022.56153.046
1124.35143.47
1724.08231.68
1824.17242.79
1124.76179.0610
1525268.5411
1324.33185.2112
1523.41230.1513
1323.19197.414
1624.02247.6515
1023.71155.1716
3124.7499.3817
622.47107.0818
Total Distance:4579.17
Table 11. The results of the experiments with variations in the demand for data link consumption (LP method).
Table 11. The results of the experiments with variations in the demand for data link consumption (LP method).
AreaTechnologyQuantity of DevicesDemandQuantity of GatewaysSilhouette Coefficient
INFWi-Fi100030.35984
INFWi-Fi100230.34473
INFWi-Fi100340.09411
INFWi-Fi100440.05009
INFWi-Fi100550.06368
INFWi-Fi1001010−0.12747
INFWi-Fi1001517−0.20703
INFWi-Fi1002020−0.21001
INFWi-Fi1003034−0.38046
Table 12. The silhouette coefficients after applying the K-means model, considering the number of gateways that resulted from the application of the LP model.
Table 12. The silhouette coefficients after applying the K-means model, considering the number of gateways that resulted from the application of the LP model.
Communication
Technology
Number of
Devices
Range
(m)
Number of Gateways
(Demand 3%)
Silhouette Coefficient
(Demand 3%)
BLE1005350.42388
BLE3005370.38236
Wi-Fi1002540.50848
Wi-Fi30025100.37390
LoRa1007040.50848
LoRa30070100.37390
Table 13. The silhouette coefficients after applying the PSO positioning model (simple approach), considering the number of gateways that resulted from the application of the LP model.
Table 13. The silhouette coefficients after applying the PSO positioning model (simple approach), considering the number of gateways that resulted from the application of the LP model.
Communication
Technology
Number of
Devices
Range
(m)
Number of Gateways
(Demand 3%)
Silhouette Coefficient
(Demand 3%)
BLE1005350.23778
BLE3005370.24597
Wi-Fi1002540.45798
Wi-Fi30025100.31159
LoRa1007040.45150
LoRa30070100.31159
Table 14. The silhouette coefficients after applying the hybrid PSO model, considering the number of gateways that resulted from the application of the LP model.
Table 14. The silhouette coefficients after applying the hybrid PSO model, considering the number of gateways that resulted from the application of the LP model.
Communication
Technology
Number of
Devices
Range
(m)
Number of Gateways
(Demand 3%)
Silhouette Coefficient
(Demand 3%)
BLE1005350.36686
BLE3005370.37331
Wi-Fi1002540.50842
Wi-Fi30025100.37530
LoRa1007040.50842
LoRa30070100.37530
Table 15. The distance summations and silhouette coefficients of the experiments that were performed in the three scenarios, considering 300 devices and Wi-Fi communication technology.
Table 15. The distance summations and silhouette coefficients of the experiments that were performed in the three scenarios, considering 300 devices and Wi-Fi communication technology.
ModelAreaRange
(m)
Number of
Gateways
Summed
Distance
Silhouette CoefficientIncreased Distance
Between Devices
and Gateways
LPSamambaia
Campus
1003117,359.730.3881295.82
Simple
PSO
Samambaia
Campus
1003120,554.470.29233120.49
Hybrid
PSO
Samambaia
Campus
1003114,796.270.4076492.98
K-meansSamambaia
Campus
1003114,965.470.40943114.85
LPAcademic
block
25194604.60.3067524.74
Simple
PSO
Academic
Blocks
25195384.960.2708824.52
Hybrid
PSO
Academic
Blocks
25193982.10.3922429.57
K-meansAcademic
Blocks
25193974.860.3896427.01
Table 16. The parameters that were applied in the experiments.
Table 16. The parameters that were applied in the experiments.
ExperimentCommunication
Technology
Range
(m)
Number
of Devices
Number of Gateways
(Demand 3%)
1BLE510035
2BLE530037
3Wi-Fi251004
4Wi-Fi2530010
5LoRa701004
6LoRa7030010
Table 17. The comparison of the total distance metric (average), considering the experiments that were performed using the same parameters.
Table 17. The comparison of the total distance metric (average), considering the experiments that were performed using the same parameters.
ExperimentK-Means
Summed Distance
LP
Summed Distance
Simple PSO
Summed Distance
Hybrid PSO
Summed Distance
1196.80823220.14000315.47147196.06500
2809.21433939.620001154.329251779.13501
3885.484681289.350001056.12834885.49252
41776.561604261.130002206.502631775.86463
5885.507711289.350001050.06652885.48468
61776.561608916.600002206.502631775.86463
Table 18. The comparison of the silhouette coefficient metric (average), considering the experiments that were performed using the same parameters.
Table 18. The comparison of the silhouette coefficient metric (average), considering the experiments that were performed using the same parameters.
ExperimentK-Means
Silhouette Coefficient
LP
Silhouette Coefficient
Simple PSO
Silhouette Coefficient
Hybrid PSO
Silhouette Coefficient
10.423340.357940.237780.42535
20.382120.281930.245970.37331
30.508420.094110.429840.50845
40.37390−0.078330.311590.37530
50.508480.094110.451490.50842
60.37390−0.159280.311590.37530
Table 19. The results from the Friedman test: the ranking applied to the arithmetic mean values and the sums of the distances between the gateways and the IoT devices.
Table 19. The results from the Friedman test: the ranking applied to the arithmetic mean values and the sums of the distances between the gateways and the IoT devices.
ModelRanking
LP1.50000
Simple PSO1.83330
K-means3.33330
Hybrid PSO3.33330
p-value0.01694
Table 20. The results from the Friedman test: the comparison between each metaheuristic using the arithmetic means of the sums of the distances between the gateways and the IoT devices.
Table 20. The results from the Friedman test: the comparison between each metaheuristic using the arithmetic means of the sums of the distances between the gateways and the IoT devices.
Comparisonp-Value With α = 0.05
K-means vs. LP0.01391
LP vs. Hybrid PSO0.01391
K-means vs. Simple PSO0.04417
Simple PSO vs. Hybrid PSO0.04417
LP vs. Simple PSO0.65472
K-means vs. Hybrid PSO1.00000
Table 21. The results from the Friedman test: the ranking applied to the arithmetic mean values of the silhouette coefficients.
Table 21. The results from the Friedman test: the ranking applied to the arithmetic mean values of the silhouette coefficients.
ModelsRanking
Hybrid PSO1.33330
K-means1.66670
Simple PSO3.33330
LP3.66670
p-value0.00200
Table 22. The results from the Friedman test: the comparison between each metaheuristic using the arithmetic means of the silhouette coefficients.
Table 22. The results from the Friedman test: the comparison between each metaheuristic using the arithmetic means of the silhouette coefficients.
Comparisonp-Value With α = 0.05
LP vs. Hybrid PSO0.00175
Simple PSO vs. Hybrid PSO0.00729
K-means vs. LP0.00729
K-means vs. Simple PSO0.02535
K-means vs. Hybrid PSO0.65472
LP vs. Simple PSO0.65472
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Ferreira, D., Jr.; Oliveira, J.L.; Santos , C.; Filho, T.; Ribeiro, M.; Freitas, L.A.; Moreira, W.; Oliveira-Jr, A. Planning and Optimization of Software-Defined and Virtualized IoT Gateway Deployment for Smart Campuses. Sensors 2022, 22, 4710. https://doi.org/10.3390/s22134710

AMA Style

Ferreira D Jr., Oliveira JL, Santos  C, Filho T, Ribeiro M, Freitas LA, Moreira W, Oliveira-Jr A. Planning and Optimization of Software-Defined and Virtualized IoT Gateway Deployment for Smart Campuses. Sensors. 2022; 22(13):4710. https://doi.org/10.3390/s22134710

Chicago/Turabian Style

Ferreira, Divino, Jr., João Lucas Oliveira, Carlos Santos , Tércio Filho, Maria Ribeiro, Leandro Alexandre Freitas, Waldir Moreira, and Antonio Oliveira-Jr. 2022. "Planning and Optimization of Software-Defined and Virtualized IoT Gateway Deployment for Smart Campuses" Sensors 22, no. 13: 4710. https://doi.org/10.3390/s22134710

APA Style

Ferreira, D., Jr., Oliveira, J. L., Santos , C., Filho, T., Ribeiro, M., Freitas, L. A., Moreira, W., & Oliveira-Jr, A. (2022). Planning and Optimization of Software-Defined and Virtualized IoT Gateway Deployment for Smart Campuses. Sensors, 22(13), 4710. https://doi.org/10.3390/s22134710

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