## 1. Introduction

Recently, cooperative communication has become one of the appealing techniques that can be used in 5G wireless relay networks to achieve spatial diversity and multiplexing, which overcomes the channel impairments caused by several fading effects and destructive interference. Though various cooperative communication schemes exist [1, 2], the AF scheme is more attractive due to its simplicity since the relays simply forward the amplitude phase-adjusted version of received signals to destinations. In Ref. [2], a distributed beamforming relay system with a single transmitter-receiver pair, and several relaying nodes have been proposed. The authors assumed that perfect channel state information (CSI) is available at all relay nodes. Although the same scenario is investigated in Ref. [3], the second-order statistics of all channel coefficients are assumed to be available at the relays. Furthermore, the beamforming weights are obtained in order to maximize the signal-to-noise ratio (SNR) at destination subject to holding the relay power above a certain threshold value.

In the past three decades, code-division-multiple-access (CDMA) systems have been extensively investigated as the one of the important candidates for transmitting data over single channels while sharing a fixed bandwidth among a large number of users [4]. The design of receivers to increase the number of supported users, in these systems, has been explored in Ref. [5, 6]. In Ref. [6], joint channel estimation and data detection based on an expectation-maximization (EM) algorithm [7] is proposed. The authors have shown that the proposed receiver achieves a near-optimum performance with modest complexity. Furthermore, the authors in Ref. [5] designed a double stage linear-detection receiver to increase the number of supported users on the system. This design requires complex processing at the receiver’s side instead of using a precoding scheme at the transmitter where more hardware complexity is tolerable. Therefore, the authors in Ref. [8] studied a MIMO CDMA system implementing zero-forcing beamforming (ZFBF) as an efficient precoding technique.

Though various complex multiuser detection techniques that can be used in CDMA systems [9], the unconventional matched filter receiver is chosen at destination nodes due to the intractability of the precoding design when other forms of detectors are used. In this article, we have focused on the optimization of the beamforming weights applied to the outputs of matched filter banks to minimize the total relay transmit power subject to a target SINR of all destinations. Our proposed distributed CDMA-relay network can easily overcome the other multiplexing schemes such as space division-multiple access (SDMA), time division-multiple access (TDMA) or frequency division-multiple access (FDMA). The SDMA schemes [10] in which sources, destinations and relays are distributed in the space, have two disadvantages. First, these schemes should have a significant number of relays in proportion to their users to be able to overcome channel impairments at destinations. Although the SDMA scheme with the limited number of relays cannot compensate the interference power, our CDMA schemes can easily satisfy the network QoS due to their ability to decrease the interference effect at destinations. So, the second disadvantage of SDMA is the inefficient use of hardware communication resources. In the SDMA scheme, if the number of users increases, the network data rate can significantly decrease. Therefore, the number of relays should be considerably increased to be able to satisfy the QoS constraints, which is costly for the network operator.

**Notation**: We denote the complex conjugate, transpose, Hermitian (conjugate transpose) and inner product operators by (⋅)*, (⋅)^{T}, (⋅)^{H} and 〈 ⋅ 〉, respectively. We use *E*{⋅} to denote statistical expectation. trace{⋅} and Rank{⋅} represent the trace and rank of the matrix, respectively. Vec(⋅) is the vectorization operator stacking all columns of a matrix on top of each other; ⊗ represent the Kronecker product of two matrices and *A* is a non-negative semi-definite matrix.

## 2. 5G wireless system and equations

Consider a wireless relay network with *d* pairs of source-destination (peers) communicating without a direct link through *R* MIMO or SISO relay antennas. In this chapter, a two-step AF protocol is used. In the first step, each source user broadcasts its spread symbol toward the relays. A matched filter is applied in each relay in order to retrieve the source’s signals. In the second step, the adjusted and spread signals by the relays are transmitted to destinations.

## 3. MIMO relay networks

In this section, a peer-to-peer MIMO-relay network with *d* pairs of source-destination nodes is considered, as shown in **Figure 1**. It is assumed that all source and destination nodes are equipped with one SISO antenna and each source attempts to maintain communication with its corresponding destination. It is assumed that there is no direct link between source and destination pairs due to path loss and deep shadowing and all nodes are working in a half-duplex mode. We use a two-step AF protocol. During the first step, each source broadcasts its signals to MIMO-relay. Then, after applying the beamforming weights at MIMO-relay, the adjusted signals transmit to all destinations.

Let *s*_{k} stands for the *k*^{th} source symbol that is assumed to be independent of the other sources, that is, *k*^{th} source to the *r*^{th} relay as *f*_{rk} and the channel coefficient from *r*^{th} relay to *k*^{th} destination as *g*_{rk}. Then, the received signal at the *r*^{th} relay is given by:

where *ω*_{r} is the noise at the *r*^{th} relay. For simplicity, Eq. (1) can be rewritten as:

where **χ** ≜ [*χ*_{1}, *χ*_{2}, … , *χ*_{R}]^{T}, **ω** ≜ [*ω*_{1}, *ω*_{2}, … , *ω*_{R}]^{T}_{,} **f**_{l} ≜ [*f*_{1l}, *f*_{2l} , … , *f*_{Rl}]^{T}.

The received signal in MIMO relay has been processed by the beamforming weights, that is, **W** ∈ *ℂ*^{R × R}, which should be designed appropriately. Finally, each MIMO-relay antenna transmits the following signal to destinations:

The *r*^{th} entry of **γ** is the signal transmitted by *r*^{th} MIMO antennas. Finally, the received signal at the *k*^{th} destination is given by

where *ζ*_{k}(*t*) is the noise at the *k*^{th} receiver. We can easily rewrite Eq. (4) as:

(5) |

The three last terms of Eq. (5) are the desired received signal, interference and noise at the *k*^{th} destination, respectively. The object of the network beamforming is to minimize the total relay transmit power subject to maintaining every destination SINR above a pre-defined threshold value *γ*_{th} (as a QoS parameter of the network). In this case, the instantaneous SINR for *k*^{th} destination simply becomes the desired signal power of the desired signal to the power of interference plus noise. So, the optimization problem can now be written as

where *P*_{R} is the total relay transmit power, *w* stands for beamforming weights, SINR_{k} and *γ*_{k} denote the received SINR and the target SINR (threshold value) at the *k*^{th} destination node, respectively.

First, using Eq. (3), the total relay transmit power can be calculated as

where **R**_{x} ≜ *E*{**χχ**^{H}} and it can be calculated as:

For any conforming matrices **M**, **N** and **Z**, the following equation holds

Therefore, Eq. (7) can be rewritten as the following quadratic form:

where **w** ≜ vec(**W**) and **T** ≜ (**I**_{R × R} ⊗ **R**_{x}).

Using Eq. (5), the desired signal power at the *k*^{th} destination can be obtained as:

where

Also, using Eq. (5), the received noise power at *k*^{th} destination can be calculated as:

where

Finally, the power of the received interference at the *k*^{th} destination can be computed as

(13) |

where

In this case, the instantaneous SINR for *k*^{th} destination simply becomes the desired signal power of the desired signal to the power of interference plus noise. So, the optimization problem can now be written as

Since

In this problem, if all the matrices *k*, the problem is convex and can be solved uniquely. However, the feasible set of our optimization problem is empty since ** k** and

**w**. Therefore,

*AB*) = trace(

*BA*) (when A is an

*m*×

*n*and B is an

*n*×

*m*matrix), the optimization problem Eq. (14), can recast to

This optimization problem is non-convex, because the Rank(**X**) = 1 constraint is non-convex. We relax the problem by ignoring this non-convex constraint and convert it to a convex SDP problem. The following semi definite representation (SDR) form is the relaxed version of the problem Eq. (16).

The optimal value of the relaxed problem is a lower bound of the optimal value of SDP problem (Eq. 16).Well-known semi-definite problem solvers such as SeDuMi or CVX can solve the above problem in polynomial time using interior point methods. If the optimal value of Eq. (17), that is, **X**_{opt}, is rank one, then its principal eigenvector is exactly the optimal solution of the original optimization problem. Since the solution of Eq. (17) is not always rank one, one can use randomization techniques [10] to obtain an approximate solution of the original problem from the solution of the relaxed problem. The randomization technique is finding the best solution from the candidate sets of beamforming vectors generated from **X**_{opt} [12]. Luo et al. [13] and Chang et al. [14] analyzed the accuracy of these techniques for different semidefinite problems, and it has been found that the randomization technique has acceptable performance in practical scenarios [15]. Therefore, the eigenvalue decomposition of **X**_{opt} can be calculated as **X**_{opt} = *VDV*^{H}. Then the candidate sets of beamforming vectors is generating as *x*_{c} = *VD*^{(1/2)}*p*_{c}, where *p*_{c} is a circularly symmetric complex, and zero mean, unit variance white Gaussian vector, that is, *p*_{c} ∈ *ℂ*^{R × 1} ∼ *ℂΝ*(0, 1). Hence, it can be easily recognized that the vector *x*_{c} satisfies *E*{*x*_{c}*x*_{c}^{H}} = **X**_{opt}. This candidate vector generation should perform several times and in each iteration, any vector (or scaled version) that satisfies SINR constraints of problem Eq. (17) is saved as a candidate vector (

Then, solving problem Eq. (16) from *x*_{c} becomes finding a proper scaling factor of *β* to Eq. (17), the following problem will be attained

In the above algorithm, the acceptable scaling factors are those that satisfy *β* trace(**T**_{k}**X**) ≥ 0. Thus, the maximum scaling factor should be selected as

Consequently, the approximate solution of problem (Eq. 16) is **X**_{opt} is an acceptable and a near optimal solution to the original non-convex problem. Another optimal solution of Eq. (16) can be found using a penalty function in the objective part of the problem and converting the objective function into the difference of two convex functions subject to current convex constraints [16], and applying an effective non-smooth optimization algorithm based on the sub-gradient of rank one constraint.

For examination, we assumed that channel state information is known at a processing center and the beamforming weights are optimized and spreaded to the nodes from this processing Center [17]. In each simulation snapshot, the channel coefficients *f*_{rk}, *g*_{rk} are generated as i.i.d circularly symmetric complex Gaussian random variables with variances of

**Figures 2** and **3** show the minimum MIMO-relay transmit power *γ*_{th}, for different values of **Figures 2** and **3** that the better quality of uplink and/or downlink channels can decrease the minimum MIMO-relay transmit power for a certain threshold value.

In **Figures 4** and **5**, we examine the network performance by changing the number of MIMO-relay antennas and number of source-destination pairs. As expected, more power saving will be obtained by increasing the number of MIMO antennas and/or decreasing the number of user nodes.

## 4. MIMO-CDMA relay networks

In the last section, we obtained the optimal beamforming weights for a MIMO relay network. Here, in addition to the multiple antenna technique, CDMA is applied to the network to increase the order of multiuser multiplexing. CDMA systems can share a fixed bandwidth among a large number of users without the need of frequency division or time division between nodes. CDMA introduces a diverse range of trade-off between receiver complexity and system performance.

As shown in **Figure 6**, a two-step AF protocol is used for this MIMO-relay network. In the first step, each source user broadcasts its precoded signal (i.e. *s*_{l}*u*_{l}(*t*)) at its maximum power *P*_{l} toward the MIMO-relay. At the MIMO-relay, a matched filter is applied to retrieve the source’s signals. In the second step, the adjusted and spreaded signals are transmitted from MIMO-relay to all destinations. Another matched filter is used at each destination to extract its corresponding symbols.

Let *u*_{k}(*t*) denotes a signature waveform that is assigned to the *k*^{th} source. Then, the received signal at the *r*^{th} antennas of MIMO-relay is given by

The vector form of Eq. (20) can be written as:

where

By denoting the cross correlation between *k*th user’s codeword to the *l*^{th} user’s codeword as

where *ρ*_{l,n} is the cross correlation between *l*^{th} user’s code-word and *n*^{th} user’s code-word [19]:

where **γ**_{n,k}, **γ**_{n,− k}, and **ε**_{n} are defined as

The output of the matched filter in each relay has been processed by the beamforming weights **W**_{l} ∈ *ℂ*^{R×Rd}, which should be designed appropriately. We define the output of the matched filter bank as **Γ** = [**γ**_{1}^{T}, **γ**_{2}^{T}, … , **γ**_{d}^{T}]^{T} ∈ *ℂ*^{Rd×1}, the adjusted MIMO-relay signals can be written as

Another filter bank is applied to the output of each MIMO antenna, which generates *R*×*d* filtered data. This data are processed in a processing center in the MIMO relay to achieve the proper symbol vector, which can be transmitted in each user’s subspace. After beamforming by the above linear operation, the MIMO-relay transmits the following modulated and precoded signal to destination nodes:

The *r*th entry of **ψ**(*t*) is the signal transmitted by *r*th relay antenna. Then, the received signal at the *k*^{th} destination is given by

where *ζ*_{k}(*t*) is the noise at the *k*th receiver, which is also assumed to be *ℂ*N(0, 1). Finally, each destination node convolves the received signals by its code-word to retrieve its corresponding data. So, the retrieved signal will be

(29) |

where *ς*_{k} is the noise at the *k*^{th} receiver, and the following notations are defined for simplicity:

(30) |

The object of the network beamforming is to minimize the total relay transmit power subject to maintaining every destination SINR above a pre-defined threshold value

First, using Eq. (27), the total MIMO-relay transmit power can be obtained as:

(31) |

where **x**(*t*), **y**(*t*) is defined as

For simplicity, Q can be represented by the following quadratic formml:

The kernel of the above form can be expressed as a Kronecker products as follows:

where

where **w** ≜ vec(**W**) and **T** ≜ *E*(**ΓΓ**^{H})^{T} ⊗ (*ϒ* ⊗ **I**_{R × R}).

Also, the instantaneous desired signal power at the *k*^{th} destination is calculated as:

By defining **Γ**_{k} ≜ μ_{k}*S*_{k} and

(37) |

where **τ**_{k} and **R**_{k} are defined as

Also, the received noise power at *k*^{th} destination is given by:

(38) |

where

Finally, the power of the received interference at the *k*^{th} destination can be computed as

(40) |

The instantaneous SINR for *k*^{th} destination simply becomes the desired signal power of the desired signal to the power of interference plus noise. So, the optimization problem can now be written as

By defining

We solve this optimization problem in a same way as the previous section. The first simulation scenario was carried out to consider the total MIMO-relay transmit power versus destination SINR threshold value, for different values of users’ correlation factors. The averaged results are shown in **Figure 7**. The network consists of two source-destination pairs and four MIMO-relay antennas. **Figure 7** shows that the total MIMO-relay transmit power in all cases increases by raising *γ*_{th}. Furthermore, **Figure 7** indicates that when the signature sequence correlation *ρ*_{k,l} increases, more total transmit power is needed to ensure SINR constraints at destination nodes.

When *ρ*_{k,l} approaching one, the problem downgrades to the SDMA network and the system loses the benefits of CDMA technique. Also, increasing the signal dependency by increasing the correlation factor results in the more infeasibility rate of the constraints. Therefore, when the correlation factor increases from 0 to 0.75, there is little difference between the curves, but when *ρ*_{k,l} increases beyond 0.75, it can be seen that the difference becomes considerably larger. As a result, a large power gain can be achieved when moving from *ρ*_{k,l} = 1, by a small reduction of *ρ*_{k,l}. To study the effect of the number of relay nodes and the number of source-destination pairs in terms of quality of matched filter output, we have examined a network with *ρ*_{k,l} = 0.75.

**Figures 8** and **9** display the minimum relay transmit power versus *γ*_{th}, for different number of MIMO-relay antenna and different number of user pairs. As normally expected, more power saving can be achieved by increasing the number of relays or decreasing the number of users. Comparing **Figures 8** and **9** with **Figure 7** reveals that decreasing the correlation factor will be much more efficient for saving network power than increasing the number of relays.

## 5. Distributed relay networks

In this section, we considered a distributed relays network, instead of MIMO-relay. The optimization problem is defined to find the relay beamforming coefficients that minimize the total relay transmit power by keeping the SINR of all destinations above a certain threshold value.

Consider a wireless relay network with *d* pairs of source-destination (peers) communicating without a direct link through *R* single relay antennas, as shown in **Figure 10**. A two-step AF protocol is used. In the first step, each source user broadcasts its spread symbol toward the relays. A matched filter is applied in each relay in order to retrieve the source’s signals. In the second step, the adjusted and spread signals by the relays are transmitted to destinations. Another matched filter is used at each destination to extract its corresponding symbols. Let *s*_{k} stands for the *k*^{th} source symbol that is assumed to be independent of the other sources, that is, *u*_{k}(*t*) denotes a signature waveform that is assigned to the *k*^{th} source. Then, the received signal at the *r*^{th} relay is given by:

where *ω*_{r}(*t*) is the noise at the *r*th relay. By denoting the cross correlation between *k*^{th} user’s codeword to the *l*^{th} user’s codeword as *r*^{th} relay can be expressed as

where the following definitions have been used:

The output of the matched filter in each relay has been processed by the beamforming weights **W**_{r} ∈ *ℂ*^{d × d}, which should be designed appropriately. So, it can be expressed as

Another filter bank is applied to the output of each relay, which generates *d* filtered data. These data are processed in the relay in order to achieve the proper symbol vector, which can be transmitted in each user’s signal subspace. After beamforming by the above linear operation, the *r*^{th} relay transmits the following modulated and precoded signal by a CDMA technique

The vector forms of Eq. (47) can be written as

The *r*^{th} entry of **ψ**(*t*) is the signal transmitted by *r*^{th} relay and **W** ≜ [**W**_{1}, …, **W**_{R}] ∈ *ℂ*^{d × Rd}, **H** ≜ BD(**ν**_{1}, …, **ν**_{R}) ∈ *ℂ*^{Rd × R}_{,} where BD(⋅) denotes the block diagonalization of matrices. Thus, the total received signal at the *k*^{th} destination is given by

where *ζ*_{k}(*t*) is the noise at the *k*^{th} receiver and **g**_{k} ≜ [*g*_{1k} *g*_{2k} … *g*_{Rk}]^{T} is the vector of downlink channel coefficients. Finally, each destination node convolves the received signals by its code-word to retrieve its corresponding data. So, the retrieved signal will be

(50) |

where:

The three last terms of Eq. (50) are the desired received signal, interference and noise at the *k*^{th} destination, respectively.

The object of the network beamforming is to minimize the total relay transmit power subject to maintaining every destination SINR above a pre-defined threshold value *γ*_{th} (as a QoS parameter of the network). First, using Eq. (48) the total relay transmit power can be obtained as

(52) |

where

Note that using Eqs. (48) and (44), *E*(**H*****H**^{T}) can be obtained as

(54) |

Using Eq. (50), the desired signal power at the *k*^{th} destination can be obtained as

where **f**_{k} ≜ [*f*_{1k}…*f*_{Rk}]^{T}, **R**_{k} ≜ **τ**_{k}^{T} ⊗ **ρ**_{k}**ρ**_{k}^{T}. Also, the received noise power at *k*^{th} destination is given by

where

The relay noises are assumed to be zero-mean and independent with the equal noise power. So, we have

Finally, the power of the received interference at the *k*^{th} destination can be computed as

where **I**_{k} ≜ **θ**_{k}^{T} ⊗ **ρ**_{k}**ρ**_{k}^{T} and

In this case, the instantaneous SINR for *k*^{th} destination simply becomes the desired signal power of the desired signal to the power of interference plus noise. So, the optimization problem can now be written as

Since

In this problem, if all the matrices *k*, the problem is convex and can be solved uniquely. However, the feasible set of our optimization problem is empty since ** K** and

**. Therefore,**

*W*The problem is non-convex, because the Rank(**X**) = 1 constraint is non-convex. We relax the problem by ignoring this non-convex constraint and convert it to a convex SDP problem. The following semi definite representation (SDR) form is the relaxed version of the problem (Eq. 63).

This optimization problem has been solved in a same way as the previous sections. **Figure 11** shows the total relay transmit power versus destination SINR threshold value, for different values of users’ correlation factors. The network consists of two source-destination pairs and four relays. **Figure 11** shows that the total relay transmit power in all cases increases by raising *γ*_{th}. Furthermore, **Figure 11** indicates that when the signature sequence correlation *ρ*_{k,l} increases, more total transmit power is needed to ensure SINR constraints at destination nodes. When *ρ*_{k,l} approaching one, the problem downgrades to the SDMA network and the system loses the benefits of CDMA technique. Also, increasing the signal dependency by increasing the correlation factor, results in the more infeasibility rate of the constraints.

**Figure 12** displays the minimum relay transmit power versus *γ*_{th} for different number of relays and users. As normally expected, more power saving can be achieved by increasing the number of relays or decreasing the number of users. Comparing **Figure 2** with **Figure 3** reveals that decreasing the correlation factor will be much more efficient for saving network power than increasing the number of relays.

**Figure 13** shows the minimum relay transmit power versus the network data rate (*D*) for distributed CDMA, SDMA and TDMA schemes. In **Figure 13**, we consider a network with four relays and four source-destination pairs. For the sake of comparison fairness, we need to ensure that different schemes are compared with the same average source powers. So, we assume that the source power of CDMA and SDMA are one fourth of those in TDMA scheme. For **Figure 13**, the network data rate has the following relation to the SINR threshold value, *D* = *w* log_{2}(1 + SINR_{th}). Signature sequences of the user are randomly generated for 100 trials and the best code in term of least maximum correlation is chosen for performance comparison.

Also, it can be seen from **Figure 13** that the minimum relay transmitted power increases with the increase of *D*. For the SDMA scheme, the problem quickly becomes infeasible due to the power of interference at destinations. So, for establishing connections between four users, SDMA-based networks should use at least 40 relays to overcome the TDMA scheme. Since the QoS constraints are less stringent in CDMA scheme, the network can establish the communication between source-destination pairs for a larger range of D. Consequently, it can be observed from **Figure 13** that the CDMA-based network can establish the source-destination connections with a significantly lower relay transmit power as compared to other schemes.

## 6. Computational complexity

Since the CDMA relay systems have a heavy computational complexity, the aim of this section is to analyze the computational form of related algorithms used in practice [20]. Here, the computational complexity of a standard SDP is introduced and extended to our case. The standard SDP problem with equality constraint is given as:

where ** C** and

**A**

_{i}are symmetric

*n*×

*n*matrices, and

*b*∈

*ℜ*

^{d}.So for such a problem the complexity with large-update (or long-step) algorithm [21] based on the primal dual SDP algorithm is

where *ε* denotes the accuracy parameter of the algorithm, while this algorithm with small-update (or short-step) still has

It is shown in Ref. [22] that small update interior point methods (IPMs) are restricted to unacceptably slow progress, while large-update IPMs are more efficient for faster. Also, large update IPMs perform much more efficiently in practice, however, they often have somewhat worse complexity bounds. The complexity order of solving standard SDP problem is polynomial time.

For evaluating the complexity of our SDP problem with inequality constraints, we have to calculate the dimension parameter *n*. Therefore, we should determine the dimensions of the matrices used in the objective and constraints of the problem Eq. (63). In the Kronecker product of two matrices, if **A** ∈ *ℂ*^{n × n} and **B** ∈ *ℂ*^{m × m}, then **A** ⊗ **B** will be a *nm* × *nm* matrix. According to the new vectors definite in Eq. (65) and sizes of **μ** ∈ *ℂ*^{d × d} and *E*(**H*****H**^{T}) ∈ *ℂ*^{Rd × Rd}, dimension of **T** will be

Similarly, we can obtain the above conclusion for **D**_{k} and **X**_{,} that is, *y*_{i} as:

Next, a new variable

As a result, the following standard form will be attained.

where

As a result of the above representation form, *n* for Eq. (63) would be:

Also, we can use the same procedure to calculate *n* for Eqs. (16) and (42):

Therefore, the complexity for problems (16), (42) and (63) for MIMO, MIMO-CDMA, and distributed-relay networks are as follows:

while a SDMA relay network has the complexity order of