Coded Beam Training for RIS Assisted Wireless Communications

Yuhao Chen, Graduate Student Member, IEEE and Linglong Dai, Fellow, IEEE This paper was supported by National Key Research and Development Program of China (Grant No. 2023YFB3811503). (Corresponding author: Linglong Dai.)The authors are with the Department of Electronic Engineering, Tsinghua University, Bei**g 100084, China, and also with the Bei**g National Research Center for Information Science and Technology (BNRist), Bei**g 100084, China. (e-mails: [email protected]; [email protected]).
Abstract

Reconfigurable intelligent surface (RIS) is considered as one of the key technologies for future 6G communications. To fully unleash the performance of RIS, accurate channel state information (CSI) is crucial. Beam training is widely utilized to acquire the CSI. However, before aligning the beam correctly to establish stable connections, the signal-to-noise ratio (SNR) at UE is inevitably low, which reduces the beam training accuracy. To deal with this problem, we exploit the coded beam training framework for RIS systems, which leverages the error correction capability of channel coding to improve the beam training accuracy under low SNR. Specifically, we first extend the coded beam training framework to RIS systems by decoupling the base station-RIS channel and the RIS-user channel. For this framework, codewords that accurately steer to multiple angles is essential for fully unleashing the error correction capability. In order to realize effective codeword design in RIS systems, we then propose a new codeword design criterion, based on which we propose a relaxed Gerchberg-Saxton (GS) based codeword design scheme by considering the constant modulus constraints of RIS elements. In addition, considering the two dimensional structure of RIS, we further propose a dimension reduced encoder design scheme, which can not only guarentee a better beam shape, but also enable a stronger error correction capability. Simulation results reveal that the proposed scheme can realize effective and accurate beam training in low SNR scenarios.

Index Terms:
RIS, beam training, channel coding, codeword design.

I Introduction

Reconfigurable intelligent surface (RIS) is considered as a promising technology for future 6G wireless communications [1]. Thanks to the numerous low-cost reflecting elements, RIS can control the electromagnetic environment intelligently with low power consumption [2, 3, 4]. By properly controlling the phase shifts of RIS elements, directional beams with high array gain could be generated by beamforming to extend the signal coverage and improve the channel capacity [5, 6]. In order to realize effective beamforming so as to fully leverage the potential benefits of RIS, accurate channel state information (CSI) is essential [7, 8].

The CSI can be obtained by either explicit channel estimation or implicit beam training. For explicit channel estimation, since the elements on RIS can only reflect the incident signals, the base station (BS) needs to estimate the cascaded channel (the composite of user-RIS channel and RIS-BS channel) [9, 10]. The size of the cascaded channel is the product of the number of BS antennas and the number of RIS elements. With the large number of RIS elements needed to generated high-gain beams, the size of cascaded channel is usually large, leading to an unacceptable pilot overhead for channel estimation. To avoid estimating the large cascaded channel matrix, the implicit beam training, which only aims to determine the angles of RIS and user equipment (UE), can be utilized. By searching the space with a series of pre-defined codewords, the angles of RIS and UE can be estimated based on the received power, according to which the beams at BS and RIS can be correctly aligned to UE.

I-A Prior Works

To determine the angles of RIS and UE, the most intuitive scheme is the exhaustive beam training [11, 12]. During beam training, BS and RIS both generate narrow beams to sequentially search all possible angles in space. After transmitting all candidate beams, the angles of RIS and UE can be obtained by selecting the beams with the maximum received power. For this scheme, both BS and RIS generate high-gain narrow beams, so the angles can be accurately estimated. However, for this scheme, the number of candidate beams equals to the product of the number of BS antennas and the number of RIS elements. With the large number of BS antennas and RIS elements, the candidated beams are massive, resulting in an overwhelming beam training overhead.

In order to reduce the beam training overhead, researchers have developed various low overhead hierarchical beam training schemes. Existing works can be divided into two categories. The first category is single user hierarchical beam training, where the beam training overhead can be reduced by excluding a large range of impossible angles so as to narrow down the searching range effectively.

For example, in [13], beams generated by lower-layer codewords cover a wider range of angles compared with beams generated by higher-layer codewords. During beam training, lower-layer codewords are firstly transmitted. After transmitting the codewords in a certain layer, the index of the beam with the maximum received power is fed back to the BS and RIS, and the codewords in the next layer are decided accordingly. As the layer grows higher, the searching range gradually narrows down and the angular resolution increases continuously. After the highest-layer search, the angles of RIS and UE are then determined. By this means, a large range of wrong angles is excluded in lower-layer search, which avoids a lot of unnecessary high-resolution search and thus reduces the beam training overhead. However, since the higher-layer codewords is determined by the result of lower-layer training, this category of schemes requires frequent feedback between UE and BS/RIS, which brings extra burden to the RIS systems. Moreover, since the searching range in a certain layer may vary for different UEs, it is hard to extend this category of schemes to multi-user systems, which severely limits the application of such schemes.

To realize effective beam training in multi-user systems, for the second category, all possible angles in space are divided into several disjoint subsets, and the beam generated by each codeword covers the angles in a certain subset simultaneously. After scanning the entire space by these codewords, the subset of the beam with the maximum received power is recorded. Then, the space is divided in a different way and the corresponding scanning and recording are conducted again. After a few rounds of scanning, the angles of RIS and multiple UEs can be determined independently based on the intersections of all recorded subsets.

Following this idea, researchers have studied several effective beam training schemes [14, 15, 16, 17]. Specifically, authors in [14, 15] divided the whole space for every round of scanning in a random/hashed way. Authors in [16] further extend this hashing scheme to multi-RIS scenarios. By assigning different hashing functions to different RISs, the angles of different RISs can be simultaneously determined. For the above schemes, the choice of hashing function may affect the beam training accuracy, thus leading to an unstable performance. To deal with this, authors in [17] studied a full-coverage hierarchical beam training scheme. Different from the single user hierarchical beam training of the first category, in each layer, the beams also cover the whole space, but the angular resolution gradually increases. For this category of schemes, each beam can search multiple angles simultaneously, so the beam training overhead can also be reduced. In addition, since how to divide the entire space in each round does not depend on previous results, no extra feedback is needed during beam training, which makes this category of schemes more adaptive to different communication scenarios than the first category.

Unfortunately, before aligning the beam correctly to establish stable connections among BS, RIS and UE, the signal-to-noise ratio (SNR) at UE is inevitably low. What’s worse, in RIS systems, there exists the “multiplicative fading” effect [18], which means the equivalent path loss of the BS-RIS-UE link is the product of the path loss of BS-RIS link and the path loss of RIS-UE link. Meanwhile, both categories of low overhead beam training schemes need to generate beams that cover a large range of angles, leading to a relatively low beamforming gain. These facts will result in a significantly low SNR at UE. As a result, the codeword may be mischosen, which leads to the “error propagation” phenomenon and greatly reduces the beam training accuracy. Therefore, how to realize accurate beam training in RIS systems under poor SNR conditions is crucial for the practical deployment of RIS in future communications.

I-B Our Contributions

To improve the beam training accuracy under poor SNR scenarios, in this paper, we exploit the coded beam training framework in RIS systems. By applying the idea of channel coding in the beam training process, we can leverage the error correction capability of channel coding to enhance the reliability of beam training under low SNR111Simulation codes will be provided to reproduce the results in this article: http://oa.ee.tsinghua.edu.cn/dailinglong/publications/publications.html.. The specific contributions are listed as follows.

  • First, inspired by the coded beam training framework that is recently studied by us in multiple-input multiple-output (MIMO) systems [19], we design a coded beam training framework for RIS systems. Specifically, we map the angles in space to different beam patterns in space through the encoding function. Based on the intended beam patterns, we design the codewords, which is the foundation of the designed framework. After sequentially transmitting all codewords in the codebook, the UE can obtain the encoded transmitting sequence based on the received powers. Then, the decoding function is utilized to decode the received sequence and the angles of RIS and UE can be estimated. Thanks to the error correction capability of the encoding-decoding process, the error caused by low SNR during beam training can be corrected and the beam training accuracy improves accordingly.

  • The most significant difference between the codeword design of RIS and the codeword design for the coded beam training framework in [19] is that, RIS is subject to constant modulus constraint, which makes it hard to generate ideal beams that cover a variety of angles. One of the efficient codeword design schemes is Gerchberg-Saxton (GS) based codeword design scheme [20]. To adapt the GS-based scheme to RIS, we first clarify that the criterion of minimizing the difference between the intended beam shape and the generated beam shape is actually unsuitable for beam training. Then, we propose that the criterion for codeword design should be distinguishing between the angles within the intended angle coverage range and the angles out of the angle coverage range. Based on this new criterion, we propose a relaxed GS-based codeword design scheme so as to improve the beam shape accuracy.

  • Apart from the constant modulus constraint, the structure of RIS is usually a 2-dimensional (2D) uniform planar array (UPA), which is also different from the uniform linear array (ULA) considered in [19]. The 2D structure leads to a poor orthogonality for the spatial sampling matrix in the proposed relaxed GS-based codeword design scheme, which also results in a non-ideal beam shape. To deal with this problem, we further propose a dimension reduced encoder design scheme. By decoupling the 2D codeword design problem into two 1D codeword design problems, the spatial sampling matrix degenerates to the 1D case and possesses a good orthogonality, thus improving the quality of the beam shape design. Moreover, since the encoder decouples the two dimensions of RIS, the error correction capability can also be improved. Then, we compare the necessary beam training overheads of the proposed framework and existing frameworks. Finally, simulation results reveal that the proposed framework can realize efficient beam training in low SNR scenarios.

I-C Organization and Notation

Organization

The remainder of this paper is organized as follows. In Section II, we first introduce the system model. Then, the traditional exhaustive beam training framework and hierarchical beam training framework are elaborated. In Section III, we introduce the proposed coded beam training framework in RIS systems. In Section IV, we first introduce the proposed relaxed GS-based codeword design scheme, followed by the proposed dimension reduced encoder design scheme. Then, the necessary beam training overheads for the proposed framework and traditional frameworks are analyzed. Simulation results are provided in Section V, and conclusions are finally drawn in Section VI.

Notation

Lower-case and upper-case boldface letters represent vectors and matrices, respectively; 𝐯(i)𝐯𝑖\mathbf{v}\left(i\right)bold_v ( italic_i ) denotes the i𝑖iitalic_i-th element of the vector 𝐯𝐯\mathbf{v}bold_v; 𝐗(i,j)𝐗𝑖𝑗\mathbf{X}\left(i,j\right)bold_X ( italic_i , italic_j ) denotes the (i,j)𝑖𝑗(i,j)( italic_i , italic_j )-th element of the matrix 𝐗𝐗\mathbf{X}bold_X; 𝐗(i,:)𝐗𝑖:\mathbf{X}\left(i,:\right)bold_X ( italic_i , : ) and 𝐗(:,j)𝐗:𝑗\mathbf{X}\left(:,j\right)bold_X ( : , italic_j ) denote the i𝑖iitalic_i-th row and the j𝑗jitalic_j-th column of the matrix 𝐗𝐗\mathbf{X}bold_X; ()Tsuperscript𝑇(\cdot)^{T}( ⋅ ) start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT and ()Hsuperscript𝐻(\cdot)^{H}( ⋅ ) start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT denote the transpose and conjugate transpose, respectively; ||\left|\cdot\right|| ⋅ | denotes the absolute operator; 2subscriptdelimited-∥∥2\left\lVert\cdot\right\rVert_{2}∥ ⋅ ∥ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT denotes the l2subscript𝑙2l_{2}italic_l start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT norm operator; \lceil\cdot\rceil⌈ ⋅ ⌉ denotes the ceiling operator; mod()mod\mathrm{mod}(\cdot)roman_mod ( ⋅ ) denotes the modulo operator; 𝒞𝒩(μ,Σ)𝒞𝒩𝜇Σ\mathcal{CN}(\mu,\Sigma)caligraphic_C caligraphic_N ( italic_μ , roman_Σ ) and 𝒰(a,b)𝒰𝑎𝑏\mathcal{U}(a,b)caligraphic_U ( italic_a , italic_b ) denote the Gaussian distribution with mean μ𝜇\muitalic_μ and covariance ΣΣ\Sigmaroman_Σ, and the uniform distribution between a𝑎aitalic_a and b𝑏bitalic_b, respectively.

II System Model and Background

Refer to caption
Figure 1: Traditional beam training frameworks. (a) Exhaustive beam training; (b) Hierarchical beam training.

In this section, we first introduce the system model of RIS assisted communication systems. Then, the traditional exhaustive and hierarchical beam training frameworks are reviewed.

II-A System Model

We consider a downlink time division duplexing (TDD) RIS assisted communication system in this paper. The BS employs a uniform linear array (ULA) with Ntsubscript𝑁𝑡N_{t}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT antennas and the RIS employs a UPA with Nr1×Nr2=Nrsubscript𝑁subscript𝑟1subscript𝑁subscript𝑟2subscript𝑁𝑟N_{r_{1}}\times N_{r_{2}}=N_{r}italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT antennas. The UE is equipped with a single antenna. We assume that the direct links between the BS and the UE are blocked by obstacles such as trees or buildings [10]. Then, the received signal ypsubscript𝑦𝑝y_{p}\in\mathbb{C}italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∈ blackboard_C in the p𝑝pitalic_p-th time slot at the UE can be represented as

yp=𝐡rdiag(𝐯p)𝐆𝐰psp+np,subscript𝑦𝑝subscript𝐡𝑟diagsubscript𝐯𝑝subscript𝐆𝐰𝑝subscript𝑠𝑝subscript𝑛𝑝y_{p}=\mathbf{h}_{r}\mathrm{diag}(\mathbf{v}_{p})\mathbf{G}\mathbf{w}_{p}s_{p}% +n_{p},italic_y start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT = bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT roman_diag ( bold_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ) bold_Gw start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT italic_s start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT , (1)

where 𝐡r1×Nrsubscript𝐡𝑟superscript1subscript𝑁𝑟\mathbf{h}_{r}\in\mathbb{C}^{1\times N_{r}}bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT 1 × italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT denotes the channel between UE and RIS; 𝐯pNr×1subscript𝐯𝑝superscriptsubscript𝑁𝑟1\mathbf{v}_{p}\in\mathbb{C}^{N_{r}\times 1}bold_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × 1 end_POSTSUPERSCRIPT denotes the reflecting vector of RIS at the p𝑝pitalic_p-th time slot; 𝐆Nr×Nt𝐆superscriptsubscript𝑁𝑟subscript𝑁𝑡\mathbf{G}\in\mathbb{C}^{N_{r}\times N_{t}}bold_G ∈ blackboard_C start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT denotes the channel between RIS and BS; 𝐰psubscript𝐰𝑝\mathbf{w}_{p}bold_w start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT denotes the beamforming vector of BS at the p𝑝pitalic_p-th time slot; spsubscript𝑠𝑝s_{p}\in\mathbb{C}italic_s start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∈ blackboard_C denotes the signal sent by BS at the p𝑝pitalic_p-th time slot; and np𝒞𝒩(0,σ2)similar-tosubscript𝑛𝑝𝒞𝒩0superscript𝜎2n_{p}\sim\mathcal{CN}(0,\sigma^{2})italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ∼ caligraphic_C caligraphic_N ( 0 , italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ) denotes the additive white Gaussian complex noise at the p𝑝pitalic_p-th time slot with σ2superscript𝜎2\sigma^{2}italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT being the noise power, respectively. Due to the constant modulus constraint, RIS can only adjust the phase shift rather than the amplitude coefficient [21]. As a result, the reflecting vector of the RIS can be re-written as 𝐯p=[ejϑ1,ejϑ2,,ejϑNr]subscript𝐯𝑝superscript𝑒𝑗subscriptitalic-ϑ1superscript𝑒𝑗subscriptitalic-ϑ2superscript𝑒𝑗subscriptitalic-ϑsubscript𝑁𝑟\mathbf{v}_{p}=\left[e^{j\vartheta_{1}},e^{j\vartheta_{2}},\cdots,e^{j% \vartheta_{N_{r}}}\right]bold_v start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT = [ italic_e start_POSTSUPERSCRIPT italic_j italic_ϑ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , italic_e start_POSTSUPERSCRIPT italic_j italic_ϑ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , ⋯ , italic_e start_POSTSUPERSCRIPT italic_j italic_ϑ start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ], where ϑn[0,2π],n=1,2,,Nrformulae-sequencesubscriptitalic-ϑ𝑛02𝜋𝑛12subscript𝑁𝑟\vartheta_{n}\in\left[0,2\pi\right],n=1,2,\cdots,N_{r}italic_ϑ start_POSTSUBSCRIPT italic_n end_POSTSUBSCRIPT ∈ [ 0 , 2 italic_π ] , italic_n = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT represents the phase shift of the n𝑛nitalic_n-th element.

For the channel model, we apply the Saleh-Valenzuela channel model [22], so the channel 𝐡rsubscript𝐡𝑟\mathbf{h}_{r}bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT between UE and RIS can be written as

𝐡r=NrLr=1Lrαr𝐚T(ϕr,θr),subscript𝐡𝑟subscript𝑁𝑟subscript𝐿𝑟superscriptsubscript1subscript𝐿𝑟superscriptsubscript𝛼𝑟superscript𝐚𝑇superscriptsubscriptitalic-ϕ𝑟superscriptsubscript𝜃𝑟\mathbf{h}_{r}=\sqrt{\frac{N_{r}}{L_{r}}}\sum_{\ell=1}^{L_{r}}\alpha_{\ell}^{r% }\mathbf{a}^{T}(\phi_{\ell}^{r},\theta_{\ell}^{r}),bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = square-root start_ARG divide start_ARG italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG start_ARG italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG end_ARG ∑ start_POSTSUBSCRIPT roman_ℓ = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT italic_α start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT bold_a start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ( italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT , italic_θ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT ) , (2)

where Lrsubscript𝐿𝑟L_{r}italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT denotes the number of paths between UE and RIS; αrsuperscriptsubscript𝛼𝑟\alpha_{\ell}^{r}italic_α start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT denotes the path gain of the \ellroman_ℓ-th path; ϕr,θrsuperscriptsubscriptitalic-ϕ𝑟superscriptsubscript𝜃𝑟\phi_{\ell}^{r},\theta_{\ell}^{r}italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT , italic_θ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_r end_POSTSUPERSCRIPT denote the azimuth angle and the elevation angle at RIS, respectively. The steering vector 𝐚(ϕ,θ)𝐚italic-ϕ𝜃\mathbf{a}(\phi,\theta)bold_a ( italic_ϕ , italic_θ ) for a N=N1×N2𝑁subscript𝑁1subscript𝑁2N=N_{1}\times N_{2}italic_N = italic_N start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT-antenna UPA can be elaborated as

𝐚(ϕ,θ)=1N[ej2πdsin(ϕ)sin(θ)𝜹/λ][ej2πdcos(θ)𝝇λ],𝐚italic-ϕ𝜃tensor-product1𝑁delimited-[]superscript𝑒𝑗2𝜋𝑑italic-ϕ𝜃𝜹𝜆delimited-[]superscript𝑒𝑗2𝜋𝑑𝜃𝝇𝜆\mathbf{a}(\phi,\theta)=\frac{1}{\sqrt{N}}\left[e^{-j2\pi d\sin(\phi)\sin(% \theta)\bm{\delta}/\lambda}\right]\otimes\left[e^{-j2\pi d\cos(\theta)\bm{% \varsigma}\lambda}\right],bold_a ( italic_ϕ , italic_θ ) = divide start_ARG 1 end_ARG start_ARG square-root start_ARG italic_N end_ARG end_ARG [ italic_e start_POSTSUPERSCRIPT - italic_j 2 italic_π italic_d roman_sin ( italic_ϕ ) roman_sin ( italic_θ ) bold_italic_δ / italic_λ end_POSTSUPERSCRIPT ] ⊗ [ italic_e start_POSTSUPERSCRIPT - italic_j 2 italic_π italic_d roman_cos ( italic_θ ) bold_italic_ς italic_λ end_POSTSUPERSCRIPT ] , (3)

where λ=c/fc𝜆𝑐subscript𝑓𝑐\lambda=c/f_{c}italic_λ = italic_c / italic_f start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT denotes the wavelength of electromagnetic wave with fcsubscript𝑓𝑐f_{c}italic_f start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT being the central frequency and c𝑐citalic_c being the speed of light. The antenna spacing d𝑑ditalic_d is set to d=λ/2𝑑𝜆2d=\lambda/2italic_d = italic_λ / 2. The antenna indices 𝜹𝜹\bm{\delta}bold_italic_δ and 𝝇𝝇\bm{\varsigma}bold_italic_ς can be represented as

𝜹=[δ1,δ2,,δN1]T=[1N12,3N12,,N112]T𝝇=[ς1,ς2,,ςN2]T=[1N22,3N22,,N212]T.𝜹superscriptsubscript𝛿1subscript𝛿2subscript𝛿subscript𝑁1𝑇superscript1subscript𝑁123subscript𝑁12subscript𝑁112𝑇𝝇superscriptsubscript𝜍1subscript𝜍2subscript𝜍subscript𝑁2𝑇superscript1subscript𝑁223subscript𝑁22subscript𝑁212𝑇\begin{aligned} \bm{\delta}=\left[\delta_{1},\delta_{2},\cdots,\delta_{N_{1}}% \right]^{T}=\left[\tfrac{1-N_{1}}{2},\tfrac{3-N_{1}}{2},\cdots,\tfrac{N_{1}-1}% {2}\right]^{T}\\ \bm{\varsigma}=\left[\varsigma_{1},\varsigma_{2},\cdots,\varsigma_{N_{2}}% \right]^{T}=\left[\tfrac{1-N_{2}}{2},\tfrac{3-N_{2}}{2},\cdots,\tfrac{N_{2}-1}% {2}\right]^{T}\end{aligned}.start_ROW start_CELL bold_italic_δ = [ italic_δ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_δ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , ⋯ , italic_δ start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT = [ divide start_ARG 1 - italic_N start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_ARG start_ARG 2 end_ARG , divide start_ARG 3 - italic_N start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_ARG start_ARG 2 end_ARG , ⋯ , divide start_ARG italic_N start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT - 1 end_ARG start_ARG 2 end_ARG ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT end_CELL end_ROW start_ROW start_CELL bold_italic_ς = [ italic_ς start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_ς start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , ⋯ , italic_ς start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT = [ divide start_ARG 1 - italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_ARG start_ARG 2 end_ARG , divide start_ARG 3 - italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_ARG start_ARG 2 end_ARG , ⋯ , divide start_ARG italic_N start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT - 1 end_ARG start_ARG 2 end_ARG ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT end_CELL end_ROW . (4)

Simularly, the channel 𝐆𝐆\mathbf{G}bold_G between RIS and BS can be represented as

𝐆=NtNrLG=1LGαG𝐚(ϕGr,θGr)𝐛T(ϕGt),𝐆subscript𝑁𝑡subscript𝑁𝑟subscript𝐿𝐺superscriptsubscript1subscript𝐿𝐺superscriptsubscript𝛼𝐺𝐚superscriptsubscriptitalic-ϕsubscript𝐺𝑟superscriptsubscript𝜃subscript𝐺𝑟superscript𝐛𝑇superscriptsubscriptitalic-ϕsubscript𝐺𝑡\mathbf{G}=\sqrt{\frac{N_{t}N_{r}}{L_{G}}}\sum_{\ell=1}^{L_{G}}\alpha_{\ell}^{% G}\mathbf{a}(\phi_{\ell}^{G_{r}},\theta_{\ell}^{G_{r}})\mathbf{b}^{T}(\phi_{% \ell}^{G_{t}}),bold_G = square-root start_ARG divide start_ARG italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG start_ARG italic_L start_POSTSUBSCRIPT italic_G end_POSTSUBSCRIPT end_ARG end_ARG ∑ start_POSTSUBSCRIPT roman_ℓ = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_L start_POSTSUBSCRIPT italic_G end_POSTSUBSCRIPT end_POSTSUPERSCRIPT italic_α start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G end_POSTSUPERSCRIPT bold_a ( italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , italic_θ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ) bold_b start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT ( italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT ) , (5)

where LGsubscript𝐿𝐺L_{G}italic_L start_POSTSUBSCRIPT italic_G end_POSTSUBSCRIPT denotes the number of paths between RIS and BS; αGsuperscriptsubscript𝛼𝐺\alpha_{\ell}^{G}italic_α start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G end_POSTSUPERSCRIPT denotes the path gain of the \ellroman_ℓ-th path; ϕGr,θGr,ϕGtsuperscriptsubscriptitalic-ϕsubscript𝐺𝑟superscriptsubscript𝜃subscript𝐺𝑟superscriptsubscriptitalic-ϕsubscript𝐺𝑡\phi_{\ell}^{G_{r}},\theta_{\ell}^{G_{r}},\phi_{\ell}^{G_{t}}italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , italic_θ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , italic_ϕ start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_G start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT denote the azimuth angle at RIS, the elevation angle at RIS and the azimuth angle at BS, respectively. The steering vector 𝐛(ϕ)𝐛italic-ϕ\mathbf{b}(\phi)bold_b ( italic_ϕ ) for a N𝑁Nitalic_N-antenna ULA can be elaborated as

𝐛(ϕ)=1N[1,ej2πdsin(ϕ)/λ,,ej2(N1)πdsin(ϕ)/λ]T.𝐛italic-ϕ1𝑁superscript1superscript𝑒𝑗2𝜋𝑑italic-ϕ𝜆superscript𝑒𝑗2𝑁1𝜋𝑑italic-ϕ𝜆𝑇\mathbf{b}(\phi)=\frac{1}{\sqrt{N}}\left[1,e^{-j2\pi d\sin(\phi)/\lambda},% \cdots,e^{-j2(N-1)\pi d\sin(\phi)/\lambda}\right]^{T}.bold_b ( italic_ϕ ) = divide start_ARG 1 end_ARG start_ARG square-root start_ARG italic_N end_ARG end_ARG [ 1 , italic_e start_POSTSUPERSCRIPT - italic_j 2 italic_π italic_d roman_sin ( italic_ϕ ) / italic_λ end_POSTSUPERSCRIPT , ⋯ , italic_e start_POSTSUPERSCRIPT - italic_j 2 ( italic_N - 1 ) italic_π italic_d roman_sin ( italic_ϕ ) / italic_λ end_POSTSUPERSCRIPT ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT . (6)

Due to the severe loss incurred by the scattering, high-frequency communication heavily relies on the line-of-sight (LoS) path [23], so we set Lr=LG=1subscript𝐿𝑟subscript𝐿𝐺1L_{r}=L_{G}=1italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_L start_POSTSUBSCRIPT italic_G end_POSTSUBSCRIPT = 1 in this paper. This means that the channel is determined by the angle at BS and the angle at RIS.

II-B Traditional Beam Training Frameworks

To determine the angle at BS and the angle at RIS, beam training is usually applied. By generating directional beams to search all angles in space, the above angles can be obtained according to the beam tuple with the maximum received power. Here, we introduce two types of traditional beam training frameworks in RIS assisted communication systems: exhaustive beam training and hierarchical beam training.

II-B1 Exhaustive Beam Training

One intuitive way to estimate the angles is to exhaustively search all possible angles in space. As illustrated in Fig. 1(a), both BS and RIS apply codewords in exhaustive codebooks to generate narrow beams and sequentially search all possible angles in space. The codewords at the BS side and the RIS side are denoted as 𝐰E(i),i=1,2,,Ntformulae-sequencesubscript𝐰𝐸𝑖𝑖12subscript𝑁𝑡\mathbf{w}_{E}(i),i=1,2,\cdots,N_{t}bold_w start_POSTSUBSCRIPT italic_E end_POSTSUBSCRIPT ( italic_i ) , italic_i = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and 𝐯E(j),j=1,2,,Nrformulae-sequencesubscript𝐯𝐸𝑗𝑗12subscript𝑁𝑟\mathbf{v}_{E}(j),j=1,2,\cdots,N_{r}bold_v start_POSTSUBSCRIPT italic_E end_POSTSUBSCRIPT ( italic_j ) , italic_j = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, respectively. After receiving and recording received powers from all beam tuples, the angle at BS and the angle at RIS are estimated according to the beam tuple with the maximum received power. Since narrow beams are applied in the exhaustive beam training framework, the codebook size is equal to the number of antenna elements at both sides. In our considered scenario, where BS is equipped with Ntsubscript𝑁𝑡N_{t}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT antenna elements and RIS is equipped with Nrsubscript𝑁𝑟N_{r}italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT antenna elements, the necessary beam training overhead is NtNrsubscript𝑁𝑡subscript𝑁𝑟N_{t}N_{r}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. In future communication systems, the antenna number at both BS and RIS tend to be very large, which means the exhaustive beam training framework will suffer from an unacceptable beam training overhead.

II-B2 Hierarchical Beam Training

In order to reduce the beam training overhead, we can apply the idea of hierarchical beam training framework in RIS assisted communication systems [17]. As illustrated in Fig. 1(b), both BS and RIS apply binary search based codebooks, so each layer contains two codewords. We denote the i𝑖iitalic_i-th codeword in the j𝑗jitalic_j-th layer at the BS side and the RIS side as 𝐰H(j,i)subscript𝐰𝐻𝑗𝑖\mathbf{w}_{H}(j,i)bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_j , italic_i ) and 𝐯H(j,i)subscript𝐯𝐻𝑗𝑖\mathbf{v}_{H}(j,i)bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( italic_j , italic_i ), respectively. According to the property of binary search, the numbers codebook layers at the BS side and the RIS side are Lt=log2(Nt)subscript𝐿𝑡subscript2subscript𝑁𝑡L_{t}=\log_{2}(N_{t})italic_L start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and Lr=log2(Nr)subscript𝐿𝑟subscript2subscript𝑁𝑟L_{r}=\log_{2}(N_{r})italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ), respectively. To gradually narrow down the possible range of UE, the beam patterns of codewords in higher layers possess higher angular resolutions compared to codewords in lower layers.

During the beam training procedure, the codewords are transmitted layer by layer. Specifically, at the first layer, the BS and RIS sequentially transmits four beam tuples to UE, which can be listed as {𝐰H(1,1),𝐯H(1,1)}subscript𝐰𝐻11subscript𝐯𝐻11\left\{\mathbf{w}_{H}(1,1),\mathbf{v}_{H}(1,1)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) }, {𝐰H(1,1),𝐯H(1,2)}subscript𝐰𝐻11subscript𝐯𝐻12\left\{\mathbf{w}_{H}(1,1),\mathbf{v}_{H}(1,2)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) }, {𝐰H(1,2),𝐯H(1,1)}subscript𝐰𝐻12subscript𝐯𝐻11\left\{\mathbf{w}_{H}(1,2),\mathbf{v}_{H}(1,1)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) } and {𝐰H(1,2),𝐯H(1,2)}subscript𝐰𝐻12subscript𝐯𝐻12\left\{\mathbf{w}_{H}(1,2),\mathbf{v}_{H}(1,2)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) }. We set 𝐮{{0,0},{0,1},{1,0},{1,1}}max{log2(Nt),log2(Nr)}𝐮superscript00011011subscript2subscript𝑁𝑡subscript2subscript𝑁𝑟\mathbf{u}\in\left\{\left\{0,0\right\},\left\{0,1\right\},\left\{1,0\right\},% \left\{1,1\right\}\right\}^{\max\left\{\log_{2}(N_{t}),\log_{2}(N_{r})\right\}}bold_u ∈ { { 0 , 0 } , { 0 , 1 } , { 1 , 0 } , { 1 , 1 } } start_POSTSUPERSCRIPT roman_max { roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) , roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) } end_POSTSUPERSCRIPT as the tuple vector which describes the angle at BS and the angle at RIS. Then, we set 𝐮(1)={0,0}𝐮100\mathbf{u}(1)=\left\{0,0\right\}bold_u ( 1 ) = { 0 , 0 } if the received power of beam tuple {𝐰H(1,1),𝐯H(1,1)}subscript𝐰𝐻11subscript𝐯𝐻11\left\{\mathbf{w}_{H}(1,1),\mathbf{v}_{H}(1,1)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) } is the maximum, 𝐮(1)={0,1}𝐮101\mathbf{u}(1)=\left\{0,1\right\}bold_u ( 1 ) = { 0 , 1 } if the received power of beam tuple {𝐰H(1,1),𝐯H(1,2)}subscript𝐰𝐻11subscript𝐯𝐻12\left\{\mathbf{w}_{H}(1,1),\mathbf{v}_{H}(1,2)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) } is the maximum, 𝐮(1)={1,0}𝐮110\mathbf{u}(1)=\left\{1,0\right\}bold_u ( 1 ) = { 1 , 0 } if the received power of beam tuple {𝐰H(1,2),𝐯H(1,1)}subscript𝐰𝐻12subscript𝐯𝐻11\left\{\mathbf{w}_{H}(1,2),\mathbf{v}_{H}(1,1)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 1 ) } is the maximum and 𝐮(1)={1,1}𝐮111\mathbf{u}(1)=\left\{1,1\right\}bold_u ( 1 ) = { 1 , 1 } if the received power of beam tuple {𝐰H(1,2),𝐯H(1,2)}subscript𝐰𝐻12subscript𝐯𝐻12\left\{\mathbf{w}_{H}(1,2),\mathbf{v}_{H}(1,2)\right\}{ bold_w start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) , bold_v start_POSTSUBSCRIPT italic_H end_POSTSUBSCRIPT ( 1 , 2 ) } is the maximum. After transmitting the beam tuples in all layers, the BS can decide the angle at BS and the angle at RIS based on the tuple vector 𝐮𝐮\mathbf{u}bold_u. We take the first bit of each element in 𝐮𝐮\mathbf{u}bold_u as 𝐮tsubscript𝐮𝑡\mathbf{u}_{t}bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and the second bit of each element in 𝐮𝐮\mathbf{u}bold_u as 𝐮rsubscript𝐮𝑟\mathbf{u}_{r}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. The indices of the angle at BS and the angle at RIS can then be derived as bin2dec(𝐮t)bin2decsubscript𝐮𝑡\mathrm{bin2dec}(\mathbf{u}_{t})bin2dec ( bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and bin2dec(𝐮r)bin2decsubscript𝐮𝑟\mathrm{bin2dec}(\mathbf{u}_{r})bin2dec ( bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ), where bin2dec()bin2dec\mathrm{bin2dec}(\cdot)bin2dec ( ⋅ ) denotes the operation of transforming a binary number to a decimal number.

By searching the entire space layer by layer, we can exclude many incorrect angles without searching them in an exhaustive way and thus greatly improve the beam training efficiency. The overall beam training overhead is 4max{Lt,Lr}=4max{log2(Nt),log2(Nr)}4subscript𝐿𝑡subscript𝐿𝑟4subscript2subscript𝑁𝑡subscript2subscript𝑁𝑟4\max\left\{L_{t},L_{r}\right\}=4\max\left\{\log_{2}(N_{t}),\log_{2}(N_{r})\right\}4 roman_max { italic_L start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_L start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT } = 4 roman_max { roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) , roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) }, which is far less than NtNrsubscript𝑁𝑡subscript𝑁𝑟N_{t}N_{r}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. However, during the binary hierarchical beam training, we need to generate wider beams than those in exhaustive beam training frameworks, so the beam gains are much smaller than those of narrow beams. In addition, in RIS assisted communication systems, there exists multiplicative fading effect [18], which means that the equivalent path loss of the BS-RIS-UE link is the product of the path loss of BS-RIS link and the path loss of RIS-UE link. These two factors lead to a SNR at UE during beam training, and thus severely limit the beam training accuracy in RIS assisted communication systems.

III Coded Beam Training Framework in RIS Systems

To enhance the ability to realize accurate beam training under poor SNR conditions, we design a coded beam training framework for RIS assisted communication systems, which is inspired by the coded beam training framework for MIMO in [19]. By applying the idea of channel coding and adding redundant beam training pilots, the accidental error caused by random noise during the beam training can be corrected without feedback.

Different from the scenario considered in [19], in RIS assisted communication systems, we need to estimate the angles both at BS and at RIS, so the best beam tuple, rather than the best beam, needs to be determined. Specifically, for BS, there are Ntsubscript𝑁𝑡N_{t}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT candidate angles, and we need kt=log2(Nt)subscript𝑘𝑡subscript2subscript𝑁𝑡k_{t}=\log_{2}(N_{t})italic_k start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) information bits to determine the angle at BS. Similarly, RIS has Nrsubscript𝑁𝑟N_{r}italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT candidate angles, and we need kr=log2(Nr)subscript𝑘𝑟subscript2subscript𝑁𝑟k_{r}=\log_{2}(N_{r})italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) information bits to determine the angle at RIS. Similar to the hierarchical beam training framework in Section II-B, the information bits at BS and RIS are 𝐮tsubscript𝐮𝑡\mathbf{u}_{t}bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and 𝐮rsubscript𝐮𝑟\mathbf{u}_{r}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, respectively. To leverage the error correction capability of channel coding, we need to encode the effective information bits by map** the information bits 𝐮t{0,1}ktsubscript𝐮𝑡superscript01subscript𝑘𝑡\mathbf{u}_{t}\in\left\{0,1\right\}^{k_{t}}bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_k start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT and 𝐮r{0,1}krsubscript𝐮𝑟superscript01subscript𝑘𝑟\mathbf{u}_{r}\in\left\{0,1\right\}^{k_{r}}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT to codewords 𝐱t{0,1}ntsubscript𝐱𝑡superscript01subscript𝑛𝑡\mathbf{x}_{t}\in\left\{0,1\right\}^{n_{t}}bold_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT and 𝐱r{0,1}nrsubscript𝐱𝑟superscript01subscript𝑛𝑟\mathbf{x}_{r}\in\left\{0,1\right\}^{n_{r}}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT, where ktnt,krnrformulae-sequencesubscript𝑘𝑡subscript𝑛𝑡subscript𝑘𝑟subscript𝑛𝑟k_{t}\leq n_{t},k_{r}\leq n_{r}italic_k start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ≤ italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ≤ italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. We denote the encoding function at BS and RIS as ftsubscript𝑓𝑡f_{t}italic_f start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and frsubscript𝑓𝑟f_{r}italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. Then, we have 𝐱t=ft(𝐮t)subscript𝐱𝑡subscript𝑓𝑡subscript𝐮𝑡\mathbf{x}_{t}=f_{t}(\mathbf{u}_{t})bold_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_f start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and 𝐱r=fr(𝐮r)subscript𝐱𝑟subscript𝑓𝑟subscript𝐮𝑟\mathbf{x}_{r}=f_{r}(\mathbf{u}_{r})bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ).

After encoding the information bits, we need to build the connection between the codewords 𝐱tsubscript𝐱𝑡\mathbf{x}_{t}bold_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and 𝐱rsubscript𝐱𝑟\mathbf{x}_{r}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT and the beam pattern in space during beam training. We denote the candidate angle list at BS as 𝛀tNtsubscript𝛀𝑡superscriptsubscript𝑁𝑡\bm{\Omega}_{t}\in\mathbb{R}^{N_{t}}bold_Ω start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ∈ blackboard_R start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT, which can be expressed as

𝛀t(n)=sin1(Nt+1Nt+2nNt),n=1,2,,Nt,formulae-sequencesubscript𝛀𝑡𝑛superscript1subscript𝑁𝑡1subscript𝑁𝑡2𝑛subscript𝑁𝑡𝑛12subscript𝑁𝑡\bm{\Omega}_{t}(n)=\sin^{-1}\left(-\frac{N_{t}+1}{N_{t}}+\frac{2n}{N_{t}}% \right),n=1,2,\cdots,N_{t},bold_Ω start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_n ) = roman_sin start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( - divide start_ARG italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT + 1 end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_ARG + divide start_ARG 2 italic_n end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_ARG ) , italic_n = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , (7)

and the candidate angle list at RIS as 𝛀rNt×2subscript𝛀𝑟superscriptsubscript𝑁𝑡2\bm{\Omega}_{r}\in\mathbb{R}^{N_{t}\times 2}bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ blackboard_R start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT × 2 end_POSTSUPERSCRIPT, which can be expressed as

𝛀r(n,1)=sin1[(Nr1+1Nr1+2nNr1Nr1)/sin(𝛀r(n,2))]subscript𝛀𝑟𝑛1superscript1subscript𝑁subscript𝑟11subscript𝑁subscript𝑟12𝑛subscript𝑁subscript𝑟1subscript𝑁subscript𝑟1subscript𝛀𝑟𝑛2\displaystyle\bm{\Omega}_{r}(n,1)=\sin^{-1}\left[\left(-\frac{N_{r_{1}}+1}{N_{% r_{1}}}+\frac{2\lceil\frac{n}{N_{r_{1}}}\rceil}{N_{r_{1}}}\right)/\sin(\bm{% \Omega}_{r}(n,2))\right]bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_n , 1 ) = roman_sin start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT [ ( - divide start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT + 1 end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG + divide start_ARG 2 ⌈ divide start_ARG italic_n end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG ⌉ end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG ) / roman_sin ( bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_n , 2 ) ) ] (8)
𝛀r(n,2)=cos1(1Nr2Nr2+2mod(n,Nr2)Nr2)subscript𝛀𝑟𝑛2superscript11subscript𝑁subscript𝑟2subscript𝑁subscript𝑟22mod𝑛subscript𝑁subscript𝑟2subscript𝑁subscript𝑟2\displaystyle\bm{\Omega}_{r}(n,2)=\cos^{-1}\left(\frac{1-N_{r_{2}}}{N_{r_{2}}}% +\frac{2\mathrm{mod}\left(n,N_{r_{2}}\right)}{N_{r_{2}}}\right)bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_n , 2 ) = roman_cos start_POSTSUPERSCRIPT - 1 end_POSTSUPERSCRIPT ( divide start_ARG 1 - italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG + divide start_ARG 2 roman_m roman_o roman_d ( italic_n , italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_ARG )
n=1,2,,Nr,𝑛12subscript𝑁𝑟\displaystyle\hskip 170.71652ptn=1,2,\cdots,N_{r},italic_n = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ,

where 𝛀r(:,1)subscript𝛀𝑟:1\bm{\Omega}_{r}(:,1)bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( : , 1 ) denotes the azimuth angles and 𝛀r(:,2)subscript𝛀𝑟:2\bm{\Omega}_{r}(:,2)bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( : , 2 ) denotes the elevation angles. We denote the beam pattern at BS and at RIS as 𝒱t{0,1}nt×Ntsubscript𝒱𝑡superscript01subscript𝑛𝑡subscript𝑁𝑡\mathcal{V}_{t}\in\left\{0,1\right\}^{n_{t}\times N_{t}}caligraphic_V start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUPERSCRIPT and 𝒱r{0,1}nr×Nrsubscript𝒱𝑟superscript01subscript𝑛𝑟subscript𝑁𝑟\mathcal{V}_{r}\in\left\{0,1\right\}^{n_{r}\times N_{r}}caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT, which can be obtained by

𝒱t(:,i)=𝐱t(i),i=1,2,,Nt𝒱r(:,j)=𝐱r(j),j=1,2,,Nr,formulae-sequencesubscript𝒱𝑡:𝑖superscriptsubscript𝐱𝑡𝑖𝑖12subscript𝑁𝑡formulae-sequencesubscript𝒱𝑟:𝑗superscriptsubscript𝐱𝑟𝑗𝑗12subscript𝑁𝑟\begin{aligned} \mathcal{V}_{t}(:,i)=\mathbf{x}_{t}^{(i)},i=1,2,\cdots,N_{t}\\ \mathcal{V}_{r}(:,j)=\mathbf{x}_{r}^{(j)},j=1,2,\cdots,N_{r}\end{aligned},start_ROW start_CELL caligraphic_V start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( : , italic_i ) = bold_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT , italic_i = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( : , italic_j ) = bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT , italic_j = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW , (9)

where 𝐱t(i)=ft(𝐮t(i))superscriptsubscript𝐱𝑡𝑖subscript𝑓𝑡superscriptsubscript𝐮𝑡𝑖\mathbf{x}_{t}^{(i)}=f_{t}(\mathbf{u}_{t}^{(i)})bold_x start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_f start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ) and 𝐱r(j)=fr(𝐮r(j))superscriptsubscript𝐱𝑟𝑗subscript𝑓𝑟superscriptsubscript𝐮𝑟𝑗\mathbf{x}_{r}^{(j)}=f_{r}(\mathbf{u}_{r}^{(j)})bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT = italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT ). Here, 𝐮t(i)superscriptsubscript𝐮𝑡𝑖\mathbf{u}_{t}^{(i)}bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT and 𝐮r(j)superscriptsubscript𝐮𝑟𝑗\mathbf{u}_{r}^{(j)}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT denotes the information bits of different angle indices, which can be expressed as 𝐮t(i)=dec2bin(i,Nt)superscriptsubscript𝐮𝑡𝑖dec2bin𝑖subscript𝑁𝑡\mathbf{u}_{t}^{(i)}=\mathrm{dec2bin}(i,N_{t})bold_u start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = dec2bin ( italic_i , italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and 𝐮r(j)=dec2bin(j,Nr)superscriptsubscript𝐮𝑟𝑗dec2bin𝑗subscript𝑁𝑟\mathbf{u}_{r}^{(j)}=\mathrm{dec2bin}(j,N_{r})bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT = dec2bin ( italic_j , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ), where dec2bin(,κ)dec2bin𝜅\mathrm{dec2bin}(\cdot,\kappa)dec2bin ( ⋅ , italic_κ ) denotes the operation of transforming a decimal number to a binary number of κ𝜅\kappaitalic_κ bits.

Based on the beam pattern, the beam training codebook can be designed. We denote the beam training codebook at BS and at RIS as 𝒞tnt×Nt×2subscript𝒞𝑡superscriptsubscript𝑛𝑡subscript𝑁𝑡2\mathcal{C}_{t}\in\mathbb{C}^{n_{t}\times N_{t}\times 2}caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT × 2 end_POSTSUPERSCRIPT and 𝒞rnr×Nr×2subscript𝒞𝑟superscriptsubscript𝑛𝑟subscript𝑁𝑟2\mathcal{C}_{r}\in\mathbb{C}^{n_{r}\times N_{r}\times 2}caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × 2 end_POSTSUPERSCRIPT. Each layer has two codewords, and the beams generated by these two codewords should cover the entire space without overlap**. Specifically, for 𝒞tsubscript𝒞𝑡\mathcal{C}_{t}caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT, at the i𝑖iitalic_i-th layer, the first codeword 𝒞t(i,:,1)subscript𝒞𝑡𝑖:1\mathcal{C}_{t}(i,:,1)caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 1 ) should cover the angles 𝛀t(ϱ)subscript𝛀𝑡italic-ϱ\bm{\Omega}_{t}(\varrho)bold_Ω start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_ϱ ), where 𝒱t(i,ϱ)=1subscript𝒱𝑡𝑖italic-ϱ1\mathcal{V}_{t}(i,\varrho)=1caligraphic_V start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , italic_ϱ ) = 1. On the contrary, the second codeword 𝒞t(i,:,2)subscript𝒞𝑡𝑖:2\mathcal{C}_{t}(i,:,2)caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 2 ) should cover the angles 𝛀t(ϱ)subscript𝛀𝑡italic-ϱ\bm{\Omega}_{t}(\varrho)bold_Ω start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_ϱ ), where 𝒱t(i,ϱ)=0subscript𝒱𝑡𝑖italic-ϱ0\mathcal{V}_{t}(i,\varrho)=0caligraphic_V start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , italic_ϱ ) = 0. For 𝒞rsubscript𝒞𝑟\mathcal{C}_{r}caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, at the j𝑗jitalic_j-th layer, the first codeword 𝒞r(j,:,1)subscript𝒞𝑟𝑗:1\mathcal{C}_{r}(j,:,1)caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_j , : , 1 ) should cover the angles 𝛀r(ε,:)subscript𝛀𝑟𝜀:\bm{\Omega}_{r}(\varepsilon,:)bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_ε , : ), where 𝒱r(j,ε)=1subscript𝒱𝑟𝑗𝜀1\mathcal{V}_{r}(j,\varepsilon)=1caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_j , italic_ε ) = 1, while the second codeword 𝒞r(j,:,2)subscript𝒞𝑟𝑗:2\mathcal{C}_{r}(j,:,2)caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_j , : , 2 ) should cover the angles 𝛀r(ε)subscript𝛀𝑟𝜀\bm{\Omega}_{r}(\varepsilon)bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_ε ), where 𝒱r(j,ε)=0subscript𝒱𝑟𝑗𝜀0\mathcal{V}_{r}(j,\varepsilon)=0caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_j , italic_ε ) = 0.

After designing the beam training codebook, we can start the training process. Similar to the hierarchical beam training framework, at each layer (i.e., the i𝑖iitalic_i-th layer), BS and RIS sequentially transmits four beam tuples to UE, which can be listed as {𝒞t(i,:,1),𝒞r(i,:,1)}subscript𝒞𝑡𝑖:1subscript𝒞𝑟𝑖:1\left\{\mathcal{C}_{t}(i,:,1),\mathcal{C}_{r}(i,:,1)\right\}{ caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 1 ) , caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_i , : , 1 ) }, {𝒞t(i,:,1),𝒞r(i,:,2)}subscript𝒞𝑡𝑖:1subscript𝒞𝑟𝑖:2\left\{\mathcal{C}_{t}(i,:,1),\mathcal{C}_{r}(i,:,2)\right\}{ caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 1 ) , caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_i , : , 2 ) }, {𝒞t(i,:,2),𝒞r(i,:,1)}subscript𝒞𝑡𝑖:2subscript𝒞𝑟𝑖:1\left\{\mathcal{C}_{t}(i,:,2),\mathcal{C}_{r}(i,:,1)\right\}{ caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 2 ) , caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_i , : , 1 ) } and {𝒞t(i,:,2),𝒞r(i,:,2)}subscript𝒞𝑡𝑖:2subscript𝒞𝑟𝑖:2\left\{\mathcal{C}_{t}(i,:,2),\mathcal{C}_{r}(i,:,2)\right\}{ caligraphic_C start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( italic_i , : , 2 ) , caligraphic_C start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_i , : , 2 ) }. Based on the received power of these four beam tuples, we set the received tuple vector 𝐱^(i)={0,0}^𝐱𝑖00\hat{\mathbf{x}}(i)=\left\{0,0\right\}over^ start_ARG bold_x end_ARG ( italic_i ) = { 0 , 0 } if the received power of the first beam tuple is the maximum, 𝐱^(i)={0,1}^𝐱𝑖01\hat{\mathbf{x}}(i)=\left\{0,1\right\}over^ start_ARG bold_x end_ARG ( italic_i ) = { 0 , 1 } if the received power of the second beam tuple is the maximum, 𝐱^(i)={1,0}^𝐱𝑖10\hat{\mathbf{x}}(i)=\left\{1,0\right\}over^ start_ARG bold_x end_ARG ( italic_i ) = { 1 , 0 } if the received power of the third beam tuple is the maximum and 𝐱^(i)={1,1}^𝐱𝑖11\hat{\mathbf{x}}(i)=\left\{1,1\right\}over^ start_ARG bold_x end_ARG ( italic_i ) = { 1 , 1 } if the received power of the fourth beam tuple is the maximum. After transmitting all the beam training pilots, the received tuple vector is denoted as 𝐱^^𝐱\hat{\mathbf{x}}over^ start_ARG bold_x end_ARG. By seperating each tuple in 𝐱^^𝐱\hat{\mathbf{x}}over^ start_ARG bold_x end_ARG into two bits, the received codewords corresponding to BS and RIS can be denoted as 𝐱^tsubscript^𝐱𝑡\hat{\mathbf{x}}_{t}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and 𝐱^rsubscript^𝐱𝑟\hat{\mathbf{x}}_{r}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. Finally, the decoding function gtsubscript𝑔𝑡g_{t}italic_g start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and grsubscript𝑔𝑟g_{r}italic_g start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT can be applied to recover the original information bits by 𝐮^t=gt(𝐱^t)subscript^𝐮𝑡subscript𝑔𝑡subscript^𝐱𝑡\hat{\mathbf{u}}_{t}=g_{t}(\hat{\mathbf{x}}_{t})over^ start_ARG bold_u end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = italic_g start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ( over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and 𝐮^r=gr(𝐱^r)subscript^𝐮𝑟subscript𝑔𝑟subscript^𝐱𝑟\hat{\mathbf{u}}_{r}=g_{r}(\hat{\mathbf{x}}_{r})over^ start_ARG bold_u end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_g start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ). Since we introduce redundant bits through encoding, the error in 𝐱^^𝐱\hat{\mathbf{x}}over^ start_ARG bold_x end_ARG can be corrected, thus improving the beam training accuracy under poor SNR conditions.

IV Codeword Design for the Proposed Coded Beam Training Framework

The above framework endows the RIS system with the self-correction ability during beam training and will potentially improve the beam training accuracy. To fully unleash the performance of the proposed framework, the accurate beam shape design is essential.

For BS, the codeword design is straightforward [24] . We can generate the multi-mainlobe codeword with a weighted summation of several array response vectors as

𝒞=ϕi𝛀~tejψi𝐛(ϕi),𝒞subscriptsubscriptitalic-ϕ𝑖subscript~𝛀𝑡superscript𝑒𝑗subscript𝜓𝑖𝐛subscriptitalic-ϕ𝑖\mathcal{C}=\sum_{\phi_{i}\in\tilde{\bm{\Omega}}_{t}}e^{j\psi_{i}}\mathbf{b}(% \phi_{i}),caligraphic_C = ∑ start_POSTSUBSCRIPT italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∈ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_POSTSUBSCRIPT italic_e start_POSTSUPERSCRIPT italic_j italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUPERSCRIPT bold_b ( italic_ϕ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) , (10)

where 𝛀~tsubscript~𝛀𝑡\tilde{\bm{\Omega}}_{t}over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT denotes the set of angles that the codeword needs to cover, and the auxiliary phase off-set ψisubscript𝜓𝑖\psi_{i}italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT can help guarantee a high gain within the intended angle range, which can be elaborated as ψi=iπ(1+1Nt),i=1,2,,|𝛀~t|formulae-sequencesubscript𝜓𝑖𝑖𝜋11subscript𝑁𝑡𝑖12subscript~𝛀𝑡\psi_{i}=i\pi(-1+\frac{1}{N_{t}}),i=1,2,\cdots,\left|\tilde{\bm{\Omega}}_{t}\right|italic_ψ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = italic_i italic_π ( - 1 + divide start_ARG 1 end_ARG start_ARG italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_ARG ) , italic_i = 1 , 2 , ⋯ , | over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT |.

However, for RIS, to design a codeword that evenly covers a set of randomly distributed angles in space is not easy due to the constant modulus constraint of RIS elements. Therefore, in this section, we propose a relaxed Gerchberg-Saxton-based codeword design scheme and a dimension reduced encoder design scheme to approach the desired beam pattern at RIS from two aspects.

IV-A Proposed Relaxed Gerchberg-Saxton-based Codeword Design Scheme

As for the beam training problem, the amplitude of the designed codeword at different angles greatly affects the beam training accuracy, while the specific phase is not that important. This characteristic makes the codeword design problem similar to the phase retrieval problem in the field of digital holography imaging. Gerchberg-Saxton (GS) algorithm is widely used to solve phase retrieval problem [25, 26]. By iteratively imposing the two amplitude measurements in the object plane and diffraction pattern plane, the phase information of the image can be recovered. Following the idea of GS algorithm, authors in [20] studied a GS-based codeword design scheme at BS by applying the power normalization to one updating process to satisfy the power constraint of the codeword.

Refer to caption

(a)

Refer to caption

(b)

Figure 2: The designed beam shape when applying (a) GS-based codeword design scheme in [20]; (b) proposed relaxed GS-based codeword design scheme.

However, due to the constant modulus constraint at RIS, directly applying the codeword design scheme in [20] cannot yield an ideal beam shape and would possibly lead to some intrinsic errors even in high SNR scenarios. Specifically, as illustrated in Fig. 2, the red line represents the intended beam shape, the black line represents the generated beam shape, and the axis represents angles in space. We can see that due to the constant modulus constraint, the generated beam shape is not ideal and there exists oscillation. At angles out of the angle coverage range, we want the amplitude to be 00 (i.e., point A and point B), but the amplitude is actually larger than some angles within the angle coverage range (i.e., point C). As a consequence, when UE is located in point A or point B, the received power of this codeword is actually high even though it should be near 00. In this case, error chould happen even there is no noise in the system.

The root cause of this kind of error is that, the objective of the GS-based codeword design scheme in [20] is to minimize the difference between the intended beam shape and the generated beam shape, which can be formulated as

min𝐀H𝐯𝐬22\displaystyle\min\left\lVert\mathbf{A}^{H}\mathbf{v}-\mathbf{s}\right\rVert_{2% }^{2}roman_min ∥ bold_A start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT bold_v - bold_s ∥ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT (11)
s.t.𝐯(i)=ejϑi,i=1,2,,Nr,\displaystyle\mathrm{s.t.}\quad\mathbf{v}(i)=e^{j\vartheta_{i}},i=1,2,\cdots,N% _{r},roman_s . roman_t . bold_v ( italic_i ) = italic_e start_POSTSUPERSCRIPT italic_j italic_ϑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUPERSCRIPT , italic_i = 1 , 2 , ⋯ , italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ,

where 𝐀Nr×Nr𝐀superscriptsubscript𝑁𝑟subscript𝑁𝑟\mathbf{A}\in\mathbb{C}^{N_{r}\times N_{r}}bold_A ∈ blackboard_C start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT denotes the array response vectors at different angles, 𝐯Nr×1𝐯superscriptsubscript𝑁𝑟1\mathbf{v}\in\mathbb{C}^{N_{r}\times 1}bold_v ∈ blackboard_C start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × 1 end_POSTSUPERSCRIPT denotes the designed codeword, and 𝐬Nr×1𝐬superscriptsubscript𝑁𝑟1\mathbf{s}\in\mathbb{C}^{N_{r}\times 1}bold_s ∈ blackboard_C start_POSTSUPERSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × 1 end_POSTSUPERSCRIPT denotes the intended beam shape. Such an objective is reasonable in the realm of codeword design, but is not suitable for beam training. For beam training, the top priority is to distinguish between the angles within the angle coverage range and the angles out of the angle coverage range. To solve this problem. we propose a relaxed GS-based codeword design scheme. By relaxing the requirements of approaching the ideal beam pattern, we may not get the most similar beam shape, but we can distinguish the angles within the angle coverage range and the angles out of the angle coverage range more clearly. The procedure of the proposed relaxed GS-based codeword design scheme is elaborated in Algorithm 1.

Algorithm 1 Proposed relaxed GS-based codeword design scheme
0:  𝛀~rsubscript~𝛀𝑟\tilde{\bm{\Omega}}_{r}over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT, 𝐀𝐀\mathbf{A}bold_A, Kitersubscript𝐾iterK_{\mathrm{iter}}italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT, ΔΔ\Deltaroman_Δ
0:  Designed codeword 𝐯𝐯\mathbf{v}bold_v
1:  Initialize the intended beam shape 𝐬𝐬\mathbf{s}bold_s by (14)
2:  Obtain the initial designed codeword 𝐯^(1)subscript^𝐯1\hat{\mathbf{v}}_{(1)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( 1 ) end_POSTSUBSCRIPT by 𝐯^(1)=1Nrej(𝐀𝐬(0))subscript^𝐯11subscript𝑁𝑟superscript𝑒𝑗superscript𝐀subscript𝐬0\hat{\mathbf{v}}_{(1)}=\frac{1}{\sqrt{N_{r}}}e^{j\angle\left(\mathbf{A}^{% \dagger}\mathbf{s}_{(0)}\right)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( 1 ) end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG square-root start_ARG italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG end_ARG italic_e start_POSTSUPERSCRIPT italic_j ∠ ( bold_A start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT bold_s start_POSTSUBSCRIPT ( 0 ) end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT
3:  for k=1𝑘1k=1italic_k = 1 to Kitersubscript𝐾iterK_{\mathrm{iter}}italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT do
4:     Update 𝐬(k)subscript𝐬𝑘\mathbf{s}_{(k)}bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT by (15)
5:     Update ΥΥ\Upsilonroman_Υ by (16)
6:     Update 𝐬^(k)subscript^𝐬𝑘\hat{\mathbf{s}}_{(k)}over^ start_ARG bold_s end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT by (17)
7:     Update 𝐯^(k+1)subscript^𝐯𝑘1\hat{\mathbf{v}}_{(k+1)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_k + 1 ) end_POSTSUBSCRIPT by (18)
8:  end for
9:  Obtain the designed codeword 𝐯𝐯\mathbf{v}bold_v by 𝐯=𝐯^(Kiter+1)𝐯subscript^𝐯subscript𝐾iter1\mathbf{v}=\hat{\mathbf{v}}_{(K_{\mathrm{iter}}+1)}bold_v = over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT + 1 ) end_POSTSUBSCRIPT

Here, 𝛀~rsubscript~𝛀𝑟\tilde{\bm{\Omega}}_{r}over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT denotes the angle coverage range of the intended beam shape, which is obtained based on 𝒱rsubscript𝒱𝑟\mathcal{V}_{r}caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. Matrix 𝐀𝐀\mathbf{A}bold_A transforms the codeword to the beam shape at the entire space, which can be expressed as

𝐀(:,n)=𝐚(𝛀r(n,1),𝛀r(n,2)).𝐀:𝑛𝐚subscript𝛀𝑟𝑛1subscript𝛀𝑟𝑛2\mathbf{A}(:,n)=\mathbf{a}\left(\bm{\Omega}_{r}(n,1),\bm{\Omega}_{r}(n,2)% \right).bold_A ( : , italic_n ) = bold_a ( bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_n , 1 ) , bold_Ω start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( italic_n , 2 ) ) . (12)

We denote the intended beam shape as

𝐬=[s(ϕ1,θ1),,s(ϕ1,θNr2),,s(ϕNr1,θNr2)],𝐬𝑠subscriptitalic-ϕ1subscript𝜃1𝑠subscriptitalic-ϕ1subscript𝜃subscript𝑁subscript𝑟2𝑠subscriptitalic-ϕsubscript𝑁subscript𝑟1subscript𝜃subscript𝑁subscript𝑟2\mathbf{s}=\left[s(\phi_{1},\theta_{1}),\cdots,s(\phi_{1},\theta_{N_{r_{2}}}),% \cdots,s(\phi_{N_{r_{1}}},\theta_{N_{r_{2}}})\right],bold_s = [ italic_s ( italic_ϕ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_θ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) , ⋯ , italic_s ( italic_ϕ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_θ start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) , ⋯ , italic_s ( italic_ϕ start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_θ start_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) ] , (13)

where s(ϕ,θ)=|s(ϕ,θ)|ejφ(ϕ,θ)𝑠italic-ϕ𝜃𝑠italic-ϕ𝜃superscript𝑒𝑗𝜑italic-ϕ𝜃s(\phi,\theta)=\left|s(\phi,\theta)\right|e^{j\varphi(\phi,\theta)}italic_s ( italic_ϕ , italic_θ ) = | italic_s ( italic_ϕ , italic_θ ) | italic_e start_POSTSUPERSCRIPT italic_j italic_φ ( italic_ϕ , italic_θ ) end_POSTSUPERSCRIPT with |s(ϕ,θ)|𝑠italic-ϕ𝜃\left|s(\phi,\theta)\right|| italic_s ( italic_ϕ , italic_θ ) | being the intended amplitude and φ(ϕ,θ)𝜑italic-ϕ𝜃\varphi(\phi,\theta)italic_φ ( italic_ϕ , italic_θ ) being the phase information. We hope angles within the angle coverage range can receive signals and angles out of the angle coverage range cannot receive signals, so the intended amplitude |s(ϕ,θ)|𝑠italic-ϕ𝜃\left|s(\phi,\theta)\right|| italic_s ( italic_ϕ , italic_θ ) | should be

|s(ϕ,θ)|={𝒫(ϕ,θ)𝛀~r0(ϕ,θ)𝛀~r,\left|s(\phi,\theta)\right|=\left\{\begin{aligned} \mathcal{P}&&\left(\phi,% \theta\right)\in\tilde{\bm{\Omega}}_{r}\\ 0&&\left(\phi,\theta\right)\notin\tilde{\bm{\Omega}}_{r}\end{aligned},\right.| italic_s ( italic_ϕ , italic_θ ) | = { start_ROW start_CELL caligraphic_P end_CELL start_CELL end_CELL start_CELL ( italic_ϕ , italic_θ ) ∈ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL end_CELL start_CELL ( italic_ϕ , italic_θ ) ∉ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW , (14)

where 𝒫𝒫\mathcal{P}caligraphic_P is the constant decided by the codeword power. At the beginning of the iteration, we initialize the intended beam shape 𝐬(0)subscript𝐬0\mathbf{s}_{(0)}bold_s start_POSTSUBSCRIPT ( 0 ) end_POSTSUBSCRIPT by (13), where the amplitude is generate by (14) and the phase information φ(ϕ,θ)𝜑italic-ϕ𝜃\varphi(\phi,\theta)italic_φ ( italic_ϕ , italic_θ ) is generated randomly. Based on 𝐬(0)subscript𝐬0\mathbf{s}_{(0)}bold_s start_POSTSUBSCRIPT ( 0 ) end_POSTSUBSCRIPT, we initialize the designed codeword 𝐯^(1)subscript^𝐯1\hat{\mathbf{v}}_{(1)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( 1 ) end_POSTSUBSCRIPT as 𝐯^(1)=1Nrej(𝐀𝐬(0))subscript^𝐯11subscript𝑁𝑟superscript𝑒𝑗superscript𝐀subscript𝐬0\hat{\mathbf{v}}_{(1)}=\frac{1}{\sqrt{N_{r}}}e^{j\angle\left(\mathbf{A}^{% \dagger}\mathbf{s}_{(0)}\right)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( 1 ) end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG square-root start_ARG italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG end_ARG italic_e start_POSTSUPERSCRIPT italic_j ∠ ( bold_A start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT bold_s start_POSTSUBSCRIPT ( 0 ) end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT, where ()\angle(\cdot)∠ ( ⋅ ) denotes the phase operator.

In the k𝑘kitalic_k-th round of iteration, we first calculate the beam shape realized by the designed codeword 𝐯^(k)subscript^𝐯𝑘\hat{\mathbf{v}}_{(k)}over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT as

𝐬(k)=𝐀H𝐯^(k).subscript𝐬𝑘superscript𝐀𝐻subscript^𝐯𝑘\mathbf{s}_{(k)}=\mathbf{A}^{H}\hat{\mathbf{v}}_{(k)}.bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT = bold_A start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT . (15)

Then, different from the scheme in [20], where the intended amplitude |s(ϕ,θ)|𝑠italic-ϕ𝜃\left|s(\phi,\theta)\right|| italic_s ( italic_ϕ , italic_θ ) | is directly assigned to 𝐬(k)subscript𝐬𝑘\mathbf{s}_{(k)}bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT, we divide the points in 𝐬(k)subscript𝐬𝑘\mathbf{s}_{(k)}bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT into two categories. For the first category, the corresponding amplitude can distinguish the angles within the angle coverage range from the angles out of the angle coverage range. The set of the points in the first category can be expressed as

Υ=Υabsent\displaystyle\Upsilon=roman_Υ = {(ϕ,θ)((ϕ,θ)𝛀~r&&𝐬(k)(ϕ,θ)𝒫(1Δ))\displaystyle\left\{(\phi,\theta)\mid\left((\phi,\theta)\in\tilde{\bm{\Omega}}% _{r}\>\&\&\>\mathbf{s}_{(k)}(\phi,\theta)\geq\mathcal{P}(1-\Delta)\right)\right.{ ( italic_ϕ , italic_θ ) ∣ ( ( italic_ϕ , italic_θ ) ∈ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT & & bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) ≥ caligraphic_P ( 1 - roman_Δ ) ) (16)
||((ϕ,θ)𝛀~r&&𝐬(k)(ϕ,θ)𝒫Δ)},\displaystyle\hskip 42.67912pt\left.||\left((\phi,\theta)\notin\tilde{\bm{% \Omega}}_{r}\>\&\&\>\mathbf{s}_{(k)}(\phi,\theta)\leq\mathcal{P}\Delta\right)% \right\},| | ( ( italic_ϕ , italic_θ ) ∉ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT & & bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) ≤ caligraphic_P roman_Δ ) } ,

where Δ[0,0.5]Δ00.5\Delta\in\left[0,0.5\right]roman_Δ ∈ [ 0 , 0.5 ] is the dividing factor. For points in the first category, the amplitudes in this round have already revealed the difference between angles within the angle coverage range and angles out of the angle coverage range, so we relax the requirements on them by not assigning the exact amplitude in 𝐬𝐬\mathbf{s}bold_s to them. On the contrary, for the second category, where (ϕ,θ)Υitalic-ϕ𝜃Υ(\phi,\theta)\notin\Upsilon( italic_ϕ , italic_θ ) ∉ roman_Υ, we assign new amplitude to them, so 𝐬^(k)subscript^𝐬𝑘\hat{\mathbf{s}}_{(k)}over^ start_ARG bold_s end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT can be expressed as

𝐬^(k)(ϕ,θ)=subscript^𝐬𝑘italic-ϕ𝜃absent\displaystyle\hat{\mathbf{s}}_{(k)}(\phi,\theta)=over^ start_ARG bold_s end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) = (17)
{𝐬(k)(ϕ,θ)(ϕ,θ)Υ𝒫(1Δ)ej(𝐬(k)(ϕ,θ))(ϕ,θ)Υ&&(ϕ,θ)𝛀~r𝒫Δej(𝐬(k)(ϕ,θ))(ϕ,θ)Υ&&(ϕ,θ)𝛀~r\displaystyle\left\{\begin{aligned} &\mathbf{s}_{(k)}(\phi,\theta)&&(\phi,% \theta)\in\Upsilon\\ &\mathcal{P}(1-\Delta)e^{j\angle(\mathbf{s}_{(k)}(\phi,\theta))}&&(\phi,\theta% )\notin\Upsilon\>\&\&\>(\phi,\theta)\in\tilde{\bm{\Omega}}_{r}\\ &\mathcal{P}\Delta e^{j\angle(\mathbf{s}_{(k)}(\phi,\theta))}&&(\phi,\theta)% \notin\Upsilon\>\&\&\>(\phi,\theta)\notin\tilde{\bm{\Omega}}_{r}\end{aligned}\right.{ start_ROW start_CELL end_CELL start_CELL bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) end_CELL start_CELL end_CELL start_CELL ( italic_ϕ , italic_θ ) ∈ roman_Υ end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL caligraphic_P ( 1 - roman_Δ ) italic_e start_POSTSUPERSCRIPT italic_j ∠ ( bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) ) end_POSTSUPERSCRIPT end_CELL start_CELL end_CELL start_CELL ( italic_ϕ , italic_θ ) ∉ roman_Υ & & ( italic_ϕ , italic_θ ) ∈ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL caligraphic_P roman_Δ italic_e start_POSTSUPERSCRIPT italic_j ∠ ( bold_s start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ( italic_ϕ , italic_θ ) ) end_POSTSUPERSCRIPT end_CELL start_CELL end_CELL start_CELL ( italic_ϕ , italic_θ ) ∉ roman_Υ & & ( italic_ϕ , italic_θ ) ∉ over~ start_ARG bold_Ω end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_CELL end_ROW

Based on 𝐬^(k)subscript^𝐬𝑘\hat{\mathbf{s}}_{(k)}over^ start_ARG bold_s end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT, the designed codeword for the next round of iteration can be obtained by

𝐯^(k+1)=1Nrej(𝐀𝐬^(k)).subscript^𝐯𝑘11subscript𝑁𝑟superscript𝑒𝑗superscript𝐀subscript^𝐬𝑘\hat{\mathbf{v}}_{(k+1)}=\frac{1}{\sqrt{N_{r}}}e^{j\angle\left(\mathbf{A}^{% \dagger}\hat{\mathbf{s}}_{(k)}\right)}.over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_k + 1 ) end_POSTSUBSCRIPT = divide start_ARG 1 end_ARG start_ARG square-root start_ARG italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_ARG end_ARG italic_e start_POSTSUPERSCRIPT italic_j ∠ ( bold_A start_POSTSUPERSCRIPT † end_POSTSUPERSCRIPT over^ start_ARG bold_s end_ARG start_POSTSUBSCRIPT ( italic_k ) end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT . (18)

After Kitersubscript𝐾iterK_{\mathrm{iter}}italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT rounds of iteration, the designed codeword 𝐯𝐯\mathbf{v}bold_v can finally be obtained as 𝐯=𝐯^(Kiter+1)𝐯subscript^𝐯subscript𝐾iter1\mathbf{v}=\hat{\mathbf{v}}_{(K_{\mathrm{iter}}+1)}bold_v = over^ start_ARG bold_v end_ARG start_POSTSUBSCRIPT ( italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT + 1 ) end_POSTSUBSCRIPT.

With the proposed relaxed GS-based codeword design scheme, we can generate beam shape like Fig. 2, where the angles within the angle coverage range and the angles out of the angle coverage range can be clearly distinguished.

IV-B Proposed Dimension Reduced Encoder Design Scheme

[Uncaptioned image]
Refer to caption
Figure 3: The orthogonality of 𝐀𝐀\mathbf{A}bold_A when the size of RIS is (a) 64×164164\times 164 × 1; (b) 8×8888\times 88 × 8.

(a)            (b)

The above scheme works well for RIS with ULA, but for a RIS with UPA, the generated beam shape is still highly non-ideal. This is because the orthogonality of 𝐀𝐀\mathbf{A}bold_A in the two dimensional case is bad. As illustrated in Fig. 3, for the case where RIS is equipped with a 64×164164\times 164 × 1 ULA, the orthogonality of 𝐀𝐀\mathbf{A}bold_A is good, while for case were RIS is equipped with a 8×8888\times 88 × 8 UPA, the orthogonality of 𝐀𝐀\mathbf{A}bold_A is bad. Given the fact that RIS usually possesses a UPA structure to guarantee enough reflection area, how to generate good beam shape for a RIS with UPA is crucial to ensure a high beam training accuracy. Since the above scheme works well for RIS with ULA, can we decouple the 2D beam shape design problem into two 1D beam shape design problems? To enable this decoupling, the intended beam shape in space should be independent in the two dimensions. As discussed in Section III, the intended beam shape is determined by the encoding function fr()subscript𝑓𝑟f_{r}(\cdot)italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( ⋅ ). Therefore, we propose a dimension reduced encoder design scheme to decouple the 2D beam shape design problem into two 1D beam shape design problem so as to improve the beam training accuracy.

Refer to caption
Figure 4: Beam pattern generated by a random 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT.

We choose the Hamming code as the coding scheme for our proposed coded beam training framework because of the high degree of freedom of Hamming code regarding the encoder design. Specifically, a (nr,kr)subscript𝑛𝑟subscript𝑘𝑟(n_{r},k_{r})( italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT , italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) Hamming code can encode a krsubscript𝑘𝑟k_{r}italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT-bit bitstream 𝐮r(i)superscriptsubscript𝐮𝑟𝑖\mathbf{u}_{r}^{(i)}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT into a nrsubscript𝑛𝑟n_{r}italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT-bit codeword 𝐱r(i)superscriptsubscript𝐱𝑟𝑖\mathbf{x}_{r}^{(i)}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT with a generator matrix 𝐆Ham{0,1}kr×nrsubscript𝐆Hamsuperscript01subscript𝑘𝑟subscript𝑛𝑟\mathbf{G}_{\mathrm{Ham}}\in\left\{0,1\right\}^{k_{r}\times n_{r}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUPERSCRIPT by 𝐱r(i)=fr(𝐮r(i))=𝐮r(i)𝐆Hamsuperscriptsubscript𝐱𝑟𝑖subscript𝑓𝑟superscriptsubscript𝐮𝑟𝑖superscriptsubscript𝐮𝑟𝑖subscript𝐆Ham\mathbf{x}_{r}^{(i)}=f_{r}(\mathbf{u}_{r}^{(i)})=\mathbf{u}_{r}^{(i)}\mathbf{G% }_{\mathrm{Ham}}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = italic_f start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT ) = bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT. The generator matrix 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT has the structure

𝐆Ham=[𝐈kr𝐐],subscript𝐆Hammatrixsubscript𝐈subscript𝑘𝑟𝐐\mathbf{G}_{\mathrm{Ham}}=\begin{bmatrix}\mathbf{I}_{k_{r}}&\mathbf{Q}\end{% bmatrix},bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT = [ start_ARG start_ROW start_CELL bold_I start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL start_CELL bold_Q end_CELL end_ROW end_ARG ] , (19)

where 𝐈krsubscript𝐈subscript𝑘𝑟\mathbf{I}_{k_{r}}bold_I start_POSTSUBSCRIPT italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT end_POSTSUBSCRIPT denotes the kr×krsubscript𝑘𝑟subscript𝑘𝑟k_{r}\times k_{r}italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT identical matrix. Submatrix 𝐐{0,1}kr×(nrkr)𝐐superscript01subscript𝑘𝑟subscript𝑛𝑟subscript𝑘𝑟\mathbf{Q}\in\left\{0,1\right\}^{k_{r}\times(n_{r}-k_{r})}bold_Q ∈ { 0 , 1 } start_POSTSUPERSCRIPT italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT × ( italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT - italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) end_POSTSUPERSCRIPT is designed artificially. To guarantee the error correction ability, each row of 𝐐𝐐\mathbf{Q}bold_Q should contain at least two “1”. We consider a 8×8888\times 88 × 8 RIS, the necessary number of information bits kr=log2(8×8)=6subscript𝑘𝑟subscript2886k_{r}=\log_{2}(8\times 8)=6italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( 8 × 8 ) = 6. The codeword length nrsubscript𝑛𝑟n_{r}italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT should thus be at least nr=10subscript𝑛𝑟10n_{r}=10italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = 10 [27]. We first randomly generate 𝐐𝐐\mathbf{Q}bold_Q as

𝐐=[111000100110010101001011]T.𝐐superscriptmatrix111000100110010101001011𝑇\mathbf{Q}=\begin{bmatrix}1&1&1&0&0&0\\ 1&0&0&1&1&0\\ 0&1&0&1&0&1\\ 0&0&1&0&1&1\end{bmatrix}^{T}.bold_Q = [ start_ARG start_ROW start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL end_ROW end_ARG ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT . (20)

Then, the nrsubscript𝑛𝑟n_{r}italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT beam patterns 𝒱rsubscript𝒱𝑟\mathcal{V}_{r}caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT are depicted in Fig. 4. The first 6 beam patterns are the same as those in hierarchical beam training frameworks. For these beam patterns, the two dimension (i.e., ϕitalic-ϕ\phiitalic_ϕ and θ𝜃\thetaitalic_θ) can be decoupled. For example, to generate beam pattern 𝒱r(1,:)subscript𝒱𝑟1:\mathcal{V}_{r}(1,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 1 , : ), we can design a 1D beam 𝐯ϕ8×1subscript𝐯italic-ϕsuperscript81\mathbf{v}_{\phi}\in\mathbb{C}^{8\times 1}bold_v start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT 8 × 1 end_POSTSUPERSCRIPT that covers ϕ[0,π]italic-ϕ0𝜋\phi\in\left[0,\pi\right]italic_ϕ ∈ [ 0 , italic_π ] and a 1D beam 𝐯θ8×1subscript𝐯𝜃superscript81\mathbf{v}_{\theta}\in\mathbb{C}^{8\times 1}bold_v start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT ∈ blackboard_C start_POSTSUPERSCRIPT 8 × 1 end_POSTSUPERSCRIPT that covers θ[π,π]𝜃𝜋𝜋\theta\in\left[-\pi,\pi\right]italic_θ ∈ [ - italic_π , italic_π ]. The 2D beam can be realized by codeword 𝐯=𝐯ϕ𝐯θ𝐯tensor-productsubscript𝐯italic-ϕsubscript𝐯𝜃\mathbf{v}=\mathbf{v}_{\phi}\otimes\mathbf{v}_{\theta}bold_v = bold_v start_POSTSUBSCRIPT italic_ϕ end_POSTSUBSCRIPT ⊗ bold_v start_POSTSUBSCRIPT italic_θ end_POSTSUBSCRIPT. However, for the last 4 beam patterns (the redundant beam patterns for error correction), only the 7thsuperscript7th7^{\mathrm{th}}7 start_POSTSUPERSCRIPT roman_th end_POSTSUPERSCRIPT beam pattern can be decoupled into two 1D beams, and the other 3 beam patterns cannot be decoupled since the ϕitalic-ϕ\phiitalic_ϕ-axis and the θ𝜃\thetaitalic_θ-axis are interwoven with each other.

What leads to this interweave? Since the first 6 columns of 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT is an identical matrix, we can actually view the first 6 beam patterns as the basis patterns. Therefore, for the 7thsuperscript7th7^{\mathrm{th}}7 start_POSTSUPERSCRIPT roman_th end_POSTSUPERSCRIPT beam pattern, according to the first column of 𝐐𝐐\mathbf{Q}bold_Q, it is obtained by adding up the first three basis (i.e., [𝒱r(1,:)+𝒱r(2,:)+𝒱r(3,:)]2subscriptdelimited-[]subscript𝒱𝑟1:subscript𝒱𝑟2:subscript𝒱𝑟3:2\left[\mathcal{V}_{r}(1,:)+\mathcal{V}_{r}(2,:)+\mathcal{V}_{r}(3,:)\right]_{2}[ caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 1 , : ) + caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 2 , : ) + caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 3 , : ) ] start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT), where []2subscriptdelimited-[]2\left[\cdot\right]_{2}[ ⋅ ] start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT denotes the modmod\mathrm{mod}roman_mod-2 arithmetic. Since the first three beam patterns are all consistent at θ𝜃\thetaitalic_θ-axis and varying at ϕitalic-ϕ\phiitalic_ϕ-axis, so the beam pattern 𝒱r(7,:)subscript𝒱𝑟7:\mathcal{V}_{r}(7,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 7 , : ) can still be decoupled. However, for the 8thsuperscript8th8^{\mathrm{th}}8 start_POSTSUPERSCRIPT roman_th end_POSTSUPERSCRIPT beam pattern, it is obtained by [𝒱r(1,:)+𝒱r(4,:)+𝒱r(5,:)]2subscriptdelimited-[]subscript𝒱𝑟1:subscript𝒱𝑟4:subscript𝒱𝑟5:2\left[\mathcal{V}_{r}(1,:)+\mathcal{V}_{r}(4,:)+\mathcal{V}_{r}(5,:)\right]_{2}[ caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 1 , : ) + caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 4 , : ) + caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 5 , : ) ] start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT. Since 𝒱r(4,:)subscript𝒱𝑟4:\mathcal{V}_{r}(4,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 4 , : ) and 𝒱r(5,:)subscript𝒱𝑟5:\mathcal{V}_{r}(5,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 5 , : ) are consistent at ϕitalic-ϕ\phiitalic_ϕ-axis and varying at θ𝜃\thetaitalic_θ-axis, they will interweave with 𝒱r(1,:)subscript𝒱𝑟1:\mathcal{V}_{r}(1,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 1 , : ) and make 𝒱r(8,:)subscript𝒱𝑟8:\mathcal{V}_{r}(8,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 8 , : ) unable to be decoupled. Similarly, 𝒱r(9,:)subscript𝒱𝑟9:\mathcal{V}_{r}(9,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 9 , : ) and 𝒱r(10,:)subscript𝒱𝑟10:\mathcal{V}_{r}(10,:)caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ( 10 , : ) are also unable to be decoupled.

The above analysis inspires us that if we need to decouple the redundant beam patterns, we need to design the matrix 𝐐𝐐\mathbf{Q}bold_Q so that only the basis with the same consistency is added together. For the simplicity of description, beam patterns that are consistent at θ𝜃\thetaitalic_θ-axis and varying at ϕitalic-ϕ\phiitalic_ϕ-axis are defined as Type I pattern, while beam patterns that are consistent at ϕitalic-ϕ\phiitalic_ϕ-axis and varying at θ𝜃\thetaitalic_θ-axis are defined as Type II pattern. To guarantee the error correction ability, we have the following Lemma 1.

Lemma 1.

To guarantee the error correction ability at RIS, the number of RIS elements at each dimension should be strictly larger than 4444 and the number of redundant beam patterns for each dimension should be at least 3333.

Proof.

For a block code such as Hamming code, the error correction ability is related to its minimum hamming distance dminsubscript𝑑mind_{\mathrm{min}}italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT, which is equal to the minimum Hamming weight of its nonzero codewords [27]. In order to correct t𝑡titalic_t bits errors, dminsubscript𝑑mind_{\mathrm{min}}italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT should satisfy dmin2t+1subscript𝑑min2𝑡1d_{\mathrm{min}}\geq 2t+1italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT ≥ 2 italic_t + 1. In our framework, we hope the Hamming code can correct 1111 bit error, so dmin3subscript𝑑min3d_{\mathrm{min}}\geq 3italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT ≥ 3. As a result, for each row in 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT, we should have at least three “1”, which means each row of 𝐐𝐐\mathbf{Q}bold_Q should have at least two “1”. As discussed in Section IV-B, the two types of beam patterns cannot co-exist in the same column of 𝐐𝐐\mathbf{Q}bold_Q, so 𝐐𝐐\mathbf{Q}bold_Q can be written as a block matrix as

𝐐=[𝐐I𝟎𝟎𝐐II],𝐐matrixsubscript𝐐I00subscript𝐐II\mathbf{Q}=\begin{bmatrix}\mathbf{Q}_{\mathrm{I}}&\mathbf{0}\\ \mathbf{0}&\mathbf{Q}_{\mathrm{II}}\end{bmatrix},bold_Q = [ start_ARG start_ROW start_CELL bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL end_ROW start_ROW start_CELL bold_0 end_CELL start_CELL bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] , (21)

where 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT and 𝐐IIsubscript𝐐II\mathbf{Q}_{\mathrm{II}}bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT denote the submatrix related to Type I pattern and Type II pattern, respectively. Therefore, 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT and 𝐐IIsubscript𝐐II\mathbf{Q}_{\mathrm{II}}bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT should both have at least two “1”. Since Type I pattern and Type II pattern are homogeneous, we will only discuss Type I pattern and 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT in the following discussion.

If Nr14subscript𝑁subscript𝑟14N_{r_{1}}\leq 4italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ≤ 4, 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT has at most two rows. To avoid repeated beam pattern, 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT would only be [11]Tsuperscript11𝑇\left[1\quad 1\right]^{T}[ 1 1 ] start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT. In this case, the Hamming weights of first two rows of 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT are only 2222, which means dmin=2subscript𝑑min2d_{\mathrm{min}}=2italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT = 2, and the Hamming code can no longer correct 1 bit error. As a result, the number of RIS elements at each dimension should be strictly larger than 4444.

Next, we need to prove that the number of columns in 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT should be at least 3333. If 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT only has two columns, in order for dmin3subscript𝑑min3d_{\mathrm{min}}\geq 3italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT ≥ 3, all columns in 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT should be “1”. In this case, if we calculate the difference of these two rows in 𝐆Hamsubscript𝐆Ham\mathbf{G}_{\mathrm{Ham}}bold_G start_POSTSUBSCRIPT roman_Ham end_POSTSUBSCRIPT, we can get a codeword with Hamming weight dmin=2subscript𝑑min2d_{\mathrm{min}}=2italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT = 2. As a result, the number of columns in 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT should be at least 3333. Similarly, the number of columns in 𝐐IIsubscript𝐐II\mathbf{Q}_{\mathrm{II}}bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT should also be at least 3333, which completes the proof. ∎

Based on the above analyses, we now introduce the steps of the proposed dimension reduced encoder design scheme. Since RIS is equipped with Nr=Nr1×Nr2subscript𝑁𝑟subscript𝑁subscript𝑟1subscript𝑁subscript𝑟2N_{r}=N_{r_{1}}\times N_{r_{2}}italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT antenna elements, we have log2(Nr1)subscript2subscript𝑁subscript𝑟1\log_{2}(N_{r_{1}})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) Type I patterns and log2(Nr2)subscript2subscript𝑁subscript𝑟2\log_{2}(N_{r_{2}})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) Type II patterns. We denote the number of redundant beam patterns for Type I patterns and Type II patterns as mr1subscript𝑚subscript𝑟1m_{r_{1}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT and mr2subscript𝑚subscript𝑟2m_{r_{2}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT respectively, then they should satisfy

{mr1=max{3,mr1,int}mr2=max{3,mr2,int},\left\{\begin{aligned} m_{r_{1}}=\max\left\{3,m_{r_{1},\mathrm{int}}\right\}\\ m_{r_{2}}=\max\left\{3,m_{r_{2},\mathrm{int}}\right\}\end{aligned}\right.,{ start_ROW start_CELL italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = roman_max { 3 , italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT } end_CELL end_ROW start_ROW start_CELL italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = roman_max { 3 , italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT } end_CELL end_ROW , (22)

where mr1,intsubscript𝑚subscript𝑟1intm_{r_{1},\mathrm{int}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT denotes the minimum integer that satisfies 2mr1,intmr1,int1log2(Nr1)superscript2subscript𝑚subscript𝑟1intsubscript𝑚subscript𝑟1int1subscript2subscript𝑁subscript𝑟12^{m_{r_{1},\mathrm{int}}}-m_{r_{1},\mathrm{int}}-1\geq\log_{2}(N_{r_{1}})2 start_POSTSUPERSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT end_POSTSUPERSCRIPT - italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT - 1 ≥ roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) and mr2,intsubscript𝑚subscript𝑟2intm_{r_{2},\mathrm{int}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT denotes the minimum integer that satisfies 2mr2,intmr2,int1log2(Nr2)superscript2subscript𝑚subscript𝑟2intsubscript𝑚subscript𝑟2int1subscript2subscript𝑁subscript𝑟22^{m_{r_{2},\mathrm{int}}}-m_{r_{2},\mathrm{int}}-1\geq\log_{2}(N_{r_{2}})2 start_POSTSUPERSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT end_POSTSUPERSCRIPT - italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , roman_int end_POSTSUBSCRIPT - 1 ≥ roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) [27]. For redundant beam patterns corresponding to Type I patterns, each row of 𝐐I{0,1}log2(Nr1)×mr1subscript𝐐Isuperscript01subscript2subscript𝑁subscript𝑟1subscript𝑚subscript𝑟1\mathbf{Q}_{\mathrm{I}}\in\left\{0,1\right\}^{\log_{2}(N_{r_{1}})\times m_{r_{% 1}}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) × italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUPERSCRIPT should be composed of mr1subscript𝑚subscript𝑟1m_{r_{1}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT-tuples of weight 2 or more. There are a total of i=2mr1C(mr1,i)=2mr1mr11superscriptsubscript𝑖2subscript𝑚subscript𝑟1𝐶subscript𝑚subscript𝑟1𝑖superscript2subscript𝑚subscript𝑟1subscript𝑚subscript𝑟11\sum_{i=2}^{m_{r_{1}}}C(m_{r_{1}},i)=2^{m_{r_{1}}}-m_{r_{1}}-1∑ start_POSTSUBSCRIPT italic_i = 2 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUPERSCRIPT italic_C ( italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_i ) = 2 start_POSTSUPERSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUPERSCRIPT - italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT - 1 types of mr1subscript𝑚subscript𝑟1m_{r_{1}}italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT-tuples of weight 2 or more, so we can always fill 𝐐Isubscript𝐐I\mathbf{Q}_{\mathrm{I}}bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT without repeating existing tuples. Meanwhile, 𝐐II{0,1}log2(Nr2)×mr2subscript𝐐IIsuperscript01subscript2subscript𝑁subscript𝑟2subscript𝑚subscript𝑟2\mathbf{Q}_{\mathrm{II}}\in\left\{0,1\right\}^{\log_{2}(N_{r_{2}})\times m_{r_% {2}}}bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT ∈ { 0 , 1 } start_POSTSUPERSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) × italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUPERSCRIPT can be generated by the same way. Finally, the submatrix 𝐐𝐐\mathbf{Q}bold_Q can be composed by

𝐐=[𝐐I𝟎log2(Nr1)×mr2𝟎log2(Nr2)×mr1𝐐II],𝐐matrixsubscript𝐐Isubscript0subscript2subscript𝑁subscript𝑟1subscript𝑚subscript𝑟2subscript0subscript2subscript𝑁subscript𝑟2subscript𝑚subscript𝑟1subscript𝐐II\mathbf{Q}=\begin{bmatrix}\mathbf{Q}_{\mathrm{I}}&\mathbf{0}_{\log_{2}(N_{r_{1% }})\times m_{r_{2}}}\\ \mathbf{0}_{\log_{2}(N_{r_{2}})\times m_{r_{1}}}&\mathbf{Q}_{\mathrm{II}}\end{% bmatrix},bold_Q = [ start_ARG start_ROW start_CELL bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_0 start_POSTSUBSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) × italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL bold_0 start_POSTSUBSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) × italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL start_CELL bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] , (23)

where 𝟎ι×γsubscript0𝜄𝛾\mathbf{0}_{\iota\times\gamma}bold_0 start_POSTSUBSCRIPT italic_ι × italic_γ end_POSTSUBSCRIPT denotes the all-zero matrix with dimension ι×γ𝜄𝛾\iota\times\gammaitalic_ι × italic_γ.

Refer to caption
Figure 5: Beam pattern generated by proposed encoder.

With the proposed scheme, now we get back to the above example where the RIS is equipped with 8×8888\times 88 × 8 elements. In this case, mr1=mr2=3subscript𝑚subscript𝑟1subscript𝑚subscript𝑟23m_{r_{1}}=m_{r_{2}}=3italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = 3, and submatrix 𝐐𝐐\mathbf{Q}bold_Q can be generated as

𝐐=[110000101000011000\hdashline000110000101000011].𝐐delimited-[]110000101000011000\hdashline000110000101000011\mathbf{Q}=\left[\begin{array}[]{ccc:ccc}1&1&0&0&0&0\\ 1&0&1&0&0&0\\ 0&1&1&0&0&0\\ \hdashline 0&0&0&1&1&0\\ 0&0&0&1&0&1\\ 0&0&0&0&1&1\\ \end{array}\right].bold_Q = [ start_ARRAY start_ROW start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL end_ROW start_ROW start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 0 end_CELL start_CELL 1 end_CELL start_CELL 1 end_CELL end_ROW end_ARRAY ] . (24)

Then, the nr=kr+mr1+mr2subscript𝑛𝑟subscript𝑘𝑟subscript𝑚subscript𝑟1subscript𝑚subscript𝑟2n_{r}=k_{r}+m_{r_{1}}+m_{r_{2}}italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = italic_k start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT + italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT + italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT beam patterns 𝒱rsubscript𝒱𝑟\mathcal{V}_{r}caligraphic_V start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT are depicted in Fig. 5. Through the proposed dimension reduced encoder design scheme, although we need two more redundant beam patterns, the two dimensions of RIS are properly decoupled and the quality of generated beam shape can be guarenteed.

Based on the designed 𝐐𝐐\mathbf{Q}bold_Q, the check matrix 𝐇𝐇\mathbf{H}bold_H can be expressed as

𝐇=[𝐐T𝐈mr1+mr2],𝐇matrixsuperscript𝐐𝑇subscript𝐈subscript𝑚subscript𝑟1subscript𝑚subscript𝑟2\mathbf{H}=\begin{bmatrix}\mathbf{Q}^{T}&\mathbf{I}_{m_{r_{1}}+m_{r_{2}}}\end{% bmatrix},bold_H = [ start_ARG start_ROW start_CELL bold_Q start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT end_CELL start_CELL bold_I start_POSTSUBSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT + italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] , (25)

based on which we can determine whether the received codeword 𝐱^rsubscript^𝐱𝑟\hat{\mathbf{x}}_{r}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT contains error bits by calculating the syndrome 𝐜rsubscript𝐜𝑟\mathbf{c}_{r}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT as

𝐜r=𝐱^r𝐇T.subscript𝐜𝑟subscript^𝐱𝑟superscript𝐇𝑇\mathbf{c}_{r}=\hat{\mathbf{x}}_{r}\mathbf{H}^{T}.bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT bold_H start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT . (26)

When all bits in 𝐜rsubscript𝐜𝑟\mathbf{c}_{r}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT equal to zero, the received 𝐱^rsubscript^𝐱𝑟\hat{\mathbf{x}}_{r}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT is a normal codeword and there is no error. On the contrary, when 𝐜r𝟎1×(mr1+mr2)subscript𝐜𝑟subscript01subscript𝑚subscript𝑟1subscript𝑚subscript𝑟2\mathbf{c}_{r}\neq\mathbf{0}_{1\times(m_{r_{1}}+m_{r_{2}})}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ≠ bold_0 start_POSTSUBSCRIPT 1 × ( italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT + italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) end_POSTSUBSCRIPT, 𝐱^rsubscript^𝐱𝑟\hat{\mathbf{x}}_{r}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT is not a normal codeword generated by the designed codebook and there exists error in 𝐱^rsubscript^𝐱𝑟\hat{\mathbf{x}}_{r}over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. Since dmin=3subscript𝑑min3d_{\mathrm{min}}=3italic_d start_POSTSUBSCRIPT roman_min end_POSTSUBSCRIPT = 3, all 1-bit error has a unique syndrome and can be corrected. In addition, when there exists 1-bit error in Type I pattern and 1-bit error in Type II pattern simultaneously, these 2-bit errors can also be corrected according to the following Lemma 2.

Lemma 2.

By the proposed dimension reduced encoder design scheme, the error in Type I patterns and the error in Type II patterns are independent with each other.

Proof.

For a certain information bit stream 𝐮r(j)superscriptsubscript𝐮𝑟𝑗\mathbf{u}_{r}^{(j)}bold_u start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT, it can be divided into two parts: the bits corresponding to the ϕitalic-ϕ\phiitalic_ϕ dimension with length log2(Nr1)subscript2subscript𝑁subscript𝑟1\log_{2}(N_{r_{1}})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ), denoted as 𝐮r,I(i)superscriptsubscript𝐮𝑟I𝑖\mathbf{u}_{r,\mathrm{I}}^{(i)}bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT, and the bits corresponding to the θ𝜃\thetaitalic_θ dimension with length log2(Nr2)subscript2subscript𝑁subscript𝑟2\log_{2}(N_{r_{2}})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ), denoted as 𝐮r,II(i)superscriptsubscript𝐮𝑟II𝑖\mathbf{u}_{r,\mathrm{II}}^{(i)}bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT. The generated codeword 𝐱r(i)superscriptsubscript𝐱𝑟𝑖\mathbf{x}_{r}^{(i)}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT can then be derived as

𝐱r(i)superscriptsubscript𝐱𝑟𝑖\displaystyle\mathbf{x}_{r}^{(i)}bold_x start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT =[𝐮r,I(i)𝐮r,II(i)][𝐈log2(Nr1)𝟎𝐐I𝟎𝟎𝐈log2(Nr2)𝟎𝐐II]absentmatrixsuperscriptsubscript𝐮𝑟I𝑖superscriptsubscript𝐮𝑟II𝑖matrixsubscript𝐈subscript2subscript𝑁subscript𝑟10subscript𝐐I00subscript𝐈subscript2subscript𝑁subscript𝑟20subscript𝐐II\displaystyle=\begin{bmatrix}\mathbf{u}_{r,\mathrm{I}}^{(i)}&\mathbf{u}_{r,% \mathrm{II}}^{(i)}\end{bmatrix}\begin{bmatrix}\mathbf{I}_{\log_{2}(N_{r_{1}})}% &\mathbf{0}&\mathbf{Q}_{\mathrm{I}}&\mathbf{0}\\ \mathbf{0}&\mathbf{I}_{\log_{2}(N_{r_{2}})}&\mathbf{0}&\mathbf{Q}_{\mathrm{II}% }\end{bmatrix}= [ start_ARG start_ROW start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_CELL start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_CELL end_ROW end_ARG ] [ start_ARG start_ROW start_CELL bold_I start_POSTSUBSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL start_CELL bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL end_ROW start_ROW start_CELL bold_0 end_CELL start_CELL bold_I start_POSTSUBSCRIPT roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL start_CELL bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] (27)
=[𝐮r,I(i)𝐮r,II(i)𝐮r,I(i)𝐐I𝐮r,II(i)𝐐II].absentmatrixsuperscriptsubscript𝐮𝑟I𝑖superscriptsubscript𝐮𝑟II𝑖superscriptsubscript𝐮𝑟I𝑖subscript𝐐Isuperscriptsubscript𝐮𝑟II𝑖subscript𝐐II\displaystyle=\begin{bmatrix}\mathbf{u}_{r,\mathrm{I}}^{(i)}&\mathbf{u}_{r,% \mathrm{II}}^{(i)}&\mathbf{u}_{r,\mathrm{I}}^{(i)}\mathbf{Q}_{\mathrm{I}}&% \mathbf{u}_{r,\mathrm{II}}^{(i)}\mathbf{Q}_{\mathrm{II}}\end{bmatrix}.= [ start_ARG start_ROW start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_CELL start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_CELL start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] .

After the transmission, we denote the received codeword as

𝐱^r(i)=[𝐮r,I(i)^𝐮r,II(i)^𝐮r,I(i)𝐐I^𝐮r,II(i)𝐐II^].superscriptsubscript^𝐱𝑟𝑖matrix^superscriptsubscript𝐮𝑟I𝑖^superscriptsubscript𝐮𝑟II𝑖^superscriptsubscript𝐮𝑟I𝑖subscript𝐐I^superscriptsubscript𝐮𝑟II𝑖subscript𝐐II\hat{\mathbf{x}}_{r}^{(i)}=\begin{bmatrix}\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}% }&\hat{\mathbf{u}_{r,\mathrm{II}}^{(i)}}&\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}% \mathbf{Q}_{\mathrm{I}}}&\hat{\mathbf{u}_{r,\mathrm{II}}^{(i)}\mathbf{Q}_{% \mathrm{II}}}\end{bmatrix}.over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_ARG end_CELL end_ROW end_ARG ] . (28)

Then, the syndrome 𝐜rsubscript𝐜𝑟\mathbf{c}_{r}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT can be derived as

𝐜rsubscript𝐜𝑟\displaystyle\mathbf{c}_{r}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT =𝐱^r(i)𝐇T=[𝐜r,I𝐜r,II]absentsuperscriptsubscript^𝐱𝑟𝑖superscript𝐇𝑇matrixsubscript𝐜𝑟Isubscript𝐜𝑟II\displaystyle=\hat{\mathbf{x}}_{r}^{(i)}\mathbf{H}^{T}=\begin{bmatrix}\mathbf{% c}_{r,\mathrm{I}}&\mathbf{c}_{r,\mathrm{II}}\end{bmatrix}= over^ start_ARG bold_x end_ARG start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_H start_POSTSUPERSCRIPT italic_T end_POSTSUPERSCRIPT = [ start_ARG start_ROW start_CELL bold_c start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_c start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ] (29)
=[𝐮r,I(i)^𝐮r,II(i)^𝐮r,I(i)𝐐I^𝐮r,II(i)𝐐II^][𝐐I𝟎𝟎𝐐II𝐈mr1𝟎𝟎𝐈mr2]absentmatrix^superscriptsubscript𝐮𝑟I𝑖^superscriptsubscript𝐮𝑟II𝑖^superscriptsubscript𝐮𝑟I𝑖subscript𝐐I^superscriptsubscript𝐮𝑟II𝑖subscript𝐐IImatrixsubscript𝐐I00subscript𝐐IIsubscript𝐈subscript𝑚subscript𝑟100subscript𝐈subscript𝑚subscript𝑟2\displaystyle=\begin{bmatrix}\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}}&\hat{% \mathbf{u}_{r,\mathrm{II}}^{(i)}}&\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}\mathbf{% Q}_{\mathrm{I}}}&\hat{\mathbf{u}_{r,\mathrm{II}}^{(i)}\mathbf{Q}_{\mathrm{II}}% }\end{bmatrix}\begin{bmatrix}\mathbf{Q}_{\mathrm{I}}&\mathbf{0}\\ \mathbf{0}&\mathbf{Q}_{\mathrm{II}}\\ \mathbf{I}_{m_{r_{1}}}&\mathbf{0}\\ \mathbf{0}&\mathbf{I}_{m_{r_{2}}}\end{bmatrix}= [ start_ARG start_ROW start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_ARG end_CELL end_ROW end_ARG ] [ start_ARG start_ROW start_CELL bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL end_ROW start_ROW start_CELL bold_0 end_CELL start_CELL bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_CELL end_ROW start_ROW start_CELL bold_I start_POSTSUBSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL start_CELL bold_0 end_CELL end_ROW start_ROW start_CELL bold_0 end_CELL start_CELL bold_I start_POSTSUBSCRIPT italic_m start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_POSTSUBSCRIPT end_CELL end_ROW end_ARG ]
=[𝐮r,I(i)^𝐐I+𝐮r,I(i)𝐐I^𝐮r,II(i)^𝐐II+𝐮r,II(i)𝐐II^].absentmatrix^superscriptsubscript𝐮𝑟I𝑖subscript𝐐I^superscriptsubscript𝐮𝑟I𝑖subscript𝐐I^superscriptsubscript𝐮𝑟II𝑖subscript𝐐II^superscriptsubscript𝐮𝑟II𝑖subscript𝐐II\displaystyle=\begin{bmatrix}\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}}\mathbf{Q}_{% \mathrm{I}}+\hat{\mathbf{u}_{r,\mathrm{I}}^{(i)}\mathbf{Q}_{\mathrm{I}}}&\hat{% \mathbf{u}_{r,\mathrm{II}}^{(i)}}\mathbf{Q}_{\mathrm{II}}+\hat{\mathbf{u}_{r,% \mathrm{II}}^{(i)}\mathbf{Q}_{\mathrm{II}}}\end{bmatrix}.= [ start_ARG start_ROW start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT + over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_I end_POSTSUBSCRIPT end_ARG end_CELL start_CELL over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT end_ARG bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT + over^ start_ARG bold_u start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_i ) end_POSTSUPERSCRIPT bold_Q start_POSTSUBSCRIPT roman_II end_POSTSUBSCRIPT end_ARG end_CELL end_ROW end_ARG ] .

We can see from (29) that 𝐜rsubscript𝐜𝑟\mathbf{c}_{r}bold_c start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT has two parts, and for the first part 𝐜r,Isubscript𝐜𝑟I\mathbf{c}_{r,\mathrm{I}}bold_c start_POSTSUBSCRIPT italic_r , roman_I end_POSTSUBSCRIPT, it is only related to the error happened to Type I patterns, and for the second part 𝐜r,IIsubscript𝐜𝑟II\mathbf{c}_{r,\mathrm{II}}bold_c start_POSTSUBSCRIPT italic_r , roman_II end_POSTSUBSCRIPT, it is only related to the error happened to Type II patterns, which completes the proof. ∎

From the above analyses, the proposed dimension reduced encoder design scheme can not only improve the quality of beam shape by enabling the coupling of two dimensions of RIS, but also enhance the error correction capability of traditional Hamming code, thus further improving the beam training accuracy.

IV-C Beam Training Overhead Analysis

TABLE I: Beam Training Overheads for Different Frameworks
Frameworks Training Overheads
Exhaustive beam training NtNrsubscript𝑁𝑡subscript𝑁𝑟N_{t}N_{r}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT
Hierarchical beam training 4max{log2(Nt),log2(Nr)}4subscript2subscript𝑁𝑡subscript2subscript𝑁𝑟4\max\left\{\log_{2}(N_{t}),\log_{2}(N_{r})\right\}4 roman_max { roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) , roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) }
Coded beam training 4max{nt,nr}4subscript𝑛𝑡subscript𝑛𝑟4\max\left\{n_{t},n_{r}\right\}4 roman_max { italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT }

In this subsection, we will analyze the necessary beam training overheads of the traditional exhaustive beam training framework and traditional hierarchical beam training framework and compare them with that of the proposed coded beam training framework. The results are listed in Table I.

Specifically, For the traditional exhaustive beam training framework, each possible beam tuples in space should be sequentially explored before determining the beam best tuple. Given the fact that the number of candidate narrow beams is equal to the number of antenna elements, the total beam training overhead of the exhaustive beam training framework should be NtNrsubscript𝑁𝑡subscript𝑁𝑟N_{t}N_{r}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. In this case, when the number of RIS elements is large, an unacceptable beam training overhead will severely limit the system performance. On the other hand, for the traditional hierarchical beam training framework, we need 2×2=42242\times 2=42 × 2 = 4 beams at each layer. Since the numbers of layers at BS and RIS are log2(Nt)subscript2subscript𝑁𝑡\log_{2}(N_{t})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) and log2(Nr)subscript2subscript𝑁𝑟\log_{2}(N_{r})roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ), respectively, the total beam training overhead is 4max{log2(Nt),log2(Nr)}4subscript2subscript𝑁𝑡subscript2subscript𝑁𝑟4\max\left\{\log_{2}(N_{t}),\log_{2}(N_{r})\right\}4 roman_max { roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) , roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) }. Through the hierarchical beam training framework, a lot of incorrect angles are excluded at low layers, so the number of necessary beam training overhead is greatly reduced.

For the proposed coded beam training framework, the codewords are composed of basis patterns and the redundant patterns. Similarly, we need four beams in each layer. Therefore, the necessary beam training overhead for our proposed framework is 4max{nt,nr}4subscript𝑛𝑡subscript𝑛𝑟4\max\left\{n_{t},n_{r}\right\}4 roman_max { italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT }, where nt=log2(Nt)+mtsubscript𝑛𝑡subscript2subscript𝑁𝑡subscript𝑚𝑡n_{t}=\log_{2}(N_{t})+m_{t}italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) + italic_m start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT and nr=log2(Nr)+mrsubscript𝑛𝑟subscript2subscript𝑁𝑟subscript𝑚𝑟n_{r}=\log_{2}(N_{r})+m_{r}italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) + italic_m start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT. Since m𝑚mitalic_m is the minimum integer that satisfies 2mm1log2(N)superscript2𝑚𝑚1subscript2𝑁2^{m}-m-1\leq\log_{2}(N)2 start_POSTSUPERSCRIPT italic_m end_POSTSUPERSCRIPT - italic_m - 1 ≤ roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N ), when N3𝑁3N\leq 3italic_N ≤ 3, mrlog2(N)subscript𝑚𝑟subscript2𝑁m_{r}\leq\log_{2}(N)italic_m start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ≤ roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N ), which means that the proposed scheme will not introduce a large extra beam training overhead compared to hierarchical beam training framework.

V Simulation Results

TABLE II: Simulation Parameters
BS antenna number Ntsubscript𝑁𝑡N_{t}italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT 64
RIS antenna number Nr1×Nr2=Nrsubscript𝑁subscript𝑟1subscript𝑁subscript𝑟2subscript𝑁𝑟N_{r_{1}}\times N_{r_{2}}=N_{r}italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT end_POSTSUBSCRIPT × italic_N start_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT end_POSTSUBSCRIPT = italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT 16×16=256161625616\times 16=25616 × 16 = 256
Central frequency fcsubscript𝑓𝑐f_{c}italic_f start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT 28282828 GHz
The distribution of ϕ,θitalic-ϕ𝜃\phi,\thetaitalic_ϕ , italic_θ 𝒰(π,π)𝒰𝜋𝜋\mathcal{U}(-\pi,\pi)caligraphic_U ( - italic_π , italic_π )
Iteration number Kitersubscript𝐾iterK_{\mathrm{iter}}italic_K start_POSTSUBSCRIPT roman_iter end_POSTSUBSCRIPT 100100100100
Threshold ΔΔ\Deltaroman_Δ 0.30.30.30.3

In this section, we evaluate the performance of the proposed coded beam training framework through numerical experiments. The simulation parameters are listed in Table II The antenna spacing is set to d=c2fc𝑑𝑐2subscript𝑓𝑐d=\frac{c}{2f_{c}}italic_d = divide start_ARG italic_c end_ARG start_ARG 2 italic_f start_POSTSUBSCRIPT italic_c end_POSTSUBSCRIPT end_ARG. We compare the achievable rate performance of the proposed coded beam training framework with both the traditional exhaustive beam training framework and the traditional hierarchical beam training framework. The achievable rate is obtained by

R=log2(1+Ptσ2𝐡rdiag(𝐯)𝐆𝐰𝐰H𝐆Hdiag(𝐯H)𝐡rH),𝑅subscript21subscript𝑃𝑡superscript𝜎2subscript𝐡𝑟diag𝐯superscript𝐆𝐰𝐰𝐻superscript𝐆𝐻diagsuperscript𝐯𝐻superscriptsubscript𝐡𝑟𝐻R=\log_{2}\left(1+\frac{P_{t}}{\sigma^{2}}\mathbf{h}_{r}\mathrm{diag}(\mathbf{% v})\mathbf{G}\mathbf{w}\mathbf{w}^{H}\mathbf{G}^{H}\mathrm{diag}(\mathbf{v}^{H% })\mathbf{h}_{r}^{H}\right),italic_R = roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( 1 + divide start_ARG italic_P start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT end_ARG start_ARG italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_ARG bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT roman_diag ( bold_v ) bold_Gww start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT bold_G start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT roman_diag ( bold_v start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT ) bold_h start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_H end_POSTSUPERSCRIPT ) , (30)

where Ptsubscript𝑃𝑡P_{t}italic_P start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT denotes the transmission power at BS and σ2superscript𝜎2\sigma^{2}italic_σ start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT denotes the noise power. The reflecting vector of RIS 𝐯𝐯\mathbf{v}bold_v and the beamforming vector of BS 𝐰𝐰\mathbf{w}bold_w are both determined through the corresponding beam training frameworks.

Refer to caption
Figure 6: Achievable rate performance v.s. SNR.

Fig. 6 depicts the achievable rate performance of different beam training frameworks against the SNR. We assume that the beam training overheads for all frameworks are all sufficient. In this case, the traditional exhaustive beam training framework can always detect the best beam tuples for BS and RIS thanks to the high beamforming gain realized by the large antenna array. We can observe that compared to the traditional compared to the traditional hierarchical the proposed coded beam training framework can realize a higher achievable rate performance in low SNR scenarios. The suffix “1 bit correction” means that we only utilize the check matrix 𝐇𝐇\mathbf{H}bold_H to correct 1-bit error in received codewords as traditional Hamming code, while the suffix “2 bit correction” means that we exploit the property of the designed encoder to enable some 2-bit errors to be corrected. We can see that since the proposed dimension reduced encoder can decouple the two dimensions of RIS, the error correction capability can also be enhanced compared to traditional Hamming code.

Refer to caption
Figure 7: Success rate v.s. SNR.

To evaluate the probability of different frameworks to select the best tuple, we compare the success rate of different frameworks against SNR in Fig. 7. Here, we also assume that the beam training overhead for all frameworks are all sufficient. Similar to the achievable rate performace, the proposed coded beam training framework are more likely to detect the best tuple for BS and RIS successfully compared to traditional hierarchical beam training framework thanks to the error correction capability brought by the encoding-decoding process. In addition, through the decoupling ability enabled by the proposed dimension reduced encoder design scheme, the proposed framework embraces a higher success rate compared to the framework based on traditional Hamming code.

Refer to caption
Figure 8: Achievable rate performance v.s. beam training overhead, P[4,100]𝑃4100P\in\left[4,100\right]italic_P ∈ [ 4 , 100 ].

Furthermore, to reveal the impact of beam training overhead on different frameworks, we compare the achievable rate performance of different beam training frameworks against the number of pilot overheads in Fig. 8. The beam training SNR is set to 10101010 dB and the pilot overhead is increasing from 4444 to 100100100100. In our considered system, the necessary beam training overhead for the traditional hierarchical beam training framework should be 4max{log2(Nt),log2(Nr)}=4×8=324subscript2subscript𝑁𝑡subscript2subscript𝑁𝑟48324\max\left\{\log_{2}(N_{t}),\log_{2}(N_{r})\right\}=4\times 8=324 roman_max { roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT ) , roman_log start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT ) } = 4 × 8 = 32. The necessary beam training overhead for the proposed coded beam training framework is 4max{nt,nr}=4×14=564subscript𝑛𝑡subscript𝑛𝑟414564\max\left\{n_{t},n_{r}\right\}=4\times 14=564 roman_max { italic_n start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT , italic_n start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT } = 4 × 14 = 56. We can observe that when the pilot number is insufficient for all frameworks, the proposed coded beam training framework still outperforms existing hierarchical beam training framework since it also have certain error correction capabilities. When the pilot number is sufficient for the hierarchical framework but insufficient for the proposed framework, the achievable rate of the proposed scheme is slightly lower than that of the hierarchical framework. This is because the redundant beams have not been entirely transmitted, so the error correction can sometimes be misleading. When the pilot number is sufficient for the proposed framework, it can reach the maximum achievable rate thanks to the error correction ability. We also notice that in this scenario, the trend of the “1 bit correction” and the “2 bit correction” is nearly the same, this is because when SNR=10absent10=10= 10 dB, both schemes can determine the best beam tuple, which is consistent with the results in Fig. 6 and Fig. 7. The traditional exhaustive beam training framework, however, can barely detect the best beam tuple since the pilot number is severely insufficient.

Refer to caption
Figure 9: Achievable rate performance v.s. beam training overhead, P[4,20000]𝑃420000P\in\left[4,20000\right]italic_P ∈ [ 4 , 20000 ].

To demonstrate the performance improvement of the traditional exhaustive beam training framework more clearly, in Fig. 9, the pilot overhead is increasing from 4444 to 20000200002000020000. In our considered scenario, the necessary beam training overhead for the traditional exhaustive beam training framework should be NtNr=16384subscript𝑁𝑡subscript𝑁𝑟16384N_{t}N_{r}=16384italic_N start_POSTSUBSCRIPT italic_t end_POSTSUBSCRIPT italic_N start_POSTSUBSCRIPT italic_r end_POSTSUBSCRIPT = 16384. From Fig. 9, we can see that when the pilot number is below 16000160001600016000, the achievable rate of the exhaustive framework improves gradually. When the pilot number is around 16000160001600016000, the achievable rate is nearly the same as the hierarchical framework. When the pilot number is sufficient, the achievable rate is the same as the proposed coded beam training framework. From Fig. 8 and Fig. 9, we can see that due to the error correction capability brought by the encoding-decoding process, the proposed coded beam training framework can outperform existing frameworks under different pilot numbers, which further verified the advantage of the proposed framework.

VI Conclusions

In this paper, we exploited the error correction capability of channel coding to realize accurate beam training under low SNR. By map** the angles in space to a bitstream, we enabled the encoding-decoding procedure during beam training. Then, considering the constant modulus constraints of RIS elements, we adopted a new codeword design criterion and proposed a relaxed GS-based codeword design scheme. Furthermore, we proposed a dimension reduced encoder design scheme to improve the quality of the beam shape and the capability of error correction simultaneously. Simulation results verified the effectiveness of the proposed scheme. The proposed framework revealed the similarity of intrinsic mathematical structures between channel coding and beam training, which enabled the error correction during beam training and provided a promising solution for accurate and reliable beam training in RIS systems. For future works, this coded beam training framework can be extended to more scenarios such as near-field scenarios. In addition, various channel coding methods can be applied to the proposed framework to enable reliable beam training under low SNR.

References

  • [1] E. Basar, M. Di Renzo, J. De Rosny, M. Debbah, M.-S. Alouini, and R. Zhang, “Wireless communications through reconfigurable intelligent surfaces,” IEEE Access, vol. 7, pp. 116 753–116 773, Jul. 2019.
  • [2] M. Di Renzo, A. Zappone, M. Debbah, M.-S. Alouini, C. Yuen, J. De Rosny, and S. Tretyakov, “Smart radio environments empowered by reconfigurable intelligent surfaces: How it works, state of research, and the road ahead,” IEEE J. Sel. Areas Commun., vol. 38, no. 11, pp. 2450–2525, Jul. 2020.
  • [3] Q. Wu and R. Zhang, “Towards smart and reconfigurable environment: Intelligent reflecting surface aided wireless network,” IEEE Commun. Mag., vol. 58, no. 1, pp. 106–112, Nov. 2019.
  • [4] C. Pan, H. Ren, K. Wang, J. F. Kolb, M. Elkashlan, M. Chen, M. Di Renzo, Y. Hao, J. Wang, A. L. Swindlehurst et al., “Reconfigurable intelligent surfaces for 6G systems: Principles, applications, and research directions,” IEEE Commun. Mag., vol. 59, no. 6, pp. 14–20, Jun. 2021.
  • [5] G. Zhou, C. Pan, H. Ren, K. Wang, and A. Nallanathan, “A framework of robust transmission design for IRS-aided MISO communications with imperfect cascaded channels,” IEEE Tran. Signal Process., vol. 68, pp. 5092–5106, Aug. 2020.
  • [6] K. Zhi, C. Pan, H. Ren, and K. Wang, “Power scaling law analysis and phase shift optimization of RIS-aided massive MIMO systems with statistical CSI,” IEEE Trans. Commun., vol. 70, no. 5, pp. 3558–3574, Mar. 2022.
  • [7] B. Zheng, C. You, W. Mei, and R. Zhang, “A survey on channel estimation and practical passive beamforming design for intelligent reflecting surface aided wireless communications,” IEEE Commun. Surveys Tuts., vol. 24, no. 2, pp. 1035–1071, Feb. 2022.
  • [8] H. Alwazani, A. Kammoun, A. Chaaban, M. Debbah, M.-S. Alouini et al., “Intelligent reflecting surface-assisted multi-user MISO communication: Channel estimation and beamforming design,” IEEE Open J. Commun. Soc., vol. 1, pp. 661–680, May 2020.
  • [9] Z. Wang, L. Liu, and S. Cui, “Channel estimation for intelligent reflecting surface assisted multiuser communications: Framework, algorithms, and analysis,” IEEE Trans. Wireless Commun., vol. 19, no. 10, pp. 6607–6620, Jun. 2020.
  • [10] L. Wei, C. Huang, G. C. Alexandropoulos, C. Yuen, Z. Zhang, and M. Debbah, “Channel estimation for RIS-empowered multi-user MISO wireless communications,” IEEE Trans. Commun., vol. 69, no. 6, pp. 4144–4157, Mar. 2021.
  • [11] J. Suh, C. Kim, W. Sung, J. So, and S. W. Heo, “Construction of a generalized DFT codebook using channel-adaptive parameters,” IEEE Commun. Lett., vol. 21, no. 1, pp. 196–199, Jan. 2016.
  • [12] Y. Chen, J. Tan, M. Hao, R. MacKenzie, and L. Dai, “Accurate beam training for RIS-assisted wideband terahertz communication,” IEEE Trans. Commun., vol. 71, no. 12, pp. 7425–7440, Dec. 2023.
  • [13] X. Wei, L. Dai, Y. Zhao, G. Yu, and X. Duan, “Codebook design and beam training for extremely large-scale RIS: Far-field or near-field?” China Commun., vol. 19, no. 6, pp. 193–204, Jun. 2022.
  • [14] P. Wang, J. Fang, W. Zhang, and H. Li, “Fast beam training and alignment for IRS-assisted millimeter wave/terahertz systems,” IEEE Trans. Wireless Commun., vol. 21, no. 4, pp. 2710–2724, Apr. 2021.
  • [15] C. You, B. Zheng, and R. Zhang, “Fast beam training for IRS-assisted multiuser communications,” IEEE Wireless Commun. Lett., vol. 9, no. 11, pp. 1845–1849, Nov. 2020.
  • [16] Y. Xu, C. Huang, L. Wei, Z. Yang, X. Chen, Z. Zhang, C. Yuen, and M. Debbah, “Low-complexity beam training for multi-RIS-assisted multi-user communications,” IEEE Wireless Commun. Lett., 2024.
  • [17] J. Wang, W. Tang, S. **, C.-K. Wen, X. Li, and X. Hou, “Hierarchical codebook-based beam training for RIS-assisted mmWave communication systems,” IEEE Trans. Commun., vol. 71, no. 6, pp. 3650–3662, Mar. 2023.
  • [18] Z. Zhang, L. Dai, X. Chen, C. Liu, F. Yang, R. Schober, and H. V. Poor, “Active RIS vs. passive RIS: Which will prevail in 6G?” IEEE Trans. Commun., vol. 71, no. 3, pp. 1707–1725, Dec. 2022.
  • [19] T. Zheng, J. Zhu, Q. Yu, Y. Yan, and L. Dai, “Coded beam training,” arXiv preprint arXiv:2401.01673, 2024.
  • [20] Y. Lu, Z. Zhang, and L. Dai, “Hierarchical beam training for extremely large-scale MIMO: From far-field to near-field,” IEEE Trans. Commun., vol. 72, no. 4, pp. 2247–2259, Apr. 2024.
  • [21] L. Dai, B. Wang, M. Wang, X. Yang, J. Tan, S. Bi, S. Xu, F. Yang, Z. Chen, M. Di Renzo et al., “Reconfigurable intelligent surface-based wireless communications: Antenna design, prototy**, and experimental results,” IEEE Access, vol. 8, pp. 45 913–45 923, Mar. 2020.
  • [22] A. Alkhateeb, O. El Ayach, G. Leus, and R. W. Heath, “Channel estimation and hybrid precoding for millimeter wave cellular systems,” IEEE J. Sel. Top. Signal Process., vol. 8, no. 5, pp. 831–846, Oct. 2014.
  • [23] C. Han, L. Yan, and J. Yuan, “Hybrid beamforming for terahertz wireless communications: Challenges, architectures, and open problems,” IEEE Wireless Commun., vol. 28, no. 4, pp. 198–204, Aug. 2021.
  • [24] C. Qi, K. Chen, O. A. Dobre, and G. Y. Li, “Hierarchical codebook-based multiuser beam training for millimeter wave massive MIMO,” IEEE Trans. Wireless Commun., vol. 19, no. 12, pp. 8142–8152, Dec. 2020.
  • [25] R. W. Gerchberg and W. O. Saxton, “A practical algorithm for the determination of plane from image and diffraction pictures,” Optik, vol. 35, no. 2, pp. 237–246, Sep. 1972.
  • [26] O. M. Bucci, G. Franceschetti, G. Mazzarella, and G. Panariello, “Intersection approach to array pattern synthesis,” IEEE Photonics Journal, vol. 137, no. 6, Dec. 349-357.
  • [27] S. Lin and D. Costello, Error Control Coding.   Pearson Education, 2004.