**9.1. Hello messages for presence broadcast**

14 Wireless Sensor Networks / Book 1

*qtvx l r*<sup>∗</sup>

, *t*) +

*s*.*t*. (1) *Pvx*, *fx* · *Pvx*+1, *fx* = 0, ∀*vx*, *vx*+<sup>1</sup> ∈ *pathvi*,*vj*

(2) *Pvz*, *fz* · *Pvz*+1, *fz* = 0, ∀*vz*, *vz*+<sup>1</sup> ∈ *pathvi*,*vj*

(3) *Pvx*, *fx* , *Pvz*, *fz* = *max*(*PMIRS*, *PSNR*), ∀*vx*, *vz* ∈ *pathvi*,*vj*

*vx*,*vy*, *f*

*K*−1 ∑ *z*=*g*+1

*L*∗ *vz*,*vz*+1, *fz*

202 Wireless Sensor Networks – Technology and Protocols Cross-Layer Design for Smart Routing in

. (9)

*vx*,*vy*, *<sup>f</sup>* , *t*) = −*ψ*(*E*)

(*r*∗ *vx*,*vx*+1, *fx*

where the effect of minimum energy routing is seen in the third constraint, which enforces

The impact of application criticality on resource allocation will be analyzed by comparing the

In gathering the required node information for the cross-layer policy, we define the state of a

• **Sub-network identifier (SNID)**: the ID of the sub-network (sensor or mesh network) in

• **Energy rating information (ERI)**: the remaining energy of node *vx* in the form of a

• **Surrounding interference temperature (SIT)**: the measurement of the surrounding

State information is broadcasted to announce presence in the network and is also used in the propagation of resource allocation to nodes selected during the optimization process using a coordination channel. The state information above and the position of a node are all that a

From this point onwards, we shall denote *V* and *M* as the cardinalities of the sensor and mesh

where the goal is to minimize the link's power cost. The corresponding objective function is,

*vx*,*vy*, *<sup>f</sup>* for minimum energy

*<sup>m</sup>* (8)

(*r*∗ *vz*,*vz*+1, *fz* , *t*) 

*minimum energy routing*. The associated optimized link utility *L*∗

*L*∗ *vx*,*vy*, *<sup>f</sup>*(*r*<sup>∗</sup>

> *g* ∑ *x*=1 *L*∗ *vx*,*vx*+1, *fx*

(4) *K* ≤ *K*�

• **Node identifier (NID)**: the ID of sensor or mesh node *vx*;

percentage of the initial energy capacity, *evx*/*Evx* ; and,

interference plus noise (*I* + *N*) energy as measured by node *vx*.

nodes sets as *V* = |*Vi*| and *M* = |*Mi*|, respectively, to simplify equations.

that the minimum required power to transmit between node pairs is chosen.

throughput performance of smart routing versus minimum energy routing.

1 *K* − 1

routing is,

*Ua*<sup>∗</sup> *vi*,*vj*

**9. Packet formats**

node *vx* that includes:

which the node *vx* resides;

cluster-head requires to optimize a request.

(*t*) = *max*

Node state information is used in the formation of hello messages sent between mesh nodes, and also between sensor nodes and their cluster-heads to announce presence in the network. The exchange of hello messages maintains accurate connectivity tables at the cluster-head. These hello messages also update the cluster-head's knowledge of the state of a sensor or mesh node *vx* in terms of remaining energy capacity.

The hello packet format is presented in Figure 6 where the LAT and LONG fields represent the latitude and longitude of the node, respectively, using GPS. The node identifier (NID) field is used to identify the source of the hello packet and, hence, is the number of bits necessary to represent the node identifier. Thus, the NID field has a length of *ceil*(*log*2(*V*)) or *ceil*(*log*2(*M*)) bits depending on if the sender is a sensor or mesh node. The sub-network identifier (SNID) is the number of bits needed to identify the sub-network in which the node resides. The energy rating information (ERI) field is 14 bits in fixed point number representation to represent the percentage of initial energy capacity remaining (using a scaling factor of 1/100), i.e. sending 14 bits that represent 10,000 in decimal yields an ERI of 100.00%; we use fixed point number representation for the ERI field, as opposed to single precision floating point (32 bits long), because the ERI has a fixed number of digits - two - after the decimal point. Hence, we reduce the number of bits needed to represent the residual energy.


### **Figure 6.** Hello Packet Format

The surrounding interference temperature (SIT) field, on the other hand, given real-time variations in the level of interference, is represented in full 32-bit single precision floating point format. Full 32-bit single precision floating point is also used to represent both the LAT and LONG fields. As nodes are stationary, it may only be necessary to include the LAT and LONG fields in the initialization phase to inform cluster-heads of node positions, after which it may not be required. Nevertheless, we include the LAT and LONG fields in the hello message, while *PD* bits of padding may be used to fill out the packet.

Data aggregation is also critical in these networks to preserve sensor energy and reduce the amount of routed information in the network. Figure 7 illustrates an example of data aggregation in a distributed wireless sensor network (WSN) in which presence information is exchanged and specific data aggregation nodes are used to merge information from one or more neighbors. In the example presented, the identifiers of the sensors in the sensor cluster are aggregated at node 4 and node 5 to give a single message to the cluster-head at node 6 of the NIDs [1 2 3 4 5]. Data aggregation for presence information occurs in both the sensor and mesh networks where all mesh nodes are data aggregators and exchange information until there is a consistent view among all mesh nodes.

For a distributed WSN of *SN* = 3 sub-networks (with two sensor clusters and the mesh network presented in Figure 2), *V* = 1, 000 sensor nodes per cluster and a mesh network composed of *M* = 7 mesh devices, the hello packet has a length of 16 bytes. This includes ten

**Figure 7.** The Exchange of Presence Information in Distributed WSNs

or three bits for the NID field, and padding of six or thirteen bits, depending on if the source is a sensor or mesh node, respectively.

We design one hello packet format for both the sensor and mesh network to simplify the system design process and to reduce decoding complexity. A packet length of 15 bytes could have been used in the mesh network, but we choose to have a common packet format at the expense of a transmitting an extra byte of padding. With that said, separate packet formats may need to be considered depending on the number of sensor and mesh nodes in the network and the overhead associated with using a single format.
