**7. 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

$$L\_n(BS) = \frac{\mathcal{M}\_n}{\Sigma^{\ell}\_{\mathcal{N}(BS)}\mathcal{M}\_\ell} \tag{13}$$

where: ��is a number of messages received by *n-*th node,

108 Wireless Sensor Networks – Technology and Protocols

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

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

consumption per packet has increased noticeably). That was an obvious trade-off.

wasted, hence far from the best, but yet better than previously had been achieved.

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

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

**7. The adaptive migration of a base station** 

is covered cursorily.

∑ �� � �(��) - 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:

$$
\overline{\mathbf{w}} = \sum\_{\mathcal{N}^\*(BS)}^f \overline{L\_l(BS)} \tag{14}
$$

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.

$$k < a \cdot \overline{w} < Range$$

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.
