Intelligent Reflecting Surface (IRS) has recently emerged as a promising new technology for enhancing wireless communications both spectral-efficiently and energy-efficiently by controlling the propagation environment [1, 2, 3]. Specifically, IRS is a planar surface consisting of a massive number of passive and programmable elements reflecting incident signals with phase shifts . By smartly tuning the phase shifts, an IRS is able to reconfigure propagation environments for constructive signal combination and interference cancellation at the receivers, thereby enhancing the communication performance .
To fully explore the benefits of IRS, the acquisition of the channel state information (CSI) plays a critical role in passive beamforming. [4, 5] proposed to estimate IRS-related channels based on training signals sent by transmitter or receiver. Assuming the perfect CSI, [6, 7] studied the problem of minimizing the base station (BS) transmit power by jointly optimizing the active beamforming at the BS and passive beamforming at the IRS. Furthermore, IRS has been jointly designed with other existing technologies, e.g., non-orthogonal multiple access (NOMA)  and over-the-air computation . In particular, the IRS-related channel capacity characterization is studied in . However, there’s no work on the use of IRS for providing massive device connectivity for the Internet of Things (IoT). In this paper, we propose to equip the IoT network with an IRS in order to support massive device connectivity.
Massive device connectivity has been identified as one of the three main use cases in the upcoming 5G network, along with enhanced mobile broadband and ultra-reliable, low-latency communications [11, 12]. In such a scenario, a large number of mobile devices are connected to the Internet via the BS with sporadic communications, e.g., only a small fraction of connected devices are active . To overcome the challenge of detecting active devices and estimating their channels, [14, 15] studied the activity detection and channel estimation problem for massive connectivity from the view of information theory. By exploiting the sparse activity pattern, the problem is formulated as a compressed sensing problem and resolved by the approximate message passing (AMP) [16, 17]. However, all these works treated the communication channels as an uncontrollable environment, and in some cases, harsh propagation environments can significantly degrade the system performance . Hence, we shall propose an IRS-assisted IoT network for massive connectivity to improve propagation environment.
In this paper, we consider an uplink IRS-assisted IoT network, where a single BS serves a massive number of mobile devices with the assist of an IRS. Specifically, our goal is to jointly detect active devices and estimate the IRS-related channels. We call this problem as the IRS-related activity detection and channel estimation problem. In fact to our best knowledge, the problem has not been studied in the prior works. Due to unfavorable propagation conditions, the direct link between the BS and the devices has negligible received signals and thus we ignore the device-BS channel [18, 1, 19]. However, deployment of an IRS poses new challenges, e.g., passive elements on the IRS can not process incident signals and there are more links to estimate [4, 5, 10]. To overcome these challenges, we formulate the IRS-related activity detection and channel estimation problem as sparse matrix factorization [20, 21], matrix completion and Multiple Measurement Vector (MMV) problem . To solve the problem, we propose a three-stage framework based on the approximate message passing (AMP) including the BiG-AMP algorithm 
for sparse matrix factorization, the Singular Value Thresholding (SVT) algorithm for matrix completion and the Vector AMP algorithm  for the MMV problem. Simulation results demonstrate that the propose algorithm can achieve IRS-related device activity detection and channel estimation for an IRS-assisted ToT network.
Notations. () denotes the set of real (complex) numbers. is the -th entry of a matrix , and the operation with returns a diagonal matrix where .
denote transpose operation, nuclear norm, the Hadamard product and standard complex Gaussian distribution.
2 System Model
Consider an IRS-assisted IoT network in Fig 1, where the IRS consists of reflecting elements and the BS is equipped with antennas to serve single-antenna mobile devices. Due to unfavorable propagation conditions, the direct link between the BS and the devices has negligible received signals and thus we ignore the device-BS channel [18, 1, 19]. We define as the channel vector from the -th device to the IRS. The channel matrix from the IRS to the BS is denoted by . We assume a block-fading channel model where the channel is quasi-static in each block of length . Furthermore, we consider Rayleigh fading and the path-loss fading for all the channels, e.g., and , where and denote the path-loss components.
, e.g., only a subset of all devices are active in each coherence block with probabilityand denotes the active state of the -th device, otherwise . For the propose of IRS-related device activity detection and channel estimation, the -th device will transmit a unique signature sequence where is the sequence length. Then, for all , the uplink signal received by the BS can be written as
where is the additive noise at time slot
, and the variancedepends on the background noise power normalized by the device transmit power. is defined as the phase-shifting vector of the IRS, where and are on/off state and the phase shift of the -th reflecting element on the IRS at the time slot , respectively.
Let and be the channel matrix of all device-IRS links and the known signature matrix, respectively. Considering time slots in each coherence block, the received signals by the BS can be expressed in matrix form as
where is the additive Gaussian noise, and denote the activity matrix and the phase-shifting matrix, respectively.
This paper focuses on the regime where the number of devices is much larger than the signature sequence length, i.e., . Therefore, it is impossible to assign the mutually orthogonal signature sequences to all devices. Inspired by , the signature sequence of the -th device is generated from i.i.d complex Gaussian distribution with zero mean and variance one, i.e., .
3 Problem Formulation
The goal of this paper is to jointly detect the activity matrix and estimate the IRS-related channel matrices from the IRS to the BS and from the active devices to the IRS, given the received signals , the phase-shifting matrix and the known signature matrix in the regime where . We call this problem as the IRS-related activity detection and channel estimation problem. For simplicity, we introduce the following variables
From the definition (5), we can see that the matrix has the same sparsity pattern as the phase-shifting matrix . Hence, by designing the matrix as a sparse matrix, we can recover the matrix and the matrix from the observations via the techniques of sparse matrix factorization [20, 21]. Specifically, we design the phase-shifting matrix as follows: the on/off state of the -th reflect element on the IRS at the time slot
are generated independently from Bernoulli distribution with the probabilityof taking the value . In addition, we generate the phase shifts
according to the standard uniform distribution within.
Due to the sparsity of the matrix and (5), we have to recover the missing entries of given the estimated matrix and the phase-shifting matrix . Note that is low-rank due to the group sparsity of . Hence, this sub-problem can be formulated as a matrix completion problem and solved by exploiting the low-rank property of .
Finally, recovering the from the estimated matrix and the known signature matrix turns out to be the Multiple Measurement Vectors (MMV) problem in compressed sensing .
In summary, the original problem can be solved through the following three stages:
Sparse Matrix Factorization: Recovering the matrices and from the observations ;
Matrix Completion: Completing the missing entries of given the estimated matrix and the phase-shifting matrix ;
Multiple Measurement Vectors: Estimating the matrix from the estimated matrix and the known signature matrix .
Once obtaining the estimated matrix , the activity matrix can be recovered via the group sparsity of as follows
where is some small non-negative threshold and is the -th column of the estimated matrix . Thus, the estimated matrix can be estimated by setting its -th column as where .
4 Proposed IRS-Related Activity Detection and Channel Estimation Algorithm
To solve IRS-related activity detection and channel estimation problem, we establish a three-stage framework based on the approximate message passing (AMP) algorithm. As shown in Algorithm 1, the architecture of overall algorithm consists of the BiG-AMP algorithm  for sparse matrix factorization, the Singular Value Thresholding (SVT) algorithm  for matrix completion and the Vector AMP algorithm  for the MMV problem. We will explain the details of the proposed algorithm in the following subsections.
4.1 Sparse Matrix Factorization via BiG-AMP
First, we adopt an extension of the AMP algorithm, the BiG-AMP algorithm  to solve the following generalized bilinear inference problem: estimate matrices and from the observations according to (6). The BiG-AMP algorithm solves the sparse matrix factorization problem by modeling and as random matrices. Specifically, we introduce the following maximum a posteriori (MAP) estimation problem:
where and we assume that the likelihood function is known and separable, i.e.,
Furthermore, we assume the entries of obey the i.i.d Gaussian prior and the entries of obey the i.i.d zero-mean Bernoulli-Gasussian prior . Hence, the prior of and can be modeled as follows
where denotes the sparsity level of ; and are the variances of and , respectively. To achieve the estimation, the BiG-AMP algorithm infers and from the above model so that the corresponding estimated matrices and can be multiplied to yield an estimate up to the permutation and phase ambiguities. Details of the BiG-AMP can be found in .
4.2 Matrix Completion via SVT
After sparse matrix factorization and ambiguity elimination in section 4.1, we obtain the estimates and . Due to the design of the phase-shifting matrix , we have to recover the missing entries in from the estimated matrix . According to (5), has the same sparsity pattern as . By exploiting the low-rank property of , we shall solve the following optimization problem:
where . denotes an orthogonal projector onto the subspace spanned by matrices with sampled entries in , namely, the -th entry in is equal to if and zero otherwise. To solve such a matrix completion problem, we apply the Singular Value Thresholding (SVT) algorithm . Specifically, for a constant and a sequence , starting with , the iterations of SVT proceed as
where is a soft-thresholding operator at level to the singular values of the input matrix, which is defined as and is the positive part of the input, e.g., .
4.3 MMV problem via Vector AMP
As for the MMV problem of recovering from the estimated matrix and the known signature matrix , we adopt the Vector AMP algorithm proposed in , which operates a vector denoiser on each column vector of the matching filter output. initializing with and , the iterations of the vector AMP algorithm are defined as
where is the -th column vector of the estimated matrix at iteration t, is the corresponding residual, is a vector denoiser that operates on the -th column vector of , and is the first-order derivative of . Here, we apply the MMSE denoiser derived in , and this denoiser has the following form:
with and denoting path-loss component.
We carry out numerical experiments to evaluate the performance of the proposed algorithm for massive device connectivity with employment of IRS, where the direct path is ignored due to unfavorable propagation conditions [18, 1, 19].
For all the considered channels, we assume Rayleigh fading and the path loss [17, 6]. The path loss model is given by where is the path loss at the reference distance . In our setting, , dB, and the path loss component for device-to-IRS link and IRS-to-BS link are set as 2 and 2.8, respectively [6, 9]. The -th device-to-IRS distance is randomly generated from 500m to 1000m and the IRS-to-BS distance
is 100m. We suppose the noise power normalized by the device transmit power, and thus the signal-to-noise ratio (SNR) is defined aswhere is the variance of the noise. We resolved the permutation and phase ambiguities based on the true values of and . For all the simulations: the signature matrix is generated from , and we set IRS elements, antennas at the BS and devices among which each device is active with probability , and the sparsity of the phase-shifting matrix is fixed at 0.5.
The performance of recovering the IRS-related channels is evaluated in terms of normalized mean-square-error (NMSE). To benchmark the estimation of the IRS-related channel , we compare the proposed algorithm with other two algorithms of sparse matrix factorization, K-SVD  and SPAMS . In Fig.2, we show that the proposed algorithm significantly outperforms other two baseline algorithms, which demonstrates the effectiveness of our algorithm.
We illustrate the activity recovery error rate versus the SNR for different values of the signature sequence length . We can see that the larger , the faster the error rate can be driven to zero as the SNR increases. As shown in Fig. 2, we can not recover any active device without the IRS under unfavorable propagation conditions, however, this issue can be resolved by deploying an IRS in IoT networks. Furthermore, we consider the noiseless case and study the empirical success probability of recovering the IRS-related channel versus . We declare successful recovery if the NMSE of
dB and record the success probability from 50 trials. The sharp phase transition result in Fig.2 are thus able to guide the selection of the signature sequence length.
In this work, we considered the device activity detection and channel estimation problem for the IRS-assisted IoT network. We establish a three-stage framework including the BiG-AMP algorithm for sparse matrix factorization, the Singular Value Thresholding algorithm for matrix completion and the Vector AMP algorithm for the multiple measurement vector problem. To the end, we provided the simulation results to verify the effectiveness of the proposed algorithm.
-  E. Basar, M. Di Renzo, J. De Rosny, M. Debbah, M. Alouini, and R. Zhang, “Wireless communications through reconfigurable intelligent surfaces,” IEEE Access, vol. 7, pp. 116 753–116 773, 2019.
-  C. Liaskos, S. Nie, A. Tsioliaridou, A. Pitsillides, S. Ioannidis, and I. Akyildiz, “A new wireless communication paradigm through software-controlled metasurfaces,” IEEE Commun. Mag., vol. 56, no. 9, pp. 162–169, Sep. 2018.
-  Q. Wu and R. Zhang, “Towards smart and reconfigurable environment: Intelligent reflecting surface aided wireless network,” IEEE Commun. Mag., Early Access. [Online]. Available: https://arxiv.org/abs/1905.00152
-  D. Mishra and H. Johansson, “Channel estimation and low-complexity beamforming design for passive intelligent surface assisted miso wireless energy transfer,” in Proc. IEEE Int. Conf. Acoust., Speech Signal Process. (ICASSP), Brighton, U.K., May 2019, pp. 4659–4663.
-  Z.-Q. He and X. Yuan, “Cascaded channel estimation for large intelligent metasurface assisted massive mimo,” CoRR, vol. abs/1905.07948, 2019. [Online]. Available: https://arxiv.org/abs/1905.07948
-  Q. Wu and R. Zhang, “Intelligent reflecting surface enhanced wireless network via joint active and passive beamforming,” IEEE Trans. Wireless Commun., pp. 1–1, 2019.
-  ——, “Beamforming optimization for intelligent reflecting surface with discrete phase shifts,” in Proc. IEEE Int. Conf. Acoust., Speech Signal Process. (ICASSP), Brighton, U.K., May 2019, pp. 7830–7833.
-  M. Fu, Y. Zhou, and Y. Shi, “Intelligent reflecting surface for downlink non-orthogonal multiple access networks,” in Proc. IEEE Global Commun. Conf. (Globecom) Workshops, Hawaii, USA, Dec 2019.
-  T. Jiang and Y. Shi, “Over-the-air computation via intelligent reflecting surfaces,” in Proc. IEEE Global Commun. Conf. (Globecom), Hawaii, USA, Dec 2019. [Online]. Available: https://arxiv.org/abs/1904.12475
-  S. Zhang and R. Zhang, “Capacity characterization for intelligent reflecting surface aided mimo communication,” CoRR, vol. abs/1910.01573, 2019. [Online]. Available: https://arxiv.org/abs/1910.01573
-  J. G. Andrews, S. Buzzi, W. Choi, S. V. Hanly, A. Lozano, A. C. K. Soong, and J. C. Zhang, “What will 5g be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, June 2014.
-  K. B. Letaief, W. Chen, Y. Shi, J. Zhang, and Y. A. Zhang, “The roadmap to 6g: Ai empowered wireless networks,” IEEE Commun. Mag., vol. 57, no. 8, pp. 84–90, August 2019.
-  G. Wunder, H. Boche, T. Strohmer, and P. Jung, “Sparse signal processing concepts for efficient 5g system design,” IEEE Access, vol. 3, pp. 195–208, 2015.
-  W. Yu, “On the fundamental limits of massive connectivity,” in Proc. Inf. Theory Appl. Workshop, San Diego, Ca, USA, Feb 2017, pp. 1–6.
-  X. Chen, T. Chen, and D. Guo, “Capacity of gaussian many-access channels,” IEEE Trans. Inform. Theory, vol. 63, no. 6, pp. 3516–3539, June 2017.
-  Z. Chen, F. Sohrabi, and W. Yu, “Sparse activity detection for massive connectivity,” IEEE Trans. Signal Process., vol. 66, no. 7, pp. 1890–1904, April 2018.
-  L. Liu and W. Yu, “Massive connectivity with massive mimo—part i: Device activity detection and channel estimation,” IEEE Trans. Signal Process., vol. 66, no. 11, pp. 2933–2946, June 2018.
-  C. Huang, A. Zappone, G. C. Alexandropoulos, M. Debbah, and C. Yuen, “Reconfigurable intelligent surfaces for energy efficiency in wireless communication,” IEEE Trans. Wireless Commun., vol. 18, no. 8, pp. 4157–4170, Aug 2019.
-  C. Huang, A. Zappone, M. Debbah, and C. Yuen, “Achievable rate maximization by passive intelligent mirrors,” in Proc. IEEE Int. Conf. Acoust., Speech Signal Process. (ICASSP), Alberta, Canada, April 2018, pp. 3714–3718.
-  Y. Koren, R. Bell, and C. Volinsky, “Matrix factorization techniques for recommender systems,” Computer, vol. 42, no. 8, pp. 30–37, Aug 2009.
H. Liu, X. Yuan, and Y. J. Zhang, “Super-resolution blind channel-and-signal estimation for massive mimo with one-dimensional antenna array,”IEEE Trans. Signal Process., vol. 67, no. 17, pp. 4433–4448, Sep. 2019.
-  J. Chen and X. Huo, “Theoretical results on sparse representations of multiple-measurement vectors,” IEEE Trans. Signal Process., vol. 54, no. 12, pp. 4634–4643, Dec 2006.
-  J. T. Parker, P. Schniter, and V. Cevher, “Bilinear generalized approximate message passing—part i: Derivation,” IEEE Trans. Signal Process., vol. 62, no. 22, pp. 5839–5853, Nov 2014.
-  J. Cai, E. Candès, and Z. Shen, “A singular value thresholding algorithm for matrix completion,” SIAM J. Optim., vol. 20, no. 4, pp. 1956–1982, 2010.
-  T. Jiang, Y. Shi, J. Zhang, and K. B. Letaief, “Joint activity detection and channel estimation for iot networks: Phase transition and computation-estimation tradeoff,” IEEE Internet Things J., vol. 6, no. 4, pp. 6212–6225, Aug 2019.
-  M. Wainwright, “Structured regularizers for high-dimensional problems: Statistical and computational issues,” Annual Review of Statistics and Its Application, vol. 1, pp. 233–253, 01 2014.
-  J. Kim, W. Chang, B. Jung, D. Baron, and J. C. Ye, “Belief propagation for joint sparse recovery,” CoRR, vol. abs/1102.3289, 2011. [Online]. Available: https://arxiv.org/abs/1102.3289
-  M. Aharon, M. Elad, and A. Bruckstein, “K-svd: An algorithm for designing overcomplete dictionaries for sparse representation,” IEEE Trans. Signal Process., vol. 54, no. 11, pp. 4311–4322, Nov 2006.
-  J. Mairal, F. Bach, J. Ponce, and G. Sapiro, “Online learning for matrix factorization and sparse coding,” J. Mach. Learn. Res., vol. 11, pp. 19–60, Mar. 2010.