{'fraction_non_alphanumeric': 0.02891022793288453, 'fraction_numerical': 0.007073779175067491, 'mean_word_length': 4.437383872166481, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Simple Semi-Distributed Lifetime Maximizing Strategy via Power Allocation in Collaborative Beamforming for Wireless Sensor Networks

Energy-efficient communication is an important issue in wireless sensor networks (WSNs) consisting of large number of energy-constrained sensor nodes. Indeed, sensor nodes have different energy budgets assigned to data transmission at individual nodes. Therefore, without energy-aware transmission schemes, energy can deplete from sensor nodes with smaller energy budget faster than from the rest of the sensor nodes in WSNs. This reduces the coverage area as well as the lifetime of WSNs. Collaborative beamforming (CB) has been proposed originally to achieve directional gain, however, it also inherently distributes the corresponding energy consumption over the collaborative sensor nodes. In fact, CB can be seen as a physical layer solution (versus the media access control/network layer solution) to balance the lifetimes of individual sensor nodes and extend the lifetime of the whole WSN. However, the introduction of energy-aware CB schemes is critical for extending the WSNs lifetime. In this paper, CB with power allocation (CB-PA) is developed to extend the lifetime of a cluster of collaborative sensor nodes by balancing the individual sensor node lifetimes. A novel strategy is proposed to utilize the residual energy information available at each sensor node. It adjusts the energy consumption rate at each sensor node while achieving the required average signal-to-noise ratio (SNR) at the destination. It is a semi-distributed strategy and it maintains average SNR. Different factors affecting the energy consumption are studied as well. Simulation results show that CB-PA outperforms CB with Equal Power Allocation (CB-EPA) in terms of extending the lifetime of a cluster of collaborative nodes.

terms of energy-efficient communication is that the CB technique inherently spreads the energy cost over a group of collaborative sensor nodes [17].
Two requirements must be satisfied while implementing the CB, namely, phase synchronization and information sharing. The first requirement implies that the carrier signals from different sensor nodes must be synchronized in phase and frequency to achieve coherent transmission.
Distributed schemes for estimating the initial phases of the local node oscillators in WSNs have been introduced in [18], [19] . A synchronization algorithm developed in [18] uses a simple 1-bit feedback iterations, while other methods developed in [19] and [20] are based on the time-slotted round-trip carrier synchronization approach. The second requirement implies that information to be transmitted must be available at all sensor nodes before the CB transmission step for enabling simultaneous transmission of the same data symbol. Information sharing can be achieved in a straightforward manner via broadcasting a common symbol from one sensor node to other collaborative sensor nodes if the WSN has only one source node, and over orthogonal channels in WSNs with multiple source nodes [21].
The CB with equal powers transmitted by sensor nodes, which will be called hereafter CB with Equal Power Allocation (CB-EPA), can still lead to the situation where sensor nodes with smaller energy budgets drain out of energy faster than the rest. Energy consumption is considered in some particular CB schemes existing in the literature. Specifically, the power-saving effect of the CB technique is studied in [17] with the assumption of free-space channels between the sensor nodes and the targeted BS/AP. In [22], sensor node scheduling is proposed for CB where the participating sensor nodes are selected in each round of transmission to balance the remaining energies at all sensor nodes. A game-theoretic approach is used in [23] for power control among different WSN clusters utilizing CB for transmission. The corresponding algorithms are addressing different aspects affecting the WSN lifetime such as scheduling and power allocation among clusters of sensor nodes. However, for the corresponding algorithms, information about all sensor nodes in a cluster is required at a central point to, for example, schedule the sensor nodes appropriately in order to achieve a balanced remaining energy across the cluster. Distributed algorithms, which allow to avoid an overhead in WSNs, are however of significant importance.
In this paper 1 , the CB technique with power allocation (CB-PA) is developed to extend the lifetime of a cluster of collaborative sensor nodes in a WSN. A novel strategy is proposed to achieve this goal by balancing the lifetime of individual sensor nodes instead of balancing their energy consumption. Residual energy information (REI) available at each sensor node is utilized to adjust the transmission power of each sensor node while achieving the required average signalto-noise ratio (SNR) at the targeted BS/AP. The proposed algorithm requires significantly lower overhead and computational complexity as compared to the centralized algorithms. Note that in WSNs, distributed algorithms are generally preferred over centralized protocols even when they offer only a sub-optimal solution [25]. Simulation results show that CB-PA outperforms CB-EPA in terms of the lifetime of a cluster of sensor nodes and the SNR improvement at the BS/AP. Different factors affecting the performance of the proposed power allocation strategy are investigated. For example, we show that the initial energy distribution across sensor nodes affects the lifetime of WSN. We also show that implementing the multi-link CB [11] is preferable in terms of the energy-efficiency than the single-link CB [10], [16]. Moreover, reduction of the required bit rate [bits/sec/Hz] leads to a considerable increase in the WSN lifetime.
The rest of the paper is organized as follows. The WSN geometric and signal models are introduced in the next section. Section III motivates and introduces an energy consumption model for WSNs. The notion of the lifetime of a cluster of WSN is also introduced. A novel partially distributed and efficient power allocation strategy for CB in WSN is introduced and investigated in Section IV. Section V further discusses the effect of different factors such as, for example, initial energy distribution in a cluster of WSN and consideration of multi-link CB versus single-link CB on the WSN lifetime. The latter studies are also performed in terms of simulations in Section VI. The paper ends with conclusions. This paper is reproducible research [26] and the software needed to generate the simulation results will be provided together with the paper upon its acceptance. 1 Some initial results have been reported in [24].  are randomly placed over a plane. 2 Sensor nodes serve as collaborative nodes to transmit data to a remote BS/AP, denoted as D. We use polar coordinates (ρ, φ), where ρ is the distance from the origin to a given point and the angle φ represents the azimuth direction. Let us assume that the destination BS/AP is located at (̺ D , ϕ D ) and is in the same x-y plane in which the sensor nodes are located. Let the rth sensor node be located at (ρ i , φ i ). The polar coordinates of sensor nodes are chosen independently and randomly according to an arbitrary spatial distribution. Each sensor node is aware of its location and is able to communicate with other sensor nodes in the cluster using links with low power consumption for information sharing and synchronization.

A. Geometric Model
We also assume that sensor nodes are frequency synchronized and frequency drift effects are negligible [19].

B. Signal Model
Collaborative sensor nodes are assumed to have access to the data/measurements to be transmitted to the intended BS/AP. Information sharing is performed by broadcasting the data from one source node to all other nodes in its coverage area [10], [11], [21]. In the case of multiple source nodes, information sharing can be achieved over orthogonal channels in frequency, time, 2 We will use i and p to denote the sensor index and later in the case of multi-link CB we will use k and l to denote the BS/AP index. 6 or code to avoid collisions. Note that the use of time orthogonal channels requires scheduling which can be achieved by an appropriate MAC protocol or using the BSs/APs as a central scheduler. Alternatively, the existing collision resolution schemes can be used [27]. We assume that the power used for broadcasting the data by the source node is high enough so that each collaborative node c i can successfully decode the received symbols from the source node.
During the CB step, collaborative sensor nodes use the same codebook with zero mean, unit power, and independent symbols, i.e., E {z n } = 0, |z n | 2 = 1, and E {z n · z m } = 0 for n = m where z n stands for the nth symbol from the codebook and E{·} denotes expectation.
Considering a discrete-time system, each collaborative node c i , i = 1, 2, . . . , N from a cluster of N nodes in WSN transmits the signal where z is the transmitted symbol, w i is the CB real valued weight for senor node c i . The real-valued w i controls the transmission power of sensor node c i since P i = w 2 i , and ψ i is the initial phase of the carrier. The initial phases of the carriers are adjusted using the well known algorithms [18]- [19], while we are interested here in finding the real-valued w i , i.e., in controlling the transmit power. However, it is worth noting that although we refer to w i as the CB weight for simplicity, the actual CB weight at the collaborative node c i is a complex-valued beamforming weight, that is, w i · e jψ i .
Under the assumption of far-field region, i.e., ̺ D ≫ ρ i , the Euclidean distance between the collaborative node c i and a point (̺ D , φ) in the same plane is given as and the corresponding phase shift is Thus, using the knowledge of the node location and the direction of the destination D, the initial phase of each sensor node carrier must be set as (see the closed-loop scenario in [10]) in order to achieve coherent combining at the destination D. In (4), λ is the wavelength. Alternatively, synchronization can be performed without any knowledge of the node locations using time-slotted round-trip synchronization [19] or feedback-based synchronization [18]. Sufficient level of phase accuracy and reliability is achieved with these techniques at the cost of small overhead. Then, the received signal at angle φ from all collaborative nodes in a cluster can be written as where a i is the channel coefficient between the ith collaborative node and the destination D and n ∼ CN (0, σ 2 n ) is the AWGN at the direction φ with variance σ 2 n . Practical implementation for CB in WSNs requires the sensor nodes to be deployed over a large cluster area to achieve CB beampattern with narrow mainlobe [10]. Consequently, the distances between sensor nodes are assumed to be very large relative to the carrier wavelength at the operating frequency and the channel coefficients are uncorrelated. The received signal at the BS/AP, (φ = ϕ D ), can be then expressed as where is the channel vector, and (·) T denotes the transpose of a vector. The corresponding SNR γ is given by

III. ENERGY CONSUMPTION MODEL IN A CLUSTER OF WSN
In this section, we develop an energy consumption model for a cluster of WSNs with focus on the energy dissipation corresponding to CB weights. We also introduce specific definition for the lifetime of a cluster of collaborative sensor nodes implementing CB transmission.

A. Energy Consumption Model
A popular energy consumption model has been introduced in the literature for transmission in WSNs [22], [28], [29]. This model is commonly used for the analysis of the media access control and network layer protocols designed in order to maximize the network lifetime. The overall energy consumption consists of the energy consumed by the radio-frequency (RF) transceiver hardware in both transmission and reception phases. The consumed energy in the transmitter is dissipated in the circuit electronics and the power amplifier. On the other hand, the receiver does not have a power amplifier and the energy is dissipated in the circuit electronics only.
The energy consumed by the transmitter can be expressed as where E e,Tx represents the energy consumption of the transmitter electronics and E a is the energy consumed by the transmit power amplifier. The energy E e,Tx is consumed in the transmitter hardware, including the oscillator, frequency synthesizer, mixers, filters, baseband processor, etc.
This energy is considered to be constant for a specific hardware. The energy consumed in the power amplifier of c i 's collaborative sensor node depends on the CB weight w i assigned to this sensor node. The transmitted power from each individual sensor node is P i = w 2 i . A time-slotted transmission is considered and sensor nodes transmit data to the targeted BS/AP over time slot t of length T seconds. The energy E a consumed during one time-slot is then given by The total transmitted power P Tx = N i=1 P i has to compensate the attenuation due to propagation distance. If free-space propagation is considered, P Tx can be written (in dB) as where P Rx [dB] is the received power at the destination corresponding to the received SNR γ, d is the distance over which data is being communicated, PL 0 [dB] is the path-loss at the nominal distance d 0 , and α is the path loss exponent.
The energy consumed at the receiver can be expressed as where E e,Rx represents the energy consumption of the receiver electronics. Similar to E e,Tx , E e,Rx is considered constant for specific hardware. In the following analysis, we only consider the energy consumption corresponding to the CB transmission in WSNs and, thus, we neglect E e,Tx and E e,Rx because it is the same for both CB-EPA and CB-PA.

B. Lifetime of a Cluster of Sensor Nodes
The network lifetime has many definitions in the literature. However, the common understanding of the network lifetime is the time period until the WSN stops performing its assigned tasks [30]. Particular definitions depend on the criteria according to which the network is recognized as not functional.
In the context of WSNs, where a cluster of collaborative nodes utilizes CB for transmission, two main tasks should be performed in order for the network to be functional. First, sensor nodes are required to collect information from the surrounding environment. Second, sensor nodes are required to communicate the collected information to the BS/AP using CB. Thus, we define the lifetime of a cluster of collaborative sensor nodes, denoted hereafter as τ , as the time period during which the number of alive sensor nodes is larger than a certain value and the collaborative sensor nodes are able to achieve acceptable SNR at the targeted BS/AP.

IV. POWER ALLOCATION STRATEGY FOR CB
In this section, we propose a low-complexity and semi-distributed power allocation scheme for CB in a cluster of collaborative nodes of WSN aiming at balancing the lifetimes of individual sensor nodes in order to maximize the lifetime of the cluster.

A. Power Allocation Strategy
Proper operation of WSN requires that the achieved SNR γ at the BS/AP does not fall below a certain level for correct reception of the signal. Power allocation that maximizes the beampattern gain at the BS/AP under the total and individual power constraints can be used to design the CB weights. The corresponding optimization problem can be stated as where P tot denotes the total power to be transmitted from the sensor nodes at each round and P max is the maximum transmitted power for each sensor node. Alternatively, the power allocation problem can be reformulated as extension of the lifetime of the network by minimizing the norm of the CB weights vector while insuring that the SNR γ is larger than a predetermined average valueγ E{γ} at the intended BS/AP under the individual power constraints. The corresponding optimization problem can be written as Despite the fact that the aforementioned optimization problems can be solved computationally very efficiently, to address them practically, it is required to find the optimum solution centrally at the BS/AP, which will be subsequently transmitted to the sensor nodes (each individual weight to the corresponding sensor node). This scenario requires very large transmission overhead between the sensor nodes and the BS/AP and thus is not suitable for the WSN applications because of the high communication complexity. Therefore, it is of great interest to solve the power allocation problem in a distributed fashion.
Power allocation for CB should achieve the following purposes: • CB weights should balance the lifetime of individual sensor nodes instead of equalizing the energy consumed for individual CB transmissions; • It should be guaranteed that the received SNR γ at the targeted BS/AP achieves the predetermined average valueγ over the lifetime.
To achieve the aforementioned requirements, power allocation can be performed in two steps.
Namely, the first step is to calculate a normalized CB weights based on the REI at each sensor node to balance the lifetime of individual sensor nodes. The second step is to find a scaling factor, i.e., maximum CB weight, to achieve the required average SNRγ at the targeted BS/AP.
Let the vector u = [u 1 , u 2 , . . . , u N ] T , u i ∈ [0, 1], stands for the normalized CB weight vector and w max is the maximum CB weight. Then, the CB weight vector can be found as that is, the weight w i is a fraction of the maximum CB weight given the corresponding normalized CB weight u i . Also, let us introduce the vector e = [e 1 , e 2 , . . . , e N ] T as the REI vector, where e i ∈ [0, E max ] and E max is the battery capacity, which is assumed to be initially the same for all collaborative sensor nodes in a cluster.
In order to find the normalized CB weights, i.e., the vector u, we assume that each sensor node can measure its own REI e i . The normalized CB weight vector can be then designed to balance the lifetimes of different sensor nodes so that larger CB weights are assigned to sensor nodes with larger REIs. A simple and fully distributed way of obtaining the normalized CB weights can be expressed as We call such scheme distributed because the normalized weight at one collaborative sensor node is independent of any information required to compute the weight at another collaborative sensor nodes in a cluster of WSN.
The scaling factor w max corresponding to u is used to adjust the average received SNR at the targeted BS/AP and has to be also computed. The average SNRγ at the targeted BS/AP D can be found asγ Substituting (14) into (16), the average SNRγ can be expressed after some straightforward computations as a function of w max , that is, where m u , σ 2 u , m a , and σ 2 a are the mean and variance of the normalized CB weights and the mean and variance of the corresponding channel gains, respectively. Then, the maximum transmission CB weight corresponding to the average SNR (17) at the targeted BS/AP D can be found by solving (17) for w max , and it can be expressed as The mean and variance of the normalized CB weights can be found from the mean m e and variance σ 2 e of the REI as where m e and σ 2 e can be obtained through consensus or distributed estimation algorithms [31]- [34]. Thus, also m e and σ 2 e are computed in a distributive manner, the scaling factor w max has to be communicated to all collaborative sensor nodes in a cluster. Therefore, we call the proposed power allocation technique semi-distributed.
The power allocation can be performed every time slot. It results in an undesirable overhead since the normalization factor w max has to be computed and collected by individual CB nodes at every time slot. However, the remaining energy at different nodes is not changed dynamically for consecutive time slots. Thus, power allocation does not need to be performed every time slot and the BS/AP can instruct the sensor nodes to perform power allocation only when needed to minimize the overhead.
An alternative way that allows to avoid calculating w max is the following. Start the CB transmission with predetermined value w max =ŵ max . The targeted BS/AP instructs then the collaborative sensor nodes in a cluster to increment/decrement w max in predetermined steps to reach an acceptable SNR at the BS/AP. Note that the number of sensor nodes N in the cluster should be large enough to achieve the required SNR with w max ≤ √ P max given by the specifications of the sensor node transmitter.

B. Residual and Wasted Energies
In addition to the lifetime notion, there are other important notions such as the residual and wasted energies. The wasted energy is naturally the energy that is left in sensor nodes in a cluster of a WSN after the cluster is no longer able to perform a prescribed function with a required quality of service, such as SNR requirement at the targeted BS/AP. The wasted energy is as well an important characteristic of WSN especially from the energy efficiency point of view.
Let e i (0) be the initial energy budget dedicated to CB at each sensor node c i , i = 1, 2, . . . , N.
Then the residual energy at the sensor node c i at the end of the t-th transmission round can be expressed as The residual energy at the sensor node c i when the cluster of sensor nodes dies, denoted as ǫ i , can be correspondingly given as that is the difference between the initial energy budget and the energy used during all transmission round until the last round τ after which the cluster of WSN dies.
Finally, the wasted energy at a whole cluster of sensor nodes is defined as the total unused energy in the cluster when it dies and it is given by Then the wasted energy can be expressed as a percentage of the total initial energy as

C. CB with Equal Power Allocation
The CB-PA needs to be compared to the CB-EPA, i.e., the CB for which the CB weights are equal, that is, u i = 1. The average SNRγ for in the case of equal power CB can be expressed where w CB−EPA is the maximum transmission weight for the CB-EPA, while the vector of CB weights in the case of CB-EPA is simply the product of the vector of ones, since for CB-EPA u i = 1, ∀i, and w CB−EPA . The average SNRγ (25) can be then simplified as follows Solving (26) for w CB−EPA , the CB weights can be found as V. FACTORS AFFECTING LIFETIME CB-PA increases the lifetime of the WSN, however, different factors affect the efficiency of the power allocation.

A. Initial Energy Distribution
The energy budget can have different distributions among sensor nodes in a cluster. We will consider two distributions. One is uniform distribution where the initial energy can take any value from zero to the maximum. Gaussian distribution is considered as well, it represents the case when the initial energy take a nominal value with some deviation around this value.

B. Single-link and Multi-link CB
The required bit rate can be achieved using single-link CB where all collaborative sensor nodes transmit as one cluster. Alternatively, multi-link CB can be used when we target K BSs/APs located at different directions. In this case, sensor nodes are grouped into clusters, where each cluster consists of N/K sensor nodes and targets different destination, thus establishes independent link. This scheme is called multi-link CB [11].
Let M k be a set of nodes targeting BS/AP denoted D k . During the CB step, each collaborative node c i , i ∈ M k transmits the signal where ψ k i is initial phase in this case, thus Then the received signal at angle φ from all collaborative sets of sensor nodes M k , ∀k ∈ {0, 1, . . . , K} can be written as The received signal at the BS/AP D l can be written as The first term in (31) is the signal received at the BS/AP D l from the desired set of collaborative nodes M l and the second term represents the interference caused by other sets of nodes Let the interference be controlled to a very low level using the methods of sidelobe control [11], [35], [36] and thus can be neglected for simplicity.
Then, (31) reduces to be (6) and the difference between single-link and multi-link CB is now only in the number of collaborative nodes targeting each BS/AP.
The average SNR at the intended BS/AP D l for the multi-link CB can be found as Since K source-destination links are used simultaneously, the average transmission rate of the multi-link CB with node selection can be expressed as

C. Bit Rate
The logarithmic relation between the SNR and the corresponding bit rate suggests that reducing the bit rate by few bits will result in huge reduction in the required SNR, and thus, in reduction of the consumed energy at each transmission round and increase of the network lifetime.

D. Number of CB Weight Quantization Levels
In practice, sensor nodes can transmit with only a finite number of power levels and thus the CB weights have to be quantized. It is expected that if the CB weight is allowed only to take few quantized values, the energy consumption rate will not be perfectly equalized between different sensor nodes.

VI. NUMERICAL STUDY
Numerical simulations are used to illustrate the usefulness of the proposed CB-PA for extending the lifetime of a cluster of sensor nodes and study different factors affecting its performance.
In the following examples, we consider a cluster of randomly distributed sensor nodes over a disk with normalized radius 250λ, where λ is the wavelength of the signal carrier. The BS/AP is located at the direction ϕ D = 0 o and 1 Km away from the sensor nodes. The total number of collaborative nodes in the cluster is N = 100 and the required average SNRγ at the targeted BS/AP to achieve bit rate of 4 [bits/sec/Hz] is 11.76 dB. Let the noise power to be -100 dB and the path-loss PL 0 at d 0 = 1 is 40 dB. Assuming path-loss exponent α = 2, the required total transmit power becomes P Tx =γ + PL 0 + 10 · 2 · log 10 (1000) − 100 = 11.76 dB.
In outdoor WSN applications, i.e., the scenarios in which CB is needed, sensor nodes are deployed randomly on the ground and the antenna heights are very low, so that the transmitted signals are obstructed mainly by the ground [37]. Therefore, we consider the channel characteristics near the ground [38], [39] where, besides the path-loss, the large-scale fading has to be considered. In such case the fluctuation/shadowing effect of channel coefficient mean appears because of hills, forests, buildings, etc. in the signal path. Typically, the wireless channel attenuation/fluctuation A i for ith collaborative node is assumed (accurately) to be a zero-mean Gaussian distributed random variable (in dB) i.e., A i ∼ N (0, σ 2 ) with σ 2 being the variance.
The absolute channel gain value has log-normal distribution, i.e., a i = 10 (A i /10) . The variance of A i is set to σ 2 = 16 (in dB). Moreover, sensor nodes and any surrounding objects are assumed hereafter to be static, which suggests that the channel attenuation varies very slowly with time [37], [40]. Therefore, the channel can be considered as constant during each CB transmission round.
We assume two distributions for the initial energies assigned to different sensor nodes in a cluster, namely uniform and Gaussian distributions. For both distributions, the initial energies are  This means that for uniform distribution with CB-EPA, 90% of sensor nodes die or are unable to achieve acceptable SNR with about 42% of cluster initial energy not used, while 14% of initial cluster energy is not used when the cluster dies if the proposed CB-PA is employed. It clearly demonstrates the advantages of using power allocation strategy based on which sensor nodes manage to use most of the cluster energy of sensor nodes assigned for CB. For the case of Gaussian distributed initial energy, the CB-PA outperforms the CB-EPA and achieves lower energy depletion rate. Moreover, in the case of Gaussian distribution, energy depletes slower than in the case of uniform energy distribution for both CBs tested. This is due to the fact that for Gaussian distribution, the residual energy values are concentrated around the mean value m e with less values closer to 0 and E max . The wasted energy is less for the CB-PA as compared to the CB-EPA in the case of Gaussian energy distribution. In addition, Fig. 3 shows the received SNR at the BS/AP versus time. The SNR demonstrates similar behavior as the percentage of sensor nodes alive. Note in Fig. 2 that more than 70% of the sensor nodes are still alive, however, as Fig. 3 shows, the achieved SNR dropped below the nominal average value and thus the cluster is considered dead. Note that the energy per bit to the noise power spectral density ratio E b /N 0 curves can be easily obtained by simply scaling the corresponding SNR curves according to the almost doubled the cluster lifetime. In addition, Fig. 8 shows the received SNR at the BS/AP versus time and Fig. 9 shows the corresponding average bit rate. As expected, the bit rate decays similar to the SNR to the logarithmic relation. The SNR shows similar behavior to that of the percentage of sensor nodes alive in Fig. 10.