{'fraction_non_alphanumeric': 0.03747607581650923, 'fraction_numerical': 0.008705315799222077, 'mean_word_length': 4.494402985074627, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cooperative Spectrum Sensing for Amplify-and-Forward Cognitive Networks

We develop a framework for spectrum sensing in cooperative amplify-and-forward cognitive radio networks. We consider a stochastic model where relays are assigned in cognitive radio networks to transmit the primary user's signal to a cognitive Secondary Base Station (SBS). We develop the Bayesian optimal decision rule under various scenarios of Channel State Information (CSI) varying from perfect to imperfect CSI. In order to obtain the optimal decision rule based on a Likelihood Ratio Test (LRT), the marginal likelihood under each hypothesis relating to presence or absence of transmission needs to be evaluated pointwise. However, in some cases the evaluation of the LRT can not be performed analytically due to the intractability of the multi-dimensional integrals involved. In other cases, the distribution of the test statistic can not be obtained exactly. To circumvent these difficulties we design two algorithms to approximate the marginal likelihood, and obtain the decision rule. The first is based on Gaussian Approximation where we quantify the accuracy of the approximation via a multivariate version of the Berry-Esseen bound. The second algorithm is based on Laplace approximation for the marginal likelihood, which results in a non-convex optimisation problem which is solved efficiently via Bayesian Expectation-Maximisation method. We also utilise a Laguerre series expansion to approximate the distribution of the test statistic in cases where its distribution can not be derived exactly. Performance is evaluated via analytic bounds and compared to numerical simulations.


I. INTRODUCTION
In recent years, cognitive radio [1], [2] has attracted intensive research due to the pressing demand for efficient frequency spectrum usage. In a cognitive radio system, the secondary users (SU) try to find "blank spaces", in which the licensed frequency band is not being used by the Primary Base Station (PBS). A key requirement in cognitive radio is that the SUs need to vacate the frequency band as quickly as possible if the corresponding Primary User (PU) emerges.
Spectrum sensing is a mandatory functionality in any CR-based wireless system that shares spectrum bands with primary services, such as the IEEE 802.22 standard [3]. This standard proposes to reuse vacant spectrum in the TV broadcast bands. There has been a significant amount of research on spectrum sensing for cognitive radio, see [4], [5] for overviews.
Essentially, spectrum sensing can be cast as a decision making or classification problem. The secondary network needs to make a decision between the two possible hypotheses given an observation vector: that the frequency band is either occupied or vacant. The more knowledge we have on the nature of the primary user's signal, the more reliable our decision. If no knowledge is assumed regarding the primary user, energy detector based approaches (also called radiometry) are the most common way of spectrum sensing because of their low computational complexity. Cooperative networks can improve the performance of the network by enabling users to share information and create diversity. This helps to combat the detrimental effect caused by the fading channels. In this context, cooperative spectrum sensing has been studied extensively as a promising alternative to improve the sensing performance. In [6], the authors proposed algorithms to optimise detection performance by operating over a linear combination of local test statistics from individual secondary users. In [7], the performance of cooperative spectrum sensing was derived. It was found that the optimal decision fusion rule to minimize the total error probability is the half-voting rule. In [8], centralized and decentralized detection schemes were developed.
In contrast to those methods, our system model for cooperative spectrum sensing contains the practical scenario of channel uncertainty. This includes the case of partial CSI knowledge at the SBS or the more severe case of blind spectrum sensing. We also assume that the relays have no processing capability, therefore are not capable of performing any local decisions. This is a practical scenario encountered in many relay networks [9], [10]. In order to perform LRT, the SBS performs a hypothesis test to decide whether the PBS is transmitting or idle in a given frame. As we show, the densities involved in making a decision under this framework are intractable, meaning they can not be evaluated point wise. This is due to the fact that they involve multi-variate integrals which can not be solved analytically.

Contribution:
1) We propose a novel statistical model to address the problem of spectrum sensing with partial CSI.
To the best of our knowledge, a cooperative spectrum sensing, where both the channels from the PBS to the relays and the channel between the relays to the SBS are only partially known has not been addressed previously. In most cooperative CR systems, the relays perform a local soft or hard decision and then report their summary statistics to the SBS [11], [12]. In the system model we present all the statistical processing is performed at the SBS, thus removing the computational complexity from the relays and placing it at the SBS, enabling the use of standard relays systems already developed and in operation, making such an approach widely applicable .
2) We derive the probabilities of detection and mis-detection as well as the associated optimal tests under several different scenarios. Some bounds have exact closed-form expressions while others have closed-form approximations that we derive via Laguerre series expansion.
3) For the most complicated case of imperfect CSI, we derive two low complexity algorithms to perform spectrum sensing: i. The first is based on Gaussian approximation via moment matching. This results in a simple closed-form test statistic, for the decision process. In addition we study the approximation error providing closed form expression for the bound via Berry-Esseen theorem.
ii. The second is based on the Laplace approximation of the marginal likelihood which involves solving a non-convex optimisation problem.
The paper is structured as follows: in Section II the stochastic system model is developed and the Bayesian estimation problem is presented. Section III presents an analysis of the case of perfect CSI.
In Section IV we develop the optimal decision rule and approximate the performance for the case of imperfect-perfect CSI case. In Section V we present two novel algorithms to perform the hypothesis test in the case of imperfect-imperfect CSI. Section VI presents extensive simulation results. Conclusions are provided in Section VII. Notation.The following notation is used throughout: random variables are denoted by upper case letters and their realizations by lower case letters, and bold case will be used to denote a vector or matrix quantity.

II. PROBLEM DEFINITION AND SYSTEM MODEL
In general, in cooperative spectrum sensing model, the task of the SBS is to discriminate between two hypotheses, the null (H 0 ) that the bandwidth is idle versus the alternative (H 1 ) that the bandwidth is occupied, given a set of observations. Based on the decision regarding the presence or absence of primary user's activities, the cognitive radio can utilise the spectrum or vacate it. Since we will formulate the problem of deciding whether the channel is occupied or not based on the observational evidence via a nested model structure, we can consider the likelihood ratio test framework, see [13].
In this paper, the challenging aspect of this problem, that extends beyond solutions developed previously, is that the probability distribution (PDF) of the test statistic that we wish to use for inference is not known in closed form. In general, it will also depend on a set of unknown parameters, for each hypothesis. Therefore we resort to formulating analytic approximate solutions for the distribution of the LRT under both hypotheses in order to perform inference.

A. Statistical model
The network architecture we consider is a centralized network entity such as a base-station in infrastructurebased networks (see Fig. 1). We consider a frame by frame scenario where one PBS may be active (transmitting data) or idle (not transmitting) during a frame. If active, its signal is transmitted over independent wireless channels and is captured by M relay links. Each relay, instead of making individual decisions about the presence of the primary user, simply transmits the noisy received signal to the SBS over a fading channel. The SBS is equipped with N receive antennas. We further assume that the SBS has only limited knowledge of the CSI (noisy channel estimates), which is a practical scenario [9]. We now outline the system model and associated assumptions.

Model Assumptions:
1) Assume a wireless network with one PBS equipped with a single antenna, that may be active or idle in a given frame. 2) In case that the PBS is active, it periodically transmits pilot signals, s(l), l = 1, . . . , L, within a frame of L symbols, see [3]. This model assumption will be discussed in Remark 2 below.
3) At each frame the received signal at the m-th relay ( m = 1, . . . , M ) is a random variable given as a composite model, where H 0 and H 1 correspond to idle and active model hypotheses, respectively: where F m (l) denotes the channel coefficient between the PBS and the m-th relay and V m (l) is the unknown noise realization associated with the m-th relay receiver. Note, each of the relays is equipped with single receive and single transmit antenna. 4) The relays re-transmit their received signal, {R m (l)} M m=1 , over M fading channels. These channels can either occupy the same frequencies as the PBS-Relay channels or be dedicated reporting channels. 5) The received signal at the SBS from all M relays at epoch l can be written as  and can be expressed compactly as the following composite model: where Y(l) ∈ C N ×1 is the received signal at the l-th sample, G(l) ∈ C N ×M is the random channel matrix between the relay and the SBS, F(l) [F 1 (l), · · · , F M (l)] T ∈ C M ×1 is the random channel vector between the PBS and the relays. The random vector, W(l) ∈ C N ×1 , is the random additive noise at the SBS, and V(l) [V 1 (l), · · · , V M (l)] T ∈ C M ×1 is the random additive noise at the relays.

Prior specification:
Here we present the relevant aspects of the Bayesian model and associated assumptions.
1) The PBS is active or idle with prior probabilities P (H 1 ) and P (H 0 ), respectively.
2) All the channels are time varying, meaning that they are constant within a symbol, but may change from one symbol to the next.
3) The SBS has only a noisy estimate of the true channel realisation, G. This is the result of a channel estimation phase which we do not detail here, see [15]. A common approach is to model the channel as is the noisy channel estimate, and ∆ is the associated estimation error.
The distribution of G(l) conditioned on G(l) and ∆ can be written as G(l) ∼ CN G(l), Σ G , Σ G is the covariance matrix with known elements σ 2 G , see details on noisy channel models in [15], [16]. 4) The SBS has only a noisy channel estimate of the true channel realisation, F(l). As with the G channels, F(l) can be written as F(l) ∼ CN F(l), Σ F , where F(l) is the estimated channel and Σ F = σ 2 F I is the covariance matrix with known elements σ 2 F . Note: this stochastic model covers the case where CSI is unavailable, and only the channel prior distributions are available. In that case, F(l) = 0 and σ 2 F = 1.

5) The additive noise at the relays is a zero
V I is the covariance matrix, known at the SBS. 6) The additive noise at the SBS is a zero-mean i.
where Σ W = σ 2 W I is the covariance matrix, known at the SBS. 7) The symbols s(l) are known at the SBS in the form of pilot symbols [3]. For ease of presentation and w.l.o.g, we assume that s(l) = 1, ∀l ∈ {1, . . . , L}.

B. Spectrum sensing decision criterion
The objective of spectrum sensing is to make a decision whether the spectrum band is idle or active (choose H 0 or H 1 ) in a given frame, based on the received signal at the SBS. To solve the decision problem, we will take a Bayesian approach. That is we consider the Bayes' risk formulation of the decision problem which generalises the LRT to a Bayesian framework. The problem of designing the decision rule can be treated as an optimization problem whose objective is to minimize the cost function: It can be shown, [13], that the optimum decision rule is a likelihood-ratio test (LRT) given by where C xy is the predefined associated cost of making a decision H x , given that the true hypothesis is H y , and we define random matrix Under both hypotheses H 0 and H 1 , all random quantities in the model are independent. We can therefore decompose the full marginals under each hypothesis, p (y 1:L |H k ), k = 0, 1, as This decomposition is useful as it allows us to work on a lower dimensional space, resulting in efficiency gains for the algorithms we develop in the next sections and requiring no memory storage for data. Table I presents a summary of the different scenarios that will be covered in the next Sections as well as the type of solution that is provided under each scenario.

III. PERFECT KNOWLEDGE OF PBS-RELAYS AND RELAYS-SBS CHANNELS
We consider the situation of perfect CSI of both G(l) and F(l) for all l, which corresponds to Case I in Table I. We derive the optimal decision rule and the probabilities of detection and false alarm.
This scenario enables us to obtain a lower bound on the overall system performance in terms of error probabilities in analytic form.

Lemma 1: The marginal likelihood under perfect CSI is:
where Σ(l) σ 2 V g(l)g(l) H + σ 2 W I, and µ(l) g(l)f (l). Next, using the decomposition property of (6), the test statistic and associated decision rule are presented.

Theorem 1: Under perfect CSI, the optimal decision rule defined in (5) is given by
which results in the following decision rule where we identify the test statistics according to and the threshold for the critical region is given by Proof: Using Lemma 1 and the definition of the LRT it follows in the log domain that This result is useful as it will provide a lower bound for the achievable Type I (false detection) and Type II (false alarm) probabilities as a function of SNR. It can therefore be used as a comparison for our approximation results when only partial CSI is known. and x exp −t 2 /2 dt. Proof: To obtain this we derive the distribution of the test statistic utilised in the Bayes risk criterion under both the null and alternative hypotheses as follows Next we establish that adding receive antennas translates into a better overall detection performance.
where the subscript N , (N + 1) refers to the number of receive antennas. We begin by proving that Consider the following linear model where W ∼ CN 0, σ 2 W I N , X ∼ CN 0, σ 2 V I K , and known mixing matrix g N ∈ C N ×K . Then, using the properties of the Bayesian MMSE, its MSE covariance matrix, c N , can be written as If we had an augmented model with It is well known that the MSE covariance is strictly decreasing with the number of observations [13], that is and in particular, consider x = f ∈ C M ×1 .

IV. IMPERFECT PBS-RELAYS CSI AND PERFECT RELAYS-SBS CSI
In this section we consider the system model under which we can assume that the receiver has perfect CSI of G(l) but only partial knowledge of F(l), which corresponds to Case II in Table I. We derive the optimal decision rule and the probabilities of detection and false alarm via Laguerre series expansion.

Lemma 2: The marginal likelihood under Imperfect PBS-relays CSI and Perfect relays-SBS CSI is:
where Having stated the likelihood in Lemma 2 we then present the corresponding test statistic for the Imperfect PBS-relays CSI combined with perfect relays-SBS CSI setting.

Theorem 4: Under Imperfect PBS-relays CSI and Perfect relays-SBS CSI, the optimal decision rule in (5) is given by
, which results in the following decision rule Here we identify the test statistics according to and the resulting Bayes risk threshold is defined as , and a(l) c(l) −1 Σ −1 H1 (l)µ(l). Proof: Using the result in Lemma 2 and the definition of the LRT, produces The distribution of the test statistic in (21) is asymptotically χ 2 in L. However, in practical systems the number of frames is typically small and therefore this asymptotic result can not be applied. Therefore, in these cases the distribution of the test statistic in (21) is not attainable in closed form and deriving the probability of detection and false alarm needs to be approximated. The reason for this is that the L-fold convolution of non-central χ 2 random variables, each with different centrality parameter, can not be solved in closed form.
There does however exist a rich statistical literature approximating the distribution of the linear combination of non-central χ 2 random variables. The solutions to finding an approximation to the PDF and CDF of a linear combination of non-central χ 2 involve a range of series expansions, saddle point approximation type methods and the Weiner Germ modifications, see in depth discussions in [17] and [18]. In this paper we consider the Laguerre series expansion distributional approximations to attain the probability of false alarm and mis-detection. This class of approximation has tight error bounds represented as a function of the order of the series, see [19].
The Laguerre series expansion for the probability of false alarm and mis-detection is characterized by the parameters: p the order of the series expansion; µ 0 a parameter that controls the rate of convergence of the series expansion; and β values selected to control the error of approximation for a given p, see discussion in [19]. In addition, this approximation has the property that for different settings of the parameter µ 0 we can obtain other series expansions in the literature such as setting µ 0 = ν/2 = p which gives the expansion of [18].
where Γ is the Bayes risk threshold given in Theorem 4 and with coefficients m k having the recurrence relations in the setting µ 0 > 0 and p = ν/2 + 1 given by The corresponding PDF is given by with p = ν/2, and ν = L l=1 ν(l) and the following recurrence relations for the coefficients, , α > 0 is the generalized Laguerre polynomial. In addition the generalized Laguerre polynomials can be obtained by recurrence relationships, Proof: To derive this result involves consideration of the distribution for a linear combination of non-central χ 2 random variables. Consider the identity for LRT statistic given in Theorem 5 as with To obtain the distributional approximations, we require a linear combination of independent χ 2 non-central random variables. To achieve this for each symbol we apply the following rotational transformation, with α l > 0 a positive weight. Each resulting independent scalar random variable Z 2 (l) ∼ χ 2 νl (δ(l)) with non-centrality parameters δ(l).
Therefore, under the transformed observation vectors Z 1:L , one can obtain the distributions of the test statistic in Theorem 5. The equivalent Bayes risk threshold for the transformed data can be easily obtained by replacing c(l) with c(l) = U(l)Λ −1/2 (l)c(l) and replacing a(l) with a(l) = U(l)Λ −1/2 (l)a(l).
The result of Theorem 5 provides the means to approximate the critical region of the decision rule for any observed test statistics for any number of frames. This means we can quantify the mis-detection and false alarms rates analytically as a function of the number of frames and the SNR with known error bounds on the order of approximation.

V. IMPERFECT PBS-RELAYS CSI AND IMPERFECT RELAYS-SBS CSI
In this section we consider the case where the SBS has only partial CSI of both G(l) and F(l), which corresponds to Case III and Case IV in Table I. We first consider two scenarios which have practical interpretations before moving to the more general case. The first involves consideration of line-of-sight transmissions; and the second assumes high SNR scenario, which for both we obtain analytic expression for the marginal likelihood and therefore an analytic for the LRT in (5).
For the n-th element in (2), after omitting the time dependency l, we obtain: The m-th term in the summation above can be expressed as: Each of the terms in (29) form a product of independent Normal random variables. The distribution of this product was first derived by [20] and later studied by [21] and the resulting density and Moment Generating Function (MGF) are given as follows.

Lemma 3: The distribution of a product of two independent normally distributed variates
The Moment Generating Function (MGF) of Z can be expressed as [21] M Z (t) = where ρ X = X σX and ρ Y = Y σY . For the special case where X = Y = 0 the integral can be solved analytically as [21] where K 0 (·) is the modified Bessel function of the second kind.
Following this result of the MGF we obtain an asymptotic result for the marginal likelihood in (6) under both hypotheses.

Theorem 6: The distribution of Y (n) in (28) is asymptotically Normal when either
Therefore, assuming only the linear dependence between the N components of Y and ignoring any tail dependence in the joint multivariate distribution, we conclude that Y is multivariate Gaussian.
Proof: See Appendix.
Theorem 6 shows that under the following conditions, the Gaussian Approximation (GA), that will be presented next, is valid: 1) The CSI estimation error, quantified by σ 2 G and/or σ 2 F is low. 2) The mean value of one or both of the channels estimates (G (k,m) , R (m) ) is large, i.e. strong lineof-sight, for example in Rician channels.
Next we consider generalising the analysis to relax the assumptions in Theorem 6 making the resulting solution widely applicable. Consequently, the distribution of the marginal likelihood in (6) under both hypotheses is intractable. This is because it involves finding the distribution of Y (n) in (28) which can not be obtained analytically. This is due to the fact that (M Z (t)) M = M M m=1 Zm (t), which means that this distribution is not closed under convolution.

A. Gaussian Approximation via Moment Matching
We derive a low-complexity detection algorithm that is based on moment matching so that the distribution of the received signal is approximated by a matrix variate Gaussian distribution based on the results obtained in Theorem 6. We show under which conditions this approximation is valid and asses the approximation error.

Lemma 4: The first two moments of Y(l) can be expressed as
where Tr [X] is the trace of matrix X and b(l) We make a Gaussian approximation on the multivariate observation vector to obtain: The approximated distribution of Y matrix has the same structure as (20), and we can therefore utilise a similar procedure to obtain the decision rule: given by Berry-Essen bound [22]. To do this we only need to calculate E || Y(m)|| 3 . Writing || Y(m)|| = which follows a χ N distribution, is given by .

B. Approximation of the Marginal Evidence via Laplace Approach
In this section, a more accurate estimation of the marginal likelihoods than the GA is developed. This is based on the Laplace approximation [23]. The Laplace method can approximate integrals via a series expansion which uses local information about the integrand around its maximum. Therefore, it is most useful when the integrand is highly concentrated in this region.
Under the full Bayesian paradigm, the evidence in (6) is obtained via the following marginalisation: where R [R 1 (l) , . . . , R M (l)] T . The densities in (34) can be expressed as: This integral is intractable and we shall approximate it via an application of the Laplace approximation.
To do so we begin by defining the following quantity (we discard the time dependency l here): h (r) log (p (y|r) p (r)) .
This expression is now expanded using a Taylor series about its maximum a-posteriori (MAP) estimate, denoted by R = arg max r p(r|y). This is the point where the posterior density is maximised, i.e. the mode of the posterior distribution. Hence, we obtain The second term in equation (38) cancels because at the maximum of h (r) (which is by definition what the MAP location represents), the first derivative is zero.
Replacing h (r) by the truncated second-order Taylor series yields: where H k is the Hessian of the log posterior, evaluated at R: We now concentrate on approximating the log of the integral in (34): log p (y) = log p (y|r) p (r) dr Finally, the marginal likelihood estimate can be written as The Laplace approximation to the marginal likelihood consists of a term for the data likelihood at the mode (second term of (42)), a penalty term from the prior (first term of (42)), and a volume term calculated from the local curvature (third term of (42)).
Under the Laplace approximation presented in (42), the LRT decision rule in (5) is approximated by where p (y(l)|H k ) is the Laplace marginal likelihood approximation under the k-th hypothesis. The major difficulty in evaluating (42) is the requirement to evaluate the MAP estimate R under each hypotheses.
This task is nontrivial as it involves a non-convex and non-linear optimisation problem. We derive the MAP estimate for this scenario via the Bayesian Expectation Maximasation (BEM) methodology, see the derivation in the Appendix .

VI. SIMULATION RESULTS
In this section, we present the performance of the proposed algorithms via Monte Carlo simulations.

A. Simulation Set-up
The simulation settings for all the simulations are as follows: • The prior distribution for all the channels is Rayleigh fading, and the channels are assumed to be both spatially and temporally independent.
• We define the receive SNR as the ratio of the average received signal power to the average noise power SNR 10 log Tr E (G(l)F(l)s(l)) (G(l)F(l)s(l)) H Tr E (G(l)V(l) + W(l)) (G(l)V(l) + W(l)) H = 10 log 1 • The SNR is set to 0 dB.
• The results are obtained from simulations over 100, 000 channels and noise realisations for a given set of N , M and L.
• For the Laguerre series expansion, the order of the series expansion was set to p = 100.

B. Study of detection probability Vs. frame length
In this section we study the relationship between the ability to detect the presence of a signal in a spectrum sensing problem as a function of the length of the frame, L. We undertake this study in two different scenarios, the first involves perfect CSI according to Section III and the second involves partial CSI according to Section IV. We set the channels uncertainty F(l) = 0 and σ 2 F = 1, thus only prior information is available for the F channels.
In presenting results we fix the false alarm rate p f to 10%. We repeat this study for a range of values of the number of receive antennas, N ∈ {1, 2, 4, 8}. The results are depicted in Fig. 2 and they demonstrate the following key points: 1) for all frame lengths, as the number of receive antennas is increased, the probability of detection improves as expected; 2) for all frame length, the detection probability under perfect CSI always outperforms significantly the performance of the model with partial CSI; 3) asymptotically in the frame length, L, the probability of detection for any number of receive antennas converges to 1, with different rates, depending on N ; 4) such a study provides generic performance specifications that allow us to obtain the same detection probability for different combinations of frame length and number of receive antennas. For example, with L = 10 and N = 1, this will be equivalent to L = 3 and N = 4. 5) it also guides system design that for a given desired probability of detection, we see the saturation point, after which, increasing the frame length delivers negligible improvement.

Evaluation of the Gaussian approximation
The accuracy of the GA in Section V-A is bounded via a multi-dimensional Berry-Esseen inequality in Theorem 7. Here we study this accuracy using a graphical Q-Q plots of each element of Y(l) as a function of the number of relays M . The results are presented in Fig. 3 and demonstrate that for a fixed frame length and number of receive antennas, as one increases the number of relays M , the Gaussian approximation that we made in Lemma 4 improves. We see that in the setting of partial CSI which is relevant to practical scenarios, the number of relays required before one can make a reasonable Gaussian approximation is around 8.

C. Comparison of Detection Probability under different LRT Statistic Approximations
In this section we present a comprehensive comparison of the distributional estimators derived for the LRT test statistic in order to evaluate the probability of detection. This is undertaken in a range of ii. This was followed by the results of the imperfect PBS-relays CSI, and perfect relays-SBS CSI which were obtained under the Laguerre approximation and again compared to a Monte Carlo simulation estimated.
iii. Finally the results of the approximations when least information is known, imperfect PBSrelays CSI, and imperfect relays-SBS CSI which were obtained under the Laplace approximation and the Gaussian approximation. The Laplace approximation outperformed the Gaussian approximation in situations in which the distribution of the test statistic was not close to Gaussian.
2) In all the examples the Laplace approximation outperformed the Gaussian approximation or was directly comparable in performance as the Central Limit Theorem became viable, i.e. when M was large, as presented in Fig.6.

VII. CONCLUSIONS AND FUTURE WORK
In this paper we developed a framework for spectrum sensing in cooperative amplify-and-forward cognitive radio networks. We developed the Bayesian optimal decision rule under various scenarios of CSI varying from perfect to imperfect CSI. We designed two algorithms to approximate the marginal likelihood, and obtained the decision rule. We utilised a Laguerre series expansion to approximate the distribution of the test statistic in cases where its distribution can not be derived exactly. Future research will include comparison of the Laplace method to other low complexity approaches, such as the Akaike and Bayesian information criteria.

VIII. ACKNOWLEDGMENT
Finally, we define α = t √ 1+ρ 2 X +ρ 2 Y and take the limits ρ X → ∞ or ρ Y → ∞ to obtain the following standard normal distribution: which is the MGF of N (0, 1). Therefore, we obtain that Z ∼ Z, σ 2 Z .

Deriving the MAP estimate of R in (42)
The MAP optimisation problem can be written as where p (y|r) and p (r) are defined in (35)-(36). Then, the MAP estimate is the solution for the following optimisation problem, where for simplicity we remove the time dependence l: where Problem (48) is non-linear and non-convex. We shall utilise the Bayesian Expectation Maximisation (BEM) methodology to solve it efficiently under each hypothesis. The BEM algorithm (see [24], [25]) is an iterative method that alternates between an E step, which infers posterior distributions over hidden variables given a current parameter setting, and an M step, which maximises p (y, G, R) with respect to R given the statistics gathered from the E step. The BEM can be easily evaluated using the following iterative steps, at iteration (n + 1): The E Step can be expressed as: where constant contains all terms that are independent of R.
The conditional expectations in (51)can be evaluated using Bayesian MMSE as follows: we first re-write the observation model (3) as: where we define Ω R T ⊗ I , Γ vec [G], and ⊗ is the Kronecker product, and vec [·] is the vector obtained by stacking the columns of a matrix one over the other. Since Y and Γ are jointly Gaussian, the Linear MMSE is also the MMSE estimator (see [26]). The LMMSE can be expressed as where Γ = E [Γ]. Next, we evaluate the covariance matrix: By rearranging the above expressions, we obtain Using (55a-55b), (51) can be expressed as The M Step is obtained by setting to 0 the derivative of L(R) with respect to R: The BEM algorithm requires that R n+1 is initialised at n = 0. The simplest option is to initialise it to the prior, that is R 0 = R.