Sensing and Reconfigurable Reflection of Electromagnetic Waves From a Metasurface With Sparse Sensing Elements

Reconfigurable reflective surfaces can form prescribed radiation patterns given a known incident signal, a capability with widespread use for beamforming in radar and imaging systems or for altering the propagation environment in wireless communication networks. For reflective surfaces to operate intelligently, they need to acquire the relevant information about the incident and reflection directions autonomously. Toward this goal, we design a metasurface that can generate reconfigurable radiation patterns as well as perform compressive sensing of the incident signals, allowing it to adapt its response without requiring feedback loops or dedicated links to transmitters or receivers—paving the way for autonomous and smart operation. To realize such an operation, we propose a metasurface consisting of two types of elements, conventional and hybrid. While both elements are designed to reflect the signal, the hybrid ones allow coupling of a small portion of the incident signal into a sensing layer. To ensure low loss and complexity, the number of hybrid elements and the associated sensing circuitry need to be kept small, which can degrade sensing performance. To circumvent this issue, we develop a compressive sensing scheme that leverages the inherent multiplexing of information within the metasurface’s substrate to retrieve relevant information using a few sensing RF chains, thus guaranteeing low cost and complexity. As an illustrative example, we numerically demonstrate the possibility to detect angles of arrivals of single and multiple incident beams using full-wave simulations of the proposed structure. We also show that the proposed metasurface can form desired radiation patterns and the introduction of the sensing capabilities has a minimal impact on its main functionality. The proposed smart reconfigurable surface with sensing capabilities may operate autonomously and can benefit wireless communication, wireless power transfer, and imaging systems.


I. INTRODUCTION
Reconfigurable reflective surfaces can realize desired radiation patterns given a known incident signal. They are extensively used to form prescribed patterns in radar, imaging, communication, and remote sensing systems [1], [2], [3], [4]. With the advent of metamaterials and metasurfaces, more advanced reflective surfaces capable of exotic The associate editor coordinating the review of this manuscript and approving it for publication was M. Shamim Kaiser . and complicated beamforming have been reported [5], [6], [7], [8]. More recently, the proposal for smart radio environment [9] has exponentially increased the interest in reconfigurable reflective surfaces which are usually referred to as reconfigurable intelligent surfaces (RISs) in the context of smart radio environment. In this emerging concept, the reconfigurable reflective surfaces or RISs are envisioned to allow controllable propagation of information-bearing signals based on the status of the channel [10]. For example, one can cover blocking objects with RISs in order to recycle the signal power that was otherwise wasted in an ordinary communication channel. Such reconfigurable control of electromagnetic waves renders the communication channel into a design knob. Inspired by RISs' promising attributes, the research on RIS-empowered communication has attracted an exponentially growing interest recently [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25], [26].
When designing the reconfigurable reflective surfaces for traditional applications such as radar systems, the locations of the sources or the characteristics of the incident waves are conventionally known. However when the reconfigurable reflective surface is used as an intelligent agent in a communication system, it needs to know about the transmitters, receivers, and the propagation environment-quantities that can change rapidly. In communication systems, this information would be encapsulated in the channel state information (CSI). The use of a RIS in a communication system is thus paramount to providing the RIS with the necessary CSI [14], [27]. This cardinal requirement for RIS to perform its function is often overlooked in the literature. Yet, realizing the full potential of RISs necessitates the knowledge of the environment with high spatial resolution.
To address this challenge, various channel sensing methods have been proposed. The most common one is a joint-channel estimation model for a cascaded transmitter-RIS-receiver channel [28], [29]. This approach is computationally complex and increases network management requirement on the communication systems. In addition, separating individual channels from the join-estimation model is a tedious task. To circumvent this issue, recent works have proposed using an external receiver that detects signal impinging on a time-space coded metasurface [30], [31]. While this method allows for simultaneous sensing and reflection, it requires the use of an additional receiver away from the RIS. Furthermore, enabling temporal modulation of the metasurface's response brings additional complexity to the overall architecture. Alternatively, inspired by the so-called beamforming codebook recommended for millimeter-wave systems [32], several works have proposed eliminating the necessity of channel sensing at the RIS through beam training techniques [33], [34], [35]. However, to derive adequately diverse information from the codebook during training the effective rank of the codebook needs to be equal to, or at least very close to the total number of elements on the RIS. As a result, the training overhead becomes extremely large which is especially undesired in a volatile channel. In a different approach, a look-up table has been used to estimate the channel at a particular type of RIS termed as ABSense [36]. ABSense operates in full-absorption mode to sense the channel by iteratively matching wave impedance at each element followed by estimating the electromagnetic traits of the incoming signal from a large look-up table. However, this technology is still under development and may require complex channel sensing protocols, especially when encountered with multiple signals. In an alternative approach, a few elements of the RIS are dedicated to sense the incoming signal in both polarizations in [37]. A similar configuration was later proposed in [38]. Yet, these approaches do not retain the full spatial resolution of the sensed data on the RIS surface as the channel data at most of the elements are not available for channel estimation. In an interesting recent attempt to circumvent the need for acquiring knowledge about the orientation of the RIS with respect to the environment, it is proposed to add a gyroscope to sense the motion of RISs. This gyroscope allows the RIS to adapt its response based on the changes to its spatial position [39]. Such a self-adaptive feature endows the metasurface to operate with arbitrary relative orientations. However, it may not be useful for a stationary metasurface operating in a dynamic communication channel. Additionally, a gyroscopic motion sensing mechanism does not sense the information-bearing signal which is crucial to deduce CSI. These challenges of CSI acquisition in smart radio environments has been addressed by proposing a RIS with simultaneous sensing and reflection functionalities in [40] followed by preliminary communication and information theoretic studies in [41]. While these works utilize a generic RIS model that can sense CSI, they do not provide a methodological description of the sensing hardware and its operation. In a subsequent work, a detailed description of such an integrated channel sensing operation is presented with demonstrations of compressive sensing [42]. However, the RIS configuration in [42] did not fully utilize the advantages of compressive sensing as the wave coupling mechanism is assumed to be present at all the elements of the RIS. This results in extremely complicated circuitry and additional loss of the incident signal. Besides, the CSI retrieval methodology in [42] is demonstrated only for a single user which significantly limits its scope of operations in a real-world setting.
In this paper, we present a one-dimensional reconfigurable reflective surface with compressive sensing capability that can pave the way for an autonomous smart reflector. Toward this goal, we improve upon the work presented in [42] by designing a one-dimensional RIS that only requires a few receiving RF chain to acquire knowledge about the channel. This is in contrast to the design in [42] where all the elements of the RIS were connected to the sensing network. As a result, we can reduce the losses experienced by the incident signal. To demonstrate the ability to sense the propagation environment from such sparse data, we computationally process the sparsely sampled signals to obtain relevant CSI. Toward this goal, we show the proposed RIS's ability to detect single and multiple angles of arrival (AoAs) which is a paramount attribute of the channel status and can be used to localize targets and/or determine the beamsteering directions. We also verify that the proposed hybrid RIS with sensing capabilities can redirect the reflected signal toward desired directions.
An important point to note is that we assume free-space propagation environment where the primary task of the RIS is to sense and redirect an incident signal toward a desired direction. However, an RIS at this frequency range may also be used in indoor environment where multiple scattering is present. In such an environment, the proposed RIS with sensing capabilities can still obtain relevant information about the environment, however, the features of interest (AoAs, their distribution, etc.) and the action to be taken based on that information may be different. As a result, the methodologies to infer and use the channel state information in rich scattering environments may be different and requires their own set of studies. It is also worth emphasizing that the envisioned role of RIS is not always to improve communication signals. Even in an indoor environment with rich scattering, there may be instances where the role of RIS is to focus energy on a sensor or a device for power harvesting. In this case, the free space assumption is valid since those receivers are usually in the LOS of the RIS. The proposed RIS can track the direction of the transmitter or receiver in such a wireless power transfer (WPT) system. Again, that would require its own set of studies. We believe the concepts presented in this manuscript pave the ground for such studies.
The rest of the paper is organized as follows: In section II, we detail hardware architecture of the proposed RIS followed by a description of the simulation setups. In section III, we outline our proposed channel sensing mechanism. The simulation results demonstrating the possibility to detect one or several AoAs are presented in section IV. In section V, we show the reconfigurable reflections of signals from the RIS by presenting a few examples of signal redirections. We conclude by summarizing the findings of the paper and outline future outlook of smart reconfigurable surface in Section VI.

II. A RIS WITH COMPRESSIVE SENSING CAPABILITY
In this section, we design a RIS with integrated sensing capability. Toward this goal, we need to introduce a mechanism into the RIS (which is usually designed to reflect the signal) to couple a portion of the incident signal into another layer for sensing purposes. To accomplish such an operation, the primary design objectives are as follows: 1) the coupling need to be kept small to ensure the loss of the incident/reflected power due to sensing is minimal. The acceptable level of losses would depend on the particular application and receiver noise and requires a thorough investigation of its own and is left for future works. 2) The sensing mechanism needs to be only introduced into a few elements to keep the loss and complexity minimum. As a result, the RIS will consist of two types of elements: a) conventional ones which mostly reflect the signal, and b) hybrid ones that are connected to a receiving circuitry. 3) Both hybrid and conventional elements need to exhibit reconfigurable reflected phase or equivalently tunable reactive effective surface impedance such that they can redirect the reflected beams toward desired directions. 4) To compensate for using a few receivers, we need the signal collected by each hybrid element to contain information from the signal incident on all elements. As a result, a nonnegligible amount of element-element interaction is desired to allow for multiplexing of the incident signal.  Given these requirements and inspired by the previous design in [42] we select a RIS consisting of conventional mushroom structures [43]. It should be noted that the proposed operation is not limited to mushroom structures and other meta-atom structures such as cELC resonators [44], [45] or patch elements can also be used [46], [47], [48]. For demonstration purposes, we designed the RIS to operate at the widely used frequency of 5.8 GHz. It is worth emphasizing that the proposed design and operation can be easily extended to other frequencies by modifying the geometry and/or using different switchable components.
In our proposed configuration, each of the mushroom structures (referred to here as meta-atom) is loaded with a varactor diode to enable element-wise tunability. To be consistent with practical implementation requirements, we have used the capacitance range of commercially available MACOM MA46h120 varactor for all the studies discussed in this paper. To provide each element with the necessary DC signal, we need to introduce an annular slot around the conductive via of the mushroom structure. Generally, a radial stub is added at the end of the via to mitigate coupling of RF signals to the DC circuitry [49], [50]. In [42], the annular slot was leveraged to couple a portion of the incident signal to a waveguide for sensing purposes at around 19 GHz. We will consider a similar architecture here as well. However, at 5.8 GHz, this annular slot may need to be undesirably large to allow for coupling of the wave. To overcome this issue, we have introduced a simple rectangular slot on the ground plane of the hybrid elements to couple the incident signal to the collecting waveguides.
To guide the coupled signal from hybrid meta-atoms to the receiving modules, we selected substrate integrated waveguides (SIWs). Unlike other transmission lines such as stripline or microstrips that may suffer from cross-talk and spurious radiation losses, the conducting walls of the SIW confine guided waves within itself, thus reducing the losses. The elements designed with these considerations to satisfy the criteria outlined earlier are shown in Fig. 1. In Fig. 1(a), we see the conventional meta-atom with no collecting waveguide. In Fig. 1(b), we see the hybrid element which can couple a portion of the signal into a SIW. We designed these elements using full wave electromagnetic solver Ansys HFSS. The reflecting surface of the mushroom structure is chosen as a square patch surrounded by a conducting outer layer. We modeled all the conductive layers as copper. The substrate of the reflecting conventional and hybrid meta-atoms, as well as the one used to implement the SIW, is Rogers RO4003 of 1.52 mm thickness. As shown in Fig. 1(a) and Fig. 1(b), we applied perfect electric conductor (PEC) and perfect magnetic conductor (PMC) boundary conditions around the airbox on top of the meta-atom and its substrate to imitate an infinite 2D planar array.
Our goal in designing elements in Fig. 1 is to ensure most of the signal is reflected. In the meantime, we want to ensure both elements exhibit a resonance near the design frequency so we can alter the reflection phase (or equivalently the effective surface impedance) by changing the varactor capacitance. With these two criteria in mind and given the range of capacitances, we ran parametric sweeps to arrive at desired dimensions, the result of which are presented in Fig. 2. In this figure, we denoted the conventional and hybrid meta-atom configurations with w/o SIW and w/ SIW, respectively. We can see the |S 11 | of both elements, as shown in Fig. 2(a), exhibit reflections above −3 dB (i.e. most of the signal is reflected). We also see a dip in |S 11 | near our design frequency, which corresponds to a resonance, which can be used to change the effective impedance of the meta-atom, as shown in Fig. 2 We clearly see that the effective impedance of both elements changes as we tune the capacitance of the varactor, a capability that is needed for beamforming.
When designing the hybrid elements, we need to satisfy an additional criterion: A tangible portion of the signal needs to couple to the SIW. The amount of coupling can be controlled mainly by altering the dimensions of the rectangular slot on the ground plane of the meta-atom. We considered a level of coupling above −20 dB satisfactory for our design. Note that this level needs to be established based on the application and noise level of the receivers. Here, our focus is to show that this coupled signal can be utilized to retrieve information about the environment. The examination of the acceptable level of coupling is left for future work. To monitor the amount of coupling in our studies, we examined the |S 21 | for the ports shown in Fig. 1(b) as we changed the dimension of the SIW and the slot. The acceptable dimensions of a rectangular slot and its location are shown in Fig. 1(b). The dimensions of the SIW in this figure correspond to the cutoff frequency of 4.5 GHz.
It is important to note that the presence of the SIW and the coupling load the meta-atom and shift its resonance frequency. Furthermore, increasing the level of coupling can have two other implications: the amount of reflected signal decreases which may not be acceptable in some applications. However, that can be compensated by reducing the number of hybrid meta-atoms. Examining this trade-off is an interesting future work. The second implication of increasing coupling is that hybrid elements become drastically different from other elements which may complicate beamforming. Again, reducing their numbers may alleviate this impact and its investigation is left for future work.
The accuracy of signal detection during sensing operations is subject to the inter-element spacing of the RIS. Furthermore, the inter-element coupling can impact the beamforming operation during reflection [51], [52]. Therefore, the selection of element size and inter-element separation is a crucial factor. If the inter-element distance is selected to be too large, it can result in poor beamforming quality while a very small spacing increases the coupling between meta-atoms which requires more complicated design processes and increases implementation cost and complexity. Therefore, a distancing of a quarter wavelength in free space at the frequency of 5.8 GHz appears to be a practical middle ground.
To better understand the importance of element-element coupling, we should note that we intend to introduce only a few hybrid elements into the whole RIS. Without the inter-element coupling, these elements would only capture the information incident on them and we would lose the spatial information. Furthermore, since the elements would be placed at electrically large distances apart, AoA detection would become complicated. By leveraging the elementelement interaction, the signal coupled by each hybrid VOLUME 10, 2022 meta-atom to the guiding SIW is a (random) combination of signals incident on all elements. Here, we can introduce an idea previously used in compressive imaging [53], [54] to obtain new measurements of the incident signal. By changing the varactor capacitance distribution-referred to here as a mask for brevity-over the RIS, we can alter the multiplexing inside the substrate, thus obtaining a new measurement of the incident wave by simply changing the masks of the RIS. This way, we can reduce the number of receivers while augmenting the information about the incident signal in the sparsely sensed data. By applying computational techniques to the signal measured in this manner, we can reconstruct the pertaining information about the incident signal (e.g. its AoA).
The proposed RIS is an integration of the two meta-atom configurations outlined above through a shared substrate.
We have presented such an RIS in Fig. 3 along with our simulation setup. To keep the computational complexity at a reasonable level during simulation, the RIS is modeled with 36 meta-atoms allocated on a one-dimensional array of roughly 10λ. It is designed to sense and reflect incoming signals in 2D-the XZ plane in Fig. 3. For sensing, only five meta-atoms with sensing capabilities are distributed non-uniformly across the 1D RIS structure. They can be identified by five SIWs as shown in Fig. 3. In our simulation studies, we modeled the incident waves as plane waves with Y polarized electric fields. In addition, we emulated a 2D RIS plane extending infinitely in the Y directions by assigning PECs on the boundaries of the airbox parallel to the XZ planes. The PEC boundaries are extended to the substrate of the RIS. To allow signal propagation inside the SIW, we set its length, oriented along the Y-axis, to be above one wavelength so higher order modes have decayed. We terminated SIWs with matched layers to reduce simulation time. In a practical scenario, one can imagine that each SIW would be connected to a receiving RF chain which is excluded in our analyses as that is beyond the scope of this paper. Instead, since the signal sensed at the end of the SIW and collected by a receiving circuitry would be a linear function of the electric field inside the SIW, we monitor the electric field at the end of the SIW for sensing purposes.

III. SIGNAL MODEL AND DISCERNED DETECTION
As an illustrative example of the application of the proposed reconfigurable surface, we demonstrate its ability to detect AoA, which has many applications in wireless communication, radar, and wireless power transfer [55], [56], [57], [58]. In the proposed RIS structure with integrated sensing capability, the absolute phase of the incident signal cannot be measured since the reference plane of the signal is usually not known. To overcome this problem, conventional methods usually use the phase difference between adjacent receivers (or their time delay) which can exhibit a one-to-one relationship with the incident angle. This simple solution does not work in our case for two reasons. We have placed the receivers a few wavelengths apart, which can result in ambiguous phase measurements. Furthermore, the signal sensed by this RIS multiplexes inside the substrate before reaching the SIW waveguides. As a result, there is no obvious correspondence between the difference in the measured phase of the received signal and the AoA of the incident signal.
To better illustrate the nontrivial relationship between the difference in the received signal and the AoA, we present the differences of received complex signals between the adjacent SIWs,g, for three different AoAs in Fig. 4(a). In this figure, the color-coded Index numbers denote the measurement indices. For instance, Index 2 denotes the measurement index of the difference between the complex data received at 2 nd and 3 rd SIWs. It is evident that the difference between the sensed data for each AoA is unique and there is a distinct yet nontrivial relationship between each AoA and the corresponding differential data. Therefore, although the classical relation between the phase difference and the AoA can no longer be applied directly, a computational algorithm can use this relationship to estimate the AoA. For instance, [42] used a sensing matrix of prerecorded phase differences. The shortcoming of this approach is that it excluded the amplitude of the received signal, thus disregarding half of the useful information and rendering the problem into a nonlinear inverse problem. In this paper, we leverage differences in the complex signal between received signals to maintain the linearity of the the estimation problem.
The ability to solve such commonly undetermined problems depends on the number of uncorrelated measurements that we can make of the unknowns. The set of data in Fig. 4(a) is only depicting 4 measurements for a set of unknowns (AoAs) which can be much larger. To augment our measurement of the incident signal, we leverage the multiplexing nature of the metasurface. This idea has been used before for implementing computational microwave imaging [59] and is extended here to detect AoA. The underlying idea is as follows: When tuning the metasurface with random masks, it results in the signal incident on all elements to be multiplexed with random weights before coupling to collecting SIWs. By changing the random masks, we can thus change the random weights of the analog combining of the signal and obtain new measurements of the incident signal, even when using a single frequency [60].
In previous works, this idea was used to detect signals reflected from targets in the scene to image them [61], [62]. Here, we propose using it to detect AoAs. To illustrate this point, we plotted the differences in complex data for AoA of 15 • for three different random mask configurations in Fig. 4(b). We see drastic changes as the random masks change. It is worth noting that the masks of a RIS can be changed within a fraction of the coherence time of a typical wireless channel.

A. SENSING PROTOCOL
Although there is a distinct correlation between the differential data and individual AoA, there is no well-defined link between the two. Furthermore, the incident AoA(s) can take any value from a continuous range. However, we only need to detect the AoA with a precision that is less than the beamwidth of the beams that can be reflected from the RIS. In other words, a small error in detecting the AoA is tolerable in most practical settings as far as the deviation of the estimated AoA from the actual one is less than one half of the half power beamwidth (HPBW) of the beam formed by the RIS. Given this consideration, we can discretize the potential range of AoAs (which is a continuous variable) into bins of the same width as the RIS beamwidth. This is similar to discretizing the imaging domain into diffraction-limited voxels or pixels in computational imaging [53], [63]. In this manner, we can recast the AoA estimation as one where we try to assign the AoA to a set of predefined discrete angles. This problem can thus be formulated as a discrete parameter estimation based on a reference table referred to here as the sensing matrix.
Toward this goal, we populated a sensing matrix using HFSS full-wave simulation of the proposed structure for AoAs between −60 • and 60 • with 5 • increment leading to 25 bins (0 • is broadside direction). Any AoA incident within the values of each bin is then estimated to be from the angle at the center of that bin. The choice of 5 degrees and its relevance to the accuracy of estimation will be discussed later. For each AoA in the sensing matrix, we recorded differences of the signals from five SIWs for six random masks. Then, we concatenated data for each AoA on a column vector and normalized them to their maximum. The sensing matrix, H, thus contains 25 columns for all possible AoA bins, and 24 rows for four samples from each of the six masks.
In this paper, we use binary masks due to their simple implementation. The choice of capacitances for the masks can also impact the performance. To ensure diverse measurements, we need to maximize variation between different masks. Examining Fig. 2(b), we can see that a capacitance value near the resonance and one far from it can ensure significant changes. To provide a better visualization of this point, we present singular values of the first 12 rows (corresponding to first three masks) of H using two sets of binary capacitance, i.e., 1) 0.2 pF and 0.4 pF, and 2) 0.4 pF and 0.86 pF. When comparing the surface reactance profiles of the two sets of capacitances as shown in Fig. 2(a), it is clear that the first set of capacitances results in negligible variations in surface reactance while the second set exhibit significant variation. Likewise, the singular value plots in Fig. 5 indicate that the slope of singular values corresponding to 0.4 pF and 0.86 pF capacitances is smaller, again supporting the argument that this set of capacitances retains comparatively more novel information across different masks. It is important to note that this choice can be further optimized in future works.
To test the AoA detection performance, we have simulated a set of test signals that are evenly distributed within the same angular range but are not in the sensing matrix. For test cases, we used the same six binary masks as were used in populating the sensing matrix. The measured data for a test case, g, is thus a 24 × 1 vector. In order to simulate multiple incident waves, we superposed a set of signals from different directions with different relative magnitudes and phases (followed by normalization by the resulting maximum). The estimation problem for single or multiple AoA(s) can thus be formulated as: where, M = 24 is the number of measurements, and N = 25 is the number of potential AoA bins in the sensing matrix.
In the above, f is a vector whose entry is either 1 or 0. The i th entry of f is 1 if the incident angle coincides with the i th angle used to populate the sensing matrix. We can solve (1) to find an estimate of f, denoted as f est . Since H is usually not a square matrix, we cannot use its inverse matrix to solve (1). Instead, we estimate the incident angle using computational techniques such as least square solvers. It is worth emphasizing that this inverse problem can also be solved using other techniques such as TwiST [64] or using deep learning algorithms [65], [66]. Exploring those strategies are left for future work. When the incident angle does not coincide with one of the ones used to populate the sensing matrix or due to inevitable noise in the measurement, we will not expect to see a perfectly 1 and 0 for f est . As a result, the entries of f est are all nonzero while a maximum is formed near the bin whose center is closest to the incident AoA. In other words, the instance(s) of VOLUME 10, 2022 actual AoA(s) present in the channel will correspond to the maximum value(s) of |f est |. However, we usually see multiple peaks. If we have prior knowledge of the number of potential AoAs, we can assign the highest peaks to the incident AoA(s). For example, if we are designing for a system with one known transmitter, then there can only be one AoA, and we assign the primary maximum to the AoA. In this paper, we assume that the RIS has no knowledge of the number of potential AoAs. To associate a peak with an AoA, we define a threshold T above which any maximum is assigned to an AoA. The threshold T is set empirically as the mean of the maximum and the median of |f est | as described in (2).
The maximum and the median of |f est | are denoted by max(|f est |), and|f est | respectively. Using this definition, the j th AoA is equal to the angle at the center of i th th bin if, The i th angle of the bins, denoted here by θ i , is then the estimator of the j th AoA, θ est,j .  To visualize this estimation process, an instance of AoA detection is illustrated in Fig. 6 where the signal (to be estimated) is arriving at −28 • . To obtain this and all other results in this paper, we used conjugate gradient squared (CGS) method to solve (1). In Fig. 6, we clearly see that the detected AoA based on the peak of |f est | closely follows the actual AoA. The horizontal line in this figure is the threshold used to select the AoA. While |f est | exhibits many local peaks, only one is above the threshold, which corresponds to the proper estimate of the AoA in consideration.

B. ACCURACY OF DETECTION
The accuracy of AoA estimation in the proposed problem formulation is dependent upon the resolution of our sensing matrix which is 5 • . We used this angular resolution which is slightly smaller than the broadside HPBW of a uniform antenna array of the same size as the RIS. We calculated the HPBW of the RIS using the general expressions for the HPBW of uniform antenna array as discussed in [67] (see section 6.3). In reality, however, the elements of the metasurface may not be uniformly excited resulting in the reception and reflection of a wider beams. Furthermore, the HPBW is larger for off-broadside incidence. Thus, 5 • is the narrowest possible HPBW for beamforming by a RIS of this size.
As discussed earlier, the estimated AoAs are determined by assigning the angle at the center of the bins where a local maximum above the threshold appears (see (3)). If the estimated angle (i.e. the angle at the center of the bin) in this manner falls within ±3 • of the actual AoA, we consider this estimation to be sufficiently accurate. We use ±3 • instead of ±2.5 • degrees-i.e. half of the bin size-since an AoA that is midway between two bins can be assigned to either and the performance will not significantly change. Based on this definition, we use the following process to assess our AoA estimation process: If the estimated AoA is within ±3 • from the actual AoA then the estimation is accurate and we assign ''1'' to estimation accuracy η. Otherwise, the estimation is inaccurate and we assign 0 to η. If there are n AoAs, the accurate estimation of each AoA is 1 n . Thus, when µ out of n actual AoA(s) are accurately estimated the total accuracy adds to µ n (note that µ ≤ n). The accuracy of detection is heavily dependent on the noise at the receivers and its impact on the estimation accuracy needs to be investigated. To do that, we add Gaussian White noise with SNR ranging from −50 dB to 50 dB to the received signal. The final accuracy is then averaged over 100 realizations of each SNR level.

IV. RESULTS
In this section, we present numerical results from full-wave simulations to demonstrate the proposed operation. We start by examining single incident wave and then extend the operation to two and three potential incident signals. In the investigation of multiple incident signals, we examine the impact of their relative amplitude-effectively users at different distances or power levels. In our studies, we do not make any assumptions about phase synchronization between users or the RIS. As a result, we will also examine the impact of different phase references for different users.

A. SINGLE AoA ESTIMATION
We begin our investigation by assuming a single user in the RIS assisted channel. In Fig. 6, we show |f est | for a test angle arriving at −28 • and for a SNR of 20 dB. The presence of a primary maximum above the threshold defined in (3) allows us to estimate this AoA with high confidence. In addition, we verified the AoA estimation performance over a wide range of SNR values. The performance of the proposed AoA estimator is assessed by examining the resulting accuracy for a set of test AoAs uniformly distributed over the whole range of interest: −60 • to 60 • . The accuracy measures are acquired based on the accuracy calculation method outlined in the previous section. The results of our study are presented Fig. 7. For all the selected test cases, we see a reasonable accuracy in detecting a single user within the angular range of interest.

B. DOUBLE AoA ESTIMATION
Next, we extend our analysis to investigate the performance of the proposed device in sensing two AoAs. Two signals pertaining to any two test AOAs are added together to simulate the incidence of two signals from different directions on the RIS. We start by examining the case where the two signals have the same phase and amplitude. The |f est | for two such signals, one arriving at −28 • degrees and one at 32 • degrees, are presented in Fig. 8(a). We can clearly see that two peaks are present confirming the presence of two signals with different AoAs. Furthermore, the two peaks are close to the actual AoAs verifying the precision of detecting two angles. In Fig. 9, we present the accuracy of detecting a variety of AoA test pairs for different levels of SNR. The presented results clearly indicate the ability to accurately estimate two AoAs. Nevertheless, the two AoAs in these analyses have the same magnitude and phase references for both signals-an assumption that is uncommon in wireless systems. Hence, we next investigate the impact of relative amplitude and phase of the incident signals on signal detection capability. The impact of relative magnitude on double AoA detection, e.g., detection of −28 • and 32 • , is illustrated in Fig. 8(b)-(c). We can see as the amplitude of one signal becomes larger compared to the other one, our ability to detect the smaller signal decreases. Next, we analyze the impact of relative phase quantitatively. To do that, we have varied the relative phases of the two signals while keeping the relative magnitude constant. The results of this study are shown in Fig. 8(d)-(f). We can see the impact of phase difference is not as drastic as the impact of magnitude difference. The worst VOLUME 10, 2022 case happens when the two signals are in opposite signs from each other, which is intuitively expected to have the most significance impact.
To further scrutinize the impact of relative magnitude and phase, we examined the AoA estimation performance under both magnitude and phase variations with different level of SNRs. To illustrate these observations, we mapped the combined estimation accuracy of −28 • and 32 • with 2D color plots over a range of relative magnitudes or relative phases while keeping the other parameter constant as shown in Fig. 10. Fig. 10(a)-(c) present the the impact of relative magnitudes on the estimation accuracy for several relative phase values.
While Fig. 10(d)-(f) shows the impact of relative phase on the accuracy for different level of relative amplitude. It should be noted that in both Fig. 8 and Fig. 10, only the signal coming from −32 • is varied to realize relative magnitude and/or phase notion. These figures reaffirm our expectation that when one signal becomes larger, our ability to detect the other one decreases. That is why we see the accuracy drop to 50% in the worst case scenario since we are able to detect only one AoA with high fidelity. The impact of phase variation is more significant when the two signals are out of phase from each other, but its impact is not as drastic as amplitude variation.

C. DETECTION OF THREE AoAs
Next, we applied our estimation approach to the cases where the RIS is deployed in a more dense channel. In Fig. 11, we have demonstrated that the RIS can successfully detect three AoAs evinced by the presence of three distinct peaks above the threshold. In the next step, we present the accuracy of the AoA estimation model in estimating three AoAs in Fig. 12. It is worth mentioning that the test AoAs in each batch of multiple AoAs are angularly separated from each other by more than the HPBW of the RIS to avoid clustering of more than one user within the resolving power of the RIS. We can see that we are able to detect all the three AoAs with high fidelity. It is worth noting that when the number of AoAs grows, the probability of estimating them by chance also increases, especially when the incident signals are close to each other. As a result, even when the signal is noisy, we can detect at least one or two of the AoAs of set 2 • , 13 • , and 32 • . When the incident signals have larger angular separation, as in the case of −58 • , −28 • , and 17 • , the estimation accuracy is much lower when the signal becomes significantly noisy.
Since we are using a RIS that is smaller than what would be usually used in practical settings, its ability to detect multiple AoAs becomes more restricted as it has a lower resolution. In other words, since the HPBW of the proposed RIS is finite, there is a higher chance of multiple targets to appear in the same region as the scene becomes more crowded. Furthermore, a more complicated scene makes the inverse problem at the heart of the AoA detection more ill-conditioned. While more measurements (masks) may help this problem, we are still limited by the angular resolving capability of the RIS. Nevertheless, it is expected that the proposed RIS, if extended to a practical size, which can contain up to hundreds of metaatoms [68], [69], can potentially achieve significantly higher AoA detection resolution.

V. REDIRECTING INCIDENT SIGNALS
While the primary focus of this paper is compressive sensing of the propagation environment, a discussion of a reliable reconfigurable reflective metasurface is incomplete without demonstrating its capability of redirecting the incident signals towards desired directions. Generally, the signal redirection from the RIS is accomplished by changing the phase of the reflected signal from each element [70]. However, a mere phase gradient may not be sufficient for optimal beam redirection in all possible angles [52], [71], [72]. Methods for designing RIS surface variation is an active area of research and a variety of methods have been proposed [52], [71], [72], [73], [74], [75], [76]. In particular, we have selected the methods detailed in [71] and [77] for lossy metasurfaces since our metasurface also exhibits losses-waves collected for sensing contribute to losses from an incident signal perspective. Adapting this method for our RIS configuration, we arrived at the required surface impedance variation along the surface of the RIS to generate a beam in desired directions (given the incident beam). The effective impedances are then realized by changing the effective capacitances of varactors loading the meta-atoms (see Fig. 2(b)). It is worth emphasizing here that the surface impedance distribution along the metasurface is designed by taking into account the slightly different surface impedance values for the hybrid elements (see Fig. 2(b)).
As an illustration of the reconfigurable reflection capability of the proposed hybrid RIS, we present several instances of signal redirections in Fig. 13. In this figure, a normal incidence is reflected towards −20 • , −30 • , and −45 • , verifying proposed design and operation. It is important to note that when using Fig. 2(b), we have assumed a periodic infinite array of similar elements. When implementing the impedance profile for beamforming, we are using elements in an aperiodic formation where non-negligible changes occur between adjacent elements. This impact is especially pronounced near hybrid elements. Since we used a few of them and their response is not drastically different from the conventional elements, their potential impact on beamforming is alleviated. In a practical implementation, one can apply optimization techniques to account for the change from the infinite setup of Fig. 2(b) to the finite setup of Fig. 3 and improve beamforming performance. Nonetheless, our results clearly show satisfying beamforming capabilities even when using two types of meta-atoms in our RIS.

VI. CONCLUSION AND DISCUSSION
Reconfigurable reflecting surfaces are widely used in a variety of applications. Their emerging role as a smart device to reconfigure the wireless communication channel-hence the name reconfigurable intelligent surfaces-has attracted exploding attention recently. In all these applications, providing the information about the transmitter(s) and receiver(s) and the propagation environment to the RIS is a key requirement which has been proven to be a practical challenge. In this paper, we proposed and numerically demonstrated a reconfigurable surface that can sense the environment to retrieve the necessary information for its operation and redirect signals toward discovered directions. In our proposed configuration, we addressed an important challenge: Obtaining high-resolution information about the environment while using a few sensors without sacrificing the effective surface of the RIS. We showed that a RIS with inherent compressive multiplexing capability can overcome this challenge. The proposed RIS with sensing and reflection capabilities is a significant milestone toward realizing truly autonomous and smart radio environments for current and future wireless communication systems. Their benefits can also go beyond communication systems: they can be used to mitigate interference between different systems sharing the same spectrum. They can also be used to develop self correcting reflectarray that can overcome misalignment or mechanical movements.
The proposed configuration can also be further improved in multiple ways in future work. One important aspect that needs to be addressed is the acceptable level of coupling that is needed to ensure receivers can detect the incident signal while the reflected signal does not lose too much power. This study would be application and implementation specific and is currently undergoing [41]. On the other hand, when scattering is not negligible, the protocols used for sensing and reflection by the RIS needs to be revamped. In doing so, one can start by adding the hybrid RIS model to the physics-based model developed in [78]. Using such a model, the RIS could be used to implement the concepts described in [79] for integrating sensing and communication in a richscattering environment. In another instance, the proposed RIS can be used to cancel interference to another system. All such applications require a RIS that can deduce information about the environment. The RIS geometry presented in this work paves the way for realizing such operations. Lastly, the beamforming capability can be further improved by optimizing the varactor capacitance loading of the elements and including the impact of finite size RIS with varying elements. The other important future steps are extending this work to 2D and experimental verification.