1.. Introduction
================

Wireless sensor networks (WSNs) are wireless networks that consist of a large number of spatially distributed autonomous sensors (generally referred to as sensor nodes) and collectively monitor environmental conditions, such as temperature, sound, vibration, and so forth \[[@b1-sensors-07-01359],[@b2-sensors-07-01359]\]. WSN can be employed in applications ranging from environmental monitoring and battlefield surveillance to condition based maintenance \[[@b1-sensors-07-01359],[@b2-sensors-07-01359],[@b3-sensors-07-01359]\]. Among the tasks of these applications, target localization and classification are most frequently involved \[[@b3-sensors-07-01359],[@b4-sensors-07-01359],[@b5-sensors-07-01359],[@b6-sensors-07-01359],[@b7-sensors-07-01359]\]. Both tasks can be viewed as sensor fusion problems as illustrated in \[[@b2-sensors-07-01359]\]. More specifically, the target localization and classification problem is to make the best estimates with regard to the location and type of the observed targets by rationally combining information collected by relevant sensor nodes \[[@b2-sensors-07-01359]\].

A thorough overview of these problems can be found in \[[@b3-sensors-07-01359]\]. In the publication, a general purpose collaborative framework is proposed for localization and classification in WSN. Localization problems are overviewed in \[[@b4-sensors-07-01359],[@b5-sensors-07-01359],[@b6-sensors-07-01359]\]. It shows localization is primarily achieved by two approaches, i.e. by estimate of time delay of arrival (TDOA) or estimate of energy attenuation. Each algorithm has its own advantages and disadvantages \[[@b6-sensors-07-01359]\]. In \[[@b3-sensors-07-01359]\] energy based localization using acoustic signatures in WSN is presented. Classification in WSN is reported in \[[@b3-sensors-07-01359],[@b7-sensors-07-01359]\]. In \[[@b3-sensors-07-01359]\], maximum likelihood and support vector machine are used for classification. Real world experiments to classify armed vehicles with acoustic and seismic signatures are demonstrated in \[[@b7-sensors-07-01359]\].

In WSN scenarios, the energy based localization method is preferred. The primary reason is that TDOA requires related sensors to be accurately synchronized. But accurate synchronization at present is too expensive. Localization with acoustic signatures is most desirable, because the models of acoustic energy attenuation are relatively easy to establish and less influenced by environmental changes. Support vector machine \[[@b7-sensors-07-01359]\] is very suitable for classification in WSN because it is especially designed for small sample learning. Moreover its sparse representation of the learned classifier requires less in-network data exchange.

As shown in \[[@b2-sensors-07-01359]\], localization and classification in WSN are in essence sensor fusion problems. It necessitates cooperation between sensor nodes and collaborative processing algorithms. The collaboration entails in-network information exchanges, but in WSN limited bandwidth and power supply make bulk data exchanges prohibitively expensive \[[@b1-sensors-07-01359],[@b3-sensors-07-01359]\].

To deal with the above problems, a variety of energy efficient collaborative processing algorithms have been developed \[[@b3-sensors-07-01359],[@b8-sensors-07-01359],[@b9-sensors-07-01359],[@b10-sensors-07-01359],[@b11-sensors-07-01359]\]. An information-driven collaborative algorithm is introduced in \[[@b9-sensors-07-01359]\]. Different from the method in \[[@b9-sensors-07-01359]\], mobile agents are employed to perform collaborative processing in WSN in \[[@b10-sensors-07-01359],[@b11-sensors-07-01359]\]. Mobile agents can remarkably reduce in-network wireless transmission by migrating in the network to perform assigned tasks \[[@b10-sensors-07-01359],[@b11-sensors-07-01359]\]. The characteristics of agents (including mobile agents and multi-agents) such as autonomy, reactivity, and social ability perfectly match the autonomous, reactive and collaborative features of WSN \[[@b10-sensors-07-01359],[@b12-sensors-07-01359]\]. Such resemblance has motivated attempts to model WSN as a multi-agent system as reported in \[[@b13-sensors-07-01359],[@b14-sensors-07-01359]\].

Undoubtedly it is desirable to use these proposed architectures to develop scalable WSN systems. But in literatures \[[@b10-sensors-07-01359],[@b12-sensors-07-01359]\] only mobile agents are exploited, while in literatures \[[@b13-sensors-07-01359],[@b14-sensors-07-01359]\] merely multi-agents are investigated. Intuitively the potentials of agents will be better exploited if multi-agents and mobile agents are merged. Inspired by this, we propose to model WSN with a heterogeneous agent system (i.e. a combination of mobile agents and multi-agents). It is believed such architecture represents WSN better than solely using either of them.

The proposed architecture is a hierarchical one. The entire WSN is viewed as a multi-agent system. Individual agents belong to different hierarchical levels in accordance with their roles in the network. Collaborative processing (or equivalently, sensor fusion) is primarily accomplished by multi-agent cooperation, but mobile agents are also used in cases of bulk data exchanges. This architecture greatly facilitates designs and implementations of WSN. In addition the architecture also readily adapts to diversified deployments at various scales.

With the agent architecture, target localization and classification in WSN are implemented accordingly. Energy based acoustic localization is achieved by multi-agent collaboration. An adaptive steepest descent search algorithm is introduced to search for the best estimate of target location. Target classification is achieved by a combination of multi-agent and mobile agent using SVM. Distributed SVM learning using convex hull vectors is developed to enhance the learning accuracy with low communication needs. Acoustic and seismic signatures are observed for classification\'s purpose. The features are extracted by means of wavelet packet decomposition. Fusion algorithms are devised to merge classification decisions made by agents using features of different modalities.

Experiments are conducted to evaluate the proposed architecture and corresponding collaborative algorithms. Results show that the proposed architecture remarkably facilitates the system designs and implementations. Applications of vehicle localization and classification show the proposed steepest descent search and distributed SVM algorithms are energy efficient and accurate.

The rest of the paper is organized as follows. In section 2, existent agent architectures for WSN are introduced. Existent algorithms for target localization and classification are overviewed in section 3. In the section that follows, the heterogeneous agent architecture is developed. Agent collaborative algorithms for localization and classification are accordingly proposed respectively. In section 5 real world experiments of vehicle localization and classification are conducted and the results are reported. A conclusion is given in section 6.

2.. Existent Agent Architectures for Wireless Sensor Networks
=============================================================

2.1.. Brief overview of multi-agent systems and mobile agents
-------------------------------------------------------------

The terms multi-agent and mobile agent have long been used in research communities, however paradoxically they are effectively not clearly defined \[[@b12-sensors-07-01359]\]. To make them fit into the objectives in this paper, the definition of agent given in \[[@b12-sensors-07-01359]\] is adopted. According to \[[@b12-sensors-07-01359]\], agent is defined as "a computational mechanism that exhibits a high degree of autonomy, performing actions in its environment based on information (sensors, feedback) received from the environment".

A multi-agent system is one where there is more than one agent, and where the agents interact with one another \[[@b12-sensors-07-01359]\]. For WSN applications, hierarchical multi-agent systems are of particular interests. Here hierarchy is used in the sense system components from different task levels are represented by different agents. Such systems have significant implications for WSN, as is to be illustrated soon.

In contrast, a mobile agent can be regarded as a special kind of agent which has the unique feature of mobility \[[@b10-sensors-07-01359]\]. A mobile agent migrates from one sensor node to another to autonomously perform assigned tasks. Usually the derived results are sent back to the sensor node that dispatches the mobile agent, but the mobile agent itself generally destructs locally.

Note that a sensor node is an autonomous entity which makes decisions by reasoning with the information acquired by its sensors \[[@b2-sensors-07-01359]\]. Evidently the characteristics of a sensor node match the agent definition perfectly. The sensor node, therefore, can be viewed as an agent. Consequently it would be appropriate to model WSN in software with multi-agent systems and mobile agents.

2.2.. Multi-agent and mobile agent architectures for wireless sensor networks
-----------------------------------------------------------------------------

Now that a sensor node can be viewed as an agent, it is straightforward to consider WSN as a multi-agent system. The hierarchical multi-agent architecture is presented for WSN in \[[@b14-sensors-07-01359]\]. Mobile agents have been found wide application in WSN too.

The multi-agent architecture in \[[@b14-sensors-07-01359]\] is briefly summarized as follows. The entire WSN is viewed as a homogeneous hierarchical multi-agent system. The top agent is the interface agent. It is responsible for accepting user requests, processing them and providing feedbacks. It also dispatches instructions to agents at lower levels. Based on geographical conditions and other factors, WSN can be divided into regions managed by regional agents. A region is further split into several sub-regions called clusters and managed by cluster agents. At the bottom of the hierarchy is the query agent, which actually corresponds to a sensor node.

Apparently the established hierarchical agent architecture is an adequate software abstraction of the functionalities of WSN. But it is more than a simple software model. Its cooperative, social and adaptive characteristics make designs and implementations of scalable WSN much easier.

Applications of mobile agents in WSN is mainly driven by some drawbacks of the prevalent client/server computing paradigms \[[@b10-sensors-07-01359],[@b11-sensors-07-01359]\] .Collaborative computing paradigms with mobile agents have been proposed to address these drawbacks. In such paradigms, instead of sending raw data from sensor nodes to the server, mobile agents carrying processing codes are sent to these sensor nodes to carry out local processing. When local processing is finished, derived results are sent back. Usually the size of the codes carried by a mobile agent is much smaller compared to the data to be sent. Accordingly communication energy consumption is drastically reduced.

Compared to multi-agent architectures for WSN, mobile agent architectures are relatively simple and straightforward. In such architectures, mobile agents are usually dispatched by a sink node or base station and migrate from one sensor node to another to perform assigned tasks. Since the mobile agents are essentially software codes, they can be dynamically programmed. Therefore the architectures offer much flexibility to collaboration processing in WSN and make the network adaptive to various types of applications. As stated above, multi-agent and mobile agent architectures for WSN make it easier to design the network structures and implement collaborative processing algorithms between sensor nodes. It is also clear that these two architectures are essentially complementary. If they are combined, their strengths will be fully exploited. Later in the paper, a merged architecture will be proposed and applied to collaborative localization and classification in WSN.

Before a merged architecture and its applications are investigated, the problems of localization and classification are overviewed first to prepare the background for further discussion.

3.. Target Localization and Classification Algorithms
=====================================================

In this section, several localization and classification algorithms are briefly presented. Signatures of a variety of modalities can be used for target localization in WSN \[[@b5-sensors-07-01359],[@b9-sensors-07-01359],[@b15-sensors-07-01359]\]. But acoustic signatures are most frequently used because such signatures can be easily measured and the localization accuracy is good \[[@b3-sensors-07-01359],[@b4-sensors-07-01359],[@b6-sensors-07-01359]\]. Thus the discussion is confined to acoustic localization. Contrast to localization, classification relies less on signature modalities; therefore it is discussed in a general sense.

3.1.. Target localization with acoustic signatures
--------------------------------------------------

### 3.1.1. Propagation of acoustic signatures

In the paper, the localization problem is constrained within two dimensions, that is, the target is assumed to be positioned in a plane. Suppose the acoustic signature emitted by the target at position **p**~s~ is *u~s~*(*t*) and it propagates at the velocity of *c* . In cases where the acoustic wave propagates in the air, the velocity *c* can be assumed to be a constant of *340m*/*s*. Two dimensional propagation of the acoustic signature is mathematically represented by \[[@b3-sensors-07-01359],[@b6-sensors-07-01359]\]: $$u_{r}(t) = \frac{1}{\left. 4\pi \right\|\left. {\textbf{p}_{s} - \textbf{p}_{r}} \right\|}u_{s}(t - t_{\textit{sr}})$$where *u~s~*(*t*) is the acoustic signature propagated to location **p~r~** whose Cartesian coordinates are expressed by $$\textbf{p}_{r} = {\lbrack x_{r},y_{r}\rbrack}^{T}$$

Note $$t_{\textit{sr}} = c^{- 1}\left\| {\textbf{p}_{s} - \textbf{p}_{r}} \right\|$$is the time needed for the signature to travel from location **p~s~** to **p~r~**. ‖⋅‖ represents the vector 2-norm: $$\left\| {\lbrack x,y\rbrack}^{T} \right\| = \sqrt{x^{2} + y^{2}}$$

Suppose a microphone sensor *m* is deployed at position **p***~m~* and the sensor gain is *α~m~*. Then the acoustic signature measured by the sensor is \[[@b6-sensors-07-01359]\] $$u_{m}(t) = \frac{\alpha_{m}}{4\pi\left\| {\textbf{p}_{s} - \textbf{p}_{m}} \right\|}u_{s}(t - t_{\textit{sm}}) + n_{m}(t)$$where *n~m~*(*t*)is additive noise (assumed to be uncorrelated with the source signature).

[Eq.(5)](#FD5){ref-type="disp-formula"} is a comprehensive description of the propagating characteristics of acoustic signatures. Information of the acoustic source can be inferred from this equation. Specifically the acoustic localization problem is to estimate **p**~s~ from the observed signature *u~m~*(*t*) by the microphone sensor. The algorithms to be introduced rely heavily on the above propagation models, especially [Eq. (5)](#FD5){ref-type="disp-formula"}.

### 3.1.2. TDOA method

Acoustic signature reaches deployed sensors at different time. The term *t~sm~* in [Eq.(5)](#FD5){ref-type="disp-formula"} exactly describes such time delay of arrival (TDOA). Though the absolute TDOA can not be measured without knowledge of location **p**~s~, the relative TDOA *t~mr~* of sensor *m* at **p***~m~* with respect to reference sensor *r* at **p***~r~* can be determined by means of cross correlation \[[@b6-sensors-07-01359], [@b16-sensors-07-01359]\] $$t_{\textit{mr}} = \arg\max\left\lbrack {R_{r,m}(\tau)} \right\rbrack$$ $$R_{r,m}(\tau) = \frac{1}{T - \tau}{\int_{\tau}^{T}{u_{r}(t)u_{m}(t - \tau)\textit{dt}}}$$

Note *R~r,\ m~*(*τ*) is the cross correlation of *u~m~*(*t*) and *u~r~*(*t*). Recall from [Eq.(3)](#FD3){ref-type="disp-formula"} *t~mr~* is determined by $$t_{\textit{mr}} = t_{\textit{sm}} - t_{\textit{sr}} = c^{- 1}\left( {\left\| {\textbf{p}_{s} - \textbf{p}_{m}} \right\| - \left\| {\textbf{p}_{s} - \textbf{p}_{r}} \right\|} \right)$$

In [Eq.(8)](#FD8){ref-type="disp-formula"}, there are two unknowns (note **p***~s~*=\[*x~s~*, *y~s~*\]*^T^*), therefore another such equation is needed to determine **p**~s~. If another sensor *n* positioned at **p***~n~* is available, then we have $$\left\{ \begin{array}{l}
{\left\| {\textbf{p}_{s} - \textbf{p}_{m}} \right\| - \left\| {\textbf{p}_{s} - \textbf{p}_{r}} \right\| = t_{\textit{mr}}c} \\
{\left\| {\textbf{p}_{s} - \textbf{p}_{n}} \right\| - \left\| {\textbf{p}_{s} - \textbf{p}_{r}} \right\| = t_{\textit{nr}}c} \\
\end{array} \right.$$

Solution of [Eq.(9)](#FD9){ref-type="disp-formula"} yields the estimated position $\textbf{p}_{s}^{*}$ of the target whose true location is **p**~s~. In its formulation TDOA is involved. That is why this approach is called *TDOA* method.

### 3.1.3. Energy based method

When an acoustic signature is propagating, it essentially propagating energy emitted from the source. Physically, energy of vibration is proportional to the square of vibration amplitude. Following [Eq.(1)](#FD1){ref-type="disp-formula"}, energy decays in a manner that is inversely proportional to the square of the distance from the source \[[@b4-sensors-07-01359]\]: $$\frac{k \cdot E_{s}}{\left\| {\textbf{p}_{s} - \textbf{p}_{m}} \right\|^{2}} = E_{m}$$where *k* is a coefficient, *E~s~* is the source energy at **p***~s~* and *E~m~* is the energy propagated to **p***~m~*.

Similar to the principles of TDOA method, though absolute energy can not be measured, relative energy *E~mr~* can be calculated: $$E_{\textit{mr}} = \frac{\frac{1}{\alpha_{m}^{2}}{\int_{T'}^{T^{'} + T}{\left| {u_{m}(t)} \right|^{2}\textit{dt}}}}{\frac{1}{\alpha_{r}^{2}}{\int_{T'}^{T^{'} + T}{\left| {u_{r}(t)} \right|^{2}\textit{dt}}}}$$

On the other hand, using [Eq.(10)](#FD10){ref-type="disp-formula"} *E~mr~* is determined by $$E_{\textit{mr}} = \frac{E_{m}}{E_{r}} = \frac{\left\| {\textbf{p}_{s} - \textbf{p}_{r}} \right\|^{2}}{\left\| {\textbf{p}_{s} - \textbf{p}_{m}} \right\|^{2}}$$

Following the same principle of the solution in the TDOA method, the target position can be estimated by combining several equations similar to [Eq.(12)](#FD12){ref-type="disp-formula"}. Evidently it is called energy based method because energy propagation models play the dominant role in the formulation of this algorithm.

Observe the similarities between the TDOA method and energy based method. They both estimate the true target position by inferring from known relative quantities (relative time delay and energy respectively). Comparatively, the former method is less affected by noises as a result of cross correlation but requires more computation (evaluation of [Eq.(6)](#FD6){ref-type="disp-formula"} necessitates investigation of a large number of possible *τ*). Moreover it requires accurate synchronization of the involved sensors. The latter is relatively efficient in computation but vulnerable to noises. Choosing the appropriate localization method is problem specific where tradeoff between accuracy and efficiency may be needed.

3.2.. Target classification with support vector machine
-------------------------------------------------------

In the context of this paper, target classification is to infer which hypothesis the target belongs to from the signatures observed by deployed sensors. Classification algorithms have been extensively investigated \[[@b3-sensors-07-01359],[@b7-sensors-07-01359],[@b17-sensors-07-01359]\]; therefore there are a rich set of algorithms for choice. In WSN scenarios, support vector machine (SVM) \[[@b17-sensors-07-01359],[@b18-sensors-07-01359],[@b19-sensors-07-01359]\] is especially applicable and suitable, for available samples come in small number due to limited memory. Another appealing merit of SVM is its sparseness. By sparseness, it means the learned SVM classifier is represented by only a small portion of given samples in most cases. In other words, support vector machine implicitly performs data compression. Such data compression makes SVM extremely suitable for WSN applications, because it can significantly reduce communication load. Classification in WSN is essentially distributed due to the distributed sensor deployment. Consequently distributed SVM learning schemes need to be exploited.

### 3.2.1. Fundamentals of support vector machine

Mathematically a binary classification problem is formulated as \[[@b17-sensors-07-01359],[@b18-sensors-07-01359]\]: given a set of *N* samples ${\{(x_{i},y_{i})\}}_{i = 1}^{N}$ where ***x**~i~* ∈ **X** ⊂ **R***^d^*, *y~i~* ∈ **Y** = {+1, −1} and *y~i~* denotes the class label of the sample *x~i~*, determine the hypothesis *H*(**x**,**u**~0~) ∈ {*H*(**x**,**u**)} that meets certain criteria. As far as SVM is concerned, the criteria is minimization of structural risks and the hypothesis takes the following form \[[@b17-sensors-07-01359]\] $$H(\textbf{x},\textbf{w},b) = \left\{ {\textbf{x}\left| (\textbf{w} \cdot \phi(\textbf{x})) + b = 0 \right.} \right\}$$where *ϕ*:**X** → **F** maps elements in **X** to a higher dimensional feature space **F** ; **w** is the weight vector and *b* is the bias. The notation (·) denotes the inner product operator.

The hypothesis *H*(**x**,**w**,*b*) minimizing structural risks is denoted by *H\**(**x**,**w**,*b*), which is determined by the following quadric optimization \[[@b17-sensors-07-01359],[@b18-sensors-07-01359]\]: $$\max\limits_{\alpha}\sum\limits_{i = 1}^{N}\alpha_{i} - \frac{1}{2}\sum\limits_{i = 1}^{N}{\sum\limits_{j = 1}^{N}\alpha_{i}}\alpha_{j}y_{i}y_{j}K(\textbf{x}_{i},\textbf{x}_{j})$$ $$s.t.\sum\limits_{i = 1}^{N}\alpha_{i}y_{i} = 0$$ $$0 \leq \alpha_{i} \leq C,i = 1,\ldots,N$$

In these equations, *C* is the predefined cost parameters. *α~i~* is the Lagrange multiplier. *K*(·) is a kernel function defined as *K*(**x***~i~*,**x***~j~*)=(*ϕ*(**x***~i~*)·*ϕ*(**x***~j~*)).

Suppose the optimal solution to [Eq. (14)](#FD14){ref-type="disp-formula"} is $\mathbf{\alpha}^{*} = \lbrack\alpha_{1}^{*},\alpha_{2}^{*},\ldots,\alpha_{N}^{*}\rbrack$. Then **x***~j~* associated with $\alpha_{j}^{*} \neq 0$ is called a support vector (SV). That is exactly why this method is named support vector machine. Let *iSV* denotes the set $\{{j|\alpha_{j}^{*} \neq 0}\}$. Then the derived hypothesis *H\**(**x**,**w**,*b*) is expressed as \[[@b17-sensors-07-01359]\] $$H^{*}(\textbf{x},\textbf{w},b) = \sum\limits_{m \in SV_{i}}{y_{m}\alpha_{m}^{*}K(\textbf{x}_{m},\textbf{x}) + b}$$

Consequently, the decision function of SVM is \[[@b18-sensors-07-01359]\] $$f(\textbf{x}) = \operatorname{sgn}(\sum\limits_{m \in \textit{iSV}}{y_{m}\alpha_{m}^{*}K(\textbf{x}_{m},\textbf{x}) + b})$$

The decision function [(18)](#FD18){ref-type="disp-formula"} is based on the derived hypothesis [(17)](#FD17){ref-type="disp-formula"}, so the notations are identical with those used in [(17)](#FD17){ref-type="disp-formula"}. The sgn(·) function is the sign function. Therefore [(18)](#FD18){ref-type="disp-formula"} means that given any new sample **x**, if $\underset{m \in \textit{iSV}}{\sum}{y_{m}\alpha_{m}^{*}K(\textbf{x}_{m},\textbf{x}) + b} > 0$, then **x** belongs to class+1 (the output ofsgn(·)), otherwise−1.

Note that the SVM classifier [(17)](#FD17){ref-type="disp-formula"} is learned in a centralized manner, that is, all the samples are available during the learning processing (i.e. solution of [Eq.(14)](#FD14){ref-type="disp-formula"}). But in WSN, samples are distributed over the network; consequently distributed learning methods need to be investigated.

### 3.2.2. Simple algorithm for distributed support vector machine learning

In WSN scenarios, the samples ${\{(x_{i},y_{i})\}}_{i = 1}^{N}$ are distributed across the network. Suppose the whole samples (denoted by *D*) are distributed over *p* sensors in WSN. The sample segment of *D* at the sensor *k* is denoted by *D~k~*. Distributed SVM learning from *D~k~*(1 ≤ *k* ≤ *p*) can be transformed into a centralized one, if all segments are sent to a concentration point where SVM is learned following [Eq.(14)](#FD14){ref-type="disp-formula"}. But such data concentration is not applicable in most WSN applications. As illustrated before, in WSN bulk data transmission is prohibitive due to energy and bandwidth limitations. As a result, centralized SVM learning is not feasible; therefore distributed learning needs to be exploited.

A simple distributed learning method is based upon the sparseness of SVM \[[@b19-sensors-07-01359]\]. Note in [Eq.(17)](#FD17){ref-type="disp-formula"}, only support vectors contribute to the final classifier. Moreover these support vectors usually account for a small portion of the whole samples. In other words a SVM classifier is sparsely but sufficiently represented by its support vectors. Based upon this observation, it is both intuitive and natural to propose to learn the global SVM classifier from the concentration of local support vectors instead of local samples *D~k~*(1 ≤ *k* ≤ *p*). For detailed information concerning this method, please refer to \[[@b20-sensors-07-01359]\]. In this way, communication energy consumption is significantly decreased, because the numbers of support vectors are much smaller compared to the whole samples. This simple intuitive learning method is called 'SV only' algorithm because only local support vectors need to be transmitted for final SVM learning.

### 3.2.3. Convex hull vector approach for distributed support vector machine learning

The SV only algorithm is very intuitive and indeed effective in some cases, but not in all cases. The rationale of the SV only algorithm is that local support vectors are representative of local segments, whose union is accordingly representative of the whole samples too. However this is not the truth. There is a gap in between. In \[[@b21-sensors-07-01359]\] convex hull is employed to draw representative samples from local segments. The drawn samples are called hull vectors (HV) and their union is also representative of the whole samples. The principle of convex hull is very straightforward and derived from observations that in the feature space support vectors are always on the boundary of samples. This is shown in [Figure 1](#f1-sensors-07-01359){ref-type="fig"}. In this figure diamonds and stars represent samples of two classes. The support vectors are circumscribed by circles which are shown to be exactly on the boundaries. The boundary polygons are called convex hulls and the samples on the polygons are the corresponding hull vectors.

An appealing characteristic of convex hull is that the convex hull of a large dataset can be constructed with the convex hulls of its subsets. Therefore by convex hull, more information pertinent to the local segments is preserved than the SV only algorithm. It is shown in \[[@b20-sensors-07-01359]\] that compared to the SV only algorithm, better distributed learning accuracy is achieved by using hull vectors in the feature space to represent the local samples.

A comprehensive introduction to convex hulls and algorithms to compute them can be found in \[[@b22-sensors-07-01359]\]. Here a divide and conquer algorithm (in 2-dimensions) is presented and shown in [Figure 2](#f2-sensors-07-01359){ref-type="fig"}. The algorithm is essentially a recursive one which is easy to understand and implement. However it must be emphasized that convex hull computation in the feature space is very difficult. It requires explicit mapping from the sample space to the feature space, which is at least presently a challenging problem.

Obviously for SV only and convex hull approaches, the former is simpler but the latter is more accurate. Choice between the two algorithms depends on the objective of the distributed learning.

In the following section, the heterogeneous agent architecture is first developed; then the previously discussed localization and classification algorithms are adapted for the proposed architecture.

4.. Collaborative Localization and Classification with the Heterogeneous Agent Architecture
===========================================================================================

From above discussions, it is clear both localization and classification in WSN call for collaboration between sensor nodes. It is also known the multi-agent architecture facilitates sensor node cooperation and the mobile architecture significantly reduce in-network communication load. However for the collaborative localization and classification in WSN, both sensor node cooperation and exchanges of data in bulk are needed. Therefore it is necessary and advantageous to merge these two agent architectures to meet the requirements presented in these applications.

In this section, the heterogeneous agent architecture is proposed to combine multi-agents and mobile agents. With such architecture, appropriate algorithms are accordingly developed for collaborative localization and classification in WSN.

4.1.. Heterogeneous agent architecture for wireless sensor networks
-------------------------------------------------------------------

The proposed heterogeneous architecture framework is shown in [Figure 3](#f3-sensors-07-01359){ref-type="fig"}. From the figure, it is obvious that the architecture is a heterogeneous one, for both multi-agent systems and mobile agents are incorporated. The multi-agent system is a hierarchical one. The top is the interface agent, which receives user query about the environment, inquires the lower level agents accordingly and reports the query results to the users. The immediately lower level is the regional agent. In such architecture, several regional agents may coexist, and each one is in charge of a region within the sensor field. Regional agents receive query requests from the interface agent and control sensor nodes within its region to collaboratively respond to the requests. A region is further split to sub-regions (clusters) that are coordinated by manager agents. Manager agents directly control the behavior of these sensor nodes which are modeled as observing agents (OA). Effectively a manager agent and its OAs play the dominant role in WSN collaborative processing. This is due to the fact that a target or an event to be dealt with must belong to one cluster organized by a manager agent. This is a miniature multi-agent system relative to the whole system.

Mobile agents may be involved in collaboration at any level, from interface agent query at the top to OA collaborative processing at the bottom. Nevertheless in most cases, mobile agents are involved at lower levels, because much of the practical collaboration takes place at lower levels. It must be clarified that mobile agents are only used when needed. As a simple but practical guideline, mobile agents are used in cases where data transmission comes in bulk or utilization of mobile agents gives superior performance.

In [Figure 4](#f4-sensors-07-01359){ref-type="fig"}, it shows an illustrative WSN deployment for target localization and classification following the proposed agent architecture. The sensor fields are divided into several regions based on geographic conditions. Regional agents directly communicate with the interface agent. It is postulated the clusters within a region and the manager agents are predefined. They may also be dynamically determined, but that is beyond the scope of this paper. When the target is detected in a region, agent collaborative localization and classification start accordingly.

The number of those observing agents involved in collaboration and the subsequent collaboration mechanisms for localization and classification are problem dependent. In the following, collaboration schemes for acoustic localization and hull vector based SVM are discussed in detail.

4.2.. Agent collaborative acoustic localization
-----------------------------------------------

To confine the discussion within the scope of localization, it is assumed that the target is stationary or moves very slowly across the sensor field. Moreover we suppose that the locations of the sensor nodes are known a priori. The location may be artificially specified during the deployment or determined by the WSN self localization algorithms as introduced in \[[@b23-sensors-07-01359]\].

As stated above, the TDOA and energy based methods can both be employed to localize a target in WSN. TDOA doesn\'t rely on propagation models of investigated acoustic signatures, but it exerts higher synchronous requirements on the sensors involved in localization. If these sensors are badly synchronized, the time delay calculated by cross correlation will be far from reliable. Moreover, TDOA requires to calculate the cross correlation of signatures measured by several observing agents. In such collaboration, it is nearly impossible to avoid exchanges of time series signals in bulk. Because no compression can be done to the time series, otherwise the phase information will be lost. In addition searching for the peak of the cross correlation function is computationally expensive. To the contrary, the energy based method only requires exchange of the acoustic energy measured at each observing agent. For these reasons, the energy based method is chosen for target localization in WSN.

As noted in [Eq.(12)](#FD12){ref-type="disp-formula"}, there are two unknowns in the equation; therefore it seems two such equations are sufficient to determine the target position. However, note all the **p***~s~* satisfying [Eq.(12](#FD12){ref-type="disp-formula"}) forms a circle in a plane. Solutions of two such equations correspond to the intersections of two circles, which usually corresponds to two solutions to [Eq.(12)](#FD12){ref-type="disp-formula"}. Therefore a third equation is needed to uniquely determine the target position. That is to say, at least four observing agents are needed to collaboratively localize the target by 3 such equations: $$\left\{ \begin{array}{l}
{\left\| {\textbf{p}_{s} - \textbf{p}_{m_{1}}} \right\|^{2}E_{m_{1}} - \left\| {\textbf{p}_{s} - \textbf{p}_{m_{4}}} \right\|^{2}E_{m_{4}} = 0} \\
{\left\| {\textbf{p}_{s} - \textbf{p}_{m_{2}}} \right\|^{2}E_{m_{2}} - \left\| {\textbf{p}_{s} - \textbf{p}_{m_{4}}} \right\|^{2}E_{m_{4}} = 0} \\
{\left\| {\textbf{p}_{s} - \textbf{p}_{m_{3}}} \right\|^{2}E_{m_{3}} - \left\| {\textbf{p}_{s} - \textbf{p}_{m_{4}}} \right\|^{2}E_{m_{4}} = 0} \\
\end{array} \right.$$

Before turning to its solution, it should be determined which observing agents are used to establish [Eq.(19)](#FD19){ref-type="disp-formula"}. We propose to select the 4 observing agents that report the highest energy level. The choice is actually intuitive, since it is believed the measurements near a target are more reliable.

There is no closed form solution to [Eq.(19)](#FD19){ref-type="disp-formula"}. Moreover due to noises and other possible interference, there is usually no exact solution to [Eq.(19)](#FD19){ref-type="disp-formula"}. Mathematically it is a common practice to find a solution that makes the terms on the left hand side approach zero as much as possible. We propose to derive the most exact solution of [Eq.(19)](#FD19){ref-type="disp-formula"} by solving the optimization problem: $$\min\limits_{\textbf{P}s}J(\textbf{p}_{s}) = \sum\limits_{j = 1}^{3}\left\lbrack {\left\| {\textbf{p}_{s} - \textbf{p}_{m_{j}}} \right\|^{2}E_{m_{j}} - \left\| {\textbf{p}_{s} - \textbf{p}_{m_{4}}} \right\|^{2}E_{m_{4}}} \right\rbrack^{2}$$

Note that [Eq.(20)](#FD20){ref-type="disp-formula"} is an unconstrained optimization problem which has been extensively explored mathematically. In this paper we recommend to employ gradient based steepest descent search method \[[@b24-sensors-07-01359]\] to solve it. Its computation expense is comparatively low and converges fast to the solution.

Though [Eq.(20)](#FD20){ref-type="disp-formula"} is an unconstrained optimization, yet since the target is within the sensor field, the search space should be constricted within the field. An even better approach is to search within the region where it is detected. Another important issue concerning solution of [Eq.(20)](#FD20){ref-type="disp-formula"} is choice of an appropriate initial search position. Intuitively the location of the observing agent that provides the highest energy level is selected as the initial search point. The rationale is that a sensor is closer to the target if it receives higher level of energy. Such search choice intuitively guarantees the fastest convergence.

In the steepest descent search, maximum search steps and termination condition have to be set beforehand. It is possible (e.g. due to noises) that in the given search steps, the termination condition is not met. To address this problem, we propose to dynamically adjust the termination condition. If termination condition is not met when it has reached the assigned maximum search steps, the termination condition is relaxed accordingly.

In [Figure 5](#f5-sensors-07-01359){ref-type="fig"}, the formally formulated localization algorithm by agent collaboration is presented. Note in the presented algorithm, average energy is used. The steepest descent search algorithm that dynamically adjusts termination condition is shown in [Figure 6](#f6-sensors-07-01359){ref-type="fig"}. Note that the observing agents involved in [(20)](#FD20){ref-type="disp-formula"} are determined by the process presented in [Figure 5](#f5-sensors-07-01359){ref-type="fig"}. The notations here are consistent with the ones used there. Note **p***~s~* in [(20)](#FD20){ref-type="disp-formula"} is a vector of two dimensions, that is **p***~s~* = \[*x*~s~, *y~s~*\]*^T^*. The notation ∇**J**(**p***~s~*) in [Figure 6](#f6-sensors-07-01359){ref-type="fig"} denotes the gradient of **J**(**p***~s~*): $$\nabla J(\textbf{P}_{s}) = \left\lbrack \begin{array}{l}
\frac{\partial J(\textbf{P}_{s})}{\partial x_{s}} \\
\frac{\partial J(\textbf{P}_{s})}{\partial y_{s}} \\
\end{array} \right\rbrack$$

[Figure 5](#f5-sensors-07-01359){ref-type="fig"} and [Figure 6](#f6-sensors-07-01359){ref-type="fig"} give the complete description of the algorithms for agent collaborative localization in WSN. Next we proceed to the classification problem.

4.3.. Agent collaborative support vector machine classification
---------------------------------------------------------------

### 4.3.1. Distributed support vector machine learning with hull vectors and support vectors

As shown before, distributed algorithms are needed to learn SVM classifiers in WSN. The SV only algorithm is simple but its performance is not satisfactory, because much important information is lost. Though the convex hull approach (in feature space) preserves most of the important information of the whole samples, however it requires explicit mapping into the feature space. Choice between these two algorithms is actually find the tradeoff between learning complexity and accuracy. In this paper, we propose to balance complexity and accuracy by combining the two algorithms in the sample space.

In the proposed algorithm, the hull vectors (i.e. the samples on the boundary) are computed in the *sample space* instead of the *feature space*. This way the computation is much simplified but comparatively less information is preserved. To compensate for such information lose, support vectors are merged with them. Since both support vectors and hull vectors are used, it is called the HV and SV algorithm.

In real world classification applications, the samples stored at local sensor nodes are raw data; therefore feature extraction has to be performed before learning the SVM classifier. The feature extraction method is to be discussed later. At present, we assume that the feature extraction algorithm is available.

Mobile agents should be used for distributed SVM learning in WSN. Otherwise large volumes of raw data have to be transmitted to the manager agents from each relevant observing agent. A mobile agent based distributed SVM learning with the HV and SV algorithm is presented in [Figure 7](#f7-sensors-07-01359){ref-type="fig"}. Note that in the proposed learning scheme, a feature extraction agent is incorporated into the SVM learning agent to extract feature vectors from raw data at local observing agents.

When the global classifier is learned, it can be used to classify new samples observed in the cluster. Usually classification of a target in WSN is also a task that requires collaboration.

### 4.3.2. Collaborative support vector machine classification decision

In real world applications, usually more than one modality of signature is observed. For example acoustic and seismic signatures may be observed for vehicle classification. Therefore there may be several classifiers learned by the manager agent. Each classifier is responsible for classification using one modality of signature. To achieve the best accuracy, classification decisions made from various modalities should be fused.

The fusion is essentially the combination of heterogeneous and homogeneous decisions. The fusion of classification decisions from the same modality is homogeneous, but that of decisions from different modalities is heterogeneous. We propose a hierarchical fusion scheme for such hybrid fusion. Homogeneous decisions are first merged; then the fused decisions from various modalities are further fused.

A distance based fusion is proposed for homogeneous fusion. Suppose a target is estimated to be located at **P***~s~* and there are *m* observing agents $\left\{ OA_{i} \right\}_{i = 1}^{m}$ (located at $\left\{ \textbf{P}_{i} \right\}_{i = 1}^{m}$ respectively) that detect the same modality of signature. The classification decision *f~i~* is made using the signature provided by *OA~i~*. Since measurements at locations closer to the target are generally more accurate, therefore the corresponding classification decisions should be more reliable. Inspired by such observation, we propose a distance based fusion: $$F = \frac{\underset{i = 1}{\overset{m}{\sum}}{w_{i} \cdot f_{i}}}{\underset{i = 1}{\overset{m}{\sum}}w_{i}}$$ $$w_{i} = \frac{1}{\left\| {\textbf{p}_{s} - \textbf{p}_{i}} \right\|}$$

Here *w~i~* is the weight for decision *f~i~*, and *F* is the homogeneously fused decision.

Now that homogeneous fusion has been finished, heterogeneous fusion can be embarked. Generally heterogeneous fusion depends on a priori knowledge of the confidence associated with different modalities. From experience, it is known that different modalities of signatures produce different classification accuracy. A straightforward fusion scheme is placing more confidence on the modalities producing better accuracy. This is achieved by setting larger weights just as the approaches for homogeneous fusion. Suppose there are *k* modalities whose homogeneously fused decisions are *F~r~*(1 ≤ *r* ≤ *k*) respectively. Assume classification accuracy concerning each modality *M~r~* is known a priori and denoted by *A~r~*. Under such assumption, heterogeneous fusion is achieved by $$F = \frac{\underset{r = 1}{\overset{k}{\sum}}{A_{r} \cdot F_{r}}}{\underset{r = 1}{\overset{k}{\sum}}A_{r}}$$

A final remark on heterogeneous fusion is that classification accuracy *A~r~* may be obtained by testing the corresponding SVM classifier with known samples (i.e. whose labels are known a priori).

In the above discussions, it is supposed that the feature extraction method is available. In the following section, it will be shown how the features are extracted from raw data.

### 4.3.3. Feature extraction with wavelet packet

Feature extraction is problem specific varying from application to application. That is why it is supposed to be available in the preceding discussion. In this paper, we focus on extracting features from acoustic and seismic signatures.

To extract their features, the characteristics of acoustic and seismic signals have to be investigated first. A real world seismic signature is presented in [Figure 8](#f8-sensors-07-01359){ref-type="fig"}. Obviously the signature shown are noticeably noised and non-stationary. The transient characteristics of the observed signature make classical spectral methods like Fourier transformation unsuitable for efficient analysis. In \[[@b25-sensors-07-01359]\], it is proposed to use wavelet packet decomposition (WPD) for feature extraction. WPD provides detailed information of a transient signature in both time and frequency domain by decomposing it into several successive sub-band signals. An energy based WPD feature extraction method is proposed in this paper following the same WPD principle in \[[@b24-sensors-07-01359]\]. It is briefly summarized as follows.

First the signature is decomposed by WPD using the wavelet packet db4 at level 3. This results in 8 consecutive sub-band signals, denoted by *S*~3~*~i~*(*t*),(*i* = 1, 2, ... 8) respectively. Then energy *E~i~* of *S*~3~*~i~*(*t*) is calculated by *E~i~* = ∫ \|*S*~3*i*~(*t*)\|^2^ *dt*. Finally the feature vector is constructed by combining energy of these sub-bands as *F\'* = \[*E*~1~, *E*~2~, ... E~8~\]. Practically *F\'* is usually normalized to *F* = *F\'*/max(*F\'*). The decomposed sub-band signals of the signature in [Figure 8](#f8-sensors-07-01359){ref-type="fig"} are shown in [Figure 9](#f9-sensors-07-01359){ref-type="fig"}. In the figure, *S*~1~ is the sub-band signal of the lowest frequency and *S*~8~ is the highest. Energy distribution among these frequency bands varies with the type of the target that generates the seismic vibration; therefore feature vectors composed of the sub-band energy can represent the characteristics of the target.

In the formulation of agent collaborative localization and classification algorithms, some approaches and methods are intuitively proposed (not theoretically established). Real world target localization and classification experiments are required to evaluate their validity.

5.. Experiments
===============

5.1.. Experimental setup
------------------------

In this section the proposed agent collaborative algorithms are evaluated in a real world WSN deployment for vehicle localization and classification. The experiments are carried out on a schoolyard. Big *toy tanks* and *jeeps* are used to simulate real vehicles. The WSN comprises 8 MICAz motes from MICAz mote developer\'s kit (a commercial product of Crossbow Inc.) \[[@b26-sensors-07-01359]\]. The MICAz is a 2.4GHz, IEEE 802.15.4 compliant module used for enabling low-power, wireless sensor networks. The mote offers sensor boards that can measure signatures such as acoustic, acceleration and so forth \[[@b26-sensors-07-01359]\]. In the experiments, acoustic signatures are measured by the acoustic sensors provided by the MICAz sensor board. However the mote is not equipped with sensors for seismic signatures; therefore seismic sensors are artificially connected to the mote through its sensor board interface. Moreover the MICAz motes are programmed to sample at the frequency of 1.024 kHz to accommodate acoustic and seismic signatures of high frequency.

In the experiment, the 8 MICAz motes are randomly deployed on the schoolyard as illustrated in [Figure 10](#f10-sensors-07-01359){ref-type="fig"}. As shown in the figure, the 8 motes denoted by s1, s2 through s8 are deployed within an area approximately in the size of 26*m*×36*m*. Their corresponding *x* and *y* coordinates in the Cartesian coordinate system are marked in the parentheses. The star in the figure denotes an imaginary target.

Following the proposed heterogeneous agent architecture, s1 through s7 are configured to be observing agents and s8 is programmed to take the role of a manager agent. Meanwhile s8 is connected to a laptop, which therefore also serves as the interface agent. In this configuration, the system can be viewed as a miniature implementation of the proposed heterogeneous agent architecture, though only 8 sensor nodes are available.

A final remark on the deployment is that s8 will not participate in measurements of any kind. It is solely responsible for coordination of the observing agents and dispatch of mobile agents.

5.2.. Agent collaborative vehicle localization experiments
----------------------------------------------------------

In the localization experiment, the vehicle is a toy tank emitting loud sound. It is kept stationary during the localization. Nevertheless it must be clarified that the proposed method is equally applicable to localization of moving vehicles. In one experiment, the vehicle is deployed at a position whose Cartesian coordinates are (*-4, 3*). This is exactly where the target is in [Figure 10](#f10-sensors-07-01359){ref-type="fig"}. The acoustic signatures measured by microphone sensors at s1, s2 and s3 (shown as examples) are shown in [Figure 11](#f11-sensors-07-01359){ref-type="fig"}. The signatures have all been processed to eliminate the influence of sensor gain discrepancy.

Following the proposed localization algorithms, s1, s2, s3 and s5 (reporting the *highest* average energy) are selected to collaborate. The average energy and the positions of these observing agents are used to determine the objective function [(20)](#FD20){ref-type="disp-formula"}. The steepest descent search is carried out by the manager agent s8. The search result is reported in [Figure 12](#f12-sensors-07-01359){ref-type="fig"}. In the search, the termination condition is set to be 0.005, while the maximum search step is assigned to be 100. Numerical calculation shows no relaxation of termination condition is needed. The search starts from the position of s1 which reports the highest average energy. It takes only *10* steps to converge to the estimated location (*-4.89, 2.52*). The estimate is 1.05m away from the true position. The distance between s1 and the target is 10.97m, therefore the relative localization error is no more than 1.05/10.97×100%=9.57. This result proves the proposed agent collaborative algorithm can efficiently perform vehicle localization in WSN.

As pointed out in the formulation of the agent collaborative algorithm, the selection of agents involved in the objective function [(20)](#FD20){ref-type="disp-formula"} is actually by intuition. To compare with the intuitive approach an experiment using the 4 agents giving the lowest average energy is conducted. The result is shown in [Figure 13](#f13-sensors-07-01359){ref-type="fig"}. As shown in the figure, s4, s5, s6 and s7 (reporting the *lowest* average energy) are chosen for collaboration and the search is started from s5 (reporting the highest average energy among the 4 agents). It takes 11 steps to converge to the estimated location (*-3.07, 1.91*) which is 1.43m away from the actual position. Again no relaxation of termination condition is deed.

Note that the proposed algorithm needs 10 steps and the estimated position is 1.05m from the true location. By comparison, localization using the 4 agents with the highest average energy requires less search steps and provides better localization accuracy. Therefore the proposed search method is time efficient and accurate. Further evaluation of the proposed search method (i.e. searching with the agents reporting highest average energy) is carried out by localizing vehicles randomly positioned within the sensor field as shown in [Figure 14](#f14-sensors-07-01359){ref-type="fig"}.

As shown in [Figure 14](#f14-sensors-07-01359){ref-type="fig"}, [9](#f9-sensors-07-01359){ref-type="fig"} locations (denoted by T1 through T9, and marked by stars) are randomly chosen. Their corresponding estimated locations are denoted by E1 through E9 respectively (marked by diamonds). It shows that the algorithm can accurately localize vehicles at randomly selected position. Note that some of the localization results (like E1, E3, E6 and E8) are more accurate than others. This is due to differences in the relative positions between deployed sensor nodes and the vehicles.

The efficiency and accuracy of the proposed agent collaborative localization algorithm has been validated by these experiments. Its good localization accuracy also benefits the agent collaborative classification because the proposed homogeneous classification decision fusion is based upon the estimated position of the target.

5.3.. Agent collaborative vehicle classification experiments
------------------------------------------------------------

The vehicle classification experiments are performed using the same deployment in [Figure 10](#f10-sensors-07-01359){ref-type="fig"}. The vehicles to be classified are either toy tanks or jeeps. To achieve better classification accuracy, both acoustic and seismic signatures are observed by MICAz motes. In our implementation, s1, s3, and s5 are programmed to measure acoustic signatures, while s2, s4 and s6 are configured to measure seismic signals. Once again s8 serves as the manager agent and interface agent. Note that s7 is not used. Such choice is to maintain the equilibrium between agents measuring acoustic signatures and the ones measuring seismic signatures.

Learning samples are prepared in a supervised approach. Different vehicles are placed at various positions. The seismic and acoustic signals are accordingly measured and stored by corresponding observing agents. Meanwhile an operator determines the vehicle type and instructs the manager agent to send vehicle type information to the observing agents. This ensures the locally gathered samples are correctly labeled. All sampling lasts for 2 seconds. Recall that the sampling frequency is 1.024 kHz; therefore each sample contains 2048 sample points.

When samples are prepared, the proposed distributed SVM learning can be started. Mobile agents are sent from the manager agent s8 to observing agents s1 through s6 to extract features, learn local SVM classifiers and compute hull vectors. Radial basis function (RBF) is used as the kernel for SVM learning.

Typical acoustic features of toy tanks and jeeps are demonstrated in [Figure 15](#f15-sensors-07-01359){ref-type="fig"}. In the figure, Sn denotes the nth component of the feature vector and normalized energy is expressed in logarithm coordinate. Evidently the features make these two types of toy vehicles distinguishable, but such features are more than enough to separate toy tanks from jeeps. For example, the first component s1 is identical for both vehicles; therefore it contributes extremely little, if any at all, to the discrimination of the vehicles. Following the same principle, components s4, s5 and s6 are negligible too, because these components don\'t vary much for two vehicles. In this way an 8-dimensional feature vector is reduced to a 4-dimensional one. As a result it decreases the computational expense of both SVM learning and hull vectors. Furthermore the resulted support vectors and hull vectors are significantly reduced in number. Similarly the seismic features are also reduced to 4-dimensional ones.

Now that feature vectors are extracted from raw data and artificially reduced, they can be used to learn local SVM classifiers and calculate corresponding hull vectors. The samples at each observing agent are split into two parts, one for SVM training and the other for testing. The sample splitting and performance of learned SVM are listed in [Table 1](#t1-sensors-07-01359){ref-type="table"}. In [Table 2](#t2-sensors-07-01359){ref-type="table"}, the statistics concerning derived support vectors and hull vectors are reported.

In [Table 1](#t1-sensors-07-01359){ref-type="table"}, 'T' denotes a toy tank and 'J' refers to a toy jeep. 'Training\#' and 'Testing\#' are the numbers of samples used to train and test the SVM classifiers respectively. Accuracy shows how well the learned SVM classifies the testing samples. Obviously SVM classifiers learned from different samples (even if they are of the same modality) present contrasting accuracy. This is not unusual, because as said above, each observing agent can only observe a portion of the whole characteristics of a target. That is also why agent collaboration is needed to enhance classification accuracy.

In [table 2](#t2-sensors-07-01359){ref-type="table"}, 'SV\#' denotes the number of support vectors (SV), 'HV \#' means the number of hull vectors (HV). 'HSV \#' refers to the number of the vectors in the union of support vectors and hull vectors. We are most interested in the difference between SV\# and HSV\#. Because SV\# indirectly represents the transmitted data volume for the SV only algorithm and HSV \#corresponds to that of the HV and SV algorithm. In all cases, HSV\# is larger than SV\#, which is expected by theoretical analysis. Accordingly the HV and SV algorithm consumes more energy for communication between the manager and observing agents. As noted before, hull vectors are incorporated to improve distributed learning accuracy. Now let us turn to see its learning performance as shown in [Table 3](#t3-sensors-07-01359){ref-type="table"}.

In the table, 'Centralized' refers to the traditional centralized learning algorithm that sends all samples to a central point and learns the global SVM classifier accordingly. Evidently the centralized algorithm performs the best for both modalities, because it has access to all available samples. The HV and SV algorithm is almost as good as the centralized algorithm. In contrast, the SV only algorithm performs much worse than the centralized. For acoustic features, it is nearly 7% worse than the centralized. For seismic, it is almost 10% worse in performance.

Therefore as far as learning accuracy is concerned, the HV and SV algorithm proposed in this paper is superior to the SV only algorithm. However just as shown in [Table 2](#t2-sensors-07-01359){ref-type="table"}, the accuracy improvement is at the cost of increase in communication load. Usually such tradeoff is desirable, because in classification applications, accuracy is of the highest priority compared to other factors like energy consumed by wireless communication.

Furthermore it should be noted that data transmission has been drastically decreased by mobile agents. Feature extraction and the HV and SV algorithm both perform data compression. Take transmission of raw data of s1 for example. All together, 624kByte raw data have to be transmitted (note that, a double point takes 4 bytes; each raw sample is 2048\*4 bytes; there are 40+38 samples all together). However, for the HV and SV algorithm using mobile agents, only 0.248kByte data (volume of the derived 4-dimensional hull vectors and support vectors) need to be transmitted. Even if dispatch of mobile agents is taken into account, the data transmission is still much smaller than 624kBytes.

Now that global SVM classifiers have been learned at the manager agent using acoustic and seismic features respectively, they can be used to classify unknown targets detected in the sensor field.

The classification of an unknown target is relatively easier than the learning of the classifier itself. When a target is detected and located, the manager agent instructs the observing agents to measure either acoustic or seismic signatures. Then mobile agents for feature extraction are sent to these observing agents. The extracted features are sent back to the manager agent where homogeneous and heterogeneous fusions are carried out to make the fused classification decision.

In the experiment, s1, s3 and s5 measure acoustic signature; s2, s4 and s6 observe seismic signatures. A toy tank is place at position *(-4,-5)* whose estimated position is *(-5.3, -4.3)*. The homogeneous and heterogeneous fusion results are presented in [Table 4](#t4-sensors-07-01359){ref-type="table"} following the proposed fusion algorithms.

In the table, the weight for homogenous fusion is determined following [(23)](#FD23){ref-type="disp-formula"} but normalized. The modality weight for heterogeneous fusion is determined upon their classification performance. In this experiment, as shown in [Table 3](#t3-sensors-07-01359){ref-type="table"}, the classification accuracy is 93.59% (using the HV and SV algorithm) for acoustic modality and 83.33% for seismic modality. Therefore the normalized modality weight for acoustic classification is 93.59% / (93.59%+83.33%) =0.529. The seismic modality weight is similarly calculated.

According to the decision rule, a positive decision means a toy tank while a negative one means a toy jeep. For acoustic classification, s1 and s3 believe the target is a toy tank, but s5 reports it as a toy jeep. Disputes arise and fusion needs to be made to form a more reliable decision. The situation is similar for seismic classification. Homogeneous fusion results are further fused following [(24)](#FD24){ref-type="disp-formula"} and the final decision is 1.0638. It means the global fusion decision is a toy tank. Such decision is in accordance with the truth, for it is known a priori that the target is a toy tank.

The fusion results in [Table 4](#t4-sensors-07-01359){ref-type="table"} show that local decision may be incorrect, but following the proposed fusion algorithm a reliable global decision is obtained. Therefore the proposed method is efficient to perform hierarchical fusion of both homogenous and heterogeneous decisions.

As corroborated by the experiment results, the proposed heterogeneous agent architecture significantly facilitates designs of WSN and remarkably reduces in-network communication load. With this architecture, the proposed localization and classification algorithms are easily implemented and prove to be accurate and energy efficient.

6.. Conclusions
===============

This paper proposes to model WSN as a heterogeneous agent system. With this architecture, target localization and classification tasks are implemented through agent collaboration. The developed agent system is basically a 4 level hierarchical multi-agent system where mobile agents are employed when necessary and beneficial. Both target localization and classification tasks in WSN essentially require some kinds of collaboration. As shown in the paper, it is very convenient to achieve such collaboration through the proposed agent architecture. Practically various forms of collaboration are possible. Therefore much effort in the paper is devoted to develop the appropriate collaboration mechanisms. These mechanisms should provide desirable accuracy and at the same adapt to WSN constraints like limited power supply and bandwidth. Based upon this rationale, energy based acoustic localization by multi-agent collaboration is proposed, because it requires less in-network communication. In the proposed SVM classification method, hull vectors are used to guarantee good accuracy and meanwhile keep communication load as low as possible. The integration of mobile agents drastically reduces data exchange by transmitting codes instead of raw data. As confirmed by the experiment results, the heterogeneous agent architecture remarkably simplifies application designs and collaborative algorithm implementations. It is also proved that the proposed agent collaborative algorithms for localization and classification are accurate and energy efficient.

This paper is supported by the National Grand Fundamental Research 973 Program of China under Grant No.2006CB303000 and National Natural Science Foundation of China under Grant No.60673176, No.60373014 and No.50175056.

![Convex hulls of samples in the feature space for SVM.](sensors-07-01359f1){#f1-sensors-07-01359}

![Divide and conquer algorithm to compute the convex hull (in 2-dimensions).](sensors-07-01359f2){#f2-sensors-07-01359}

![Heterogeneous agent architecture for WSN.](sensors-07-01359f3){#f3-sensors-07-01359}

![Illustrative WSN deployment with the heterogeneous agent architecture.](sensors-07-01359f4){#f4-sensors-07-01359}

![Agent collaborative localization algorithm.](sensors-07-01359f5){#f5-sensors-07-01359}

![Steepest descent search algorithm with termination condition relaxation.](sensors-07-01359f6){#f6-sensors-07-01359}

![HV and SV algorithm for distributed SVM learning with mobile agents.](sensors-07-01359f7){#f7-sensors-07-01359}

![Seismic signal observed by a seismic sensor in a real world WSN deployment.](sensors-07-01359f8){#f8-sensors-07-01359}

![Wavelet packet decomposition of the seismic signal shown in [Figure 8](#f8-sensors-07-01359){ref-type="fig"}.](sensors-07-01359f9){#f9-sensors-07-01359}

![Deployment of MICAz motes on the schoolyard for vehicle localization and classification.](sensors-07-01359f10){#f10-sensors-07-01359}

![Acoustic signatures measured by microphones at s1, s2 and s3.](sensors-07-01359f11){#f11-sensors-07-01359}

![Vehicle localization by collaboration between s1, s2, s3 and s5.](sensors-07-01359f12){#f12-sensors-07-01359}

![Vehicle localization by collaboration between s4, s5, s6 and s7.](sensors-07-01359f13){#f13-sensors-07-01359}

![Agent collaborative localization of randomly positioned vehicles in the sensor field.](sensors-07-01359f14){#f14-sensors-07-01359}

![Typical acoustic features of the toy tank and toy jeep using wavelet packet decomposition.](sensors-07-01359f15){#f15-sensors-07-01359}

###### 

Local learning with acoustic and seismic features.

  Observing Agents   Training\#   Testing\#   Accuracy                 
  ------------------ ------------ ----------- ---------- ---- -------- --------
  Acoustic           s1           40          38         42   36       92.31%
  s3                 41           37          41         37   89.74%   
  s5                 42           36          40         39   83.33%   
  Seismic            s2           39          36         43   35       82.05%
  s4                 40           35          38         40   76.92%   
  s6                 38           37          39         39   78.21%   

###### 

The numbers of support vectors, hull vectors and their unions.

  Observing Agents   SV\#   HV\#   HSV\#                  
  ------------------ ------ ------ ------- ---- ---- ---- ----
  Acoustic           s1     29     13      26   22   36   26
  s3                 35     9      30      26   38   26   
  s5                 29     13     26      22   36   26   
  Seismic            s2     17     17      28   19   32   25
  s4                 19     19     24      25   32   32   
  s6                 18     18     24      24   32   30   

###### 

Learning performance of different algorithms and modalities.

  Learning Algorithm   Training\#   Testing\#   SV\#   Accuracy   
  -------------------- ------------ ----------- ------ ---------- --------
  Acoustic             SV only      126         234    41         88.46%
  HV and SV            188          234         35     93.59%     
  Centralized          156          312         64     95.19%     
  Seismic              SV only      108         234    108        74.79%
  HV and SV            183          234         93     83.33%     
  Centralized          156          312         64     84.29%     

###### 

Fusion results of agent collaborative classification decisions.

  ---------------------------------------------------------------------------------
  Modality   Modality\   Agent    Homogeneous Fusion   Hetero-\            
             Weight                                    geneous\            
                                                       Decision            
  ---------- ----------- -------- -------------------- ---------- -------- --------
  Acoustic   0.529       s1       1.6405               0.2459     1.1692   1.0638

  s3         2.2360      0.5344                                            

  s5         -1.9544     0.2196                                            

  Seismic    0.471       s2       0.9673               0.4894     0.9455   

  s4         1.8766      0.3373                                            

  s6         -0.9279     0.1733                                            
  ---------------------------------------------------------------------------------

[^1]: E-mail: <bdw02@mails.tsinghua.edu.cn>;

[^2]: E-mail: <dintliang03@mails.tsinghua.edu.cn>;

[^3]: E-mail: <wang_sheng00@mails.tsinghua.edu.cn>
