Phase Shift Optimization Algorithm for Achievable Rate Maximization in Reconﬁgurable Intelligent Surface-Assisted THz Communications

: Terahertz (THz) band communications are considered a crucial technology to support future applications, such as ultra-high bit rate wireless local area networks, in the next generation of wireless communication systems. In this work, we consider an ultra-massive multiple-input multiple-output (UM-MIMO) THz communication system operating in a typical indoor scenario where the direct link between the transmitter and receiver is obstructed due to surrounding obstacles. To help establish communication, we assume the aid of a nearby reconﬁgurable intelligent surface (RIS) whose phase shifts can be adjusted. To conﬁgure the individual phase shifts of the RIS elements, we formulate the problem as a constrained achievable rate maximization. Due to the typical large dimensions of this optimization problem, we apply the accelerated proximal gradient (APG) method, which results in a low complexity algorithm that copes with the non-convex phase shift constraint through simple element-wise normalization. Our numerical results demonstrate the effectiveness of the proposed algorithm even when considering realistic discrete phase shifts’ quantization and imperfect channel knowledge. Furthermore, comparison against existing alternatives reveals improvements between 30% and 120% in terms of range, for a reference rate of 100 Gbps when using the proposed approach with only 81 RIS elements.


Introduction
With the commercial deployment of the fifth generation of wireless communications (5G), academic and industry efforts are now focused on the sixth generation of wireless communications (6G) [1][2][3]. In 6G networks, substantial coverage and data rate improvements are expected, enabling denser networks and global connectivity. Therefore, new emerging technologies are needed to meet the future demands of 6G wireless systems, with THz communications being one of the most promising research fields on the subject. It is noted, however, that some of the current research areas for the development of 5G devices are fundamental in the study of THz waves and 6G. Such is the case of metamaterials and photonic band gaps (MTM-PBG), which have recently been used to demonstrate effective mutual coupling reduction techniques for synthetic-aperture radar and MIMO antenna systems that require high transmit/receive isolation [4,5]. These simple techniques, which find applications in existing array antennas, can be very promising in THz too.
Unlike mmWave communications, the THz band can enable low latency, high reliability, and terabit/second data rates without additional techniques to improve spectral efficiency [6]. However, adopting the Terahertz band (0.1-10 THz) in wireless communication environments introduces several challenges [7]. In fact, the high propagation losses in the THz band and the existing power constraints significantly limit the communication Table 1. Relevant works on the topic from the literature.

Reference
System Model Main Aspects Issues [25] RIS-aided multiuser MISO communication system Proposed an alternating optimization (AO) algorithm for multiuser RIS-aided MIMO that iteratively optimizes the RIS phase shifts and the transmit beamforming vector. The coverage and achievable rate performance are significantly improved when compared to conventional systems without RIS.
To achieve the desired convergence, the AO algorithm requires a large number of iterations, especially when the number of RIS elements is large. Furthermore, the algorithm was designed assuming lower band single antenna users, which, combined with a computational complexity that is strongly dependent on the transmitter array size, makes it difficult to extend to UM-MIMO THz systems. [26] RIS-aided multiuser MISO communication system Considered an RIS-based downlink multiuser multiantenna system with limited discrete phase shifts, operating in the absence of direct links between the BS and users. Proposed an iterative algorithm in which the transmitter digital beamforming subproblem is solved through zero-forcing with power allocation and the RIS-based analog beamforming is solved by the outer approximation method. It was shown that good sum-rate performances can be achieved with a reasonable sized RIS and a small number of discrete phase shifts.
It assumes single antenna users and the computational complexity can grow prohibitively high for large arrays, which compromises its potential application in UM-MIMO THz systems. [22] RIS-aided MIMO communication system Derived an iterative algorithm for solving the joint optimization problem of the covariance matrix of the transmitted signal and the RIS elements. The resulting algorithm was shown to achieve similar achievable rate gains to the method from [25] in single-user scenarios but requires fewer iterations.
It was designed to target lower frequency bands, as well as having a computational complexity that is strongly dependent on the number of transmitter antennas. Therefore, applying this approach with the large array of settings envisioned for UM-MIMO THz systems can be very challenging.
[27] RIS-aided MIMO THz system Developed an adaptive gradient descent (A-GD) algorithm for single-user RIS-aided MIMO THz systems. The proposed A-GD algorithm improves the achievable rate performance when compared with other alternative algorithms. The A-GD algorithm considers discrete phase shifts through a final mapping step.
The A-GD algorithm can achieve large gains over an RIS with random phase, shifts but the computational complexity becomes very high when working with large antenna arrays and RISs with a large number of elements.
Our approach RIS-aided MIMO THz system Applied the APG method to a phase shift constrained maximum achievable rate problem. A low complexity algorithm resorting to simple element-wise normalization was derived that can cope with the large problem settings of RIS-aided UM-MIMO systems in the THz band. The proposed algorithm can handle discrete phase shifters with amplitude loss. Numerical evaluation shows that the proposed scheme can achieve competitive performance gains when compared against state-of-the-art solutions, as in [27].
The approach was designed for single-user scenarios. As future work, it may be extended to multiuser cases.
Another potential solution to effectively overcome the severe path loss in the THz band corresponds to ultra-massive MIMO (UM-MIMO) schemes based on ultra-dense arrays of sub-millimeter wavelength antennas, which has been proposed in [17]. Relying on this UM-MIMO approach, some recent solutions have already been described in the literature [28,29]. To make UM-MIMO realizable, several different fabrications techniques for THz band antennas are being explored by researchers, with some of them resorting to new materials [30]. One of the most promising approaches lies on graphenebased large-scale antenna arrays [31]. However, most works regarding graphene and other new materials-based THz antenna arrays are in the stage of theoretical design and analysis [31][32][33][34], still lacking experimental exploration [30]. Therefore, the establishment Electronics 2022, 11, 18 4 of 15 of a complete array architecture for true THz frequencies with dynamic beamforming that can be used in UM-MIMO is still difficult to accomplish. However, a few works focusing on theoretical and numerical performance analysis for RIS-aided UM-MIMO schemes have started to appear [6,27,30,35]. Apart from the research works mentioned above, the achievable rate and performance analyses for RIS-assisted UM-MIMO communication systems are still treated as an open problem. It is important to note that UM-MIMO relies on the idea of adopting large-scale integrated phased arrays with a very small footprint in order to overcome the high path losses at the THz band. An important challenge regarding these very large arrays is how to characterize the interaction and coupling effects among adjacent elements [36]. Mutual coupling was studied in [37] for densely packed metamaterial-based antennas operating at THz frequencies, with the authors incorporating a resonator-based metasurface in order to mitigate its effect. Graphene-based large-scale antenna arrays are considered a promising alternative to traditional antennas in the THz band. Regarding graphene-based THz antenna arrays, the mutual coupling effects were studied in [38,39]. In [38], the authors showed that in graphene-based plasmonic nanoantenna arrays, the effect of mutual coupling between antennas becomes negligible at separation distances much less than the free space wavelength. In [39], the authors showed that by adopting a graphene-based frequency selective surface (FSS) structure, the mutual coupling effects become negligible even in the presence of a very large number of closely integrated elements.
In this paper, we study the transmission design for a THz UM-MIMO system operating in an indoor scenario, where a BS transmits to a user with the aid of a passive RIS. The aim of this work is to maximize the achievable rate over the distance between the BS and the user. To accomplish this, and at the same time cope with the large dimensions of RIS-aided UM-MIMO systems, we formulate the RIS design (i.e., phase shifts) as a nonconvex optimization problem and derive an Accelerated Projected Gradient (APG)-based algorithm to solve it. To facilitate a direct comparison between the present work and existing state-of-the-art approaches, we include some of the most relevant aspects of the proposed scheme in Table 1. Since the implementation of an experimental RIS-assisted UM-MIMO testbed in the THz band is still a challenging task due to current limitations of practical reconfigurable large-scale THz antenna arrays, in this paper we adopt the approach followed by most works in RIS-assisted UM-MIMO and evaluate the proposed algorithm through numerical simulations. To accomplish the numerical evaluation, we adopt a typical THz channel model that captures most of the relevant effects at this band. Performance results demonstrate the effectiveness of the proposed algorithm in helping to overcome the distance limitation in the THz band, with the achievable rate being significantly improved by increasing the number of RIS elements. Furthermore, we consider the impact of phase quantization in the RIS elements and also of imperfect channel knowledge. This paper is organized as follows: section II presents the model for the RIS-assisted UM-MIMO system. Section III derives the phase-shifting matrix design algorithm followed by the numerical results in section IV. Finally, the conclusions are outlined in section V.
Notation: Bold lower and upper-case letters represent vectors and matrices, respectively. C a×b denotes the space of complex matrices of dimensions a × b, ( . ) H denotes the conjugate transpose of a matrix/vector, diag (a) is a diagonal matrix with elements of a on its diagonal, and I n is the n × n identity matrix.

System Model
Let us consider the UM-MIMO communication system illustrated in Figure 1, which can represent an envisioned THz band WLAN application scenario where a base station with an array of N tx antennas transmits to a user with N rx antennas. Assuming an indoor environment where surrounding obstacles can easily obstruct a direct link, then the communication link can be established with the aid of an RIS panel with N RIS elements deployed, for example, on a nearby wall. Note that without loss of generalization, the figure is assuming a 2D deployment (x,y coordinate system) to simplify the explanations.
Each transmission comprises N s simultaneous data streams, which are represented as s = [s 1 . . . s N s ] T , with s i ∈ C corresponding to an amplitude and phase modulated symbol and E s 2 = N s . We consider a typical discrete-time complex baseband representation for the received signal, which is a vector-based representation that is often adopted in signal processing works for MIMO communications in the THz band [6,27,40]. It allows modeling the effect on the amplitude and phase of the information symbols after passing through all possible transmit-RIS-receiver array links and after being processed by the precoder and combiner. Using this representation, the signal arriving at the user, can be expressed as where √ ρ denotes the power per stream, F ∈ C N tx ×N s is the base station precoder matrix, W ∈ C N rx ×N s is the user combining matrix, n ∈ C N rx ×1 is the noise vector, which contains independent zero-mean circularly symmetric Gaussian samples with covariance σ 2 n I N rx , H RIS,S ∈ C N ris ×N tx is the channel matrix between the base station and the RIS, and H D,RIS ∈ C N rx ×N ris is the channel matrix between the RIS and the user. Matrix Φ ∈ C N ris ×N ris models the effect of the RIS panel, having a diagonal structure with Φ = diag(ϕ) where ϕ = ϕ 1 , . . . , ϕ N ris T and ϕ m represents the phase shift of the m th RIS element. It is important to note that the effect of mutual coupling can be included in the system model by multiplying the steering vectors by tx in case of the receiver) mutual coupling matrices, [6]. The coupling matrices reduce to the identity matrix when the effect can be neglected, which can be acceptable in graphene-based plasmonic nano-antenna arrays at THz frequencies for separation distances much less than the free space wavelength, as discussed in [38].

Problem Formulation
After describing the system model and the channel model in the previous section, we can focus on the problem formulation by defining the combined channel matrix as ,, with   diag  Φφ . We can then rewrite the received signal (1) as To limit the implementation complexity, in this paper, we consider that the precoder is designed first with the RIS matrix being optimized based on this precoder. It should be noted that the proposed design can also be directly extended to an alternating optimiza- We consider a clustered geometric channel model [41], which is commonly adopted in THz literature [27]. Furthermore, we assume that the channels consist of a LoS component, denoted as H RIS,S LOS , and N ray Non-Line-of-Sight (NLoS) paths as in [27]. In this case we can write for the channel between the base station and the RIS, where α RIS,S l is the complex gain of the lth NLOS ray (with N ray ∑ l=1 E α RIS,S l 2 = 1) and β RIS,S NLOS denotes the path loss of the NLoS channel. Assuming path lengths close to d S↔RIS , this path loss can be approximated as , θ S→RIS l azimuth and elevation angles, respectively. Assuming the adoption of a uniform planar array (UPA) structure, the steering vectors for the transmitter are given by where p, q = 0, . . . , √ N tx − 1 are the antenna indices, λ is the signal wavelength, and d s is the inter-element spacing at the transmit array. The steering vectors for the RIS and receiver, , can be defined using a similar notation. Assuming a unit normalized power radiation pattern for the antennas and RIS elements along the directions of interest, the components of H RIS,S LOS can be written as [35,42] where d n,m represents the distance between the mth transmit antenna element and the nth RIS element, G tx is the transmit antenna gain, A RIS is the RIS element area, and k abs ( f ) is the molecular absorption coefficient at frequency f. Using a similar notation, we can write the channel between the RIS and the user as It is important to note that the effect of mutual coupling can be included in the system model by multiplying the steering vectors by N tx × N tx (N rx × N rx in case of the receiver) mutual coupling matrices, [6]. The coupling matrices reduce to the identity matrix when the effect can be neglected, which can be acceptable in graphene-based plasmonic nano-antenna arrays at THz frequencies for separation distances much less than the free space wavelength, as discussed in [38].

Problem Formulation
After describing the system model and the channel model in the previous section, we can focus on the problem formulation by defining the combined channel matrix as with Φ = diag(ϕ). We can then rewrite the received signal (1) as To limit the implementation complexity, in this paper, we consider that the precoder is designed first with the RIS matrix being optimized based on this precoder. It should be noted that the proposed design can also be directly extended to an alternating optimization approach by subsequently recomputing the precoding matrix followed by another computation of the RIS matrix. While this can improve the performance, it also increases the complexity. Regarding the base station precoder, we consider the use of a singular value decomposition (SVD)-based design. In this case, we decompose H Total (ϕ) into where U is a unitary matrix N rx × N rx , Λ is a diagonal matrix of dimension N rx × N tx , and V is a unitary matrix N tx × N tx . The precoder matrix is then simply set as F = V[:, 1 : N s ].
It is important to highlight that while we are assuming a fully digital precoder in this exposition, it is well-known that UM-MIMO operating in the THz bands must rely on hybrid implementations, where the signal processing is split into a reduced digital part and an analog part. However, the hybrid design can be easily obtained through direct approximation of the fully digital precoder matrix using the product of a smaller digital precoder matrix and an analog precoder matrix, as described in [43,44]. For the computation of the RIS matrix, we can maximize the maximum achievable rate of the system, which for a given precoder matrix F and assuming perfect channel knowledge can be written as in bits/s/Hz, with P n denoting the noise power (i.e., P n = σ 2 n ). The optimization problem can then be formulated as Constraint |ϕ| = a is applied to each individual RIS element, with a denoting the amplitude of the reflection coefficient in all elements of the RIS. Since ϕ has constant magnitude inputs, (11) is a non-convex bounded optimization problem whose exact solution is not trivial to find.

Proposed Proximal Gradient Method
To address the optimization problem (11), we use the APG method as a heuristic approach in order to obtain a computationally efficient algorithm for computing the RIS matrix. Let us first rewrite (11) as where I |ϕ=a| (ϕ) is the set indicator function that returns zero if |ϕ| = a or +∞ if not true. Based on the iterative APG approach described in [45], we compute the RIS angle vector at each iteration (q + 1) as the solution of the following minimization problem where λ (q) is the step size, f (ϕ) is the function defined as and ∇ f y (q+1) denotes the gradient of f (.). It can be seen that this gradient is given by Regarding y (q+1) , it corresponds to a linear combination of the previous two points, ϕ (q) and ϕ (q−1) , namely with ω (q) representing an extrapolation parameter that can be calculated as At this point, we can rewrite Equation (13) as that is, we apply the proximal operator to ϕ (q+1) , which can be calculated as the projection on the set of vectors whose elements have modulus equal to a, resulting in In this expression ∅ corresponds to an element-by-element Hadamard division. The step size, λ (q) , that is required in (19) can be found by a line search procedure. In this paper we adopt the procedure proposed in [46]. Algorithm 1 summarizes all the steps of the proposed method. It is important to note that while we assumed a clustered channel model with LOS and NLOS components and with path loss modelled according to [35,42], recent works [40] are trying to define more accurate THz channel models, which may provide more insight on the achievable gains of THz systems. However, the proposed RIS optimization algorithm is not dependent on a specific channel model and can be directly applied to improved models that may arise in the future.

Quantization
The proposed APG algorithm, as described previously, assumes continuous phase shifts in the phase-shifting diagonal matrix Φ. In practice, due to the hardware limitation in RIS-assisted systems [10], RIS elements can only support finite levels of phase shifts. Denoting N b as the number of bits used in the quantization for the RIS, then the number of available phase levels is 2 Nb . For simplicity, we assume that the discrete phase shift values are obtained by uniform interval quantization [0, 2π]. In this case the RIS optimization problem (11), must be modified as The constraint in this problem still enforces the norm of the elements in the ϕ to remain one, but the possible phase shift values are limited to ϕ i ∈ a · e 2π 2 Nb i , i = 0, . . . , 2 Nb − 1.
Algorithm 1 can be directly adapted to this new constraint by changing (19) to a projection of a given point onto a set of discrete phase shifts, which is equivalent to calculating the minimum distance between the point and all the set's possible values. However, we have verified numerically that Algorithm 1 performs better if we assume continuous phase shifts when computing the inner iterations, and the projection over the discrete phase shifts set is only computed in the end. Therefore, we adopt this configuration when considering quantization.

Numerical Results
In this section, we evaluate the achievable rate of the proposed RIS optimization algorithm with the aid of Monte Carlo simulations for different configurations. We consider a RIS-assisted UM-MIMO communication operating in an indoor environment, as in The following figures show the achievable rate (in Gbps) over the distance between the BS and the user (in meters). Figure 3 compares the proposed APG algorithm with a static reflectarray, and with the adaptive gradient descent (A-GD) algorithm from [27], considering a RIS with NRIS = 81. Looking at the curves, we can observe that, as expected, the further away the user is from the BS, the lower the bitrate the system can achieve. the further away the user is from the BS, the lower the bitrate the system can achieve. From the results, we can conclude that the curve corresponding to a RIS acting as a simple reflector, achieves the worst results of the three. The other two curves, which consider adaption of the individual RIS phases, clearly improve the results, with the proposed APG algorithm achieving higher rates than A-GD. The static reflectarray achieves rates above 100 Gbps to about 4 m, the A-GD about 10 m, and the APG about 12.5 m.   For better assessment of the impact of the RIS on the achievable rate variation, we show in Figure 4 curves for increasing values of NRIS. In this case, the physical size of the RIS is increasing, so it presents a larger reflection surface. We can observe that the achievable rate clearly improves for larger RIS. For example, when we increase NRIS from 64 to 1024, we can observe an improvement of approximately 70 Gbps at 20m.
To further understand the behavior of the proposed APG method, it is necessary to consider the incidence of several non-idealities that are typical in an RIS-assisted communication system. The achievable rates for the cases of discrete phase shifts in an RIS and for the case of impact of imperfect channel knowledge are shown in Figure 5, Figure 6 and Figure 7, respectively.
From Figure 5, we conclude that the use of discrete 1-bit phase shifts can significantly penalize the achievable rate performance. For example, when the user is close to the BS and RIS, at 5 m distance, the rate decreases from 156 Gbps to 130 Gbps. However, using 2-or 3-bit phase shifters can be sufficient to achieve close-to-ideal performance with a reduction of only approximately 3 Gbps or 1 Gbps at 40 m, respectively. Thus, we conclude that the proposed algorithm is not very sensitive to quantization errors and a resolution of Nb = 2 should be enough to quantize the discrete phase shifts of the RIS elements without a substantial performance degradation. In order to better understand the behavior of the RIS optimization algorithm derived in Section 3, Figure 2 shows the achievable rate (in Gbps) versus the transmitted power (in dBm) with different values of iterations applied. In this particular case, the user is fixed at (0, 40 m). As expected, increasing the number of iterations allows the algorithm to find a better RIS solution. However, it can be seen that after around 100 iterations, the improvements become residual for both RIS sizes. Note that to avoid running unnecessary iterations, a simple stagnation condition that checks if the objective function, f (ψ), decreased a minimum amount above a threshold, can be included to allow an early exit in the algorithm.
The following figures show the achievable rate (in Gbps) over the distance between the BS and the user (in meters). Figure 3 compares the proposed APG algorithm with a static reflectarray, and with the adaptive gradient descent (A-GD) algorithm from [27], considering a RIS with N RIS = 81. Looking at the curves, we can observe that, as expected, the further away the user is from the BS, the lower the bitrate the system can achieve. From the results, we can conclude that the curve corresponding to a RIS acting as a simple reflector, achieves the worst results of the three. The other two curves, which consider adaption of the individual RIS phases, clearly improve the results, with the proposed APG algorithm achieving higher rates than A-GD. The static reflectarray achieves rates above 100 Gbps to about 4 m, the A-GD about 10 m, and the APG about 12.5 m. Even though in the previous simulations we were assuming ideal phase shifters (reflection coefficients having unitary amplitude, a = 1) at the RIS elements, in realistic scenarios, this amplitude will be smaller as there will be some loss [27]. Therefore, Figure 6 compares the effect of a lower reflection coefficient amplitude (the value a = 0.8 was selected based on [47]) as well as the impact of not knowing the correct reflection amplitude in the RIS optimization algorithm. As would be expected, the achievable rate decreases slightly when the value of the amplitude of the reflection coefficient of the RIS elements is lower than one regardless of the value of NRIS. When the RIS elements have loss and the algorithm does not know the exact value of the reflection amplitude, which in the figure corresponds to having phase shifters with a = 0.8 while the algorithm assumes that a = 1, it can be seen that the additional degradation is relatively small. For example, when the user is located 10 m away from the BS, the rate decreases only from 133 Gbps to 131 Gbps and from 186 Gbps to 181 Gbps, with NRIS = 81 and NRIS = 256, respectively.  For better assessment of the impact of the RIS on the achievable rate variation, we show in Figure 4 curves for increasing values of N RIS . In this case, the physical size of the RIS is increasing, so it presents a larger reflection surface. We can observe that the achievable rate clearly improves for larger RIS. For example, when we increase N RIS from 64 to 1024, we can observe an improvement of approximately 70 Gbps at 20m.
To further understand the behavior of the proposed APG method, it is necessary to consider the incidence of several non-idealities that are typical in an RIS-assisted communication system. The achievable rates for the cases of discrete phase shifts in an RIS and for the case of impact of imperfect channel knowledge are shown in Figures 5-7, respectively. Even though in the previous simulations we were assuming ideal phase shifters (reflection coefficients having unitary amplitude, a = 1) at the RIS elements, in realistic scenarios, this amplitude will be smaller as there will be some loss [27]. Therefore, Figure 6 compares the effect of a lower reflection coefficient amplitude (the value a = 0.8 was selected based on [47]) as well as the impact of not knowing the correct reflection amplitude in the RIS optimization algorithm. As would be expected, the achievable rate decreases slightly when the value of the amplitude of the reflection coefficient of the RIS elements is lower than one regardless of the value of NRIS. When the RIS elements have loss and the algorithm does not know the exact value of the reflection amplitude, which in the figure corresponds to having phase shifters with a = 0.8 while the algorithm assumes that a = 1, it can be seen that the additional degradation is relatively small. For example, when the user is located 10 m away from the BS, the rate decreases only from 133 Gbps to 131 Gbps and from 186 Gbps to 181 Gbps, with NRIS = 81 and NRIS = 256, respectively.  Observing the results, we can see that, as expected, the optimal achievable rate decreases with imperfect channel knowledge, independently of the NRIS. However, the higher the NRIS, the sharper is the reduction level. For example, at 40 m distance with NRIS = 81 the rate decreased from 53 Gbps to 52 Gbps, whereas with NRIS = 256 it decreased from 63 Gbps to 53 Gbps, and with NRIS = 1024 it reduced from 73 Gbps to 56 Gbps.

Conclusions
In this paper, we studied a UM-MIMO system operating in the THz band where a base station transmits to a user with the aid of an RIS. In order to compute the individual phase shifts of the RIS elements and, at the same time, cope with the large problem setting that is typical in RIS-aided UM-MIMO systems, we proposed the use of a low complexity accelerated proximal gradient algorithm that attempts to maximize the achievable rate. Numerical results confirm the effectiveness of the proposed approach, which is able to support large transmission rates for extended distances, even without a direct link between the transmitter and receiver. In fact, it was observed that the algorithm improves the range between 30% and 120% when compared to other existing approaches, for a reference rate of 100 Gbps with only 81 RIS elements. As the number of RIS elements increased from Nris = 64 to Nris = 1024, it was possible to achieve an improvement on the achievable rate near 60%. Furthermore, it was also shown that practical low resolution RIS elements may suffice to achieve close to unquantized performance. Additionally, it was observed that the achievable rate decreased slightly if the value of the amplitude of the reflection coefficient of the RIS elements was lower than one, regardless of the value of NRIS. However, the lack of accurate knowledge about the value of this amplitude caused degradations of only 1.5-3.8%, which means the algorithm is not very sensitive to this aspect.
While the numerical performance analysis presented in this paper is important in order to capture the potential achievable gains of UM-MIMO THz systems, these gains should be validated via experimental testbeds as soon as adequate devices become available, which should be possible in the near future. Furthermore, three main directions can be followed as future work in order to extend the proposed approach. The first should consider the design of the system with more than one RIS panel, as it would correspond From Figure 5, we conclude that the use of discrete 1-bit phase shifts can significantly penalize the achievable rate performance. For example, when the user is close to the BS and RIS, at 5 m distance, the rate decreases from 156 Gbps to 130 Gbps. However, using 2-or 3-bit phase shifters can be sufficient to achieve close-to-ideal performance with a reduction of only approximately 3 Gbps or 1 Gbps at 40 m, respectively. Thus, we conclude that the proposed algorithm is not very sensitive to quantization errors and a resolution of N b = 2 should be enough to quantize the discrete phase shifts of the RIS elements without a substantial performance degradation.
Even though in the previous simulations we were assuming ideal phase shifters (reflection coefficients having unitary amplitude, a = 1) at the RIS elements, in realistic scenarios, this amplitude will be smaller as there will be some loss [27]. Therefore, Figure 6 compares the effect of a lower reflection coefficient amplitude (the value a = 0.8 was selected based on [47]) as well as the impact of not knowing the correct reflection amplitude in the RIS optimization algorithm. As would be expected, the achievable rate decreases slightly when the value of the amplitude of the reflection coefficient of the RIS elements is lower than one regardless of the value of N RIS . When the RIS elements have loss and the algorithm does not know the exact value of the reflection amplitude, which in the figure corresponds to having phase shifters with a = 0.8 while the algorithm assumes that a = 1, it can be seen that the additional degradation is relatively small. For example, when the user is located 10 m away from the BS, the rate decreases only from 133 Gbps to 131 Gbps and from 186 Gbps to 181 Gbps, with N RIS = 81 and N RIS = 256, respectively.
In Figure 7, we evaluate the impact of imperfect channel knowledge for a scenario where N s = 1, N tx = 256, and N rx = 4. In this case, we include curves that consider knowledge of only the LoS component, i.e.,Ĥ = H LOS . Observing the results, we can see that, as expected, the optimal achievable rate decreases with imperfect channel knowledge, independently of the N RIS. However, the higher the N RIS , the sharper is the reduction level. For example, at 40 m distance with N RIS = 81 the rate decreased from 53 Gbps to 52 Gbps, whereas with N RIS = 256 it decreased from 63 Gbps to 53 Gbps, and with N RIS = 1024 it reduced from 73 Gbps to 56 Gbps.

Conclusions
In this paper, we studied a UM-MIMO system operating in the THz band where a base station transmits to a user with the aid of an RIS. In order to compute the individual phase shifts of the RIS elements and, at the same time, cope with the large problem setting that is typical in RIS-aided UM-MIMO systems, we proposed the use of a low complexity accelerated proximal gradient algorithm that attempts to maximize the achievable rate. Numerical results confirm the effectiveness of the proposed approach, which is able to support large transmission rates for extended distances, even without a direct link between the transmitter and receiver. In fact, it was observed that the algorithm improves the range between 30% and 120% when compared to other existing approaches, for a reference rate of 100 Gbps with only 81 RIS elements. As the number of RIS elements increased from N ris = 64 to N ris = 1024, it was possible to achieve an improvement on the achievable rate near 60%. Furthermore, it was also shown that practical low resolution RIS elements may suffice to achieve close to unquantized performance. Additionally, it was observed that the achievable rate decreased slightly if the value of the amplitude of the reflection coefficient of the RIS elements was lower than one, regardless of the value of N RIS . However, the lack of accurate knowledge about the value of this amplitude caused degradations of only 1.5-3.8%, which means the algorithm is not very sensitive to this aspect.
While the numerical performance analysis presented in this paper is important in order to capture the potential achievable gains of UM-MIMO THz systems, these gains should be validated via experimental testbeds as soon as adequate devices become available, which should be possible in the near future. Furthermore, three main directions can be followed as future work in order to extend the proposed approach. The first should consider the design of the system with more than one RIS panel, as it would correspond to a more useful scenario that could guarantee more coverage in the area around the BS and also increase the number of potential LOS links. The second is to extend the system to multiuser scenarios where the BS and the RIS have to be configured in order to establish multiple simultaneous links with different users. Finally, the last aspect concerns the study of low latency channel estimation schemes suitable for the THz RIS and incorporate the potential error in the RIS optimization in order to obtain a more robust design.