Exploiting Reconfigurable Intelligent Surface-Based Uplink/Downlink Wireless Systems

This paper analyzes the performance of an uplink/downlink reconfigurable intelligent surface (RIS)-based wireless system with a multiple-antenna base station (B), where the RIS selection strategy is considered to alleviate the overhead and resources. With the goal of enhancing system performance, we consider maximal-ratio-combining (MRC) and selection-combining (SC) for the uplink transmission and maximum-ratio-transmission (MRT) along with beamforming design for the downlink transmission, where two methods of direct-path beamforming design (DBD) and reflective-path beamforming design (RBD) are proposed. We also quantify the impact of uncertain phase shift (UPS) and optimal phase shift (OPS) alignments. Accordingly, closed-form expressions for outage probability (OP) of each uplink and downlink scenario are derived. Numerical results show that, in the uplink transmission, adopting MRC at the B and OPS at RIS provides the best performance. For small antenna settings, using SC-enabled OPS provides outstanding performance when compared to employing MRC-integrated UPS. In downlink transmission, RBD achieves better performance than that of DBD. Similar to the uplink transmission, employing MRT at the B and OPS at the RIS also attains superior performance when compared to UPS.


I. INTRODUCTION
Recently, reconfigurable intelligent surface (RIS), wellknown as new revolution technology, has received widespread attention because of its capability to enhance the spectral-and energy efficiencies beyond fifth-generation (5G) and sixthgeneration (6G) wireless communication systems [1], [2], [3], [4], [5]. In term of the architecture designs, RIS typically have multiple reflectors, each allowing the tunable scattering of incident electromagnetic waves thanks to groundbreaking advances in metamaterial fields in recent years [6], [7], [8]. Additionally, RIS not only readily overcomes excessive thermal noise caused by decoding or amplification procedures during the forwarding transmission when using conventional relays, but it is also implemented smoothly in densely The associate editor coordinating the review of this manuscript and approving it for publication was Anandakumar Haldorai . populated environments requiring low cost, such as urban areas [9], [10]. Besides, since the reflectors are small in size and low in weight, RIS is able to straightforwardly construct on building surfaces, ceilings, and walls. In particular, the RIS can be adjusted collaboratively with all the phase shifts to improve the received signal quality and ameliorate unwanted interference. Inspired by these observations, the application of RIS has been introduced in wireless communications systems and achieved some benefits, such as increasing the channel capacity [11], [12], [13], [14], [15], [16] and improving the total transmit power consumption [17], [18], [19]. However, in RIS systems, since the received signal-to-noise ratio (SNR) at the receiver is intrinsically affected by channel fading propagation and the phase-shift alignment at the RIS, the performance analysis becomes rather intricate and challenging [16], [20]. VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ From the reported above, research on varying contexts of RIS-enabled wireless networks has recently been investigated, such as network architecture from a single-input single-output (SISO) [21], [22], [23], [24] and multiple-input single-output (MISO) systems [13], [25], [26], [27], [28], [29], [30], to multiple-input multiple-output (MIMO) system [31], [32]; or network application: green communication [33], full-duplex communication [34], physical security [35], [36], [37], [38], and cognitive radio [39], [40]. In the aspect of network architectures, the authors in [21] carried out a performance comparison between RIS and conventional relaying systems. To maximize the ergodic spectral efficiency, the authors in [22] proposed the upper bound optimal-phase shift (OPS) by exploiting statistical channel state information (CSI). In [23], the authors examined the effect of successive interference cancellation imperfections under two scenarios of optimal and uncertain phase-shift (UPS) 1 alignment. In [24], the authors addressed the question of how many surfaces for RIS are sufficient to beat the decode-andforward relaying. For simple MISO systems, the authors in [25] and [26] investigated the design of beamforming vector and practical phase-shift model along with beamforming, respectively. In contrast, the authors in [13] and [27] separately focused on multi-group multicast and multiple user communications. To reduce the complex analysis, the asymptotic expressions for the outage probability (OP) and the signal-to-interference-plus-noise ratio were derived in [28] and in [29] and [30], respectively. Looking at the potential of data transmission with a massive number of sensing and radiating elements, a new concept of a large intelligent surface associated with massive MIMO (mMIMO) technology has been introduced in [31]. Similarly, a new thoughtful consideration for the next future direction of RIS-aided mMIMO was put forward in [32]. Regarding network application, the authors in [33] proposed two novel MIMO schemes, namely Vertical Bell Labs layered space-time and Alamouti, for simple RIS-based transceiver architecture to enhance the SE. For a full-duplex RIS-based system, the authors of [34] have formulated the sum rate optimization problem by optimizing the energy splitting and mode switching protocols. Because of such a non-convex optimization problem, successive convex approximation technique has been employed to obtain sub-optimal solutions. Considering the existence of multiantenna eavesdroppers, the authors in [35] jointly designed the transmit covariance matrix at the transmitter and the phase-shift matrix at the RIS to maximize the secrecy rate of wiretap channels. In [36], the authors quantified the impact of phase-shift error on secrecy outage and capacity under different scaling laws of the legitimate and eavesdroppers SNR and the number of RIS reflectors. To improve the role of RIS, the authors of [37] and [38] considered the applications of RIS in a vehicle-to-vehicle network and a vehicular adhoc network, where the analytical results showed that the 1 The UPS scenario refers to the phase-shift design at the RIS when a full error occurs, and it is equivalent to the case of a random phase-shift design. average secrecy capacity and secrecy outage probability can be improved when increasing the number of elements of RIS. In [39], the authors provided the analytical results with two scenarios of RIS configurations access point RIS and RIS relay to indicate how the user of RIS configurations by primary users can improve the network performance. Finally, the authors in [40] optimized the transmit precoding at the secondary transceiver and the phase-shift of RIS to minimize the budget transmit power constrained by the quality of secondary user services, the interference links, and unit-modulus of the reflective beamforming.

A. MOTIVATION AND CONTRIBUTION
Although the studies in [13], [21], [22], [23], [24], [25], [26], [27], [28], [29], [30], [31], and [32] have provided significant contributions to the field of RISs with SISO, MISO, and MIMO systems, these works still have some limitations that need further in-depth investigation. Firstly, the RIS is typically constructed with multiple arrays distributed close together in practice and has been only explored for SISO systems in [21], [22], [23], and [24]. So that, the application of multi-RIS is still many room that need to be fulfilled. Secondly, the previous works of [25], [26], [27], [28], [29], and [30] mainly focused on optimizing the beamforming vector design with the OPS at RISs under the conditions of perfect [25], [26], [27], [28] or imperfect CSI [30] but lacked theoretical analysis for multiple antenna transceiver systems (i.e., MISO or MIMO) due to complex mathematical problems. Therefore, it becomes essential to provide analysis guidance to gain some useful technical insights. Thirdly, only the authors of [34] considered the optimization of both uplink and downlink with the full-duplex system, while all the existing works of [28], [29], [30], [41], [42] stopped at the investigation of downlink [28], [29], [30] or uplink systems [41], [42], and there has been no comprehensive work considering the analysis of both downlink and uplink systems. Finally, it is well-known that RIS is an emerging technology to enhance the system's performance without direct links between source and user. Therefore, various existing research has designed and optimized their network's performance with this worst-case scenario. However, it is not totally valid in practice since the user is mobile, and thus wireless communication can exist on both direct and reflective paths. In this case, designing a beamforming vector raises the crucial question ''Should the direct path or the reflective path be focused on?'' So far, this remains an open question.
Motivated by the aforementioned above as well as to fulfill these existing gaps in the literature, this paper investigate the performance analysis of downlink/uplink RIS-aided wireless systems, where the base station (B) communicates with the user via both direct link and one optimal RIS selected among a set of distributed RISs. The main contributions of this paper can be summarized as follows: • We investigate the performance of downlink/uplink RIS-aided wireless systems over Rayleigh fading channels under two scenarios of UPS and OPS alignment at RIS. In uplink systems, we assess two schemes of maximal ratio combining (MRC) and selection combining (SC) at the B. In downlink systems, two schemes of beamforming vector design along with maximal ratio transmission (MRT) are considered at the B, namely direct-path beamforming design (DBD) and reflective-path beamforming design (RBD).
• We have separately evaluated the OP with UPS and OPS for each transmission mode (i.e., uplink and downlink). Specifically, for uplink systems, we present the cumulative distribution function CDF) corresponding to the MRC and SC schemes. For downlink systems, we approximate a probability density function (PDF) for the channel random variable using direct-path beamforming design (DBD) and reflective-path beamforming design (RBD) schemes. Based on the obtained PDFs and CDFs, we then derive the closed-form expressions for the OP of each system consideration.
• We provide extensive simulations not only to corroborate the correctness of the theoretical analysis results but also to provide some useful technical insights.
In particular, throughout the numerical results, we firstly highlight the key impact of antenna setting at the B, the number of RISs distributed, and the number of each RIS units. Secondly, we quantify the performance gap between using UPS and OPS for both uplink and downlink models. Thirdly, we present some observations: (1) For an uplink system, adopting MRC at the B and OPS at RIS provides the best performance for uplink transmission and using SC with OPS for small antenna settings can provide outstanding performance when compared to employing MRC-integrated UPS.
(2) For a downlink system, DBD achieves better performance than that of RBD and employing DBD with OPS achieves superior performance when compared to that of UPS.

B. ORGANIZATION AND NOTATION
The rest of this paper is organized as follows. Section II describes the system model. Section III explores the OP analysis. Section IV provides the numerical results and discussions. Finally, Section V summarizes the conclusions of this paper.
Notations: E(·) is the expectation operator and Pr(.) represents the probability. The quantities f X (x) and F X (x) denote the PDF and the CDF of the random variable X , respectively.

II. SYSTEM MODEL
As presented in Fig.1, we consider a uplink/downlink RIS-based wireless systems, which includes one B with N antennas to serve one single-antenna user (U) through the assistance of one RIS selected among a set of M RIS, each of them having K passive elements. Considering farfield regions, since the distance between the direct and non-direct links is non-identical, the signals passing over direct and non-direct links are not simultaneously received at the receiver [24]. Throughout this paper, we assume that perfect knowledge of CSI is available at the terminals by using least mean-square-error method at the B and error free feedback channel at the U [28]. All elements in the RIS are uniformly distributed with half a wavelength, and there is no signal correlation or association from one element to another [43].
. , h N UB are the channel matrices for the links of RIS → B, U → RIS, and U → B, respectively. Each element of H RB , h UR , h UB and are assumed to be subject to Rayleigh block-fading with zero-mean and the corresponding variances of RB , UR , and UB . Also, = diag e jφ 1 , . . . , e jφ K is the diagonal phase-shift matrix at RIS for φ k ∈ (0, 2π ] and k ∈ {1, . . . , K }.
In the uplink transmission, U sends signal x = √ Px U to B through both direct and non-direct links after employing the RIS selection strategy with SC and MRC, which can be mathematically explained as and Following that, the received signal at B with SC and MRC can be expressed, respectively, as and where P is the transmit power of U, x is signal symbol, E[|x| 2 ] = 1, and n is the additive white Gaussian noise with CN 0, σ 2 I and a 1 × N identity vector I. (4), the SNR for decoding x at the B by using the SC scheme can be expressed as where ρ = P/σ 2 , the a − th and b − th antennas, the c − th RIS are selected, respectively. Meanwhile, the received SNR by using the MRC scheme at B can be expressed as where d represents the d-th RIS.

B. DOWNLINK MODEL
We denote the channel coefficients of the links B → U and B → RIS, and RIS → U as respectively. Each element of channel matrices and phase-shift configurations are considered similar to the uplink model.
In order to enhance the SNR received at the user, the B generates the vector beamforming according to two directions. In DBD, the beamforming vector is constructed as Then, the B will process the RIS selection strategies as When the B employs the DBD, the received signal at the user can be expressed as Thus, the SNR received at the user with DBD to decode its own signal is given by Similarly, the received signal using RBD at the B can be expressed as (12) In this case, the SNR received for decoding the x signal at the user can be expressed as where

III. OUTAGE PROBABILITY ANALYSIS
This section focuses on deriving the closed-form OP expressions under uplink/downlink transmission. In order to simplify the formulation as well as the presentation, we first provide a self-defined recursive functions as in (14), shown at the bottom of the page. Next, the outage event is defined as the probability that the SNR received γ i with i ∈ {SC, MRC, DBD, RBD} at the receiver is less than a given threshold γ th = 2 R − 1, where R refers to the target data rate.

A. UPLINK MODEL 1) OUTAGE PERFORMANCE OF SC
From (3) and outage event definitions, the OP to decode x when employing SC at the B can be expressed as Lemma 1: The closed-form expression for the OP with SC configuration at the B and UPS alignment at the RIS can be derived as Corollary 1: To provide some insights into the considered system, we carry out the asymptotic analysis for the OP when transmit SNR goes to infinity, i.e., ρ → ∞ by using the Maclaurin expansion for exp(-x/ρ) as where R is the expansion order. Therewith, the asymptotic of OP SC,U can be expressed as in (18), shown at the bottom of the page. Lemma 2: The closed-form expression for the OP with SC configuration at the B and OPS alignment at the RIS can be derived as where are the shape and scale parameters of the Gamma distribution, and SC is determined as (20) where L is the complexity accuracy trade-off parameter, ϑ = cos π [2l − 1] 2L and η = γ th (ϑ + 1) (2ρ The OP Asym SC,O in (21) shows that the diversity order of OPS design is MNk SC /2.

2) OUTAGE PERFORMANCE OF MRC
From (4) and outage event definitions, the OP to decode x when employing MRC at the B can be expressed as Lemma 3: The closed-form expression for the OP with MRC configuration at the B and UPS alignment at the RIS can be derived as where , and the entries of the recursive function ε(τ 1 , τ 2 , τ 3 , τ 4 ) are set as τ 1 = t, τ 2 = M , τ 3 = URB , and τ 4 = N .
Proof: See Appendix A2. Corollary 3: Similar to (17) and (21), when ρ → ∞, the asymptotic of OP MRC,U can be expressed as N are the shape and scale parameters, and MRC is determined as The OP Asym MRC,O in (27) shows that the diversity order of OPS design is Mk MRC /2. From (12) and outage event definitions, the OP to decode x at the user when employing DBD at the B can be expressed as Lemma 5: The closed-form expression for the OP with DBD configuration at the B and UPS alignment at the RIS can be derived as where Proof: See Appendix C1. Corollary 5: Similar to (17) and (21), when ρ → ∞, the asymptotic of OP DBD,U can be expressed as Lemma 6: The closed-form expression for the OP with DBD configuration at the B and OPS alignment at the RIS can be derived as N π 3 are the shape and scale parameters, and DBD is determined as Proof: See Appendix D1.
The OP Asym DBD,O in (33) shows that the diversity order of OPS design is Mk DBD /2.

2) REFLECTIVE-PATH BEAMFORMING DESIGN (RBD)
From (13) and outage event definitions, the OP to decode x at the user when employing RBD at the B can be expressed as Lemma 7: The closed-form expression for the OP with RBD configuration at the B and UPS alignment at the RIS can be derived as  Remark 2: Similar to Remark 1, we provide the ratio of OP Ana RBD,U /OP Sim RBD,U to consider the convergence of (35). Lemma 8: The closed-form expression for the OP with RBD configuration at the B and OPS alignment at the RIS can be derived as are the shape and scale parameters, and RBD is determined as where η = γ th N (ϑ + 1) (2ρ). k RBD1 = N π [4 − π ] and w RBD1 = (4 − π ) √ UB 2 √ π are the shape and scale parameters.
The OP Asym RBD,O in (39) shows that the diversity order of OPS design is Mk RBD2 /2.

IV. NUMERICAL RESULTS AND DISCUSSIONS
In this section, we use Monte-Carlo simulations to show the OP tendency of the considered system and to verify the accuracy of the theoretical analysis derived in Sec. III. All parameters used for simulation are listed in Table. 1. Taking into account the effect of path-loss, we set AC = d −PL AC , where d AC denote the physical distance between A and C while PL is the related path-loss exponent. Additionally, we label analysis and simulation results as ''Ana.'' and ''Sim.'', respectively.

A. UPLINK MODEL
In Fig. 2, we depict the OP at the B versus transmits SNR (in dB) under different antenna configurations. It observed clearly that the simulation results coincide with those of the theoretical analysis, verifying the accuracy of Lemmas 1 to 4. From Fig. 2, it can be observed that when MRC technique is used at B, the OP dramatically decreases with the increment of the SNRs as well as the number of antenna settings. In particular, to satisfy the OP = 10 −5 , OPS needs the increment of SNR up to 5 dB in the case of N = 3 and 2 dB in the case of N = 8. Meanwhile, UPS is required to increase the SNR up to 20 dB in the case of N = 3 and 14 dB in the case of N = 8. By comparing the OP with UPS and OPS, some interesting observations are recognized as: (i) The system with MRC can save a significant amount of budgeted transmit power (i.e., represented by SNR) around 12dB and 15 dB when deploying OPS. (ii) The OP tends to decrease with the increase of N . (iii) By doubling antenna settings, the system achieves approximately 2.5 dB improvement. Regarding the case of B using SC, it is also observed that the OP with OPS is always better than that of UPS, and it only requires a transmit power up to 9-10 dB to ensure the OP requirement with 10 −5 , whereas the UPS need to request the transmit power up to 18-23 dB. Moreover, the figure also reveals that the OP with OPS is less sensitive with the increase of N while the OP with UPS is strongly affected by N . Evidently, when N increases from 3 to 8, the transmit power corresponding to the OP curves with OPS only decreases 1 dB while that of the OP with UPS decreases 5 dB. Next, the figure shows that the OP curves with MRC outperforms that with SC in both UPS and OPS. For example, when using the OPS, the MRC achieves 4 dB and 8 dB gain for N = 3 and N = 8, respectively, in comparison with SC. For the case of UPS, the MRC also obtains 2 dB and 5 dB gain for N = 3 and N = 8 with respect to SC. This is because MRC technique produces maximum SNR by combining all the signals from the antennas, while the SC technique only selects an antenna with the best SNR received. Although MRC outperforms the performance when compared to SC, it should be noted that MRC required complex hardware implementation and higher cost. Furthermore, we should also note that using MRC is not always better than SC. Specifically, we can easily observe from the figure that MRC with UPS has lower OP than SC with OPS. Therefore, for a system requiring low-cost implementation and low complexity design, SC with OPS can become a promising solution.
Next, we focus on evaluating the impact of the number of distributed RISs in Fig. 3. Similar to the observation in Fig. 2, the OP with MRC achieves superior performance than that of SC in both UPS and OPS. It can be observed that when M increases from 3 to 8, the OP with OPS only decreases slightly, while the OP with UPS tends to decrease significantly. Clearly, the transmit power for the OPS has 1 dB improvement, while that of the UPS attains 2.5 dB enhancement.
To capture the effect of reflective configuration at RIS, we plot the OP with the increase of K in Fig. 4. As K increases from 20 to 30 as well as from 30 to 40, the OP with UPS maintains the performance gap improvement of  1 dB, while that of OPS earns 2.5 dB. This means that when increasing the number of units per each RIS array up to 10 units, the system with OPS can save approximately half of the transmit power budget, showing the advantage of RIS for the uplink scenario in future deployments, especially for low-cost mobile devices. Besides, from the results of Figs. 2 and 4, we can see that the performance gap of MRC-OPS when K increases from 20 to 40 is slightly better than when N increases from 3 to 8. In the case of SC-OPS, the increase of K provide outstanding performance of the OP when compared to the increase of N . Meanwhile, in the UPS scenarios, increasing N shows the better reduction of OP than increasing K .
Finally, in Fig. 5, we assess the impact of SNRs for the uplink transmission on the outage performance. As the SNR is fixed at 5dB, the OP curves with UPS in Fig. 5(a) tend to increase quickly as the target data rate transmission increases from 0.1 bit/s/Hz to 0.15 bit/s/Hz and then saturate the convergence at 1 for the rest. This means that the user only transmits low target data rate. When the user wants to send data with high data rate transmission, the system has to consume much more energy and requires better signal improvement. Clearly, as the data rate demands on 1 bit/s/Hz with OP = 10 −2 , the MRC should be configured at B and the user's transmit power requirement is set up to 15 dB. However, by employing the OPS in Fig. 5(b), the user only needs 5 dB with SC  configurations to achieve the same condition. Interestingly, when the SNR is fixed at 15dB, the target data rate for OPS can be greatly increased up to 2 bit/s/Hz for SC and 4 bit/s/Hz for MRC. Moreover, from the figure, we can see that the rate performance gap between using MRC and SC increases as the increment of the SNR. Specifically, in Fig. 5(a), when the SNR increases from 5 dB to 15 dB and considering OP = 10 −4 , the rate performance gap for UPS will increase from 0.1 to 0.4. Meanwhile, in Fig. 5(b), the rate performance for OPS will increase from 0.8 to 1.2.

B. DOWNLINK MODEL
In Fig. 6, we compare the performance of using DBD and RBD at the B for downlink transmission scenarios. In particular, we present the analytical and simulated OP against the average SNR under varying transmitter antenna settings. Besides, two different kinds of phase-shift design at RIS, namely UPS and OPS, are also provided for comparison. Similar to uplink results, the analytical results agree with the simulation ones. Moreover, there are three important observations: (1) The outage performance improves with the increment of N . This is because the higher antenna setting leads to increasing vector beamforming gain for the SNR received for the user. (2) Using RBD provides better performance over 1 dB and approximately 2.5 dB than that of DBD in the cases of OPS and UPS, respectively. Here, the main reason for this case is that when configuring DBD, the user receives two streams of signal enhancement; thus, the received SNR is maximized. Meanwhile, using RBD only strengthens the stream incident signals to RIS without enhancing the reflecting signal from RIS to the user, resulting in fewer improvements. (3) Compared with UPS, using the OPS setting can save the budget to transmit SNR up to more than 12 dB for large OP (i.e., OP > 10 −2 ); however, this gap will increase for smaller OP expectation. For example, when OP = 10 −4 , the gap between DBD with OPS and UPS is 17 dB and the gap between RBD with OPS and UPS is 15 dB.
In Fig. 7, we evaluate the impact of the number of RIS-distributed on the performance of the user. It can be intuitively observed that increasing M does not provide the performance improvement for OPS but achieves a significant performance enhancement for UPS. Clearly, to satisfy the OP = 10 −5 when M increases from 3 to 8, the OP curves with OPS only improve 1 dB, while in the case of UPS, the OP improves approximately 3 dB. The main reason for this tendency can be explained as follows. Most distributed RISs using OPS are constructed to maximize the channel gain from B to the user via phase-shift alignment, yielding very small performance gap between RISs. Meanwhile, for UPS deployments, selecting the best RIS provides great enhancement since this method can help us find out the best phase-shift alignment at RIS.
In Fig. 8, we examine the effect of the number of implemented reflectors on the optimal RIS. The results show that when K increases, the outage performance decreases significantly. In particular, when the number of reflectors increases from 20 to 30 and from 30 to 40, there exists a performance gap improvement for OPS and UPS. Specifically, the performance gap with UPS is 1 dB, which is similar to the case of uplink transmission. However, the performance gap with OPS is 4dB, which is better by 1.5 dB compared to uplink transmission. Additionally, for OPS scenarios, increasing K in Fig. 8 provides a slightly better OP performance than increasing N in Fig. 6, while for the UPS scenario, increasing  the number of antennas provides better performance than increasing K . Therefore, we can deduce that the large element RIS can provide better performance for the OPS scenarios than the B with multiple antennas. Meanwhile, for the UPS scenarios, multiple antennas at B will show greater performance when compared to large RISs. Therefore, combined with Fig. 7, the selection RIS can help UPS improve OP performance with large RISs.
In Fig. 9, we show the impact of the SNRs on the user's outage performance. The figure shows that the analytical results match the simulated ones. As expected, it is found that the OP increases with the increase of data rate transmission and OPS alignment provides better data rate transmission than UPS. In addition, the results also show that increasing transmitting SNR results in significant OP improvement as well as increasing the performance gap between using DBD and RBD. In particular, as SNR increases from 5 dB to 15 dB, the performance gap with UPS only increases 0.4 bit/z/Hz, whereas that of OPS increases approximately up to 2.5 bit/s/Hz.
Finally, to show the convergence of infinite series involving the derived analysis in Lemmas 3 and 7, we plot the ratio between the analysis and simulation results versus the number of summation terms under varying SNR settings. As can be observed, the ratio curves tend to converge to the auxiliary  line as the number of used terms increases. Aside from that, at ρ = 13 dB, the gap between the ratio RDB curve and the auxiliary one is relatively small compared to that of MRC. However, this case requires at least 30 terms to be converged. Interestingly, when ρ increases from 13 to 15 dB, the number of used terms tends to reduce. Exceptionally, using only 20 terms is sufficient for RDB and MRC to get the convergence. Therefore, we can conclude that the number of used terms primarily depends on the considered SNR values. For example, if a system in operating at a low or medium SNR regime, the number of used terms must be large; otherwise, small number of terms is sufficient.

V. CONCLUSION
This paper has investigated the performance of uplink/ downlink RIS-based wireless systems over Rayleigh fading channels. To enhance the system performance, we focused on three aspects: (1) the phase-shift alignment at RISs, (2) antenna configurations at B, and (3) the RIS selection strategies. Accordingly, we provided extensive simulation results to validate the theoretical analysis results. Numerical results revealed that: In both uplink and downlink transmission with the OPS scenario, the RISs equipped with a large number of elements provide more benefits than configuring multiple antennas at B. Meanwhile, using selection RIS can overcome the performance disadvantage in the UPS scenario. Additionally, for uplink transmissions, employing OPS alignment always provides better OP performance than UPS. Adopting MRC always shows better OP compared to the SC in the same scenario, while the SC-OPS presents better OP performance than MRC-UPS. For downlink transmissions, the results showed that: (i) Using RBD provides better OP than using DBD in both OPS and RPS; (ii) The OPS scenario achieves 13 dB better OP performance than the UPS regardless of applying DBD or RBD; and (iii) When increasing the number of distributed IRSs, the OP of the UPS is significantly reduced compared to that of OPS. APPENDIX A 1. PROOF OF LEMMA 1 (16) Since the best antenna is chosen based on the best channel capacity, the CDF of direct link γ 2 SC1 is provided as For UPS, the non-direct link can be approximated to with e jφ k = 0. Thus, the PDF of γ 2 SC2,U is provided as From (3), (40), and (41), the OP of γ SC,U for RPS can be written as where The proof is completed.

PROOF OF LEMMA 3 (23)
For MRC, the PDF and CDF of γ 2 MRC1 can be expressed as 91068 VOLUME 10, 2022 and For UPS combined with MRC scheme, the non-direct link can be approximated to γ MRC2,U = [h UR H RB ] d . The CDF and PDF of γ 2 MRC2,U can be expressed as and From (4), the OP of γ MRC,U can be written as Let γ th ρ−y = x, the integral of (50) can be expressed as By using [44, Eq. (3.381.1)], the closed-form expression for OP of γ MRC,R can be achieved as in (23). The proof is completed.

APPENDIX B
1. PROOF OF LEMMA 2 (19) For the OPS with RIS is selected, the γ SC2 can be approxi- . According to [23], we can easily determine the shape parameter k SC and scale parameter w SC of the Gamma distribution by using the moment-matching method. Thus, PDF and CDF of γ 2 SC2,O can be provided as Combining (40) with (54) and (55) the OP of γ SC,O can be written as At high SNR regime, since ρ → ∞ (i.e., γ th ρ → 0), the integral of the right-hand side becomes zero. Besides, thus, it is quite challenging to directly solve (58). To overcome this hurdle, we rely on the Gaussian-Chebyshev quadrature method [45,Eq. (45)]. The proof is completed.

PROOF OF LEMMA 4 (25)
The γ MRC2 can be approximated to γ MRC2,O = [|h UR | |H RB |] d , the CDF and PDF of γ 2 MRC2,O can be expressed as (60) By combining (46) with (59), the OP of γ MRC,O is expressed as Similar to APPENDIX B.1, to overcome this hurdle, we rely on the Gaussian-Chebyshev quadrature method. The proof is completed. APPENDIX C 1. PROOF OF LEMMA 5 (29) From (12), for UPS, γ DBD2 can be approximated to γ DBD2 = [H BR h RU ] p , and therewith, the CDF of γ 2 DBD2 is expressed as From (12), (45), (46), and (64), the OP of γ DBD,U can be written as  (29). The proof is completed.

PROOF OF LEMMA 8 (37)
From (13), for OPS, γ RBD1 can be approximated to γ RBD1,O = √ N |h BU | . Thus, the CDF and PDF of direct link can be expressed as and The CDF and PDF of γ 2 RBD2,O can be expressed as and From (13), (78), (79), (80), and (81), the OP can be written as Similar to APPENDIX B1, to overcome this hurdle, we rely on the Gaussian-Chebyshev quadrature method. The OP of γ RBD,O is obtained in (37). The proof is completed.