• No results found

6.3 Single Node Model

6.3.3 Power Supply Failure Model

The maximum temporal horizon of life for a node of a WSN is determined from the

time-to-failure of its batteries.

The behavioral description of batteries is a complex problem because of the non- linearity between the voltage and remaining charge. This non linearity is strongly

emphasized especially when the discharge current is not constant (as it happens for

a node of a WSN). For an ideal generator of voltage, the voltage V(t) of the battery is constant on all the period of discharge and is equals to Voc(open circuit voltage )

until the energy of the batteries is exhausted; after this point, a discontinuity in the voltage to the terminals of the batteries is generated, making the voltage drop from

Vcutof f 3 to zero.

An other factor that generates not-linearity in the characteristic of discharge of the battery is the charge ”recovery effect”. This effect is due to transient current re-

quests: a rapid current request causes the depletion of the electrical charges from

the electrode, with a consequent drop in the voltage. If the request is massive, then the voltage may drop below the Vcutof f, causing the temporary unavailability of the

batteries, and hence a temporary shutdown of the node. Nevertheless, after a given

amount of time, the charge will again move from the electrolyte to the electrode,

3It is the voltage in which the battery does not succeed to distribute current on any load, included

thus, making the node again available. This effect is closely dependent on the nature of the battery, and for lithium battery it can be neglected.

In WSN nodes, batteries are not directly connected to the load: a so called DC-DC

converted is usually used to stabilize the voltage to the clamps of the load, but at the price of a reduced overall life of the device due to conversion inefficiencies4.

Mathematical model

In this thesis, power supply stage is assumed to be composed by batteries and by the DC-DC converter ,in a unique black-box, so that the voltage of the batteries can be

considered constant in the interval (Voc, Vcutof f−dc).

In this model the battery is considered as a ”tank” of known capacity, from which it is possible to drain energy. The maximum capacity of the battery is assumed to

be constant, without considering the effects capacity lessening due to the current

request: this choice is reasonable due to the negligible current absorption for the nodes (about 5-15 mA). The energy supplied by the batteries, represents a starting

point in the model and it is calculated as follows:

Ebatt= Vcc· 3600 s

h · Cef f Batt (6.1)

where:

• Vcc=voltage;

4They rise the V cutoff.

• Cef f Batt=Total battery capacity really usable by a load and expressed in Ah5.

The remaining capacity of the batteries after a t∗ seconds long operation, measured in Ah, is expressed by the following equation:

U = U−

 to+t∗ t0

I(t)dt (6.2)

where:

• U is the remaining capacity as result from the previous calculation step, and

measured in Ah;

• I(t) is the current drained from the batteries at time t, measured in A;

The equation above 6.2 can also be expressed in terms of the energy requested from the batteries, expressed in Joule, or in other words:

U = U− 3600s h  to+t∗ t0 E(t) Vcc dt + R(e) (6.3)

where R(e) is the non linear function of the charge recovery effects of the batteries,

represented as a decreasing exponential function of the state of charge of the battery [127].

Power consumption assumption

The batteries model can be easily achieved from the 6.2, assuming that:

• the integration interval is small enough to consider the energy consumption

constant;

• the voltage of the battery is constant, since we suppose that the load (the node)

does not absorb excessive current to cause drop of voltage on DC-DC converter;

Under these assumptions the Equation 6.3 can be expressed with respect to the

Energy E as:

E = E− EΔt +  (6.4) with  being the contribution of the charge recovery effect function. From the previous

Figure 6.8: Finite state automata relative to the battery model

assumptions it is correct to consider that the ”state of charge” of the battery can be considered as the remaining energy. That allows to model the above equation

by means of the automata outlined in Fig. 6.8. N is assumed to be the number of

charge units that can be drained from the battery under constant discharge. In the proposed schema, every request for discharge of i energy unit causes a transition in

(a)

(b)

Figure 6.9: (a) SAN model of the Power Supply FM; (b) Output gate definition of

charge drawn.

recovery causes transitions in the opposite sense.

San Model

Figure 6.9.(a). shows the SAN model of the power supply component. It models

stuck-at-zero and reset failures of a single node, by considering the natural battery

discharge process, charge recovery effect and anomalous energy requests due to hard- ware faults.

Node’s natural battery discharge process can be thought as the sum of two main

contributions: i) processing activity, including CPU, I/O devices (e.g., leds), and sensing hardware, and ii) radio activity. T Node activity is considered as the alter-

through a timed deterministic action (wake up). At each awakening, the output gate charge drawn drains the energy requested by the processing activity (see Figure

6.9.(b)).

The other contribution (radio activity) is modeled in the Routing model. In particular, a proper amount of energy is drained every time a packet is sent, received

or forwarded, depending on the current radio power being used, and on the size of

the packet.

As reported in Figure 6.9.(b), the charge drawn output gate is in charge of modeling

stuck-at-zero and reset failures. A stuck-at-zero occurs when the residual charge is not sufficient to satisfy the processing request. Hence a token is placed in the

battery failed place. A reset is instead caused by anomalous energy requests due to

temporary hardware faults. As shown in [86], these faults can be modeled as a Weibull stochastic process. When this activity fires, a token is moved in the inducedReset

place. Figure 3.b also shows how model parameters (such as the energy consumption

aliquot) can be gathered from the Changes Manager.

Finally, the model also takes into account nonlinear phenomena due to the so-called

energy “recovery effect” [128], which is typical of several battery technologies (e.g.,

nickel metal hydride), apart from lithium batteries. The effect is modeled through a timed action (battery recovery). When the action fires, the remaining charge is

increased of a quantity which value depends on the adopted battery technology.

We validate the battery model by simulating a single node model and no failures. In this test, the Mica2 platform [23] is considered, achieving a 170 hours node lifetime,

against the 172 hours lifetime measured on a real stand alone node running a simple broadcast counter application, as reported in [129, 16].