1. Introduction
Cyber-Physical Systems (CPSs) have great influence on the way we observe and change the world. Deploying cyber-physical systems (CPS) have emerged as a new trend in the development of industrial informatization and has attracted the attention of both academia and industry [
1,
2]. In a CPS, information regarding the monitoring area within a local area is acquired using a large number of micro-sensor nodes and a multi-hop, self-organizing wireless sensor network is created through wireless communication, and transport delay, data security are important topics [
3,
4,
5]. When evaluating CPS performance, the gateway is typically the bottleneck because the majority of the network traffic converges at this point. A non-uniform service quality exists among the notes, in which the nodes that are closer to the gateway receive better service, while the nodes that are farther away receive lower-quality service. Thus, the deployment of the gateway has a great impact on the real-time performance and reliability of CPS information transmission.
In CPS, data transmission usually takes advantage of wireless communication. Due to the rapid development of wireless communication technology, CPS with multiwireless technology or heterogeneous sensors coexisting become familiar. Different wireless communication technologies are complementary but also bring challenges. One of the biggest challenges is that these technologies cannot communicate mutually. Under this condition, a wireless mesh network (WMN) is a feasible wireless network architecture. The WMN is a new type of wireless access technology that can effectively connect various types of sensing devices and has become widely used in CPS. Its advantages include the multi-hop feature, easy maintenance, wide coverage and low deployment cost. The majority of the traffic in a WMN converges at the gateway; therefore, the nodes that are closer to the gateway receive a better service quality, whereas the service quality for the nodes that are further away from the gateway is lower. Thus, the gateway remains the bottleneck, restricting the network performance. This highlights the importance of gateway deployment in WMN design. Currently, there are two types of WMN gateway deployments [
6]: one is to select
K network nodes from the existing network nodes as the gateways, referred to as the vertex
K-center problem, and the method is searching for local optimal in a discrete space. The other is to choose
K positions from the plane in which the node is located to deploy gateway nodes, referred to as the geometric
K-center problem. This method is searching for a global optimal in a continuous space. The former is simple and easy to implement but has poor performance in comparison to the latter. While the latter may perform better, it is difficult to solve.
Many developments have resulted from research on vertex
K-center WMN gateway deployment. Node clustering, in which network nodes are divided into different clusters and the center of the cluster becomes the gateway location, was proposed by Bejerano and has been widely applied in various studies [
7]. He et al. [
8] proposed degree-based and weight-based heuristic algorithms, using the network adjacency matrix as the data model in order to minimize the number of gateways and to minimize the longest path between the nodes and the gateway. A zero-degree gateway selection method was also proposed [
9], in which network nodes were grouped according to their connectivity, and then a gateway was selected for each group. An integer programming model for gateway selection was proposed by Valerio [
10]. The gateway deployment problem was also studied in combination with the routing problem [
11], and the shortest path cost matrix was used to solve the problem. Some intelligent algorithms (such as simulated annealing (SA), PSO) are used to solve the vertex
K-center problem [
12,
13].
In the vertex
K-center problem, gateway nodes are selected from existing nodes, so their optimization is constrained by the structure of the network. Thus, a globally optimal solution is typically not found. It has been proposed that appropriate locations in the geometric plane of a WMN should be selected to deploy the gateway, and the gateway deployment problem based on this method is known as the geometric
K-center problem. Gateway deployment method based on the geometric
K-center problem has been shown to be more adaptable, as well as more complex, than the ones based on the vertex
K-center problem because it is searching for global optimal in continuous space. The geometric
K-center problem of wireless network gateway deployment is essentially a classical mathematical problem. The basic properties and the computational complexity of the geometric
K-center problem using graph theory and using the unit disc theory to solve the geometric
K-center problem have been researched by Plesnik and Megiddo [
14,
15,
16]. The concept of a maximum common coverage area was proposed using the unit disc theory, and the relevant theoretical analysis is provided in reference [
6]. Some methods aiming to solve single-hop wireless network gateway deployment are proposed [
17,
18]. The gateway deployment methods described above are applicable to general wireless networks. However, they are not suitable for multihopWMN. In order to convert the geometric
K-center problem into a vortex
K-center problem, a planar cutting method was proposed using the unit disc theory [
19], and the geometric
K-center problem was solved directly using the spatial continuous search ability of PSO [
20].
The PSO algorithm is a classic intelligent optimization algorithm. Its implementation is simple and easy, as it does not require gradient information and only requires a few parameters. The characteristics of real number coding are suitable for solving continuous optimization and other problems. However, PSO is prone to trapping in a local optimum and many strategies have been proposed in order to improve this, including addressing the inertia weight, an asynchronous time-varying learning factor, and the development of a PSO with a contraction learning factor and domain topology [
21,
22]. These improvements shown, however, have not been particularly satisfactory. In the study described in reference [
23], the individual optimum pbest and population optimum gbest in the PSO algorithm were eliminated, and a competition mechanism was introduced into the particle swarm, which essentially changed the particle search mechanism: in short, a competition-based CSO (competitive swarm optimizer) algorithm was proposed in an effort to effectively avoid precocious particles and local optimum trapping, as well as to lower the computation cost. This paper adopts a novel CSO algorithm in order to solve the problem of WMN gateway deployment.
2. CPS WMN Gateway Deployment Model
CPS obtains the information of the physical world through many sensors and impacts the environment by actuators. Wireless networks have been widely used in cyber-physical systems (CPS) for data transmission. A CPS usually contains lots of sensors, and these sensors generate massive data. A number of special nodes must be utilized as the network gateway, collecting information acquired by the wireless sensory network and gaining access to the Internet, in order to achieve cross-region information acquisition, and WMN is a feasible wireless network architecture.
Figure 1 shows a gateway deployment diagram that includes the entire network transmission model, consisting of sensor nodes, routing nodes and gateway nodes. The sensor nodes are used to sense environmental information, the routing nodes are used to forward information sent between nodes, and the gateway nodes are used to access the Internet. The network characteristic is that most of the traffic converges on the gateways. The service quality is better for nodes closer to the gateway node; however, for nodes far from the gateway node, the quality of service is poor. In other words, the quality of service is not equally distributed between nodes. Therefore, the gateway nodes often become the bottleneck of network performance, and whether the deployment of the gateway nodes is reasonable has a large impact on network performance.
A WMN is a self-organizing multi-hop mobile network in which the maximum communication coverage of an access point (AP) node is limited by the node’s transmission power. Thus, it is a circle with a fixed radius. AP nodes within the coverage radius are connected with one hop, forming a multi-hop network topology. The distance between a gateway and its farthest AP node has a great impact on network communication quality. The main goal of WMN gateway deployment is to maximize a network’s communication quality by adjusting the gateway location.
WMN topology can be represented by , and all AP nodes in the network can be represented using a point set . If the coordinates of a node are , in which , then when the distance between any two nodes is no greater than r, namely, when , and can be considered as adjacent nodes. The connection between any two adjacent nodes in the network is an undirected edge whose weight is set to 1. Adjacent nodes are thus said to be connected by one hop. All inter-node edges constitute the edge set, , of graph G.
A WMN must establish a gateway in order to provide service for all of the AP nodes. The service gateway for each AP node is then chosen based on which gateway is the closest i.e., is the fewest number of hops away. If it is assumed that all of the k gateway nodes have been selected in a network (G) of size n, G’s adjacency matrix is , where , and the shortest distance matrix is , in which is the minimum number of hops from node to node . If , then the AP node will choose gateway as its service gateway. Therefore, the service set of gateways, , includes , namely, . Th maximum distance between and the nodes in its service set is , which is referred to as the coverage radius of gateway . The maximum coverage radius of a gateway node, , is called the coverage radius of the gateway set , also known as the hop from the AP nodes to the gateway set.
The smaller the coverage radius of a gateway set is, the higher the quality of service the AP nodes will obtain. Therefore, the coverage radius of a gateway set is an important evaluation index for gateway deployment. The goal of WMN gateway deployment optimization is to minimize the coverage radius of a gateway set, that is, to minimize the path length. The model is as follows:
where
is the two-dimensional plane in which graph
G is located.
3. Geometric K-Center Problem of WMN Gateway Deployment
There are two types of CPS WMN gateway deployment options: one is to choose the gateway from the K nodes in the existing network, which is referred to as the vertex K-center problem; the other option is to choose gateway nodes K positions from the plane in which the nodes are located, and these K gateway nodes are not necessarily existing network nodes, which is referred to as the geometric K-center problem. The former has a poor performance but is simple and easy to implement, while the latter performs better but is difficult to solve.
There are two types of CPS WMN gateway deployment: one is to choose K nodes from the existing network nodes to act as the gateways, called the vertex K-center problem. The other is to choose K positions from the plane in which the nodes are located to deploy gateway nodes, where these K gateway nodes are not necessarily existing network nodes, called the geometric K-center problem. The former is simple and easy to implement but results in poorer performance, while the latter performs better but is difficult to solve.
Figure 2A is a 7-node network topology, in which the node degree is 2. The network forms a connected closed loop, and the node’s maximum coverage is a circle with a fixed radius. The weight of any given edge is set to be the number of hops between the gateway and the node.
Figure 2B shows the gateway deployment method based on the vertex
K-center problem, in which an AP node is selected from
as a gateway, and the global optimal coverage radius is 3.
Figure 2C shows the gateway deployment method based on the geometric
K-center problem, in which a suitable location on the plane is chosen to place the gateway, and the coverage radius drops to 2.
The number of gateways deployed for the topology shown in
Figure 2A is two. When the vertex
K-center deployment approach is used, as shown in
Figure 3A, the coverage radius for the network is two. When the geometric
K-center deployment approach is used, as shown in
Figure 3B, the gateway is deployed at the geometric center and the coverage radius drops to one.
According to the above analysis, the vertex K-center problem, which is simple and easy to implement, involves deploying each gateway at a WMN node; the geometric K-center problem involves deploying each gateway anywhere in the network plane, the flexibility in terms of gateway location can thus, theoretically, be used to achieve a global optimum.
4. CSO-Based Geometric K-Center Gateway Deployment in CPS
The PSO algorithm is a stochastic search and intelligence heuristic algorithm, which can search extremums in continuous high dimensional space, and has a balanced spatial and local search ability, which is fast and not easy to fall into the local optimal solution, so it is very suitable to use when solving the problem of WMN gateway deployment. However, because its search mechanism involves constant updates regarding the particles’ position and speed according to the individual optimum (pbest) as well as the population optimum (gbest), it is computationally expensive and is prone to falling into local optima and premature convergence. In order to address this issue, a competition mechanism can be used in order to update the particles instead of using the individual or population optimum [
6]. Therefore, in this study, a competition-based CSO algorithm is adopted in order to solve the geometric
K-center gateway deployment problem in a WMN.
4.1. Search Mechanism of the CSO Algorithm
A swarm of
n particles flying in an
m-dimensional space and searching for an optimum can be randomly divided into
pairs, assuming that
n is an even number, at any point in time. Subsequently, competition exists between the two particles in the same pair and the particle that is fitter wins. The winner maintains its state and directly enters the next moment; the loser learns from the winner, updating both its position and speed, and then moves on to the next moment. In summary, at any point in time, each particle participates in the competition once, and
particles will update their position and speed. The CSO algorithm, as compared to the PSO algorithm, reduces the computational cost. A schematic of the algorithm’s search mechanism is shown in
Figure 4.
The pseudo code of the competitive swarm optimizer (CSO) algorithm (Alogorithm 1) is as follows:
Algorithm 1 The Competitive Swarm Optimizer Algorithm |
- 1:
Initialize ; // is the swarm ingeneration t, is the maximum number of iterations. - 2:
for to do - 3:
calculate the fitness of all particles in ; - 4:
//L denotes a set of particles that have not yet participated in a competition. - 5:
while do - 6:
randomly choose two particles - 7:
if then// is the fitness function for - 8:
; // is the winner particle in generation t, and is the loser particle in generation t - 9:
else - 10:
- 11:
end if - 12:
add into ; - 13:
update using (1) and (2) - 14:
add the updated into ; - 15:
remove from L - 16:
end while - 17:
end for
|
4.2. Encoding of the CSO Algorithm
The position of the ith particle in the CSO algorithm can be written as . When solving a geometric K-center problem, the position of a particle in the CSO algorithm represents a set of solutions to the WMN gateway deployment problem, coded as the combination of the coordinates of K gateways’ in plane The positions of the gateways’ are as follows: , in which and . The flying speed of the ith particle is .
4.3. Dynamic Equations of the CSO Algorithm
In each iteration of the CSO algorithm, the particles’ speeds and positions are updated to search for a better solution using a competition mechanism. The position of the winner of the
gth pair at time
t is
, and its speed is
, where
. The loser’s position and speed are
and
, respectively. For the
gth pair at time
t, the position of the loser is updated according to Equation (
1), and its speed is updated according to Equation (
2), in which
,
, and
are random numbers in
.
is calculated as follows:
is the average position of the population at a given time, and ξ is used as a parameter to control and to increase the diversity of the population. The position of the particles that have lost the competitions adjusted towards the position of the particles that won, so that each particle reaches an optimal position. The particles that have won the competition maintain their positions and speed and directly enter the next stage.
4.4. Fitness Function Design in the CSO Algorithm
In the geometric K-center WMN gateway deployment problem, a decreased fitness value is indicative of better particles, and the fitness is determined by the coverage radius of the particle. A particle in the CSO algorithm is a combination of the position coordinates of K gateways. Considering that the particles can be placed in any position of the plane, calculating the distance from the particle to the AP node is difficult; the following method can be used.
The position of the kth gateway, , of the particle is , where . Nodes with a distance of less than the communication distance (r) form a set, referred to as the adjacent node set, . The distance from node to is . The coverage radius of a particle, i.e., the fitness of the particle, is .
4.5. Solving the Gateway Location Problem Using the CSO Algorithm
In the CSO algorithm, particles are randomly generated at the beginning, with the coverage radius of the particle representing its fitness. The fitness of the particles is evaluated after each iteration, and the particles are then randomly paired for competition. The position of the particles that lose the competition is adjusted towards the position of the winning particles by changes made to their flying speeds and positions. Neither the position nor the speed changes for any of the winning particles and they directly enter the next iteration. When a fixed number of iterations have been completed, the algorithm will stop. The steps to solve the WMN gateway deployment problem using the CSO algorithm are as follows:
- Step 1.
A particle swarm of size n, including the positions and speeds , is randomly generated within the effective area of the network graph in order to determine the value of ξ.
- Step 2.
Calculate the fitness of each particle, i.e., the coverage radius R.
- Step 3.
Randomly divide particles into groups. Two particles then compete against each other in each group, and the fitness of each particle is taken as the criterion for the outcome of the competition. The fitter particle is deemed the winner, while the other is the loser.
- Step 4.
Update the position and speed of the particles that lost the competition according to Equations (1) and (2). The winners retain their position and speed.
- Step 5.
Decide whether the termination condition of the algorithm is satisfied. If it is satisfied, stop the iteration and output the optimal solution. Otherwise, return to Step 2. The termination condition of the algorithm is to reach the maximum number of iterations.
5. Simulation Analyses
The platform used for the simulation in this section of the experiment was Matlab2012 running on a quad-core computer with 4 GB of memory and a 3.4 GHz CPU. Four random networks (50, 200, 600 and 1000 nodes) were used to simulate a WMN. All the random networks were connected, and the node degree of the networks was between 1 and 11. The experiment aimed to minimize the coverage radius using the CSO, PSO and Kmedoids algorithms at different network scales. Twenty independent experiments were conducted for each simulation, and the best, worst, mean and standard deviation of the coverage radius were recorded for each experiment. The stability of each algorithm was also analyzed.
5.1. AP Node Random Distribution
Figure 5A–D shows diagrams of four random networks with 50, 200, 600 and 1000 nodes. The maximum degree of the graph is set to 11, and the minimum degree is 1. Each graph is connected. These four graphs span a large size range and are good data sets for testing the algorithms. In this paper, these four datasets were used to test the optimization performance of the CSO, PSO and Kmedoids algorithms.
5.2. Analysis of the Algorithms’ Optimization Performance and Convergence
The optimization results of the CSO algorithm, PSO algorithm and the Kmedoids algorithm for random WMNs comprised of 50, 200, 600 and 1000 nodes are shown in
Table 1. The number of gateways was fixed at 5. The maximum, minimum, mean and standard deviation of the coverage radii in 20 independent experiments using the three heuristic algorithms are provided.
According to the results in
Table 1, the CSO algorithm was shown to achieve a better maximum, minimum, and mean value when compared to the results obtained using the PSO algorithm and the Kmedoids algorithm. The standard deviation of the CSO algorithm was small, and the algorithm was stable. The CSO algorithm and the PSO algorithm both use similar mechanisms: they both find the optimal solution by particle searching in a continuous space, while the Kmedoids algorithm searches for the optimal solution among existing network nodes. The optimization performance of the Kmedoids algorithm was shown to be inferior to that of the CSO algorithm and PSO algorithm.
There are some differences in the search mechanism between the CSO algorithm and the PSO algorithm. The PSO algorithm updates the position and speed of the particles using the individual optimum (pbest) and the population optimum (gbest). Thus, all of the particles will be updated and moved towards a more optimal position. However, the population is prone to premature convergence. In contrast, when using the CSO algorithm, the individual optimum and the population optimum are discarded, and a competition mechanism is used instead: the losing particles learn only from the winning particles, effectively preventing local optimum trapping and, when compared to the PSO algorithm, this method effectively reduces the computation cost by only updating half of the particles in each iteration.
The average number of hops decreased as the number of iterations increased, as shown in
Figure 6. After a certain number of iterations, the average number of hops tended to stabilize. When comparing the convergence of the three algorithms, the PSO algorithm and the Kmedoids algorithm were shown to converge prematurely and were prone to local optimum trapping. The CSO algorithm maintained the diversity of the population through the use of a competition mechanism, thus resulting in a longer convergence process that could effectively prevent local optimum trapping. Therefore, the CSO algorithm was shown to have a better performance in regards to solving the geometric
K-center gateway deployment problem.
If the number of gateways is fixed, the gateway deployment performance graph does not show a significant improvement with an increasing network size. In the current study, networks comprised of 50 and 200 nodes were used to compare the performance of the algorithms. A total of five gateways were used. The first row in the figure represents the deployment performance of the three algorithms when the network size is 50 nodes; the second row represents the deployment performance when the network size is 200 nodes. The different colors in the figure represent different groups. The star symbol represents the gateway node, and the remaining symbols represent the AP nodes.
Figure 6 shows that the average number of hops decreased as the number of iterations increased; however, beyond a certain number of iterations, the average number of hops tended to stabilize. This comparison of the convergence of the three algorithms indicates that the PSO algorithm and the Kmedoids algorithm converged prematurely and were prone to local optimum trapping. The CSO algorithm ensured the diversity of the population through the competition mechanism. Consequently, its convergence process lasted longer and effectively prevented the population from becoming trapped in a local optimum. Therefore, the CSO algorithm showed better performance in solving the geometric
K-center gateway deployment problem.
When the number of gateways is fixed, the gateway deployment performance graph does not show significant improvement as the network size increases. This paper used networks of 50 and 200 nodes to compare the algorithms’ performances with five gateways. The first row in
Table 1 represents the deployment performance of the three algorithms with a 50-node network; the second row represents the deployment performance with a 200-node network. The different colors in the figure represent different groups. The star symbol represents gateway nodes, and the remaining symbols represent AP nodes.
Figure 7 shows that the Kmedoids algorithm set up the gateways at client nodes while the CSO and PSO algorithms set the gateways at
, located in the geometric centers of the network diagram, and the number of AP nodes served by each gateway was relatively uniform, producing a relatively small coverage radius and balanced load among gateways.
5.3. Optimization Results of Algorithms with Different Numbers of Gateways
In this section, networks of 200 and 1000 nodes were taken as being representative of small- and large-scale networks.
Figure 8 shows the performance of the CSO, PSO and Kmedoids algorithms when varying the number of gateways used for these two different random networks. Each experiment was independently run 20 times. The experimental results shown are the average of the 20 independent tests of each algorithm.
The above experimental results indicated that the coverage radius decreased as the number of gateways increased. For a fixed number of gateways, the coverage radius of the CSO algorithm was better than that of the PSO algorithm and Kmedoids algorithms. The CSO algorithm and PSO algorithm can be used to solve the geometric K-center gateway deployment problem, and their gateways are usually located at the center of multiple non-adjacent nodes, with a greater node degree. These two algorithms can shorten the routing distance between AP nodes and reduce the coverage radius of the network. The Kmedoids algorithm is suitable for solving the vertex K-center problem of WMN gateway deployment, where the gateway is selected from existing AP nodes. The analysis indicated that, from the perspective of coverage radius, the geometric K-center method performed better than the vertex K-center method in gateway deployment.
6. Conclusions
This study investigated the geometric K-center WMN gateway deployment problem in a CPS, or, more specifically, how to appropriately deploy gateways in a given geometric plane and reduce the routing distance from the AP nodes to the nearest gateway in order to improve the communication quality of the entire network. To address this problem, the target of optimization was the minimum coverage radius, which was solved using a new CSO algorithm. According to the experimental results, the CSO algorithm was shown to solve the geometric K-center problem of a WMN very well, providing a good solution to the geometric K-center gateway deployment.