Heuristic Algorithm for Target Coverage with Connectivity Fault-tolerance Problem in Wireless Sensor Networks Nguyen Thi Hanh Phan Thi Hong Hanh Huynh Thi Thanh Binh Nguyen Duc Nghia School of Information and Communication Technology Hanoi University of Science and Technology Hanoi, Vietnam Phuong Dong University hanhnt0903@gmail.com School of Information and Communication Technology Hanoi University of Science and Technology Hanoi, Vietnam mliafol.phan86@gmail.com School of Information and Communication Technology Hanoi University of Science and Technology Hanoi, Vietnam binhht@soict.hust.edu.vn School of Information and Communication Technology Hanoi University of Science and Technology Hanoi, Vietnam nghiand@soict.hust.edu.vn Abstract— Wireless sensor networks include a set of sensors being network nodes and a base station. The objective of such systems is to monitor changes which might occur at targets’ location. Consequently, assuring the network connectivity is compulsory to maintain a continuous monitoring of given set of targets. However, sensor nodes sometimes stop functioning due to being physically damaged or running out of energy (battery), thus affecting to the connectivity of the system. This paper considers the target coverage with connectivity fault-tolerance problem in wireless sensor networks. The goal of this problem is to come up with a network topology consisting of the least number of sensor nodes that not only offers the greatest target coverage but also maintains the network connectivity even when one random node is defected. This is an NP-Complete combinatorial optimization problem. One heuristic algorithm is proposed to solve the target coverage with connectivity faulttolerance problem and it is tested on 15 randomly generated instances. Experimental results illustrate a good performance achieved in terms of target coverage, connectivity and faulttolerance. Keywords—Wireless Sensor Networks; Target Coverage in WSNs; Fault-tolerance. I. INTRODUCTION In recent years, Internet of Things (IoT) has gained the attention of many world-leading researchers and companies. IoT has become the cornerstone of the technology development in this modern world. However, the impetus behind its success is the involvement of Wireless Sensor Networks (WSNs), which are playing an crucial role in monitoring, collecting and exchanging information in order to perform given tasks. Moreover, WSNs themselves emerge in many applications in real life such as disaster forecasts, intelligent transportation, manufacturing management, security and health care. WSNs are formed by a large number of sensor nodes, each of them is equipped with one or many sensors capable of detecting and measuring physical variables such as light, 978-1-5090-5732-0/16/$31.00 ©2016 IEEE temperature, pressure, noise, etc. in a certain sensing range. One weakness of WSN system is that nodes’ operation consumes energy from a limited power source (battery), which is hard to recharge or replace when being used up. Collected information are then exchanged between nodes or sent to the base station. Thus, WSN systems are considered as a revolution in information collecting and communication with high reliability and large signal transmission lines supported. However, there are many challenges that WSNs have to face besides the energy problem, including sensor nodes’ fragility, data transmission handling, limited coverage, connectivity assurance and network fault-tolerance. In reality, WSNs are mostly deployed in harsh environmental conditions and terrains where people can hardly reach; thus, making it harder to perform system maintenance. According to in-depth surveys on the field [1], coverage, connectivity and fault-tolerance in WSNs are major optimization problems. As for coverage criterion, the coverage of sensor nodes is decided by its radius whose magnitude depends on the configuration of each individual sensor after manufacture. There are three types of coverage problems including target coverage, area coverage, and barrier coverage. This paper considers the target coverage, which illustrates how well a set of given targets is monitored. Consequently, it is expected to cover each target by at least one sensor node. Similarly, the quality of WSN systems depends on its connectivity, such that information about a target is transmitted to the base station successfully in every cycle. The network connectivity depends primarily on the deployed topography of nodes in the network. Meanwhile, the fault-tolerance becomes an essential criterion in WSNs when it comes to the need of maintaining the work of WSNs in certain condition and continuous period, because fault sensors cannot be replaced immediately during the network operation. Fault-tolerance is defined as the ability to complete the task of WSNs even if some sensor nodes are defected. 235 TAAI2016 In this paper, we propose solutions to find the minimum number of sensor nodes deployed in a given area satisfying the maximum coverage and connectivity for the WSNs. Additionally, the fault-tolerance is achieved such that the transmission capacity of the WSNs is maintained when a random sensor node stops functioning. The paper includes six sections. Section 1 introduces the introduction to WSNs and the demand of resolving the problem of target coverage with connectivity fault-tolerance. Sections 2 and 3 respectively present related works and formulate the problem in form of mathematics equations. The proposed heuristic algorithm is discussed in details in section 4, and its evaluation according to the experimental results is shown in section 5. Finally, the conclusions and expected future progress for this paper will come in the last section. II. RELATED WORKS Coverage is considered as one of the most important factors contributing to the quality of WSN systems. Thus, coverage maximization problem has been extensively investigated, and as a result, many researches have been conducted to this topic. According to a survey over WSNs conducted by Bang Wang [1], the coverage problems can be divided into three groups: (1) target coverage problems, (2) area coverage problems and (3) barrier coverage problems. This paper investigates the target coverage problem. One of the most concerning target coverage problems is to minimize the total number of sensor nodes such that a full coverage is guaranteed on given targets (also called as objects). This problem has been tackled using a variety of methods, such as greedy algorithms, genetic algorithms and so on [1]. Besides, the problems of coverage maximizing and network lifetime lengthening combined with connectivity constraints were widely studied as well. The connectivity is referred to the ability to communicate between sensor nodes. Two sensors can transmit and receive data with each other when the distance between them is less than its radius. One typical target coverage problem is to find the minimum number of sensors in order to cover all the targets. This problem is solved using various methods such as greedy algorithm or genetic algorithm [1]. Apart from the abovementioned problem, the authors also suggested models for problems of network lifetime maximization that guarantees the coverage and connectivity constraints. A famous problem for the connected target coverage problem is the MCT problem (Maximum Cover Tree) which uses a tree to represent a subset of active sensors. The MCT problem is NP-complete [4] and some heuristic algorithms were proposed to solve the MCT problem by setting up an alternative path for data transmission, which brings in the fault-tolerance to the system [4], [5]. Some of the connected target coverage problem is to enforce k1-coverage and k2-connectivity requirements such that every target is covered by k1 different active sensors, and such active sensors can form a k2-connected network. Li et al. proposed a heuristic algorithm to solve this problem in [6]. However, when the sensors positions are given, both the number of targets and the number of sensors used are very small, which was not very practical. In the larger domain with a great amount of targets, having a more efficient algorithm is necessary to solve this problem. A model of a connectivity-guaranteed target coverage problem was also suggested in [3]. In this model, two sensors can communicate with each other when the distance between their locations is less than or equal to the sensor radius. This sensing model is utilized in this paper. In conclusion, the target coverage with connectivity faulttolerance problem has been investigated in [6]. However, the input size was small in term of the number of sensor nodes and targets and the placement location for nodes are predefined. This paper approaches the problem differently and works on larger input datasets. Specifically, the number of sensor nodes needed as well as their positions are not given. Our objective is to maximize the target coverage using the minimum number of sensor nodes while guaranteeing the connectivity fault-tolerance of the system. III. PROBLEM FORMULATION In this paper, we will apply the Boolean disk coverage model. Assuming that target is a point in 2D domain and every node is a sensor with same radius R, we have the formula describing the transmission ability of sensor to target as follow: ­1, if d ( s, z ) ≤ R, f ( s, z ) = ® ¯0, otherwise, (1) where d(s, z) is the Euclidean distance between the sensor s and the target z. Meanwhile, it is assumed that the communication range of all sensors is 2×R. A sensor or base station s can receive or retransmit data from others s’ if the Euclidean distance between s and s’ is less than or equal to 2×R. Determine a function g(s, s’) by the following formula: ­1, if d ( s, s ') ≤ 2 × R, g ( s, s ') = ® ¯0, otherwise. (2) Considering a set of sensor nodes and a base station placed on the 2D domain A with A = {( x, y ) : 0 ≤ x ≤ W ; 0 ≤ y ≤ H } . Let G = (V, E) be a graph with vertices set V = {B, s1 ,..., sn } and edge set E represents the connection link among the base station and sensor nodes. The base station is labeled as B and si (1 ≤ i ≤ n) is a label for the i th sensor. There exists an edge e ∈ E connecting from a to b if and only if g ( a , b) = 1; a , b ∈V . Thus, an information is able to be transmitted from target t to base station if there is a path P = ( si1 , e1 , si2 , e2 ,..., sim , em , B ) in graph G where si j ∈V \ {B} and ej is edge connecting si j and 236 si j+1 ( si j+1 = B ) and f ( si1 , t ) = 1 . Let P = (sv1 , e1 , sv2 , e2 ,..., svm , em , B) and Q = (sv, ' , e1' , sv' , e2' ,..., sv' , e'p , B) 1 2 p be the two traverse paths from target t to the base station. These two paths are defined as distinguishable if and only if vi ≠ v 'j , ∀i :1 ≤ i ≤ m, ∀j :1 ≤ j ≤ p. Now, the problem can be formulated as follows. Input: • W, H are the width and height of the 2D domain A. • n is the number of targets which we want to collect information. • T = ( xi , yi ) 0 ≤ xi ≤ W , 0 ≤ yi ≤ H , i = 1..n} is { the 2D coordinates of n targets. R is the sensing radius of all sensors. B(xB , yB ): the 2D coordinates of the base station (0 ≤ x B ≤ W,0 ≤ y B ≤ H ) . Output: 2D coordinates of all n sensors and the total number of sensors used. Objective: The objective being to minimize the number of sensors with their coordinates on domain A such that there are distinguishable paths to send information about each target in T to the base station. Figure 1 illustrates the target coverage model with targets located randomly on the domain A, sensor nodes and a base station. • • Fig.1. Illustration for target coverage model IV. PROPOSED ALGORITHM This paper proposes a heuristic algorithm including two phases for solving the main problem. The first phase aims at finding the smallest number of sensors to cover the target set while the second one assures the connectivity with faulttolerance to the given targets. A. Finding the smallest number of sensors to cover the target set To be specific, the objective of this phase is to find SSCAT (Sensor Set Covering All Targets), which comprises a base station and a sensor set placed in a 2D domain A with the minimum number of sensor such that each target is covered by at least one sensor. In order to simplify the problem, it is assumed that the coordinates of the sensors on the domain A are integers. This algorithm starts with finding sensors’ location on A such that each target is covered by at least one sensor of this set. This is a set cover problem. Denote T as the set of targets and F as the set of all positions at which sensors can be placed. In other words, F is the set of all integer points on domain A. With a position f ∈ F , CVf is a set of all targets covered by a sensor placed at f. The set cover problem can be defined as finding SSCAT ⊂ F with the minimum size, making sure that T = * f ∈SSCAT CV f . Due to being narrowed down to an NP-complete set cover problem, the target coverage maximization problem investigated in this phase is also NP-complete. The greedy set cover algorithm see e.g. [2] will solve this problem in polynomial time, and often gives a good result. After covering all given targets by at least one sensor node in SSCAT, the objective is to enhance the fault-tolerance of the target monitoring process by letting at least 2 sensor nodes cover on each target. Doubling the set is the simplest way to accomplish it in this case, and this method has been widely used with regards to small and medium number of targets [2]. Hence, we double the sensor set in SSCAT, resulting in SSCAT’. However, sensor nodes in this set are not yet connected. In other words, information about targets cannot be sent to the base station. When the algorithm proceeds to the second phase, some sensor nodes will be added so as to guarantee the connectivity of the network including the base station. In addition, additional sensors are placed such that they form backup paths in the WSN that could be utilized when one random node is dead. B. Assuring the connectivity with fault-tolerance to the given targets The fault-tolerance in WSNs is the ability to bear dead nodes in the network. To be specific, when some nodes stop functioning, the network still operates as usual. This paper considers the case when one random node is dead, backup routing path is utilized and the system operation is maintained. The following part presents the second phase of the algorithm, which aims at assuring the connectivity with faulttolerance to the WSN by producing two paths between any nodes to the base station. This phase takes the input as the sensor node set derived from the first phase and the base station as one separated node. The idea of this phase is to form a connected path from the given input sensor node set such that there always exist two paths between any two nodes. Because the base station registers as a part of the graph, the connectivity fault-tolerance is achieved. This phase includes three steps as follows. • Clustering SSCAT’. • Building a complete graph from clusters in step 1. • Minimizing FS (Final Solution). More details of these steps can be found in the following part. 1) Clustering SSCAT’ An un-weighted undirected graph G1 = (V1 , E1 ) with V1 being the set of vertices, and each vertex represents one sensor in SSCAT’. E1 is the edge set, and there exists an edge 237 between two vertices u and v if and only if g (u , v) = 1 . The mission of this part is to find all connected components of G1. The distance between two connected components is defined as follows. Dis ( X , Y ) = min( d ( nodeX , nodeY ) , with ∀nodeX ∈ X , ∀nodeY ∈ Y . After that, a weighted graph G2 = (V2 , E2 ) is built with each vertex of V2 representing a connected component of G1 and E2 = {( X , Y , c) | X ∈ V2 , Y ∈ V2 , c = Dis( X , Y )} . Let n (1 ≤ n ≤ V1 ) be the number of connected components of G1, the function Connect (i ), (i ∈ V1 ) returns the index of the connected component that contains the vertex i (1 ≤ i ≤ V1 ≤ Connect (i ) ≤ n ) . The below pseudo code explaining the process of building graph G2 from the graph G1 is presented below, in which the weight of the edge connecting X and Y is cost[X , Y ] . a) USP algorithm USP algorithm uses Kruskal’s minimum spanning tree algorithm to find graph G’. Firstly, Kruskal’s algorithm is used to find the minimum spanning tree T1 of the graph G2. After that, we add all edges of T1 to E’. A complete graph H with the vertex set containing all leaf nodes of T1 is constructed. The weight of the edge between two vertices of H is the Euclidean distance between two correspondent sensors. Then, Kruskal’s algorithm is applied again to find the minimum spanning tree T2 of H. Adding all edges of T2 to E ' , obtain graph G ' = (V2 , E ') that we need to find. b) UTSP algorithm UTSP algorithm will find a minimum single cycle which goes through all vertices. It can be easily seen that this is a travelling salesman problem. In this research, genetic algorithm will be exploited to solve the TSP problem presented in [4] with the following parameters in table I. TABLE I. Algorithm: GRAPH CLUSTERING ALGORITHM Parameters Input: An un-weighted, undirected graph G1 = (V1 , E1 ) and all connected component of G1 . Output: A weighted undirected graph G2 which a vertex presents for a connected region of G1 . Begin 1. for X = 1 to n for Y = 1 to n if X ≠ Y cost[ X , Y ] = ∞ else cost[ X , Y ] = 0 2. for i = 1 to V1 3. 4. 5. 6. 7. 8. 9. for j = 1 to V1 begin X = Connect (i ) Y = Connect ( j ) cost[X, Y] = min(cost[X, Y], d (i, j )) end V2 = { X 1 ≤ X ≤ V1 } PARAMETERS Value Population size 300 Generation number 200 Crossover probability 0.8 Mutation probability 0.8 Adding all edges of the cycle to E’, obtain graph G ' = (V2 , E ') that we need to find. With ∀e = ( X , Y , c) ∈ E ' , we place sensors on the line that connects X and Y, making sure that sensors of two connected components X and Y can transfer information to each other. Denote the newly added sensor set as SSFTP (sensors set for two paths). Let FS = SSCAT '∪ SSFTP be a sensor set satisfying the original problem constraints. After finding G1 = (V1 , E1 ) , with each e = ( X , Y , c ) ∈ E , more sensors will be placed on domain A to connect the connected components together. Let u, v ≤ V1 be two vertices of G1, satisfying that: ­Connect (u ) = X ° (3) ®Connect (v) = Y °cost[ X , Y ] = d (u , v) ¯ 10. E2 = E2 ∪ { X ,Y ,cost[X,Y])} ∀X ∈ V2 ,Y ∈ V2 11. return G2 = (V2 ,E2 ) End 2) Building fault-tolerance property. Based on G2, we build G ' = (V ', E ') , where V ' = V2 ,, E ' ⊂ E2 and E’ made sure . There always exists two paths having no common vertices on G’ starting from v to Base Station. Two algorithms applied in this step named USP (using spanning tree) and UTSP (using travelling salesman problem) to construct a connected tree are presented in the following part. With two sensors u and v, more sensors are placed on the domain so that these two sensors can be connected to each other. On the line that connects two positions at which two sensors are located, place a sensor which is 2×R far from u. Next, place one more sensor that is 2×R far from the previous sensor, and repeat the task until the Euclidean distance between the newly placed sensor and v is less than or equal to 2×R. 3) Minimizing FS Though FS satisfies the original problem constraints, it still contains redundant sensors. Therefore, this step is to eliminate those sensors. After that, the final solution is achieved. Considering all the sensors u ∈ FS , FS ' = FS − {u} , if FS ' satisfies the constraints of the problem, let FS = FS ' . 238 In this step, the definition of bi-connectivity is utilized to check whether FS ' satisfies the constraints of the problem or not [3]. In conclusion, when an arbitrary sensor u is eliminated, the information of all targets can still be transferred to the base station because there are always two paths without a common vertex to transfer the information of all the targets to the base station. Figure 2 illustrates the proposed heuristic algorithm including both phases; in which red dots represent targets, green circles and the red triangle are respectively the coverage area of sensor nodes and the base station and the black boxes illustrate connected components appeared in step 1. a) The experimental program was implemented in Java language and run on machine with Intel core i5 2.4GHz, Ram 4G, Window 10 ultimate. B. Computational Results Table III illustrate the solutions derived by the proposed heuristic algorithm using USP and UTSP respectively in the second step of the second phase in terms of number of sensors used and execution time averagely in 15 running times over 15 instances with n being the number of sensors and R being their sensing range. Figure 3 shows the solution found by applying the proposed heuristic algorithm on instances S1-3 and on instances S1-8, in which red dots being targets, green circles and the red triangle represent the coverage area of sensor nodes and the base station respectively. b) (a) (b) (c) (d) d) c) Fig.2. Illustration for the proposed heuristic algorithm: a) Finding SSCAT; b) Clustering SSCAT’; c) Building graph G’; d) Find the complete sensor set. V. EXPERIMENTAL RESULTS A. Experimental settings This paper experiments the heuristic algorithm on 15 randomly generated instances with the following parameters. • The dimension of domain A is 200 x 200. • The coordinates of targets and base station are integers. • Amongst 15 instances, each 5 of them have the sensor radius of 3, 8 and 12 respectively. The number of targets is increased within each value of radius. Information about all instances is shown in table II. TABLE II. EXPERIMENTAL INSTANCES Instance no. n1 r1 Instance no. n2 r2 Instance no. n3 r3 S1-3 S2-3 S3-3 S4-3 S5-3 50 100 200 500 1000 3 3 3 3 3 S1-8 S2-8 S3-8 S4-8 S5-8 50 100 200 500 1000 8 8 8 8 8 S1-12 S2-12 S3-12 S4-12 S5-12 50 100 200 500 1000 12 12 12 12 12 Fig.3. The solutions found by applying the proposed heuristic algorithm that uses USP on instances S1-3 and S1-8 are shown in figures (a, b), while that of the version utilizing UTSP are shown in figures (c, d) respectively. As for comparing two versions of the algorithm, the number of sensor is the foremost criterion. Experimental results show that the version of proposed algorithm that utilizes UTSP outperformed the other one using USP with respect to instances having small sensing range. In the first 5 instances having smallest sensing range (R = 3), the heuristic algorithm using UTSP requires at most 10% fewer sensors compared to the other one. However, the performance of the heuristic utilizing UTSP tends to be worse than that of the USP version when the instance size increases. To be specific, the proposed algorithm that uses USP outperforms the other one on 5/6 instances having large size (the number of sensors being 500 or 1000). When it comes to execution time, the heuristic that uses UTSP performs up to 80% better than the one using USP over 5/5 instances with small sensing range of 3. When the sensing range increases, the former consumes slightly longer execution time than the latter one does, which is around 15% averagely. 239 Figure 4 illustrate the execution time consumed by the proposed heuristic algorithm with respect to two techniques used in the second phase USP and UTSP. VI. CONCLUSION TABLE III. EVALUATING THE PROPOSED HEURISTIC ALGORITHM IN TERMS OF NUMBER OF SENSORS AND EXECUTION TIME OVER 15 INSTANCES USP Instance no. S1-3 S2-3 S3-3 S4-3 S5-3 S1-8 S2-8 S3-8 S4-8 S5-8 S1-12 S2-12 S3-12 S4-12 S5-12 Num. of sensors 260 385 576 898 1262 110 152 199 292 377 69 105 124 162 210 This paper aimed at solving the target coverage maximization with connectivity fault-tolerance problem by specifying a proper network topology. One heuristic algorithm is proposed to find a sensors’ placement scheme with the largest target coverage and is able to maintain the network connectivity even when one random node is dead. Two techniques applied in the second phase of the heuristic algorithm called USP and UTSP lead to two version of the proposed algorithm. They were experimented over 15 randomly created sensor node sets and the experimental results show that the formulated problem was resolved using the proposed algorithm with fairly good performance. In future, we plan to improve the algorithm targeting at consuming fewer sensors and shortening running time. Besides, the problem will be investigated with other practical constraints such as energy and lifetime. UTSP Time (s) 2.514 5.718 27.003 46.396 126.934 0.339 0.704 1.918 6.234 14.484 0.227 0.430 1.007 3.218 9.850 Num. of sensors 236.73 351.00 543.33 890.40 1270.07 101.60 147.53 200.73 292.60 378.00 67.53 104.67 125.33 166.00 210.00 constant, the result tends to be worse as the genetic algorithm has lower convergence speed. Meanwhile, the running time of UTSP algorithm is better on almost instances. Time (s) 0.686 1.653 5.675 26.107 75.713 0.328 0.763 1.685 6.079 15.735 0.228 0.526 1.084 3.477 14.410 ACKNOWLEDGMENT This work was supported by the project “Coverage optimization in wireless sensor networks with obstacles” funded by Hanoi University of Science and Technology, under grant number T2016-PC-051. REFERENCES [1] [2] [3] [4] Fig.4. The execution time consumed by the proposed heuristic algorithm with respect to two techniques used in the second phase USP and UTSP. With each value of radius, when the number of targets increases, the USP algorithm delivers the better results than UTSP algorithm does. This is reasonable because when using genetic algorithm for finding the minimum weight single cycle, increasing the size of problem while maintaining the same number of generation and the size of population is [5] [6] 240 Bang Wang, “Coverage problems in sensor networks: A survey”, ACM Computing Surveys (CSUR), vol. 43(4), pp. 51-95, 2011. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, “Introduction to Algorithms”. 2nd Edition. MIT Press, Cambridge, 2001. Kar, K., Banerjee, “Optimal multicast routing protocol for wireless sensor networks”. Node placement for connected coverage in sensor networks. In: International Symposium on Modeling and Optimization in Mobile, Ad Hoc and Wireless Networks (WiOpt), 2003. Zhao, Q., Gurusamy, M., “Lifetime maximization for connected target coverage in wireless sensor networks.”, IEEE/ACM Transactions on Networking 16(6), pp. 1378–1391, 2008. Zhao, Q., Gurusamy, M., “Maximizing network lifetime for connected target coverage in wireless sensor networks. In: IEEE International Conference onWireless and Mobile, Networkingand Communications (WiMob), pp. 94–101, 2006. Li, D., Cao, j. Liu, M., Zheng, Y, “K-connected target coverage in wireless sensor networks”. In: The 1st International Conference on Combinatorial Optimization and Application (COCOA), also in LNCN, vol 4616, pp. 20-31, 2007.