Optimized spectrum sensing algorithms for cognitive LTE femtocells

In this article, we investigate to perform spectrum sensing in two stages for a target long-term evolution (LTE) signal where the main objective is enabling co-existence of LTE femtocells with other LTE femto and macrocells. In the first stage, it is required to perform the sensing as fast as possible and with an acceptable performance under different channel conditions. Toward that end, we first propose sensing the whole LTE signal bandwidth using the fast wavelet transform (FWT) algorithm and compare it to the fast Fourier transform-based algorithm in terms of complexity and performance. Then, we use FWT to go even deeper in the LTE signal band to sense at multiples of a resource block resolution. A new algorithm is proposed that provides an intelligent stopping criterion for the FWT sensing to further reduce its complexity. In the second stage, it is required to perform a finer sensing on the vacant channels to reduce the probability of collision with the primary user. Two algorithms have been proposed for this task; one of them uses the OFDM cyclic prefix for LTE signal detection while the other one uses the primary synchronization signal. The two algorithms were compared in terms of both performance and complexity.


Introduction
Spectrum scarcity has become one of the serious problems facing the wireless communications regulatory bodies especially when the wireless applications and standards are increasing significantly. At the same time, a recent study by the United States Federal Communications Commission (FCC) shows that most of the allocated spectrum in the US is under-utilized [1]. Cognitive radio (CR) technology enables other secondary users to co-exist with the primary users of a wireless system and to make use of the non-utilized portions of the spectrum, also known as the white spaces, thus making a more efficient utilization of the spectrum [2][3][4].
One of the most recent wireless standards, where the use of CR is possible, is the long-term evolution (LTE) used for broadband wireless access. LTE could provide data rates up to 100 Mbps in the downlink and 50 Mbps in the uplink in a 20-MHz bandwidth; thanks to its powerful physical layer which uses orthogonal frequency division multiple access (OFDMA), multi-input multi-output technology as well as advanced channel coding techniques [5].
Within the context of LTE, CR technology can possibly be used when femtocells are deployed. These are autonomous small cellular base stations designed for use in subscribers' homes and small business environments. They radiate very low power (< 10 mW) and can typically support two to six simultaneous mobile users [6,7]. Recently, femtocells have attracted strong interest within the telecommunication industry due to the unique benefits they offer, both for the operators as well as the end users. The small, low-cost, and low power home base station improves the indoor coverage and network capacity, increases the average revenue per user, and enhances customers' loyalty [7]. These are very attractive benefits for the operators. As for the end users, the femtocell solution provides better in-building call quality and reduced calling cost at home. The battery life is also improved because of the low power radiation [6].
On the other hand, several technical challenges are expected due to the mass deployment of femtocells, these include: 1-RF interference: femtocells operate in the licensed spectrum owned by mobile operators and they may share the same spectrum with the macrocell network. RF interference could happen between neighboring femtocells, femtocells to macrocells, and vice versa [8]. The spectrum has to be efficiently allocated in the femtocell network to mitigate the interference problem. In [9][10][11][12], interference avoidance strategies were developed in a coexisting environment of macrocells and femtocells. 2-Self-optimization and auto-configuration: The femtocell is expected to operate in a plug and play fashion to ease installation, configuration, and management. Methods for self-optimization and autoconfiguration have been investigated in [13,14] to optimize the coverage of femtocells and minimize the impact on the macrocell network. 3-Integration and interoperability with the core network: Femtocells extend the operator's cellular network into homes, providing high data rate services. Thus, integration and inter-operability with the operator's existing network and services are important concerns for the operators [14].
The main problem with femotocells deployment is the RF interference that could happen between neighboring femtocells or between femtocells and macrocells. An attractive solution to this problem is to avoid interference by carefully controlling transmission power so as to only just cover the user's home. Yet, this method cannot guarantee interference-free operation since the femtocell must also provide complete coverage in the user's home. If the user places the femtocell too close to an outside wall or a window, it may not be able to give full coverage while avoiding leakage to a neighbor at the same time. Thus, it could be much better if the LTE femtocell could detect if the frequency band it intends to use is already occupied by another nearby femtocell before starting to operate [15]. A promising solution to this problem is spectrum sensing. It is the responsibility of the new femtocell user, namely, the secondary user, to scan the white spaces in the LTE spectrum and then to transmit in these white spaces, without interfering with the other neighboring LTE users; namely the primary users. In a CR system, when the secondary users are sensing a channel, the sampled received signals of the secondary users represent one of two hypotheses; Hypothesis H 1 in which the primary user is active and hypothesis H 0 in which the primary user is inactive.
where s(n) is the primary user's signal, u(n) is the noise, which is assumed to be Gaussian independent and identically distributed (i.i.d.) random variables with zero mean and variance s 2 . In channel sensing, we are interested in the probability of detection, P d , and the probability of false alarm, P f . P d and P f are defined as the probabilities that a sensing algorithm detects a primary user under hypothesis H 1 and H 0 , respectively. There are three important requirements in the sensing process; the first is to keep the probability of detection (P d ) of the LTE signal as high as possible, in order to achieve reliable communications for the primary user. The second requirement is to keep the probability of false alarm (P f ) as low as possible to achieve efficient radio utilization for the secondary user. Finally, the sensing process and consequently, a correct decision, should be accomplished as fast as possible. A challenging task is to achieve a compromise between the three previously mentioned requirements in order to achieve an acceptable performance in both additive white Gaussian noise channels (AWGN) and fading channels with different Doppler frequencies (f d ).
In order to meet the above requirements, it is usually assumed that the sensing process is performed in two stages as shown in [16]: 1. The first stage is coarse sensing, where we are more concerned with expediting the sensing process while maintaining an acceptable receiver operating characteristic (ROC) in terms of P d and P f . Examples of widely used coarse sensing algorithms are energy detection in the time domain or the frequency domain [17], Wavelet-based sensing [18] as well as others. 2. The second stage is fine sensing, where another finer stage of sensing is employed in order to double check for the white spaces after the coarse sensing stage to achieve reliable communication for the primary user. Examples of fine sensing algorithms are radio identification-based sensing [19], cyclostationarity feature detection [20,21] as well as sensing based on known signal preambles [22,23].
When designing the spectrum sensing module in a CR system, two important points have to be well considered. The first point is the challenges associated with the spectrum sensing process like the sensing time, which puts a challenge on the CR design as there is a tradeoff between the sensing reliability and the sensing speed [24], the hidden node problem where the CR may not be able to detect the primary transmitter due to shadowing, hence sensing information from other CR users is required for more reliable primary user detection; this is what is called "cooperative sensing" [25]. Finally, the hardware requirements where spectrum sensing for CR applications require operation over wide bands that need wideband RF sections as well as high sampling rate and consequently high resolution analog-to-digital converters with large dynamic range and highspeed signal processors [26]. The second point is selecting the most suitable sensing algorithm according to the sensing requirements and the properties of the signal to be sensed. There are various spectrum sensing algorithms in the literature; for example, energy detectorbased sensing [17], waveform-based sensing [27], cyclostationarity-based sensing [20,21], radio identificationbased sensing [19,28], and matched-filtering. When selecting a sensing method, some tradeoffs should be considered. The characteristics of the primary users are the main factors in selecting a method. Cyclostationary features contained in the waveform, existence of regularly transmitted pilots, and timing/frequency characteristics are all important. Other factors include the required accuracy, sensing duration requirements, computational complexity, and network requirements.
In this article, we use CR to solve the interference problem arising from the autonomous deployment of femtocells via reliable and efficient spectrum sensing. In this study, we choose the fast wavelet transform (FWT) algorithm in order to perform the coarse sensing stage and compare its performance against the fast Fourier transform (FFT)-based coarse detection in terms of both performance and complexity. The reason behind choosing FWT over other coarse sensing techniques is its ability to decompose the sensing process into a number of stages where a stopping criterion could be applied at a certain stage to reduce the complexity. In particular, a new intelligent decomposition (ID) algorithm is developed, where we provide a stopping criterion for the FWT algorithm based on environmental parameters and pre-defined thresholds. This algorithm uses a location awareness module to get the wireless channel parameters used for sensing. In addition, a confidence metric was added to indicate the amount of confidence in the decision taken.
The coarse sensing algorithm first scans the whole spectrum to search for the unoccupied LTE channels with the resolution of a complete LTE channel. If none exists, the FWT engine would go further in the LTE spectrum to search with the resolution of a resource block (RB) with a very slight additional complexity; this constitutes another benefit of using FWT over FFT. All this information is then transmitted to the MAC layer that performs the scheduling among the cognitive users.
In the fine sensing stage, two algorithms are proposed; one of them uses the cyclic shift property of the LTE OFDM signal while the other uses one of the LTE synchronization signals, namely, the primary synchronization signal. Fine sensing based on the primary synchronization signal is chosen because it has less complexity as compared to the use of other LTE synchronization signals such as the secondary synchronization signal or the LTE reference signals (pilots), as will be shown later in the sequel. Also, it is shown to perform very well under different wireless LTE channel models. Some optimizations are also done to the cyclic prefix algorithm to enhance its performance and reduce the complexity. Finally, end-to-end results are presented showing the performance of both the coarse and fine sensing results collectively for different coarse and fine sensing algorithm pairs under various LTE channel conditions.
The rest of this article is organized as follows: Section 2 explains the LTE coarse sensing stage along with its results while Section 3 explains the fine sensing stage as well as the end-to-end system results. Section 4 concludes the study.

LTE coarse spectrum sensing
The LTE downlink and uplink transmission schemes are based on OFDMA and single carrier frequency division multiple access (SC-FDMA), respectively [29]. The basic LTE scheduling unit in both downlink and uplink is called an RB and consists of 12 subcarriers with a spacing of 15 kHz (corresponding to 180 kHz overall) in the frequency domain and six or seven consecutive OFDM symbols (SC-FDMA symbols for the uplink) in the time domain. The number of available RBs in the frequency domain varies depending on the channel bandwidth, which increases from 6 to 100 when the bandwidth changes from 1.4 to 20 MHz, respectively. In the time domain, each RB spans a slot, with a duration equivalent to six or seven symbols (0.5 ms). Two slots correspond to one subframe and ten subframes typically form a frame (10 ms). LTE supports both time division duplexing (TDD) and frequency division duplexing (FDD). For TDD, a subframe within a frame can be allocated to downlink or uplink transmissions. In the case of FDD, because the downlink and uplink transmissions are separated in the frequency domain, there is no allocation of subframes in time.
In this section, we are mainly concerned with the coarse sensing part of the LTE spectrum sensing module. First, we give a brief summary on wavelets in general explaining the FWT algorithm to be used for sensing. After that, we move to a novel proposed algorithm that uses the wavelet packet transform algorithm to perform the coarse sensing stage assuming that the primary signal is an LTE signal.

Fast wavelet transform
A wavelet is a waveform of effectively limited duration that has an average value of zero. Comparing sine waves which are the basis of Fourier analysis with wavelets, sinusoids do not have limited duration. In addition, sinusoids are smooth and predictable while wavelets tend to be irregular and asymmetric [30].
The continuous wavelet transform (CWT) is defined as the summation of the signal multiplied by scaled and shifted versions of the wavelet function. The results of the CWT are many wavelet coefficients C, which are functions of scale and position. Here, we show how the CWT is performed in five steps: 1. Start with a wavelet and compare it to a section at the start of the signal. 2. Calculate a number, C, which represents how much correlation exists between the wavelet and this section of the signal, the higher C is, the more the similarity. 3. Shift the wavelet to the right and repeat steps 1 and 2 till the end of the signal. 4. Scale (stretch) the wavelet and repeat steps 1 through 3.

Repeat steps 1 through 4 for all scales.
Higher scales correspond to more stretched wavelets. The more stretched the wavelet, the longer the portion of the signal with which it is being compared, and thus the coarser the signal features being measured by the wavelet coefficients. Similarly, lower scales correspond to more compressed wavelets and thus measuring the finer signal details [30].
The CWT can operate at every scale, from that of the original signal up to some maximum scale that is determined by trading off the need for detailed analysis with available computational power. On the other hand, discrete wavelet transform (DWT) operates on discrete levels of scale.
The FWT is a computationally efficient implementation of the DWT that exploits the relationship between the DWT coefficients at adjacent scales [30]. In wavelet analysis, we often speak of approximations and details.
The approximations are the high-scale, low-frequency components of the signal. The details are the low-scale, high-frequency components. In an FWT filtering process, a signal is split into an approximation and a detail. The approximation is then itself split into a second-level approximation and detail, and the process is repeated.
In Discrete Wavelet Packet Transform (DWPT), the details as well as the approximations can be split as shown in Figure 1. DWPT could be used for fast spectrum sensing [18] as it divides the spectrum into an approximation part and a detail part after the first stage, then in the second stage; each part is divided again and so on. At the final stage, the DWPT coefficients shall indicate the amount of energy in each channel thus used to indicate whether the channel exists or not after comparing it to a certain threshold. In the sequel, the term FWT shall be used to indicate the computationally efficient implementation of the DWPT instead of DWT. Using FWT has added many benefits to the spectrum sensing process as shown in the upcoming sections where we can go deeper while sensing the LTE spectrum till an RB resolution with a slight additional complexity. In addition, a stopping criterion could be added to the FWT sensing module to further reduce its complexity which is our main concern in the coarse sensing stage.

FWT LTE sensing performance versus FFT
In order to investigate the performance of using FWT in LTE coarse spectrum sensing and compare it with that of FFT, we revert to simulations. In our simulations, we assume we have eight LTE channels with 5 MHz each as shown in Figure 2. Consequently, three wavelet decomposition stages will be needed to scan the eight channels. Table 1 shows the downlink LTE signal parameters used in our spectrum sensing model. Let N be the number of samples of the signal to be sensed, N ch be the number of LTE channels we need to sense, M be the number of wavelet decomposition stages, where M = log 2 (N ch ), and L be the wavelet filter length which equals twice the filter order. Daubechies (dbX) wavelets [30] are used where X is the filter order so for example in case of using db4 wavelets, L = 8. It can be shown that the complexity of the FFT algorithm is in the order of N × log 2 (N), while for FWT, the complexity is in the order of N × M × L [30]. In our simulations, the sensing duration is 2.5 ms (five LTE slots). For the FWT sensing, a single FWT operation is performed every LTE OFDM symbol, thus we perform 5 × 7 FWT operations, while for FFT sensing the whole signal (the five LTE slots) is divided into FFT blocks according to the FFT size and then the average FFT of these blocks is the output of the FFT sensing module.
According to the above, let us have a more detailed view on the comparison. The complexity of the FWT module is in the order of: 2× (Number of samples per LTE OFDM symbol) × 7 × 5 × M × L, while for FFT the complexity is in the order of (Number of FFT blocks per five LTE slots) × FFT_size × log 2 (FFT_Size). Table 2 shows a detailed comparison between the two algorithms in terms of their computational complexity for a sensing duration of 2.5 ms.
In Figure 3, the ROC over an AWGN channel for both FWT-and FFT-based sensing is shown while varying the FFT size and the FWT filter length. The results of the simulations show that db2 wavelets have almost the same complexity as the 256-point FFT; however, db2 gives better performance in both high P d and low P f . On the contrary, although db4 needs more computations than the 512-point FFT, it is better than the 512point FFT only in case of higher P d , which is more important for maintaining the QoS of primary users, while in case of lower P f , which is also important to achieve better spectral efficiency, db4 is slightly worse. Thus, we can deduce that the enhancement in the sensing performance due to increasing the wavelet filter order is less than that due to increasing the FFT size. So, wavelets are preferred over FFT in case of lower filter orders and vice versa. But since we are talking about the coarse sensing stage, our main concern is to achieve an acceptable performance with the least possible complexity to save the sensing time and the computational requirements, hence, the choice of wavelets is the logical choice here.

RB resolution sensing algorithm
A new sensing algorithm designed specifically for LTE systems is now proposed. It uses the FWT algorithm to go even deeper in the LTE spectrum till it reaches multiples of an RB resolution. The flow chart for the whole system is shown in Figure 4. In our simulations, the spacing between the LTE channels is 5 MHz while the actual BW is 4.5 MHz, so there is a 0.25-MHz guard band on both sides. In order to perform RB sensing on a certain LTE channel, the following algorithm is proposed: 1. Resample the LTE signal to extend the visible BW to 5.76 MHz, where the number of RBs becomes 32 which is an integer power of 2 in order to be capable of applying the FWT algorithm. 2. Shift the signal spectrum by the amount equal to the guard band to align the spectrum to its edge. 3. Apply a 5-stage FWT sensing till we reach the RB resolution.
In Figure 5, we can see the signal spectrum extended to span 32 RB (i.e., 5.76 MHz), where the first 25 RBs belong to the LTE signal under consideration while the last 7 RBs are the ones added due to the bandwidth  1. The first one is that since the sensing resolution is increased to an RB (i.e., 180 kHz), we will need to perform five FWT stages so the signal is downsampled five times leaving a small number of samples per LTE RB to be used for detection. A solution might be increasing the number of the input signal samples which means increasing the sensing time.
Since it is required to perform fast sensing in the coarse stage, the resolution in our simulations is reduced to four RBs instead of one to avoid this problem. 2. The second issue is related to the transmission of the pilot signals in OFDM symbols number 0 and 4 within the slot on a one-out-of-six basis (i.e., each RB has two pilots in these symbols) as shown in [29], where the output will be higher than normal due to the additional pilot energy. This has two possible solutions: i. Properly choosing the decision threshold to mitigate the higher energy due to pilots.
ii. During transmission there is a need for a cooperating LTE base station to transmit zeros in non-assigned RBs.
In our coarse sensing simulations, the presence of the primary, secondary synchronization signals as well as the physical broadcast channel has been neglected. The results for the four RBs sensing are shown in Figure 6 where FWT and FFT are compared for different FWT filter orders and FFT sizes. As mentioned before, wavelets are preferred over FFT in case of lower filter orders and vice versa. But since we are talking about the coarse sensing stage, our main concern is to 0 0.  achieve an acceptable performance with the least possible complexity to save the sensing time and the computational requirements.

ID algorithm
Since the complexity of the sensing algorithm is one of our main concerns, a new algorithm is now proposed to further reduce the FWT complexity. This is a generic algorithm that could be applied in case the sensing resolution is the whole LTE channel or multiples of an RB as described in the previous section.
The main idea behind this algorithm as shown in Figure 7 is to compute a certain metric for the FWT output after each wavelet decomposition stage and compare it with a pre-defined threshold to determine whether this section is vacant or occupied. In this case, it is not necessary to apply wavelet filtering on this section so the complexity is further reduced.
The block diagram of the algorithm is shown in Figure  8. A more detailed description is shown below: 1-The approximation and detail after every FWT decomposition stage shall be denoted by the name section. So, first of all, the power of each section is computed. 2-Then the number of channels per section in this stage is computed as (Total Number of LTE Channels)/2 (Decomposition Stage) . and then used to get the power per LTE channel. 3-It is assumed that there exists another location awareness module not implemented here, this module provides us with some important parameters like: A. Large-scale environmental parameters: • Average LTE signal power, which depends on the distance from the transmitter and the transmitted power. In case of femtocells, this parameter will be different from the case of a macro cell.
• Shadowing margin, which depends on the environment whether it is urban, sub-urban, or a rural area.
B. Small scale environmental parameters such as the fading margin that depends on the wireless channel between the femtocell and the user, this parameter also varies depending on whether we are considering femto or macro cells. C. Sensing parameters: • Positive margin: Used to calculate the upper threshold value above which the section is considered to be occupied.
• Negative margin: Used to calculate the lower threshold value below which the section is considered to be vacant, this value should be more conservative than the positive threshold as it will decide for this section and its channels to be vacant.
Regarding the operation of the location awareness module; we assume that this module has previous information regarding the network parameters and especially the cell transmission power; it can also determine the location of the user with respect to the cell using a certain determination mechanism (such as GPS). It can also estimate the type of the wireless channel over which the user communicates using a certain channel estimation techniques. Consequently, it can use a certain look up table that maps the estimated channel parameters to the corresponding shadowing and fading margins. An example of the location awareness engine architecture is shown in [31].

4-Then the upper and lower thresholds are computed as follows:
• Upper threshold = Average power + Fading margin + Positive sensing margin • Lower threshold = Average power -Fading margin -Negative sensing margin -Shadowing margin 5-These thresholds are used to decide for the channel state: • If Power > Upper threshold, the section state is considered occupied, thus no further wavelet filtering is applied as the LTE channels in this section will be considered occupied.
• If Power < Lower threshold, the section state is considered vacant thus no further wavelet filtering is applied and the LTE channels in this section will be considered vacant.
• Otherwise, the section state is considered normal so we shall continue applying wavelet filtering as in the normal case.  6-The declared "state" is used to fill a "state matrix" upon which we make our decision to apply wavelet filtering or not as described above. The state matrix has two dimensions: section and decomposition stage as shown in Figure 9. The section dimension (horizontal) represents the part of the LTE spectrum being sensed, while the decomposition stage dimension (vertical) represents the FWT current decomposition stage.
The algorithm performance depends on the location awareness module accuracy as well the wireless environment in which the sensing is done. In our simulations, the following assumptions have been made: -The channel is an AWGN channel thus the fading and shadowing margins equal to zero. -The average power received from the base station is known.
The positive and negative sensing margins are changed to span a range of upper and lower sensing thresholds. These two thresholds control three main performance metrics: probability of detection, probability of false alarm, and the average number of FWT operations. When the difference between the upper and lower sensing thresholds increases, the average number of FWT operations increases as in this case the probability that the ID algorithm decides for a channel to be vacant or occupied will decrease. At the same time, the performance will be better than the case when the difference between the upper and lower sensing thresholds is reduced. So, as shown in Figure 10, each curve represents a certain value for the difference between the upper and lower sensing thresholds, thus a certain value for the average number of FWT operations. A trade off has to be made between the performance (P d and P f ) and the computational complexity (average number of FWT operations) of the sensing algorithm. To conclude, the number of decomposition levels is determined heuristically taking into consideration the following: -The application using the algorithm and how much sensitive it is to the sensing false alarm rate that leads to some waste of bandwidth. -The application of the primary user and how much sensitive it is to a missed detection by the cognitive user that consequently affects the primary user QOS. -The hardware requirements and power consumption requirements of the sensing module.
It also has to be taken into consideration that deciding for the whole section to be vacant is a critical decision as this means that all of its channels will be considered vacant as well, thus the secondary user can use them after passing the fine sensing stage. That is why the negative sensing threshold should be more conservative than the positive one as it will affect the lower threshold below which the section is considered vacant. This algorithm shows a clear advantage of FWT over FFT as it could not be applied on FFT.
The simulation results have shown that the performance of the ID algorithm is quite close to the normal algorithm in case of a regular pattern for LTE channel occupancy (i.e., 1 1 0 0 1 1 0 0), which means we achieve the same performance with reduced complexity as shown in Figure 11 in case of an AWGN channel and Figure 12 in case of multipath fading channels. While in case of a random pattern the performance varies as shown before in Figure 10.
A further enhancement to the ID algorithm is now in order. It is possible to compute a weighted average of the channel states to take the final decision. This weight is a function of the difference between the channel power and the predefined threshold. In case the channel power is far below or above the threshold, a higher   -For higher P d , the confidence metric algorithm gives better results. In case of spectrum sensing, higher P d is more important than lower P f , as in case of a missed detection this will lead to collision with the primary user, which is unacceptable for CR systems. The optimal calculation of the thresholds is out of scope of this study and could be added in the future study.
-In general, using algorithm 1 is better than algorithm 2 where using the square of the difference enlarges the large differences and reduces the small differences, which might lead to false decisions as compared to using the difference alone without squaring.
After discussing the optimizations done to the FWT algorithm in order to reduce the algorithm complexity and after comparing FWT versus FFT in terms of the number of computations done in each operation for a given performance in Section 2.2, we can now have a more global view in Table 3 regarding when we should use FWT for the coarse sensing stage and when to use it from a practical perspective as well.

LTE fine spectrum sensing
Referring to the main system flow chart in Figure 4, we have shown that the coarse sensing module mainly concentrates on quick detection of empty spaces to be used by the CR user. But in order to have a more reliable detection for the empty spaces, we need to perform fine sensing on them. In this section, two fine sensing algorithms are proposed; one of them uses the cyclic shift property of the LTE OFDM signal while the other one uses one of the LTE synchronization signals. A detailed explanation is given for the two proposed fine sensing algorithms along with their results and enhancements. Finally, the end-to-end system results are shown in case of different coarse and fine sensing module pairs.

Normal CP algorithm
In this algorithm, CP correlation using a sliding window is performed over a number of OFDM symbols. The peak indices are then investigated and the decision for LTE signal existence is based on a majority vote for the number of peaks. The normal cyclic prefix configuration is assumed where the first OFDM symbol in the slot has a CP composed of 160 samples compared to 144 samples for the remaining 6 OFDM symbols.
Assuming the following: -Input signal is X(n) -The correlator output is Y(n) -The correlation window size is 160 which is the maximum CP length. The FFT size is denoted by the symbol N FFT . It is important to note here that if the window size is taken to be 144, the algorithm will be suboptimum in case of the first OFDM symbol in the slot because the first symbol has a CP of length 160 samples, while for the other symbols, the CP length is 144 samples. In that case, we are not making use of the whole 160 samples in the CP of this symbol. For the remaining symbols, the correlation will be optimum in case of a 144 length window because we shall use the whole 144 CP samples in the correlation.
The CP correlation is as follows: Every tick (time sample), the sliding window is shifted by one sample and the new correlator output is computed. The peaks of the correlator output are compared against a predefined threshold after which a decision is made whether an LTE signal is present or not. From an implementation point of view, the above algorithm could be further simplified as follows: instead of performing 160 multiplications and additions for each Table 3 A global comparison between FWT and FFT coarse sensing methods

FWT FFT
Better at obtaining a higher P d which is important to satisfy the required primary user QoS. Used when the primary user QoS is of higher concern Better at obtaining a lower P f which is important to achieve better spectral efficiency. Used when the spectral efficiency is of higher concern The sensing resolution could be simply increased to reach RB resolution by applying further FWT decompositions To increase the sensing resolution we need to increase the FFT size An ID algorithm could be applied at each wavelet decomposition stage to reduce the number of FWT operations with an acceptable performance The ID algorithm is not applicable to FFT where the operation is performed in one stage In case the LTE receiver is an SDR and has a programmable FFT core, we lose the option of reusing this core which is used in the LTE OFDM receiver to perform spectrum sensing When the receiver is an SDR with a programmable FFT core, we can simply reuse the same FFT core used in the LTE OFDM receiver to perform spectrum sensing thus reducing complexity correlator output, one can simply add one sample and subtract one sample using an iterative equation. In this case, we have only two additions and multiplications per output sample excluding the first correlator output sample. In other words, in case of the first output sample (sample = 0), the correlator output is given by: Pd ETU 70Hz -5dB ETU 300Hz -5dB EPA 5Hz -10dB EVA 5Hz -8dB EVA 30Hz -8dB  While in case of the other samples greater than zero: In our simulations, the second approach is used due to its reduced complexity. In Figure 14, the ROC is shown for CP correlation sensing. The algorithm was tested in case of the following LTE channel models: Extended Typical Urban (ETU), Extended Vehicular Amodel, and Extended Pedestrian A-model (EPA) at different noise levels.

CP algorithm with folding
In this algorithm, we use the same CP correlation method but instead of inserting the correlator results in a buffer equal to the input signal length, the buffer size this time is chosen to be equal to N FFT + correlation window size. The correlation output for the current symbol is folded with that of the previous symbol and so on. The input-output relation will be as follows: where output sample = mod (input sample, correlation buffer size) (7) correlation buffer size = NFFT + correlation window size (8) Figure 15 compares the performance of the two CP correlation algorithms. The figure shows an obvious improvement for using the folding algorithm against without folding especially in multipath fading channels like the ETU channel. In addition to the better performance, this algorithm requires a smaller correlation buffer size which means lower hardware complexity as well.

Primary sync correlation sensing
In LTE, there are three known signals transmitted in the downlink: the Primary synchronization signal (P-SCH), the Secondary synchronization signal (S-SCH), and the reference signals (Pilots). Our main target in this section is to design an algorithm that detects the LTE signal reliably and with the least possible complexity using the above mentioned known signals. We can simply correlate the received signal with a replica from the synchronization signals and compare the correlation peak against a certain threshold to indicate the existence of an LTE signal. The question now is which one of the above three signals could be used. As for the P-SCH, although it is generated as an OFDM signal, it could be entirely detected in the time-domain with no need for an FFT operation. The S-SCH, however, is typically detected in the frequency domain. Moreover, in LTE, there are 504 cell IDs which are divided into 168 group IDs, where each group contains three identities. The 168 groups are encoded into the S-SCH whereas the P-SCH signal index determines the identity within the group [32].
It is clear from the above that using P-SCH is much simpler than the S-SCH for two reasons: 1-Only three correlations need to be carried out instead of 168 correlations if S-SCH is used. 2-Detection could be performed in the time domain with no need for FFT processing before correlation.
Using the LTE Reference signals (pilots) for fine sensing will be very difficult as it requires the knowledge of the slot and symbol index in addition to the whole cell ID. That is why the P-SCH is chosen to perform the fine sensing algorithm for LTE.
In LTE, several bandwidths (up to 20 MHz) are supported and the minimum system bandwidth (1.25 MHz) corresponds to six RBs. With 15 kHz subcarrier spacing, the synchronization signal may occupy at most 72 subcarriers to comply with the minimum bandwidth in the LTE bandwidth sets. It would typically be generated by a 128-point FFT. However, to allow matched filter implementations with lengths shorter than 128 samples, the P-SCH signals are defined as OFDM signals with up to 64 subcarriers, including the DC subcarrier. Such a signal can be detected by a matched filter of length 64. In the frequency domain of the P-SCH, 62 active subcarriers are used, centered around the null DC subcarrier as follows: Numerous investigations were done in 3GPP for the selection of the sequence indices u. It was concluded that the sensitivity to large frequency offsets was smallest when the indices are selected close to half the sequence length. The sequence indices have been chosen as u = 25, 29, and 34. Also it can easily be proved that the signal obtained from u = 29 is a complex conjugated version of u = 34, this property will lead to a reduction in the matched filter complexity as the two corresponding matched filters can be implemented with the multiplication complexity of just one filter as shown below: Assume that the received signal 'r' shall be correlated with a locally generated replica of the P-SCH 's' We can see from the above equations [33] that the difference lies only in the signs and that we can perform the multiplications only once. The P-SCH signal is also centrally symmetric, which means that the number of multiplications in the corresponding matched filter could be reduced. There are 62 centrally symmetric samples of the P-SCH signal. These sample pairs can be added prior to multiplication, so the matched filter can be implemented by almost half the multiplications required in the direct implementation. To conclude, complexity reduction is done in two ways: 1-Minimizing the number of multiplications by half for each matched filter through addition of symmetric samples. 2-Making it possible to detect the three P-SCH signals with a multiplication complexity corresponding to only two matched filters. Figure 16 shows the performance of the P-SCH correlation algorithm in different LTE channel models. Also Figure 17 compares the performance of the P-SCH correlation algorithm against CP correlation. Regarding the performance of the P-SCH correlation sensing algorithm in multipath fading channels, the simulation results show that the algorithm is quite immune against delay spread, Doppler spread and noise. It also outperforms the CP correlation algorithm even when the P-SCH algorithm is operating at an SNR lower than that of the CP algorithm. However, it is important to note that the sensing duration is 10 ms where the P-SCH signals are 5 ms apart. On the other hand, although the performance of the CP correlation algorithm is not as good as P-SCH sensing, the sensing duration could be reduced to as low as 0.5 ms. So, there exists a compromise between the sensing performance and sensing duration. Increasing the sensing duration of the CP correlation sensing algorithm to 10 ms is not practical as this will mean performing too many unnecessary CP correlations (Number of OFDM symbols per slot (7) × number of slots (20) = 140 CP correlations), while in case of P-SCH sensing, we have only two P-SCH signals in a 10 ms duration.

End-to-end system results
In this section, we show some results of the proposed end-to-end LTE spectrum sensing architecture proposed including both the coarse and fine sensing modules collectively. Figure 18 compares between using an FFT coarse sensing module alone versus using the fine CP correlation sensing after the coarse sensing. It is quite clear that the fine sensing module has improved the spectrum sensing performance. It also shows the gain of using the P-SCH correlation fine sensing module after the coarse FWT sensing module versus using the coarse sensing module alone in an AWGN channel. Finally Figure 19 shows the performance of the FWT and P-SCH correlation modules collectively in case of multipath fading LTE channel models.

Conclusions
In this article, spectrum sensing is performed for an LTE signal in two stages; a coarse stage and a fine stage. An algorithm is proposed that uses the wavelet packet transform algorithm to perform the coarse sensing stage  Figure 18 A graph showing the effect of FFT coarse sensing module alone versus using the fine CP correlation sensing after the coarse sensing for a 2.5 m sensing duration. FWT coarse sensing module is also investigated alone versus using the fine P-SCH correlation sensing after the coarse sensing for a 10-ms sensing duration. Both simulations are done in an AWGN channel, -5 dB SNR.
assuming that the primary signal is an LTE signal. The challenges associated with the proposed algorithm are mentioned as well as a comparison with FFT-based coarse detection in terms of both performance and complexity has been introduced. The comparison shows that FWT and FFT have almost the same performance. Simulations have shown that reducing the sensing resolution of the FWT algorithm to an RB requires sharp filters and is impractical, that is why sensing is done at multiples of an RB. Also, a new ID algorithm has led to a further reduction in the FWT complexity where we provide a stopping criterion for the normal FWT algorithm based on environmental parameters and predefined thresholds, this provides FWT sensing with an advantage over FFT sensing as the algorithm is not applicable to FFT. The results of this algorithm have shown that a compromise has to be made between the FWT complexity and the required probability of detection and false alarm. Optimally setting the thresholds of this algorithm is a subject of future research. A confidence metric has been added to the ID algorithm which mainly applies a weighted average of the sensed channel states to arrive at the final decision. This weight is a function of the difference between the channel power and the predefined threshold. The confidence metric algorithm outperforms the normal one in case high P d is required, which is the most important parameter in case of spectrum sensing for CR systems.
In the fine sensing stage, two algorithms are proposed. The first algorithm is the CP correlation sensing. An iterative structure with fewer multiplications is compared versus the normal structure in terms of complexity where both algorithms provide the same performance. Also, simulations results have shown that using folding in CP correlation reduces the correlation buffer size and increases the sensing gain especially in multipath channels. The second proposed fine sensing algorithm requires one of the known LTE synchronization signals, we have shown that using the P-SCH is the most suitable as the S-SCH and pilots require far more complexity. The P-SCH correlation algorithm was proved to be more reliable than the CP correlation algorithms in different LTE channel models. Finally, the end-to-end system results show the gain obtained in case of using the fine sensing module after the coarse one versus using the coarse module alone for different coarse and fine module pairs.