Hybrid Precoding Design for Two-Way Relay-Assisted Terahertz Massive MIMO Systems

Hybrid precoding has emerged as a promising technique to reduce the hardware cost and complexity in millimeter wave (mmWave) massive multiple-input multiple-output (MIMO) systems. However, due to the drastic increase in the number of user devices and higher data rate demand, new frequency bands (i.e., terahertz (THz) communications) are needed to explore. At THz frequencies, the precoding technique can provide a large beamforming gain, but still, the blockage and high path-loss remain a significant problem. To overcome the blockage problem, in this paper, we introduce the two-way relay design where the well-known two-way amplify-and-forward (AF) relay in THz-MIMO orthogonal frequency-division multiplexing (OFDM) systems is employed. The optimal two-way relay hybrid precoding problem is non-convex due to the practical hardware constraints (i.e., unit-modulus and block-diagonal constraints). To solve this problem, we first propose to use mathematical manipulations to remove the block-diagonal constraints from its analog part and then reformulate the original two-way relay hybrid precoding problem into a quadratic-convex problem with only power constraint. Finally, we obtain the closed-form solution for the two-way relay hybrid precoding problem. Simulation results reveal that our proposed solution can achieve better sum-rate and energy efficiency than existing hybrid schemes.


I. INTRODUCTION
The increasing user device trends have been observed in the present decade which may imply the congestion in the sub-6-GHz and millimeter-wave bands [1]. Therefore, terahertz (THz) communications (0.1−10 THz) can be a promising candidate in the future fifth-generation (5G)-beyond and sixth-generation (6G) wireless networks to enable multi gigabits per second (Gbps) transmission [2]. However, as the wavelength of carrier frequency decreases, the signals at THz frequencies may suffer more severe attenuation and blockage due to high oxygen absorption, high penetration The associate editor coordinating the review of this manuscript and approving it for publication was Noor Zaman . loss, and large free-scale path loss [3], [4]. One advantage of the small wavelength is that it enables a large number of antennas to be packed in a very small physical dimension at the transceiver. Massive multiple input multiple output (mMIMO) can be helpful to tackle the blockage effect by providing high beamforming gain, but still, THz communications are very sensitive to blockage and expected to be deployed in line-of-sight (LoS) dominant scenarios [5].
To solve the blockage problem at THz frequencies, the relay can play an important role. In relayassisted THz communication, the channel from source to the relay and the one from the relay to the destination is LoS dominant [6]. However, the power limitation at the relay restricts the use of classical fully-digital precoding [7].
To this end, the recently proposed hybrid precoding can reduce the overall hardware complexity by utilizing less number of required RF chains [8]. Most of the recent works on THz-communications considered the direct link between the base station (BS) to the user equipment (UE), which is not practical due to the very short wavelength of THz communications. Therefore, it is crucial to consider the relay-assisted THz-MIMO OFDM system to increase the transmission reliability and coverage area at THz communications [9].

A. RELATED WORK
The usage of relay in wireless system has already been proposed in the literature for various communication scenarios including device-to-device communication [10], cellular communication [11], [12], indoor applications [13], and mmWave massive MIMO systems [14], [15]. In the context of THz-communication, very recently the authors in [16] proposed the hybrid precoding design for the fully-connected and the sub-connected architectures in THz wireless systems. It was shown that sub-connected architecture has a better performance in terms of energy efficiency compared to fully-connected architecture. Further, in [17], an efficient hybrid precoding scheme with antenna subarray selection and adaptive power allocation is proposed. Likewise, the authors in [18] investigated the indoor THz wireless system and provided useful insight for designing the antenna subarray at THz communications. Although, [16]- [18] provides the thoughtful guidelines for hybrid precoding problem in THz communications however THz systems are anticipated to be deployed in wideband channels with frequency selectivity [19].
Likewise, based on the mmWave massive MIMO relay scenario, the relay systems can be divided into amplifyand-forward (AF) and decode-and-forward (DF) relay systems. For the DF relay, to mitigate the self-interference (SI), a zero space SI cancellation algorithm and an orthogonal matching pursuit-based SI-cancellation precoding algorithm is proposed in [20] and [21], respectively. Further, in [22], the authors have proposed a mixed-connected structure relay system to compromise power consumption and sum-rate performance. These works are limited to mmWave massive MIMO systems. However, the valuable insight provided here is useful to design a frequency selective two-way relay hybrid precoding for THz-MIMO OFDM systems.

B. OUR CONTRIBUTIONS
Against the above background, in this paper, we consider the two-way relay hybrid precoding design for THz-MIMO OFDM systems. Different from the existing work on THz bands where the direct link between the BS and MS is considered, in our proposed relay hybrid precoding design, the received/transmitted analog precoder at the relay remains frequency-flat across all the subcarriers whereas the digital precoders at the relay are frequency-selective and optimized on per subcarrier basis. In our considered system, a multi-antenna relay with energy-efficient sub-connected architecture receives and transmits the information from the two multi-antenna user equipment (UE) named as sources, during which OFDM is used to combat frequency selectivity. The main contributions of this paper are summarized as follows: At first, we consider a frequency selective THz channel model which accommodates the joint effect of molecular absorption, high reflection loss, and multipath fading. Then, by using this channel model, we design a two-way relay hybrid precoding system. Afterward, by using these channel and system models we formulate the two-way relay hybrid precoding problem based on the criterion of sum mean square error (sum-MSE) where the aim is to minimize the error between the source transmitted signal and the destination received signal. As the sub-connected architecture is considered at the relay, the analog precoder at the relay is constrained to be a block-diagonal matrix. This practical hardware constraint at the relay makes the relay hybrid precoding problem non-convex.
Then, to solve this non-convex formulated problem, we propose some mathematical manipulations to reformulate the original two-way relay hybrid precoding problem into an equivalent problem without block-diagonal constraints. The proposed mathematical reformulation assists us to convert the non-convex two-way relay hybrid precoding problem into a convex quadratic minimization problem with only the power constraint. Finally, this convex quadratic problem can be solved and obtained the closed-form solution by taking the gradient of the objective function concerning the relay precoding matrix. This procedure leads us to obtain the closed-form solution for the convex quadratic problem in the two-way relay hybrid precoding problem in THz-MIMO OFDM systems.
We also analyze the complexity of the proposed scheme to show that our solution is not dependent on pre-calculated analog precoder, so its computational complexity is lower than the existing well known matching pursuit (MP) algorithm.
Finally, the simulation results are provided to evaluate the proposed scheme in terms of sum-MSE, achievable rate, and energy efficiency compared to the existing solution for two-way relay hybrid precoding in THz-MIMO OFDM systems.

C. ORGANIZATION AND NOTATION
The remainder of this paper is organized as follows.
In Section II, we present the channel and system models for two-way relay assisted THz-MIMO OFDM systems. In Section III, we first formulate the original two-way relay hybrid precoding problem based on the criterion of sum-MSE and then reformulate this non-convex problem into a convex problem. We present the closed-form solution and complexity analysis of the proposed solution in Section IV. The simulation results and the related discussions are provided in Section V. Finally, in Section VI, we conclude this paper. VOLUME 8, 2020 Notations: The matrices and vectors are presented by the uppercase and lowercase boldface letters. The conjugate transpose and transpose operations are presented by (·) H and (·) T , respectively. A F and a 2 denote the Frobenius norm of a matrix A and the l 2 -norm of a vector a. Expectation operator is symbolized by E [·]. The block-diagonal and the trace operators are shown by blk (·) and Tr (·), respectively. Vectorization of a matrix A is denoted by vec(A), and the Kronecker-product between two matrices is shown by ⊗. CN 0, σ 2 is the complex Gaussian distribution with zero mean and variance σ 2 , respectively. Finally, I M denotes the M × M identity matrix.

II. CHANNEL AND SYSTEM MODELS
In this section, we briefly introduce the channel and system models for two-way relay hybrid precoding in THz-MIMO OFDM systems.

A. FREQUENCY SELECTIVE THz CHANNEL MODEL
We adopt the MIMO OFDM channel model where the channel is built with the combination of several subcarriers [11]. An amplify-and-forward (AF) relay without the direct link between the source and the destination is considered. Due to the propagation characteristics at higher frequencies, the THz channel can accurately be predicted by a limited number of rays [23]. To capture the frequency-selectivity of the wideband THz channels, we adopt the widely used geometric delay-d channel model such that the time-domain channel H [d] ∈ C N R ×N S at the relay can be expressed as [11]: where L is the number of rays and α l is the complex gain of lth ray component. p r (dT s − τ l ) represents the pulse-shape function for T s -space signaling at the time delay of τ l . a R l ∈ C N R and a S l ∈ C N S are the array response vectors at the relay and the source, where θ S l , φ S l , θ R l and φ R l are the azimuth AoD, elevation AoD, azimuth AoA, and elevation AoA for the lth ray, receptively.
To incorporate the molecular absorption losses at THz frequencies, we further consider the Fresnel reflection coefficient F l [17]. Then, the complex path gain α l of the lth ray with only one reflection can be express as [11]: where F l is function of f (i.e., f is the central frequency of the mth subcarrier), d 1 is the distance between the source and the reflector, and d 2 is the distance between the reflector and the relay. For the widely used uniform planar array with N S = N h S × N v S , the array response vector at the source can be expressed as [11]: Similarly, array response vector at the relay can be expressed as [11]: where d spc and λ are the antenna spacing and the signal wavelength, and ω n h s ,n v s (θ, φ) can be define as [11]: where n h s and n v s are the index of antennas with 0 n h s N h S − 1 and 0 n v s N v S − 1, respectively. Given the delay-d channel model in (1), the channel between the source S 1 and the relay, and the channel between the source S 2 and the relay on mth subcarrier can be expressed as [11]: To realize the precoding, we follow the assumption that the channels H [m] and G [m] are known at the source, the relay, and the destination [24]. In practical systems, channel state information (CSI) received at the relay can be obtained via training from the source to the relay, and the CSI received at the destination can be obtained via training from the relay to the destination [25]. Then the CSI is shared with the transmitter at the source via feedback from the relay to the source, and the CSI transmitted at the source is shared by the feedback from the relay to the destination [26].

B. TWO-WAY RELAY HYBRID PRECODING DESIGN
In one-way relay precoding systems, the source or the destination requires two time-slots to complete either only downlink or uplink transmission. As a result, in total, four-time slots are required to complete the whole transmission (i.e., uplink and downlink) which effectively leads to the loss of one-half of spectral resources. In contrast, in two-way relay precoding systems, only two time-slots are required to complete the whole transmission which leads to performance improvement in the spectral efficiency of the overall system. In the first slot, both the source and the destination transmit signals to the relay, while in the second slot, the relay processes the received overlapped signal and then broadcasts this signal to all the source nodes in the system.
To improve the spectral efficiency of the overall MIMO OFDM systems, in this paper, as shown in Fig.1, we consider the two-way relay hybrid precoding system which consists of two source nodes S 1 and S 2 , respectively. In practice, node S 1 can be regarded as a base station, and S 2 can be named as a mobile station (MS). To consider a more challenging scenario, we consider a sub-connected architecture at the relay to deploy a large number of antennas. The source nodes are equipped with N S antennas and K RF chains to exchange information via relay equipped with We also assume that there is no direct link between the source nodes due to the large path loss at THz frequencies [3]. In two-way relay systems, the signal transmission protocol uses two consecutive time-slots. During the first time-slot, the two source nodes transmit their signals s 1  = p s2 [m], respectively. The source nodes use the fully-digital OFDM system for the sake of practicality where the data transmitted to the relay is modulated and spread across M subcarriers. The received signal at the relay for the mth subcarrier can thus be expressed as: where x R [m] ∈ N R ×1 is the transmitted signal from the relay and W [m] ∈ N R ×N S is the hybrid precoder at the relay, respectively.
The hybrid precoding at the relay on the received signal from the source node S 1 can be explained as follows. At first, the analog precoder of size N R 1 ×K is applied on the received signal from the source S 1 , and then the digital precoder of size K × 1 is employed to control and route the signal through different radio frequency (RF) chains into the frequency domain [14]. Afterward, the frequency domain signal is transformed into the time domain using the M -point inverse fast Fourier transform (IFFT). A length-D cyclic prefix is added to the signal on each RF chain to eliminate the inter-symbol interference. Finally, transmitted analog precoder of N R 2 × K is applied. Since the analog precoder is implemented after the IFFT, therefore analog precoder remains fixed for all subcarriers, while the digital precoder is different for each subcarrier. The same procedure is used for the signal received from source node S 2 . This indicates that the relay used different transmit and received antennas.
The relay node broadcasts the processed signal x R [m] simultaneously to all the source nodes (i.e., S 1 and S 2 ) by using the wireless channels H T [m] and G T [m], respectively. Here, we assume the perfect channel reciprocity during the uplink and downlink transmissions. Then, the received signals at the source S 1 and the source S 2 can be expressed as: where (10) can be written as Similarly, (11) can be written as  (13) and (15) can be regarded as self-interference at S 1 and S 2 , respectively. Due to the availability of perfect CSI at the relay, we can remove these two terms and rewrite (13) and (15) as:

III. PROBLEM FORMULATION AND REFORMULATION
We begin this section by formulating the two-way relay hybrid precoding problem based on the criterion of sum-MSE to minimize the error between the source transmitted signal and destination received signal. Then we reformulate the aforementioned problem into a more tractable form to obtain a closed-form solution.

A. ORIGINAL TWO-WAY RELAY PRECODING PROBLEM
Based on the channel and system models introduced in section II, the total sum-MSE based problem for both source nodes S 1 and S 2 can be expressed as follows The expectation operator in (18) makes the formulated problem very difficult to solve therefore we remove the expectation operator from (18) and rewrite it in a more general form as The formulated cost function measures the total (i.e., uplink and downlink transmission) performance of the two-way relay hybrid precoding in THz-MIMO OFDM systems. Since in two different time-slots the data streams are (at first) received from two sources and then transmitted to all the sources in the system, this results in the two-way relay hybrid precoding.
Next, by using the values of R s1 [m] and R s2 [m] in (19), we can formulate the two-way relay hybrid precoding problem with respect to the relay precoding matrix W [m] as: min As it is explained in the system model that at relay the sub-connected architecture is considered, which made the relay precoding matrix W [m] a block-diagonal matrix and where p R [m] is the power constraint at the relay. Moreover, as W [m] is not a full-ranked matrix, the generated problem in (20) is non-convex and it is very hard to solve this it directly. Hence, in the next subsection, we proposed to convert the (20) into an equivalent convex problem with respect to only non-zero elements of relay precoding matrix W [m].
Moreover, the primary objective of this work is to optimize the relay hybrid precoding with given transmit and receive beamformers. As we employed a large number of antennas in a two-way relay assisted MIMO OFDM system, the complexity of transmitting and receive beamformers are unacceptable and it is difficult to optimize. For this reason, we utilize the low-complexity transmit beamformer at the source, which is derived directly from the SVD of the channel, and apply the low-complexity MMSE receiver at the destination. With a known transmit beamformer and MMSE receiver, the relay precoding optimization problem can be formulated to minimize the sum-MSE between the source transmitted signal and the destination received signal.

B. REFORMULATED TWO-WAY RELAY PRECODING PROBLEM
In this section, as mentioned above we propose to reformulate the original two-way relay hybrid precoding problem by using some methmatical properties to transfer it into more tractable form. We construct a long column vector w [m] by stacking all the non-zero complex elements of W [m] which can be expressed as: To ensure the clear understanding of our formulated problem (20) at this stage we first propose to divide (20) into five simple equations expressed as follows: Now we begain to solve each equation one by one. Consider (22a) and by using the value of R s1 [m], (22a) can be expressed as: where (23) can be divided into two terms as: Then, by using the properties of the Kronecker product on (25), we get: Similarly, by using the given vector property in (21) on (24b), we get: and by using the properties of the Kronecker product on (27), we get: Now, by substituting (28) and (26) into (22a) yields Now, by using the value of R s2 [m] in (22b) and by applying the vector property in (21), (22b) become where (30) can also be divided into two terms as: Further, by using the Kronecker product properties on (32), we get: and by using (21) By substituting (35) and (33) into (30) yields Now, by using the vector property given in (21) on (22c), we get: The fourth subequation (22d) can be written in a form by applying the vector property given in (21) as: The last subequation (22e) can be rewritten by using the vector property given in (21) as: where As we have converted five subequations into their equivalent forms by using the vector property give in (21), now we further substitute (42), (40), (38), (36), and (29) into (20) to get an equivalent objective function as: where (43) can be further simplified by letting: and the minimization problem (43) can be simplified as: Till now we have converted a formulated complex problem (20) into a simple linear form by using vector property and Kronecker product properties. Similarly, now we use these two properties to convert the power constraint in (20) into an equivalently form as: whereas, by applying the vector property given in (21), (48a) can be rewritten as: By substituting (51) and (50) into (47) produces an equivalent expression for the constraint in terms of w [m] as: where and In the end, by following the above steps, we can express the minimization problem (20) into a more tractable equivalent minimization problem with respect to relay precoding vector w [m] as: While deriving an equivalent problem and by the derivation of (43), it can be observed thatÃ [m] is a positive semi-definite matrix. Thus, the derived equivalent minimization problem (55) is a convex optimization problem. In the next section, we derive the closed-form solution for this convex problem.

IV. CLOSED-FORM TWO-WAY RELAY HYBRID PRECODING SOLUTION
Above, we deduced the original non-convex two-way relay hybrid precoding problem (20) into an equivalent convex two-way relay hybrid precoding problem (55 In other words, From above, we see that there is no certain value for λ and it can be adjusted according to (60). By finalizing λ, the optimal closed-form solution for the two-way relay hybrid precoding in THz-MIMO ODFM system of (55) can be obtained in (58).

A. COMPUTATIONAL COMPLEXITY
To analyze the computational complexity of the proposed closed-form solution (58), one can observe that the complexity to obtain the optimal solution w opt [m] includes two main parts. M is the number of subcarriers.

V. SIMULATION RESULTS
In this section, we numerically evaluate the performance of the proposed closed-form solution for the two-way relay hybrid precoding in THz-MIMO OFDM systems. Since the fully-digital precoding achieves the near-optimal performance, we consider the fully-digital precoding as an upper-bound to compare the proposed solution. To show the effectiveness of the proposed scheme, we also compare the results achieved by simulations with the existing THz hybrid precoding scheme recently introduced in [28] and [29].
We set the simulation parameters as follows.
The operating frequency is set as 0.35 THz to 0.45 THz and the bandwidth of each subcarrier is B = 1 GHz, respectively. For the considered relay assisted massive MIMO OFDM system, the number of subcarriers is M = 100, and the length of cyclic prefix is D = 16. The noise variance is σ 2 s1 = σ 2 s2 = 1. We further assume that at the source and the destination the fully-digital precoding is adopted similar to [30].
As we formulated the two-way relay hybrid precoding problem based on the criterion of sum-MSE, therefore at first we discuss the sum-MSE achieved by different precoding schemes to minimize the error between the source transmitted signal and the destination received signal.In Fig. 2, the sum-MSE results achieved by the proposed scheme are compared to different precoding schemes against SNR. It can be observed that the proposed scheme can achieve almost similar performance to the fully-digital precoding [30], whereas compared to the recently proposed hybrid precoding scheme proposed for THz-MIMO OFDM systems in [28] and [29], the proposed approach can achieve better sum-MSE.
Achievable sum-rate is also an important criterion used in most of the contemporary works on hybrid precoding. To show the effectiveness of the proposed scheme next we compare the proposed solution with some existing solution in terms of achievable rate. Specifically, Fig. 3 shows the achievable rate of different hybrid precoding schemes against SNR. It can be observed from Fig. 3 that the proposed scheme can perform much better than the existing hybrid precoding scheme proposed in [28] and [29] for two-way relay hybrid precoding in THz-MIMO OFDM systems. Besides, the achievable rate of the proposed solution is very close to the fully-digital precoding in [30] which proves that the proposed solution in this paper is a better option in terms of sum-MSE and achievable rate both.
We further demonstrate the achievable rate comparison of the proposed scheme with existing precoding schemes against a varying number of relay antennas N R in Fig. 4. The number of RF chain K is fixed, and we change the number of antennas at the relay from 16 up to 48, respectively. Clearly, by increasing the number of antennas at the relay, the antenna  gain increases, which results in a high achievable rate for all the precoding schemes and we can observe similar trends as Fig. 3.
Likewise, Fig. 5 shows the achievable rate of different precoding schemes with the varying number of data streams L s and RF chain K . We set (K = 4, L s = 4) and (K = 2, L s = 2) and keep the other simulation parameters same as Fig. 3. The figure shows that the proposed scheme can achieve a higher sum-rate compared to the existing hybrid precoding scheme. Furthermore, we can observe that the gap between the proposed hybrid precoding solution and the fully-digital precoding which is obvious.
Similarly, in Fig. 6 we represent the rate achieved by different precoding schemes against a varying number of RF chain K . We vary the number of RF chains from 2 to 8, respectively. It can be observed that the gap between the fully-digital precoding and other hybrid precoding scheme decrease as K increases. Specifically, with the large number of K , the rate achieved by the proposed schemes reaches very close to the fully-digital precoding and outperforms the exiting hybrid precoding solution proposed in [28] and [29].  In the end, we examine the power efficiency achieved by the proposed scheme as it is also an important criterion to evaluate any proposed scheme. In communication systems, the power is mostly consumed by five dominant factors which are i) low-noise amplifiers (LNA), ii) phase shifter (PS), iii) RF chain, iv) baseband precoder (BB), and v) power amplifier (PA), respectively. Based on these five factors and the energy efficiency model proposed in [31], the total power consumption P R of the two-way relay hybrid precoding system can be calculated as: P R = P BB + 2K P RF + N R P LNA + N R P PA + 2M PS P PS where P BB , P RF , P LNA , P PA , and P PS are the power consumed by BB, RF chain, LNA, PA, and PS, respectively. We adopt the practical values for the simulation as: P BB = 10mW, P RF = 100mW, P PS = 10mW, and P LNA = P PA = 100mW [31]. M PS denotes the number of PS such that M PS = N R , respectively. Furthermore, the power efficiency η can be defined as the ratio between the achievable rate R and the total power consumption at the relay P R as [32]: Based on the above values, we present the power efficiency achieved by the proposed precoding schemes in Fig. 7. We can observe that the power efficiency achieved by the proposed scheme is higher than the existing hybrid precoding scheme. Moreover, by increasing the number of RF chains, the power efficiency graph becomes stable and we cannot observe further increase in the power efficiency by adding the RF chains anymore. This stability is achieved when the number of RF chains is large enough and the improvement caused by this sizable digital precoder is saturated, thus by further adding RF chains would only raise the hardware complexity and power consumption rather than improving the performance.

VI. CONCLUSION
In this paper, we presented a closed-form solution for two-way relay hybrid precoding in THz-MIMO OFDM systems with energy-efficient sub-connected architectures. At first, we formulated the two-way relay hybrid precoding problem under the sum-MSE criterion to minimize the error between the source transmitted signal and the destination received signal. After that, we proposed some mathematical manipulations to convert the non-convex formulated problem into a convex two-way relay hybrid precoding problem and then obtained the closed-form solution.
Simulation results confirmed that the proposed closed-form solution achieved better performance in terms of sum-MSE, sum-rate and power efficiency than existing solutions for two-way relay hybrid precoding in THz-MIMO OFDM systems. In the future, we have planned to extend our current work towards the recently proposed intelligent reflecting surfaces (IRS) to replace the two-way relay with IRS.