Bio-Inspired Distributed Sensing Using a Self-Organizing Sensor Network

. Nature offers several examples of self-organizing systems that automatically adjust to changing conditions without adversely affecting the system goals. We propose a self-organizing sensor network that is inspired from real-life systems for sampling a region in an energy-efficient manner. Mobile nodes in our network execute certain rules by processing local information. These rules enable the nodes to divide the sampling task in a manner such that the nodes self-organize themselves to reduce the total power consumed and improve the accuracy with which the phenomena are sampled. The digital hormone-based model that encapsulates these rules, provides a theoretical framework for examining this class of systems. This model has been simulated and implemented on cricket motes. Our results indicate that the model is more effective than a conventional model with a fixed rate sampling.


Introduction
Self-organizing mobile sensor network is built with sensor nodes that may spontaneously create an ad hoc network, assemble the network themselves, dynamically adapt to degradation or device failure, manage movement of sensor nodes, and react to changes in task and network requirement.Such networks can be deployed for environmental monitoring, surveillance application, disaster management, and so forth.
Sensor networks are event-based systems that rely on the collective effort of densely deployed sensor nodes which continuously observe physical phenomenon.The main objective of a sensor network is to reliably detect/estimate event features from the collective information provided by sensor nodes [1].Therefore, the energy and hence processing constraints of small wireless sensor nodes overcome by this collective sensing notion which is realized via their networked deployment.While the collaborative nature of sensor nodes brings significant advantages over traditional sensing including greater accuracy, larger coverage area, and extraction of localized features, the spatiotemporal correlation among the sensor observations is another significant and unique characteristic of the sensor networks which can be exploited to drastically enhance the overall network performance.
In addition to the collaborative nature of sensor networks, the existence of spatial and temporal correlations [2] bring significant potential advantages for the development of efficient communication protocols [3] well suited for the sensor networks paradigm.For example, intuitively, due to the spatial correlation, data from spatially separated sensors is more useful to the base station than highly correlated data from nodes in proximity.Therefore, it may not be necessary for every sensor node to transmit its data to the base station; instead, a smaller number of sensor measurements might be adequate to report the event features within a certain error level.Similarly, for a certain event tracking application, the measurement reporting frequency, at which the sensor nodes transmit their observations, can be adjusted such that temporally correlated signal is captured at the fusion center within a certain distortion level and with a minimum energy expenditure.
In this paper, we propose a scheme for building an autonomous system, for spatio-temporal reconstruction of environmental phenomena using mobile nodes.A key feature of our approach will be the focus on energy efficiency, by employing adaptive sampling in both space and time.In the process, we optimize the number of message transmissions needed for collaboration among nodes, since the transmission contributes significantly to the total power consumption.The most important point, however, is to make the system self organizing and is achieved using simple, local rules.The main advantage of such systems is that it reduces the dependence of critical nodes for their proper functioning.For example, in case of multisensor detection, if a fusion center fails, most likely a new one will be elected, but it will waste resources in doing nonproductive work.Also, readings need to be collated at fusion centers, before a result is produced.Clearly, this produces accurate results, but again, at increased resource/energy costs.We envisage that using a self-organizing system shall maintain the balance between fidelity of results and energy consumed, while retaining scalability and fault tolerance.
The remaining part of the paper is organized as follows.In Section 2, some previous works in the field of selforganizing sensor network are discussed.In Section 3, a detailed discussion of the problem is presented.In Section 4, the proposed EDHM is described in detail.In Section 5, the EDHM-based spatio-temporal signal reconstruction is presented.In Section 6, results of both simulation and hardware implementation are discussed.Finally, Section 7 concludes the paper.

Related Work
A novel computational model for self-organization was first proposed by Turing as Turing's reaction-diffusion model [4].This model was mathematically supported by [5] and experimentally by [6].Later, cellular automata-(CA-) based model for self-organization was developed by Gutowitz [7].The CA-based model was further modified by Leach and Taffoli for incorporating nonlinearity.
In fact, the DHM [8] for self-organization has been proposed as a potential mechanism for development and differentiation in artificial life systems [9].Swarm robotics [10] is a very active research area and has proposed many approaches.References [11,12] showed that a set of autonomous agents can use pheromone to form interesting and complex global behaviors and exhibit swarming behaviors [13].
The concept of biological hormones proposed by [14] was one of the earliest attempt to build systems that are robust, flexible, and have the capability to self-organize.The ADS (autonomous decentralized systems) technology has been applied to industrial problems [15] and has the properties of on-line expansion, on-line maintenance, and fault tolerance.This attracted researchers to build ADS [16,17].
Hormone-inspired DHM (digital hormone model) [8] extends Turning's reaction-diffusion model by considering not only the interplay between reactions and diffusions, but also the network topological structure around each robot, the local sensory and actuator states, and the movements of individual robots.Ant colony, schooling fish, and nectar source selection by honey bees are examples of biological self-organization systems.A simulation of task allocation in the multirobot system using DHM for optimizing the cost of robot system is proposed by Li et al. [18].Conservation and effective prolong lifetime of WSN are established by hormone-based distributed clustering algorithm [19].Inspired from bioendocrine systems, a tracking strategy is devised in [20].Hormone messages are used in sensor networks to coordinate sensor nodes for mobile target tracking in a self-adaptive way.
Reference [21] defines a sensor network architecture which allows sensor nodes to autonomously adapt their duty cycles for power efficiency and responsiveness of data transmission, to collectively self-heal (i.e., detect and eliminate) false positives in their sensor readings, and to be lightweight.This method assumes a regular grid deployment structure which is not always possible in remote areas.Authors of [22] address node localization using particle swarm optimization (PSO) and bacterial foraging algorithm (BFA).This method is computationally expensive due to its iterative nature.Authors of [23] report a design of a distributed sampling scheme referred to as the virtual sampling scheme with a fixed sampling period.
The proposed work is an example of a self-organizing wireless sensor network which is partially inspired from the foraging in bees and has been theoretically described using a digital hormone model [8].The existing extensions of DHM [18][19][20] are modeling spatial behavior of static robots, whereas the proposed extended DHM is used for modeling a self-configuring system of static and mobile robots based on spatio-temporal environment and tasks.Unlike DHM proposed by Shen et al. [8], EDHM uses lazy cascading to avoid message flooding.The rules are so defined that different nodes will do different actions with the same hormone message as it depends on the current state of the node.This avoids multiplexing of communication, sampling, and locomotion and makes the node simple.The novelty of the proposed method is its autonomous behavior with adaptive spatiotemporal sampling feature.
The proposed model (extended DHM) behaves like natural systems, executes various rules, based on the local information obtained through sensors.The individual nodes communicate with each other through hormone exchanges.
The model shows analogies that can be applied to spatiotemporal sensing and form the basis for the theoretical framework.Due to the judicial combination of selforganization based on natural systems and DHM, EDHM maintains a neat balance between the amount of local and distributed processing, taking into account the task deadlines and available computation and communication resources.

Problem Description
The aim of the proposed work is to design and implement a sensor network that uses mobile nodes to sample a region for reconstructing the spatiotemporal signal.
A Digital hormone model (DHM) [8] encapsulates dynamic networks of mobile nodes or robots that use hormone-like messages to communicate, collaborate, and achieve their goals.The hormones received by a node influence but do not determine their local behaviors, as it is the function of both the type of hormone and local state of the node.Thus, different nodes react differently to the hormones despite the fact that all are running the same protocol.The DHM consists of three components: a dynamic network of mobile nodes, a Probabilistic Function for individual node behavior, and a set of rules and equations for hormone reaction and propagation.
3.1.Dynamic Network of Mobile Nodes.Distributed control of mobile nodes is a difficult task as the global behavior of the network should emerge as a result of local actions.Therefore, we propose the bio-inspired digital hormone model for spatiotemporal sampling of sensing space.In this model, the nodes are considered as biological cells that communicate and collaborate via hormones and execute local actions via receptors.The model can be visualized as a system having 3 basic components which makes it dynamic, probabilistic, and fault tolerant as in the case of a biological hormone.This model is used for implementing event-based relocation of sensors in a distributed manner.
(i) Each node has a set of "connectors" through which it can connect to other nodes.In a wireless network, "connectors" mean connecting link (1).These connectors or connecting links dynamically change with the movement of nodes.
(ii) A set of probabilistic "receptors" or functions allows individual nodes to take actions based on the current state of the node and received hormone (2).
(iii) The nodes interact within a cell of radius "" directly through relayed "messages".
A dynamic network of mobile nodes is a formal representation of the traditional wireless sensor network that has been deployed for spatiotemporal sensing.The term dynamic emphasizes the impromptu links that form as mobile nodes move or nodes fail or come up at a time instance .Each node has a set of connectors through which nodes dynamically connect with each other.
In this model, connectors simply denote a radio link that comes up whenever a probing node transmits a hormone and a listening node receives that hormone.Note that the links are formed only between a transmitting node and a listening node within its transmitting range.Let   denote the set of active nodes at time  and   the set of links, then  can be defined as  ≡ (  ,   ) . ( Through the DN nodes can exchange hormones.In our model, a hormone generated at a node is propagated on all the links of that node and it is not propagated further.

Function for Node
Behavior.Each node runs a protocol that identifies its behavior based on the current state of events.A mobile node selects its actions , based on a probability function , that is, trained on three local factors: the state information , the sensor data , and the hormone level :  ( | , , ) . ( The actions include commands to transmit a hormone, move to another location, or switch sensors on/off.The function P simulates the hormone receptors found in various biological organisms.Although  is local, yet it greatly influences the global behavior.P, in fact, is the key to achieving self-organization in the network.The rules for self-organization of mobile sensor nodes for implementing reconstruction of a spatio-temporal signal are proposed in the next section using an extended digital hormone model frame work.

Extended Digital Hormone Model (EDHM)
Sensor networks have been used for a variety of applications one such being spatio-temporal sampling of an environment.It has been previously brought out that such kind of sampling is analogous to foraging activities of bees.Taking that analogy further, we present a tailored, extended digital hormone model (EDHM) that succinctly captures the rules required for spatio-temporal sampling, in a theoretical framework.This model defines the rules for collaboration among mobile nodes for sampling a region in space and time, in an energy efficient manner.We further look at the conditions under which our model will serve its purpose of being energy efficient and also see how can a spatio-temporal signal be reconstructed using this method.

Foraging Activities of Honey
Bee. honey bees have been found to focus their foraging activities around more profitable nectar sources.A collaborative effort of several bees maintains a steady flow of food supply in the bee hive.It has been verified that the foraging activities emergent at the colony level occur without any central leadership or a global rule.The overall nectar source election process can be understood with respect to the behavior of individual bees [24].
The following steps are used for the collaboration of honey bees.
(1) Honey bees are divided into employed and unemployed forager.
(2) The employed forager will communicate by performing a waggle dance to share the knowledge (quality, distance, and route) about the food source with other bees.
(3) Unemployed forager observing the dance has an opportunity to become well informed about the various food sources exploited by their colony.
(4) Based on the observed dance, the unemployed forager decides whether to start foraging that particular source or to wait for other dances.It has been deduced that the decision to forage is based on the information received during a small time frame and as such does not involve an accumulation of knowledge over successive dances by different bees.
To implement the above steps in mobile robots, for sensing signal in a collaborative fashion, we considered the following assumptions and framed rules based on these assumptions.

Assumptions
(A1) The state of mobile robots is classified as Probe, Listen, and Move.The state information of nodes is represented by a variable S. In the probe state the node takes samples of environmental data through its sensors and conditionally transmits hormones.In the Listen state, a node turns off its sensors and listens to its neighbors for possible hormone transmissions.The Move state captures the locomotion of the node from an initial coordinate to a final one.
(A2) D refers to both the set of sensor readings   (  ), from sensor i of node at sampling instance   and the remaining battery batt, where batt ≤ 1.
(A3) All robots have short range wireless communication facility (either RF or infrared) and can talk to robots that are in proximity.
(A4) H denotes the hormone that is transmitted from a probing node to a listening node.Each  is a three tuple containing the (, ) coordinates of the transmitting node as well as the sensor reading   (  ).
(A5) We assume that a node remains in the Probe or Listen states for a time , before executing .The node can be in the Move state as long as it does not reach its target location.
(A6) It is also assumed that each node knows its location in a global co-ordinate system, and that this information is transmitted along with the sensor reading whenever a hormone  is propagated.The model does not require any global node identifiers.
(A7) The value of   can fall in three regions as shown in Figure 1.If  = Listen AND  = 0 for entire , then  = Probe where   is a threshold parameter for sensor .
(B1) (Random Move rule) if (B0) has been executed continuously for more than a number of times, then a random vector R is calculated that determines the direction and distance to move.The target point (  ,   ) is such that distance  , between the initial and final coordinates is proportional to batt  , that is, where,  ≥ 1.We took  = 1 for all calculations.The direction to Move is, though, randomly determined.The node finally sets  = Move.
(B2) (Hormone transmission rule) A node with  = Probe transmits a hormone (  ,   ,   (  )) if there is zerocrossing between   ( −1 ) and   (  ) or Using this rule, we are doing a differential sampling.
If there is a change in reading (positive or negative), a hormone message is generated and transmitted.This reduces redundancy.
(B3) (Gradient Move rule) This rule is particularly important as it significantly contributes to macroscopic selforganization through microscopic actions.
A node in  = Listen accumulates all the hormones   it receives for the duration .
After that, the node calculates gradient   , towards each of the nodes in its vicinity that transmitted the hormone, where Based on the   ,  max  is determined for all nodes within the communication range of th node at time   , and a locomotion vector The direction is, however, towards the node with a maximum gradient.The node then sets  = Move.This rule helps in adaptive sampling.
(B4) (Destination arrival rule) (B5) (Adaptive sampling rule) This rule is the key to saving energy while taking sensor readings.It defines how often to take samples during the sampling period  when  = Probe.A node predicts when to take the next sample based on the past values of sensor readings.The next sampling instance  +1 is given by Here, 0 <   ≤ .The value of sampling interval is directly proportional to the ratio of time interval and difference in sensor reading between two consecutive samples and also to variation with MAX  .Hence, the sampling interval is decided adaptively which further optimizes energy consumption.
The sensor will be moving in a direction where the 4.3.1.Action Execution Probabilities.We define the following probabilities for classifying   (  ) into three regions formed between   and   , assuming a uniform distribution of values.MAX  denotes the maximum value returned by sensor   : ,   , and   denote the probability that   (  ) falls in the region , , and , respectively, defined in Figure 1, also, We next define a probability function (  ) for a node to transmit a hormone, based on the rule (B2): The probability of a node being in Probe, Listen, or Move states is defined in the following equations: where  is equal to the number of neighbors, that is, nodes within its communication range: Also, This means that a node can be exactly in one state at any given time.
Assuming ( = Move) > 0, and considering ( = Probe) and ( = Listen) to be equally likely implies that Based on the above equations, we define the probability of each action, (B0)-(B5), being executed: is an implementation-specific constant for specifying how long should a node wait at a point before moving to a new, random, location in case of low sensor activity and no received hormones: where  is an adaptive value depending on the frequency of events.
In (B5), the samples are taken more frequently as   (  ) approaches   , therefore, we assume that the average number of times (B5) is executed and is directly proportional to   .
The rule (B0) ensures that a node alternatively probes or listens.(B1) prevents a node from being stationed at a point in case the sensors denote low activity for too long.(B2) propagates the information from a node to another and is the basis for internode communication.(B3) is generally a consequence of another node executing (B2), and it helps in accumulating more nodes towards regions with high sensor activity.
Since our objective is to probe with reference to the threshold, that is, for sensor values above a threshold, (B2) and (B3) together form an effective way for reconstructing the spatiotemporal signal at a global level through simple, local interactions.(B4) simply ensures that a node does not respond to  or  as long as it is moving.(B5) is another important rule that makes energy-efficient sampling possible by varying the sampling rate based on the stream of samples collected so far.Specifically, rules (B2)-(B3) guide sampling in space, whereas (B5) guides sampling in time.It should be noted that the above rules are designed so as not to do multiplexing of tasks such as sampling, communication, or locomotion.The objective behind this is to reduce Although in biological organisms, hormones diffuse through a cellular interaction; in case of mobile sensor nodes, the radio transmission reception helps in the hormone diffusion.
The gradient calculated towards each hormone transmitting node aptly represents the concentration  of hormone and therefore  is a function of both relative difference in sensor readings and distance between the nodes, that is, (Δ  ,  , ).
The DHM proposed by Shen et al. [8] establishes  as a function of time, but, in our case, we simply assume that a hormone  is of merit to a node only up to the next decisionmaking step.
Our approach, though a bit discreet, still serves the purpose of guiding nodes towards regions of high sensor activity; as hormones are transmitted every time, conditions for rule B2 are met.Thus, if a node missed a transmission, it might receive it the next time it enters the Listen state.The hormone  in our model is analogous to the activator hormone , though the inhibitor hormone  is implicit and can be assumed, for the sake of completeness, to be virtually generated on timeouts.We shall like to mention here that classical hormone-based models generally retransmit a received hormone to generate a cascading motion with immediate effect.Our approach, however, allows only fresh hormone transmissions (i.e., no forwarding of hormone messages) based entirely on local sensor readings, since we are dealing with a time-varying signal and it may be possible that by the time a node reaches towards a target point the signal has died out.This effect will be more pronounced as more and more nodes, situated multiple hops away, move towards the target region.Hence, our model results in lazy cascading wherein the propagation of hormones is deferred until the receiving node starts probing at the new target point.This method also helps to reduce the overall energy consumption of the network.

The DN-EDHM Control
Loop.Each of the nodes can be assumed to occupy a location in a 2-D grid space, where each grid box is equal to the resolution of the localization system deployed.At powerup, the nodes initialize their states , to either Probe or Listen, and execute the following loop.
(2) Execute the selected action.This includes sampling, hormone transmission/reception, and locomotion.
DN-EDHM control loop has fewer steps than DHM because we have coupled hormone generation, propagation, and reaction with action steps.Another major difference with DHM is that it is not guaranteed that all the nodes will be executing the same step in the control loop, since B1 and B3 may take different times to execute in different nodes based on R and L.

Reconstructing the Spatiotemporal Signal
Sensor networks are characterized by the dense deployment of sensor nodes that continuously observe physical phenomena.Due to high density in the network topology, sensor observations are highly correlated in the space domain.Furthermore, the nature of the physical phenomena constitutes the temporal correlation between each consecutive observation of a sensor node.These spatial and temporal correlations along with the collaborative nature of the sensor networks make it suitable for spatio-temporal sampling of physical fields.The dense deployment of sensors increases redundancy which makes the system energy craving.Accurate temporal reconstruction of signals depends on frequency of temporal sampling.EDHM reduces redundancy through rule (B 2 ) and (B 3 ) and optimizes temporal sampling frequency through rule (B 5 ).Rule (B 3 ) decides the direction of motion of nodes towards maximum signal level.
The model proposed above demonstrates how selforganization and distributed actuation can be achieved using simple rules that process only local information.Even though the nodes carry out the sensing task without any intervention, yet the readings taken by the network as a whole need to be collated for further analysis.This shall require the nodes to periodically (or in response to a query) transmit the sensor readings to a base station.
Watching the data sent by geographically spread nodes is like watching a "sensor movie" [25], since the readings of a sensor correspond to pixel values of varying intensity in an environment image, and watching a sequence of such images (or frames) gives the impression of a video of sampled values.
(1) PREMON Model.Reporting the values to a base station is, nevertheless, a costly task and therefore should be minimized.Reference [25] proposes a prediction-based monitoring (PREMON) model, where the base station computes a "prediction model" for a sensor, and the sensor transmits a value if it significantly differs from the value computed using the prediction model (see Figure 2).The prediction model is valid only for a limited time interval, after which it should be recomputed.In the proposed model, the hormone messages are sent only if there is a significant difference in the consecutive readings.The sampling frequency is also adaptively varied according to the difference in the sensor readings.Hence, the prediction model can be easily applied in this model.In view of our case, the prediction model can be classified as follows.
(i) Spatial.When the reading at sensor   is a function of the reading at sensor   during the time slot   .
(ii) Temporal.When the reading at sensor   at a time   is a function of its reading at a previous time slot  − .
(iii) Spatiotemporal.When the reading at sensor   at a time   is a function of reading at   in a previous time slot  − .
The PREMON model can be suitably applied in our case also, the only difference being that [25] uses a setup of static nodes, as compared to mobile nodes in our approach.Figure 3 illustrates that by superimposing snapshots taken at different time intervals, we can construct the environment image at a base station.The coloured grids specify the information collected from that grid.Clearly, the mobile nodes provide a dynamic coverage of the spatial region (the number of coloured grid is more), whereas static nodes cannot provide dynamic coverage.Thus, by combining PREMON with mobile nodes and EDHM, we can obtain a far more accurate spatio-temporal reconstruction at reduced energy costs.

Energy Savings through EDHM.
In a conventional, fixed rate, sampling model, sensor readings are categorised as those above or below a certain threshold   .Let us assume that the sampling rate in this case is proportional to   , the probability of a value being above   : where,   ≈   <   ≈   <   .  is the maximum threshold value.
A simple hormone or message transmission rule in this case can be to transmit whenever   (  ) >   , where the probability of transmitting a hormone is defined by thus, the hormone transmission rule for the conventional model becomes and that for the sampling is Here, (1) = 1 denotes that a node is always probing.
The energy savings at a node can then be calculated by comparing the relative execution probabilities of actions B2 and B5 in EDHM with 2  and 5  in a conventional model.The value of   , defined below is an indication of how often these actions are executed V  --V  the conventional model, thus, giving an indication, how often the transmission and sampling costs are incurred.A value less than 1 shall denote energy savings in our approach, whereas a value greater than 1 means that our model is not energy efficient.Consider We know that, ( = Probe) < 0.5, that is, 2( = Probe) < 1.This means that for   to be less than 1, [  (  + 1)]/  should be less than 1.By suitably choosing the threshold parameters   and   based on   , we can guarantee   to be less than 1, that is, saving energy.In this case if we assume   ≈   we get The condition for   to be less than 1, in terms of   and   , then becomes The above discussion only provides a theoretical insight of the savings possible with a hormone-based model while transmitting messages or sampling at a point in space.More savings are possible if we also consider the fact that a mobile node in this model will move less often than where nodes randomly move about to sample the region.Our experiments show a significant saving in such a case, albeit at the cost of less accurate signal reconstruction, the results of which are discussed in Section 4.

Simulation.
In order to carry out experiments on the power consumption and accuracy in signal reconstruction using the hormone-based model, a simulator called Shimla, was designed.Shimla compares the power consumption of nodes, as they move around, by simultaneously executing We carried out simulations using Shimla simulator as (Figure 4) to find out how does our approach fare in terms of power consumption and how well can it reconstruct a spatiotemporal signal.Experiments were carried out to measure the performance in terms of average battery remaining and root-mean-squared error.Simultaneously, a naive protocol was also executed which served as a benchmark for our model.Due to the inherent randomness in self-organizing systems, for better accuracy, each experiment was repeated 50 times as (Figure 5) for the same signal and the same set of parameters, though at each run the initial location and state of the node were randomly chosen.Based on the compiled data from these experiments, the effectiveness of our model was calculated as a ratio between relative battery savings and relative root-mean-squared error ().
This process was repeated again by increasing the nodes to 2, 3, . . . up to a total of 25 nodes, without changing the signal.Thus, a total of 1250 executions each, of Shimla, were carried out for static and time-varying signal.The environment consisted of a grid of 50 × 50, with a communication range set to 25 units, and sensor range set to cover an area of 9 grid squares.It should be noted that Shimla primarily calculates the energy expanded in locomotion and radio communication, since these two costs are much higher than the cost of probing (see Table 2).

Execution of EDHM for Spatiotemporal Reconstruction.
Executing the hormone-based model in parallel to a naive algorithm (where nodes probabilistically move to sample a region) helped us compare the performance of the model in terms of power consumed and error in a signal reconstruction.The results (shown below) demonstrate that the nodes self-organize themselves to decrease the per node power consumption and reduce the error in a signal reconstruction.6 compares the average battery remaining after 1500 epochs (over 50 runs) the against number of nodes with a naive algorithm, for both static and time-varying signal.In both cases, as the number of nodes is increased the average battery remaining increases implying a decrease in the power consumed per node, for EDHM.If we look at the power remaining in the naive case (conventional fixed rate sampling), we find that it remains close to 20% irrespective of the number of nodes, even though the naive case does not expend any energy in radio communication.The increase in battery remaining, as the number of nodes increases, establishes the fact that nodes do collaborate  among themselves by sharing the task.This collaboration, therefore, achieves our goal of energy efficiency.

Error in Reconstruction.
Besides saving energy, the collaboration among nodes also decreases the error in signal reconstruction, as visible in Figure 7. Again, compared to EDHM model, in the random sampling approach the  remains roughly the same even as the number of nodes increases.The self-organizing nature of the proposed model helps us to achieve both our goals of improving energy efficiency and reducing RMSE error.It should also be noted that even though the random approach produces less error in reconstructing the signal, the difference from our model decreases, as the number of nodes increases.This is mainly because the random strategy results in oversampling of the region, whereas the nodes in our case coordinate their activities by dividing the sampling task.

Effectiveness of the Model.
It is clear from the above results that the proposed model offers a tradeoff between energy efficiency and error in a signal reconstruction.The model can be compared (naive protocol whose characteristics are explained in Section 5.1) on the basis of how much energy it saves and how much error does it produce.The aim of the proposed work is to maximize energy savings while reducing the error.To gauge the model on these two metrics, we define the utility  of the model as the ratio of relative battery savings (between our model and the naive algorithm) to relative root-mean-squared error, for a given set of parameters: Our aim, now, is to find those set of parameters that maximize the utility.In the proposed model, the behavior of a node is mostly affected by the sensor readings and the hormone receptions, both of which are dependent on external factors.Figure 8 shows how the utility of model increases as the number of nodes are increased.For a given node, the only parameter that can be controlled is , that affects the execution of rule (B1).The parameter  is important because it determines how often a node should do random sampling in case of no sensor or hormonal activity.A low value of  will result in frequent wandering of a node which improves spatial sampling but also costs heavily on the battery (Figure 9).Another parameter that can be controlled, at the network level though, is the number of nodes deployed.We have seen from the results that a larger number of nodes reduce average battery consumption and root-mean-squared error.We used Shimla to calculate the utility  for a given number of nodes at a particular value of  (Figure 10) and also averaged it over 50 runs.The value pairs where the utility is more than 1 indicate that the model performs better than the naive model, if battery savings are considered as equally important as reducing the error in signal reconstruction.For a grid size of 50 × 50, the maximum utility is obtained at a deployment of 20 to 25 nodes with  between 13 and 17.It should be noted that the value of  is expressed in terms of number of epochs.At a given number of nodes, for lower values of , rule (B1) executes too frequently resulting in decreases in relative battery saving and hence decreasing the utility.On the other hand, at higher values the execution of (B1) is differed too late, causing it to idle and consequently miss events, hence, increasing the error in signal reconstruction and therefore decreasing the utility.It can also bee seen in Figure 9.
Thus, it can be concluded that an effective deployment requires higher number of nodes with combined sensor coverage of around 10% of the total area and an idling time () of the order of lower tens of the probing epoch.static nodes for studying the self-organization among nodes, through hormone exchanges.Phase 2 involved implementing the basic model on Mica2-cricket motes.In the last phase, we implemented the complete model with mobile nodes and a localization system.We used Crossbrow cricket motes as sensor nodes.We placed these nodes over a toy car chassis and used PIC microcontroller for driving the car.The whole system works as a mobile sensor node (Figure 11).Experimental set up is as shown in Figure 16.
6.4.1.Mirchi.Before the cricket motes were procured, we made a plugin for TinyViz called Mirchi as (Figure 13).It is a Java-based plugin made by extending the simulation environment provided in TinyViz.We designed Mirchi for estimating the energy saved through the use of adaptive sampling, along with bistate operation of a node, where in one state only the sensor was on (with occasional transmissions) and the other only for receiving messages.The plugin demonstrates the execution of rules (B0) and (B5) as (Figure 12) for a pair of two nodes in each others neighborhood.The power model used in Mirchi was that of Mica2 (see Table 2).Based on the feedback from Mirchi, we went ahead with the implementation of the model on cricket motes.6.4.2.MirchiBLUE.MirchiBLUE was built in Java for displaying, in real time, the on-going network activity.Besides, the network's traffic, it displays the tessellation of the region sampled by the nodes.MirchiBLUE supports the light, temperature, pressure, and humidity sensing modalities alog with the remaining power level in a node.MirchiBLUE receives data from the network through a cricket mote attached to it through the serial port.MirchiBLUE can also be extended to give commands to the motes in real time.

Embedded Code.
Three separate softwares were used to implement the system.Firstly, the firmware supplied with the motes was uploaded on three motes which served as beacons.This firmware was modified slightly for use as a Listener, that ran the hormone model.Finally, a single node was programmed to act as a packet forwarder for the MirchiBLUE application.
6.4.4.Navigation.Rules (B1) and (B3) require the node to move to a new target location.Since (B1) makes a random movement, we implemented it by having the node choose a random direction (among forward, back, forward left, forward right, backward left and backward right) and executing it for a time proportional to the remaining battery power.(B3), however, requires an accurate displacement of the node from the initial to the target co-ordinate.
This requires the bot to know its orientation and that of the target relative to it for it to choose the appropriate locomotion command (Figures 14 and 15).The navigation logic is incorporated as rule (B4), and the algorithm for that can be stated as shown in Algorithm 1.
Algorithm 1 iteratively navigates the bot to the target by deciding what direction to move to, from a given point, by calculating the bots orientation.
The implementation of the hormone model has been largely successful, except for the time it takes for a bot to settle down at the target point.In order to implement the model, for deployment in a real world scenario, it would be advisable to use a digital compass and a separate hardware for localization.We developed a coverage panel in Java for displaying, in real time, the actual location of sensor nodes as shown in Figure 17.Three cricket beacons were used for localization of nodes which are represented as black dots and the distribution of nodes after deployment algorithm is shown in Figure 17.We used nesC to embody the structuring concepts of TinyOS operating system.Three separate softwares were used to implement the system.Firstly the firmware supplied was uploaded on 3 motes which served as beacons.This firmware was slightly modified to use as a node which ran our model.Finally, a single node was programmed as a packet forwarder and connected to the serial port to display details in the coverage panel.This packet forwarder acts as an interface between sensor nodes and serial port of computer.We programmed the nodes to handle self deployment, localization, event detection, and relocation themselves [26].
Figures 18 and 19 give the intermediate location and final positions of mobile nodes after implementation of DHMbased self-organizing algorithm.Figure 20 shows the final location of mobile node after doing the experiment.6.4.5.Practical Issues.While implementing the model, we faced several issues that need to be understood for improving the performance of the model in an actual deployment.These are summarized below.(i) Radio Conflict.As has been previously bought out, localization uses RF (along with ultrasound) which is also required for transmitting and receiving hormones.This not only leads to a time duration where no useful work is being done (model execution is paused) which can cause missed events and hormones resulting in loss of performance, but also increases channel contention.Having a second radio for communication is feasible if the cost of hardware is not of concern.Another solution can be to synchronize the transmission schedules using protocols such as S-MAC [27].
(ii) Localization Time.Since the localization code is multiplexed with the model on the same processor, the model is paused from executing.Only the possible approach is to either have a separate node running the localization code (on a different frequency) or use another localization system such as GPS (which dose not work indoors).
(iii) Braking.Since the BeeBot does not have an instantaneous brake and due to the time required for knowing the coordinates, often the bot overshoots the target region leading to oscillatory behavior.This leads to an increase in the converging time for the navigation algorithm.The problem can be solved by making the localization hardware separate and also by providing an effective braking mechanism.
(iv) Orientation.Knowing the orientation is another challenging task.The methods discussed in the last chapter are only partly successful as they are either susceptible to errors or require more number of nodes.The best way to get the orientation shall be to use a digital compass as it will provide instantaneous readings with comparatively less hardware cost and power consumption.
(v) Beacon Coverage.Since we have only used three beacons, accurate localization can only be done where the ultrasound pulses from all three beacons reach (Figure 21).More accuracy and wider coverage are possible by using a greater number of beacons.

Conclusion
We have seen that EDHM helps to attain balance between the extent to which battery saving is required and the tolerance in reconstruction error.The simulation results exhibit how larger the number of nodes share the task, improving on both the fronts of efficiency and sampling.We shall, however, like to comment that our model is slightly biased towards saving energy than accurately sampling the region.Nevertheless, the utility  is above one for most of the cases, except when the number of nodes is too less to effectively collaborate.Our experiments also reinforce the view that for a self-organizing system to succeed, the number of individual units should be considerably large.
It can be also seen from the above discussion that simulations are a good instrument for verifying the validity of theoretical proposal, but the actual implementation might require tackling issues that are totally unrepresented (in the theoretical model).Such issues, nevertheless, must be resolved for the implementation to perform as expected.

Figure 6 :
Figure 6: Battery consumption while sampling a spatiotemporal signal.

Figure 10 :
Figure 10: Correlation between delta and utility.

Figure 11 :
Figure 11: From a toy car to a mobility platform.

6. 4 .
Hardware Implementation.In order to verify the feasibility of an extended hormone-based model for spatiotemporal sensing, we implemented the project in 3 phases.In phase 1, we simulated a basic hormone-based model using Time

Figure 15 :
Figure 15: Navigation to the target.

Figure 18 :
Figure 18: Intermediate location of mobile nodes.
falls in the region  if   ≤   ,  if   in between   , and   and  if   ≥   , where   and   are lower threshold and upper threshold values set for   .Let MAX  be the maximum possible value of sensor reading   .

Table 1 :
Probability of execution.It should be noted that what action is selected at a time is mainly dependent on the current state of node and environmental factors such as received hormones and sensor readings.A summary of action execution probabilities for each action/state pair is listed in Table 1.When a node is in the Listen state, (  ) represents the probability of a neighbor to transmit a hormone.
4.4.Rules for Hormone Reaction and Propagation.The propagation of hormone occurs in a two-dimensional space and is governed by standard laws for radio signal propagation.

Table 2 :
Power model for mica mots.