Professional Documents
Culture Documents
i
= P[q
1
= S
i
]1 i N (3)
Once given the appropriate values for N, M, A, B,
the Hidden Markov Model can be used to generate an
observation sequence
O = O
1
, O
2
, O
3
, ..., O
T
(4)
where the observation O
t
is one of the symbols from V
and T is the number of observations in the sequence.
In the network model, the output sequence is repre-
sented by a series of binary information that describes if
a packet was successfully sent (1) or if it was lost dur-
ing the transmission (0). The emissions sequence was so
5
chosen because it is intended to model the loss through
the network transmissions.
The rst parameters to be set are the number of hidden
states N and the number of observation symbols M. The
number of hidden states is of crucial importance to the
network model once it happens to be the parameter that
describes the hidden dynamics on it. It means that
every behavior that is related to the noise (the primary
agent that causes losses in the network) is modeled by
the N states in the transition probability matrix A. If
N is too large, it usually results in very complex models,
that could be over tted to the observation sequence. If
it is too small the model could not reproduce the system
accurately.
So that, it is necessary to be aware of the right value
for N which is appropriate to describe the model. The
number of observation symbols M is directly extracted
from the observation sequence and must be equal to the
total of distinct outputs observed in the system.
To the Body Area Network Hidden Markov Model, the
values of Mand Nwere chosen in order to better describe
the packet loss behavior. The observation sequence O is
the discrete series that describe if a packet was lost with
a single binary digit (0, 1). From this, it can be seen that
M = 2.
The number of hidden states N was set to 3. It means
that the network will be modeled according to three
states that describe the state of the channel at each given
time. The hidden states can be labeled as good, bad
and regular. This is a very common way de describe
a network and it also reects the three noise levels de-
termined during the simulation stage (good would mean
very low levels of noise, bad would mean high noise level
and regular would mean a moderate noise rate).
Once the parameters N and M were set, it can be de-
termined the probability of the transitions matrix A and
the probabilities of the observation symbol matrix B. The
transition probabilities (between the hidden states) can
be set in a way that transitions can happen only be-
tween neighboring states. This is a special feature
dened to this network model once it is not likely to the
channel to change it state drastically in short time peri-
ods (its not likely for example, to have a good channel
and then suddenly a bad channel, once this transition
usually happens by passing through the regular state,
even for a short time). The probabilities of the obser-
vation symbols are dened for each hidden states (this
means that each hidden state have a positive probabil-
ity of emitting some of the observation states). Once
at each channel noise level (good, regular and bad)
its possible to one observes successful and unsuccessful
packet transmissions, each hidden state is connected to
each observation state. Figure 3 depicts the described
chain:
FIG. 3. Hidden Markov Model for the Body Area Network.
(a) Hidden states that model the channel noise. (b) Output
states representing the packet transmission result.
Based on the graph seen on the gure, it is possible to
describe an initial probability set to ll up the matrices
A and B. Matrix A will be a 3 x 3 matrix and matrix
B will be a 3 x 2 matrix. It was performed a simulation
in which one can experience dierent noise levels. These
noise were those used during the simulations presented
in the last section (the channel noise can be very low,
low or high). This simulation is also necessary during
the matrix entries estimations, used on Baum-Welch al-
gorithm. The initial transitions and observation symbol
probabilities were chosen in order to minimally describe
the network behavior observed of the simulation. The
initial state distribution was also dened after the sim-
ulation results.
Once the model parameters are dened, it is possible
to estimate its probability matrices (A B) based on the
packet sequence simulation. The simulation results were
treated in order to transform it into a sequence of 0 and
1, where 0 represent a packet loss and 1 represents a
successfully sent packet. This simulation resulted in ve
data series, one for each sensor node. The estimation was
made using Baum-Welch Algorithm.
To estimate the model of a Hidden Markov Model, is
necessary to nd a way that maximize the probability of
an observation sequence, in other words, its necessary to
determine the better model that represents a given obser-
vation sequence. The main problem is that these models
cant be found analytically, so, the better way is to use
an iterative algorithm that estimate these parameters to
a model that give the maximum probability of a sequence
of observations.
The Baum-Welch algorithm is one of the most ecient
methods for automatically estimates the parameters of
Hidden Markov Models. This is a learning algorithm in
which, given an observation sequence and a set of states
of the Hidden Markov Model, it learns the parameters
of this model that are given by the A and B matrices.
Specically, this algorithm learns the transition proba-
bilities A=[a
ij
] and the observation symbol probabilities
B=[b
i
(o
t
)]. To do so, the Baum-Welch algorithm esti-
mate the states iteratively starting with arbitrarily cho-
sen estimates for a
ij
and b
ij
, improving the estimates.
The algorithm outputs the transition probability ma-
trix A and the observation symbol probability matrix B.
6
Both matrices represented the initial guess given accord-
ing to the observed behavior of the simulations. The al-
gorithm was executed over 1000 steps, using as input the
two guessed matrices A and B and a set of ve packet
transmission series (one for each node). The resultant
matrix can be seen next:
It can be seen that once the channel reaches the state
good, it is more likely to transit to other states rather
than continue in this state. Once the channel is good,
the probability of a packet be successfully sent from a
source node to the sink node is much higher (more than
99%) than it be lost through the path. If the channel
is on the regular state, it tends to stay in that (and
eventually go to bad or the good state). In the regular
state, it is a higher probability of delivering a packet to
the sink, than loosing it along the channel. If the network
is in the bad state, the packets are more likely to be lost
and the channel doesnt last longer in this state. Note
that the resultant matrices is also dependent on the rst
guess, so the results could be slightly dierent if other
guesses were made.
The results of Baum-Welch were considered satisfac-
tory once it mostly describes the expected behavior of
the network. Moreover, when it comes to A, it can be
see that it maintained the dened structure as stated in
this section. B was also as expected once it reects the
losses over the network according to the noise levels in
the channel.
In order to determine if the model describes the net-
work, it can be used Viterbis algorithm to generate the
most likely hidden state sequence, given A, B and an
simulation sequence. This is a useful tool to be used in
comparisons between the model and the real network.
By performing this comparison, one can build a con-
vergence percentage that measures how much the two
output sequences are equal. If the series are alike, then
the model can describe the network dynamics.
Once the network data is obtained via simulation, it is
possible to determine in exactly which noise level is the
channel, for every time t. By using this information it is
possible to compare Viterbis algorithm output with the
models output.
After executing Viterbis algorithm and comparing it
with the network noise level series, it was obtained an av-
erage convergence percentage of about 69%. This means
that the model can only describe part of the network dy-
namics, once the most likely sequence of states is only
69% equal to the simulation output. Even though, it is
considered a good model once more than a half of the
states in the sequence were equal. There is a good expla-
nation for this. It is possible that the number of states
in the proposed Hidden Markov Chain is not enough to
describe the full behavior of the network.
Furthermore, by analyzing Viterbis algorithm output,
it can be seen that the model tends to stay in the regular
state and that it usually stays shorter periods in state
good and bad, which was expected, according to the
analysis of the simulation outputs and the matrix A.
Another important factor that could contribute to the
dierence between the two series (from Viterbis algo-
rithm and the simulations output) is the model struc-
ture. Once it only describes the eect of the noise over
the packet loss, the model may (and certainly is) be miss-
ing the eects of the other elements of packet loss (like
nodes position, collisions during transmissions and other
minor eects like bit corruption etc.). This means that at
little fraction of the losses in the input of Viterbis algo-
rithm may happened due to those elements rather than
the channel noise itself. So by this factor, it can be said
that the prediction capability of the model is constrained.
IV. CONCLUSIONS
Based on the procedures executed for this project, and
on the results obtained, it is possible to argue about the
conclusions. The model built to describe the network was
somewhat inaccurate to describe the full network behav-
ior, however it was able to replicate the overall model
characteristics. It can be said that its results are enough
to aid nodes to determine when to send a packet given
the network situation.
The initial analysis was determinant to archive this
model, once it allowed some important assumptions that
are important to keep the simplicity of the model. More
complexes versions of the proposed model can be done by
including states in the Hidden Markov Chain that better
describes the collisions and nodes positions (and possibly
considering nodes movements). Furthermore, despite of
the network model was built based on simulation outputs,
the procedures described here can easily be applied to
real network data in order to make even more accurate
models.
From this, it concludes that the model can be useful
to predict Body Area Network packet losses (with a
moderate success rate) and that Hidden Markov Models
are indeed powerful to describe complex real world
dynamics.
7
V. REFERENCES
[1] A Tutorial on Hidden Markov Models and Selected
Applications on Speech Recognition; Rabenier R. L.
Proceedings of the IEEE. 1989. 77 (1); 257, 278;
[2] Body Sensor Networks, First Edition. Yang G.Z.;
Springer-Verlag London Limited, London, UK, 2006;
[3] Body Area Sensor Networks: Hanson. A.M., Powell.
C.H.. Challenges And Opportunities;Published by the
IEEE Computer Society; 2009; 58, 65;
[4] Introduction to Stochastic Processes, Second Edition.
Lawer F. G. Chapman & Hall CRC, 2006;
[5] Overview of the IEEE 802.15.4/4a standards for low
data rate Wireless Personal Data Networks; Nardis. L.,
Benedetto. M.. Workshop on Positioning, Navigating
and Communication. 2007. 4 (1); 285, 289;
[6] Wireless Body Area Network (WBAN) for Med-
ical Applications; Khan. Y.J., Yuce. R.M.. New
Development in Biomedical Engineering, University of
Newcastle; 591, 627;