Sparse Activity Detection for Massive Connectivity

# Sparse Activity Detection for Massive Connectivity

Zhilin Chen,  Foad Sohrabi,  and Wei Yu,  Manuscript accepted and to appear in IEEE Transactions on Signal Processing. This work has been presented in part at IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), March 2017. This work is supported by Natural Sciences and Engineering Research Council (NSERC) of Canada through a Discovery Grant and through a Steacie Memorial Fellowship.The authors are with The Edward S. Rogers Sr. Department of Electrical and Computer Engineering, University of Toronto, Toronto, ON M5S 3G4, Canada (e-mails:{zchen, fsohrabi, weiyu}@comm.utoronto.ca).
###### Abstract

This paper considers the massive connectivity application in which a large number of potential devices communicate with a base-station (BS) in a sporadic fashion. The detection of device activity pattern together with the estimation of the channel are central problems in such a scenario. Due to the large number of potential devices in the network, the devices need to be assigned non-orthogonal signature sequences. The main objective of this paper is to show that by using random signature sequences and by exploiting sparsity in the user activity pattern, the joint user detection and channel estimation problem can be formulated as a compressed sensing single measurement vector (SMV) problem or multiple measurement vector (MMV) problem, depending on whether the BS has a single antenna or multiple antennas, and be efficiently solved using an approximate message passing (AMP) algorithm. This paper proposes an AMP algorithm design that exploits the statistics of the wireless channel and provides an analytical characterization of the probabilities of false alarm and missed detection by using the state evolution. We consider two cases depending on whether the large-scale component of the channel fading is known at the BS and design the minimum mean squared error (MMSE) denoiser for AMP according to the channel statistics. Simulation results demonstrate the substantial advantage of exploiting the statistical channel information in AMP design; however, knowing the large-scale fading component does not offer tangible benefits. For the multiple-antenna case, we employ two different AMP algorithms, namely the AMP with vector denoiser and the parallel AMP-MMV, and quantify the benefit of deploying multiple antennas at the BS.

Device activity detection, channel estimation, approximate message passing, compressed sensing, Internet of Things (IoT), machine-type communications (MTC)

## I Introduction

One of the key requirements for the next-generation wireless cellular networks is to provide massive connectivity for machine-type communications (MTC), envisioned to support diverse applications such as environment sensing, event detection, surveillance and control [1, 2]. Machine-centric communications have two distinctive features as compared to conventional human-centric communications: (i) the overall system needs to support massive connectivity—the number of devices connected to each cellular base-station (BS) may be in the order of to ; and (ii) the traffic pattern of each device may be sporadic—at any given time only a small fraction of potential devices are active. For such a network, accurate user activity detection and channel estimation are crucial for establishing successful communications between the devices and the BS.

To identify active users and to estimate their channels, each user must be assigned a unique signature sequence. However, due to the large number of potential devices but the limited coherence time and frequency dimensions in the wireless fading channel, the signature sequences for all users cannot be mutually orthogonal. Non-orthogonal signature sequences superimposed in the pilot stage causes significant multi-user interference, e.g., when a simple matched filtering or correlation operation is applied at the BS for user activity detection and channel estimation. A key observation of this paper is that the sporadic nature of the traffic leads to sparse user transmission patterns. By exploiting sparsity and by formulating the detection and estimation problem with independent identically distributed (i.i.d.) random non-orthogonal pilots as a compressed sensing problem, this multi-user interference problem can be overcome, and highly reliable activity detection and accurate channel estimation can be made possible. In the compressed sensing terminology, when the BS is equipped with a single antenna, activity detection and channel estimation can be formulated as a single measurement vector (SMV) problem; when the BS has multiple antennas, the problem can be formulated as a multiple measurement vector (MMV) problem.

This paper proposes the use of compressed sensing techniques for the joint user activity detection and channel estimation problem. Due to the large-scale nature of massive device communications, this paper adopts the computationally efficient approximate message passing (AMP) algorithm [3] as the main technique. AMP is an iterative thresholding method with a key feature that allows analytic performance characterization via the so-called state evolution. The main contributions of this paper are: (i) a novel AMP algorithm design for user activity detection that exploits the statistical information of the wireless channel; and (ii) a characterization of the probabilities of false alarm and missed detection for both SMV and MMV scenarios.

### I-a Related Work

The user activity detection problem for massive connectivity has been studied from information theoretical perspectives in [4, 2]. From an algorithmic point of view, the problem is closely related to sparse recovery in compressed sensing and has been studied in a variety of wireless communication settings. For example, assuming no prior knowledge of the channel state information (CSI), joint user activity detection and channel estimation is considered in [5, 6, 7, 8]. Specifically, [5] proposes an efficient greedy algorithm based on orthogonal matching pursuit for sporadic multi-user communication. By exploiting the statistics of channel path-loss and the joint sparsity structures, [6] proposes a modified Bayesian compressed sensing algorithm in a cloud radio-access network. In the context of orthogonal frequency division multiplexing (OFDM) systems, [7] introduces a one-shot random access protocol and employs the basis pursuit denoising detection method with a detection error bound based on the restricted isometry property. The performance of such schemes in a practical setting is illustrated in [7, 8]. When perfect CSI is assumed, joint user activity and data detection for code division multiple access systems (CDMA) is investigated in [9, 10], where [9] designs the sparsity-exploiting maximum a posteriori detector by accounting for both sparsity and finite-alphabet constraints of the signal, and [10] proposes a greedy block-wise orthogonal least square algorithm by exploiting the block sparsity among several symbol durations. Differing from most of the above works that consider cellular systems, [11, 12] study the user activity detection in wireless ad hoc networks, where each node in the system identifies its neighbor nodes simultaneously. The authors of [11] propose a scalable compressed neighbor discovery scheme that employs random binary signatures and group testing based detection algorithms. In [12], the authors propose a more dedicated scheme that uses signatures based on Reed-Muller code and a chirp decoding algorithm to achieve a better performance.

In contrast to the aforementioned works, this paper adopts the more computationally efficient AMP algorithm for user activity detection and channel estimation, which is more suitable for large-scale networks with a large number of devices. The AMP algorithm is first proposed in [3] as a low-complexity iterative algorithm for conventional compressed sensing with real-valued signals and real-valued measurements. A framework of state evolution that tracks the performance of AMP at each iteration is introduced in [3]. The AMP algorithm is then extended along different directions. For example, [13] generalizes the AMP algorithm to a broad family of iterative thresholding algorithms, and provides a rigorous proof of the framework of the state evolution. To deal with complex-valued signals and measurements, [14] proposes a complex AMP algorithm (CAMP). By exploiting the input and output distributions, a generalized AMP (GAMP) algorithm is designed in [15]. Similarly, a Bayesian approach is used to design the AMP algorithm in [16, 17] by accounting for the input distribution. For the compressed sensing problem with multiple signals sharing joint sparsity, i.e., the MMV problem, [18] designs an AMP algorithm via a vector form of message passing; and [19] designs the AMP-MMV algorithm by directly using message passing over a multi-frame factor graph.

Although the use of the AMP algorithm for user activity detection has been previously proposed in [20], the statistical information of the channel is not exploited in the prior work; also performance analysis is not yet available. This paper makes progress by showing that exploiting channel statistics can significantly enhance the Bayesian AMP algorithm. Moreover, analytical performance characterization can be obtained by using state evolution. Finally, the AMP algorithm can be extended to the multiple-antenna case.

### I-B Main Contributions

This paper considers the user activity detection and channel estimation problem in the uplink of a single-cell network with a large number of potential users, but at any given time slot only a small fraction of them are active. To exploit the sparsity in user activity pattern, this paper formulates the problem as a compressed sensing problem and proposes the use of random signature sequences and the computationally efficient AMP algorithm for device activity detection. This paper provides the design and analysis of AMP for both cases in which the BS is equipped with a single antenna and with multiple antennas.

This paper considers two different scenarios: (i) when the large-scale fading coefficients of all user are known and the detector is designed based on the statistics of fast fading component only; and (ii) when the large-scale fading coefficients are not known and the detector is designed based on the statistics of both fast fading and large-scale fading components as a function of the distribution of device locations in the cell. The proposed AMP-based detector exploits the statistics of the wireless channel by specifically designing the minimum mean squared error (MMSE) denoiser. This paper provides analytical characterization of the probabilities of false alarm and missed detection via the state evolution for both scenarios.

For the case where the BS is equipped with a single antenna, numerical results indicate that: (i) the analytic performance characterization via state evolution is very close to the simulation; (ii) exploiting the statistical information of the channel and user activity can significantly improve the detector performance; and (iii) knowing the large-scale fading coefficient actually does not bring substantial performance improvement as compared to the case that only the statistical information about the large-scale fading is available.

For the case where the BS is equipped with multiple antennas, this paper considers both the AMP with vector denoiser [18] and the parallel AMP-MMV [17]. For the AMP with vector denoiser, this paper exploits wireless channel statistics in denoiser design and further analytically characterizes the probabilities of false alarm and missed detection based on the state evolution. For the parallel AMP-MMV algorithm, which is more suitable for distributed computation, performance characterization is more difficult to obtain. Simulation results show that: (i) having multiple antennas at the BS can significantly improve the detector performance; (ii) the predicted performance of AMP with vector denoiser is very close to its simulated performance; and (iii) AMP with vector denoiser and parallel AMP-MMV achieve approximately the same performance.

### I-C Paper Organization and Notations

The remainder of this paper is organized as follows. Section II introduces the system model. Section III introduces the AMP algorithms for both SMV and MMV problems. Section IV considers user activity detection and channel estimation when the BS has a single-antenna, while Section V considers the multiple-antenna case. Simulation results are provided in Section VI. Conclusions are drawn in Section VII.

Throughout this paper, upper-case and lower-case letters denote random variables and their realizations, respectively. Boldface lower-case letters denote vectors. Boldface upper-case letters denote matrices or random vectors, where context should make the distinction clear. Superscripts , and denote transpose, conjugate transpose, and inverse operators, respectively. Further, denotes identity matrix with appropriate dimensions, denotes expectation operation, denotes definition, denotes either the magnitude of a complex variable or the determinant of a matrix, depending on the context, and denotes the norm.

## Ii System Model

Consider the uplink of a wireless cellular system with one BS located at the center and single-antenna devices located uniformly in a circular area with radius , but in each coherence block only a subset of users are active. Let indicate whether or not user is active. For the purpose of channel probing and user identification, user is assigned a unique signature sequence , where is the length of the sequence. This paper assumes that the signature sequence is generated according to i.i.d. complex Gaussian distribution with zero mean and variance such that each sequence is normalized to have unit power, and the normalization factor is incorporated into the transmit power.

We consider a block-fading channel model where the channel is static in each block. In this paper, we consider two cases where the BS is equipped with either a single antenna or multiple antennas. When the BS has only one antenna, the received signal at the BS can be modeled as

 y=N∑n=1ansnhn+w≜Sx+w, (1)

where is the channel coefficient between user and the BS, is the effective complex Gaussian noise whose variance depends on the background noise power normalized by the user transmit power. Here, where , and .

We aim to recover the non-zero entries of based on the received signals . We are interested in the regime where the number of potential users is much larger than the pilot sequence length, i.e., , so that the user pilot sequences cannot be mutually orthogonal; but due to the sporadic traffic, only a small number of devices transmit in each block, resulting in a sparse . The recovering of for the single antenna case is in the form of the SMV problem in compressed sensing.

This paper also considers the case where the BS is equipped with antennas. In this case, the received signal at the BS can be expressed in matrix form as

 Y=N∑n=1ansnhn+W≜SX+W, (2)

where is the channel vector between user and the BS, is the effective complex Gaussian noise, and where is the th row vector of . We also use to represent the th column vector of , i.e., . Note that indicates whether the entire row vector is zero or not. In other words, columns of (i.e., ) share the same sparsity pattern.

We are interested in detecting the user activity as well as in estimating the channel gains of the active users, which correspond to the non-zero rows of the matrix , based on the observation in the regime where . The problem of recovering from is in the form of the MMV problem in compressed sensing.

A key observation of this paper is that the design of recovery algorithm can be significantly enhanced by taking advantage of the knowledge about the statistical information of or . Toward this end, we provide a model for the distribution of the entries of , and the distribution of the rows of . Since is a special case of when , we focus on the model for .

We assume that each user accesses the channel with a small probability in an i.i.d. fashion, i.e., , and there is no correlation between different users’ channels, so that the row vectors of follow a mixture distribution

 pR|G(rn|gn)=(1−λ)δ0+λpH|G(rn|gn), (3)

where denotes the point mass measure at , denotes the probability density function (pdf) of the channel vector given prior information , which has a pdf , and denotes the prior information for user . Note that we use to denote the random channel vector and to denote its realization. Based on (3), the pdf of the entries of is

 pX|G(xn|gn)=(1−λ)δ0+λpH|G(xn|gn). (4)

To model the distribution of , we assume that all users are randomly and uniformly located in a circular coverage area of radius with the BS at the center, and the channels between the users and the BS follow an independent distribution that depends on the distance. More specifically, includes path-loss, shadowing, and Rayleigh fading. The path-loss between a user and the BS is modeled (in dB) as , where is the distance measured in meter, is the fading coefficient at , and is the path-loss exponent. The shadowing (in dB) follows a Gaussian distribution with zero mean and variance . The Rayleigh fading is assumed to be i.i.d. complex Gaussian with zero mean and unit variance across all antennas.

The large-scale fading, which includes path-loss and shadowing, is denoted as , whose pdf can be modeled by the distribution of BS-user distance and shadowing parameter . This paper considers both the case where only the statistics of the the large-scale fading, i.e., , is known as well as the case where the exact large-scale fading coefficient is known at the BS. The latter case is motivated by the scenario in which the devices are stationary, so that the path-loss and shadowing can be estimated and stored at the BS as prior information. When is known, captures the distribution of the Rayleigh fading component. When only is known, we drop and from , and write it as , which captures the distribution of both large-scale fading and Rayleigh fading.

## Iii AMP Algorithm

AMP is an iterative algorithm that recovers sparse signal for compressed sensing. We introduce the AMP framework for both the SMV and the MMV problems in this section.

### Iii-a AMP for SMV problem

AMP is first proposed for the SMV problem in [3]. Starting with and , AMP proceeds at each iteration as

 xt+1 =η(S∗zt+xt,g,t), (5) zt+1 =y−Sxt+1+NLzt⟨η′(S∗zt+xt,g,t)⟩, (6)

where , and is the index of iteration, is the estimate of at iteration , is the residual, where is an appropriately designed non-linear function known as denoiser that operates on the th entry of the input vector, where is the first order derivative of with respect to the first argument, and is averaging operation over all entries of a vector. Note that the third term in the right hand side of (6) is the correction term known as the “Onsager term” from statistical physics.

In the AMP algorithm, the matched filtered output can be modeled as signal plus noise (including multiuser interference), i.e., , where is Gaussian due to the correction term. The denoiser is typically designed to reduce the estimation error at each iteration. In the compressed sensing literature, the prior distribution of is usually assumed to be unknown. In this case, a minimax framework over the worst case leads to a soft thresholding denoiser [21]. When the prior distribution of is known, the Bayesian framework then can be used to account for the prior information on [16]. In this paper, we adopt the Bayesian approach and design the MMSE denoiser for the massive connectivity setup as shown in the next section.

The AMP algorithm can be analyzed in the asymptotic regime where with fixed via the state evolution, which predicts the per-coordinate performance of the AMP algorithm at each iteration as follows

 τ2t+1=σ2w+NLE[|ηt(X+τtV,G)−X|2], (7)

where is referred to as the state, , , and are random variables with following , following the complex Gaussian distribution with zero mean and unite variance, and following , and the expectation is taken over all , , and . We denote . The random variables , , capture the distributions of the entries of , entries of (up to a factor ), the prior information , and entries of , respectively, with characterizing the per-coordinate MSE of the estimate of at iteration .

### Iii-B AMP for MMV problem

#### Iii-B1 AMP with vector denoiser

One extension of the AMP algorithm to solve the MMV problem in (2) is proposed in [18], which employs a vector denoiser that operates on each row vector of the matched filtered output:

 Xt+1 =η(S∗Zt+Xt,g,t), (8) Zt+1 =Y−SXt+1+NLZt⟨η′(S∗Zt+Xt,g,t)⟩, (9)

where with is a vector denoiser that operates on the th row vector of , and the other notations are similar to those used in (5) and (6). The state evolution of the AMP algorithm for the MMV problem also has a similar form as

 (10)

where , with random vector following and random vector following . The expectation is taken over , , and . To minimize the estimation error at each iteration, we can also design the vector denoiser via the Bayesian approach.

#### Iii-B2 Parallel AMP-MMV

A different extension of the AMP algorithm for dealing with the MMV problem is the parallel AMP-MMV algorithm proposed in [19]. The basic idea is to solve the MMV problem iteratively by using multiple parallel AMP-SMVs then exchanging soft information between them. Parallelization allows distributed implementation of the algorithm, which can be computationally advantageous, especially when the number of antennas is large.

The outline of the parallel AMP-MMV algorithm is illustrated in Algorithm 1 which operates on a per-antenna basis, i.e., on the columns of and , denoted as and respectively, and where is the denoiser used for the th antenna in the iteration . Note that here we add index and in the notation of denoiser, , to indicate the index of outer iteration and the index of SMV stage, respectively. In the first phase which is called the (into)-phase, the messages , are calculated and passed to the th AMP-SMV stage. These messages convey the current belief about the probability of being active for each user. In the first iteration, we have , since no further information is available. In the next phase, which is called the (within)-phase, the conventional AMP algorithm is applied to the received signal of each antenna. Note that the denoiser in AMP algorithm is a function of the current belief about the activity of the users which is obtained based on the information sharing between all AMP-SMV stages. Finally, in the (out)-phase, the estimate of channel gains is used to refine the belief about the activity of the users.

## Iv User Activity Detection: Single-Antenna Case

A main point of this paper is that exploiting the statistics of the wireless channel can significantly enhance detector performance. This section proposes an MMSE denoiser design for the AMP algorithm for the wireless massive connectivity problem that specifically takes wireless channel characteristics into consideration in the single-antenna case. Two scenarios are considered: the large-scale fading of each user is either directly available or only its statistics is available at the BS. This section further studies the optimal detection strategy, and analyzes the probabilities of false alarm and missed detection by using the state evolution of the AMP algorithm.

### Iv-a MMSE Denoiser for AMP Algorithm

In the scenario where only the statistics about the large-scale fading is known at the BS, the distributions of the channel coefficients are independent and identical for all devices. In the scenario where the devices are stationary and their path-loss and shadowing coefficients can be estimated and thus the exact large-scale fading is known at the BS, the distributions of the channel coefficients are of the form , which are complex Gaussian with variance parameterized by , and are independent but not identical across the devices. To derive the MMSE denoisers via the Baysian approach for both cases, we first characterize the distributions , and as follows.

###### Proposition 1.

Consider a circular wireless cellular coverage area of radius with BS at the center and uniformly distributed devices where the channels between the BS and the devices are modeled with large-scale fading with parameters and shadowing fading parameter as defined in the system model. Then, follows a distribution as

 pG(gn)=ag−γnQ(gn), (11)

where , , and , and are constants depending on parameters and as

 a =40R2β√πexp(2(ln10)2σ2SFβ2−2ln(10)αβ), b =−10√2(ln10)σSF,c=−α−βlog10(R)√2σSF−20βb.
###### Proof.

See Appendix -A. ∎

###### Proposition 2.

Denote as the channel coefficient which contains both the large-scale fading and Rayleigh fading. If only is known at the BS, the pdf of is given by

 pH(hn)=∫∞0aπg−γ−2nQ(gn)exp(−|hn|2g2n)dgn. (12)

If is known at the BS, the pdf of given is

 pH|G(hn|gn)=1πg2nexp(−|hn|2g2n). (13)
###### Proof.

See Appendix -B. ∎

Note that for the first scenario, the channel distribution (12) only depends on a few parameters such as the path-loss exponent in the path-loss model and the standard deviation in the shadowing model, which are assumed to be known and can be estimated in practice. For the second scenario, the channel distribution (13) is just a Rayleigh fading model parameterized by the large-scale fading. The large-scale fading information can be obtained by tracking the estimated channel over a reasonable period. This second scenario is applicable to the case where the users are mostly stationary, so the large-scale fading changes only slowly over time. It is worth noting that although this paper restricts attention to the Rayleigh fading model, the approach developed here is equally applicable for Rician or any other statistical channel model.

In the following, we design the MMSE denoisers for the AMP algorithm by exploiting and .

#### Iv-A1 With Statistical Knowledge of Large-Scale Fading Only

Since is unknown and only the distribution is available at the BS, the denoiser reduces to , which indicates that the denoiser for each entry of the matched filtered output is the same. By using (12), the pdf of the entries of can be expressed as

 pX(xn)=(1−λ)δ0+∫∞0exp(−|xn|2g−2n)πgγ+2n/(aλQ(gn))dgn. (14)

The MMSE denoiser is given by the conditional expectation, i.e., where random variable , and is a realization of . Note that the denoiser depends on through . The expression of the conditional expectation is given in the following proposition.

###### Proposition 3.

Based on the pdf of in (14) and the signal-plus-noise model at each iteration in AMP, the conditional expectation of given is given by

 E[X|~Xt=~xtn]=~xtnν1(|~xtn|2)ξ1(|~xtn|2), (15)

where functions and are defined as

 νi(s)≜ ∫∞0g2−γnQ(gn)(g2n+τ2t)i+1exp(−sg2n+τ2t)dgn, (16) ξi(s)≜ 1−λλaτ2itexp(−sτ2t) +∫∞0g−γnQ(gn)(g2n+τ2t)iexp(−sg2n+τ2t)dgn. (17)
###### Proof.

See Appendix -C. ∎

Note that to implement at each iteration, the value of is needed. In practice, an empirical estimate , where denotes the norm, can be used [22]. Although is in a complicated form, we note that it can be pre-computed and stored as table lookup, so it does not add to run-time complexity. To gain some intuition, we illustrate the shape of the MMSE denoiser as compared to the widely used soft thresholding denoiser in Fig. 1. We observe that the MMSE denoiser plays a role similar to the soft thresholding denoiser, shrinking the input towards the origin, especially when the input is small, thereby promoting sparsity.

#### Iv-A2 With Exact Knowledge of Large-Scale Fading

When is available at the BS, we substitute (13) into (4), and the pdf of the entries of is simplified to Bernoulli-Gaussian as

 pX|G(xn|gn)=(1−λ)δ0+λπg2nexp(−|xn|2g2n). (18)

The MMSE denoiser is given by , where the conditional expectation is [17]

 E[X|~Xt=~xtn,G=gn]=g2n(g2n+τ2t)−1~xtn1+1−λλg2n+τ2tτ2texp(−Δ|~xtn|2), (19)

where

 Δ≜τ−2t−(g2n+τ2t)−1. (20)

Compared with the MMSE denoiser in (15), we add to the left hand side of (19) to emphasize the dependency on prior information .

### Iv-B User Activity Detection

After the AMP algorithm has converged, we employ the likelihood ratio test to perform user activity detection. For the hypothesis testing problem

 (21)

the optimal decision rule is given by

 LLR=log⎛⎝p~Xt|X(~xtn|X≠0)p~Xt|X(~xtn|X=0)⎞⎠H0≶H1ln, (22)

where denotes the log-likelihood ratio, and denotes the decision threshold typically determined by a cost function. The performance metrics of interest are the probability of missed detection , defined as the probability that a device is active but the detector declare the null hypothesis , and the probability of false alarm, , defined as the probability that a device is inactive, but the detector declare it to be active. We consider the threshold for two cases depending on whether the large-scale fading coefficient is available at the BS or not.

#### Iv-B1 With Statistical Knowledge of Large-Scale Fading Only

We first derive the likelihood probabilities in the following.

###### Proposition 4.

Suppose that follows (14), and follows complex Gaussian distribution with zero mean and unit variance, the likelihood of given or is given by

 p~Xt|X(~xtn|X=0) =1πτ2texp(−|~xtn|2τ2t), (23) p~Xt|X(~xtn|X≠0) =∫∞0ag−γnQ(gn)π(g2n+τ2t)exp(−|~xtn|2g2n+τ2t)dgn. (24)
###### Proof.

See Appendix -D. ∎

Based on (23) and (24), the log-likelihood ratio is given as

 LLR=log∫∞0aτ2tg−γng2n+τ2tQ(gn)exp(|~xtn|2Δ)dgn, (25)

where is defined in (20). By observing that is monotonic in , we can simplify the decision rule in (22) as , indicating that user activity detection can be performed based on the magnitude of only.

Based on the likelihood probabilities and the threshold , the probabilities of false alarm and missed detection can be characterized as follows

 PF =∫|~xtn|>lnp~Xt|X(~xtn|X=0)d~xtn=exp(−l2nτ2t), (26) PM =∫|~xtn|

where (26) is simplified by using (23). Note that since only statistical information of the large-scale fading is known at the BS, and are the averaged false alarm and missed detection probabilities which do not depend on .

#### Iv-B2 With Exact Knowledge of Large-Scale Fading

When is known at the BS, the distribution of is simplified to Bernoulli-Gaussian. The likelihood probabilities become

 p~Xt|X,G(~xtn|X=0,G=gn) =exp(−|~xn|2τ−2t)πτ2t, (28) p~Xt|X,G(~xtn|X≠0,G=gn) =exp(−|~xn|2(g2n+τ2t)−1)π(τ2t+g2n). (29)

The log-likelihood ratio is then given as

 LLR(gn)=log(τ2tg2n+τ2texp(|~xtn|2Δ)), (30)

where the notation emphasizes the dependency on the prior information . Similar to the case where only the statistics of is known, here is also monotonic in , which means that the user activity detection can be performed based on only.

We also use to denote the threshold in the detection. Based on (28) and (29), the probabilities of false alarm and missed detection probability are given as follows

 PF(gn)= ∫|~xtn|>lnp~Xt|X,G(~xtn|X=0,G=gn)d~xtn = exp(−l2nτ−2t), (31) PM(gn)= ∫|~xtn|

where we use the notation and to indicate the prior known . Note that the false alarm probability in (31) has the form as that in (26) even through the value of may be different due to different denoisers.

A natural question then arises: how to design the threshold as a function of the known large-scale fading ? In theory, we can treat each user separately, i.e., set the thresholding value of each user separately according to its own cost function. For example, if a specific target false alarm probability is needed for user , we can design its thresholding parameter, , using the expression in (31). In order to bring fairness, this paper considers a common target false alarm probability for all users. Under this condition, all users share the same thresholding parameter, i.e., , since the expression of in (31) does not depend on . In such a case, different users may have different probabilities of missed detection depending on their large-scale fading . To measure the performance of the detector for the entire system, we employ the average probability of missed detection as

 ¯¯¯¯¯¯¯¯PM =1NN∑n=1(1−exp(−l2τ2t+g2n)) →∫pG(g)(1−exp(−l2τ2t+g2))dg,asN→∞, (33)

where the distribution is given in (11). When is large, once is given, the averaged performance only depends on the statistics of the large-scale fading .

### Iv-C State Evolution Analysis

We have characterized the probabilities of false alarm and missed detection for user activity detection in (26), (27) and (31), (32), but the parameter that represents the standard deviation of the residual noise still needs to be determined. As AMP proceeds, converges to . To compute , we use the state evolution (7), where in (7) can be interpreted as the MSE of the denoiser. Note that for the MMSE denoiser, MSE can also be expressed as , where is the conditional variance of given and , and the expectation is taken over both and . (Note that we drop if the large-scale fading coefficient is unknown.) By using conditional variance, we characterize the MSE of the designed denoisers in the following propositions.

###### Proposition 5.

The MSE of the denoiser for the case where only the statistics of is known to the BS is given by

 MSE(τt)= ∫∞0aQ(gn)gγn⋅λg2nτ2tg2n+τ2tdgn +∫∞0aλs(μ1(s)−ν21(s)ξ−11(s))ds, (34)

where functions and are defined in (16) and (17), respectively, and function is defined as

 μi(s)≜ ∫∞0g4−γnQ(gn)(g2n+τ2t)i+2exp(−sg2n+τ2t)dgn. (35)
###### Proof.

See Appendix -E. ∎

It is worth noting that in the first term of the right hand side of (5) corresponds to the MSE of the estimate of if the large-scale fading coefficient as well as the user activity is assumed to be a priori known, and the integral of corresponds to the averaging over all possible . The second term then represents the cost of unknown and unknown user activity in reality. Similarly, for the case where is exactly known, the MSE can be characterized as follows.

###### Proposition 6.

The MSE of the denoiser for the case where is known exactly at the BS is

 MSE(τt)= ∫∞0aQ(gn)gγn⋅λg2nτ2tg2n+τ2tdgn +∫∞0aλQ(gn)g4ngγn(g2n+τ2t)(1−φ1(g2nτ−2t))dgn, (36)

where function of is defined as

 φi(s)≜∫∞0tiexp(−t)1+(1−λ)(1+s)iexp(−st)/λdt. (37)
###### Proof.

See Appendix -F. ∎

We also observe from (6) that the first term in the right hand side corresponds to the averaged MSE if the user activity is assumed to be known, and the second term corresponds the extra error brought by unknown user activity.

Based on the expressions of MSE in (5) and (6), the state evolution in (7) can be expressed as

 τ2t+1=σ2w+NLMSE(τt), (38)

based on which and can be evaluated according to (26), (27), and (31), (32), as functions of the iteration number. As the AMP algorithm converges, converges to the fixed point of the above equation.

Now we compare the resulting MSEs in these two cases. According to the decomposition of variance, we have

 E[Var(X|~Xt)] +E[Var(E[X|~Xt,G]∣∣~Xt)] ≥E[Var(X|~Xt,G)], (39)

which indicates that knowing the large-scale fading can help to improve the estimation on given . However, the simulation results in Section VI show that surprisingly for the model of the large-scale fading considered in this paper, the performance improvement is actually minor, indicating that knowing the large-scale fading does not help to get a much better estimation. Knowing the exact value of is not crucial in user activity detection and the statistical information of is sufficient for device detection.

## V User Activity Detection: Multiple-Antenna Case

This section designs the AMP algorithms that account for wireless channel propagation for the massive connectivity problem in the multiple-antenna case. As mentioned earlier, two different AMP algorithms can be used for the MMV problem: the AMP with a vector denoiser operating on each row of the input matrix, or the parallel AMP-MMV that divides the MMV problem into parallel SMV problems and iteratively solves the SMV problem on each antenna separately with soft information exchange between the antennas. The AMP with vector denoiser admits a state evolution, which allows an easier characterization of its performance, whereas AMP-MMV can be implemented in a distributed way which is helpful for reducing the running time of the algorithm, especially when the BS is equipped with large antenna arrays.

### V-a User Activity Detection by AMP with Vector Denoiser

As in the scenario with single antenna, we consider both the cases where only the statistical knowledge or the exactly knowledge of the large-scale fading is known at the BS. To design the denoisers, we first characterize the pdfs of the row vectors of in the following.

###### Proposition 7.

Denote as the row vector of . If only is known at the BS, the pdf of is given by

 pR(rn)=(1−λ)δ0+∫∞0exp(−∥rn∥22g−2n)πMgγ+2Mn/(aλQ(gn))dgn. (40)

If is known, the pdf of is Bernoulli-Gaussian as

 pR|G(rn|gn)=(1−λ)δ0+λexp(−∥rn∥22g−2n)(πg2n)M. (41)
###### Proof.

The results are extensions of (14) and (18) by considering multivariate random variables. ∎

Given with following complex Gaussian distribution with zero mean and covariance , the MMSE denoisers and for both cases are given by the conditional expectation in the following.

###### Proposition 8.

If only is known at the BS, the conditional expectation of given is

 E[R|~Rt=~rtn]=∫∞0Q(gn)ψa(gn)(g−2nΣt+I)−1~rtndgnψc(gn)+∫∞0Q(gn)ψb(gn)dgn, (42)

where , and are defined as follows

 ψa(gn)≜ exp(−~rtn(Σ−1t−(Σt+g−2nΣ2t)−1)(~rtn)∗)gγn|Σt+g2nI|, (43) ψb(gn)≜ exp(−~rtn(g−2nI−(g2