Localization Accuracy for Wireless Sensor Network under Physical Barrier Attacks: History Edit

Localization is an apparent aspect of a wireless sensor network, which is the focus of much interesting research. One of the severe conditions that needs to be taken into consideration is localizing a mobile target through a dispersed sensor network in the presence of physical barrier attacks. These attacks confuse the localization process and cause location estimation errors. Range-based methods, like the received signal strength indication (RSSI), face the major influence of this kind of attack. This paper proposes a solution based on a combination of multi-frequency multi-power localization (C-MFMPL) and step function multi-frequency multi-power localization (SF-MFMPL), including the fingerprint matching technique and lateration, to provide a robust and accurate localization technique. In addition, this paper proposes a grid coloring algorithm to detect the signal hole map in the network, which refers to the attack-prone regions, in order to carry out corrective actions. The simulation results show the enhancement and robustness of RSS localization performance in the face of log normal shadow fading effects, besides the presence of physical barrier attacks, through detecting, filtering and eliminating the effect of these attacks.

1. Introduction

Wireless sensor networks serve as the link between the digital and the physical worlds. Forthcoming wireless network sensors are expected to be deployed in almost every sphere of the human activity system and used in a manner not yet envisaged. Thus, the need to mass produce low-cost integrated sensor nodes that will enhance the use of technology for bridging a myriad of domains cannot be overemphasized. Some of the few areas where future sensor networks can be deployed include earthquake monitoring, environmental monitoring, factory automation, home and office controls, inventory monitoring, medicine, etc. The increasing prevalence of wireless networks has not only increased the possibilities of information integration into applications, but has also influenced our interactions with others, in study and work. A typical example of such an information source is location information, which is of great importance in many applications. The term localization is the ability to determine the physical position of a static or mobile sensor node or wireless device. The use of a wireless device for tracking locations is a growing trend that holds great prospects for a wide range of applications, particularly for those employed in physical security, asset tracking, geographic routing and workflow management [1].
The increase in the use of these wireless devices by both people and objects has brought to light the importance of precision in node positioning in sensor and wireless networks. This is because of the important input role played by sensor location in various high-level networking tasks and applications. For example, nowadays, received signal strength (RSS) measurement hardware is included in all modern radio chip sets, so as to determine the transmitted packets. This comes at a very high cost and deployment benefit when the existing communication network’s RSS infrastructure is re-used for localization. The typical pattern for most RSS-based localization strategies is a transmitter or receiver that takes measurements of the RSS of a number of landmarks at known positions, also known as the device. The device is then positioned using a fingerprint method or the resulting RSS values [2].
Despite the wide variety of algorithmic strategies, such as machine learning approaches and minimization of least squares methods, proposed by different studies, the issue of multipath effects still remains a key challenge in the domain of wireless localization based on RSS. Some of the challenges range from signal blocking or shadowing, waves bouncing off an object or reflection, waves spreading as a result of obstacles or diffraction and waves bending as they pass through different mediums or refraction. All of these impact negatively on the RSS, thereby making it a tedious task to accurately determine their effects in complex indoor environments. The typical localization error averages between 10 ft to 30 ft or more for maximum errors. Furthermore, there is a tendency for the frequency and power level to negatively influence the localization performance as a result of the wireless signal propagation. The distance at which the signal can travel is dependent on the power level of the signal propagation, while the frequency of the signal transmission determines how the environment can influence the mode of the propagated signal [3].
Sensor nodes, unlike traditional networks, usually operate in attack-prone areas, thus increasing physical attack risks, which may lead to the modification of their underlying code or cryptographic material exposure. The complexity of this problem is evidenced by the inability to produce tamper-resistant sensor nodes because of the marginal cost effect of the hardware. This makes sensor nodes more vulnerable to physical attack under such environments compared to a typical personal computer located in a secure place and subjected to individual attacks from its network.
As localization is becoming popular, numerous attacks on the localization process are also on the rise. These attacks confuse the localization process and cause location estimation errors. Therefore, the ability to have efficient wireless sensor network localization accuracy in the presence of physical signal strength attacks is a challenging and extreme undertaking.
Several recent researchers were unable to accomplish a highly secured localization performance without utilizing the cryptographic technique, which requires a complex hardware design. While the main important task of the new proposed solution based on the multi-frequency multi-power localization (MFMPL) algorithm is to detect, eliminate and overcome the influence of these physical attacks (barrier attacks) under the shadow fading propagation system model without using cryptographic techniques, the new proposed solution is expected to achieve an accurate and effective performance.

2. Background

There are two basic ways of calculating the distance between the transmitter and the receiver in order to obtain the RSS information. One way is to convert the signal strength (SS) to a distance measurement based on the signal propagation model and then to use geometry to calculate the target nodes’ locations based on prior knowledge of the locations of the beacon nodes. This method is referred to as triangulation localization. The other way converts the RSS values based on the signal propagation behavior and the building geometry information into distance values; a method referred to as fingerprinting localization [4].
There are two basic categories of RSS-based localization methods, namely fingerprint-based methods and model-based methods. For fingerprint-based methods, the device-carrying individual needs to build a radio map at every possible location before the localization of the real-time operation, a method known as RSS profiling. The time of map building, when the links between all anchor nodes and the radio device in a network are recorded, is referred to as the offline training period. The new RSS obtained from the measurements from all of the links is then compared against the radio map, so as to select the RSS location with the closest matching as the localization result, a process referred to as the online localization period. The major limitation of the fingerprint-based method is that an extensive effort is expended in the radio map building during the training period [4].
Model-based algorithms [5] utilize a channel model with a statistical standard to produce a purposeful relationship among the RSS and distance; exploiting this purposeful relationship, the position of the sensor node is calculable from the RSS measurement from each anchor through the in-range anchor distance estimation and, after that, utilizing the lateration techniques in order to determine the sensor node position coordinates. Some relevant studies applied statistical models to produce a complete radio map for the performance of the localization, during which the position of the sensor node is evaluated straightforwardly from the RSS measurement.
In most cases of the statistical models, the relationship between the outdoor localized environment and the RSS is extremely complicated to handle, and the shadow fading has been assumed to be mutually independent, despite that environmental obstacles cause similar shadowing impacts on numerous links that pass through these obstacles. On the other side, RSS fingerprint strategies do not quite work out for the assumptions of any previous relationship between the location and RSS; however, the training stage extends important time and effort. To some degree, the training phase can be reduced by means of spatial smoothing. Yet, this is possible only for the distances of the correlated RSS. Other researchers have additionally recommended supplementing some of the estimation utilizing anticipated RSS by utilizing the channel models [6].
In summary, model-based approaches necessitate minimum training effort; however, these techniques depend vigorously on the previous information of the connection between location and RSS. On the other hand, fingerprinting approaches are not aware of any previous information about the connection between the location and RSS, yet necessitate significant time and training effort.

2.1. Analysis of the Range-Based Received Signal Strength Indicator Technique

The basic concepts of the RSSI ranging depict the relationship among the transmitted and received power for the wireless signals with respect to the distance of the sensor nodes. The mathematical Equation (1) indicates this relationship.
Pr=Pt*(1d)αPr=Pt*(1d)α  (1)
where: Pr: the wireless signal received power. Pt: the wireless signal transmitted power. d: the distance between the sending and receiving nodes. α: the transmission parameter value depends on the propagation environment.
By taking 10-times the logarithm of the two sides of Equation (1), then Equation (1) is changed to Equation (2).
10logPr=10logPt10αlogd10logPr=10logPt-10αlogd  (2)
Thus, 10 log p is the power expression converted to dBm. Equation (2) can be expressed according to Equation (3).
Pr(dB)=A10αlogdPr(dB)=A-10αlogd  (3)
 
From Equation (3), the values of parameter A and α describe the relationship between the received signal strength and the distance of the signal transmission [7,8].
The RSSI propagation models currently used in wireless sensor networks include log-normal shadow models and free-space models. Log-normal shadow models are common propagation models appropriate for both indoor and outdoor environments and best suited for wireless sensor network applications, due to their adaptability to different environmental configurations. Free-space models, on the other hand, have the following advantages: (1) they have a much wider transmission distance than their carrier wavelength α and antenna size; (2) they do not have the problem of obstacles between their receivers and transmitters.
Assume the wireless transmission signal power is the sensor node received signal power situated at a distance of d; this can be dictated according to Equations (4) and (5).
Pr(d)=PtGtGrλ2(4π)2d2LPr(d)=PtGtGrλ2(4π)2d2L  (4)
PL(dB)=10logPtPr=10log[λ2(4π)2d2]PL(dB)=10logPtPr=-10log[λ2(4π)2d2]  (5)
In Equation (4), GtGt and GrGr are the antenna gain, and L is the system loss parameter, which has nothing to do with the transmission. GrGr = 1, GtGt = 1 and L = 1 are usually taken. Equation (5) is the signal attenuation formula using a logarithmic expression. Received power and the distance are twice the power attenuation in Equation (5). Log-normal shadow fading is the most general propagation model. It is suitable for indoor and outdoor environments. The model gives various parameters, which can be designed for different environments, as described in Equation (6).
PL(d)(dB)=PL¯¯¯¯¯(d)+Xσ=PL¯¯¯¯¯(do)+10logα(ddo)+XσPL(d)(dB)=PL¯(d)+Xσ=PL¯(do)+10logα(ddo)+Xσ  (6)
The parameter dodo in Equation (6) is the near-Earth reference distance, which depends on the experiential value; the parameter α is a path loss index, which depends on a specific propagation environment, and its value will become larger when there are obstacles; the parameter Xσ is a zero-mean Gaussian random variable. The parameters dodoα and σ describe the path loss model, which has a specific receiving and sending distance. The model can be used for general wireless systems design and analysis [9,10]. Synthesizing the above two kinds of propagation models, the log-normal shadow model is most suitable for wireless sensor network applications, because of its universal nature and the ability to be configured according to the environments.

2.2. Frequency and Power Subjected Path Loss Propagation Model

The propagation model that describes the path loss can be shown as Equation (7) [10]:
P(d)=P(do)10αlogddo+XσP(d)=P(do)-10αlogddo+Xσ  (7)
where P(d) refers to the received power of the wireless sensor at an exact location d to the landmark, P(do)P(do) is the power loss in a free space and is usually considered as one meter, α refers to the path loss exponent, while Xσ refers to the effect of the shadowing parameter with a variance of Xσ, as can be found in Equation (8).
XσN(0,σ2)Xσ∼N(0,σ2)  (8)
The transmission power P(do)P(do) more often relies on the frequency utilized transmitting packets. Along these lines, P(do)P(do) can be considered as a transmission frequency-dependent parameter [11]. Furthermore, the path loss exponent portrays the rate of RSS changing with the distance, which has a tendency to proliferate when the device works on a higher transmission frequency. This demonstrates that the path loss exponent is relative to the transmission frequency, as shown in Equation (9) [3].
αf(MHz)α∝f(MHz)  (9)
At last, the shadowing Xσ is the impact that causes the received signal power changes because of the obstructions in the propagation paths. It has been indicated experimentally that the shadowing is subject to the transmitted frequency and power level [12].
In most cases of the RSSI-related ranging schemes, the signal parameters of the propagation model are usually computed by the online or offline RSSI estimations between the reference nodes (beacons). Obviously, the online RSSI measurements expend computation and communication resources. Nonetheless, in practical environments, the signal propagation model is quite difficult to determine [13]. If the standard deviation and the path loss exponent are determined precisely in the network environment, at that point, the RSSI ranging is quite perfect [14].
Moreover, the RSS readings (fingerprints) are created at different locations according to the random sensor node deployment; ((xj, yj,) sj) with (xj,yj) refers to the location j where the RSS reading has been gathered as in Equation (10).
Sj=(SL11j,.....,SLq1j,SL1ij,.....,SLqij,.....SL1nj,.....,SLqnj)Sj=(S1jL1,.....,S1jLq,SijL1,.....,SijLq,.....SnjL1,.....,SnjLq)  (10)
This example indicates the RSS reading for n landmark and lq dimension. At each landmark, the frequency and power level combination has been defined as a dimension. We take note that certain localization schemes need preparation information (training data) to create signal maps at the offline phase, which is utilized later for the online localization process. We utilize the fingerprints gathered from the random sensor node deployment to frame the training data. In view of the propagation model of the path loss, the RSS measurements’ probability density function gathered from (N = 1,2, …N) landmarks autonomously can be composed as shown in Equation (11).
f(x,y)(P)=i=1N10log102π−−√σiPiexp⎡⎣⎢Pi8⎛⎝logd2id2iˆ⎞⎠2⎤⎦⎥f(x,y)(P)=∏i=1N10log102πσiPiexp-Pi8(logdi2di2^)2  (11)
where Pi = [ p1…pN] is the received power vectors for N landmark. Additionally:
Pi=(10αiσilog10)2Pi=10αiσilog102  (12)
diˆ=do(P(do)Pi)1αidi^=doP(do)Pi1αi  (13)
(x,y) is the estimated position of the unknown wireless sensor node that can be determined from the RSS measurements. Therefore, the parameter Pi consists of the path loss exponent and the variety of the shadowing, which is subject to and dependent on the frequency and power level transmission at each landmark.

3. Attacks Affecting Localization

Although traditional methods of cryptography, e.g., authentication, can be used to protect against conventional attacks from adversaries, like false message injections, non-cryptographic attacks are, however, completely orthogonal and have the ability to corrupt even the measurement processes. Unfortunately, traditional security services are incapable of militating against non-cryptographic attacks, thus the need to investigate the impact of these attacks on localization algorithms with the aim of proposing methods that can be effectively used to detect and eliminate such threats from the network. Despite recent advances in this domain of securing localization [15,16,17,18], there is yet to be any study in the area of robustness of RSS-based localization algorithm generation against physical attacks. This evaluative study is therefore significant in its contribution to wireless sensor network designs, particularly in the area of protocol decisions drivers, which will enable engineers to make better informed decisions about whether there is a need for a more complicated security localization algorithm.
The first step in addressing these security concerns is to look at this from the adversary’s perspective, so as to better preempt the attacks. Before a localization system’s signal strength can be attacked, the RSS readings must first be amplified or attenuated. This is achievable by attacking the transmitting device, such as using foil to cover the 802.11 card or by attacking the landmarks. Most attenuation attacks are carried out by simply placing a material between the sensors and the landmarks [19]. An adversary can also attack by amplifying or attenuating the signal strength of the RSS readings at the transmitter or receiver. A powerful attenuation loss can be achieved through the use of advanced materials, like RF-absorptive carbon fabric. The work in [20,21] presents a detailed study of propagation loss through common materials. Finally, based on the findings of this study, the removal of a barrier, such as a door, can be used to increase amplification through antenna-based methods of the corresponding material.

4. Related Work

A localization scheme for wireless sensor networks has been presented in [22]. This approach requires sensors to identify their location based on beacon information transmitted by locators. Each transmitted beacon contains the locator’s coordinates and the angles of the antenna boundary lines with respect to a common global axis. The communication between locators of sensors is encrypted and secure. This approach needs specialized antennae and will increase the cost of localization.
A related range-independent localization scheme, HiRLoc, has been proposed [23]. Beacon transmission is secured by using computationally-efficient cryptographic primitives in tandem with the physical medium constraints to provide localization. HiRLoc requires a directional antenna for localization, increasing the cost for localization.
The secure verification of device position scheme [24], which is based on verifiable multilateration and the measurement of radio propagation time, enhances conventional multilateration with distance estimation by verifying node positions using a set of base stations. This method requires complex time synchronization logic and extra hardware for its implementation.
The detection of malicious nodes has also received some attention, with the TSSLproposed as a solution [25]. Malicious nodes are detected in a step-wise fashion, beginning with anchor nodes collaborating by checking their coordinates, identities and time of sending information. In this proposed solution, the WSN is partitioned into sub-areas of different trust grades by using a mesh generation algorithm to segregate malicious nodes; besides, if signal strength attacks are launched, the distance estimation will be erroneous, and the error is cascaded to all successive stages.
A novel ratio-based signal strength metric (RSM) [26] has been proposed as a new solution for wireless sensor network localization. This metric directly maps information about distance to a set of landmarks with the goal to achieve robust localization in spite of attacks. However this method assumes that attacks on all of the landmarks are uniform; with variation in the attacks on the landmarks, their method performs poorly.
The improvement of localization accuracy has been proposed in [27] through applying multiple frequencies and power transmissions. By using deviations of RSS readings and residuals, the algorithm forms high quality RSS fingerprints. Although this method improved the localization accuracy, it, however, did not consider the effect of the attacks.
A scheme to ensure secure localization in the presence of cheating beacon nodes has been proposed in [28]. This method is based on known error bounds. Unfortunately, the problem with this solution is that it is built on fixing the location of beacons based on the distribution of nodes.
A proposed approach concerned with a secure location verification in [29] has been reported to be well suited to a service-restricted region. This algorithm works by considering nodes whose signal strength is incompatible with the in-region as adversaries. However, this requires deployment knowledge of all sensors, and this approach cannot be scaled to bigger networks.

5. Proposed Solution

We propose a solution based on multi-frequency multi-power transmission through using two techniques: a step function multi-frequency multi-power localization (SF-MFMPL) and a combination of multi-frequency multi-power localization (C-MFMPL). In order to mitigate the influence of shadow fading, the averaging of all RSS over all of the transmitted frequencies will be performed. In our solution, the anchor or access point (AP) nodes will transmit signals in multi-frequencies at multiple power levels. Sensor nodes receive these signals and construct the average RSS fingerprint from them. All of the sensors are already coded with the knowledge of the expected frequencies and the power level from the AP. By observing the RSS fingerprint that is expected, the sensor will be able to find if there is a barrier attenuating or degrading the signal. The sensor will reject the RSS fingerprints that it doubts as attenuation or degradation. Leaving those corrupted RSS fingerprints, the sensor nodes will choose the remaining RSS fingerprints from the uncorrupted RSS and utilize lateration with non-linear least squares to get the location of the sensor node.
The sensor and the AP are strictly time synchronized. This can be done by running a quartz crystal clock in all of the sensors and the AP. With the help of the quartz crystal, all of them are time synchronized. Quartz crystal-based time synchronization is easy to implement, and it is inexpensive. More information about other time synchronization methods in wireless sensor networks can be found in [30,31].
In order to avoid the estimation being affected by interference and reflection, we propose a technique to filter those signals by estimating the approximate angle of arrival of the signal. In addition, we also propose a method to get the estimation of the attack area in the network. By estimating the attack area and alerting the network administrator, those barriers can be removed and the localization accuracy improved.

5.1. Modified Robust Localization Based on the Multi-Frequency Multi-Power Approach

Location is achieved by utilizing a multi-frequency multi-power transmission. The knowledge of the frequency and power level from the expected antenna is known a priori by the sensor. We vary the frequency by three levels, 400 MHz, 600 MHz and 800 MHz, as well as synchronously vary the power level by three levels, 4 dB, 6 dB and 8 dB. After averaging each received power level that has been transmitted by the three frequency levels, three dimensions of the RSS between the sensor and each landmark result. The use of three levels of frequency and power transmission will be suitable enough to accomplish an accurate performance without any extra computational cost and complexity, as well as reducing the fingerprint database memory size.
The receiver at the sensor node will try to synchronize and check the expected power level and frequency to check if there is any signal degradation or attenuation in the path of the signal. The lateration technique is applied on the position of the sensor and the distance measurement to get the location of the sensors. In addition, based on the signal irregularities at all sensors, the map of the region of attack is found. By cooperating with all sensors, the sensor is able to identify the area of the physical barrier attack.
The functional block diagram of our previous work (SF-MFMPL) can be found in [32]. Figure 1 illustrates the functional block diagram of the (C-MFMPL) scheme.
Figure 1. Block diagram of the proposed localization solution.
The fingerprint of the proposed solution consists of two phases, offline and online. In the offline phase, the beacon signal will be checked first through various stages until the final stage, which creates the RSS fingerprint for each landmark. The sensor device is assumed to have knowledge about the AP’s position and the approximate angle of the AP’s location. Knowing the approximate angle range in which the AP is located helps to avoid any faulty measurements due to signal interference or reflection by the barriers. Since sensor nodes are placed randomly in the network, the angle of arrival of the signal from the AP is found by sensor tuning in each direction till the maximal power is received. This process has to be done for each AP at the initial deployment time. The threshold is the amount of tolerance between that estimated and the actual one. It can be measured by placing a small obstacle for signal degradation at different points in the network and measuring the error. The size of the obstacle will be the maximum obstacle size that our network can tolerate. This is done to accommodate certain infrastructure provisions made by the administrator of the network. The stage of averaging each received power level that has been transmitted by the three frequency levels is very important to overcome the effect of the log-normal shadow fading effects. Finally, the last stage in the offline phase is the cooperation of the sensor nodes to create the RSS fingerprint database of the whole network, while in the online phase, the sensor node receives the beacon signal, then averages the RSS and matches it to the fingerprint database, besides using the lateration and trilateration techniques to pin-point the sensor node position.
1. Offline Phase:
The fingerprints are produced and stored in a database during this phase containing the average RSS readings of the anchor nodes’ positions. Actually, the location of the anchor nodes ought not to change during the online phase. Figure 2 shows the block diagram of the offline phase.
Figure 2. Offline phase of the proposed solution.
The representation of the fingerprint database for the (C-MFMPL) solution can be utilized by a set of RSS with the coordinates of the anchor nodes gathered by each sensor in the network, as shown in Equation (14).
F={f1(P1,P2,P3),f2(P1,P2,P3),f3(P1,P2,P3)}F=f1(P1,P2,P3),f2(P1,P2,P3),f3(P1,P2,P3)  (14)
where: f1, f2, f3 are the transmitted frequencies; P1, P2, P3 are the decided power levels.
The average RSS all over the transmitted frequencies that are stored in the fingerprint database can be defined in Equations (15) and (16), respectively.
Soffline={averageRSS1(f1,f2,f3),averageRSS2(f1,f2,f3),averageRSS3(f1,f2,f3)}Soffline=averageRSS1(f1,f2,f3),averageRSS2(f1,f2,f3),averageRSS3(f1,f2,f3)  (15)
Soffline={rj=1i,rj=2i,......,rj=mi}Soffline=rij=1,rij=2,......,rij=m (16)
rjirij represents the average RSS readings estimated from anchor j, and m represents the number of anchors utilized in the network.
Moreover, Equation (17) shows the RofflineRoffline set that is gathered and stored in the fingerprint database during the offline phase.
Roffline={Poffline,Soffline}Roffline=Poffline,Soffline  (17)
The PofflinePoffline and SofflineSoffline sets represent the anchor nodes’ coordinates and the average RSS measurements, respectively.
While in the (SF-MFMPL) solution, each anchor (AP) sends beacons according to a step function, each decided power level will be sent with a decided frequency [32]. In order to mitigate the effect of the log-normal shadow fading, the averaging of N (RSS) values collected from each anchor (AP) has been performed in this solution according to Equation (18).
averageRSSIi=1Nj=1NRSSIijaverageRSSIi=1N∑j=1NRSSIij  (18)
The value of (N = 3) will be taken for this solution to maintain the same system model conditions that are used for the (C-MFMPL) technique.
2. Online Phase:
During the online phase, the sensor nodes receive the transmitted beacons from the anchors with the same combinations of the frequency and power levels. Figure 3 illustrates the online phase of the proposed solution.
Figure 3. Online phase of the proposed solution.
Therefore, another measurement set of the RSS, called SonlineSonline, is produced, which will be utilized for seeking the right fingerprints according to the fingerprint matching database, as shown in Equations (19) and (20), respectively.
Sonline={Ronline}Sonline=Ronline  (19)
Ronline={rj=1i,rj=2i,......,rj=mi}Ronline=rij=1,rij=2,......,rij=m  (20)
Ronline denotes the average RSS readings received from each anchor node.
Eventually, the online phase depends on the RSS fingerprints generated by the offline phase to find the best matching RSS values for the estimation of the sensor node location. The RSS fingerprint machine learning database plays the most important key role in the proposed algorithm, first through filtering the physical barrier attack effects with the help of the proposed grid coloring algorithm, which depends on the angle of arrivals of the beacon signals received from each anchor (AP), and, second, participating in the process of mitigating the harsh shadow fading environment.

5.2. RSS Measurement

As an aspect of sensor network communication and sensing subsystems, various sensor designs have been supported by the angle of arrival (AOA) mechanism, such as tracking and other applications, which accord improved monitoring in the orientation of the target by means of beamforming [33]. Sensors might also be supported by directional antenna arrays, so that the communication transmission can be directed toward the required destination and lessening the neighbor sensor interference. With the antenna beam pattern information, a single radio receiver with a multiple antennae system might also be utilized for the efficient angle of arrival determination of the RF signal.
A multiple beam pattern of the directional antenna array can be used to determine the received signal strength RSS ratio. This solution establishes a low complexity and cost for the sensor network design. Each anchor (AP) is assigned a combination of the frequency and power level transmission. Before starting localization, each sensor node tunes in to the approximate angle in which an AP is located to capture the signal and measure the RSS. By tuning in to the approximate angle, we are able to filter out the RSS measurement errors due to reflection and interference signals from other directions. Each sensor calculates the estimated signal frequency and power according to the defined frequency and power level combination. Depending on Equations (21) and (22), the tuning is done in a way to minimize the error between the actual transmitted frequency and power level.
Ef=abs(yfyaf)Ef=abs(yf-yaf) (21)
Ep=abs(ypyap)Ep=abs(yp-yap) (22)
If the deviation in the error within the approximate angle is greater than the threshold, the RSS value from that AP must be rejected, as it is an indication of signal attenuation or degradation by the attacker; the deviation in error can be calculated from Equations (23) and (24), respectively.
Df=min(Ef)θmin<θ<θmaxDf=min(Ef)θmin<θ<θmax (23)
Dp=min(Ep)θmin<θ<θmaxDp=min(Ep)θmin<θ<θmax (24)
Df and Dp must be less than threshold T for the RSS value in order to be accepted. Every sensor must measure the average RSS value all over the transmitted frequencies for the same anchor (AP). The best value of the RSS with the lower values of Df and Dp must be taken. The AP’s location (x, y) together with its measured average RSS value constitutes the RSS fingerprint for that AP. Each sensor node must calculate the average RSS fingerprint for all of the APs whose Df and Dp is less than the threshold T.
In this paper, The RSS error between the original measurements and the reconstructed measurements at a certain threshold, which presents the least amount of error for an individual network to be localized, is identified by the RSS error threshold value. Intuitively, as the discard threshold increases, the error increases (that is, the ability to reconstruct a true representation of the original signal degrades), for which the RSS error from each anchor (AP) increasing by more than 15% of the nominal RSS will be neglected, while RSS error less than 15% will be accepted. In order to select an appropriate RSS threshold, the use of an exhaustive search based on computer simulations is mandatory, due to the complexity involved in the problem at hand. Meanwhile, finding the optimum threshold value is difficult and needs extensive training for the simulation procedure. Hence, based on the relevant empirical and experimental studies related to the threshold value selection, we consider the RSS error up to 15% of the nominal RSS as the acceptable approximate threshold.

5.3. Localization

Localization involves two stages: ranging and lateration. Ranging estimates the distance d from the position of the sensor node to the anchor (AP). The RSS can be expressed according to Equation (25).
RSS=Po10αlogdRSS=Po-10αlogd (25)
Therefore, the distance can be determined from Equation (26) as follows:
d=10(PoRSS10α)d=10(Po-RSS10α) (26)
where: PoPo is the power received in dBm at a 1-m distance; d is the distance between the node and the AP; α is the path loss component.
Lateration gets the position of the sensor node from the distance measurement for different anchors (AP) and their locations. There are two popular methods to get the location estimate: non-linear least squares (NLS) and linear least squares (LLS). In NLS, from the estimated distance di and known positions Li = (xi,yi) of the landmarks, the position (x,y) of the target device can be estimated by finding (xˆ,yˆ)(x^,y^) satisfying Equation (27).
(xˆ,yˆ)=argminx,yi=1n[(xix)2+(yiy)2−−−−−−−−−−−−−−−−√diˆ]2(x^,y^)=argminx,y∑i=1n(xi-x)2+(yi-y)2-di^2 (27)
where i = 1…n for n total landmarks.
Since solving this equation is computationally complex, we can approximate this relation as shown in Equation (28) [34].
APˆ=bAP^=b (28)
where:
A=(x11nni=1xiy11nni=1yixn1nni=1xiyn1nni=1yi)A=x1-1n∑i=1nxixn-1n∑i=1nxiy1-1n∑i=1nyiyn-1n∑i=1nyi (29)
and:
b=12⎛⎝(x211nni=1x2i)+(y211nni=1y2i)(x2n1nni=1x2i)+(y211nni=1y2i)(dˆ2n1nni=1dˆ2i)⎞⎠b=12(x12-1n∑i=1nxi2)+(y12-1n∑i=1nyi2)(xn2-1n∑i=1nxi2)+(y12-1n∑i=1nyi2)-(d^n2-1n∑i=1nd^i2)
A is described by the coordinates of landmarks, and b is composed of the estimated distance to landmarks. The position estimation is solved by Equation (31).
Pˆ=(ATA)1ATbP^=(ATA)-1ATb
Moreover, for the localization based on a trilateration technique, the anchor nodes’ coordinates defined by the i-th beacon Bi are (xBi, yBi); the coordinates of the unknown sensor node are (x,y); RSSIi refers to the signal strength measurements between the sensor node and each anchor node; and di is the distance estimation among the sensor node and the i-th beacon node Bi. Assume three beacons (b1, b2, b3) with three distance estimations (d1, d2, d3), then the sensor node coordinates can be obtained as follows [14]:
(xxB1)2+(yyB1)2=d21(xxB2)2+(yyB2)2=d22(xxB3)2+(yyB3)2=d23(x-xB1)2+(y-yB1)2=d12(x-xB2)2+(y-yB2)2=d22(x-xB3)2+(y-yB3)2=d32
By utilizing the earlier two equation minus the third one, respectively, we can determine the following equations:
2(xB3xB1)x+2(yB3yB1)y2(xB3xB2)x+2(yB3yB2)y=x2B3x2B1+y2B3y2B1+d21d23=x2B3x2B2+y2B3y2B2+d22d232(xB3-xB1)x+2(yB3-yB1)y=xB32-xB12+yB32-yB12+d12-d322(xB3-xB2)x+2(yB3-yB2)y=xB32-xB22+yB32-yB22+d22-d32
By expressing Equation (33) in matrix form, we get:
[xy]=[2(xB3xB1)2(xB3xB2)2(yB3yB1)2(yB3yB2)]1[x2B3x2B1+y2B3y2B1+d21d23x2B3x2B2+y2B3y2B2+d22d23]xy=2(xB3-xB1)2(yB3-yB1)2(xB3-xB2)2(yB3-yB2)-1·xB32-xB12+yB32-yB12+d12-d32xB32-xB22+yB32-yB22+d22-d32
Along these lines, rather than using the real distance di, it is sensible to utilize the noisy estimations diˆdi^, then Equation (34) can be denoted as follows:
(xˆxB1)2+(yˆyB1)2=dˆ21(xˆxB2)2+(yˆyB2)2=dˆ22(xˆxB3)2+(yˆyB3)2=dˆ23(x^-xB1)2+(y^-yB1)2=d^12(x^-xB2)2+(y^-yB2)2=d^22(x^-xB3)2+(y^-yB3)2=d^32
[xˆyˆ]=[2(xB3xB1)2(xB3xB2)2(yB3yB1)2(yB3yB2)]1⎡⎣x2B3x2B1+y2B3y2B1+dˆ21dˆ23x2B3x2B2+y2B3y2B2+dˆ22dˆ23⎤⎦x^y^=2(xB3-xB1)2(yB3-yB1)2(xB3-xB2)2(yB3-yB2)-1·xB32-xB12+yB32-yB12+d^12-d^32xB32-xB22+yB32-yB22+d^22-d^32
where (xˆ,yˆ)(x^,y^) is the unknown node coordinate estimation. By subtracting Equation (36) from Equation (34), we can get the localization error of the unknown sensor node as below:
[xˆxyˆy]=[2(xB3xB1)2(xB3xB2)2(yB3yB1)2(yB3yB2)]1⎡⎣⎢(dˆ21d21)(dˆ23d23)(dˆ22d22)(dˆ23d23)⎤⎦⎥x^-xy^-y=2(xB3-xB1)2(yB3-yB1)2(xB3-xB2)2(yB3-yB2)-1·(d^12-d12)-(d^32-d32)(d^22-d22)-(d^32-d32)
In view of Equation (37), it demonstrates the localization error for utilizing the trilateration method, which is identified with both the RSSI ranging errors and the anchor node coordinates, as it is known a priori that the anchor nodes are fixed nodes with known coordinates, so that the localization error is resolved in terms of the RSSI ranging error only, besides the anchor nodes having to be deployed legitimately. Along these lines, the error in the localization accuracy can be determined by the equation below:
LocalizationError(E)=⎡⎣⎢(dˆ21d21)(dˆ23d23)(dˆ22d22)(dˆ23d23)⎤⎦⎥LocalizationError(E)=(d^12-d12)-(d^32-d32)(d^22-d22)-(d^32-d32)

5.4. Detecting Attack-Prone Regions

One of the important advantages of our solution is that we can detect the region of attack and take some corrective action. In our solution, each sensor node can identify the AP that has barriers in the path of the sensor node. Each sensor node sends data to a signal fusion center, which marks the boundary of the attack region and handles it by eliminating barriers effect.
Figure 4 shows a network with APs, sensors and barriers. With the accepted AP (whose error deviation is less than the threshold) and the rejected AP (whose error deviation is above the threshold), the sensor node location estimated is provided to the signal fusion center. The signal fusion center is also aware of the direction of the propagation of the signal from the anchor (AP) to the sensor nodes.
Figure 4. Wireless sensor network system model with APs, sensors and the barriers.
Based on this information, the signal fusion center constructs a signal map. The signal map is the representation of points where the signals from the APs are able to traverse the network. Signal map holes are places where the signal from the AP is not accepted at the sensor node due to a larger error deviation in the signal power, as shown in Figure 5.
Figure 5. Signal map holes at the fusion center.
Actually, sensor nodes have the flexibility to communicate with the anchor node, so as to build the radio signal map by means of the wireless channel. As a rule, a fusion center at each sensor node is jointly processing the signal in order to make accurate situational estimations. For the detection part, the fusion center necessitate making a decision concerning the presence of an attenuation of the received signal strength due to a barrier attack. Typically, a threshold value should be utilized to make a proper decision, and it is a significant parameter for the detection procedure.
Based on the whole network signal map defined by the RSS fingerprint database, which is created by the cooperating sensor nodes, actually, the valid RSS readings will be utilized for the estimation of the sensor node location, while the neglected RSS values refer to the signal holes in the fingerprint to be taken into consideration for detecting the area of attack. This mechanism introduces the basis of the fusion center at each sensor node to make the proper decision for identifying the signal holes in the network.
Through construction of the signal map, we are able to identify the signal holes in the network. Signal holes are the regions of attack in the network and must be corrected. The usual corrective action is to remove the barrier manually.
To detect the signal hole, we propose a grid coloring algorithm. The algorithm splits the entire network into small equally-sized grids. Initially, all of the grids are white. The sensor locations are marked in the grids. When a sensor accepts the AP’s RSS value (since the error deviation in the signal power is less than the threshold), the grids in the direction from the AP to the sensor node along the direction of the signal are colored gray. This process is performed for all sensors for all of the accepted AP. Once the process is complete, all of the grids still in white are the signal holes.
The algorithm code is given below:
Algorithm 1 Signal hole detection.
  • Require: GM[][]SplitnetworkintosmallgridsN*NGM[][]←SplitnetworkintosmallgridsN*N
  •   for i=1: N do
  •     for j=1: N do
  •       GM[i][j] = White
  •     end for
  •   end for
  •   for i=1: NoofSensor do
  •     for j=1:NoofAP do
  •       if error_deviation(AP)<thresholderror_deviation(AP)<threshold then
  •         for X=1: N do
  •           for Y=1: N do
  •             if Grid(X,Y)isindirectionofAP,sensor(i)Grid(X,Y)isindirectionofAP,sensor(i) then
  •               GM(X,Y)grayGM(X,Y)←gray
  •             end if
  •           end for
  •         end for
  •       end if
  •     end for
  •   end for
Error in the estimated attack area is calculated by Equation (40).
E=nGActnGFE=nGAct-nGF
Error in the estimated attack area is calculated by Equation (40).
E=nGActnGFE=nGAct-nGF
where: nGActnGAct is the No. of gray squares actually in the attack area; nGFnGF is the No. of gray squares estimated in the attack area.

6. Performance Analysis

We simulate the proposed solution by using MATLAB. The simulation area consists of a 1000 × 1000 m two-dimensional terrain. The optimal number and placement of the anchor (AP) is important. We assume a small, but reasonable beacon node population of 20 beacon nodes (approximately five beacons in each direction), which are scattered uniformly over the 1000 m × 1000 m areas. We place a maximum of 10 barriers of a length of 1 m and a width of 1 m randomly in the network. The barriers can cause signal strength degradation and have a severe effect on the RSS. This section presents the performance evaluation of the localization accuracy for both of the proposed solutions SF-MFMPL and C-MFMPL in the face of the log-normal shadow fading environment. Table 1 shows the system model specification.
Table 1. System model specifications.
It is essential for an examination to assess all outline and advancement works with respect to the research goals. In this way, the performance evaluation is given with respect to this issue. The performance evaluation is performed according to two main parts: first, the localization accuracy, which is defined by the average localization error for different parameters of the network system model, as well as different shadow fading propagation models, and the second part is the detection efficiency of the physical signal strength attacks, which is performed according to the detected area of attacks error.
The average localization error has been achieved according to two cases:
Case I: path loss exponent α = 3, standard deviation of the log-normal shadow fading σ = 5 dB;
Case II: path loss exponent α = 4, standard deviation of the log-normal shadow fading σ = 6 dB.
Figure 6. Average localization error versus the number of barriers for the step function multi-frequency multi-power localization (SF-MFMPL) algorithm. (a) Lateration technique Case I; (b) Lateration technique Case II.
The average localization error is calculated between the actual and the estimated locations for all sensor nodes. The performance is measured in terms of average localization error by varying the number of barriers in the network for different numbers of APs and for both propagation system model cases. Figure 6 and Figure 7 show the average localization error for the (SF-MFMPL) specified by the lateration and trilateration method, respectively.
Figure 7. Average localization error versus the number of barriers for the SF-MFMPL algorithm. (a) Trilateration technique Case I; (b) Trilateration technique Case II.
It is surely understood that expanding the density of anchor nodes accordingly improves localization. However, increasing the number of anchor nodes may not be a feasible solution due to the extra hardware requirements, which may be more expensive.
The simulation results in Figure 6 and Figure 7 show an efficient localization accuracy with respect to the few and reasonable number of anchor nodes that have been applied.
Moreover, Figure 8 and Figure 9 show the average localization error for the (C-MFMPL) specified by the lateration and trilateration methods, respectively.
Figure 8. Average localization error versus the number of barriers for the combination of multi-frequency multi-power localization (C-MFMPL) algorithm. (a) Lateration technique Case I; (b) Lateration technique Case II.
From the simulation results, we observe that the number of anchors (APs) is a significant factor and plays a key role affecting the localization accuracy. Hence, in our approach, the increasing of the number of the anchors (APs) for the system model will lead to reducing the localization error very rapidly, because the number of variables used in non-linear regression increases, as well. On the other hand, utilizing the trilateration technique enhances the performance of the localization clearly, as compared to the performance based on lateration.
A comparison of the average localization error for both the (SF-MFMPL) and (C-MFMPL) algorithms according to 20 anchors (APs) and two propagation model cases is shown in Figure 10.
With regards to the simulation results above, we observe that for the localization accuracy identified by the average localization error for both proposed solutions, C-MFMPL is better than the proposed solution based on SF-MFMPL in both cases of the shadow fading propagation model, as well as the lateration and trilateration techniques. This is due to different strategies of using multi-frequency and multi-power for the two algorithms. Meanwhile, the propagation parameters α and σ are clearly subject to and depend on the transmission frequency and power level. In (SF-MFMPL), each power level is indicated by a specific transmitted frequency, while in (C-MFMPL), a combination of multiple frequencies and power levels has been indicated. Hence, the difference in the two algorithms’ strategies will lead to different results in the face of the impact of shadow fading. In addition, simulation results of the trilateration technique showed the best performance for both proposed solutions and under various simulation conditions. Table 2 illustrates a comparison summary of the average localization error for the two proposed solutions according to 20 anchors (APs) and two propagation model cases.
Figure 9. Average localization error versus the number of barriers for the C-MFMPL algorithm. (a) Trilateration technique Case I; (b) Trilateration technique Case II.
Figure 10. A comparison of the average localization error for both algorithms, (SF-MFMPL) and (C-MFMPL), respectively. (a) Case I; (b) Case II.
Table 2. Average localization error comparison of the two proposed solutions according to 20 anchors (APs) and two propagation model cases.
The effect of changing the path loss exponent (α) on the average localization error with respect to different values of the log-normal shadow fading standard deviation (σ) has been taken into consideration of the simulation analysis for both proposed algorithms, (SF-MFMPL) and (C-MFMPL), as shown in Figure 11 and Figure 12, respectively.
Figure 11. Average localization error versus different path loss exponent values for the SF-MFMPL algorithm (No. of barriers = 10, APs = 20). (a) Lateration technique based; (b) Trilateration technique based.
Figure 12. Average localization error versus different path loss exponent values for the C-MFMPL algorithm (No. of barriers = 10, APs 20). (a) Lateration technique based; (b) Trilateration technique based.
In practice, the shadow fading propagation model parameters are unpredictable; therefore, it will be susceptible to errors; therefore, we considered the influence of changing the propagation model parameters identified by the path loss exponent and the standard deviation on the localization accuracy for both of our proposed solutions. As illustrated in the figures above, our proposed algorithms showed an efficient and accurate performance for the estimation of the sensor nodes’ positions with an acceptable localization error. In addition, the proposed solution based on (C-MFMPL) has a better performance than the (SF-MFMPL) solution in both cases of lateration and trilateration. Table 3 and Table 4 indicate a comparison of the performance evaluation for our proposed solutions with respect to the changing of the shadow fading propagation parameters based on the lateration and trilateration techniques, respectively.
Table 3. Average localization error comparison of the two proposed solutions according to changing the shadow fading propagation parameters (lateration based).
Table 4. Average localization error comparison of the two proposed solutions according to changing the shadow fading propagation parameters (trilateration based).
The other cause of localization error arises due to the anchor node’s position. We considered the effect of the anchor node’s positions on localization accuracy. Hence, the anchor node’s placement and geometry have a crucial role to play with respect to localization performance. The average localization error for the random anchor placement configuration is measured for both the (SF-MFMPL) and (C-MFMPL) algorithms, respectively, as illustrated in Figure 13.
Figure 13. Localization error versus the number of barriers for a random placement configuration of APs. (a) SF-MFMPL; (b) C-MFMPL.
According to the simulation results above, it is clearly observed that the localization accuracy in the case of the random deployment of the anchor nodes (APs) drops slightly with respect to the increase of the number of barriers in the network. However, the average localization error for this case is still within the acceptable error range regarding the RSSI-based localization technique.
Proper positioning of anchor nodes is necessary for the effective localization accuracy of wireless sensor networks. Since the performance of the localization accuracy depends on the placement of the anchors (APs) in the network. The performance analysis in such an environment has been compared among various anchor (AP) deployment mechanisms; Figure 14 and Figure 15 illustrate the performance evaluation for a uniform, around the perimeter and random deployment mechanism and for both algorithms, (SF-MFMPL) and (C-MFMPL), respectively.
Figure 14. Localization error versus the number of barriers for SF-MFMPL with a random, around the perimeter placement configuration of APs. (a) Case I; (b) Case II.
Figure 15. Localization error versus the number of barriers for C-MFMPL with a random, around the perimeter placement configuration of APs. (a) Case I; (b) Case II.
In accordance with the simulation results above, we have indicated the impact of the anchor node deployment, and it is clearly affected by the localization performance. A comparison of the performance evaluation for both proposed solutions, SF-MFMPL and C-MFMPL, under the two cases of the anchor node (AP) deployment mechanisms has been summarized in Table 5 and Table 6.
Table 5. Average localization error comparison of the SF-MFMPL proposed solution according to the anchor node deployment configuration.
Table 6. Average localization error comparison of the C-MFMPL proposed solution according to the anchor node deployment configuration.
According to the simulation results stated in Table 5 and Table 6, the localization performance of the uniform, around the perimeter deployment of the anchor nodes is better than the random deployment, as well as being the optimal placement configuration for an effective localization accuracy. In addition, the proposed algorithm C-MFMPL showed a better performance than the SF-MFMPL algorithm for both the lateration and the trilateration technique.
Figure 16. Invalid beacon drop ratio vs. No. of barriers.
Another important metric that indicates the effect of the barrier attack on the localization performance is the percentage of the invalid beacon drop ration due to the barrier attenuation of the signal with respect of the total percentage of available beacons for the proposed system, as shown in Figure 16.
We observe from the figure above that as the number of barriers increases, a greater number of invalid beacons will appear in the network, and drop ratio is increased, as well. In spite of the 40% invalid beacon drop rate from the case of 10 barriers, the performance of our proposed approach is still accurate and contributes to a lesser localization error.
One of the most significant performance evaluation criteria is the accuracy of the detected area of attack. This accuracy is measured in terms of the difference between the actual area occupied by the barrier and the detected area of the signal holes. We varied the number of anchors (APs), as well as the deployment configuration in order to determine the optimum placement positions for the detection mechanism. The accuracy of the detected area of attack is illustrated in Figure 17.
Figure 17. Detected area error vs. No. of APs.
Based on the simulation results above, we observe that as the number of anchors (APs) increases, the detected area error reduces greatly, as well as the optimum placement configuration of anchors (APs) around the perimeter showed more accurate performance through identifying the attack area with great precision.
The accuracy of detecting the area of attack also depends on the shape and dimension of the barrier attack that is introduced into the network. We introduced a rectangular barrier of various dimensions and measured the accuracy of the detected area of attack, as shown in Figure 18.
Figure 18. Detected area error for different barrier dimensions.
In accordance with the simulation results above, initially, when the barrier size increases, the error in the detected area of attack is decreased gradually with respect to the increasing of the anchors (APs); this is due to more beacon signals being affected by these barriers with more RSS error deviations having been neglected, so that there is more information available for detecting the area of attack. On the other hand, increasing the barrier size will lead to increasing the localization error slightly.

7. Conclusions