## 2 Two-Way Relaying System Model and Related Works  
Let us recall a two-way relaying communication system in which standard or physical layer network coding is used. In such a communication system, packets from terminal A are transmitted to terminal B, and vice versa, via a relay which is located in the range of both terminals. However, none of the terminals can reach the other one directly with appropriate transmission quality. In order for terminals A and B to exchange packets in the standard two-way relaying, three steps are necessary (see Figure 1). In the first step, terminal A sends a packet to the relay. In the second step, terminal B sends its packet to the relay. In the third step, the relay performs the modulo-2 addition of both packets, creating a packet which is broadcast to both terminals. Based on the knowledge of own packet transmitted to the relay, and the packet received from it, the terminal recovers the packet transmitted by the remote terminal as the modulo-2 sum of both packets. Physical layer network coding makes the system more efficient. In PNC, both terminals transmit their packets in the first phase simultaneously. The relay interprets the composite received signal constellations carrying packet data and generates a modulo-2 sum of the packets, which subsequently determines the packet broadcast by the relay to both terminals in the second phase. Thus, only two phases (multiple access and broadcasting) are needed, in contrast to the standard NC requiring three phases. The crucial factor in PNC is the way that the relay produces the packet to be broadcast to the terminals participating in the packet exchange. The generic scheme of this system is shown in Figure 2.  
As already mentioned, there is a problem of how channel coding and other algorithms are managed in the relay of a two-way relaying system. This problem has attracted the attention of many researchers. Paper [18] is devoted to the implementation of physical layer network coding in two-way relay networks. The authors compare the existing network coding schemes, such as traditional network coding, physical network coding, and so-called soft network coding (SNC). The latter was introduced in [19]; however, it is related to traditional NC with channel coding. In this paper, channel decoding at the relay is performed after hard or soft combining of the samples subsequently received from terminals A and B. Then, taking advantage of the linearity of channel coding and network coding, single codeword decoding is performed. The authors of [18] further enhance the idea presented in [19] by combining the samples of the signals subsequently received from both terminals in front of their demodulators. They show in a theoretical analysis that the proposed scheme, similar to that presented in [19], saves about 50 percent of the cost of demodulation and decoding processes as compared with traditional NC with coding. The drawback of the schemes proposed both in [18] and [19] is the requirement of three transmission steps, as in regular NC, as compared with two steps in PNC. Figure 1: General scheme of a two-way relaying system with standard network coding. Figure 2: General scheme of a two-way relaying system with physical layer network coding. In [15], the achievable rates of several physical layer network coding schemes are analyzed for two-way relaying channels. The authors propose a new method of PNC inspired by Tomlinson-Harashima precoding [20] in which a modulo operation is used to control the power at the relay. They motivate their proposal by the fact that, in the original PNC, the relay broadcasts a signal that contains a component that is already known to the destination terminals. In this sense, from the perspective of a given receiver, a portion of the transmit power budget of the relay is wasted on transmitting already known information. The paper contains a simplified throughput analysis of all considered physical layer network coding schemes; however, no coding is considered.