Page 1

Hidden Markov Model Based Classification Approach for Multiple

Dynamic Vehicles in Wireless Sensor Networks

Ahmad Aljaafreh, Student Member, IEEE and Liang Dong, Senior Member, IEEE

Abstract—It is challenging to classify multiple dynamic

targets in wireless sensor networks based on the time-varying

and continuous signals. In this paper, multiple ground vehicles

passing through a region are observed by audio sensor arrays

and efficiently classified. Hidden Markov Model (HMM) is

utilized as a framework for classification based on multiple

hypothesis testing with maximum likelihood approach. The

states in the HMM represent various combinations of vehicles

of different types. With a sequence of observations, Viterbi

algorithm is used at each sensor node to estimate the most

likely sequence of states. This enables efficient local estimation

of the number of source targets (vehicles). Then, each sensor

node sends the state sequence to a manager node, where a

collaborative algorithm fuses the estimates and makes a hard

decision on vehicle number and types. The HMM is employed

to effectively model the multiple-vehicle classification problem,

and simulation results show that the approach can decrease

classification error rate.

I. INTRODUCTION

W

geographical area, where each sensor node has a restricted

computation capability, memory, wireless communication,

and power supply. In general, the objective of WSNs is to

monitor, control, or track objects, processes, or events [1].

Fig 3 shows a one cluster of WSN. In WSNs, observed

data could be processed at the sensor node itself; distributed

over the network; or at the gateway node. Most often, nodes

are battery-powered which makes power the most significant

constraint in WSNs . The power consumed as a result of

the typical data processing tasks executed at the sensor

nodes is less than the power consumed for inter-sensor com-

munication. This motivates researches and practitioners to

consider decentralized data processing algorithms more than

the centralized ones. Multiple-target classification in Multiple

moving target classification is a real challenge [2] because of

the dynamicity and mobility of targets. The dynamicity of the

targets refers to the evolution of the number of targets over

time. Furthermore, limited observations, power, computa-

tional and communication constraints within and between the

sensor nodes make it a more challenging problem. Multiple

target classification can be modeled as a Blind Source Sepa-

ration (BSS) problem [3]. Independent Component Analysis

IRELESS Sensor Network (WSN) is, by definition,

a network of sensor nodes that are spread across a

This work was supported in part by the DENSO North America Founda-

tion and by the Faculty Research and Creative Activities Award of Western

Michigan University.

A. Aljaafreh and L. Dong are with the Department of Electrical and

Computer Engineering, Western Michigan University, Kalamazoo, MI 49008

USA (e-mail: ahmad.f.aljaafreh@wmich.edu, liang.dong@wmich.edu).

(ICA) can be utilized for such a problem. Most of the recent

literature assumes a given number of sources; thus, making

the aforementioned challenge easier to solve. Unfortunately,

this assumption is unrealistic in many applications of wireless

sensor networks. Some recent publications decouple the

problem into two sub-problems, namely: the model order

estimation problem and the blind source separation problem.

Ref.[4] discusses the problem of source estimation in sensor

network for multiple target detection. In the literature, many

researchers utilized ICA for source separation while others

utilized statistical methods as in [5] where the authors pre-

sented a particle filtering based approach for multiple vehicle

acoustic signals separation in wireless sensor networks. The

previously mentioned techniques are based on data fusion.

In these techniques, each sensor node detects the targets,

extracts the features and sends the data to the manager

node. The manager node is responsible for source separation,

number estimation, and classification of the sources. The

computation and communication overhead induced by such

a centralized approachs inadvertently limits the lifetime of

the sensor network.

Classification of multiple targets without signals or sources

separation based on multiple hypothesis testing is an efficient

way of classification [6]. Ref. [7] proposed a distributed

classifiers based on modeling each target as a zero mean

stationary Gaussian random process and so the mixture sig-

nals. A multi hypothesis test based on maximum likelihood

is the base of the classifier. In this paper, we are proposing

an algorithm to classify multiple dynamic targets based on

HMM. HMM decreases the number of hypothesis that is

needed to be tested at every classification query. Which

decreases the computation overhead. On the other hand,

emerging hypothesis transition probability with hypothesis

likelihood increases the classification precision. The remain-

der of this paper is organized as follows. Section 2 formulate

the problem mathematically. Section 3 describes modeling

the problem as HMM. Simulation environment is described

in Section 4. Section 5 presents the results and discussions.

And finally conclusions are described in section 6.

II. PROBLEM FORMULATION

Multiple ground vehicles as multiple targets are to be

classified in a particular cluster region of a WSN. In this

paper, any vehicle that enters the cluster region is assumed

to be sensed by all the sensor nodes within this cluster.

Each sensor node estimates the number and types of vehicles

currently present in the region and the final decision is made

540 978-1-4244-6452-4/10/$26.00 ©2010 IEEE

Page 2

collectively by all the sensor nodes within the region. We

assume that the maximum number of distinct vehicles that

may exist in one cluster region at the same time M is known.

Then the number of hypotheses is N = 2M. The hypotheses

correspond to the various possibilities for the presence or

absence of different vehicles. Let hi denote hypothesis i,

i = 0,...,N −1. Observation xkis a feature vector obtained

by a sensor node at time k. The feather vector can be related

to the spectrum of a mixture of maximum M vehicle sounds.

According to Bayes theorem, hiis the maximum likelihood

hypothesis given xkif p(hi|xk) > p(hj|xk),∀i ?= j. So far, the

decision about the hypothesis at any given event is based on

the observation at that event without any relation with the

previous observations as in [7]. In fact, the class to which

the feature vector xibelongs to also depends on the previous

event class. The classification decision at any instant of time

depends on the previous decision and the current observation.

Therefore, the classification problem is a context dependent

problem and it can be modeled by HMM.

In context-dependant Bayesian classification, a sequence

of decisions is needed instead of a single one, and the

decisions depend on each other. Let X : {x1,x2,...,xt}

be a sequence of feature vectors of observations. And let

Hi: {hi1,hi2,...,hit} be a sequence of classes. According

to Bayes theorem, X is classified to Hiif

p(Hi|X) > p(Hj|X),∀i ?= j.

(1)

p(Hi|X)(><)p(Hj|X) ≡ p(X|Hi)p(Hi)(><)p(X|Hj)p(Hj)

where (><) denotes comparing and ≡ denotes equivalent

to. According to the Markov chain model,

(2)

p(Hi) = p(hi1)

N

?

k=2

p(hik|hik−1)

(3)

We assume that {xi} are mutually independent and so are

the probability distributions of the classes. Therefore,

p(X|Hi) =

N

?

k=1

p(xk|hi)

(4)

Based on Equ. 2, 3, and 4, we have

p(X|Hi)p(Hi) = p(hi1)p(x1|hi1)

N

?

k=2

p(hik|hik−1)p(xk|hik)

(5)

It is computationally expensive to find the maximum value

of equation (5) in brute-force task. Thus, Viterbi algorithm

is appropriate to solve such a problem of HMM. Given a

sequence of observation the most likelihood classes is corre-

sponded to the optimal path. We define the cost of transition

from hypothesis hikto hypothesis hik−1as d(hik,hik−1)

d(hik,hik−1) = p(hik|hik−1)p(xk|hik)

d(hi1,hi0) = p(hi1)p(xi|hi1)

(6)

(7)

Feature vector of observation of each class i is modeled as a

multi variate normal distribution with mean and covariance

matrix known. The maximum cost corresponds to the optimal

path. The hypotheses along the optimal path result in the

observation sequence X. Based on Bellman’s principle the

cost in Equations (6) and (7) can be computed online.

III. HIDDEN MARKOV MODEL

HMM has a specific discrete number of unobserved states,

each state has a transition probability to any other state

and an initial probability. The last parameter of HMM is

the probability density function of the observation for each

state. The state parameters of the HMM are the numbers of

targets of each class. For instance, if we have two classes

and the maximum number of sources that can be sensed by

any sensor at any instant of time is three, then the number

of states are eight if the targets are distinct, and ten if not

distinct as in Fig. 1. T, W, and 0 represent class T, class

W, and no vehicle respectively. Each state represents the

number of targets for each class. For instance state TTW

means that there are two targets of class T and one target

of class W. We assume that the states are equiprobable. This

assumption is a reasonable one since it will be the worst

scenario compared to trained ones. This means that the state

transition probabilities will be equal for all possible states as

in Table I. Therefor the initial probabilities are as follows

Pi(00T) = Pi(00W) = Pi(000) =1

Other states initial probabilities are zeros, since we assume

that there will one change at a time. Which means that the

vehicles enter and exit from the sensor range in a dynamic

manner. So the sensor observe one vehicle or nothing at

time zero then it goes to possible states as in Fig. 1. This

assumption is reasonable because it will approach to the

right hypothesis even two vehicles or more enter the sensor

range at the same time. It misclassifies it in the first step

as one of the initial sates, but it will classify it correctly in

the second step. Such cases have a very low probabilities.

All of the above contributes in decreasing the computation

overhead for multiple hypothesis testing, because the only

hypotheses that need to be tested depend on the transition

probabilities. So there is no need to test a hypothesis that has

zero transition probability. The important parameter of HMM

is the output probability density function of each state. This

distribution is assumed as a multi variate normal distribution

with mean and covariance matrix that are estimated based

on maximum likelihood. Mixture of different sources is

generated by simulation. The maximum of Equations (6)

for all hypothesis at every stage is the maximin likelihood

hypothesis. Simulation results show that the correct classifi-

cation error based on our solution is less than classification

with maximum likelihood without modeling the problem as

a context dependant classification problem.

3

IV. SIMULATION ENVIRONMENT

We developed our simulation environment using Matlab

for one network cluster region (300 × 300) as in Fig. 2.

541

Page 3

Fig. 1.

for mixtures signals of three maximum targets number

HMM states flow diagram for two classes. Class T and class W

TABLE I

STATE TRANSITION PROBABILITY

States

000

00T

00W

0TW

0TT

0WW

TTT

TTW

TWW

WWW

000

0.33

0.25

0.25

00T

0.33

0.25

00W

0.33

0TW0TT 0WWTTT TTWTWWWWW

000

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0 0.25

0.25

0.2

0.25

0 0.25

0.2

0

0

0.25

0

0

0

0

0

0

0

0.20

0

0.2

0.33

0.2

0

0

0

0

0

0

00

0

0

0.33 0.330

0.250 0.2500

0

0.25 0.25

0

0

0

0

0.5

0.33

0

0

0.50

0

0

0

0

0.33

0.33

0

0

0

0.33

0

0

0.33

0.5

0

0

0.33

000.5

Where this cluster is consist of a grid of different numbers of

sensor nodes. Sensing range for all sensor nodes will be the

same. Sensing range is chosen to enable all sensor nodes in

one cluster region to observe the same targets with different

attenuation. The sensing range is represented by a radius

of a circle. When any target enter this circle, the simulator

will pick a random real life vehicle sound according to

the vehicle type. Where the vehicle type and number are

chosen randomly. Then this sound will be attenuated based

on the distance between the target and the sensor node. After

that, a mixture is linearly formed based on the number of

targets. Then each sensor node extracts the feature from the

acoustic signal based on discrete spectrum. This mixture

is classified by each sensor node. Classification decision

is sent to the manger node where decision fusion will be

accomplished. Sensor nodes are deployed uniformity as in

Fig.2. Simulator is built such that multiple targets can enter

the region of simulation from one direction. Entry location

and entry angle are selected randomly. Targets speed and

directions are modeled according to Gauss-Markov mobility

model. Gauss-Markov mobility model parameters are chosen

such that to avoid sharp updates in speed and direction.

Each sensor node calculates the maximum likelihood state

based on HMM at every discrete time t. State transition cost

as in equation (6) is calculated only for states that have

nonzero transition probability as in Fig.1 then the maximum

of all cost is corresponded to the maximum likelihood state

0 50 100150 200250 300

0

50

100

150

200

250

300

Sensor Node

Vehicle One Track

Vehicle Two Track

Fig. 2.Four sensors in one cluster simulation region

Fig. 3.One Cluster of Wireless Sensor Network

or hypothesis.

V. RESULTS AND DISCUSSIONS

in this paper,

lifevehiclesounds

http://www.ece.wisc.edu/sensit. Fig.4 displays the result of

running the simulator hundreds of times. Our experiment

is conducted for two distinct vehicles. Simulation results

that are shown in Fig.4 shows that the correct classification

error rate is declining with the sensor density in both cases

with and without HMM. It is clear that this error is less

in the case of HMM framework. Results are based on

majority voting distributed algorithm for all the sensors

local decisions in the region of interest. All sensors observe

the same number at any instant of time with different

attenuation factors. Fig.4 shows how efficient it is to model

such kind of problem using HMM and solve it by Viterbi

algorithm. HMM based classification approach reduces

the computation overhead for multiple hypothesis testing.

because the only hypotheses that need to be tested are the

ones that have not zero state transition probability. For

Results,

with

are based

that

on simulation

availablereal isat

542

Page 4

0 0.20.4 0.60.81 1.21.41.6 1.8

−4

x 10

0.26

0.28

0.3

0.32

0.34

0.36

0.38

0.4

0.42

0.44

0.46

Sensors Density

Correct classification Error Rate

Without HMM

With HMM

Fig. 4.

classification system with and without HMM framework in one cluster of

WSN.

Performance evaluation of Distributed Maximum Likelihood

distinct targets, the number of hypothesis are 2Mwhere M

is the maximum number of targets that can be exist within

the sensor range at the same time. In our approach only

M + 1 hypothesis need to be tested at each time step.

VI. CONCLUSIONS

In this paper, we propose an idea of modeling a dis-

tributed multiple hypothesis classification problem by HMM.

Classification of multiple dynamic vehicles in WSNs can

be modeled as a context dependant classification problem.

The number of moving vehicles of each class is considered

as the state, and each state depends on the previous state.

This makes it appropriate to model the system with HMM.

Given a sequence of observation, Viterbi algorithm is used to

find the maximum likelihood sequence of states. Simulation

results based on real vehicle sounds show that using HMM

framework decreases the classification error rate. The other

benefit of HMM is the reduction of the computation overhead

for multiple hypothesis testing. The only hypotheses that

need to be tested depend on the state transition probabilities,

therefore the hypotheses that need to be tested are the ones

that have none zero transition probabilities.

REFERENCES

[1] M. Winkler, K.-D. Tuchs, K. Hughes, and G. Barclay, “Theoretical

and practical aspects of military wireless sensor networks,” Journal of

Telecommunications and Information Technology, pp. 37–45, 2008.

[2] M. N. Raghavendra, “Collaborative classification applications in sensor

networks,” 2002.

[3] T.-Y. Sun, C.-C. Liu, S.-J. Tsai, and S.-T. Hsieh, “Blind source sepa-

ration with dynamic source number using adaptive neural algorithm,”

Expert Syst. Appl., vol. 36, no. 5, pp. 8855–8861, 2009.

[4] F. Silva, J. Heidemann, R. Govindan, and D. Estrin, Frontiers in

Distributed Sensor Networks. CRC Press, Inc., 2003.

[5] Y. Kaia, H. Qia, W. Jianminga, and L. Haitao, “Multiple vehicle

signals separation based on particle filtering in wireless sensor network,”

Journal of Systems Engineering and Electronics, vol. 19, no. 3, pp. 440–

446, June 2008.

[6] E. Drakopoulos, J. J. Chao, , and C. C. Lee, “A two-level distributed

multiple hypothesis decision system,” IEEE Trans. Autom. Control,

vol. 37, no. 3, pp. 380–384, Mar. 1992.

[7] J. H. Kotecha, V. Ramachandranand, and A. M. Sayeed, “Distributed

multitarget classification in wireless sensor networks,” IEEE J. Sel.

Areas Commun., vol. 23, no. 4, pp. 703–824, Apr. 2005.

543