**4.3. Calculation of distance between each "hello" broadcast message from mobile sink**

To ensure complete coverage of all nodes neighbouring the path, the calculation of the distance between transmitting a "hello" broadcast message and waiting for responses from surrounding nodes is shown below:

Calculation of an Optimum Mobile Sink Path in a Wireless Sensor Network 59

$$d = R + \frac{R}{2}$$

$$d = \frac{3 \ast R}{2} \tag{11}$$

The number of times the sink stops and broadcasts a "hello" type message is given by the following formula:

$$N\_{hello} = \frac{\mathbf{z} \cdot (\mathbf{x}\_{\text{e}} - \mathbf{x}\_{\text{b}}) + \mathbf{z} \cdot (\mathbf{y}\_{\text{e}} - \mathbf{y}\_{\text{b}})}{d} \tag{12}$$

### **4.4. Time for a mobile sink to complete one loop around the path**

58 Wireless Sensor Networks – Technology and Protocols

communication range of at least three nodes.

described at the end of this section.

surrounding nodes is shown below:

**mobile sink** 

complete one loop is less.

If there are multiple sinks, then the actual load is spread among more nodes. In Figure 2, the number of sinks and the optimum mobile path can be calculated to ensure that all nodes are within communication distance of a mobile sink's path, with the possible exception of nodes at the perimeter of the WSN application area. For example, nodes 1, 6, 11, 56, 61, 66, 111, 116 and 121 may require an intermediate node to pass the message on in Figure 2. To ensure connectivity, this set of nodes can be moved closer to the sink node's path, as shown in Figure 3. The path each sink has to travel is even shorter and hence the calculated time to

When an event occurs, the sensing nodes aggregate the data and elect a single node to forward the message to the sink. In Figure 2, as each node is one hop from the path of the mobile sink, the message will be stored by the elected node until the sink passes by and requests messages. In Figure 1, the message is stored by any node in direct communication range of the mobile sink as it moves along the path. Most nodes in the WSN application area of Figure 1 are two hops away from the path of the mobile sink. Nodes at each corner are at most three hops from the path of the mobile sink because it is assumed that the corner nodes are moved slightly into the application area as shown in Figure 3 to be within

Only nodes which have a minimum of four immediate neighbours will re-transmit the event message. This ensures that nodes on the perimeter of the application area do not unnecessarily re-transmit the message. The event message is only re-broadcast until it is received by an intermediate node that is in direct communication range of the path of the mobile node. The message is stored and when the mobile node passes the intermediate node, all stored messages are transmitted to the mobile sink. Real-time event messages can be forwarded to nodes that will be closer to the sink's path based on the calculations

**Figure 3.** Moving corner nodes within communication range of mobile sink path

**4.3. Calculation of distance between each "hello" broadcast message from** 

To ensure complete coverage of all nodes neighbouring the path, the calculation of the distance between transmitting a "hello" broadcast message and waiting for responses from The mobile sink first moves along the path and greets all nodes within communication range. The mobile sink transmits a "hello" greeting message at every � metres requesting any of the surrounding nodes to return any data messages they may have temporarily stored while waiting for the sink to return. The message contains the mobile sink's ID, velocity and acceleration, sink direction, its intended path, and when it calculates it will return to its current position as well as a list of all nodes that have responded to its greeting thus far. Initially, during the first loop of the mobile sink, the path list will be incomplete, as the sink is not yet aware of all nodes in its path range. When the mobile sink completes its first loop, it will have obtained a reasonably accurate network topology of all nodes within communication range of its path and their locations. The mobile node will re-broadcast this list as it continues to loop around its path, so that even if some nodes were asleep during previous cycles, these nodes can still obtain the list to update their records.

In the event that a real-time event message needs to be reported to the mobile sink, the initial node that is elected to receive the event message, as it is within communication range of the sink or the actual node that detected the event, can transmit the message to the sink, using this list and its knowledge of the mobile sink's velocity and intended path, to determine the optimum nodes to use to route the message to the sink. The messages transmitted between the nodes will travel faster than the mobile sink so the message will be delivered to the sink faster than waiting for the sink to pass by again.
