6
Agent-Based Topology Control for Wireless Sensor Network Applications Dominik Rojković * , Tihomir Crnić ** and Igor Čavrak *** * Comping, Zagreb, Croatia ** University of Zagreb, University Computing Centre, Zagreb, Croatia *** University of Zagreb, Faculty of Electrical Engineering and Computing, Zagreb, Croatia [email protected], [email protected], [email protected] Abstract - Complexity of design, development and deployment of software for wireless sensor networks is high, and even more exacerbated by ad-hoc nature of some network deployments and the need for high adaptability to varying internal and environmental factors. In this paper the authors present a model of distributed application based on a set of application specific roles/functional modules. Deployment and runtime adaptation of application topology is achieved by controlling role activity on each of the network nodes, thus forming a functional application instance for a specific sensor network. Application control decisions are delegated to agents located on sensor nodes, and based on a set of role-specific utility functions. Existing wireless sensor network system for vehicle detection and classification is refactored according to the proposed model, modeled in a sensor network simulator and simulation results presented. I. INTRODUCTION Design and development of wireless sensor network (WSN) systems proves to be more difficult than development of 'regular' embedded systems for a number of reasons. Two of the most important ones are the need to provide high level of adaptation to both internal and external factors influencing individual nodes and communication links, and to realize local decision making mechanisms based on a restricted (local) view of the network and environment state. Lack of node location information due to ad-hoc network deployment, large number of nodes and/or unavailability of location services complicate the problem even more. We propose an approach where a complex distributed application for wireless sensor network is decomposed into a set of functionally connected roles. Network nodes are able, in accordance with functional, structural and runtime constraints, to host a number of active roles, thus forming a functional and, if possible, near-optimally deployed distributed application. Role selection, however, remains a strictly local and information-scarce process, where a control mechanism decides on a subset of roles the local network node should host at any given moment. Our approach decouples role functionality from role management, employing an agent-based approach to distributed decision making. Agents, one at each network node, select the most valuated subset of roles according to a set of pre-defined utility functions and information acquired from host node and neighboring agents. The described approach is employed in re-factoring of the ad-hoc deployed vehicle detection and classification system, where a small set of roles and their relations is defined, as well as the set of utility functions for agent- based role management. The performance of the deployment—time role allocation is tested in the wireless sensor network simulator. Acquired simulation results are compared with the results acquired from the application specifically developed for calculating the optimal role deployment using the ‘omniscient’ (global) approach to sensor network. The application uses a genetic algorithm for finding the optimal or near-optimal role allocation for a given network topology and node states. Section 2 of this paper presents the related work. The role model and agent-based application topology control are introduced in Section 3. Section 4 describes the example application for vehicle detection and classification refactored according to the proposed model. Section 5 presents the GA-based evaluation application and Section 6 the results of simulation of test application for a variety of network topologies. Section 7 concludes the paper. II. RELATED WORK Generic role assignment problem [1,2] has been addressed by means of a role definition language, a distributed role assignment algorithm and a role compiler. Role decisions rely on a set of static rules distributed on all network nodes and property values collected from host and surrounding nodes. No decision process adaptation is envisioned. Variations of a role-assignment approach have been developed, focusing on particular aspects of the methodology such as energy efficiency [3] or on-demand assignment [4]. The notion of neighborhood has been adapted to wireless sensor network domain as a means of abstracting the network regions with shared data or collaboration [5,6]. However, used abstractions (regions, neighborhoods) do not use explicit role decomposition. 290 MIPRO 2012/DC-VIS

Agent-Based Topology Control for Wireless Sensor Network

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Agent-Based Topology Control for Wireless Sensor Network Applications

Dominik Rojković*, Tihomir Crnić ** and Igor Čavrak*** * Comping, Zagreb, Croatia

** University of Zagreb, University Computing Centre, Zagreb, Croatia *** University of Zagreb, Faculty of Electrical Engineering and Computing, Zagreb, Croatia

[email protected], [email protected], [email protected]

Abstract - Complexity of design, development and deployment of software for wireless sensor networks is high, and even more exacerbated by ad-hoc nature of some network deployments and the need for high adaptability to varying internal and environmental factors. In this paper the authors present a model of distributed application based on a set of application specific roles/functional modules. Deployment and runtime adaptation of application topology is achieved by controlling role activity on each of the network nodes, thus forming a functional application instance for a specific sensor network. Application control decisions are delegated to agents located on sensor nodes, and based on a set of role-specific utility functions. Existing wireless sensor network system for vehicle detection and classification is refactored according to the proposed model, modeled in a sensor network simulator and simulation results presented.

I. INTRODUCTION Design and development of wireless sensor network

(WSN) systems proves to be more difficult than development of 'regular' embedded systems for a number of reasons. Two of the most important ones are the need to provide high level of adaptation to both internal and external factors influencing individual nodes and communication links, and to realize local decision making mechanisms based on a restricted (local) view of the network and environment state. Lack of node location information due to ad-hoc network deployment, large number of nodes and/or unavailability of location services complicate the problem even more.

We propose an approach where a complex distributed application for wireless sensor network is decomposed into a set of functionally connected roles. Network nodes are able, in accordance with functional, structural and runtime constraints, to host a number of active roles, thus forming a functional and, if possible, near-optimally deployed distributed application.

Role selection, however, remains a strictly local and information-scarce process, where a control mechanism decides on a subset of roles the local network node should host at any given moment. Our approach decouples role functionality from role management, employing an agent-based approach to distributed decision making. Agents, one at each network node, select the most valuated subset of roles according to a set

of pre-defined utility functions and information acquired from host node and neighboring agents.

The described approach is employed in re-factoring of the ad-hoc deployed vehicle detection and classification system, where a small set of roles and their relations is defined, as well as the set of utility functions for agent-based role management. The performance of the deployment—time role allocation is tested in the wireless sensor network simulator.

Acquired simulation results are compared with the results acquired from the application specifically developed for calculating the optimal role deployment using the ‘omniscient’ (global) approach to sensor network. The application uses a genetic algorithm for finding the optimal or near-optimal role allocation for a given network topology and node states.

Section 2 of this paper presents the related work. The role model and agent-based application topology control are introduced in Section 3. Section 4 describes the example application for vehicle detection and classification refactored according to the proposed model. Section 5 presents the GA-based evaluation application and Section 6 the results of simulation of test application for a variety of network topologies. Section 7 concludes the paper.

II. RELATED WORK Generic role assignment problem [1,2] has been

addressed by means of a role definition language, a distributed role assignment algorithm and a role compiler. Role decisions rely on a set of static rules distributed on all network nodes and property values collected from host and surrounding nodes. No decision process adaptation is envisioned.

Variations of a role-assignment approach have been developed, focusing on particular aspects of the methodology such as energy efficiency [3] or on-demand assignment [4].

The notion of neighborhood has been adapted to wireless sensor network domain as a means of abstracting the network regions with shared data or collaboration [5,6]. However, used abstractions (regions, neighborhoods) do not use explicit role decomposition.

290 MIPRO 2012/DC-VIS

ROLE-BASED APPLICATION MODEL

A. Wireless Sensor Network Model Wireless sensor network abstraction is defined as a

graph G = (N, L), where N is a non-empty set of vertices ni representing wireless sensor nodes and L is a set of edges denoting communication links between pairs of nodes (na,nb), na ≠ nb, In this simplified model undirected communication links are assumed, where in reality, directed (asymmetric) links between nodes can often be observed [7,8]. Sensor network topology is mostly determined at deployment time, but remains dynamic during system lifetime due to various internal (node failures, de- synchronization) and environmental factors (variability in signal propagation, interference, node relocation etc.).

A neighborhood of node ni is defined as a subset of nodes from N having direct communication links with ni: Nbg(ni): (nj: (ni, nj) ∊ L). If undirected communication links are assumed, then the reciprocity exists: if ni is a neighbor of nj, then nj is also a neighbor of ni.

Each wireless sensor node is composed of functional entities (e.g. processor, communication subsystem, memory, sensors etc.) and resources. Resources can be constant (e.g. processing power) or variable (e.g. available memory or remaining energy). The model assumes all the nodes posses a core set of functional entities, but can differ in additional entities such as number and type of available sensors, fixed or renewable energy source etc. All node resource levels are represented as a node state.

B. Roles All but the simplest WSN applications require

distribution of different parts of overall application functionality on more sensor nodes. There are several key factors that determine such distribution:

• Capability factors: capability of a node to perform required specific functionality (required sensor, required amount of memory etc.).

• Spatial factors: dispersion and/or density of functionality in area covered by sensor network.

• Temporal factors: adaptation of functionality to changing internal and/or external conditions (e.g. node state, appearance of observed phenomenon etc.).

• Functional factors: existence and/or composition of a set of functionalities in order to provide desired overall application functionality.

A role is an abstraction of a part of application functionality that forms a coherent whole with regards to data acquisition and/or processing. Application role has well defined interfaces with other roles and with host node by which data and control information is exchanged.

Figure 1: Role model

A role is represented as a tuple:

R = (I, O, S, D, F, X, x0), (1)

where I is a set of input interfaces, O set of output interfaces, S set of data sources, D set of data drains, F a set of transformation functions, X set of role states and x0 an initial role state.

Each input and output interface is characterized with a single message type, thus determining possible connections between roles. Reception and transmission of messages using interfaces, data transformation and state transitions are performed asynchronously.

A role requires functional support from the sensor node (e.g. radio subsystem, sensor), and it consumes, temporarily or permanently, a number of node resources (e.g. memory, energy).

C. Role Composition Role-based application is defined as a directed acyclic

graph A = (R, C), where R is a set of vertices representing application roles and C is a set of directed edges representing connections between roles. The graph represents data and control flows among application roles. Each role has an associated cardinality, i.e. how many times it can appear in the application topology graph when the role composition is mapped onto a WSN graph. The following cardinalities are defined: (exactly) 1, 1..n, 0..n and 0..1.

D. Topology Control Application topology is defined as a mapping of roles

and links among roles onto vertices and edges of a graph representing the sensor network. One sensor network node can host a (possibly empty) subset of application roles. To be valid, such mapping must respect the following constraints:

• Compositional constraints - defined by a role composition graph.

• Structural constraints – defined by underlying sensor node capabilities (for a certain role).

• Cumulative constraints – cumulative availability of local resources for a certain role subset active on a particular sensor node.

In addition to the previously listed hard constraints, application topology should also reflect the application level policies such as coverage, minimization of energy consumption (application and/or node level) etc.

MIPRO 2012/DC-VIS 291

The mapping (or role mapping) process is inherently a continuous and localized process performed on every sensor node in the network. The decision mechanism and role functionality implementations are decupled, allowing different mechanisms to be used for application topology control. Such control mechanism, however, must rely only on information gathered from local state information (node, roles) and information available in the node’s neighborhood.

Mapping a role on a WSN node implies activating a role implementation already present in the node’s software. There is no code migration, replication or role state migration due to high time and energy requirements for such activities.

E. Agent-Based Topology Control An agent-based approach [9] to application topology

control assumes existence of one agent at each network node. The agent determines the current subset of active roles on a node by evaluating all feasible role subsets for that node (determined by compositional, structural and cumulative constraints) and selecting one on the basis of maximal income. Agents are self-interested and are trying to maximize their profit according to the system-wide defined social rules. Used rules are mostly application-specific, but in general define three types: (a) reward functions for awarding activity of a certain role or a subset of roles; (b) penalty functions for penalizing activity of a certain role or a subset of roles; and (c) mandatory behavior of agents (e.g. sharing current node configuration with neighboring agents).

Figure 2: Agent-based role management

Reward and penalty functions are based on the locally available information: node state (e.g. resource levels, such as remaining energy), role states and properties (e.g. energy consumption in active mode), system history (changes in role activity) and information provided from the neighboring agents (e.g. concentration of roles on neighboring nodes). The combination of roles with the highest valuation is selected for the currently active role subset on the controlled node.

A series of local decisions made on every network node should, in ideal case, result with the optimal role distribution – application topology – for a given wireless sensor network deployment and current internal and external conditions. In reality, the system should (a) converge to a stable topology as soon as possible, (b) retain stable topology or quickly converge to a new stable topology on a node reconfiguration, (c) stable topology should be reasonably close to the optimal topology.

III. EXAMPLE ROLE-BASED APPLICATION

A. Vehicle Detection and Classification Sensor Network Vehicle detection and classification (VDC)

application is a typical example of an area-surveillance sensor network application with a medium amount of in-network processing and single-point data collection and extraction from the network [10]. Location information (absolute, relative or partial) may or may not be available in such type of sensor network, depending on node capabilities and specific deployment conditions. In this VDC application sensor nodes (no location information) perform data acquisition and basic processing (amplitude-frequency domain transformation). Observations are transferred to the main node where further data processing, analysis and classification is conducted. The application uses star network topology where observations are transferred to the central processing node in one packet hop.

The main drawbacks of such architecture are short system lifetime, sharp functionality degradation towards the end of lifetime, need for controlled deployment and reduced spatial coverage.

B. Refactored Role-Based System An improved version of the original application was

envisioned to allow simple ad-hoc deployment of network nodes and extended spatial coverage by using multi-hop communication. Such network is to address problems of self-organization, self-adaptation and extended lifetime by smart usage of available node energy (from finite supplies or from energy-harvesting sources). The following roles are used in a simplified application model:

Detector (D) – a node periodically samples sound and determines if the sound level is above regularly observed noise level; if elevated level is detected, neighboring Sampler roles are alerted.

Sampler (S) – a node, upon an alert received from one or more Detector roles, samples sound using node's microphone and performs amplitude-frequency domain transformation. Acquired frequency spectrum information is used for vehicle type classification, and the resulting information is transferred to the Gateway role via Forwarder nodes.

Forwarder (FW) – routes vehicle information messages from Sampler roles to the Gateway role down the gradient field. A path from Sampler to Gateway role can contain from 0 to n Forwarder roles.

Gateway (GW) – one or more special-purpose nodes in the network used to extract information from the network.

Figure 3: Role composition for VDC application

292 MIPRO 2012/DC-VIS

C. Neighborhood Social rules mandate agents to provide limited local

information to the neighboring agents. Such information consists of a list of active roles on a particular node and a number of nodes within that node's neighborhood. Information is periodically broadcasted by node agent and received from other agents on neighboring nodes. This information is also used for establishing and maintaining local perception of node's neighborhood membership. Collected information is processed and added-value information is used as input to decision-making process of role control agents.

D. Utility Functions and Role Selection Due to role resource demands and cumulative

constraints on local node resources, a node is allowed to host only one active role at a time. Active roles are selected by a local agent on the basis of profit maximization, determined by periodical evaluation of utility functions for each role a node can host (dictated by structural constraints).

Detector (D) role:

UD =!D ! (1" e"nbrnbr )+"D !e

"(#d"d )2 , (2)

where nbr is the number of nodes in the node's

neighborhood, nbr is the average number of neighboring nodes for the node's neighborhood, #d is the current

number of nodes in neighborhood with active role D, dis the targeted number of nodes with active role D in the node's neighborhood, !D and !D are weight parameters. The first part of the utility function aims to position Detector roles at graph edge nodes (lower node degree than average degree in the node's closed neighborhood), i.e. at the sensor network perimeter nodes or nodes surrounding in-network holes. The second part of the function tries to maintain a desired concentration of nodes hosting a particular role in a one-message-hop radius.

Sampler (S) Role:

US = (!S ! (1" e"nbrnbr )+"S !e

"(# s"s)2 ) !Rs , (3)

where the first part of the utility function tries to position Sampler roles at nodes deeper within the sensor network, and the second part tries to maintain a desired role concentration. Parameter Rs represents the mandatory requirement that any S role must have at least one FW or GW role and at least one D role in its neighborhood (Rs is a binary parameter that takes only value of 0 or 1).

Forwarder (FW) Role:

UFW =!FW ! (1" e"nbrnbr )+"FW !e

"(# fw+# gw" fw)2 ! log# , (4)

where the first part of the function tries to position

FW roles at nodes having a higher degree than surrounding nodes, and the second part of the function tries to maintain a desired concentration of FW roles in the neighborhood. Factor Δ represents the maximal communication distance (in message hops) among the nodes in the neighborhood; the larger the distance, the more FW roles are needed to reduce communication cost.

Gateway (GW) Role:

The Gateway role is a predefined role for a special sensor node type with enhanced communication (and processing) capabilities. Such a node, in a VDC application scenario, cannot have any other active role than GW.

Role Selection:

The role selection process is a periodic process performed by the node's role management agent. Agent calculates potential income based on utility functions for D, S and FW roles. A fixed penalty Pswitch is subtracted from non-active role incomes to reduce frequent role switches due to minor differences in valuations.

A role with the highest potential income is selected to become a new/old active role, but only if the potential income is higher than a Tselect threshold. If the defined threshold is not reached by any of the roles, the node is left role-free. In such a case (network density is high or no required functional composition can be established), nodes are kept in low energy consumption state and activated when other surrounding nodes fail.

IV. GENETIC ALGORITHM FOR OPTIMAL TOPOLOGY IDENTIFICATION

A. Genetic Algorithm usage Every agent determines locally optimal role

combination for given node environment state, thus making agent-based approach to topology control inherently a bottom-up approach, To evaluate the quality of results provided by the agent-based approach, especially for large sensor networks, it was necessary to model the problem from the global, omniscient, point of view. Top-down approach to topology control problem, although infeasible in practice, should enable identification of an optimal or near-optimal role allocation for a given sensor network at a given moment in time (determined by the global state of the network in a given moment in time).

Due to large number of possible role allocations the algorithm must evaluate, a standard exhaustive search algorithm is not applicable but for the simplest networks. Consequently, the genetic algorithm (GA) was employed to find nearly optimal application topology.

MIPRO 2012/DC-VIS 293

B. The Basic Elements of the GA In a genetic algorithm, a population of strings (called

chromosomes), which encode solution domain (consist of so called individuals), evolves toward better solutions. It requires fitness function to evaluate the solution domain. At the end, the algorithm reaches (near-)optimal solution.

Chromosome, which encodes one solution to an optimization problem, is represented by one-dimensional array of values where a value represents node’s active roles’ combination. Array index encodes node’s unique ID in the sensor network topology.

0 1 ... N-1

X0

Xn represents set of active roles on node

X1 Xn-1

Node  number

Figure 4: Chromosome structure

A fitness function evaluating VDC application’s solution domain consists of 2 criteria: total area of overlap and the shortest path between observer’s node hosting sampler (S) role and node hosting a gateway (GW) role.

Operation of the GA heavily depends on fitness function design. The following fitness function is used:

f fitness =! ! Poverlap !e"!!dhop( ) (5)

 where parameter Poverlap represents total area of overlap between 2 nodes, dhop represents shortest path (distance) between sampler role node and gateway role node measured in a number of message hops, α and ß are weight parameters.

GA selection operator selects individuals for crossover operator from the current population. Among many selection algorithms tested, a roulette wheel parent selection algorithm in our case proved to be the best solution.

In addition to finding optimal role allocation for a given sensor network and current state, the algorithm provides an allocation optimality factor that enables a quantitative comparison of role allocations. The developed utility application takes an application topology from external source (file), finds the optimal topology and calculates fitness factors for both of them.

V. SIMULATION RESULTS

A. WSN Simulator Described VDC sensor network application and the

underlying concept of agent-based application topology control has been tested in the simulation environment. A general-purpose WSN simulator was developed in Java language, allowing simulation of large and heterogeneous sensor networks. The simulator is event-based,

supporting multiple radio models, power sources, simulation of different environmental factors (both for power harvesting and for different sensing modalities) and flexible extension mechanism.

B. Simulation Parameters The following parameter values for utility functions

were used: αD=0.7, αS=0.7, αFW=0.7, ßD=0.01, ßS=0.3, ßFW=0.1, d =0, s =0, fw =2, Pswitch=0.01, Tselect=0.4.

A simplified version of radio model was used (uniform communication range, packet-level loss probability estimation), all nodes had unlimited power supply. Nodes were static and had no location information available. Neighborhood information packets are broadcast by node's agent every 2 minutes.

C. Sensor Network and Application Topologies Performance evaluation of the MAS-based approach

to VDC application has been conducted on a number of sensor network topologies; from highly controlled and regular shaped to randomly generated ones. If feasible, results from MAS- and GA-based approach were compared. In this section three test topologies and respectful role assignments are presented: linear, modified grid and random topology.

Figure 5: Linear topology

On a linear topology sensor network (Figure 5), a single GW role is fixed at node 4; other roles have been assigned correct locations by node agents, in accordance with the role composition graph on Figure 3. GA- and MAS-based approaches yield the same role placements.

In the modified grid topology (Figure 6) the challenge for the MAS-based approach is to ensure communication paths from all S roles to a single GW role located at node 0. Also, each D role must be located at the edge node, and each S role must have at least one D role in its neighborhood. GA- and MAS-based approaches yield almost the same results for this topology.

MAS-based approach, in the current form and with parameters used, reveals its weakness when applied to large randomly generated networks with large in-network holes (Figure 7). When allocating roles for nodes with lower average degree that are connecting areas with higher node densities (for example nodes 20 and 28 in the network center), agents tend to select role D over role FW. As a consequence, VDC system is fragmented into sub networks of densely node-populated areas, drastically reducing effective area coverage to only a sub network containing the GW role.

294 MIPRO 2012/DC-VIS

Figure 6: Modified grid topology

Figure 7: Random topology

VI. CONCLUSION AND FUTURE WORK In this paper we proposed a method of decomposition

of WSN application functionality into a collection of roles. Allocation of roles to sensor nodes is performed by a multi-agent system. Self-interested agents, located on each sensor node, try to achieve optimal role allocation

for a given network and node conditions, by maximizing their income. Simulation results of a role allocation for a sample vehicle detection and classification application show promising results on a number of test network topologies, however there are problems in correct role allocation for networks with large in-network holes.

Future work will address both the general approach to system modeling and utility function synthesis and introduction of new elements in role allocation process, such as additional node and network properties (energy levels, absolute node density, cooperative energy conservation) as well as resilience to dynamic environment conditions (node failures, communication availability, asymmetric communication links etc.).

ACKNOWLEDGMENT This work is supported by the Croatian Ministry of

Science, Education and Sport, under the research project ZP0361965 Software Engineering in Ubiquitous Computing.

REFERENCES [1] Kay Römer, Christian Frank, Pedro José Marrón, and Christian

Becker, Generic role assignment for wireless sensor networks, In Proceedings of the 11th workshop on ACM SIGOPS European workshop (EW 11), 2004, ACM, New York, NY, USA

[2] Christian Frank and Kay Römer, Algorithms for generic role assignment in wireless sensor networks, In Proceedings of the 3rd international conference on Embedded networked sensor systems (SenSys '05), 2005, ACM, New York, NY, USA, 230-242.

[3] Mark A. Perillo, Role assignment in wireless sensor networks: Energy-efficient strategies and algorithms, University of Rochester, 2008.

[4] Nakamura, E.F. de Oliveira, H.A.B.F. Pontello, L.F. Loureiro, A.A.F, On Demand Role Assignment for Event-Detection in Sensor Networks, 11th IEEE Symposium on Computers and Communications, 2006.

[5] M. Welsh and G. Mainland. Programming sensor networks using abstract regions. In NSDI’04, San Francisco, USA, March 2004.

[6] K. Whitehouse, C. Sharp, E. Brewer, and D. Culler. Hood: A neighborhood abstraction for sensor networks. In MobiSys’04, Boston, USA, June 2004.

[7] D. Ganesan, B. Krishnamachari, A. Woo, D. Culler, D. Estrin and S. Wicker, Complex Behavior at Scale: An Experimental Study of Low-Power Wireless Sensor Networks, In Technical Report UCLA/CSD-TR 02-0013, 2002.

[8] Gang Zhou, Tian He, Sudha Krishnamurthy, and John A. Stankovic, Impact of radio irregularity on wireless sensor networks. In Proceedings of the 2nd international conference on Mobile systems, applications, and services (MobiSys '04), 2004, ACM, New York, NY, USA

[9] Jennings, N. R., Wooldridge, M., Agent-Oriented Software ngineering, The 9th European Workshop on Modelling Autonomous Agents in a Multi-Agent World : Multi-Agent System Engineering, MAAMAW-99, Valencia, Spain, 1999.

[10] Dan Li; Wong, K.D.; Yu Hen Hu; Sayeed, A.M., Detection, classification, and tracking of targets, IEEE Signal Processing Magazine 19 (2), 2002.

MIPRO 2012/DC-VIS 295