In the forthcoming smart society, many sensor nodes will be deployed to sense the environment to support context-aware applications. Most of the sensors will be connected to the Internet via low power wide area (LPWA) technologies such as NB-IoT and LoRa . In the data collection process, generally, the sink node has to collect data from each node, one by one, which will take a long time when there are millions of nodes in a LPWA cell. In addition, many nodes share a common channel, and the increase in the number of nodes will lead to more transmission collisions.
On the other hand, in some tasks, people are only interested in the statistics of sensor data, not their respective values, e.g., the average temperature, moisture in an area. For these cases, it is possible to exploit a more efficient method called over-the-air computation (AirComp) . This method integrates the data collection and processing in one slot. Specifically, all nodes simultaneously transmit their signals in the analog wave, and their fusion (sum) is achieved by the addition of electromagnetic wave in the air, at the antenna of the sink. Besides the sum operation, AirComp can support any kind of nomographic functions [3, 5, 1], if only proper preprocessing is done at the sensor nodes and post-processing is done at the sink.
To ensure unbiased data fusion, it is required that signals from all nodes arrive at the sink, aligned in signal magnitude. This is usually achieved by transmission power control at sensor nodes [6, 4]. Specifically, each node uses a transmission power inversely proportional to the channel gain so as to mitigate the difference in channel gains. Obviously, for a node far away from the sink with a low channel gain, even using the largest transmission power cannot equalize the channel, and the misalignment in signal magnitude unavoidably occurs under the constraint of transmission power.
Path diversity by a relay is a conventional and effective method to reduce the outage probability. The decode-and-forward (DF) method applies error correction codes to protect signals. Amplify-and-forward (AF) is simpler, where a relay node simply amplifies the received signal (together with noise). There have been many literature on relay for the unicast communication, either AF[16, 15], DF , or their comparison . In addition, network coding-based relay also has been studied for the bidirectional communication  and the multiple access channel . But these relay methods cannot be directly applied to AirComp.
In this paper, we will investigate how to use relay, more specifically, AF-based relay, to improve the performance of AirComp. To the best of our knowledge, this is the first work in this field. AF is considered because signals in AirComp are transmitted in the analog wave. In the communication, the relay node will amplify signals from many nodes and forward them to the sink, and the whole process should try to ensure the alignment of magnitude of all signals at the sink. We first present the general relay model, and then discuss several special cases. Simulation results confirm that the proposed methods are effective in reducing the computation error.
Ii Related Work
Here, we review the AirComp method and previous solutions to channel fading.
Ii-a Air computation method
, which has zero mean and unit variance (). The sink will compute the sum of sensing data from all nodes. Both the nodes and the sink have a single antenna. To overcome channel fading, the node pre-amplifies its signal by a Tx-scaling factor . The channel coefficient between sensor and the sink is . The sink further applies a Rx-scaling factor to the received signal, as follows
where is the additive while Gaussian noise (AWGN) at the sink with zero mean and variance being . It is assumed that channel coefficient is known by both node and the sink. Then, in a centralized way, the sink can always adjust to ensure that is real and positive. Therefore, in the following, it is assumed that , , and .
The computation error is defined as the mean squared error (MSE) between the received signal sum and the target signal , as follows
With the maximal power constraint, should be no more than , the maximal power. Let denote . Then, we have . By sorting the channel coefficient () in the increasing order, the optimal solution depends on a critical number, . A node whose index is below uses the maximal power , and otherwise uses a power inversely proportional to the channel gain. Then, MSE is computed as follows:
Signal distortions may be caused by channel fading or noise. The former decides the error in the signal magnitude of signals and the latter decides the term .
Ii-B Previous improvement on AirComp
When some nodes are far away from the sink, the magnitudes of their signals cannot be aligned with that of other signals from nearer nodes. Some efforts have been devoted to solving this problem. The work in  studies the power control policy, aiming to minimize the computation error by jointly optimizing the transmission power and a receive scaling factor at the sink node. Generally, the principle of channel inversion is adopted. Specifically, with the common signal magnitude being , the transmission power of a node is computed as , being the former if is below the power constraint, and otherwise, using the maximal power. In , the authors further consider the time-varying channel by regularized channel inversion, aiming at a better tradeoff between the signal-magnitude alignment and noise suppression. Antenna array was also investigated in [17, 13]
to support vector-valued AirComp.
AirComp is an efficient solution in federated learning, where the model update is to be transmitted from each node to the common sink, aggregated there, and then sent back to each node for future data processing. Specific consideration on AirComp is also studied. Because information from some of the nodes is sufficient, node selection based on the channel gain is suggested in , although this does not apply to general AirComp where signals from all nodes are needed.
Iii Air computation with AF-based relay
A wireless signal attenuates as the propagation distance increases. With a single antenna, the effect of transmission power control in dealing with path loss and channel fading is limited. Therefore, we try to exploit relay, which has been proven to be effective in conventional communications.
Iii-a System framework
The network consists of sensor nodes, a relay and a sink . The sink will compute the sum of sensing data from all nodes, via the help of . All nodes, relay and sink use a single antenna. The relay has no constraint of transmission power. Nodes near to the sink can directly communicate with the sink, while nodes farther away can rely on the relay to help. Then, all nodes are divided into two groups, and a node is either a neighbor of () or non-neighbor of ().
Similar to the conventional AF method, the whole transmission is divided into two slots. It is assumed that channel coefficients ( and , representing channel coefficients from node to the relay and sink , respectively) are known to nodes, relay and sink , and do not change within two slots. But the transmission powers (Tx-scaling factor and in two time slots) are adjusted per node per slot.
In the first slot, a neighbor node () of relay transmits its signal using a Tx-scaling factor . The signals received at relay and sink are
where and are Rx-scaling factors, and and are AWGN noises with zero mean and variance being .
In the second slot, all nodes transmit their signals to sink , and node uses a Tx-scaling factor . Meanwhile relay also forwards its received signal, using a Tx-scaling factor . Signals arriving at sink are composed of 3 parts, as follows:
where is the signal from , is the signal from , and is the relayed signal. Then, the overall signal at the second slot is
where is a Rx-scaling factor, and is AWGN noise with zero mean and variance being .
The sink adds the signals received in the two slots. For a signal from a neighbor () of relay , its overall coefficient at the sink is
Its first term corresponds to the signal directly received in the first slot, its second term corresponds to the signal directly received in the second slot, and its third term corresponds to the relayed signal.
For a signal from a node not a neighbor ( ) of relay , its coefficient at is
The overall noise is
All the parameters are to be solved by minimizing the MSE, as follows
It is difficult to directly solve this problem. In the following, we discuss its solution under several special cases.
Iii-B Special case 1
is neglected () and is not transmitted (). In other words, in the first slot, signals from are sent to , and in the second slot, signals from are directly sent to and signals from are forwarded to by . This is the most simple relay method: the direct link is neglected once the relay is used.
With , (), and , MSE in Eq.(13) can be rewritten as,
Because can be merged into , we denote their product as , and MSE can be computed as the sum of
Then, the relay problem is equivalent to two AirComp problems, one from to in the first slot, and the other from to in the second slot. Each can be solved by using the power control algorithm suggested in . Because and can be adjusted to ensure and are positive real numbers, in the analysis, , , , , , are assumed.
Iii-C Special case 2
is neglected () but () is transmitted. Compared with case 1, the difference is that in the second slot, nodes transmit their signals again. With , , and , MSE in Eq.(13) can be rewritten as
Because also appears in the first sum, this cannot be simply divided into two AirComp problems like case 1. But , , , , , can be assumed in the analysis.
is a positive real number. Without this term, like case 1, an initial estimation of and can be computed, by minimizing and in Eq.(15), respectively.
Next consider the presence of in the first sum of Eq.(16). Assume originally some and make equal to 1.0 (or approach 1 under the maximal power constraint). If is fixed, the presence of (a positive number) makes it possible to use a smaller to make reach 1.0. Meanwhile, the term also decreases. In other words, it is possible to decrease in a certain range to reduce the first sum in Eq.(16
). Therefore, a heuristic algorithm is to use the initial estimation ofas a seed, and then gradually decrease it to find the minimum while fixing (ensuring the minimum of the second sum in Eq.(16)).
Actually, and depend on the setting of and . In addition, to ensure a fair comparison with case 1, it is assumed that the overall power, , should be no more than . Then, the power allocation for and () is to maximize the term , under the power constraint. According to the Cauchy–Schwarz inequality 
and the equality holds if and only if
Then, with , can be computed as
On this basis, and are computed from Eq.(18), and the value of is computed as
If is greater than 1.0, setting can find and the powers ( and ) that lead to 0 error in the signal magnitude.
The whole process is described in Algorithm 1.
Iii-D Special case 3
is exploited but is not transmitted (). Compared with case 2, the direct link from a node ( ) to the sink is exploited together with the relay link, but the node does not transmit its signal in the second slot, which seems more energy efficient.
With (), , and , MSE in Eq.(13) can be rewritten as
This can be divided into two problems. First, for , this is a simple AirComp problem, by which and can be found. The first sum in Eq.(21) involving is more complex, because and may not be phase aligned. Although and can shape the phase in some degree, they are common for all . They cannot be adjusted to ensure and are phased aligned for all .
Here we consider a heuristic method to solve this problem. First, if we set , the problem becomes very simple, and we can get a real-value estimation of by applying the AirComp algorithm. Next, with this as initial value of and 0 as initial value of , we try to decrease and increase so as to minimize the overall MSE.
Without loss of generality, we assume is real, and is in the form of . With given and , we still need to find a phase so as to minimize the MSE, and this is achieved by a grid search, as shown in Algorithm 2.
Iv Simulation Evaluation
Here, we evaluate the relay methods discussed in the previous section. They are named as “Relay-1”, “Relay-2” and “Relay-3”, corresponding to the 3 special cases. We also compare them with the AirComp method  that only exploits the direct link, and it is named as Direct hereafter.
shows the simulation scenario. 100 sensor nodes are randomly and uniformly distributed in an area of 400m x 200m. The sink is located at (100, 100) and the relay is located at (300, 100). The path loss model uses a hybrid free-space/two-ray model and each link experiences independent Rayleigh fading. The noise level is -90dBm. It is assumed that both the sink and the relay amplifies the signal with a gain of 90dB. In the simulation, a nodeis regarded as a neighbor of if , and non-neighbor otherwise. The simulation is run 100,000 times. Main parameters are listed in Table I.
|Channel||Free-space/two-ray, Rayleigh fading|
With case 2 as an example, we first investigate how the heuristic algorithm in Algorithm 1 converges. is fixed to its initial value. We change to see how MSE and transmission power vary per iteration. In the algorithm, the process stops when MSE reaches the minimum. But to illustrate the position of the minimum, we also show other results after the minimum is reached. Figure 4 shows the result. Clearly, the heuristic algorithm actually leads to the minimal error. But the transmission power increases with the iteration, which indicates that a tradeoff is necessary between MSE and transmission power.
shows the cumulative distribution function (CDF) of MSE in different methods. Obviously, AirComp using only direct link has much larger MSE than relay methods. Of the relay methods, Relay 2 achieves the minimal MSE. It is straightforward that Relay 2 outperforms Relay 1. Relay 2 also is better than Relay 3, because in Relay 2, a nodeas a neighbor of transmits its signal twice, which arrive at the sink, with phase alignment. In comparison, signals from the same node are not phase aligned at the sink in Relay 3, which affects its performance.
Figure 6 shows the average transmission power per node. All relay methods consume a little more power than the direct transmission. This problem can be partially solved by adopting a better tradeoff between transmission power and MSE, which is left as future work.
AirComp greatly improves the efficiency of data collection and processing in sensor networks. But its performance is degraded when signals of nodes far away from the sink cannot arrive at the sink, aligned in signal magnitude. To address this problem, this paper investigates the amplify and forward relay method, and gives solutions to several special cases. Simulation evaluations have confirmed the effectiveness of the proposed methods in reducing the computation error of AirComp. In the future, we will further study the general case, and investigate how to take a better tradeoff between transmission power and the computation error.
-  (2016) Over-the-air function computation in sensor networks. CoRR abs/1612.02307. External Links: Cited by: §I.
-  (2020) Federated learning over wireless fading channels. IEEE Transactions on Wireless Communications 19 (5), pp. 3546–3557. Cited by: §II-B.
-  (1979) Approximate complexity and functional representation. J. Math. Anal. Appl. 70, pp. 280–298. Cited by: §I.
-  (2019) Optimal power control for over-the-air computation in fading channels. CoRR abs/1906.06858. External Links: Cited by: §I, §II-B.
-  (2013) Nomographic functions: efficient computation in clustered gaussian sensor networks. CoRR abs/1310.7123. External Links: Cited by: §I.
-  (2020) Over-the-air computation systems: optimization, analysis and scaling laws. IEEE Transactions on Wireless Communications (), pp. 1–1. Cited by: §I, §II-A, §II-A, §II-B, §III-B, §IV.
-  (2007) Wireless network coding by amplify-and-forward for bi-directional traffic flows. IEEE Communications Letters 11 (1), pp. 16–18. Cited by: §I.
-  (2017) A survey on LPWA technology: LoRa and NB-IoT. ICT Express 3 (1), pp. 14 – 21. External Links: Cited by: §I.
-  (2006) Performance of amplify-and-forward and decode-and-forward relaying in rayleigh fading with turbo codes. In 2006 IEEE International Conference on Acoustics Speech and Signal Processing Proceedings, Vol. 4, pp. IV–IV. Cited by: §I.
-  (2004) The cauchy-schwarz master class: an introduction to the art of mathematical inequalities. Cambridge University Press, New York. Cited by: §III-C.
-  (2009) Joint channel and network decoding for xor-based relay in multi-access channel. IEICE Transactions on Communications Vol. E92-B (11), pp. 3470–3477. Cited by: §I.
-  (2007) High-performance cooperative demodulation with decode-and-forward relays. IEEE Transactions on Communications 55 (7), pp. 1427–1438. Cited by: §I.
-  (2019) Reduced-dimension design of MIMO over-the-air computing for data aggregation in clustered IoT networks. IEEE Transactions on Wireless Communications 18 (11), pp. 5255–5268. Cited by: §II-B.
-  (2008) Linear coherent decentralized estimation. IEEE Transactions on Signal Processing 56 (2), pp. 757–770. Cited by: §I.
-  (2007) Towards the optimal amplify-and-forward cooperative diversity scheme. IEEE Transactions on Information Theory 53 (9), pp. 3114–3126. Cited by: §I.
-  (2006) Improving amplify-and-forward relay networks: optimal power allocation versus selection. In 2006 IEEE International Symposium on Information Theory, Vol. , pp. 1234–1238. Cited by: §I.
-  (2019) MIMO over-the-air computation for high-mobility multimodal sensing. IEEE Internet of Things Journal 6 (4), pp. 6089–6103. Cited by: §II-B.