Network Coding

Beyond Store-and-Forward

Traditional relay networks use store-and-forward: the relay receives a packet, buffers it, and retransmits it unchanged. Network coding breaks this paradigm by allowing intermediate nodes to combine information from multiple flows before forwarding. In the classic two-way relay scenario, where nodes AA and BB exchange messages via relay RR, conventional relaying requires 4 time slots (A→RA \to R, R→BR \to B, B→RB \to R, R→AR \to A). With network coding, the relay XORs the two messages and broadcasts the combination in a single slot, reducing the exchange to 3 or even 2 time slots. This physical-layer network coding (PNC) doubles the spectral efficiency of two-way relay communication and has profound implications for multi-hop network design.

Definition:

Two-Way Relay Channel

In the two-way relay channel (TWRC), nodes AA and BB wish to exchange messages via a relay RR. Three strategies have increasing spectral efficiency:

Conventional relaying (4 phases): Phase 1: A→RA \to R (mAm_A). Phase 2: R→BR \to B (mAm_A). Phase 3: B→RB \to R (mBm_B). Phase 4: R→AR \to A (mBm_B). Total: 4 time slots for one exchange.

Digital network coding (DNCE, 3 phases): Phase 1: Aβ†’RA \to R (mAm_A). Phase 2: Bβ†’RB \to R (mBm_B). Phase 3: RR broadcasts mAβŠ•mBm_A \oplus m_B. AA recovers mB=(mAβŠ•mB)βŠ•mAm_B = (m_A \oplus m_B) \oplus m_A; similarly BB. Total: 3 time slots.

Physical-layer network coding (PNC, 2 phases): Phase 1: AA and BB transmit simultaneously to RR. RR receives yR=hAxA+hBxB+ny_R = h_A x_A + h_B x_B + n. Phase 2: RR maps yRy_R to a network-coded symbol and broadcasts. Total: 2 time slots.

PNC achieves the theoretical minimum of 2 time slots for a bidirectional exchange and doubles the spectral efficiency relative to conventional relaying. The key challenge is reliable decoding at the relay when two signals interfere, which requires careful design of the mapping function and can exploit the structure of lattice codes.

Definition:

Physical-Layer Network Coding (PNC)

In physical-layer network coding, the relay exploits the natural superposition of wireless signals to directly decode a function of the transmitted messages. For binary messages mA,mB∈{0,1}m_A, m_B \in \{0, 1\} with BPSK modulation:

Phase 1: yR=hA(2mAβˆ’1)+hB(2mBβˆ’1)+nRy_R = h_A(2m_A - 1) + h_B(2m_B - 1) + n_R

The relay decodes the XOR mAβŠ•mBm_A \oplus m_B (not the individual messages) using a modified decision rule. With equal channel gains (∣hA∣=∣hB∣|h_A| = |h_B|), the received constellation has 3 distinct points: the sum and difference of the two signals.

Phase 2: The relay broadcasts mAβŠ•mBm_A \oplus m_B. Each end node applies its own message as side information to recover the partner's message.

The achievable sum-rate of PNC is:

RPNC=12min⁑ ⁣{log⁑2(1+∣hA∣2+∣hB∣2),β€…β€Šlog⁑2(1+SNRRA)+log⁑2(1+SNRRB)}R_{\text{PNC}} = \frac{1}{2}\min\!\left\{ \log_2(1 + |h_A|^2 + |h_B|^2),\; \log_2(1 + \text{SNR}_{RA}) + \log_2(1 + \text{SNR}_{RB}) \right\}

where the factor 1/21/2 reflects the 2-phase protocol (each direction gets half the resources).

Theorem: Spectral Efficiency Gain of PNC

For a symmetric two-way relay channel where all links have the same average SNR Ξ³\gamma, the sum spectral efficiencies of the three relaying strategies are:

Conventional (4-phase): Rconv=12log⁑2(1+γ)R_{\text{conv}} = \frac{1}{2}\log_2(1 + \gamma)

Digital network coding (3-phase): RDNCE=23log⁑2(1+γ)R_{\text{DNCE}} = \frac{2}{3}\log_2(1 + \gamma)

Physical-layer network coding (2-phase): RPNC=log⁑2(1+γ)R_{\text{PNC}} = \log_2(1 + \gamma)

The spectral efficiency ratios are: RPNC:RDNCE:Rconv=1:2/3:1/2R_{\text{PNC}} : R_{\text{DNCE}} : R_{\text{conv}} = 1 : 2/3 : 1/2.

PNC achieves 2Γ—\times the spectral efficiency of conventional relaying.

Each strategy requires a different number of time slots for one bidirectional exchange. Since the per-phase rate is the same (log⁑2(1+γ)\log_2(1+\gamma) per link), the spectral efficiency is inversely proportional to the number of phases: 4, 3, or 2 phases divide into the two directions' worth of information. PNC achieves the minimum possible 2 phases by exploiting the simultaneous transmission in Phase 1.

Network Coding Animation

Visualise the message exchange in a two-way relay scenario under conventional, digital network coding, and physical-layer network coding protocols. The animation shows the time-slot structure and the information flow at each phase. Adjust the SNR to compare the achievable sum rates of the three strategies. Observe that PNC consistently achieves 2Γ—\times the spectral efficiency of conventional relaying.

Parameters
15
6

Example: Two-Way Relay Rate Comparison

Two nodes AA and BB exchange data via a relay RR. All links have SNR =15= 15 dB.

(a) Compute the sum spectral efficiency for conventional relaying, DNCE, and PNC. (b) If the system bandwidth is 10 MHz, compute the sum throughput for each strategy. (c) How much additional bandwidth would conventional relaying need to match PNC's throughput?

Quick Check

In physical-layer network coding (PNC) for the two-way relay channel, what does the relay decode in Phase 1?

The individual messages mAm_A and mBm_B separately

The XOR (or a function) of the two messages mAβŠ•mBm_A \oplus m_B, not the individual messages

Nothing β€” the relay simply amplifies and forwards

A compressed version of the superimposed signal

Network Coding

A technique where intermediate network nodes combine (encode) data from multiple incoming flows before forwarding, rather than simply routing individual packets. In wireless two-way relay channels, network coding reduces the number of time slots needed for bidirectional exchange from 4 to 3 (digital NC) or 2 (physical-layer NC).

Related: Physical-Layer Network Coding (PNC), Two-Way Relay Channel (TWRC)

Physical-Layer Network Coding (PNC)

A technique where the relay decodes a function (typically XOR) of simultaneously transmitted messages by exploiting the natural superposition of wireless signals. PNC achieves the minimum 2-phase protocol for two-way relay exchange, doubling the spectral efficiency over conventional 4-phase relaying.

Related: Network Coding, Two-Way Relay Channel (TWRC)

Common Mistake: Assuming PNC Works Without Tight Synchronisation

Mistake:

"Physical-layer network coding simply exploits the natural superposition of wireless signals β€” no additional synchronisation is needed beyond standard OFDM timing."

Correction:

PNC requires the two end nodes to transmit simultaneously so that their signals arrive at the relay within the cyclic prefix duration. In practice, this means:

  • Symbol-level synchronisation: The relay must coordinate the two nodes' transmission timing to within the CP duration (e.g., 4.7 ΞΌ\mus in normal CP for 15 kHz SCS, corresponding to ∼1.4\sim 1.4 km of propagation distance mismatch).
  • Carrier frequency offset (CFO): Residual CFO between the two nodes' oscillators creates inter-carrier interference in the superimposed OFDM signal. PNC performance degrades sharply when the CFO exceeds ∼1%\sim 1\% of the subcarrier spacing.
  • Power control: If one node's signal is significantly stronger, the XOR decoding at the relay is unreliable (the near-far problem). Transmit power control or successive interference cancellation is needed.

These practical challenges have limited PNC deployment in standards despite its theoretical appeal.

Comparison of Relay Protocols

PropertyDF (Decode-and-Forward)AF (Amplify-and-Forward)CF (Compress-and-Forward)PNC (Physical-Layer NC)
Relay processingFull decoding + re-encodingLinear amplificationQuantisation + Wyner-Ziv codingXOR / lattice decoding of sum
Noise at relayRemoved (if decoded correctly)Amplified and forwardedQuantised (distortion-bounded)Partially cancelled via structure
Best regimeStrong S→RS \to R link (relay near source)All regimes (simple, suboptimal)Strong R→DR \to D link (relay near destination)Two-way exchange (bidirectional)
Half-duplex phases2 (listen + forward)2 (listen + forward)2 (listen + forward)2 (simultaneous Tx + forward)
Achieves capacity?Yes, for degraded relay channelNo (suboptimal in general)Approaches cut-set bound near destinationOptimal for TWRC under certain conditions
ComplexityHigh (full codec at relay)Low (analog amplification)High (source coding at relay)High (structured codes, synchronisation)
Standards adoptionLTE-A Type 1 relay, 5G IABLTE-A Type 2 relay (transparent)Research stageResearch stage

Two-Way Relay Channel (TWRC)

A three-node network where two end nodes exchange messages via a common relay, with no direct link between the end nodes. The TWRC is the canonical setting for network coding in wireless networks.

Related: Network Coding, Physical-Layer Network Coding (PNC)