# Decode and forward

The decode-and-forward relay protocol is a protocol defined for wireless cooperative communications. An example of a wireless communication network in which cooperation improves the performance of the system is the relay network.

The relay decodes and re-encodes the received signal, then it forwards it to the destination. This processing of the signal at the relay is also know as making a hard decision, as the information sent by the relay does not include any additional information about the reliability of the source-relay link. When uncoded modulation is used this protocol is also know as Detect-and-Forward as the processing of the relay is detection of the signal.

## DF Relay Function

For the general case the relay function is given by: $\ f_{DF}(y_{SR}) = \widehat{x}$ where, $\widehat{x}$ denotes the decoded/detected signal at the relay.

## BPSK relay function

For BPSK modulation the DF relay function is $\ f_{DF}(y_{SR}) = \mathrm{sgn}(y_{SR})$ where sgn is the sign function. Notice that this relay function depends only on the received signal $y_{SR}$, and does not incorporate any information about the quality of the S-R channel, or about how accurate the relay decoding is.

## Detector at destination

Due to its simplicity of the relay function, the decode and forward protocol attracted a lot of attention and interest in the wireless communications community.

But even if the relay function is straight forward, the decoder at the destination is not as simple. When using the optimal detector which is the ML detector for higher order modulation is becomes complicated. Thus intensive analysis has been done in finding a detector that would achieve full diversity.

Types of detectors used in the DF relaying protocol:

### ML detector

The general form of the ML detector for the three node network is: $\ \widehat{x}_D = \underset{x}{\max} ~ \mathrm{p}(y_{SD}|x) \mathrm{p}(y_{RD}|x)$. Which for equally likely binary symbols can be easily shown to be the same as the MRC detector.

### MRC detector

The Maximum Ration Combining (MRC) detector also known as the linear diversity combining technique was first analyzed by Brennan. For the simple relay network with BPSK modulation it is given by $\ \underset{x}{\max} ~ w_{SD} y_{SD} + w_{RD} y_{RD}$ where both $w_{SD}$ and $w_{RD}$ are weights proportional to the corresponding channels, S-D and R-D.

#### BPSK MRC destination detector

After the relay transmits, the destination makes a decision based on the ML detector given in with the two received signals from R and D. $\ \widehat{x}_D = \underset{x}{\max} ~ \mathrm{p}(y_{SD}|x) \mathrm{p}(y_{RD}|x)$

If the noise in the system is assumed to be AWGN the probability density function of $y_{RD}$ is that of a transmitted discrete symbol received in Gaussian noise at the destination, $y_{RD} \sim \mathcal{N}(h_{RD}\widehat{x},1)$. Replacing the density $\mathrm{p}(y_{RD}|x)$, the DF decision rule at the destination for BPSK modulation becomes: $\ h_{SD} y_{SD} \underset{H_0}{\overset{H_1}{\gtrless}} \ln \left( \frac{ \frac{1}{\sqrt{2\pi}} \exp \left\lbrace -\frac{(y_{RD}+h_{RD})^2}{2} \right\rbrace } { \frac{1}{\sqrt{2\pi}} \exp \left\lbrace -\frac{(y_{RD}-h_{RD})^2}{2} \right\rbrace } \right)$ $\ h_{SD} y_{SD} \underset{H_0}{\overset{H_1}{\gtrless}} \ln \left( e^ { -2h_{RD}y_{RD} } \right)$ $\ h_{SD} y_{SD} + h_{RD} y_{RD} \underset{H_0}{\overset{H_1}{\gtrless}} 0$ where, the two hypotheses $H_0$ and $H_1$ for the two possible models of the system are given by $H_0= \lbrace x=-1 \rbrace$ and $H_1=\lbrace x=1 \rbrace$.

As seen from the decision rule, the destination needs to know channel information only for the R to D and S to D links.

The quality of the decision made at the relay affects the overall performance of the system. However, for the DF protocol the quality of the decision at the relay is not taken into consideration on the destination side (no information about S to R is required at node D). This property can be harmful to the performance of the system. For example, for a bad S-R channel, a lot of wrong decisions will be made at the relay. Even if the R-D channel is very good, the destination will not be able tell the accuracy of the signal sent by the relay, $f_{DF}(y_{SR})$. On the other hand, suppose the S-R channel is good and assume that symbol $1$ was sent. If a weak signal is received at the relay, for example $y_{SR} = 0.1$, when it is forwarded to the destination it will be amplified to the symbol power $P_{R} \cdot 1$. This means a correct decision has been made and a strong signal has been sent for this decision.

These are some of the most important advantages and disadvantages of DF.