distributed system of sensor and actor nodes that are intercon- .... acting range intersects with R, denoted by Ω, the
A Resource-based Mutual Exclusion Algorithm supporting Dynamic Acting Range and Mobility for Wireless Sensor and Actor Networks Abdelouahid Derhab Department of Theories and Computer Engineering, CERIST research center, Algiers, Algeria
Abstract—Achieving optimal actor resources usage is one of the fundamental issues in Wireless sensor and Actor Networks (WSANs). One solution is to maximize the mutually exclusive regions (i.e., regions covered by one actor). In this paper, we take a novel approach to define and resolve the mutual exclusion problem. We propose CRMEA, (Centralized Resource-based Mutual Exclusion Algorithm), that constructs an actor cover set whose cost is less than the sole mutual exclusion algorithm existing in the literature. In addition, extensions supporting dynamic acting range and mobility are added to CRMEA. Simulation results show that the proposed extensions can save up to 50% − 90% of actor resources when compared with CRMEA. In addition, the mobility extension can overcome the large event-to-action delay problem and meet the requirements of the delay-sensitive applications.
I. I NTRODUCTION A Wireless sensor and Actor Networks (WSAN) [1] is a distributed system of sensor and actor nodes that are interconnected over wireless links. Sensor nodes gather information about the environment and transmit the collected data to either actors through single-hop or multi-hop communications. From the received information, the actor perform actions to change the behavior of the environment. In the literature, such a architecture is known as automated architecture. The architecture in which sensor nodes route information to the sink, which then issues action commands to actors, is called semi-automated architecture. In some applications, if multiple actors are required to cover an event region, it may be necessary to ensure that these acting regions are non-overlapping or mutually exclusive in order to ensure uniform acting behavior over the entire event region. If the acting regions are circular, the overlapping between these regions is inevitable, and hence undesirable effects will occur. For example, if there is an application where the sensors report the amount of moisture in the ground and the actors have to irrigate the area uniformly, the regions where overlap occurs will overuse the actor resources (water) or will result in flooding. Thus, the classical definition of the mutual exclusion problem, which supposes atomic access to critical resources as known in distributed systems and ad-hoc networks [4], [8], [2], [5], can no longer be valid for WSANs. Surprisingly, this problem has received very little attention in the research literature. There is only one work [7] that has addressed this issue. Vedantham et al. [7] have defined 978-1-4244-8077-7/10/$26.00 2010 IEEE
Mustapha Zair Department of Computer Science, USTHB university, Algiers, Algeria
the problem of mutual exclusion as follows: Given a set of actors in an event region, what is the minimum subset of actors (i.e., actor cover set) that covers the entire event region such that there is minimal overlap in the acting regions? Their goal is to maximize the non-overlapped acting regions of each actor within the event region in order to utilize the actor resources to the least extent. Their algorithm works by selecting, at each stage, the actor i that can cover the largest uncovered area within the event region, i.e., maximize the nonoverlapped region ri (see Figure 1). It terminates when the selected set of actors cover the entire event region. In this method, the authors intuitively suppose that maximizing the non-overlapped regions will lead to minimizing the number of actors selected to cover the event region, and hence there will be minimal overuse of resources. However, this claim is provided with no proof. In addition, they consider that the cost of an overlapped region, whether it is covered by two actors or more, depends only on its region size and they ignore the number of actors covering the region. As each new overlap incurs an extra amount of actor resources, this method cannot correctly estimate the overuse of resources. Although the authors have defined other types of mutual exclusion that take into account the number of actors that cover a region, but this number does not exceed three. Event Region
ri : Area covered only by Actor i ni : Overlapping area between Actor i and another actor (area covered by 2 actors) oi : O verlap between Actor i and already existing overelapping (area covered by 3 actors)
Acting Region
rj nj
ni oi
Actor
rk
ri ni
Sensor
Sink
Fig. 1.
Different types of regions used in Vedantham’s algorithm
In this paper, our original contributions are the following: First, we take a novel approach to define and resolve the mutual exclusion problem. Instead of trying minimizing the overlapped regions or the number of actors in the actor cover
set, our mutual exclusion problem aims at minimizing the actor resources dissipated on the event region. Second, based on this new definition, we propose CRMEA, (Centralized Resource-based Mutual Exclusion Algorithm). To the best of our knowledge, CRMEA is the second mutual exclusion algorithm for WSANs after Vedantham’s algorithm [7]. Third, we propose extensions to the proposed algorithm to minimize more the resource cost. The extensions support dynamic acting range and mobility. Simulation results show that CRMEA and its extensions outperform Vedantham’s algorithm [7] in terms of actor resources. In addition, the mobility extension can overcome the large event-to-action delay problem and meet the requirements of the delay-sensitive applications. The rest of the paper is organized as follows: In Section II, we formally introduce the mutual exclusion problem. The proposed mutual exclusion algorithm and its extensions are presented in Section III. The results of a simulation study are presented in Section IV. Finally, Section V concludes the paper.
Event Region Acting Region
1 3 2 2 1 3 4 3 2 3 2
Actor Sensor
1
1 Sink
Fig. 2.
II. P ROBLEM F ORMULATION
Actor coverage configuration
A. Network model We consider a model of WSAN in which sensor and actor nodes as well as the sink node are randomly deployed in the sensor/actor field. We assume that each node ai is aware of its location li via a localization technique [3], and there is an underlying routing protocol for delivering messages to any sensor or actor [6]. The acting range and the acting region of each actor ai , are denoted by ARi and Ai respectively. The model supports four types of actors: (1) static actor with fixed acting range, (2) static actor with dynamic acting range, (3) mobile actor with fixed acting range, and (4) mobile actor with dynamic acting range. The events are modelled as disks of radii Re . This disk is called an event region.
Let us consider an actor ai that covers a region A ⊆ R whose size is Size(A), the amount of resources dissipated by ai on A is Res(A, ai ) = αi × Size(A) × Ti , such that Ti is the time required by actor ai to carry out an action and αi is the amount of resources dissipated/time unit/space unit. For the sake of simplicity, we omit Ti and αi in the rest of the paper. The amount of resources dissipated by a configuration ξ = (R, Ω) on the event region R is defined by: Res(ξ) =
B. Definitions A point in the event region R is said to be K-actor-covered (K ≥ 1) if it is within the acting range of K active actors. A region A is said to be K-actor-covered (K ≥ 1) if every point in A is K-actor-covered. δ(A) denotes the actor coverage degree of A, which is in this case K. Given an event region R, and a set of active actors whose acting range intersects with R, denoted by Ω, the set system ξ = (R, Ω) is called actor-coverage configuration if each point in R is within the acting range of at least one actor in Ω. Figure 2 shows an example of a configuration consisting of four actors and an event region. As shown in figure 2, a configuration ζ will partition the event region R into a set P of disjoint sub-regions. The actor coverage degree of each sub-region is shown on the figure. We define Si = {q ∈ P|δ(q) = i} to be the set of subregions within the event region R whose actor coverage degree is i. The maximum actor coverage degree of a configuration ξ, denoted by Δ(ξ), is the largest coverage degree over all the Δ(ξ) subregions of the event region R. It is clear that ∪i=1 Si is P.
Size(Ai ∩ R)
ai ∈Ω Δ(ξ)
It can also be written as:
i × Size(a)
i=1 a∈Si Δ(ξ)
Res(ξ)
=
i=1 a∈Si
=
Size(a) +
i × Size(a)
i=2 a∈Si
Size(a) +
a∈S2
Size(a) +
a∈S3
.. .
Size(a) +
a∈S2
Δ(ξ)
Size(a) +
a∈S1
a∈S1
i × Size(a) =
2 × Size(a) +
a∈S3
Size(a) +
a∈SΔ(ξ)
(Δ(ξ) − 1) × Size(a)
a∈SΔ(ξ) Δ(ξ)
=
Size(R) +
(i − 1) × Size(a)
i=2 a∈Si
We can notice that Res(ξ) (Equation 1) is composed of two parts: (a) Size(R), which is the exact amount of resources
(1)
required by the event region R, and (b) the other part, which represents the extra amount of resources incurred by ξ. The set system ξ M = (RM , M ) is called partial actorcoverage configuration if: RM ⊆ R and each point in RM is within the acting range of at least one actor in M ⊆ Ω. P M is the set of disjoint sub-regions within RM . We define SiM = {q ∈ P|δ(q) = i} to be the set of subregions within the event region RM whose actor coverage degree is i. We define the mutual exclusion problem as follows: Given a set of actors in an event region, what is the set of actors M ⊆ Ω such that: the region covered by M within the event region R is RM = R and the extra amount of actor resources, Res(ξ), is minimal? We try to minimize the objective function f M , which is defined as: Δ(ξ M )
M inimize(
i=2
a∈SiM
(i − 1) × Size(a))
III. C ENTRALIZED R ESOURCE - BASED M UTUAL E XCLUSION A LGORITHM (CRMEA) AND EXTENSIONS In this section, we present the algorithm used to optimize the extra amount of actor resources in WSANs. The algorithm is executed in two phases: (1) the Centralized Resourcebased Mutual Exclusion Algorithm (CRMEA) that computes the actor cover set M for R that minimizes the extra amount of resources (f M ), and (2) the optimization phase that executes either or both the following optimization extensions: Acting range optimization, and Mobility optimization. This algorithm adopts a centralized approach, in which the sink node constructs the actor cover set based on full knowledge of network topology. Although the fully distributed approach has the advantage of incurring less message overhead and responding to events more quickly. However, since each actor makes autonomous decisions and cannot envision the precise state of the whole network, the cost of the actor cover set constructed by the distributed approach will be less optimal than that of the centralized one. A. Centralized Resource-based Mutual Exclusion Algorithm (CRMEA) When sensor nodes detect the existence of a new event, they report the event to the sink. Based on the reports, we assume that the sink is able to determine the location and the radius of the event. The execution of CRMEA is shown in Algorithm 1. In the algorithm, the sink node selects at each stage, the actor that incurs either no extra resource (lines 14-16 in Algorithm 1), or the minimum amount of extra resources (lines 9-12 in Algorithm 1). We can notice that the first actor selected by the sink incurs no extra cost. The selected actor is added to M (i.e., the set of actors selected so far), and the algorithm terminates when the event region R is totally covered by M (line 5 in Algorithm 1).
Algorithm 1 CRMEA 1: M = ∅; 2: RM = ∅; 3: ω = Ω; 4: f M = 0; 5: while R RM do 6: Δmin = ∞; 7: for each ai ∈ ω do 8: ΔC = f M ∪ai − f M 9: if ΔC < Δmin then 10: Δmin = ΔC; 11: selected = ai ; 12: end if 13: end for 14: if Δmin = 0 then 15: selected = {ai ∈ ω|(Ai ∩ R)is the largest}; 16: end if 17: M = M ∪ selected; 18: RM = RM ∪ (Aselected ∩ R) 19: ω = ω − selected; 20: end while 21: return M;
B. Acting range optimization phase This phase can be executed only when actors are able to change their acting range. For each actor ai ∈ M , the sink node tries to find if it is possible to reduce the acting range of ai while the coverage of R is still preserved. To do so, it executes the ReduceRadius function to obtain the new acting range of the actor (line 6 in Algorithm 2)). If the function returns −1, it means that the acting range cannot be reduced to less than its current value because if it does so, then the event region R will no longer be covered. The sink starts with the actors whose acting range reduction minimizes most the extra resource cost function, and it continues to do so until no acting range can be reduced. Figure 3(b) shows an example of a new configuration resulted from the execution of Algorithm 2 on the configuration in Figure 3(a). An actor ai chooses its new acting range, denoted by Rnew, to be the maximum among the following values: 1) The distance between ai and the intersection point between each ai ’s neighbor and the event region. The intersection points must belong to the subregion (S1 ∩Ai ∩R) (e.g., points b and d in Figure 3(b)). The set of these intersection points is denoted by U (ai ). 2) The distance between ai and the intersection point between any two neighbors of ai . The intersection points must belong to the subregion S1 ∩ Ai ∩ R (e.g., point c in Figure 3(b)). The set of these intersection points is denoted by V (ai ). As depicted in figure 3(b), the new acting range of a1 is max([l1 , b], [l1 , c], [l1 , d]), where l1 is the location of a1 . C. Mobility optimization phase This phase can be executed only when actors are mobile. For each actor ai ∈ M , the sink tries to find if it is possible to move the actor away from R while the coverage of R is still preserved. To do so, it executes M ove function to obtain the new coordinate of the actor ai (line 6 in Algorithm 3)). If the function returns (−1, −1), it means that the actor cannot move form its current position because it it does so, then the event
(a)
(b) Fig. 3.
(c)
Example of Acting range and mobility optimization execution
region R will no longer be covered. The sink starts with the actors whose moving minimizes most the objective function, and it continues to do so until no actor can be moved. Figure 3(c) shows an example of a new configuration resulted from the execution of Algorithm 3 on the configuration in Figure 3(a). The actor at its new location must be able to cover the points in U (ai ) and V (ai ). The new coordinates of ai are obtained by performing a geometric translation on its acting −→ region. The actor will be moved along the vector li m, such that: li is ai ’s location and m is the center of the line [p1 , p2 ]. p1 and p2 are points ∈ U (ai ). The distance traversed by the actor will be ARi − Rnew. Rnew is calculated in the same way as the Acting range optimization phase does. Algorithm 2 CRMEA: Acting range optimization phase 1: ω = M; {M is the set returned by Algorithm 1} 2: while ω = ∅ do 3: selected = ∅; 4: Δmin = f M ; 5: for each ai ∈ ω do 6: Rnew = ReduceRadius(ai ); 7: if Rnew = −1 then 8: ω = ω − ai ; 9: else 10: calculate f new, the new objective function assuming that ARi = Rnew;
11: if f new < Δmin then 12: Δmin = f new; 13: selected = ai ; 14: end if 15: end if 16: end for 17: if selected = ∅ then 18: ω = ω − selected; 19: ARselected = Rnew; 20: f M = f new; 21: end if 22: end while
D. Combined Mobility and acting range optimization The two optimization extensions shown in Algorithms 2 and 3 can be executed one after another to minimize more
Algorithm 3 CRMEA: mobility optimization phase 1: ω = M; {M is the set returned by Algorithm 1} 2: while ω = ∅ do 3: selected = ∅; 4: Δmin = f M ; 5: for each ai ∈ ω do 6: (newX, newY ) = Move(ai ); 7: if (newX, newY ) = (−1, −1) then 8: ω = ω − ai ; 9: else 10: calculate f new, the new objective function assuming that li = (newX, newY );
11: if f new < Δmin then 12: Δmin = f new; 13: selected = ai ; 14: end if 15: end if 16: end for 17: if selected = ∅ then 18: ω = ω − selected; 19: selected’s location= (newX, newY ); 20: f M = f new; 21: end if 22: end while
the resource cost. In this extension, if the event range is less than the acting range. One actor is selected to move toward the event region and cover it with an acting range equals to the event radius. IV. P ERFORMANCE EVALUATION To evaluate the optimality of the actor cover set constructed, we compare the performance of Vendatham’s centralized algorithm [7] and the different versions of CRMEA, which are: • • • •
CRM EA. CRM EA followed by the Acting range optimization phase (hereafter called CRM EA + R) CRM EA followed by the Mobility optimization phase (hereafter called CRM EA + M ). CRM EA + R followed by the Mobility optimization phase (hereafter called CRM EA + R + M ).
40000
60000 Vedantham CRMEA CRMEA+R+M CRMEA+M+R
35000
4.5 Vedantham CRMEA CRMEA+R+M CRMEA+M+R
50000
Vedantham CRMEA CRMEA+R+M CRMEA+M+R
4
Mutual exclusion degree
30000 40000 Energy cost
Action cost
25000 20000
30000
15000 20000
3.5
3
2.5
2 10000 10000
1.5
5000 0
0 10
20
30
40
50
60
70
80
1 10
20
30
Event Radius (m)
40
50
(a) Vedantham CRMEA CRMEA+R+M CRMEA+M+R
80
10
20
30
40
50
60
70
80
Event Radius (m)
(c) 140
CRMEA+R CRMEA+R+M CRMEA+M CRMEA+M+R
90
CRMEA+R+M CRMEA+M+R
120
1.8
1.6
1.4
Mobility-dependent delay time (s)
80 Action cost optimization rate (%)
Maximum actor coverage degree
70
(b) 100
2
60
Event Radius (m)
70 60 50 40 30
100
80
60
40
20
1.2
20 10 1
0 10
20
30
40 50 Event Radius (m)
60
70
80
0 10
20
30
(d)
40 50 Event Radius (m)
60
70
80
10
20
30
40 50 Event Radius (m)
(e)
100
60
70
80
(f)
140
4000
CRMEA+R+M CRMEA+M+R
CRMEA+R+M CRMEA+M+R
CRMEA+R+M CRMEA+M+R
90
3500
120 80
60 50 40 30
Mobility-dependent energy
Mobility-dependent energy
Mobility-dependent delay time (s)
3000 100
70
80
60
2500
2000
1500
40 1000
20 20
500
10 0
0 1
2
3
4
5
6
Actor speed (m/s)
(g)
20
30
40 50 Event Radius (m)
60
70
80
(h) Fig. 4.
•
0 10
1
2
3
4
5
6
Actor speed (m/s)
(i)
Performance under different event size and Actor speed
CRM EA+M followed by the Acting range optimization phase (hereafter called CRM EA + M + R).
In our simulation, 120 actors with acting range 30m are randomly deployed on an area of 400m × 400m to ensure coverage. In our experimental results, each plotted point represents the average of 50 executions. The following metrics are evaluated for the mutual exclusion algorithms. 1) Acting cost: is defined as the amount of resources dissipated on the event region, which is the sum of the required resources and the extra resources. 2) Energy cost: is the energy consumed by all the actors to perform the action. We assume that an actor whose acting range is R, consumes πR2 Joules. During movement, the actor will consume an extra energy proportional to its speed V . 3) Action cost optimization rate: is defined as the fraction between the acting cost incurred by the algorithm and that of CRMEA.
4) Mutual exclusion degree: is the fraction between the acting cost and the size of the event region. 5) Maximum actor coverage degree: is the average maximum number of actors that can cover any point in the event region. 6) Mobility-dependent delay time: is the time required by the actor to move from its current position to the position where it will perform the action. 7) Mobility-dependent energy: is the energy consumed by the actor to move from its current position to the position where it will perform the action. Figure 4 shows the performance results of the different mutual exclusion algorithms. The first observation we draw from the figure is that the different versions of CRMEA outperforms Vendatham’s in terms of acting and energy cost, mutual exclusion degree, and maximum actor coverage degree. In addition, CRM EA + R + M shows the best performance results. We also observe that the different metrics increase
with an increasing in the event region size. This is because the number of actors needed to cover the event regions also increases. When the event radius is less than the acting range, CRM EA + R + M and CRM EA + M + R both shows the optimal results as only one actor is selected to move toward the event region and cover it with an acting range equals to the event radius. Figure 4(e) shows the percentage of improvement in acting cost achieved by each optimization method with respect to CRMEA. We can observe that the improvement offered by CRM EA + M is generally better that that of CRM EA + R, and CRM EA + M + R slightly improves the acting cost incurred by CRM EA + M . We can also observe that CRM EA + R + M provides the best improvement with respect to CRMEA. Figures 4(f), 4(g), 4(h), and 4(i) compare the performance of CRM EA+R+M and CRM EA+M +R in terms of extra delay and extra energy due to mobility. We can observe that CRM EA + R + M outperforms CRM EA + M + R. When the event size increases, the actors will move longer distances and hence more additional time is required before performing the action. However, the actor speed can be adjusted to meet the application requirements in terms of event-to-action delay. In addition, their energy consumption increases with an increasing in the event radius and the actor speed. V. C ONCLUSION In this paper, we have proposed a new approach to address the mutual exclusion problem. The proposed approach is based on minimizing the extra amount of actor resources dissipated on the event region instead of minimizing the overlapped regions or the size of the actor cover set. Based on this approach, we have proposed the Centralized Resource-based Mutual Exclusion Algorithm (CRMEA) that is more optimal than Vendatham’s algorithm in terms of acting and energy costs. We have also proposed extensions supporting dynamic acting range and mobility, which optimize more the extra amount of actor resources. Simulation results have shown that the proposed extensions can save up to 50% − 90% of actor resources when compared with CRMEA. In addition, the mobility extension can overcome the large event-to-action delay problem and meet the requirements of the delay-sensitive applications. R EFERENCES [1] Ian F. Akyildi and Ismail H. Kasimoglu. Wireless sensor and actor networks: research challenges. Ad Hoc Networks Journal, 2(4):351–367, 2004. [2] R. Baldoni, A. Virgillito, and R. Petrassi. A distributed mutual exclusion algorithm for mobile ad-hoc networks. In Proc of the 7th IEEE Symposium on Computer and Communications (ISCC 2002), 2002. [3] N. Bulusu, J. Heidemann, and D. Estrin. Gps-less low cost outdoor localization for very small devices. IEEE Personal Communications, Special Issue on Smart Spaces and Environments, 2834, 2000. [4] G. Coulouris, J. Dollimore, and T. Kindberg. Distributed Systems: Concepts and Design. Addison-Wesley, 2001. [5] Abdelouahid Derhab and Nadjib Badache. A distributed mutual exclusion algorithm over multi-routing protocol for mobile ad hoc networks. International Journal of Parallel, Emergent and Distributed Systems (IJPEDS), 23(3):197 – 218, 2008.
[6] Arjan Durresi, Vamsi Paruchuri, and Leonard Barolli. Delay-energy aware routing protocol for sensor and actor networks. In 11th International Conference on Parallel and Distributed Systems (ICPADS’05), 2005. [7] Ramanuja Vedantham, Zhenyun Zhuang, and Raghupathy Sivakumar. Mutual exclusion in wireless sensor and actor networks. In 3rd Annual IEEE Communications Society Conference on Sensor, Mesh and Ad Hoc Communications and Networks (SECON 2006), 2006. [8] J. Walter, J. Welch, and N. Vaidya. A mutual exclusion algorithm for ad hoc mobile networks. In Dial M for Mobility workshop, 1998.