Jammer Localization in Multihop Wireless Networks Based on Gravitational Search

MultihopWireless Networks (MHWNs) can be easily attacked by the jammer for their shared nature and open access to the wireless medium. The jamming attack may prevent the normal communication through occupying the same wireless channel of legal nodes. It is critical to locate the jammer accurately, which may provide necessary message for the implementation of antijamming mechanisms. However, current range-free methods are sensitive to the distribution of nodes and parameters of the jammer. In order to improve the localization accuracy, this article proposes a jammer localization method based on Gravitational Search Algorithm (GSA), which is a heuristic optimization evolutionary algorithm based on Newton’s law of universal gravitation and mass interactions. At first, the initial particles are selected randomly from the jammed area. Then, the fitness function is designed based on range-free method. At each iteration, the mass and position of the particles are updated. Finally, the position of particle with the maximum mass is considered as the estimated jammer’s position. A series of simulations are conducted to evaluate our proposed algorithms and the simulation results show that the GSA-based localization algorithm outperformsmany state-of-the-art algorithms.


Introduction
Multihop Wireless Networks (MHWNs) face various security problems due to their shared nature and open access to wireless mediums.Among all the security threats to the MHWNs, one typical case of attacks is jamming attack, which usually emits useless radio signal to disrupt normal communications between wireless devices by occupying the wireless channel or destroying the coupling of protocols with one or many low-end simple off-the-shelf wireless devices [1,2].For instance, different from interferences among wireless nodes [3], jamming attack can break down the MAC protocols by sending fabricated ACK or CTS packets to the wireless channel.Generally speaking, jamming attack can be initiated from different protocol layers and decreases the network performance significantly through limited resource consumption, which makes it be widely employed by adversaries.
In order to mitigate the impact of jamming attack and restore the normal communications, a series of anti-jamming countermeasures have been proposed from multiple network layers, such as channel-hopping, secure routing, and spatial retreat [4][5][6][7].However, these anti-jamming strategies mainly provide useful approaches to avoid or evade an attack in order to maintain the normal operation of wireless networks.Although the negative impact of jamming attack can be mitigated, the networks can only adjust themselves passively without utilizing the information of jamming.Moreover, when conducting the anti-jamming measures, the constraints of wireless devices including limited memory and energy supply and low computation capabilities must be considered.
Besides these passive anti-jamming measures, another way is to locate the jammer and obtain the position information of jammers, which makes it possible to eliminate the jammer from the networks by physical methods or manual ways.Actually, the position information of jammers may allow better deployment of wireless devices and provide useful information when designing MAC or routing protocols.
Up to now, jammer localization has been widely investigated and a number of localization algorithms have been

Related Work
Over the past few years, Xu et al. conducted a series of researches on the jamming attack and four basic approaches of jamming attack were proposed [8], which were defined as constant jamming, random jamming, proactive jamming, and reactive jamming.Wei et al. provided a comprehensive survey of the major works done in the field of jammer localization for MHWN [9].
Range-free localization algorithms utilize the geometric knowledge of the jammed area to locate the jammer.Wang and Zheng took the weighted factor determined by the relative position between jammer and node into consideration when modifying the Centroid Localization (CL) [10] and presented Weighted Centroid Localization (WCL).Liu et al. put forward the Virtual Force Iterative Localization (VFIL) to locate the jammer [11].At first, the jammed area and jamming range were estimated by VFIL.Then, the estimated position of the jammer was amended iteratively in order to cover the most jammed nodes.Sun et al. computed the convex hull that was determined by the boundary nodes to locate the jammer [12].The minimum circumscribed circle was achieved based on the convex hull and the center of it is the estimated jammer's location.Similarly, -hull was adopted by Zhang et al. to obtain circumcircle of the jammed area and then the least square circle was formulated to estimate jammer's location [13].In addition, Wei et al. also made the research on the collaborative mobile jammer tracking in MHWN and the jammer is located based on multilateral localization method [14].For multi-jammers scenario, Cheng et al. put forward the M-clusters and X-ray to estimate jammers' positions, respectively [15].Wang et al. proposed the k-mean cluster algorithm based on the neighbor nodes' information to estimate the positions of the jammers [16].
The relationship between jammer and node is established based on wireless channel model to locate the jammer for range-based localization algorithms.Pelechrinis et al. pointed out that Packet Delivery Rate (PDR) decreased with increasing distance between node and the jammer [17].So value of PDR could be used to indicate the influence that the jammer had on the node.They proposed a light distributed jammer localization algorithm based on PDR and the node would select the node with minimum PDR from its neighbor nodes as the next hop.Liu et al. proposed the jammer localization algorithm based on the nodes' hearing range [18], which is defined as the maximum distance for the node that can successfully decode the signal generated from other nodes.Wang et al. put forward the scheme to locate the jammer based on the combination of PDR gradient descent and power adaptive technique [19].The power would increase at the termination node of PDR gradient descent and the localization accuracy was improved a lot compared to that of PDR gradient descent.

System Models and Problem Formulation
This section analyzes the impact of jamming on the legal communication link and introduces several related models.The nodes in the jammed network can be divided into three categories based on the impact of jamming, that is, unaffected nodes, boundary nodes, and jammed nodes.

Impact of Jamming.
According to the characteristic of wireless communication, the signals cannot be decoded correctly if the received SNR is lower than a certain threshold.Assume that the interference among nodes has been avoided through specific MAC or network protocols, such as TDMA and 802.11DCF.Thus, the overall interference mainly includes the background noise for nonjamming scenes and the background noise and jamming signal for jamming scenes.For the transmitter  and receiver j, the received SNR  of node  is where  represents the jammer and   is the received jamming power at node j.   and   represent the received power of node  and the power of background noise, respectively.The state of link between node  and node  is defined as   : where  0 is the received SNR threshold for all the nodes.  = 1 denotes the normal communication between node  and node .The communication links among nodes are bidirectional and the link between node  and node  is considered to be connected when both the conditions   = 1 and   = 1 are satisfied.Location-Aware.The MHWN nodes can be aware of their own locations and their neighbors' locations through GPS or specific location-aware algorithms and many applications also require the location of nodes in order to provide specific services.Assume that the locations of nodes have been obtained after initial deployment.
Neighbor-Aware.Each node can store its neighbors' information and update a neighbor list at regular intervals.The list can be achieved by several routing protocols, such as AODV and DSR.Besides, each node is equipped with omnidirectional antenna and transmits signals with the same power.In other words, the nodes are homogeneous in MHWN.

Jamming Model.
The jammer considered in this article remains static and the jamming power remains unchanged.Besides, the constant jammer equipped with omnidirectional antenna is adopted in this article, which transmits RF signals consistently.

Node Model.
The nodes deployed in the MHWN randomly can be divided into jammed ones, boundary nodes, and unaffected ones according to different degree of jamming produced by the jammer: (i) Unaffected node: a node is determined to be unaffected if it can receive packets from all of its neighbors after the appearance of the jammer (ii) Boundary node: the node is considered as a boundary node if it loses some of its neighbors, while it can still communicate with part of the unaffected nodes (iii) Jammed node: the jammed node is defined as the node that cannot receive any message from all the unaffected nodes and boundary nodes 3.2.4.Wireless Channel Model.Typical wireless channel models mainly include free-space propagation model, shadow-fading model, and exponential-fading model [20][21][22].
The shadow-fading model is adopted here to model the small-scale fading circumstance.If the receiver locates at the distance  from the transmitter, the received power (()) is where ( 0 ) represents the received power at specific distance  0 and  is the fading index.  is the Gauss random variable with zero mean and variance  2 .

Problem Formulation.
A typical jammed network scenario is illustrated in Figure 1.We aim at locating the jammer under the above settings by using the jamming information.
To achieve this goal, several challenges need be solved and we present our basic ideas here.At first, each node should determine its state based on the neighbors number, received SNR, and so forth.Then, we need to decide the jamming information that could be collected by wireless nodes, such as sensor node.Besides, the information can be used to detect the jammer's existence.At last, an efficient localization algorithm needs to be carefully designed considering both the complexity and accuracy.

Algorithm Description
4.1.GSA Principle.The Gravitational Search Algorithm was proposed by Rashedi et al. in 2009 [23] and the searching progress can be carried out by interaction among particles.In GSA, the particle's position represents the solution of the problem.At first, the initial solution is obtained through the feasible region and the particles' mass is calculated by the fitness function.Then, the interaction among particles is used to update their mass and positions.The particles will move to the particles with larger mass, which represents the better solutions.At last, the particle with the largest mass is considered as the best solution.
GSA has been widely employed in data mining, parameter identification, and multi-objectives decision and achieved good performance.In the problem of jammer localization, the estimated jammer's position is the solution of the problem, which is consistent with the solution of GSA.Therefore, it is feasible to employ the GSA in the jammer localization, which is the basis of our paper.
In order to achieve this target, the challenges and main work in our paper mainly include the following: (i) Mapping of particles' positions and jammer's estimated location: in our proposed algorithm, the particle's position represents the jammer's estimated location.With the progress of iteration process, the particles' positions are updated.At the end of the iteration, the position of the particle with the maximum mass is considered as the final estimated jammer's location (ii) Selection of initial particles: according to the characteristics of jamming area, the jammer is supposed to be located in its inside.In the initial step of GSA, a specific number of particles are distributed in the jammed area randomly (iii) Calculation of fitness function: the jammer is equipped with omnidirectional antenna and the jammed area is about a circle.Thus, the distances between the jammer and boundary nodes that located in the boundary of the jammed area are similar.The fitness function can be determined by the variance of distances between the boundary nodes and the jammer 4.2.Preliminary.Generally speaking, the affected nodes (including boundary nodes and jammed nodes) can be used to reflect the existence of jamming attack.Several jamming detection methods have been proposed based on affected nodes' collected jamming information, such as received signal strength and carrier sensing time [8].However, jamming detection is not our main work and we pay our attention to the localization process, which would be conducted after detecting jamming attack.Assume that each wireless node in the network can work normally and detect the existence of jamming attack correctly.Before conducting the localization process, each node should determine its state based on the jamming information.If every node tries to communicate with all of its neighbor nodes, the network load would increase a lot.In order to determine its state efficiently, each node maintains its neighbors number and records each neighbor's SNR.Then, it will determine its own state according to Algorithm 1, where parameters , , and  are determined by specific network condition.

Information Collection.
Assume that there is a locating node, which is in charge of jammer localization, in the wireless network chosen from the unaffected nodes through some kind of voting algorithm.To realize the localization (1) if a node does not detect jamming attack then (2) This node is an unaffected node; (3) else (4) if this node does not lose any neighbor and its received SNRs from most of its neighbors' do not decrease more than a percent then (5) This node is an unaffected node; (6) else (7) if this node loses more than  percent of its neighbors then (8) This node is a jammed node; ( 9) else (10) if more than  percent of its neighbors' SNRs decrease more than  percent then (11) This node is a jammed node; (12) else (13) This node is a boundary node; (14) end if (15) end if (16) end if (17) end if Algorithm 1: Node state determination algorithm.process, it has to firstly collect information from wireless nodes and then execute the localization algorithm.

Destination_node_ID RJSS Node_ID Node_position
Based on the analysis in the above section, we have to design an information-collecting protocol to gather necessary RJSS values and other related information of nodes while reducing the transmission overhead introduced by this process, since normal communication among wireless nodes may be damaged or even disrupted by jammer.To achieve this goal, a node is required to report its RJSS values to the locating node if and only if it is determined to be a boundary node.
Each boundary node will send its collected RJSS values and position to the locating node.The basic structure of the reporting packet is shown in Figure 2, where Node ID and Destination node ID represent the IDs of the boundary node and locating node, respectively.RJSS and Node position are the reported RJSS values and the coordinate values of the boundary node, respectively.should be selected within the jammed area.Besides, the velocity and acceleration of the particles are set as zero at the first iteration.
In order to improve the uniformity of the initial particles' distribution, the backward learning method is adopted to promote the performance of the algorithm.Assume that  particles are deployed in a D-dimensional space and the position of particle  is represented as   = { At last, the initial particles and opposite particles are all added to the final particle set.The particles (including initial particles and opposite particles) are deployed in the jammed area formulated by the jammed nodes and the acceleration and velocity of the particles are all set to be zero at the first iteration.

Determination of the Fitness Function.
The fitness function is designed to evaluate the performance of estimated jammer's position.In the single-jammer scenario, the jammed area is similar to a circle and the distance between boundary nodes and the jammer is approximately equal to the jamming radius.Therefore, we obtain the boundary nodes based on convex hull at first and then the variance of distances between the boundary nodes and the jammer is calculated, which is defined as the fitness function.Suppose that there are  particles in the MHWN; the position of particle  is defined as   = (  ,   ),  = 1, 2, . . ., .Thus, the fitness function at the  iteration for particle  is where where fit  () is the fitness value for particle  at the  iteration.best() and worst() represent the best value and worst value of the particles at the  iteration.  () and   () are the mass and normalized mass for particle  at the  iteration, respectively.
The gravitation for particle  and particle  in  dimension can be calculated by where    () and    () represent the positions of particles  and  at the  iteration, respectively.  () represents the Euclidean distance between particle  and particle . is a small constant and () indicates the gravity coefficient.The resultant force    () for particle  in  dimension is the resultant force generated from all the other particles: where rand  is a random number in [0, 1].

Parameters Update
Update the Gravity Coefficient.According to the GSA principle, the gravity coefficient that can be calculated by formulation (8) decreases with the time.
where  is the time constant, T is the maximum number of iterations, and  0 is the initial value of gravity coefficient.
Update the Acceleration, Velocity, and Position.The acceleration of particle  in  dimension at the  iteration is where   () is the normalized mass for particle .The velocity and position for particle  are updated by where V   () and    () are the velocity and position, respectively, for particle  in  dimension at the  iteration.
At last, the GSA will be terminated until the time of iterations reaches the threshold and, otherwise, the mass, velocity, and position for all the particles would be updated at the next iteration.4.5.Discussions.In our proposed GSA-based jammer localization algorithm, the fading index of wireless channel and jamming power should be estimated exactly in order to calculate the estimated RJSS values.Due to the fact that the received signal's power and nodes' locations have already been obtained, the fading index of wireless channel can be estimated by the communication among nodes.In this paper, the fading index is assumed to be estimated accurately.However, the jamming power cannot be derived or estimated directly.In order to solve this problem, the jamming power is assumed to be chosen from a series of discrete values, which is also the assumption made in [24].The proposed localization algorithm will be conducted under these discrete jamming powers and the best position and optimal value under each jamming power will be recorded.In the end, the global optimal value chosen from all the optimal values of different power levels will be chosen and its corresponding jamming power is considered as the real jamming power.

Pseudocode. The pseudocode of GSA-based localization algorithm is illustrated in Algorithm 2.
Step (1) is the initialization of related parameters, that is, number of iterations, number of particles, the acceleration, velocity and position of the particles, the gravity coefficient, and the time constant used to update the gravity coefficient. particles that present the initial solutions are randomly selected in the jammed area in Step (3).Step (4) calculates the fitness value for each particle and the best value is updated according to the fitness values.The mass and the resultant force will be calculated according to Newton's second law in Steps (6) and (7).The gravity coefficient and acceleration, velocity, and position of the particle will be updated for each iteration in Step (8).After the iterations, the position of particle with maximum mass is considered as the estimated jammer's position.
Complexity Analysis.The time complexity of our proposed algorithm is ( 2 ). is the number of iterations and  is the number of particles.usually used for comparison in most of the papers and the comparison results are convincing.The average error () is adopted to measure the performance of our proposed algorithm, which can be calculated by

Simulation Experiments
where   and    are the real position and estimated position for th simulation.Besides, the cumulative distribution functions (CDF) are also shown below.

Performance Comparison and Results
Analysis.We conduct 200 simulations independently and nodes are deployed in the network randomly for each time.Besides, the position of the jammer and the transmitting powers of the jammer and nodes remain unchanged.In this section, the CDF of localization errors and average localization errors are shown.Besides, the localization errors influenced by the number of particles are also discussed.

Comparison Results.
We compare the performance of GSA with the exiting localization algorithms, CL, WCL, VFIL, and DCL. Figure 4 presents the CDF of different localization algorithms for 200 simulations and Figure 5 presents the average error of localization.From the figures, we can conclude that the localization error of our proposed algorithm is lower than those of CL, WCL, VFIL, and DCL.Besides, we can conclude that VFIL may be more sensitive to the distribution of nodes for some larger values of localization error.The average localization error of GSA can reach 3.7 m, which is smaller than that of the other algorithms.

Impact of Node Density.
We compare the localization errors for different node density and the numbers of nodes are set as 300, 400, and 500, respectively.When the area is assumed to be constant, the nodes' number can be utilized to reflect the node density of the network.After conducting 200 simulations independently, the CDFs of localization errors for different nodes' number are illustrated in Figures 6 and 7.The average localization errors of these algorithms decrease with the increasing number of nodes, which is shown in Figure 8. Besides, GSA achieves better performance than the other four algorithms for different nodes' number.

Impact of Jamming Power.
In order to compare the localization performance for different jamming powers, the  jamming powers are set as 6 mW, 10 mW, and 15 mW.The CDFs of localization errors for different jamming powers are illustrated in Figures 9 and 10.It can be concluded that as the jamming power increases, the localization errors of these algorithms decrease, which is shown in Figure 11.Besides, we can also conclude that the GSA obtains the best performance for the localization obviously.

Impact of Jammer's
Position.In order to analyze the impact of jammer's position on the localization errors, the jammer is located in the positions of (60, 60), (70, 70), and (200, 200), respectively.When the jammer is located in (60, 60) or (70, 70), the assumption that the jammed area is a circle is biased and the real jammed area formulated by the jammed nodes is irregular.From Figure 12, it can be seen that when the jammer locates close to the edge of the network, the localization errors increase for the five algorithms.GSA achieves the best localization performance for different scenarios.
Moreover, a comparison table for outcomes of different applied algorithms is illustrated in Table 2.The average localization errors (m) for CL, WCL, VFIL, DCL, and GSA under different conditions (including number of nodes and jamming power) are illustrated in the table.The localization performance of our proposed GSA algorithm is discussed under different number of particles.The number of particles is assumed to be 20, 30, 50, and 100, respectively, and the localization results are shown in Figure 13.As the number of particles increases, the localization error decreases a little.However, the complexity of GSA is closely related to the number of particles and the tradeoff between the localization accuracy and complexity should be considered when determining the number of particles.

Impact of GSA's Iterations.
The localization performance of the GSA-based algorithm is analyzed under different GSA's iterations.The iterations are assumed to be 20, 30, 50, and 80, respectively.The average localization errors for different iterations are illustrated in Figure 14.From the figure, we can conclude that as the GSA's iterations increase, the localization errors decrease.This is due to the fact that GSA searching results will converge to a stable value as the iterations increases.Besides, the complexity of GSA is determined by particles' number and iterations.Although the localization results are more accurate, the execution time of GSA will increase.

Conclusion and Future Work
In order to reduce the sensitivity of the existing algorithms to the MHWN nodes deployment and parameters of the jammer for the jammer localization, we have presented a novel localization strategy based on Gravitational Search Algorithm (GSA), which is an evolutionary algorithm based on Newton's law of universal gravitation and mass interactions.The initial particles are assumed to be deployed in the jammed area randomly with acceleration and velocity set to

Figure 2 :
Figure 2: Frame structure of information collection.

Figure 6 :Figure 7 :
Figure 6: CDF of localization errors when the number of nodes is 300.

Figure 9 :
Figure 9: CDF of localization errors when the jamming power is 6 mW.

Figure 10 :Figure 11 :
Figure 10: CDF of localization errors when the jamming power is 15 mW.

Figure 13 :
Figure 13: Impact of the number of particles.
1  ,  2  , . . .,    , . . .,    }, where    ∈ [  ,   ] and   and   are the lower bound and upper bound in the kth dimension.Then, the opposite particle of    is x is the number of boundary nodes.  and   represent the  and  coordinate values for the boundary node , respectively.  () is defined as the Euclidean distance between particle  and boundary node .  () is the average Euclidean distance.

Table 1 :
The basic MHWN is established in an area of  *  square meters and the number of nodes is .The jammer equipped with omnidirectional antenna is deployed in the center of the network with coordinate(200,  200).Other related parameters are represented in Table1.5.1.2.Benchmark.The algorithms used for comparison with our proposed algorithm are CL, WCL, VFIL, and DCL.These four algorithms are the common localization algorithms Input: the state and position of MHWN nodes Output: the estimated jammer's position (1) Initialize number of iterations (), number of particles (), acceleration, velocity and position of the particle, gravity coefficient and time constant .; Simulation parameters.

Table 2 :
Average error under different settings.