Spatial Communication Activity in Wireless Sensor Networks Based on Migrated Base Stations

so that a new set of BS neighbors did not have conjoint elements with all previous neighborhoods. After receiving 4x300 = 1200 packets, such a cycle was repeated until the energy of one of the nodes was drained out completely. The results are far

Another issue to consider is; how often BS should change its position? To minimize BS movement once the intensity of messages is neither changing rapidly nor area of these changes migrating too far, what would the threshold (or any other factor) that has influence on decision that BS won't be moved.
Since it is the common knowledge that migrating BS could help extend WSN lifespan, it is just a question; how this migration should be organized. There are several aspects to be investigated, among others: whether BS should change its position every time a message is received or not (if not how often should it be?), how far BS should move from its previous (original position), how the BS movement affects behavior of all nodes and the BS neighborhood. Another crucial aspect is how to notify the nodes from BS neighborhood that will soon become out of communication range with BS, when it is moving away from these nodes.
BS movement just a fracture of relay radio link range, seems to be energetically unreasonable, since just this kind of movement involves new distribution of nodes calculation and new relays designation, that consumes a lot of valuable energy resources.

Related works
There are a huge number of papers considered communication activity in WSN, related mainly to clustering and routing problems. On the one hand, scientists have discussed sensors' self-configuring [1], self-management [3,1,19], adaptive clustering [1,9,22] or concept of adjustable autonomy [5]. On the other hand, there are papers which discuss bio-inspired ideas and tend to extract some aspects of the natural world for computer emulation [6].
The WSN communication structure is crucial for BS migration. Authors [4] have shown that the communication topology of some biological, social and technological networks is neither completely regular nor completely random but stays somehow in between these two extreme cases. It is worth to mention papers [22,19,3] devoted to self-organizing protocols using both random and deterministic elements.
In order to effectively manage communication activities, one has to address the problems of sensor network organization and the subsequent reorganization and maintenance [22].

Communication, measurements and neighborhoods in WSN
Communication is one of two (along with measurements made by the nodes) primary forms of WSN network activity. As far measurements are made by the network nodes and can be carried out locally, completely independently, then a communication is a typical collective action in which, besides the transmitter and the receiver, relay nodes actively participate.
The active role of relay results from the limited range of radio communication. Awareness of energy preservation considerations causes that this communication range is much shorter than existing in WSN distances between nodes and BS. Then, in order to make sure that information (a packet) arrives to a destination (BS) from a source of information (a WSN node), an implementation of routing packet based on relays is requisite.
In order to describe mentioned above WSN activities, let us introduce concepts of actions and behavior. Action should be considered as the property of each network element such as: a sensor, a Base Station, a cluster head or a regular node. The behavior, on the other hand is an external attribute which can be considered either as an outcome of actions performed by the whole WSN or its subset (i.e. cluster, routing tree, group of nodes, neighborhood).
Action (Act) is a ternary relation which can be defined as follows: Therefore, actions that can be taken by nodes of WSN can be represented as a Cartesian product over the sets of nodes (Nodes) and their possible states (States). Finally, new states are a result of every action taken.
Actions are executed individually by a single node of the network (e.g. measuring the environmental parameter) but some of them require that two or more neighboring nodes cooperate with each other to perform a particular action (e.g. during the message transmission, receiver interact with transmitter). Actions are taken depending on the actual state of the node (different actions will be taken during the network organization or normal operation phase) and lead to new state of the node. Actions may also change the state of the neighboring nodes (e.g. dual actions transmit -receive).
Since nodes are autonomous, each one can execute actions independently of others. Undoubtedly, this is an advantage since WSN as a whole can simultaneously execute a plenty of different tasks. On the other hand, some actions gain in importance only when two or more nodes cooperate with each other taking dual or related actions. For such actions nodes perform their actions in cooperation which means that these actions are related to each other. In such a case we say that actions are related. Routing in WSN is a good example of such related actions.
Let, R denotes, routing. We can construct the quotient set called Behavior, consist of elements which are called equivalence classes linked to the relation R and here denoted as: So, routing activity is a behavior which draws on relations and describes dependencies between actions that are taken by nodes situated on a routing path. In other words, relations refer to actions that depend on each other and are taken together but not necessarily simultaneously -this is the relational way of thinking about the network activity. Detailed explanation of these concepts can be found in [12,13,16].
Concerning WSN structure, vicinity V(k) of a node k describes all what is placed in the radio link range of k node. This vicinity consists of various different components that belong to the WSN infrastructure and the other indirect elements that do not belong to WSN, although they play an important role in the behavior of the network. The set of objects from the first group can be called neighborhood N(k), and a collection made of objects from the second group is defined as environment E(k). The relationship between these three terms can be expressed as: Coming back to mentioned above two crucial WSN activities, communication is a behavior which takes place within a neighborhood while measurements are actions related to environment. Further we will be working on communication aspects within WSN, so now let us come closer to this issue and begin from ( ; ) expression that can be defined as a collection of mappings of set X onto set Y (surjection). Next, Sub(X) is defined as a family of all X subsets and neighborhood as a mapping Thus, ( ) denotes the the neighborhood of node k while, ( ) is the neighborhood of set of nodes S defined as: where ℛ means that nodes y and k are in relation `to be neighbors'.

Spatial routing and routing chains in WSN
Getting back to the main WSN task, which is the monitoring of selected physical parameters of the given area, let's have look at how it is implemented. A packet containing measurement results is formed in the node that has made this measurement. The sources of packets are all nodes in WSN. We assume a regular frequency of measurements, forming packets and continuous uniform distribution of nodes within WSN area with probability density function for both X and Y axes. Thus, we consider WSN as a collection of strongly homogenous elements (nodes). During WSN activity we do not affect either the place or the time of new packet creation.
Then a packet is transmitted to a base station via a routing path. Realization of this communication phase is based on the set of nodes cooperation that relay a packet. Short radio link communication range precludes (for many nodes) sending packet directly to the BS. Only a certain number of nodes can do this because only these are located within communication proximity (neighborhood) of the base station.
This node's communication phase with the base station has been described repeatedly in the literature [7,20,15]. Different criteria for assessing the effectiveness of the retransmission realization are being used. There are many different algorithms for packet routing. Some of these methods (proactive) determine the optimal routing path and exploit them as long as possible. Next, an algorithm strives for finding a new, an optimal path in new patch structure which yet again is exploited until an energy is depleted, etc. The other algorithms (proactive) determine the routing path, each time when it is needed. Transmission is then carried out closer to the current optimal routing path.
At this stage, we propose the following method of spatial route planning which is characterized by two important features:  this method defines the area in which routing can be performed, while the existing methods were determined by a path,  this method realizes inducing cooperation and at each node k on routing path, gives the choice of next subsequent relay k+1.
Using the spatial routing, nodes in the space S ( Fig.1) can model the routing path collectively realizing inducing cooperation. These features give us a greater flexibility in modeling communication behaviors. Moreover, making a decision collectively (within the neighborhood) increases adaptability to a varied environmental conditions. Note that, if each relay node (in Fig.1) has only 5 choices, so on the way from s to BS made up of six relays we have 5 6 = 15625 choices. It is an impressive number but we must remember that the routing path (s,t1,t2,…,t6, BS) makes a chain, whose lifespan is determined by the weakest link.
In our case it is t6 relay node. Why? Because in a sequence of relay nodes so many (all) choices is being created by s,t1,t2,…,t5 nodes. The last relay node t6, as situated in the vicinity of BS has no choice. Since one possibility is not a choice. Selection starts with two or more possibilities. Consequently, t6 has to send a packet to BS. A multitude of choices, and thus an ability to spread energy consumption on a certain subset of WSN nodes is not t6 node merit. Moreover, this node represents a base station neighbors N(BS). Thus, whatever the route is, and how many choices for routing (s, ...., BS) we have, each chosen route must end with one of these relay nodes which are neighbors of BS. What does this mean? We can spread an energy consumption for a routing path, forcing the nodes lying on its realization to work, but in the final retransmission phase, all packets, converge in the vicinity of the BS. So, we can offload nodes on a route, but we cannot relieve traffic going across nodes adjacent to the BS, because nothing can replace them. Hence the idea, if we cannot distribute loads of the nodes from BS neighborhood and this results in depletion of energy resources, thereby shortening WSN lifespan, it should ensure a periodic exchange of BS neighbors on other nodes, which have so far not been exploited so intensively or simply have more energy. Such an exchange can take place in two ways, or we will shift nodes in WSN area, or location of BS will be subjected to shift. We prefer the second solution, as more practical in implementation. An octocopter -a flying autonomous agile aerial machine will be used for BS transportation.

The importance of base stations in terms of WSN maximum lifespan
The base station data acquisition absorbs the large amount of the network nodes energy resources. The largest losses occur in the nodes that are within the BS neighborhood. This is because they carry out the main burden of retransmission. A routing paths can (indeed be differently routed) by changing the relaying nodes, but the penultimate node of the path must always be one of the nodes within neighborhood N(BS).
The maximum life time of the network, expressed in number of packets, it might send to the BS, is: where LS(k) is k node lifespan, and = ( ) is cardinality of ( ) set. If all nodes in BS neighborhood N(BS) will lose their energy, WSN loses its consistency. This is a significant loss of consistency, which leads to BS isolation, and thus the loss of basic network function, which is to gather information from the specified area.
In order to extend a maximum lifespan of the network we can introduce more BS. Following the isolation of another BS, we lose contact with parts of the network served by this station, but the other part WSN still works. The maximum lifetime of the network (while maintaining its consistency) is obtained when there is a mutual isolation of the neighborhoods of all base stations. Then we use optimally the resources of all BS neighbors.
The number of BS neighbors also depends on the radio link range and node deployment density, but we have no impact on these parameters in the process of maximization of WSN lifespan. The longest lifespan can be achieved when we will make sure that the total number of neighbors of all BS was as large as possible. It should therefore deploy BS according to the following condition: The above condition (10) states that all partition of a set of WSN nodes (mutually exclusive and collectively exhaustive neighborhoods N(BSj)) provides maximal number of all BS neighbors.
Deployment of multiple BS in WSN area, optimal in the sense of network lifetime is a complex mixed optimization problem (known as mixed integer programming), even for a homogeneous network in terms of nodes and energy distribution, as well as density distribution of the messages occurrences. The relatively easier task is to define drainage areas, if we have established BS positions. The most frequently approach used in that case is the partition of the network into a clusters, in which BS serves a cluster head role. There are plenty of such partitions, but we have not met in the literature an algorithm that would guarantee that the partition into clusters meets the required optimality criteria. In addition to these drawbacks, the most important disadvantage is, that the real WSN networks are not giving up the theoretical assumptions (7). Nodes, even if they are homogeneous in terms of hardware, are randomly distributed and their distribution changes (nodes are dying during the WSN operation). Messages in the network are uniformly generated only during monitoring of the non-emergency situations (e.g. no fire in a monitored area). The presence of special circumstances significantly interferes with this distribution. A fire on some area of the network generates much more messages than when nothing special (unusual) happens.
Hence also the diversification of energy consumption increases in this time. We need a smarter algorithm than one that finds an optimal multidimensional solution (several hundred to several thousand nodes) of the mixed programming with rare practical assumptions. Such an algorithm should take into account the dynamics of changes in the network and be run repeatedly, whenever there are changes in vital network parameters. As if that were not enough the algorithm should run in distributed mode, adjusting the solution to the local conditions. It should run adaptively in intensive monitoring area (areas under fire), and differently in areas of relatively stable monitored parameters.

The static base station issue
In order to comprehend the variety of interactions, a multitude of cases that may happen in WSN, let us begin our discussion from a case with one base station in WSN. What BS location will guarantee the longest lifetime of the network? According to (10) the best location should ensure the following condition: Assuming regular frequency of measurements, forming packets and continuous uniform distribution of nodes within WSN area with probability density function (7) (uniform distribution of homogenous nodes and messages) any, but not outlying location meets (11). Outlying (not fringe) location, means such a location for which BS radio link range falls within the ambit of the WSN area (a, b, c in Fig. 3.) Locations depicted as e, d (Fig.3) are inferior to the previous because for these locations the number of neighbors BS ( ( ) ) is lower. We have a plenty of such sufficient locations in WSN as shown in Fig. 3 (for clarity there are marked only 3). In order to conform to the load uniformity postulate for each of BS neighbor, the center of area (V spot in Fig. 3) where network operates is the best place to locate BS. The obtained results show that V spot of is the best both in terms of the mean energy consumption spent for sending a single packet (only 12.8 energy units per packet), as well as in terms of WSN life expectancy (1792 packets). In spot b, due to the greater distance between the subset of nodes (with coordinates (x, y) less than (50, 50)), the mean energy consumption for sending a single packet increases to 18.5 units. The network lifespan in this case is shorter (1358 packets sent) because neighbors with coordinates above (b, b) were less intensively utilized for retransmission. So, these burdens were shifted on remaining neighbors, which resulted in faster BS isolation from the rest of the network, although some of its neighbors (those located above (b, b)) had left energy reserves. In e case, the situation was clearly the worst in terms of both an energy consumption and WSN lifespan. BS was using resources just only a half of neighbors that greatly shortened network lifespan, and much greater transmission distances increased mean energy consumption.

The migrated base station issue
BS placement in the V spot assures the longest WSN lifespan of all other possible static locations. But, whether a BS that migrates could not to assure longer WSN lifetime that being static (located all the time at the V spot)? Let us consider another BS position as a "new" base station in WSN, so analyzing (9), each nonzero element of the sum increases the lifespan of the WSN. The optimal deployment of b base stations is determined by formula (10) so, we assumed, in simulation, that the BS will travel in a way that its neighbors' sets in successive positions were disjunctive. As the number of nodes in the network was N = 300, so after receiving consecutive 300 packets, BS changed its position, moving clockwise (as shown in Fig.4). The new BS position was determined, so that a new set of BS neighbors did not have conjoint elements with all previous neighborhoods. After receiving 4x300 = 1200 packets, such a cycle was repeated until the energy of one of the nodes was drained out completely. The results are far better than those obtained when the BS was located in the best possible static position (V) and its location was fixed. Periodically migrated BS provides a larger number of neighbors increased the network lifespan but this issue reduce energetic efficiency (an average energy consumption per packet has increased noticeably). That was an obvious trade-off.
The number of neighbors (on average four times), we expected a commensurate increase in WSN lifespan. As a result we obtain a prolongation of WSN lifespan, but unfortunately it was not even doubled. Where we have lost so much potential energy resources (12)? Well, there are three reasons for this; firstly we do not know whether other BS migration path would not give better results. Secondly, the migration of the base station does not take into account changes in the WSN topology. Subsequent BS positions were determined before the WSN nodes start to be active. After another round, taking into consideration these nodes, which energy was almost drained, the new BS positions should always take this into account. Thirdly, a migrating base station is not equal to four ones still remaining in their initial locations. Each of these static BS supports only a part of the WSN and thus realizes communication more efficiently. One migrant BS serves the entire WSN and thus being in the A spot (see in Fig. 4) must receive packets sent from the vicinity of the nodes located in the C spot. So, we really know that BS at each position is working not optimally, generating such a significant loss of energy resources. Only a large number of neighbors make the total balance of such activity positive. In the case depicted in Fig. 4 a lot of energy is being simply wasted, hence far from the best, but yet better than previously had been achieved.

The adaptive migration of a base station
A static assignment of BS location takes into consideration anticipated (and what is more important static) sensors activity. It is a common knowledge that situation in WSN changes, some areas are more active some even dormant -it is very infrequent unlikely situation that entire WSN area is active. The routing activity entails substantial energy consumption and changes network communication conditions. A new situation requires changes and these involve BS location change -as per analogy to military tactical charts, no one will start repositioning troops on a map from a scratch (deployment of a new map) but using runny movements of existing available units. Similarly with Base Station -smooth transition from one dynamic event to another entails migration of BS to follow resultant changes. WSN adaptation involves migration of the BS towards "hot" area, whereas the remaining region is covered cursorily.
Typically, at early life of WSN -its energy is distributed evenly across entire its area. Gradually with time, this changes. There are some nodes with no energy and WSN operation becomes problematic. Since the dynamic allocation of energy within the network is not (directly) possible, we propose the migration of BS that can greatly influence on energy distribution and consumption across the nodes. Since adaptive migration is a result of smart interaction between BS and its vicinity, now we consider how to determine a migration vector in the BS vicinity. In order to do so, a number of messages received by each node within BS neighborhood must be known. Having these numbers, for each node ∈ ( ) we calculate node's load quotient within BS neighborhood as where: is a number of messages received by n-th node, ∑ ( ) -is a total number of all messages received by nodes within ( ) neighborhood.
Once the load quotients of nodes are calculated, we take into account only few of BS neighbor nodes and treat ( ) values, as magnitude of vectors significant in determination of BS migration vector. Then using simple vectors addition of these significant ( ; ∈ ) vectors as components (Fig. 5), we shape BS migration vector as follows: where * ( ) ⊂ ( ) is a significant neighborhood of BS. Now, in order to move BS we need to decide, how long this movement should be. It is being decided by  value, a movement distance factor that shapes BS movement distance from its original position. • where Range is a BS radio link range parameter, k is lower bounds parameter for BS movement distance.
The formula (15) provides some kind of neighborhood ( ) continuity during the BS migration. .

Figure 5. Shaping the BS migration vector
However there should be one more observation detected. We select only some of all calculated node's load quotients. One may wonder what and why such a criterion choice is? In our simulations, we were able to choose, building a BS migration vector , all the neighbors since we knew their locations. So there was no difficulty in defining direction and sense of all vectors. Selection of neighbors taking part in the shaping of the vector (14) allows for smart elimination of unwanted nodes in this process. For example, if a node transmits the parameter temperature in my environment, and this temperature is too high (potentially harmful), then BS should not migrate in that direction. Often in the real world, only some nodes locations are known to BS, then it is apparent to include only those nodes in the equation (14).
BS migration shall continue until such location is reached, in which a balanced number of messages reaches BS from all directions in its vicinity. Such a case, in the real world situation may never occur, so in order to stop redundant movements, to prevent further energy drain, we introduce indifference constant k (refer to (15)) that decides if any additional movement shall be done or not. If the left part of condition (15) is not fulfilled, BS remains on its previous position.

Hop zones distributions
All Wireless Sensor Networks has a circular shape of their close neighbor's communication range. If a Base Station is located in communication proximity of nodes, these nodes are in BS neighborhood, and if messages sent from a node cannot reach directly BS and this action requires relaying nodes -a distance from one node to another closer to BS is called hop, so a message having more than 1 relaying node on route to BS needs to travel through 2 hops. Hop zones gather nodes with the same communication distance to a BS. WSN rules enforcing messages send out to a node located directly within next hop. However, some nodes could potentially have more energy (or located on hop border) to breach the one hop limit and sent message out to another node in next hop. Communication between hop zones is primarily dependent on a node that initiates communication towards sink, because it shapes, by its communication range, entire traffic, deciding to which node in next hop a message is sent. This action is crucial, since a node starts a chain reaction in relaying node. A route will only change once energy of any node on this communication path is drained. Let's assume that we have capability to influence a node where and how far it sends a message. By this feature we may manipulate that messages are being sent as far as communication range extends which ultimately may lead to reduction of regular hops number on a long path. Whether this pays off, yet again, it results from WSN layout and participating nodes. As experiments shows [10] having variable number of hops (based on nodes arrangement) and feasibility to influence message distance send out, a noticeable amount of energy may be preserved.

Location of nodes in WSN
Another vital aspect in WSN is mutual location of the nodes. Only BS can know its precise location among the other nodes (hence only BS is able to plot its migration vector). Not all WS node have capability to precisely define their position in space. Only a few of nodes have optional (built-in or add-in) GPS device, such nodes with GPS are exceptionally useful for remaining nodes without this capability, they can act as beacons -providing other nodes with their position at the same time enabling to set position on their own. Having three beacons in communicational range gives a node an opportunity to precisely set its position.
After this operation such a node becomes an anchor which unfortunately cannot be used for any further nodes location designation. Node's (anchor) location could be determined either by Ad hoc On-Demand Distance Vector (AODV) Routing developed in Nokia Research Center, University of California, Santa Barbara and University of Cincinnati [17] or Angle of Arrival using Received Signal Strength [20,21]. Node's position can be also relatively precisely determined based on loss of transmitted signal strength. When there are just two beacons and one anchor nodes location designation is still possible, but less precise than before. The least accurate location designation applies to a situation where there are just three anchors in node's proximity. In each case where anchor is used to location designation, it is being recognized as a classifier rather than a positioning element.
A constellation term, known from astronomy as a group of stars involved in a specific area of the celestial sphere that is shown in the relative position on the Earth night sky, could be also applied in WSN field, per analogy celestial bodies (nodes), sky (WSN), Earth (BS). Therefore constellation in WSN can also show only relative position, towards selected, known points. The advantage of constellation is that one need to know neither precise distance between nodes nor having any single beacon in a communicational proximity. One needs only select a reference point and then can calculate distance to it. Main disadvantage of this method is that it accumulates errors, the greater the determined distance the bigger inaccuracy. However these cumulative errors can be partially mitigated by introducing at least one beacon.

Conclusions
Two methods of WSN energy preservation (theoretically and simulation proven) are directed and spatial communication. Both in many cases may save energy expense of a certain nodes and ultimately the whole network, however infrequently these contribute to WSN lifespan prolongation. Introducing a migrated BS into a static WSN environment may bring further energy savings for whole network and assure that network lifespan will be much longer that in a static one. There is no need to underline how important WSN lifespan issue is; there is a common knowledge the longer the weakest WSN link (a node with the least energy left) is active the longer WSN lifespan is. Usually having this knowledge in mind, algorithms made attempt to distribute messages load (packets sent from source to a sink) evenly across neighboring nodes to prevent premature death of this node. Nonetheless it could remediate such situations, preventing BS isolation outside (the communication range) of other nodes, but in certain conditions (e.g. where BS was located in a corner of WSN area with only a few neighbors - Fig. 2) were ineffective. Such a case could be improved having a mechanism allowing migration of base station(s). BS migration could be fixed (based on defined criteria) or adaptive. Both are having their advantages and drawbacks. However their disadvantages may be neglected if the only criterion is WSN prolongation.
When the base station migrates in a WSN, every time it musts ensure that it does not lost contact with network nodes. Also, in order to ensure the best survival of relay nodes (which actively support it work), it should stay as close as possible to the most active regions of the network. Constantly changing its location the base station also changes its neighbors. This implies that the base station (BS) should match its velocity with currently neighboring nodes to keep abreast. Any collective behavior is solely based on observable phenomena within neighborhood. In the tested issue nodes within BS neighborhood helps it to calculate the velocity vector (14). However, change the location of BS must occur in accordance with the relay activity of the WSN nodes. The integration of these behaviors results in a stable BS location, where most active regions of the network are at least some minimum distance from BS. In terms of energy savings this is an optimal solution, however, because of the intense burdening neighborhood nodes is advantageous to periodically change the BS location.
During our experiments in both simulated and first real life environments we found some intriguing and at the same time interesting issues that for now are worth to be mentioned (irregular and not quite circularly shaped hop zones, BS location determination in WSN area, new hop zones determination after BS movement) and in a near future will a the subject of our research.