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

$$LS^1(WSN) = \begin{bmatrix} \sum\_{k=1}^{l} LS(k) \; ; \; k \in \mathcal{N}(BS) \end{bmatrix} = LS(BS) \tag{8}$$

where *LS(k)* is *k* node lifespan, and � � ������(��)� is cardinality of �(��) set.

**Figure 2.** Single BS routing simulation – energy consumption of the WSN nodes

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.

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

$$LS^b(\mathcal{WSN}) = \sum\_{l=1}^b LS\{BS\_l\} = \Sigma\_{l=1}^b \left[ \Sigma\_{k=1}^{l\_f} LS(k); \ k \in \mathcal{N}\{BS\_l\} \right] \tag{9}$$

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:

$$\mathcal{Card}\left(\cup\_{j=1}^{b}\mathcal{N}\{BS\_{l}\}\right) \to \max \quad \forall f \; \left(\forall k, l \in \{1, 2, \dots, b\}; k \neq l\right) \left(\mathcal{N}\{BS\_{k}\} \cap \mathcal{N}\{BS\_{l}\} = \emptyset\right) \tag{10}$$

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.

## **6. WSN with one base station**

104 Wireless Sensor Networks – Technology and Protocols

BS, is:

agile aerial machine will be used for BS transportation.

must always be one of the nodes within neighborhood *N(BS).*

���(���) � �∑ ��(�) �

**Figure 2.** Single BS routing simulation – energy consumption of the WSN nodes

network function, which is to gather information from the specified area.

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

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.

where *LS(k)* is *k* node lifespan, and � � ������(��)� is cardinality of �(��) set.

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

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

The maximum life time of the network, expressed in number of packets, it might send to the

��� � � � �(��)� � ��(��) (8)

### **6.1. 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:

$$\text{Card}\{\mathcal{N}(BS)\} \to \max \tag{11}$$

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.

**Figure 3.** The base station locations and WSN lifespan simulation with energy consumption

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.

### **6.2. The migrated base station issue**

106 Wireless Sensor Networks – Technology and Protocols

(������(��)� ) is lower.

������(��)� � ��� (11)

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

**Figure 3.** The base station locations and WSN lifespan simulation with energy consumption

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

$$LS^b(WSN) = \sum\_{l=1}^{b} LS\{BS\_l\},\tag{12}$$

increases the lifespan of the WSN.

**Figure 4.** The base station migration and WSN lifespan simulation with energy consumption

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.
