1 Introduction

Conventional networks operate through intermediate relay nodes that simply store-and-forward the incoming packets. However, it has been shown in the seminal paper of Ahlswede et al. that by intelligently combining the forwarded packets, the relay nodes can substantially improve the transmission rates and/or transmission reliability [1]. This concept of combining packets at the relay nodes is referred to as network coding. The main idea behind network coding is somehow contradictory to the independent processing of data, where routers mainly process the packets and then forward them. However, network coding ensures more efficient usage of limited resources and has been attracting increasing attention in the recent years [15].

Network coding has the potential to address the ever increasing number of users and devices in cellular networks, in particular in 5G or beyond 5G standards. However, the majority of the literature on network coding considers error-free transmission environments [1, 69]1. Assuming error-free transmission in wireless networks is not reasonable and the extension of network coding to wireless networks is not straightforward. Specifically, two issues need to be addressed in wireless environments; erroneous transmissions due to channel fading and the spatial diversity provided by the broadcast nature of the wireless channels. As for the first issue that constitutes the main performance challenge, the transmission error rates through wireless communication channels are non-negligible [10]. Hence, transmission errors between source nodes, relay nodes, and destination nodes need to be taken into account. Considering the second issue, as an inherent advantage of the wireless environments, the broadcast nature of the wireless channel needs to be considered and possibly utilized in the system design. In order to benefit from this broadcast nature, cooperative communication protocols have been proposed and implemented [1122]. Cooperative communication is a powerful technique to obstruct the destructive effects of the fading channels through the use of spatial diversity.

Referred to as network-coded cooperation (NCC), the combination of network coding and cooperative communication is a powerful idea, merging the advantages of both concepts. NCC improves the throughput and robustness of the system by exploiting wireless channel characteristics [23]. A three-layer NCC system is shown in Fig. 1. The transmission is completed in a two-phase protocol; namely the broadcast and the relaying phases. In the broadcast phase, represented by solid lines, source nodes transmit their information-bearing signals to destination and relay nodes. Both the relay and destination nodes receive these signals through the broadcast nature of the wireless communication channel. Direct links of source and destination nodes are available to ensure cooperative communication. In the relaying phase, represented by dashed lines, first, the relay nodes decode the source signals and perform network coding on the estimated symbols by using a predetermined coding matrix. Then, the relay nodes transmit the generated network-coded symbols. Destination nodes combine the received signals at the end of both phases to improve transmission reliability. Transmission of multiple nodes can be ensured by using time division multiple access (TDMA) or frequency division multiple access (FDM). As an efficient implementation of FDM, orthogonal division multiple access (OFDMA) can be used to serve multiple nodes under the condition of frequency-selective channels [24] that may be encountered in both phases.

Fig. 1
figure 1

Transmission model of the NCC system with M number of source, K number of relay, and P number of destination nodes

In this work, we implemented an OFDMA-based NCC for the first time in the literature by using software-defined radio (SDR) nodes. In TDMA networks, NCC phases are completed in two orthogonal time intervals [25]. On the other hand, making use of OFDMA, the system under consideration can transmit in orthogonal frequency bands, hence, the transmission phases can be executed using orthogonal subcarriers, reducing the total transmission time. Furthermore, OFDMA provides frequency diversity by allowing flexible assignment of subcarriers to multiple nodes. Both of NCC and OFDMA techniques improve robustness and reliable communication against the impairments introduced through the fading channel. A system combining NCC and OFDMA, referred to as NCC-OFDMA, is shown to provide a significant diversity gain, through the diversity multiplexing trade-off analysis in a related work [26]. Here, we provide design and implementation details of the NCC-OFDMA system using SDR nodes. The implemented system clearly demonstrates the provided robustness advantage through the NCC infrastructure.

In our study, a six-node NCC-based uplink OFDMA system is implemented in real time using LabVIEW software, NI Universal Software Radio Peripheral (USRP) 2921 and NI PXI hardware components. The implemented system consists of three source, one relay and two destination nodes. The system’s synchronization is provided by the NI PXI-6683 module in correlation with the LabVIEW programming. System performance is measured with bit error rate (BER) and error vector magnitude (EVM). The destination nodes implement a network decoder, significantly improving the overall error performance of the NCC-OFDMA system. We show through measurement results that NCC improves communication quality, especially in the presence of transmission errors, providing results in line with the current literature [27]. Through measurement results, it is shown that the NCC-OFDMA system operates at lower error rates with respect to point-to-point transmission systems. This work provides promising results about the use of NCC techniques, demonstrating that their usage can alleviate the resource scarcity problems in wireless networks with ever-increasing number of users, hence addressing NCC as candidate for 5G standards and beyond.

2 Related literature

In this section, we provide an overview of the leading literature on network coding, NCC, and SDR implementations of orthogonal frequency division multiplexing (OFDM)-based systems.

2.1 Network-coded systems

There are several research works in the literature that theoretically investigate the robustness improvement introduced by using network coding [6, 2830]. Wang et al. [31] demonstrates that, by modifying the IEEE 802.11g frame structure, network coding techniques can improve the transmission performance of OFDM-based systems. In [32], the authors show that redundant transmission schemes and random network coding can improve lossy networks like H.264/SCV video transmission systems.

In [33], the authors introduced a new approach to wireless network coding, referred to as COPE, which amounts to inserting network coding between internet protocol (IP) and medium access control (MAC) layers. COPE is used for performing XOR at relay nodes. According to measurement results, the throughput of the COPE-implemented networks can be significantly higher in wireless mesh networks. An improved version of the COPE, aiming to improve the network coding scheme by using an artificial bee colony algorithm, is proposed in [34] to improve the energy efficiency. A prototype of multiple input multiple output (MIMO) network-coded two-way multi-hop system using time division duplexing/time division multiple access (TDD/TDMA) is implemented in [35]. The authors have shown that MIMO network-coded system outperforms the one-way multi-hop TDD/TDMA network in terms of throughput. In [36], the performances of NCC systems are analyzed. As aforementioned, NCC provides a flexible transmission method, encouraging us to reconsider designs of error control coding, modulation, and multi-antenna transmission schemes. Dynamic NCC approaches address dynamically changing network topologies that may not directly benefit from a fixed NCC approach [3739].

As a different research direction, joint network and channel coding can also improve system performance through additional coding gains [4043]. Techniques such as multi-antenna coding, combined with NCC, can enable adjustment of the trade-off between transmission robustness and the data rate [4446].

Although there are many prominent studies that demonstrate the apparent advantages of NCC, to the best of our knowledge, an implementation of an NCC system is not yet available in the literature.

2.1.1 Physical layer network-coded systems

As a specialized form of network coding, by specifically making use of the wireless channel characteristics, physical-layer network coding (PNC) can also increase the total throughput. There are several implementation studies of PNC systems. Although these studies have not implemented network coding over a finite field, here, we provide an overview of the leading PNC implementations in order to provide a comprehensive view of the state of the art.

In [29], the system’s coding gain is investigated numerically by using three transmission schemes; the classical flow-based scheme, network coding scheme, and PNC scheme. According to the presented analysis, PNC scheme improved network capacity considerably. Moreover, robust transmission with minimum delay can be obtained in the PNC scheme. In [47], Burr and Fang make use of linear PNC (LPNC). Frame error rate and signal-to-noise ratio (SNR) variations are investigated through Monte Carlo simulations. According to the results, LPNC random access networks achieve better performance than coordinated multi-point (CoMP) networks in a restricted backhaul setting. Although this study unrolls the advantages of PNC, experimental results are not included.

A two-way relay network-based frequency domain PNC system is implemented on USRP platform in [48]. In this implementation, preamble designs of 802.11a/g OFDM symbols are used. According to their experimental results, BER performance improvement is observed. PNC is applied in a heterogeneous cellular network in [49]. Decoding performance of PNC in the presence of asymmetrical channels is investigated on a USRP platform. According to the experimental results, it is shown that in the case of imbalanced received SNRs, the decoding performance can be improved by the use of channel coding. In [50], the authors proposed the optimal design of cooperative network-coded communications providing efficient packet transmission cost over half-duplex channels and quantified the performance improvement by using a testbed. In [51], performances of cooperative communication schemes are evaluated in wireless testbed environment with using GNU radio on a USRP platform. Multi-relay cooperation is implemented in this testbed. According to the experimental results, it is shown that cooperative communication can increase the transmission reliability by utilizing spatial and user diversity.

A prototype of a two-way relay network supporting both four-hop traditional scheduling protocol and the three-hop network coding is presented in [52]. Signal processing algorithms associated with transmission and reception are implemented on USRP devices, and the degrading effects of hardware components on the performance are investigated. GNU radio blocks are designed for using half-duplex packet switching. In [53], a bidirectional two-hop relay network using decode-and-forward strategy is implemented by using GNU radio and USRPs.

2.2 SDR implementation of OFDM/OFDMA-based systems

OFDM technique is widely used in modern telecommunication systems because of the way it copes with frequency-selective channels. Advantages such as the ability to provide high data rate services using narrowband subcarriers and low computational complexities of receiver structures increase the importance of OFDM. Multi-user extension of the OFDM technique is provided by the OFDMA technique. Unlike OFDM that involves assignment of all the OFDM symbols to a single user, in OFDMA, distinct users can be assigned to different subcarrier sets, providing flexible frequency allocation [54]. In [55], the authors implemented an OFDMA-based MAC contention using FPGA boards. OFDMA is used in mobile communication systems like LTE, 3GPP [56], and wireless metropolitan area networks like 802.16e WIMAX [57].

OFDM systems are realized by using SDRs in several works such as [58]. Extension of OFDM systems to OFDMA is also implemented using SDRs [59] with NI-USRP 210 model. In [60], the authors implemented OFDM-based secondary cognitive link by using USRP N210 platforms. In [61], OFDM is implemented by using GNU radio on USRP platform, mainly targeting WiMAX standard. In [62], the authors implemented an OFDMA-based wireless LAN by using verilog programming in FPGA. However, due to the lack of multiple transmitters and possible synchronization issues, a complete OFDMA uplink was not implemented.

The lack of widespread SDR implementation of uplink OFDMA in the literature can be explained with difficulty of the dynamic and multi-user oriented implementation design, in contrast to the OFDM. Especially in the assignment of subcarriers to distinct users, prevention of the inter-subcarrier interference through accurate synchronization becomes a significant problem [63].

3 NCC-OFDMA system model

The considered NCC-OFDMA system model is based on the NCC system shown in Fig. 1. OFDMA-based multiplexing structure is integrated in this architecture to avoid any multi-user interference. There are M source and P destination nodes. K relay nodes perform network coding on the received OFDMA signals. The number of subcarriers are denoted by N. These subcarriers are assigned to source and relay nodes at broadcast and relaying phases, respectively, in a non-overlapping fashion to avoid any multiple access interference in the two-phase transmission protocol. \(H_{S_{i}D_{j}}[\!n]\) and \(H_{S_{i}R_{k}}[\!n]\) denotes the channel gains between ith source and jth destination nodes and ith source and kth relay nodes, respectively (i=1,2,…,M, j=1,2,…,P, k=1,2,…,K, and n=0,1,…,N−1). The subcarrier index is denoted by n. S i [ n] represents the transmitted symbol of ith user on the nth subcarrier. Its modulated version is denoted by X i [ n], hence, X i [ n]=MOD[S i [ n] ]. Here, MOD[ ·] function defines the modulation operation2. The received OFDMA signals at the jth destination transmitted from the ith source node by using nth subcarrier can be modeled as

$$\begin{array}{@{}rcl@{}} Y_{S_{i} D_{j} }[\!n]=\sqrt{\rho_{i}} H_{S_{i} D_{j}} [\!n]X_{i} [\!n]+W_{S_{i} D_{j}} [\!n],\text{\;} \; \text{\;} n\in F_{i}, \end{array} $$

where ρ i and \(W_{S_{i}D_{j}}[n]\) represent the mean transmit power of the each subcarrier at ith source and additive white Gaussian noise (AWGN) component at the jth destination, respectively. F i represents the set of assigned subcarriers of ith source, the cardinality of F i is set as \(|F_{i}|\leq \left \lfloor {\frac {N}{M}}\right \rfloor \), where ⌊·⌋ represents the floor function.

Similarly, the received OFDMA signal at the kth relay node can be modeled as

$$\begin{array}{*{20}l} Y_{S_{i} R_{k}} [\!n]&=\sqrt{\rho_{i}} H_{S_{i} R_{k}} [\!n]X_{i} [\!n]+W_{S_{i} R_{k}} [\!n],\text{\;} n\in F_{i}, \end{array} $$

where \(W_{S_{i}R_{k}}[n]\) represents the AWGN component at the kth relay. The relay calculates the network-coded symbols according to the selected network code. In our scheme, we use linear network coding at relay nodes. The network coding matrix can be represented as [26]

$$ \left(\begin{array}{cccc} \alpha_{1,1} & \alpha_{2,1} & \cdots & \alpha_{K,1}\\ \alpha_{1,2} & \alpha_{2,2} &\cdots & \alpha_{K,2}\\ \vdots & \vdots & \ddots & \vdots\\ \alpha_{1,M} & \alpha_{2,M} & \cdots & \alpha_{K,M} \end{array}\right)^{T}_{M \times K}, $$

where α k,i represents the coding coefficient of the ith user at the kth relay.

After the reception of \(Y_{S_{i} R_{k}}[\!n] \) at the kth relay node during the broadcast phase, \(\tilde {X}_{i}^{k}[\!n]\) is estimated. This estimate of the transmitted symbol from ith source, obtained by demodulating \(\tilde {X}_{i}^{k}[\!n]\), can be represented by \(\tilde {S}_{i}^{k}[\!n]\). The network-coded symbol \(X_{k}^{{'}}[\!n]\) can be obtained at the kth relay node according to the coding matrix and estimated source symbols. The transmitted network-coded signal at the kth relay in the relaying phase can be calculated as

$$ X_{k}'[\!n]= \textrm{MOD}\left[ T_{k}[\!n]\!\right], $$

where \(T_{k}[\!n]=\sum \limits _{i=1}^{M} \left (\alpha _{k,i} \tilde {S}_{i}[\!F_{i}(n)]\right).\) Here, F i (n) is the nth element of F i and T k [ n]∈GF(q). The received signal at the jth destination node from the kth relay node can be given as

$$ Y_{R_{k} D_{j}} [\!n]=\sqrt{\rho_{k}} H_{R_{k} D_{j}} [\!n]X_{k}^{{'}} [\!n]+W_{R_{k} D_{j}} [\!n]\text{\; },\text{\;} n\in {G}_{k} $$

where ρ k and \(W_{R_{k} D_{j}}[\!n]\) represent the mean transmit power of each subcarrier at kth relay and the AWGN component at the jth destination node. G k represents the set of assigned subcarriers to the kth relay. Hence, the global coding matrix of the system is obtained as

$$\begin{array}{*{20}l} \mathbf{Z}= \left(\begin{array}{cccccccc} 1 & 0 &\cdots & 0 &\vline & \alpha_{1,1} & \cdots & \alpha_{K,1}\\ 0 & 1 &\cdots & 0 &\vline & \alpha_{1,2} & \cdots & \alpha_{K,2}\\ \vdots & \vdots & \ddots & \vdots &\vline & \vdots & \ddots & \vdots\\ 0 & 0 & \cdots & 1 &\vline &\alpha_{1,M} & \cdots & \alpha_{K,M} \end{array}\right)^{T}_{M \times \left(M+K\right)} {,} \end{array} $$

where the first M rows of Z denote the direct links between the source and destination nodes obtained through cooperative diversity.

3.1 Detector design

Here, we detail the detector design at the destination nodes, after the completion of the two-phase transmission protocol. The frequency indices are omitted for notational simplicity. The ML detection rule at the jth destination node can be defined as

$$\begin{array}{*{20}l} {\hat{\mathbf X}} = \{\tilde{X}_{1}^{j},..., \tilde{X}_{M}^{j}\} = & \arg \max_{{\mathbf X}\in{\mathcal{X}^{M}}}\text{Pr}\left\{{{\mathbf Y}_{B}^{j}},{{\mathbf Y}_{R}^{j}}|{\mathbf X} \right\}, \end{array} $$

where, \(\mathbf {Y}_{B}^{j}=\{Y_{S_{1}D_{j}}, Y_{S_{2}D_{j}},\ldots, Y_{S_{M}D_{j}}\}\), \(\mathbf {Y}_{R}^{j}=\{Y_{R_{1}D_{j}}, \) \(Y_{R_{2}D_{j}}, \ldots, Y_{R_{K}D_{j}}\}\), and X={X 1,X 2,…,X M }. \(\mathcal {X}\) represents the set of constellation points of the selected modulation. For M points, we need to consider the set \({\mathcal {X}^{M}}\). We assume that the event of error in broadcast and relaying phases are independent. \(\tilde {X}_{i}^{j}\) represents the estimation of the X i at the jth destination node, for i=1,…,M. Hence, (6) can be reduced to

$$\begin{array}{*{20}l} {\hat{\mathbf X}} = & \arg \max_{{\mathbf X}\in{\mathcal{X}^{M}}}\text{Pr}\left\{{{\mathbf Y}_{B}^{j}}| {\mathbf X} \right\}\text{Pr}\left\{{{\mathbf Y}_{R}^{j}}| {\mathbf X} \right\}. \end{array} $$

The transmitted signals are independently generated and the channels encountered during broadcast and relaying phase s are independent. Under these assumptions, the decision rule at the receiver is reduced to

$$\begin{array}{*{20}l} {\hat{\mathbf X}} = & \arg \max_{{\mathbf X}\in{\mathcal{X}^{M}}} \left\{\prod_{i=1}^{M} \text{Pr}\left\{ {Y_{S_{i}D_{j}}}| {X_{i}} \right\} \times\prod_{k=1}^{K}\text{Pr}\left\{{Y_{R_{k} D_{j}}}|{\mathbf X} \right\}\right\}. \end{array} $$

The ML detector design will vary according to the selected network code and the modulation order. In order to generalize the detection rule, all erroneous transmissions can be omitted at the destination node. Please note that in some erroneous transmission cases, observing two consecutive errors at the source-relay and source-destination links can result in a correct transmission. The detection rule below omits such cases to enable a practically feasible implementation. In this case, a decision rule for an ML-like detector can be obtained as

$$ {\fontsize{8.7}{6} \begin{aligned} \hat{\mathbf{X}} \approx & \arg \max_{{\mathbf X}\in{\mathcal{X}^{M}}} \left\{\prod_{i=1}^{M} \left(\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left\{-\frac{\left|{Y_{S_{i}D_{j}}}-{H}_{S_{i}D_{j}}X_{i}]\right|^{2}}{2\sigma^{2}}\right\} \right)\right. \\ &\left.\times\prod_{k=1}^{K} \left(\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\left\{-\frac{\left| {Y_{R_{k} D_{j}}^{j}} - { {H}}_{R_{k} D_{j}} \textrm{MOD}\left[ V_{k} \right]\right|^{2}}{2\sigma^{2}}\right\} \right)\right\}, \end{aligned}} $$

where \(V_{k}=\sum \limits _{i=1}^{M} \left (\alpha _{k,i} S_{i} \right){\text,} \; V_{k} \in \text {GF}(q)\), and variances of all AWGN components are assumed to be σ 2 at all channels. The decision rule of this ML-like detector can now be calculated according to

$$\begin{array}{*{20}l} \left\{\tilde{X}_{1}^{j}, \ldots, \tilde{X}_{M}^{j}\right\} & { \approx} \arg\!\min_{X_{1},X_{2},\ldots,X_{M}} \sum\limits_{i=1}^{M}\left|Y_{S_{i}D_{j}}-{ {H}}_{S_{i}D_{j}}X_{i}\right|^{2} \\ & + \sum\limits_{k=1}^{K} \left|Y_{R_{k} D_{j}}- { {H}}_{R_{k} D_{j}} \textrm{MOD}\left[ V_{k} \right] \right|^{2}. \end{array} $$

In this detector, we assume that all channel gains are available at the destination. Note that this may not be the case in practical applications.

4 Testbed description

A block diagram of the implemented NCC-OFDMA testbed is shown in Fig. 2. In this implemented setup, there are three source nodes (M=3), two destination nodes (P=2) and one relay node (K=1). N, the number of subcarriers is selected as 1200. Data symbols are assigned to 320 of these subcarriers at each source node. Zero padding is also included in the OFDMA frames. Detailed frame structure is shown in Table 1 in the following subsection. Synchronization is critical in this testbed, as in OFDMA systems, it is required to avoid intercarrier interference that may appear due to frequency or phase offsets [24]. In Fig. 2, the blue lines connecting all nodes represent the clock signal used for synchronization that is generated via the clock module in the system, ensuring synchronous transmission and reception. In addition to this hardware-based synchronization solution, we also implemented frequency offset tracking algorithm at all receivers by making use of cyclic prefix (CP), as will later be detailed.

Fig. 2
figure 2

Block diagram of the implemented NCC-OFDMA testbed with USRP and PXI nodes

Table 1 OFDMA frame structure

OFDMA uplink transmission is performed in the broadcast phase, where source nodes transmit to the relay node and destination nodes. In the relaying phase, the relay node makes use of all data transmitting subcarriers. The modulation is selected as 4-ary quadrature amplitude modulation (QAM) at all nodes, in order to transmit X i [n] and \(X^{\prime }_{k}[n]\) signals. The global coding matrix shown in (5) of the total system in G F(4) is selected as

$$\begin{array}{*{20}l} \mathbf{Z}= \left(\begin{array}{ccccccc} 1 & 0 & 0 &\vline & 1 & 0 & 0\\ 0 & 1 & 0 &\vline & 0 & 1 & 0\\ 0 & 0 & 1 &\vline & 1 & 1 & 1 \end{array}\right)^{T}. \end{array} $$

Three linear combinations of the received source symbols are generated at the relay node. Hence, the coding matrix becomes of dimension 3×6, as given in (11). Please note that although we use a single physical device as the relay node, we use the same subcarrier set cardinalities for the relaying phase, that is, 320 subcarriers are used to transmit each row of Z. The first three rows correspond to the direct transmission of the broadcast phase. The last three rows contain linear combination of source data. Each of the 320 subcarriers are used in the network coding. The three network-coded rows constitute the OFDMA symbol of the relaying phase. The detection rule, given in (10), is used at the two destination nodes. Measurement setup parameters are given in Table 2. The hardware and software components that are used in this setup are explained in the following subsections.

Table 2 Measurement setup parameters

4.1 Hardware and software components

NI USRP 2921 nodes of ITU Wireless Communication Research Laboratory (WCRL) are used as the source and destination nodes in the OFDMA-based network coding system’s testbed. USRP nodes are SDR nodes, and their operating frequency includes 2.4–2.5 and 4.9–5.9 GHz of frequency bands. Each USRP node’s instantaneous bandwidth can be programmed to be up to 20 MHz, and it can receive 100 million samples per second in the destination channel. As the relay node, NI PXIe-5644R vector signal transceiver (VST) express module is used on the NI-PXIe-1082 hardware. This module has a frequency range from 65 MHz to 6 GHz and can provide up to 80-MHz instantaneous bandwidth. LabVIEW, a visual programming language, is used as the software component. The software for the setup is designed by using virtual instruments (VIs).

One of the major issues that needs to be carefully addressed during the design of the considered NCC-OFDMA system is the synchronization between nodes. We solved this problem by taking multiple precautions through both hardware and software configurations. As for the hardware perspective, we used the NI PXI-6683 timing and synchronization module, as the clock signal source. This module can provide 10-MHz synchronization clock source from a GPS receiver that is captured as the main clock signal. Three external 10-MHz signals are transmitted through cables to two source nodes and one destination node. Other source and destination nodes that are not directly connected to the clock signal are synchronized through the use of MIMO cables that are used as a means to distribute the clock signal. Thus, three-channel physical multiplexing is achieved from a single clock module. The hardware components that are used in the testbed are shown in Fig. 3.

Fig. 3
figure 3

Hardware components used in the testbed

4.2 Data processing steps

The NCC-OFDMA system is implemented in SDR nodes by using LabVIEW. Our code consists of the source, relay, and destination sub-virtual instruments (SubVIs) arising from decomposing of a VI as well as the network coding and decoding SubVI, which are all combined in the timed flat sequence structure. We designed with SubVI since SubVI provides flexible usage and can be controlled from main VI.

For synchronization, in addition to the clock module, we used a joint timing and frequency offset estimator implemented in software to cancel the residual rotations corresponding to carrier frequency offset (CFO) and delay, based on the algorithm given in [64]. The ML estimation of CFO is implemented based on the CP portion of the OFDMA frame. By using the CP, channel delay and frequency offset are estimated jointly. In order to increase the SNR at the receiver side, the CFO VI was prepared by modifying [65]. Thus, the synchronization of the complete measurement setup is provided by the joint configuration of the software and hardware components. Pilot subcarriers are used for channel estimation at the receivers. A comb-type pilot structure is used in the OFDMA frames. One in every 8 subcarriers are assigned as the pilot symbol by using pseudo-noise (PN) sequences. On the receiver, channel estimation is performed by the use of these pilot subcarriers. The channel gains for data subcarriers are then estimated by using one-dimensional linear interpolation method which exploits the channel information at pilot subcarriers. These channel estimates are used in the equalizer block of the receiver. Zero forcing equalization, which is appropriate for practical applications, is implemented and estimation is performed [66]. Please note that the channel estimates in this setup may contain estimation errors, contributing to the overall system performance.

The functionalities of the source, relay, and destination nodes are detailed below. An overview of the measurement setup parameters is given in Table 2.

4.2.1 Source nodes

At the source nodes, we first added necessary USRP VI for hardware coordination. These VIs are responsible for the start or the end of sessions, the configuration of the USRP parameters, and the configuration of the transmitted signals’ properties. The overview of the block diagram of the transceiver structure of source nodes is shown in Fig. 4. After finalizing the transmitter configuration, PN data bits are generated as the information bits. Then, these bits are modulated by mapping onto a 4-QAM constellation, by making use of bit loading and inphase/quadrature (I/Q) conversion features. Array functions are used for the subcarrier assignment and frame structure constitution tasks. Reference pilot symbols that are also known at the receiver nodes for the complete transmission are interleaved with data symbols, using comb structure for pilot assignment. One pilot symbol is used per eight data symbols by making use of the interleaving process of the Array VI.

Fig. 4
figure 4

A simplified block diagram of the OFDMA transmitter. Source node’s data is passed over I/Q block via bit loading block. S/P conversion block is used in order to implement serial-parallel conversion. IDFT is applied to the output of the subcarrier distribution block. Then, P/S conversion is implemented for data transmission. CP is added to ensure circular convolution. Finally, serial digital data is converted to analog data by using D/A block

The serial data is converted into parallel streams by the serial-to-parallel (S/P) conversion block. The selected subcarrier set of the ith source node, F i , composed of 320 subcarriers, is used for the data symbol assignment. Zero padding (ZP) is also implemented, and sequences of the zero subcarriers are included in the transmitted OFDMA frames. Inverse discrete Fourier transform (IDFT) is implemented by using IDFT VI. The output array is again converted to serial by using the parallel-to-serial (P/S) conversion block. Then, the CP is added to the beginning of the frame by copying 25 % of the end portion of the frame by using Array VI. The overall OFDMA frame structure is shown in Table 1. The SubVI of the source nodes is created, as shown in the block diagram given in Fig. 4. The signals are then transmitted through the antenna by using the RF front ends of the USRP modules, controlled through the USRP VI from the USRP TX Library.

4.2.2 Relay node

As the relay performs reception during the broadcast phase and transmission during the relaying phase, we implemented both transmitter and receiver functionalities at the relay node. Due to its significant processing advantages, we used NI PXIe-5644R VST express module as the relay node. We used RFSG and RFSA VI to provide the signal generation and acquisition, respectively. In the relay’s OFDMA receiver part, similar to the source node SubVI’s USRP VI, RFSA VIs are used. These VIs are responsible for the start and end of the session and parameter configuration of the reception process.

An overview of the relay node’s functional blocks are shown in Fig. 5. First, the estimated CFO is compensated and the CP is removed. Then, DFT is implemented. Then, zero-padded subcarriers are removed and source data is reconstructed by decomposing the information and reference subcarriers. The channel coefficients are equalized by the channel estimation and equalization VI, completing the receiver SubVI at the relay node. Following this receiver implementation, the network coding block is implemented. The network coding matrix given in (11) is implemented by using combinations of the source nodes’ data symbols in G F(4). Then, the coded symbols are used in the frame generation in the relay’s OFDMA transmitter. Transmitter SubVI of the relay is implemented in a similar way as the source nodes’ SubVI. The main difference is the fact that the RFSG VI are used in the place of USRP VI. OFDMA frame is again created by using three network-coded source data combinations. That is, 320 data subcarriers of each source nodes are coded by using 960 subcarriers. Data is interleaved with pilot symbols, again one per every eight information symbols. Then, ZP is added and IDFT of this sequence is calculated. The CP is added. Following this, by using the necessary RFSG VI for session process and transmission parameter configurations, relay node SubVIs are created.

Fig. 5
figure 5

An overview of the relay’s transceiver structure. The relay first receives three sources’ data. Then, network coding is implemented. Finally, the network-coded data is modulated and transmitted

4.2.3 Destination nodes

At the destination nodes, the implementation is completed similar to the relay’s receiver SubVI, for both broadcast and relaying phases. Instead of RFSA VI, USRP VIs are used for the session process and the parameter configuration. Then, CFO is estimated and compensated. CP removal and DFT blocks are implemented. Then, ZP is removed and data portions are decomposed. Information symbols are separated from pilot symbols for every data symbol. After implementation of the channel estimation and the equalization block, network-coded information portions are obtained and thus destination node’s SubVI is completed. An overview of these functions are shown in the block diagram given in Fig. 6. At the end of the timed flat sequence structure, ML-like estimation and network decoding block are designed. By using this block, network decoding is implemented for the network-coded portions as given in (10). As will be detailed in the following section, the source nodes’ data bits are obtained at the destination nodes. BER and EVM measurements are implemented at all receiver modules with the purpose of monitoring the link performances of the implemented NCC-OFDMA network.

Fig. 6
figure 6

A simplified block diagram of the destination nodes. Analog data that are coming from source and relay nodes are converted to digital data. Next, CP removal process is handled in accordance with data coming from source nodes. Then, serial-parallel conversion is implemented for the DFT block. Channel estimation and equalization are applied to DFT block’s output, in order to obtain bit sequences coming from all sources. Finally, network decoding is implemented and bit estimates are obtained

5 Measurement results

In this section, real-time averaged BER and EVM measurements that are performed to analyze and monitor the NCC-OFDMA performance are detailed. System performance of the NCC-OFDMA is obtained for two different distance configurations between nodes. Also, the impact of different transmitter gain configurations are investigated by using a subset of the software-configurable parameters. BER and EVM values are measured for all transmission links. Network decoder’s BER values are also monitored.

In addition to the well-known performance metric, BER, EVM measurements are investigated to demonstrate the performance of the SDRs. EVM is a measure of the modulation quality and error performance for the communication systems. It plays an important role on the quantification of the phase and amplitude distortions and on the determination of the circuit’s performance. EVM quantifies the demodulator’s performance, by comparing the ideal symbol vector’s and real measurement vector’s difference by using phasors in the I-Q plane. In our system model, let \(\hat {I}[\!n] (\hat {Q}[\!n])\) denote the real (imaginary) part of the equalizer output corresponding to a particular link for one OFDMA symbol. The real (imaginary) component of the actual modulated symbols is denoted by I[ n](Q[ n]). The EVM of the ith source for single OFDMA frame can be calculated as

$$ {}EVM_{i}=\frac{\sqrt{\frac{1}{|F_{i}|} \sum_{n \in F_{i}} \left[ \left(I[n]-\hat{I}[n] \right)^{2} +\left(Q[n]-\hat{Q}[n] \right)^{2} \right]}} {|v_{\text{max}}|}, $$

where |v max| is the maximum absolute value of the received ideal symbol, and F i represents the subcarrier set, with the cardinality given as |F i |=320 for i∈{1,2,3}.

Link performances are measured to quantify the performance improvement introduced by the NCC. In the measurements, we consider broadcast and relaying phases individually. We monitor the performance in terms of average EVM and BER values in real time. We also monitor the average BER values at the output of the network decoders at each destination node. The measurements are repeated with different transmit gains at both the source and relay nodes. Two different positioning of nodes are considered to investigate the impact of the channel attenuation. As aforementioned, the transmission qualities of the USRP modules and the VST module are different due to their front-end structures. Hence, the relay-to-destination links are subject to a more robust transmission, when compared to the direct transmission links, e.g., links between source nodes and relay, and the links between source nodes and destination nodes. In order to illustrate the difference, received 4-QAM constellations are investigated. Exemplary 4-QAM constellation diagrams for the S3-D1 and the R-D1 links are shown in Fig. 7, respectively. The relay node acts as a more reliable transmitter and provides a more compact received constellation with a lower EVM value, as can be observed from the received signal constellation.

Fig. 7
figure 7

Constellation diagrams at D1 (a) received signal from S3 (b) received signal from R

BER and EVM measurements of broadcast phase and relaying phase with respect to different transmission gain values are given in Tables 3 and 4, respectively. To investigate the effect of channel attenuation, the distances between source and destination nodes are set as 75 and 90 cm. An average of 800 OFDMA symbols are transmitted at each test, and tests are repeated 100 times. BERs at the destinations after the network decoder are given in Table 5. First, let us consider the communication performances of the direct links between source and destination nodes through BER measurements. According to results obtained at different transmit gain values, the observed BER decreases with higher transmit gains, as expected. Note that there are BER differences for two destination nodes due to their hardware performances. For example, considering D1 at 75 cm, BER of S1 is 6×10−3 at 1-dB gain, This value decreases to 2×10−3 at 4-dB gain. EVM values are also consistent. BER of S2 is 2×10−2, which is higher than BER of S1, 6×10−3, again due to the front-end performance differences. As expected, the EVM value of S2 is 42. This is higher than that of S1, 37.23. Similar observations are also valid for 90-cm configuration with higher BER and EVM values due to increased channel attenuation. At D1, BER of S1 at 1-dB gain is 1.99×10−2. This BER measurement decreases to 1.2×10−2 at 4-dB transmitter gain. EVM results are also consistent. Please note that zero error cases do not correspond to an error-free link, as erroneous cases are expected to be observed with increasing number of OFDMA symbols.

Table 3 Performance of the broadcast phase with different gain levels
Table 4 Performance of the relaying phase with different gain levels
Table 5 Performance of the network decoder with different gain levels

Secondly, the transmission performances between source and relay nodes are considered. Results show that link performances can again significantly vary based on the hardware properties. For example, at 75-cm distance, S2’s BER at relay with 1-dB gain is 3.1×10−5. This is much lower than 2×10−2 for D2 in the direct link. Similarly, EVM measurements are lower than those of direct links, as can be seen in Table 3. Results at 90-cm distance demonstrate similar performances. S2 has a BER of 2.4×10−5 for relay, much lower than BER 3.7×10−2 for D2 in the direct link. Similar to previous results, EVM measurement of 55.73 decreases to 13.26.

Thirdly, the link between relay and destination nodes is considered. In both distance configurations, the relay-destination link performances are higher for both D1 and D2, due to hardware advantages of the VST module. Also note that sources’ transmit gains also affect the relay-destination link’s quality as can be observed by the variations of EVM and BER measurements.

Lastly, the performance of the overall NCC-OFDMA is observed with different source and relay gain levels. Measurement results are given in Table 5. From these results, it is clear that network coding plays a vital role in improving the resilience of the OFDMA system. Right hardware choices also have an impact on the performances.

The effect of the relaying phase on the performance can also be observed from BER values. For instance, at 90 cm, BER of S2 at D2 is 1.7×10−2 at 4-dB gain. This is higher than BER of S1, 1.4×10−2. However, this relationship is inverted with NCC as BER of S1 at the output of the network decoder is 7.7×10−3, higher than the BER of S2, 2.7×10−3 at −23-dBm relay gain, due to impact of the the relaying phase. When compared to direct link transmission, through the use of network coding, BER measurements are lower and network-coded links give better results than direct links. These results clearly show that network coding is effective in improving the error performance.

To provide a visual perspective, performances of the broadcast phase and NCC protocol are compared in terms of BER measurements in Fig. 8. At 90 cm, BER measurements of S3 at D1 at the end of broadcast and NCC phases are compared at 4-dB source and −23-dBm relay gains. From Fig. 8, it is clear that the error performance of the broadcast phase is worse than NCC, as the majority of the error measurements of the broadcast phase are generally higher than 1.5×10−2. This is not the case for NCC.

Fig. 8
figure 8

Link performance comparison for S3 data at 4-dB gain. The relay gain is −23 dBm

The variation of NCC’s BER measurements of S2 at D2 with time at a relay gain of −23 dBm is compared with respect to source-destination distances. Although error variations are observed at both 75 and 90 cm, the average performance of the 90-cm configuration is worse, as indicated in Fig. 9.

Fig. 9
figure 9

Comparison of NCC BER values of the S2 data for D2 with different distances. Source gain is 1 dB, relay gain is −23 dBm

Finally, in Fig. 10, error performances of NCC with respect to instantaneous SNR’s are plotted for 90-cm case. The SNR estimates are obtained with the methodology proposed in [67]. BER measurements of S2 at D1 with 4-dB gain are compared with respect to SNR values with relay gains of −20 and −15 dBm. As can be observed from Fig. 10, the error performance of the −20-dBm configuration is worse than that of −15 dBm.

Fig. 10
figure 10

Comparison of BER values of the S2 data for D1 with different relay gains with respect to SNR values at 90 cm. Source gain is 4 dB

As an overview, we can observe that the front-end properties of the transmitting nodes, along with the selected transmission gain levels, significantly affect the robustness of the system. Relative locations of nodes also generate observable performance differences. Another noteworthy observation is the impact of error propagation at the relay nodes. When source-relay links are subject to high error rates, (10), the network decoder generates a symbol error resulting on higher BER measurements. The highly robust transmission at the PXI module generates an error propagation effect. This effect at the relay nodes should definitely be taken into consideration when designing NCC systems for wireless links.

5.1 BER visualization

We also implemented real-time BER visualization using a graphical user interface. Bit sequences, which are produced from user symbols at the output of the network decoding block, are compared with the PN sequences that are used in the source SubVI. LED indicators in the LabVIEW are turned on or off according to the error status. If no errors are observed, LEDs are turned on. As an example, S3 is monitored as shown in Fig. 11. Through this interface, we can visually observe the bit errors of the NCC-OFDMA system. Measurements are performed with two distinct relay gain levels; −25 and −16 dBm. It is clear that transmission is implemented without any bit errors at −16 dBm for that particular test, but bit errors are observed at the −25-dBm relay gain.

Fig. 11
figure 11

Interfaces of the real-time BER measurements. a Erroneous transmission with −25-dBm relay gain. b Error-free transmission with −16-dBm relay gain

6 Conclusions

Network coding is a promising feature for communication networks due to its potential to provide more efficient usage of limited network resources. It is considered to be included in 5G standards to alleviate the problem of allocating network resources to the ever increasing number of users and devices. Current network coding studies in the literature generally focus on wired network infrastructures with error-free channel models, frequently making use of time division multiplexing. However, error-free channel models are not realistic for practical applications over wireless channels. In this study, we implemented an NCC-OFDMA system using SDR nodes, for the first time in the literature, by making use of the wireless environments’ broadcast nature through cooperative communication. According to the BER and EVM measurement results, the implemented system operates successfully in real time, outperforming point-to-point communication links.

7 Endnotes

1 In our discussion, we concentrate on classical network coding, excluding physical layer network coding approaches and concentrating on symbol level network coding that includes straightforward extensions to generalized network topologies. An overview of physical layer network coding literature that performs network coding over complex fields is also provided in Section 2 for completeness.

2 We use a generalized modulation function with the goal of accommodating higher order modulations than binary phase shift keying.