Asymmetric Event-Driven Localization Algorithm in Constrained Space

Existing technologies are inapplicable to localization in constrained space, especially when considering environmental factors. These methods with low localization accuracy cannot meet the location requirements in constrained space, for they usually call for lots of computation time and process resources. Moreover, they are easily interfered by environmental factors and attacks from other users. Consequently, in order to improve location accuracy in constrained space, an asymmetric event-driven localization algorithm (AELA) is proposed in this paper, which is based on the combination of event distribution and anchor node achieving a distributed location estimation strategy, so that it can satisfy the localization requirement of constrained space and achieve the high-accuracy localization with a small amount of events and anchor nodes. Meanwhile, to improve the accuracy of the algorithm, a set of candidate events are adopted to prune the event which does not meet location accuracy requirements. We finally perform experiments in indoor corridors, and the results show that the proposed algorithm has higher performances not only on localization accuracy and energy consumption but also on anti-interference ability than RSSI and MSP.


Introduction
With the development of sensing technology in different fields such as basic service and national defence, location technology becomes a hot research field. It is directly correlated with many applications, which leads to the fact that high localization accuracy is helpful for detecting the position coordinates of an event or a node, and it is the foundation of the routing and coverage technology in WSN. In addition, the progress of the location technology also contributes to the advancement of context-aware technology.
As the sensing technology is applied in some scenarios like monitoring forest fire, road traffic, and coal mine tunnels, the requirement of localization algorithm has not been confined to the outdoor environment but expanded to constrained space, such as indoor corridors, room full of obstacles, coal mine tunnels, and archaeological sites. Constrained space is limited by such factors as non-lineof-sight, multipath, and changing interferences as well as blocks [1]. Besides, sensor node is limited by its energy and poor computing ability. These all make many localization technologies applied to outdoor cannot be directly applied to indoor. Fortunately, monitoring and positioning problem of moving objects in constrained space is more and more concerned along with the development of context-aware technology in various application scenarios. Therefore, it becomes particularly important to study and focus on the localization technology in constrained space.
The working environment of most previous localization algorithms is outdoor space in wireless sensor network (WSN). But for a scenario like coal mine tunnels, its network topology is linear structure rather than mesh structure. Therefore, previous localization algorithms cannot directly be used in these scenarios like indoor corridors, coal mine tunnels, and so on. Currently in the constrained space, research on localization usually adopts the RSSI space attenuation model [2], RFID, and infrared technology [3]. What is more, some researchers fuse the methods mentioned above. However, these methods all have low localization accuracy and cannot satisfy the actual requirements due to the interference of various influence factors in constrained space as well as unstable network. Consequently, a kind of 2 International Journal of Distributed Sensor Networks localization algorithm suitable for constrained space with low energy consumption, low requirements on equipment, and high localization accuracy should be arisen.
In this paper, we propose an asymmetric event-driven localization algorithm (AELA) in constrained space. In this algorithm, we introduce the adaptive events and use the distributed location estimation method, which can avoid network conflicts and make the algorithm apply to the constrained space effectively. The algorithm can achieve high localization accuracy with a small amount of anchor nodes and events, higher execution efficiency, and low energy consumption. Additionally, the algorithm cuts off the event unqualified from the candidate set to improve the localization accuracy. Finally, we deploy our experiment from multiple aspects to analyse the algorithm and prove the feasibility of the algorithm.

Related Work
Most previous WSN localization methods can be classified into two categories: range-based [4] localization and rangefree localization [5], while range-based methods can be generally classified into two types: anchor-based localization and anchor-free localization.
Most of the range-based methods, such as RSSI, TOA, TDoA, and AOA, use multipoint localization. RSSI [6] method locates by calculating the signal propagation loss, according to the difference of signal strength between location nodes, transforming the propagation loss into distance in radio-free space attenuation model. However, range-free methods estimate the location relationship between different nodes using information such as network connectivity. For example, algorithms like Centroid [7], APIT [8], and DV-Hop [9] all adopt some anchor nodes with known locations. As a result, more anchor nodes are needed to participate in localization and consumption is much higher with the increase of demand of localization accuracy. Anchorfree methods mainly depend on event generators and data processing platform, correlating the event perceptive time at a sensor node with known space-time relationship of controlled event [10]. The main idea is to make use of the space-time relationship of asymmetric events distributed by event generator to map the locations of nodes.
Some researchers propose to use space-time related events to locate, such as Spotlight algorithm [11] by Stoleru et al. and Lighthouse [12] by Romer. These solutions are able to realize high-accuracy long-distance localization with less consumption. However, these solutions are all based on an implicit assumption that localization events can be precisely controlled and distributed to a specified location at a specified time. Actually, precise event distribution is difficult to implement without careful calibration, especially when the terrain is uneven and the event-generating devices require certain mechanical manoeuvres, for example, the helicopter scene and the telescope mount used in Spotlight.
To solve the above problem, Zhong and He propose a balanced method that avoids the limitations of both anchorbase and anchor-free solutions. The method is multisequence  positioning (MSP) [13], locating in deployments where an event has line-of-sight to all nodes. The idea of MSP is to reconstruct and estimate two-dimensional location information for each node by processing multiple one-dimensional node sequences, easily obtained through loosely guided event distribution. Unlike anchor-based methods, MSP allows a flexible tradeoff between the physical cost and the software cost. MSP uses only a small number of anchor nodes for localization, theoretically, as few as three, which is far fewer than the existing solutions. What is more, MSP adopts multiple events rather than anchor nodes to gain the localization accuracy and reduce the physical cost. Unlike anchorfree methods, MSP does not need to maintain rigid timespace relationships while distributing an event, which makes system design simple, more flexible, and robust to calibration errors.
In this paper, we propose an asymmetric event-driven localization algorithm that can be deployed in constrained space well, which has higher performances on localization accuracy, energy consumption, and anti-interference ability than the existing methods.

Environment Deployment and Symbol Definition
In this section, we will introduce how to deploy the environment and give some models, definitions, and notations. In order to facilitate problem description, in this paper, we research asymmetric event-driven location problem in linear constrained space based on linear topology scenario such as indoor corridors and coal mine. For some complex constrained space, we can segment it into a few simple linear spaces. Therefore, in the following sections, we will show our scheme in linear space represented by indoor corridors. Environment deployment scheme and symbol definition are given below.

Environment Deployment.
We deploy our algorithm in linear constrained space, such as indoor corridors, and coal mine tunnels, in which we lay out event generators on both sides of each linear channel. The event generators are used to distribute event with a certain time interval. Then, we, respectively, deploy an anchor node near an event generator in the inner side of the two event generators. Deployment diagram is shown in Figure 1.

Related Concept.
We have the following definition and inference in order to describe the problem expediently.
Definition 1 (curvature). For a plane curve C, curvature at point P is equal to the radius of its osculating circle (the inscribed circle which is the closest to the curve), which is a vector points to the osculating circle's centre. Curvature can be measured by diopter; 1 dioptre is equal to 1 radian per meter. Moreover, the osculating circle's radius is the radius of curvature.
For a plane curve given explicitly as = ( ), the curvature is shown as: For a plane curve given parametrically in Cartesian coordinates as ( ) = ( ( ), ( )), the curvature is shown as For a plane curve given implicitly as ( , ) = 0, the curvature is shown as that is, the divergence of 's gradient direction. Formula (3) also gives the mean curvature of hypersurface in Euclidean space. According to Definition 1, we can deduce the conclusion that the curvature of a plane circle is equal to the reciprocal of its radius. We prove it with a simple reasoning. Assume that the plane circle is 2 + 2 = 2 ; we can find out that Taking them to Formula (1), we obtain that = 1/ .
Definition 2 (validity event). Events perceived by locating node are effective if and only if the curvature of awareness event circle is less than the upper bound of curvature meeting the demand of positioning accuracy. Furthermore, a validity event can be used to locate. In other words, calculation error will increase when the curvature of a node-perceived event circle is greater than the upper bound. Therefore, the corresponding event should be abandoned, which is not of benefit for positioning.
Definition 3 (candidate event set). The set of validity event is called a candidate event set.
Definition 4 (equipment step). We call the event generator and anchor node arranged in pairs as localization equipment. So the distance between event generator and anchor node in one set of equipment is equipment step. Equipment step can be used to evaluate the accuracy of localization algorithm.
For a known scenario, equipment step should be limited to a certain range, or it will cause a low positioning accuracy.

Scheme of Asymmetric Event-Driven Localization
In this section, we firstly put forward the asymmetric eventdriven localization mechanism and then analyze the factor which affects the localization according to the deployment plan of constrained space. Finally, we proposed an asymmetric event-driven localization algorithm (AELA) in constrained space based on the previous analysis.

Localization Principle.
First, we consider a simple case that there is an equipment (an event generator and an anchor node) on each side of the location area. Event generator deployed on either side of the location area distributes diacritical event at a certain time interval; for example, we can use ultrasound, infrared emitter/receiver, and laser beam scanner as the event.
As shown in Figure 2, we call the two event generators as event source 1 and event source 2 (short for S1 and S2); the anchor nodes corresponding to the two event sources are called anchor node 1 and anchor 2 (short for P1 and P2). Point P is the location node, which can communicate freely with the anchor node and is equipped with perceive event device. When the nodes density is not high, we can effectively apply the listen-detect-assemble-report protocol. For example, in the case of ultrasound propagation, with propagation speed 340 m/s, we assume that the distance between two nodes is 10 meters, so the listen-detect-assemblereport protocol can work well in this situation. We can know that the sound needs 29.4 ms to propagate between them, while normally the communication data rate is 250 Kbps in the WSN (e.g., CC2420 [14]), which just results in 2 to 3 ms to transmit an assembled packet. Therefore, in our method, we take advantage of the characteristic that propagation speed of radio is faster than the ultrasound, using ultrasound for perception and radio for localization.
The proposed method for localization in this paper is as follows. First of all, S1 distributes events at a certain frequency. After perceiving the event, P1 sends its coordinates and the time to location node immediately. Once the location node receives the message from P1, it will record the corresponding time and monitor the event P1 and record the perceiving time. Finally, location node will record the time it takes to perceive the event. Above all, we can know that location node and the anchor node are in a set of concentric circles centered on the event source, and the ring spacing interval for the product is propagation speed of event and the interval of time between two nodes perceiving the event. By the same token, S2 repeats the above process, and the location node and P2 are also in a set of concentric circles.
In the case that the locations of event generators and anchor nodes are known, we can directly calculate the localization node's location through the equation of the concentric circle with one event source. But in real cases, we cannot know or calculate the location of event generator from the event source in constrained space, so we cannot calculate where the arc of location node lies. Here we adopt a kind of approximate substitution method, calculating the intersection node of arc and the connect line with the anchor node. In the case of a rough estimate, we can consider that projection of the intersection point to the ground is the location of the node. In this paper, we use two event generators to distribute events. After perceiving two different events, the intersection point of the top and the two event arcs will be calculated as the location of the location node. Furthermore, we can obtain the location by calculating the midpoint of the intersection point and project it. Of course, we can also adopt some other methods to obtain the location after we get the intersection point.

Analysis and Optimization.
In the actual deployment, localization accuracy varies from node to node because the curvature of event arc is different. When the location node is close to the event source, curvature of the arc formed by event is large. This will enlarge the localization error. In order to improve the accuracy of localization algorithm, we need to evaluate and trade off different events according to different situations. Now we will analyze the different conditions in the following paragraphs.
First of all, according to the deployment and localization scheme, we divide location nodes into three categories, as shown in Figure 3.
For the convenience of description, we unified tag as follows. The arc of the event 1 perceived by the anchor node 1 intersects with the corridors top at a point, and we mark this point as A. The event source 1 perceived by the location node intersects with the corridors top at a point, and we mark this point as B. The arc of the event 2 perceived by the anchor node 2 intersects with the corridors top at a point, and we mark this point as C. The event source 2 perceived by the location node intersects with the corridors top at a point, and we mark this point as D. In addition, we set the distance between P1 and P2 as 12 . And for event , the interval of time between location node and corresponding event perceived by the anchor node is recorded as Δ .
As shown in Figure 3(a), when location node is located in the inner regions of the two anchor nodes, and not nearby any of the anchor nodes, we can get the following result International Journal of Distributed Sensor Networks 5 As shown in Figure 3(b), when location node located in the inner regions of the two anchor nodes, but nearby one of the anchor nodes, we can get the following result As shown in Figure 3(c), the location node is located in the outside regions of the two anchor nodes. In other words, when it is close to one of the event generators, we can get the following result From the above analysis, the two arcs intersect the corridor top at two points. We may draw the conclusion that the distance between two intersection points depends on the distance between the location node and the two anchor nodes, that is, only affected by the interval of time between location node and corresponding anchor node perceived by the event, but having nothing to do with the location of the node.
As shown in Figure 3, the farther the distance location node is away from the event generator, the more the arc generated by the event is close to a straight line in the available space, which we use as the benchmark to locate more accurately. So when location node is located in the inner regions of the two anchor nodes, and not nearby any of the anchor nodes, as shown in Figure 3(a), we can get the midpoint of B and D as M. After that, calculate the midpoint of M and D (the intersection point of arc with a low curvature), and then project the midpoint to the ground as the location. In this way, we can further improve the accuracy of algorithm. With the moving of the location node, when the node locates around the center of the two anchor nodes, we just need to calculate midpoint once rather than twice because the curvatures of the two arcs are similar, so calculating midpoint twice may increase the error of the result.
When location node gets closer to one of the event generators, as shown in Figure 3(c), the curvature of the corresponding event arc is larger, so the error will be enlarged if we calculate as the situation in Figure 3(a). As we see from Figure 3, the low curvature arc looks like a straight line in the available space, so in our algorithm, the high curvature arc can be given up and location can be calculated directly from the intersection point of the low curvature arc and the corridors top.
When location node is located in the inner regions of the two anchor nodes, but nearby one of the anchor nodes, we discuss it in two conditions. If the anchor node is closer to the event generator, the algorithm will deal with it as in Figure 3(c), or Figure 3(a).
Above all, we can draw the asymmetric event-driven localization algorithm in constrained space, shown in Algorithm 1.
Algorithm 1 presents the asymmetric event-driven localization algorithm in constrained space. Event generator distributes events at a certain time interval (lines 1-3). Considering the influence factors such as network latency, we may set the time interval as /V, in which stands for the length of the corridors and V is the speed of event propagation, guaranteeing that only up to one same event is in transmission at the same time, avoiding the same events conflict. After perceiving the event, anchor node broadcasts its coordinates and the time takes perceive the event immediately (lines 4-9). Once the location node receives the message from anchor node, it will record the corresponding time and get ready to monitor the corresponding event (lines 11-12). After monitoring, event is added into the candidate event set , and the location node jumps to Algorithm 2, calculates the candidate, and then returns to the candidate location (lines [13][14][15]. Finally, we project the candidate location for the result (line 19).
After perceiving the event, location node will add the event into the candidate event set. Algorithm 2 cuts off the event which is not of benefit for localization and locates with the events left in the candidate set.
We can see from the above description that Δ < 0 stands for location node close to an event generator. In other words, this event is not suitable for localization. In Algorithm 2, we cut off the events whose Δ < 0 or > , increasing the accuracy of localization (lines 5-8). When the candidate set only has one event, the algorithm will return the intersection point of this arc and corridors top as candidate point (lines [11][12][13]; otherwise, when the candidate set has two or more than two events, we select the minimum two of the events used for localization (lines 14-20).

Experiment and Performance Evaluation
In this section, we develop simulations on MATLAB and C++ to evaluate our proposed algorithm and the existing scheme, MSP (anchor-free localization), and RSSI (rangebased localization). In addition, we make experiments about AELA on real nodes with URF04 ultrasonic module.
Our simulation environment is indoor corridor which can represent a branch of complex constrained space. The corridor is 30 meters long, 2 meters wide, and 3 meters high. We lay event generator on both sides of each end of the corridor and set the equipment step as 3 meters. The communication noise is referred to as the library noise measured by Meyer et al. from Stanford University. Theoretically, the narrower the limited space it is, the higher the accuracy of computing intersection precision by AELA it will be. That is, the accuracy of localization will be higher. So, we can draw a conclusion that the result of our experiment deployed in indoor corridor is universal.
In the next part, we will simulate our algorithm and compare the result with MSP and RSSI and analysis performance of each algorithm in constrained space. (1) for each event source (2) Distribute event at a specified time; (3) end for (4) for each anchor node corresponds to event source (5) Listen for the event from event source ; (6) if (Detected the event ) (7) Broadcast ( , , event ); (8) end if (9) end for (10) for each localizing node (11) if received the broadcast message from anchor node (12) To start listening to the event (13) if (Detected the event ) (14) record the current time ; Calculate the arc of event across anchor node and localizing node; (4) Calculate the curvature of the arc as ; end if (9) end for (10) for each event in (11) if ( == 1) Calculate the intersection point of the arc on the top of corridor; (13) return the intersection point; (14) else if ( ≥ 2) (15) = {the two arcs and whose curvature are the biggest};   Figure 4 shows the comparison of actual position and the localization result of three algorithms in the setting experimental conditions. The horizontal axis represents the long corridor direction, and the vertical axis represents the width corridor direction. We set up 13 anchors in our experiments, the coordinates of which are, respectively (3, 0), (8, 0), (13, 0), (18, 0), (23, 0), (28, 0), (5, 2), (10, 2), (15,2), (20, 2), (25, 2), and (30, 2). The coordinates of the two event generators are (0, 0), (30, 0). We selected 34 different locations for localization. From the figure, we see that the localization error using our algorithm is fewer than the error obtained using the RSSI and MSP. AELA has high localization accuracy and is more stable in constrained space.

Simulation Results.
According to the above experimental results, we can see that the localization result varies from location to another. The accuracy of the RSSI method is poor, and the algorithm is unstable, especially when the nodes are near the anchor node. The MSP algorithm is relatively accurate when nodes have a high density. But in low-density situation, localization is not accurate. Figure 5 shows the localization error of three kinds of schemes for different locations. We can draw the conclusion from Figure 5 that the average localization errors of RSSI and MSP are, respectively 2.017 meters and 0.787 meters, while the average localization error of AELA is 0.331 meters. Our AELA has high localization accuracy and is very stable.
The height of real interior corridor space is generally 3 meters. Using AELA scheme and deployment as described in Section 3, we can see that derivate that when the location nodes are located in the shaded area in Figure 6, the localization accuracy of the algorithm can reach 10 cm in theory. On the other hand, when nodes are located out of the shaded area, AELA will cut off events with large curvature, which makes the accuracy be 10 cm, too.   Figure 7 shows the impact of the anchor node number on the localization accuracy. We can see that the localization error is reduced with the increase of anchor node number. In our experiment, when the number of anchor nodes is up to 5, the localization error of RSSI changes obviously no longer. But the localization errors of MSP reduce obviously when the anchor node number increases. The more the anchor nodes are used for localization, the smaller the programming region will be, because of which localization with MSP is of benefit. The accuracy of AELA is improved as the anchor node number increases, but not obviously. However, the localization accuracy of AELA is still higher than the other two algorithms. In addition, as we can see in Figure 7, AELA can achieve high-accuracy localization with only two anchors, which reflects that AELA has low energy consumption.

Impact of Anchor
From the above analysis, we know that the number of anchor nodes is not the key impact factor of AELA, because in our algorithm, the role of anchor nodes is to assist to complete localization by perceiving events and broadcasting messages, which has little effect on localization. However, the distance between anchor node and event generator influences the perception of events. So we need to consider the impact of the distance between anchor node and event generator, that is to say, the impact of equipment step. Figure 8 shows the impact of equipment step. We can see that when equipment step is 2 to 5 meters, localization error is fewer. When the location node is relatively close to event generator, localization errors increase with the reduction of equipment step but are still within 0.4 meters. When the location node is away from event generator, localization will continue to increase.

Impact of Asymmetric Event.
In this section, we mainly compare the impact of event between AELA and MSP, as they are based on both event-driven and anchor-based. Figure 9 shows the impact of scanning event number. As the corridor space is constrained, we cannot deploy event generator randomly like outside space. So we deploy event generator in six directions for our experiment. From Figure 9, we can see that when there is only one event generator, localization error is huge. Both the errors of two algorithms reduce with the increase of scanning event number.
International Journal of Distributed Sensor Networks Also we can see from Figure 9 that AELA only needs two event generators to achieve high-accuracy localization and superiority to MSP algorithm. We can distinguish the difference between different events generators, but it is difficult to identify events distributed by one generator at different time. A high frequency of distribute event would lead to cyber conflict and perception confusion, which affect the localization results. Figure 10 shows the impact of frequency of distribute event. We can see that both of the two algorithms have high localization accuracy when the time interval of distribute event is greater than 0.04 seconds, which indicates that high frequency of event distribution can lead to serious communication collision and confusion of the event. As the frequency reduces, events from the same generator will not interfere with each other. And along with the decrease of the network conflict, the accuracy and stability of the algorithm will improve effectively. In conclusion, we can see that a small amount of the number of event and a low frequency of distribute event exist, this will be of benefit to improve localization accuracy. And the small number of events can also reduce the energy consumption.

Impact of Environmental Factors.
We considered above the impact factors of algorithm itself; however, environmental factors impact on algorithm accuracy cannot be ignored. Figure 11 shows the impact of the number of the target nodes. We can see that with the increase of the target node number, the algorithm still remains at a stable localization accuracy range, which is not affected by the nodes number. The reason lies in that AELA and MSP are based on a distribute localization mechanism, and nodes are located independently to perceive events or to send and receive packets. In the same way, the increase of target node number increased also shows rise of the number of obstacles in space, and the increase of obstacles is equal to the changing of the space shape and the increasing of the interference, while the algorithm is not affected by it.
In addition, we also need to consider the impact of environmental factors including the height of space. For AELA, it has a high adaptability to the environment. Events when space height is higher will be easier to be distributed, contributing to improve localization accuracy. And when space height is lower, curvature of the available event arcs will be low, which helps in localization. On the other hand, we use ultrasonic as event in experiment, which has strong adaptability to the environment, and there are lots of researches on the problem of flight diffraction, such as time of flight diffraction (TOFD) [15].

Conclusion
In this paper, we propose an asymmetric event-driven localization algorithm in constrained space solving the problem that existing location technology in wireless sensor network cannot satisfy the location demands. The pervious algorithms call for a lot of calculation time and processing resources and are interfered by environmental factors, which are not suitable for constrained space. Our algorithm is based on the combination of event distribution and anchor node achieving a distributed location estimation strategy. AELA can satisfy the localization requirement of constrained space and achieve the high-accuracy localization with a small amount of event and anchor node. It has low computing complexity and space complexity, balancing perfectly on the software and hardware cost. So there is a reason to believe that AELA will have a better application prospect in constrained space.