Reconfigurable Intelligent Surface-Aided Wireless Communications: Adaptive Beamforming and Experimental Validations

Recently, the fifth generation of cellular mobile communications (5G) network has been deployed and become pervasive. 5G offers a significant increase in terms of bandwidth and data rate compared to the previous generations. In addition, new technologies such as millimeter-wave (mmWave) technology and massive MIMO (mMIMO), have been proposed to meet the demand. However, some inevitable challenges still exist. In mmWave frequency, path loss and shadowing become more severe due to the radio electromagnetic (EM) wave characteristics. In this paper, we propose the utilization of reconfigurable intelligent surface (RIS) to aid wireless communications to overcome path loss and shadowing issues, by using a compressive sensing-based adaptive beamforming algorithm. To validate the theory, hypothesis, and simulation results, we have designed, fabricated, and conducted experiments with a 1-bit RIS testbed. The results show that the bit error rate (BER) and signal-to-noise ratio (SNR) of the received signal are significantly improved when the proposed RIS is employed. Further, we have also demonstrated a video streaming application aided by the proposed RIS as one of the potential RIS deployment scenarios. The video clip for the video streaming by using the RIS can be seen in [1].


I. INTRODUCTION
S INCE the launch of the first national commercial 5G network in the world in 2019 [2], the race for exploring next-generation communications technologies for beyond 5G and 6G networks to achieve faster and more reliable mobile communications has already been started. Reconfigurable intelligent surface (RIS) is one of these promising technologies. RIS, which consists of hundreds to thousands of unit cells, has recently gained much attention, both from academia and industry. While NTT DoCoMo and Metawave demonstrated their first 28 GHz reflectarray in 2018 [3], Samsung also explored the potential of RIS in its 6G Vision white paper, where one of its primary purposes is to provide a propagation path when no line of sight (LoS) exists [4].
Since the very first generation of mobile communications, the operating frequency range has constantly moved to higher frequencies. Consequently, the path loss and shadowing in the last two generations are significantly higher than their predecessor due to the characteristics of the electromagnetic (EM) wave. The path loss and shadowing problem cause attenuation, which can easily degrade the data transmission quality. Since the next generation of mobile communications is designed to work at millimeterwave (mmWave) frequency or even terahertz frequency, one can expect that the attenuation problem will become more severe. A simple obstacle such as a wall, furniture, or even a human standing between the transmitter and receiver can easily deteriorate the quality of service (QoS).
RIS is one of the technologies that can be used to overcome this attenuation problem. RIS is able to adaptively reconfigure the wireless environment in an intelligent manner by changing the frequency, phase, amplitude, or polarization of the incident EM wave [5]. In wireless communications, RIS can be used as an alternative path provider when the direct communication path between the transmitter and receiver is unavailable due to obstacles between them or as a quality enhancer when the channel quality between the transmitter and receiver is too low. Several works show the benefit of the RIS-aided network. For example, [6] investigates the benefit of joint nonorthogonal multiple access (NOMA) and RIS techniques. The results show significant benefit of RIS-aided network from NOMA Furthermore, RIS generally does not need any active elements such as power-hungry radio frequency (RF) chains to reflect, steer, focus, or scatter the impinging EM wave. This makes an RIS significantly cheaper, less complex, and has lower energy consumption compared to any phased array antenna or relay [7], [8]. Moreover, based on the scaling laws and numerical simulations, [9] shows that despite the reduced implementation quality, sufficiently large RIS still can outperform relay-aided systems in terms of the data rate. In addition, the state of RIS can be configured simply by turning its control elements such as positive-intrinsic-negative (PIN) diodes on or off. Due to its structural simplicity, and thanks to its thin structure, RIS can be attached to walls or ceilings to improve the communication quality, as shown in Fig. 1.
In order to focus the impinging wave adaptively toward the receiver, one should estimate the channel between each unit cell and the receiver. The authors of [10], [11], and [12] have proposed and analyzed a theoretical method to estimate the metasurface channel by turning each unit cell to the ON state while keeping the others in the OFF state during the training phase. This seems to work fine in theory. However, this method might be impractical when RIS consists of a massive number of unit cells since the reflected signal from one unit cell is too feeble compared to that from all other unit cells. Therefore, in this work, instead of changing the state of every unit cell sequentially, a set of random training patterns for the whole unit cells is used to estimate the RIS channel.
In our previous work [13], we proposed a fractal programmable metasurface operating at 5.8 GHz, consisting of 1-bit 16 × 16 unit cells for wireless power transfer application. In that work, an adaptive beamforming method based on the Hadamard matrix training is proposed. However, to obtain the optimal pattern, the required number of training patterns is equal to the number of unit cells since the channel of each unit cell needs to be derived separately. Consequently, the training overhead is quite large, which can be a problem if the size of metasurface is large or the mobility of the receiver is high.
In this paper, we proposed an RIS-aided wireless communications based on compressive sensing adaptive beamforming algorithm. One of the main limitations of the current typical RIS is that the phase shift is discrete rather than continuous. The phase shift resolution of the RIS is limited by the number of available states. Therefore, an ideal phase shift cannot be achieved with discrete states. This limitation can be minimized by designing an RIS with a larger number of bits. For example, by designing a 2-bit RIS, a 90 • phase shift can be obtained rather than a 180 • phase shift of 1-bit RIS. However, the hardware cost and complexity is proportional to the number of control bits. Moreover, some researches have shown that the difference in the gain between the 2-bit and 1-bit RISs is not very significant. For example, 2-bit RIS in [14] achieves only 2 dB gain over the RIS with 1-bit elements [15]. Therefore, in this work, we design a 1-bit 5.8 GHz RIS that consists of 16 × 16 low-cost passive unit cells. Each of the unit cells has two states, ON and OFF, which correspond to 0 • and 180 • phase shifts of the incident EM wave, respectively. The state of each unit cell can be controlled by turning on or off the PIN diode that is connected to each unit cell. By adjusting the state appropriately, one can adaptively steer and focus the impinging wave towards the receiver direction.
The authors of [14] have shown the RIS capability to aid wireless communications by achieving a 21.7 dBi and 19.1 dBi antenna gain at 2.3 GHz and 28.5 GHz, respectively. However, no adaptive beamforming method is proposed. In this work, we also propose a compressive sensing-based adaptive beamforming algorithm. Compressive sensing (CS) is a technique to capture and represent compressible signals at a rate significantly below the Nyquist rate [16], which employs non-adaptive linear projections that preserve the structure of the signal, then reconstructed the signal from these projections by using an optimization process [17], [18]. The channel estimation is one example of sparse approximations, which can theoretically be done by using the CS technique. In mobile communications with high carrier frequencies, the propagation path tends to have a few scattering clusters. Hence, the communication channel usually can be sparsely represented in the delay-Doppler domain or the angular domain [19]. The authors [20], [21] reveal the limited scattering clusters in the angular domain on their experiments performed in the millimeterwave spectrum. Moreover, in the millimeter-wave [22], [23] or massive multi-input multi-output (MIMO) [24], [25] system model, where the transceiver is equipped with antenna array, the channel can be represented in the angular domain due to the spatial resolvability and minimum scattering effect from the environment [26]. Several authors have worked on CS-based beamforming. When the wireless channel can be represented in the sparse model, CS-based channel estimations can significantly perform better than the conventional channel estimation. The authors of [27] have proposed CS-based beamforming for the orthogonal frequency division multiplexing (OFDM) systems. In [28] and [29], adaptive beamforming based on the CS technique for a sparse receiving array is proposed. The work [30] has proposed a CS-based channel estimation for massive MIMO systems. However, none of them has employed the CS-based beamforming for the RIS.
Matching pursuit (MP) is a greedy CS technique that exploits the sparsity of a signal to estimate and reconstruct the signal with a significantly lower number of samples compared to the Nyquist sampling theorem. Due to its simplicity, MP requires a relatively light computation. Since, in wireless communications, especially in the far-field, the channel tends to be sparse, one can use the MP algorithm to estimate the channel. By doing so, the wireless channel involving RIS can be estimated and reconstructed by using a set of random training patterns. Thus, the beam can be focused on the receiver to increase the transmission quality. The proposed algorithm is then implemented in the proposed RIS prototype testbed. By extracting the phase of the obtained channel, quantizing it, and loading it on the RIS, the impinging EM wave on the RIS can be reflected toward the receiver position.
In addition to the simulation, we fabricated the proposed RIS design, implemented the proposed algorithm, and conducted experiments to validate the simulation results. Based on the experiments results, the proposed system can adaptively steer and focus the beam towards the receiver direction from −50 • to 50 • , and significantly improve an indoor OFDM communications quality. In terms of the BER and SNR, it is observed that the proposed model can reduce the BER from 4.69E-6 to 1.44E-8 in QPSK modulation, from 6.86E-4 to 5.74E-6 in 16-QAM, and from 2.71E-2 to 4.58E-4 in 64-QAM. Further, the proposed model can aid an indoor 1920 × 1080 pixels (FHD) video streaming. Compared to 14.54 dB of SNR in the transmission without the proposed model (cannot be streamed), by using the proposed model, the SNR can be improved to 27.19 dB (smooth transmission), which is 12.65 dB of SNR improvement. The video streaming process can be seen in [1].
In summary, the contributions of this work are as follows.
• First, by exploiting the channel sparsity, we propose a compressive sensing-based RIS beamforming algorithm. We used the compressive sensing approach to reduce the required number of training patterns. Compared to our previous work [13], the proposed algorithm is able to reduce the required number of training patterns by 1/16 with a negligible performance difference. Considering the real-world wireless communications scenario where real-time tracking is needed to maintain communication quality, this reduction rate is quite significant in terms of training overhead. Further, the sub-array approach is able to mitigate the compressive sensing performance degradation in the near-field region. • Second, we designed and fabricated a 1-bit 5.8 GHz RIS prototype testbed to validate the theory and simulation through a series of experiments. From the experiment resuls, it is verified that the proposed model is able to estimate the wireless channel. Further, the proposed model can significantly improve the quality of wireless communications in terms of SNR and BER. Moreover, a video is streamed through the proposed model to demonstrate a real-world application scenario.
The rest of this paper is organized as follows. Section II explains the system model and problem formulation. Section III introduces the proposed CS-based beamforming algorithm. Section IV explains the RIS testbed hardware design. In the Section V, we present the simulation results. Section VI present the experiment setup followed by experiment results to evaluate the proposed model. Finally, the conclusion of this work is presented in Section VII.
Notations: We use the following notations throughout the paper. We let a lowercase letter (e.g., ), boldface lowercase letter (e.g., a), and boldface uppercase letter (e.g., A) represent the scalar, vector, and matrix, respectively; (·) , (·) , and (·) −1 denote the transpose, conjugate transpose, and VOLUME 4, 2016 inverse of a matrix, respectively; Finally, [A] , denotes the ( , )-th element of matrix A.  In this subsection, the general RIS architecture and its general principles are explained. An RIS can be described as a planar array that consists of hundreds to thousands of passive unit cells. The geometric parameters of unit cells (i.e., size, arrangement, orientation, and shape) are designed properly to achieve desired signal responses such as the shift of frequency, phase, amplitude, or polarization. A typical RIS thickness usually is in the order of subwavelength of the signal of interest.

II. SYSTEM MODEL
In the past, the surface is designed in a non-reconfigurable manner, usually designed for serving a specific purpose. Therefore, once it is fabricated, it cannot be reconfigured. However, the dynamic characteristic of time-varying wireless channels, caused by the user mobility and variable environment, makes a non-reconfigurable surface difficult to be utilized. Thus, a reconfigurable surface that can be tuned in a real-time manner is needed to aid wireless communications. As aforementioned, electronic approach such as PIN diodes and varactor is widely used to reconfigure the reflection coefficients of the unit cells due to its low cost, fast response time, and low reflection loss. In the guided-wave type of unit cell, the incident free-space wave is converted into a guided wave, then reflected and radiated again to the air as the reflected free space wave.
A typical architecture of RIS consists of three layers and an RIS controller (see Fig. 2). The top layer acts as a manipulator to directly control the impinging EM waves. It consists of a massive number of reconfigurable conductive patches on a dielectric substrate. In addition, for the practical implementation, one can attach dedicated RF sensors to sense the radio signals on this layer to aid the intelligent RIS configuration mechanism since the conventional RIS cannot sense any surrounding radio signals directly. Then, an RF choke structure is placed in the middle layer to minimize the RF signal leakage. Finally, the control elements to reconfigure the reflecting elements in a real-time manner are located at the bottom layer. These control elements can be tuned by a controller such as FPGA or microcontroller. Moreover, this controller can also interact with other network components such as user equipment or base station through the backhaul communication links.

B. BASIC RIS THEORY
As aforementioned, by changing the state of the unit cell, the characteristic of the impinging EM wave such as the phase, can be changed. Hence, by controlling the RIS appropriately, one can manipulate an incident EM wave to the RIS. The scattering field of the x-or y-polarized incident EM wave to the RIS with × unit cells, mathematically can be modeled as follows [31].
where , are the relative illuminating amplitude and phase concerning each unit cell, |Γ | and are, respectively, the reflection amplitude and phase of unit cell ( , ), ( , ) is the scattering pattern of the unit cell, and and are the spacing between the unit cell in xand y-directions, respectively.
It is noted from (1) that by adjusting the reflection amplitude |Γ | and phase of each unit cell, the scattering EM wave from the RIS can be controlled. Assuming that the reflection magnitude is identical, the reflection phase matrix of the RIS can be modeled as = 11 12 Then, the optimal phase compensation of unit cell ( , ) can be obtained by [32]: where is the wavenumber, p is the location of the EM source, q is the focusing point location, and r is the position of unit cell ( , ).
While the above-computed phase is the ideal continuous phase shift of each unit cell, those phase shifts cannot be achieved exactly in the RIS due to the limited available states [33]. Hence, the optimal phase should be quantized according to the available states of the RIS. In the 1-bit unit cell RIS, the available states are "0" and "1" only, which correspond to the 0 • and 180 • phase shift, respectively. Thus, the phase quantization can be calculated as Subsequently, the reflection coefficient of unit cell ( , ) is derived as The received signal at the receiver of the RIS-aided wireless communications system is expressed as where ℎ Tx-RIS-Rx , is the cascade channel gain from the transmitter to the unit cell ( , ) and the receiver, ℎ Tx-Rx is the direct channel between the transmitter and receiver, Tx is the transmitted signal, is the additive white Gaussian noise. The above equation can be rewritten in a matrix form as where h and g are, respectively, the column vectors of size of the channel gain vector and reflection coefficient vector obtained by vectorization of ℎ Tx-RIS-Rx , and Γ , . In ordering the components for vectorization for two indices and , the first index is major and the last index is minor. In this work, we assume that the direct channel from the transmitter to receiver is deteriorated by severe blocking by obstacles. Hence, the direct channel term in (7) can be neglected. The received signal can be rewriten as where˜ = / . In order to estimate the channel gain of the system, training patterns that consist of different vector g are designed. Let G is the matrix of size × that is made by stacking different vector g. Hence, we have where Y is the received signal vector of size corresponding to the training pattern. Since the environment scattering effect is limited in high frequency wireless channels [19], channel estimation can be seen as a typical example of a sparse estimation problem. In this case, the problem is to estimate the vector h from a set of Y values from the measurement results that correspond to number of training patterns g. The problem is to find h such that Y = h T G, which can be solved by using a CS technique such as an MP algorithm.

III. COMPRESSIVE SENSING-BASED CHANNEL ESTIMATION ALGORITHM
In this section, the channel estimation algorithm is briefly explained. In the first subsection, a simple Hadamard beamforming algorithm from [13] is explained. Although the wireless channel can be accurately estimated by using this method, the channel of each unit cell needs to be derived separately. Therefore, the required number of training patterns is equal to the number of unit cells. This situation might cause a training and computational overhead in a large RIS. In the second subsection, we introduce the compressive sensing-based channel estimation algorithm to reduce the required number of training patterns. The sub-array approach is proposed to tackle the performance degradation when the receiver is located within the near-field region of the RIS.

A. HADAMARD BEAMFORMING ALGORITHM
In this subsection, we explain a Hadamard-based channel estimation algorithm. In this algorithm, a Hadamard matrix is used to build a set of sensing patterns G. The Hadamard matrix is a square orthogonal matrix all entries of which are either 1 or −1. Let be a Hadamard matrix of order , then − is a partitioned matrix of the Hadamard matrix with order 2 . This observation can be repeated to build a sequence of matrices as follows.
Let us assume that the number of unit cells of the RIS (i.e., ) is the power of 2. Then, the Hadamard matrix is used as the sensing matrix G = , with the size × . Therefore, the channel measurements for ℎ Tx-RIS-Rx , should be conducted 2 times. Then, the estimated channel h is obtained as where G /( ) is the Gaussian noise vector.

B. SUB-ARRAY TRAINING OF MATCHING PURSUIT-BASED BEAMFORMING ALGORITHM
It has been shown and proved in many literature that the propagation paths tend to be clustered, and the environment scattering effect is limited in wireless channels (i.e., [19] and [34]). Therefore, the channel can be represented in the delay-Doppler domain or angular domain. If the Doppler spreads and the maximal delay are large and only a few dominant paths are left, the channel can be modeled as a sparse vector [35]. The author [36] proposed a compressive sensing and deep learning approach to estimate the channel in a large intelligent surface (LIS). However, several active sensor elements are required to be attached to the LIS structure. These sensors are needed to sense the signals and estimate the channel. Similar work has been done in [37]. Differently from these works, in our proposed model, the signal is sensed by the receiver. Hence, no active elements are required on the RIS side. Moreover, both of those works proposed a machine learning assisted channel estimation, which is relatively heavy in computation, especially when the RIS size is large. Since in this work, we deploy the proposed model in an indoor scenario to improve the indoor transmission quality, VOLUME 4, 2016 we might face a challenge regarding the sparsity level due to the limited size of the indoor area environment. Specifically, end-user devices might be located in the near-field region of the RIS, especially in the large-scale RIS system. Indeed, this situation reduces the sparsity of the channel. Since the MP algorithm is heavily dependent on the channel sparsity level, we expect that the typical MP algorithm performance might be degraded significantly when the transmitter and receiver are close to RIS. Hence, we have come up with a sub-array training for matching pursuit-based beamforming algorithm.
The near-field and far-field depends on the largest dimension of the antenna, which in the case of square RIS is the diagonal. Thus, we logically divide the whole array into multiple sub-arrays, each of which has a smaller aperture. This division guarantees the far-field condition of the overall system. As illustrated in Fig. 3, the training pattern is loaded to each sub-array first. Then, the channel is estimated by using the MP algorithm based on the measured received signal. Finally, the phases of the reflection coefficients are set to the quantized and conjugated phases of the estimated channels. In this subsection, we propose an MP algorithm to exploit the sparsity of the angular domain of RIS channel gain vector h. MP is one of the greedy sparse estimation algorithms that was first introduced in [38] which finds the most matching projections of the data into the span of an overcomplete dictionary. MP algorithm decomposes a signal into a linear set of basis functions. Through the iterations, the MP algorithm chooses the basis functions that best match the signal in a greedy manner, removes the signal component having the form of the selected basis function, and obtains the residual.
As in (9), the model in this work can be expressed as Y = h G. Therefore, to exploit the sparsity value, first, the model should be transformed by using a Fourier transform. This transformation is performed to transform the RIS channel gains into the angular domain. Hence, the model can be expressed as where F is the discrete Fourier transform matrix, and F −1 is the inverse of the discrete Fourier transform matrix. The transformation matrix F with -points is formulated as where = −2 / is a primitive th root of unity in which 2 = −1. The h F vector obtained from (14) is then used in the MP algorithm as explained in Algorithm 1. As aforementioned, the MP algorithm is a greedy sparse estimation algorithm that utilizes the highest correlation between the transmitted signals and the residual, where in this case, the received signal Y is used as the initial residual.
where the is the sparsity level indicating the iteration number, and˜ is the index of the vector with maximum correlation value. The new residual at the th iteration is then calculated as The above steps (16) and (17) are then repeated times. Then, the optimal channel can be calculated as The optimal phase is then extracted from the channel as Due to the limited number of the RIS state, the phase is then quantized to two available states as in (4). After the quantized optimal phase is obtained, the phase is then loaded to the RIS. The flowchart of the proposed MP beamforming algorithm is depicted in Fig. 4.

IV. RIS HARDWARE DESIGN
In this section, the hardware design of the proposed RIS testbed is presented. The RIS testbed can be seen in Fig.  5(a). The RIS board is connected to a separate power board to receive regulated power. As shown in Fig. 5(b), the RIS testbed consists of four identical sub-boards. Each sub-board has 64 unit cells, formed in 8 × 8 unit cell formation. In total, the RIS has 256 unit cells (i.e., 16 × 16 unit cells). The sub-board is designed as a modular board such that the number of unit cells in the RIS can be extended easily in a "plug-and-play" manner, as simple as attaching another sub-board to the existing RIS.

A. UNIT CELL DESIGN
The unit cell is designed in a rectangular shape ( Fig. 6(a)). As shown in Fig. 6(b), a unit cell consists of three layers. The unit cell parameter values (see Table 1) are obtained from the simulation and optimization by using CST Studio software. The proposed RIS is designed to work in 5.8 GHz and fabricated on a ROGERS RO4350B substrate with loss tangent (tan ) 0.0031 and permittivity ( ) 3.6. Albeit some works show that RIS is useful to mitigate the path loss in the mmWave frequency band, we decided to conduct the experiment at 5.8 GHz. We selected 5.8 GHz as the target operating frequency since 5.8 GHz frequency is a part of the free and pervasive industrial, scientific, and medical (ISM) band. In addition, 5.8 GHz is chosen as the operating frequency to minimize the challenges of the experiment setup that might occur in the mmWave band. These challenges include the high cost of the mmWave transceiver and the RIS design complexity. Moreover, one of the main contributions of this paper is to validate the theory and hypothesis that the RIS improves wireless communications quality through the experiment rather than to implement the model itself in the mmWave frequency band.
To control phase of the incident wave, a PIN diode is  connected to each of the unit cells. As displayed in Fig.  6

RIS Power Board
The reflection coefficient can be obtained from where is the radiation impedance of the unit cell. The structure of the unit cell is designed such that it can provide the appropriate value of to obtain a 180 • phase shift between ON and OFF states at the operating frequency. With the proposed design, 180 • phase shift between ON and OFF states at 5.8 GHz can be achieved (see Fig. 7). This result is in accordance with the measurement result of the fabricated unit cell. In the simulation result, a 180 • phase difference between ON and OFF states at 5.8 GHz is achieved, while in the measurement result, the frequency with the correct phase shift value is slightly lowered. The imperfection of measurement setup causes this slight difference, which is acceptable.
As shown in Fig. 6, a butterfly stub RF choke is designed for every unit cell and is placed in layer 3 of the RIS part to prevent the RF power from leaking to the DC source, which might affect the performance of the RIS itself. Fig. 8

B. CONTROL CIRCUIT DESIGN
In order to control the state of each unit cell, a control board consists of a combination of 8-bit D-flip flop IC, 8bit decoder IC, and 8-bit shift register IC (see Fig. 9) is designed. We use the shift register IC to load the state of each unit cell (i.e., ON or OFF). Then, the output of each shift register IC is connected in parallel to the D-flip flop ICs. Each output pin of the D-flip flop IC is connected to the input of the PIN diode for controlling the state of the unit cell. One D-flip flop IC corresponds to one column. Since there are eight columns, eight D-flip flop ICs have been used. Finally, to enable the selected column, an 8-bit decoder IC is used. In addition, since the shift register IC is equipped with an output for cascade shift register configuration, we make use of it to connect one sub-board to another. The control board layout is presented in Fig. 9.

V. SIMULATION RESULTS
To simulate the proposed model, first, we have made the RIS simulator environment by using the MATLAB software. Then, we conducted some simulation tests and analyzed the results. Fig. 10 shows the coordinate systems for the RIS and the antennas. Note that in the model, a spherical coordinate system is used for the simulations and experiments. The transmitting and receiving antenna locations are denoted by ( , , ) with respect to the RIS position. The RIS is located at (0 m, 0 • , 0 • ). In the simulation, the whole-array MP training algorithm is implemented on an RIS with 16 × 16 unit cells. For the first test, we want to validate the capability of the proposed algorithm to focus the beam at the designated angle. Hence, we vary the of the receiver from 10 • to 50 • and set the value of r and of the receiver to 10 m and 90 • , respectively. In addition, the transmitter is placed at (2 m, 90 • , -30 • ). The result is shown in Fig. 11. From the estimated phase window, it is observed that the proposed algorithm can estimate the actual (theoretical) phase accurately. On the "True Magnitude (FFT)" window, the peak of the focused beam is displayed and is also estimated accurately by the proposed algorithm (see "Estimated Magnitude (FFT)"). This focused beam location corresponds to the receiver position. The peak of the beam when we steer it to 30 • is located in the middle of the window because at 30 • , the reflected beam is right at the specular reflection angle of the RIS since the transmitter is located at -30 • . In this test, 256 sparsity levels and 128 training patterns are used.
The sparsity level denotes the sparsity that is taken into account in the MP algorithm. A smaller value of sparsity level means we assume that the channel value is sparser. In the algorithm, the sparsity level corresponds to the number of iterations. As displayed in Fig. 11, when the iteration is increasing, the received power is starting to improve. Even though we set the sparsity level to 256, the received power starts to reach its steady-state at around 40 iterations. The iterations needed to reach its steady-state is inversely proportional to the actual channel sparsity. A sparser channel means smaller iterations required to achieve the steady-state. In this test, 40 iterations is needed to achieve the steadystate, which means the channel is not quite sparse. However, the proposed algorithm can still estimate the channel and steer the beam to the designated angle.
To validate the hypothesis that the sparsity is proportional to the distance, the receiver distance from the RIS is varied. In this test, 128 sparsity level is used. As shown in Fig.  12, when the receiver distance is increased, the phase is changing from the spherical shape into a more plane shape. This is in line with the radiation pattern theory, where the spherical wave in the near-field tends to be a plane wave in the far-field. Then, as the channel becomes sparser, we expect to see a smaller high-power region in the magnitude in the angular domain. This matches with the result displayed in the "Magnitude (FFT)" window in Fig. 12, where the high-power region of the beam is getting smaller according to the distance.

A. EXPERIMENT SETUP
In this section, we present the experimental results of the RIS-aided communications. The devices used in the experiments are shown in Fig. 13(a). In this work, a softwaredefined radio (SDR) NI USRP 2944 with a frequency range from 10 MHz to 6 GHz is used. In addition, a pair of horn antennas are used, each of which is for the transmit and receive antennas. A software code for testbed control consisting of OFDM transmitter code, OFDM receiver code, BER and SNR calculation code, UDP video streamer, RIS MP algorithm code, and RIS controller code is written in LabVIEW NXG. We then measure the received signal, compare it to the transmitted signal, calculate the BER and SNR, and plot the constellation. Moreover, three RF absorber walls are used to create a controlled environment isolated from the external multipath, thus making it easier to analyze the proposed model characteristic and performance. To display the pattern of the RIS, an LED indicator is connected to each of the unit cells of the RIS, which is turned on when the state of the unit cell is ON. The overall experiment setup is shown in Fig. 13(b).
Considering our objective to aid the indoor wireless communications quality, we limit the receiver distance from the RIS. However, due to the relatively low channel sparsity in the near-field, the challenge is that the MP algorithm might not work in this kind of environment. Hence, we conducted experiments to prove whether the algorithm can perform well in an indoor scenario. In addition, we intentionally made a challenging environment by transmitting the signals in a low transmit power level and receive gain.
In the experiments, we conducted several tests. First, we validate the steering capability of the proposed model by fixing the transmitter position at (1.2 m, 90 • , -30 • ) relative to the RIS, and vary the receiver position ( ) from 10 • to 50 • . We also conducted a cross-polarization test. After that, we compare the performance of the proposed sub-array MP training algorithm with the whole-array MP training algorithm and Hadamard beamforming algorithm. We then vary the number of training patterns. After that, we vary the receiver distance from the RIS. For the modulation test, we transmitted the signal with three different modulation schemes and analyze the received signals. Further, for the practical application, we also streamed a video through the RIS.
The whole peer-to-peer communication scheme is shown in Fig. 14. One USRP is used to transmit and receive the signals. In the software code, the performance metrics such as BER, BLER, FER, SNR, and constellation are calculated. In addition, a video is streamed through a wireless channel with user datagram protocol (UDP).
The communication code is divided into two parts, the transmitter stage, and the receiver stage. In the transmitter code, user data, which can either be random ones or video data, is generated in the host computer (PC). Then, headers such as length indicator (LI) and sequence number (SN) are added. After that, by using DMA FIFO, the data is passed to the USRP FPGA. In the FPGA, the data goes through channel coding (CRC and LDPC) and modulation. After the modulation step, the reference, pilot, and sync symbols are added to the data. The reference and pilot symbols are used for the channel estimation. In addition, the sync symbol is generated by using the Zadoff-Chu sequence and added to  the start of a frame for the time synchronization function. After that, a guard band is added. Lastly, we implemented IFFT transformation and add a cyclic prefix (CP) to the data before passing it to the transmit antenna.
Then, the signal is passed through the wireless channel, reflected by the RIS, and received by the receive antenna. The receiver stage process is quite the opposite of the transmitter stage. After the antenna of the USRP receives the signal, the synchronization step is implemented by matching the received signal to the reference sync signal. Then, a frequency compensation process is implemented to compensate for the frequency drift. After that, the CP is removed, and an FFT transformation is implemented. Then, the guard band, sync symbol, and pilot symbol are removed. After the removal, the data is passed through the equalization step by utilizing the channel gain obtained by using the reference symbol. Then, the data goes through the demodulation and channel decoding steps. Finally, the data is passed to the PC using DMA FIFO and displayed on the monitor, which can be either a streaming video or a set of random data. In the PC, the constellation diagram is then displayed. Furthermore, the BER and SNR are calculated by using (23)- (24). Note that a weighted moving average filter is used to calculate the BER as follows.

BER = Number of bit error
Number of transmitted bit , (24) where BER represent the filtered BER value, BER represent the BER value at the index th, represent the moving average coefficient, ( , ) is the transmitted data, and ( , ) is the received data.

B. EXPERIMENT RESULTS
First, we validate the steering capability of the RIS with the proposed MP algorithm by measuring the radiation pattern. Note that the spacing between elements is extended to 0.7 instead of 0.5 to minimize the inter-element coupling. Consequently, a relatively large grating lobe has been observed (see Fig. 15). Furthermore, it is observed that for the case of 40 • and 50 • , the sidelobe is larger than the other cases. However, as we can see in Fig. 15, the RIS is still capable of steering the beam to various elevation angles, from 0 • to 50 • by using an MP algorithm.
In this work, the RIS board is designed to work as a linear polarization reflector. Hence, if we rotate the receiving antenna, we expect the RIS cannot work well. To validate it, a test is conducted. We turn the receiving antenna 90 • under the same test environment and measure the radiation pattern. As shown in Fig. 16, even though the RIS still can form the beam toward the designated receiver angle when the receiving antenna is rotated (cross-polarization), the magnitude is very weak.
After validating the capability of the proposed RIS, we then compared the performance of the proposed algorithm with the adaptive Hadamard beamforming algorithm used in [13]. We placed the transmit antenna at (1.2 m, 90 • , -30 • ) and the receive antenna at (2 m, 90 • , 20 • ) relative to the RIS. As mentioned before, although the Hadamard beamforming algorithm is expected to obtain the channel better, there is a training overhead. Since the number of training patterns is equal to the number of unit cells, the training time is proportional to the number of unit cells, which can be a problem when the number of unit cells is large or when the receiving device moves relatively fast. On the other hand, since the MP-based channel estimation exploits the sparsity level, usually the number of measurements, or in this case training patterns, is significantly smaller.
As displayed in Figs. 17    transition gap between the optimal steady-state and when the training time is finished in the BER plot. This result does not reflect the performance or the characteristics of the algorithm. The gap occurred because, in the BER calculation (24), a weighted moving average filter is used. Therefore, although the BER has changed instantly after the training has been done, it appears that the BER result takes time to reach the filtered BER steady-state due to the moving average filter. Further, the proposed whole-array MP training algorithm (MP whole) cannot achieve the optimal state. This result is expected and in line with the theory. Since the receiver is located in the near-field of the whole-array RIS, the channel sparsity is low. Consequently, even though we used 256 training patterns, the MP algorithm cannot work well. In this test, 256 and 64 sparsity levels are used for the MP whole and MP sub, respectively. In this work, the sparsity level defines the sparsity level assumption taken into account in the MP algorithm. The sparsity level is corresponds to the number of iterations, which proportional to the algorithm complexity. Since the following experiments are conducted in the same indoor environment, sub-array MP training algorithm will be used. In addition, 64 sparsity level will be used since the algorithm complexity is not a critical concern in the experiments. The QPSK constellation diagram result of this test is presented in Fig. 19.
One of the main advantages of CS is that the number of measurements required to estimate the signals accurately is small. Hence, we vary the number of training patterns, which equal the number of measurements in the MP algo-This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Further, when the number of training patterns is reduced again to 8, the algorithm cannot work anymore. This because the number of training pattern is insufficient to properly estimate the channel. In a scenario when training time is critical and slight performance degradation is acceptable, a smaller number of training patterns can be used. Since training time is not critical in the experiments, for the next tests, 32 training patterns are always used. Note that while the number of training patterns affects the training time, the sparsity level (iteration) affects the algorithm complexity. Therefore, the number of training patterns and sparsity level should be carefully decided by considering the application type.
In the next experiment, while we keep the transmitter position at (1.2 m, 90 • , -45 • ), we vary the receiver distance from the RIS from 1 m to 5 m. In each distance variation, we re-do the training, transmit an OFDM signal with QPSK modulation, then calculate and plot the BER and SNR results. As expected, when the distance is larger, the received signal power is reduced. However, the proposed model still manages to improve transmission quality significantly. As depicted in Fig. 21, when the proposed model is used, we can achieve the BER as low as 6.322E-8 (in the case 1 m) compared to 0.153 when the RIS is not trained (all states are OFF). The improved SNR result is depicted in Fig. 22. From the constellation figure (Fig. 23), it is evident that the proposed model can significantly improve the transmission quality.
We then transmitted an OFDM signal with three different modulation schemes. The transmitter is placed at ( with QPSK modulation, 5.74E-6 with 16-QAM, and 4.58E-4 with 64-QAM. In terms of SNR, the proposed models can improve the SNR up to approximately 6 dB in any modulation scheme (Fig. 25). In line with the modulation theory, the BER of the QPSK is the lowest among those three modulation schemes, followed by 16-QAM and 64-QAM, respectively. As shown in the constellation diagram (see Fig. 26), intuitively, it is observed that the proposed model can significantly improve the communications quality.

RIS off
CS MP 1 meter 2 meter 3 meter 4 meter 5 meter In the last experiment, we streamed a video with 1920 × 1080 pixels (FHD) resolution, 60 fps, and 3445 kbps data rate for testing the practical application scenario. It is observed that when the RIS is employed, the video SNR can be improved by 12.65 dB to 27.19 dB (smooth transmission) compared to 14.54 dB without the proposed model (cannot be streamed at all). The video transmission process can be seen on [1].

VII. CONCLUSION
In this paper, a 1-bit 5.8 GHz RIS-aided indoor wireless communications model has been proposed. We designed and fabricated a 1-bit RIS testbed consists of 16 × 16 unit cells. We also proposed a CS-based MP adaptive beamforming algorithm that can steer and focus the beam toward the receiver position. We then transmitted an OFDM signal with QPSK, 16-QAM, and 64-QAM modulation schemes to demonstrate the proposed system. By implementing an MP-based beamforming algorithm on the RIS testbed as a reflector between the transmitter and receiver, the BER and SNR of the communications can be significantly improved. In addition, an RIS-aided video streaming is also demonstrated. In the video streaming demonstration, it is observed that the proposed RIS is able to aid the streaming quality in a notable manner. Finally, we expect that the RIS employment can be used to improve the quality of the future wireless communications.