Log In Sign Up

Reliable Over-the-Air Computation by Amplify-and-Forward Based Relay

In typical sensor networks, data collection and processing are separated. A sink collects data from each node, one by one, which is very time consuming. Over-the-air computation, as a new diagram of sensor networks, integrates data collection and processing in one slot: all nodes transmit their signals simultaneously in the analog wave, and the processing is done in the air, by the addition of electromagnetic wave. This is very efficient, but it requires that signals from all nodes arrive at the sink, aligned in signal magnitude so as to enable unbiased estimation. For a node far away from the sink with a low channel gain, misalignment in signal magnitude is unavoidable. To solve this problem and improve system reliability, in this paper, we investigate the amplify-and-forward based relay. This is different from conventional relay in that the relay node needs to amplify signals from many nodes at the same time, and the signals arriving at the sink should still be aligned in signal magnitude. We discuss the general case and solutions to several special cases. Simulation results confirm the effectiveness of the proposed methods in reducing the computation error.


page 1

page 2

page 3

page 4


Multi-Slot Over-The-Air Computation in Fading Channels

IoT systems typically involve separate data collection and processing, a...

Securing Full-Duplex Amplify-and-Forward Relay-Aided Transmissions Through Processing-Time Optimization

We investigate physical-layer security of the full-duplex (FD) amplify-a...

Coded Relaying in LoRa Sensor Networks

To enhance the reliability of LoRa sensor networks, we propose two oppor...

Cooperative Relaying in LoRa Sensor Networks

We propose a communication scheme with relays to improve the reliability...

Delay Adaptation Method for Relay Assisted Optical Wireless Systems

In this paper, we investigate optical wireless repeaters as relay termin...

Detectability of Symbol Manipulation by an Amplify-and-Forward Relay

This paper studies the problem of detecting a potential malicious relay ...

Asymptotically Optimal Scheduling Algorithm for Compute-and-Forward

Consider a Compute and Forward (CF) relay network with L users and a sin...

I Introduction

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 [8]. 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) [14]. 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 [12], or their comparison [9]. In addition, network coding-based relay also has been studied for the bidirectional communication [7] and the multiple access channel [11]. 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.

In the rest of this paper, in Sec.II, we review the AirComp model and previous work on improving its performance. Then, in Sec.III, we present the relay model for AirComp, and show some simulation results in Sec.IV. Finally, in Sec.V, we conclude this paper and point out future work.

Ii Related Work

Here, we review the AirComp method and previous solutions to channel fading.

Ii-a Air computation method

We first introduce the basic AirComp model [6] shown in Figure 1. The sensor network is composed of sensor nodes and 1 sink. The sensing result at the node is represented by the signal

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

Fig. 1: Conventional AirComp model with nodes and 1 sink.

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, [6]. 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 [6][4] 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 [4], 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 [2], 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

Fig. 2: System model. sensor nodes each have a signal to send to the common sink within slots. Each node selects a slot where its channel gain is high enough, and after pre-scaling, transmits its signal.

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 [6]. 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 of

as 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 [10]


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.

1:procedure FindParamForRelay2(, )
2:     Initialize , by minimizing in Eq.(15)
3:     Initialize , by minimizing in Eq.(15)
4:      = OneIter(, , , )
5:     while  do Iteration
6:          = OneIter(, , , )
7:         if  then
8:               Update
10:         else
11:              break
12:         end if
13:     end while
14:     return
15:end procedure
16:procedure OneIter(, , , )
17:     for  do Iteration on
21:         if   then
26:         else
30:         end if
31:     end for
33:     return
34:end procedure
Algorithm 1 Find parameters for relay 2 and compute MSE.

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.

1:procedure FindParamForRelay3(, )
2:     Initialize , by minimizing in Eq.(15)
3:     Initialize , by minimizing in Eq.(15)
4:     Initialize
6:     while  do Iteration
7:          = OneIter(, , , )
8:          = OneIter(, , , )
9:          = OneIter(, , , )
11:         if  <  then
12:              , update and
13:         else
14:              break
15:         end if
16:     end while
17:     return
18:end procedure
19:procedure OneIter(, , , )
20:     for  do Iteration on
21:         for  do
23:         end for
24:     end for
25:      Find optimal phase
26:     for  do Iteration on
27:         if   then
30:         else
33:         end if
34:     end for
36:     return
37:end procedure
Algorithm 2 Find parameters for relay 3 and compute MSE.

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 [6] that only exploits the direct link, and it is named as Direct hereafter.

Figure 3

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 node

is regarded as a neighbor of if , and non-neighbor otherwise. The simulation is run 100,000 times. Main parameters are listed in Table I.

Term Value
# nodes 100
Frequency 2.4GHz
Channel Free-space/two-ray, Rayleigh fading
Power ,
TABLE I: Main parameters for evaluation.
Fig. 3: Simulation scenario with 100 nodes (), 1 sink () and 1 relay ().

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.

Fig. 4: Impact of iterations on MSE and transmission power in Relay 2.

Figure 5

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 node

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

Fig. 5: Cumulative distribution function of MSE in different methods.

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.

Fig. 6: Cumulative distribution function of average transmission power per node in different methods.

V Conclusion

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.


  • [1] O. Abari, H. Rahul, and D. Katabi (2016) Over-the-air function computation in sensor networks. CoRR abs/1612.02307. External Links: Link, 1612.02307 Cited by: §I.
  • [2] M. M. Amiri and D. Gunduz (2020) Federated learning over wireless fading channels. IEEE Transactions on Wireless Communications 19 (5), pp. 3546–3557. Cited by: §II-B.
  • [3] R. C. Buck (1979) Approximate complexity and functional representation. J. Math. Anal. Appl. 70, pp. 280–298. Cited by: §I.
  • [4] X. Cao, G. Zhu, J. Xu, and K. Huang (2019) Optimal power control for over-the-air computation in fading channels. CoRR abs/1906.06858. External Links: Link, 1906.06858 Cited by: §I, §II-B.
  • [5] M. Goldenbaum, H. Boche, and S. Stanczak (2013) Nomographic functions: efficient computation in clustered gaussian sensor networks. CoRR abs/1310.7123. External Links: Link, 1310.7123 Cited by: §I.
  • [6] W. Liu, X. Zang, Y. Li, and B. Vucetic (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.
  • [7] P. Popovski and H. Yomo (2007) Wireless network coding by amplify-and-forward for bi-directional traffic flows. IEEE Communications Letters 11 (1), pp. 16–18. Cited by: §I.
  • [8] R. S. Sinha, Y. Wei, and S. Hwang (2017) A survey on LPWA technology: LoRa and NB-IoT. ICT Express 3 (1), pp. 14 – 21. External Links: ISSN 2405-9595, Document, Link Cited by: §I.
  • [9] M. R. Souryal and B. R. Vojcic (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.
  • [10] J. M. Steele (2004) The cauchy-schwarz master class: an introduction to the art of mathematical inequalities. Cambridge University Press, New York. Cited by: §III-C.
  • [11] S. Tang, J. Cheng, C. Sun, R. Miura, and S. Obana (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.
  • [12] T. Wang, A. Cano, G. B. Giannakis, and J. N. Laneman (2007) High-performance cooperative demodulation with decode-and-forward relays. IEEE Transactions on Communications 55 (7), pp. 1427–1438. Cited by: §I.
  • [13] D. Wen, G. Zhu, and K. Huang (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.
  • [14] J. Xiao, S. Cui, Z. Luo, and A. J. Goldsmith (2008) Linear coherent decentralized estimation. IEEE Transactions on Signal Processing 56 (2), pp. 757–770. Cited by: §I.
  • [15] S. Yang and J. Belfiore (2007) Towards the optimal amplify-and-forward cooperative diversity scheme. IEEE Transactions on Information Theory 53 (9), pp. 3114–3126. Cited by: §I.
  • [16] Y. Zhao, R. Adve, and T. J. Lim (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.
  • [17] G. Zhu and K. Huang (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.