This work is divided into two sections that offer novel contributions to the rapid implementation of WSNs required for various services in smart cities. This section divides the model into (a) WSN sizing and (b) WSN routing.
3.1. Wireless Sensor Network Sizing
For WSN sizing, a square area of L by L m in an open space is assumed. The data aggregation points (DAPs) will be located in this area to achieve the connectivity of wireless IoT sensors. The DAPs are assumed to enable the connectivity of the sensors within a coverage radius of R m; consequently, the wireless sensors can be at any position within the bounded region.
The DAPs can be located at any position within the region and installed on street lighting poles or elevated areas. In this way, the mathematical model minimizes the cost in terms of the lowest number of DAPs. Moreover, the variables used to cover the wireless sensors are described below. A set of N sensors is installed in different areas of the region; additionally, we consider a set of M possible locations or candidate sites where the are DAPs deployed.
The possible location that was previously described is a candidate for a place where a DAP could be installed or sited; therefore, it will not be mandatory for a DAP to be installed at that location unless it covers a percentage of the sensors. The model defines that a wireless sensor is covered if it is within a distance
R from at least one DAP; the Haversine distance (
) is used to consider the Earth’s curvature for geo-referenced points [
31].
A candidate site is considered an active site if a DAP is enabled or installed on the candidate site. Each DAP has a limited capacity in terms of the sensors. From the above details, an optimization problem is defined that aims to find the minimum number of active sites such that at least a percentage P of the sensors are covered.
It is necessary to define a set of candidate sites, where the j-th position is given by . A set of sensors or wireless devices is also defined. The position of the i-th sensor is given by .
We define the quantity , which implies that if sensor i is covered by DAP j, then the value is 1; otherwise, the value is 0. Thus, for each candidate site, the quantity is defined, which implies that the value is 1 when candidate site j is an active site.
In the same way, for each sensor , the quantity is defined when the value is one, which indicates that the sensor is covered by at least one candidate site. C is defined as the capacity of the DAPs to accommodate sensors. The optimization model for the sizing is presented below:
Objective function:
which is subject to:
where
- -
The percentage P of sensors are covered in a delimited area or region.
- -
The term N defines the number of sensors in a delimited area or region.
- -
The term M defines the number of candidate sites in a delimited zone or region.
- -
The number of covered DAPs is . If a sensor i is covered by a DAP j, is 1 and 0 otherwise.
- -
For each candidate site, is defined, where is 1 if the candidate site is active and 0 otherwise.
- -
indicates if sensor i is connected to DAP j. is 1 if the connection exists, and 0 otherwise.
Before applying the optimization model that aims to minimize the number of candidate sites for the DAPs, it is necessary to make an on-site visit to verify the availability of the candidate sites for use as inputs for the optimization model.
3.2. Wireless Sensor Network Routing
This work suggests three sub-models for the routing of wireless sensor networks with variations that are important to note when planning the deployment of a communication network.
3.2.1. Routing Based on Graph Theory
A set of sensors is defined and connected using one-way wireless communication links. Then, if a link exists between sensor A and sensor B, it is denoted as ; in this way, A can send data directly to B. The link has a weight or distance (Haversine for geo-referencing) that is associated and denoted as .
Here, the concept of graph theory becomes essential, and we define V as the set of sensors and E as the set of existing links (partial or complete mesh topology). Therefore, graph theory describes as a directed graph that represents a network topology. Below, a data stream must be transmitted from a source sensor named S to a destination sensor called T. This flow is transmitted through the intermediate sensors using existing links. The flow between a pair of sensors belonging to V represents the information’s source and destination.
Then, if we define a path P of the set of sensors, we will have that such that the links . Thus, we define the path length P as , which is given by , and define a path for the flow as a path such that and .
In addition, the path with the minimum distance is defined as the path such that for any other possible path . The optimization problem posed in this paper then requires one to find the path with the minimum distance for the flow .
To write this optimization problem, it is required to define the variable , where the link is assumed to exist and has a value of 1 if the link belongs to the path ; otherwise, the value is 0. Similarly, for a sensor , we define as the set of outgoing links of i. We define as the set of incoming links of i.
Objective function:
which is subject to:
3.2.2. Multicast Routing
This second model proposed for the routing of the wireless sensor network considers a set of sensors connected by bi-directional communication links. For example, if between sensor A and sensor B, there is a link denoted as , then A can send data directly to B and B can send information directly to A. Furthermore, the link will have a cost, weight, or distance associated with it and is given by .
It is important to note that the link is arbitrary in the ordering of a and b; that is, represents the same as ; therefore, the link can be named as , where i is the index of the link.
Now, we define V as the set of sensors, E as the set of existing links, and as an undirected graph; additionally, this represents a set of unordered pairs of elements of V and, thus, the network topology. An undirected graph indicates that the links are all bidirectional. For this stage, the optimization model seeks to find a minimum-cost spanning tree, which is defined as an undirected graph in which a single path connects any two vertices; that is, a tree is a connected graph with no loops.
Hence, for this problem, we define the set as the set of wireless sensors and we define a tree as a set of links such that the links ∈ E. According to this, the cost of tree A can be defined as and is represented by .
Thus, the minimum-cost tree is defined as tree such that “” for any other possible tree. The problem started as the need to find a minimum-cost tree, which requires the definition of certain variables, such as , and the establishment of the link that exists and where has a value of 1 when the link belongs to the solution tree A. Otherwise, the value is 0; furthermore, a subset B of any sensors belonging to the same set A is defined within the group of sensors V.
Thus, the problem is defined as the cost minimization of the chosen links and is subject to the constraint that the sensors are connected with links, where N is the number of sensors belonging to V.
Objective function:
which is subject to:
3.2.3. Multiple Flow Routing
For the third routing case of the wireless sensor network, a set of sensors is assumed to be connected via unidirectional wireless links. If a link exists between node A and node B, denoted as , then A can send data directly to B. The link has an associated weight or distance and is given by ; additionally, the capacity of the link is given by . Thus, V is defined as the set of sensors, E as the set of existing links, and as a directed graph that represents the network topology.
On the other hand, we assume a set of data flows that require the transmission of data from a source node to a destination sensor ; this requirement refers to the link capacity in terms of the flow and is determined by . The flow is transmitted through the intermediate sensors by using existing links. A flow between a pair of sensors belonging to V represents the source and destination sensors.
To define the optimization model, it is necessary to define a path P as a set of sensors such that the sensors ∈ E; in addition, we define the length of the path P as , which is given by . We then define the path for the flow as a path such that and .
The minimum-distance path is defined as the path such that for any other possible path . A possible route is defined as a route that contains links that exist within the topology and that can transmit the flows passing through them.
In this way, the optimization problem that seeks to find the minimum-distance path is defined by considering the flows belonging to F.
To determine the problem in the field of optimization, it is required to define the variable ; for this, it is assumed that the link exists and that has a value of 1 if the link belongs to the path ; that is, the k-th flow uses the link ; otherwise, the value is 0.
Similarly, for a sensor , is defined as the set of outgoing links of i and is defined as the set of incoming links of i.
Overall, the model supporting the above is as follows:
Objective function:
which is subject to:
In this way, as with multicast routing, one can seek to determine the tree with the minimum cost allowed by the downstream Dijkstra algorithm; however, in this case, it is necessary to subtract the capacity of the links of the current network from the transmission rate of the current flow over the links affected by the same link [
32,
33].
The pseudocode for the optimal sizing of the wireless sensor network is presented in the
Algorithm 1, and the pseudocode with the optimal routing according to the sizing results is presented in the
Algorithm 2; furthermore,
Table 2 summarizes the variables used in Algorithms 1 and 2.
Algorithm 1: Sizing of Wireless Sensor Networks |
- Paso: 1
Definitions Inputs: ; ; ,
; R, ; P, ;
Output: min; - Paso: 2
Set ; - Paso: 3
Set 0; forall j=1 to M forall i=1 to N ; endforall endforall - Paso: 4
Apply the optimization model for sizing (Equations ( 1) to (5)); - Paso: 5
Return min:;
|
Algorithm 2: Routing of Wireless Sensor Networks |
- Paso: 1
Definitions Inputs: ; ; Output: - Paso: 2
Set ; - Paso: 3
Set 0; forall j=1 to M+N forall i=1 to M+N if then endif if then endif if then endif endforall endforall - Paso: 4
- Paso: 5
Set forall ; while ; ; endwhile endforall - Paso: 6
Return: ;
|