A Review on SDR, Spectrum Sensing, and CR-based IoT in Cognitive Radio Networks

The inherent scarcity of frequency spectrum, along with the fixed spectrum allocation adopted policy, has led to a dire shortage of this indispensable resource. Furthermore, with the tremendous growth of wireless applications, this problem is intensified as the unlicensed frequency spectrum becomes overcrowded and unable to meet the requirement of emerging radio devices operating at higher data rates. Additionally, the already assigned spectrum is underutilized. That has prompted researchers to look for a way to address spectrum scarcity and enable efficient use of the available spectrum. In this context, Cognitive Radio (CR) technology has been proposed as a potential means to overcome this issue by introducing opportunistic usage to less congested portions of the licensed spectrum. In addition to outlining the fundamentals of Cognitive Radio, including Dynamic Spectrum Access (DSA) paradigms and CR functions, this paper has a three-fold objective: first, providing an overview of Software Defined Radio (SDR), in which the architecture, benefits, and ongoing challenges of SDR are presented; second, giving an extensive review of spectrum sensing, covering sensing types, narrowband and wideband sensing schemes with their pros and cons, Machine Learningbased sensing, and open issues that need to be further addressed in this field; third, exploring the use of Cognitive Radio in the Internet of Things (IoT) while highlighting the crucial contribution of CR in enabling IoT. This Review is elaborated in an informative fashion to help new researchers entering the area of Cognitive Radio Networks (CRN) to easily get involved. Keywords—Cognitive radio; cognitive radio networks; software defined radio; spectrum sensing; machine learning; CR-based IoT


I. INTRODUCTION
The radiofrequency spectrum represents a scarce and finite resource that is used for transmitting information in the radio environment. This resource is used by several services, including radiocommunication, radio broadcasting, maritime radio, and satellite communications.
At the national level, the assignment of this spectrum to these services is managed and regulated by local authorities (governmental agencies) that are responsible for determining the appropriate frequency band, the geographical extent of the use of this band, the maximum transmission power, etc. One of the fundamental purposes of these agencies is to ensure a minimum interference level between the different radio technologies.
At the global level, the International Telecommunication Union (ITU) organizes, every three to four years, the world radiocommunication conferences (WRC) 1 so as to examine and revise the treaties governing the use of the radio frequency spectrum.
Nevertheless, the static spectrum allocation strategy adopted, where spectral frequency bands allocated to a wireless communication system can only be used by that system, has caused the shortage of frequencies. This shortage is confronted with a strong demand for spectrum resulting from the emergence and abundance of wireless technologies and the extremely rapid proliferation of radio applications developed in the scope of the Internet of Things (IoT).
In addition, while unlicensed bands like ISM (Industrial, Scientific, and Medical) bands can be freely used by all radios respecting a specific set of rules, such as a shared channel access mechanism and a maximum power per Hertz , they have become very crowded and can't accommodate more wireless applications [1].
On the other hand, the already assigned spectrum is inefficiently used in all domains, such as the time domain, the space domain, and the frequency domain, as shown in Fig. 1. This was confirmed by the Federal Communications Commission (FCC), which reported in 2002 that the radio spectrum, in most of the time, was from 15% up to 85% underutilized [2].
As a result, it has been found that while some bands are overcrowded, such as those bands used by cellular base stations, many other bands are not in use or are used only for short periods [2].
Cognitive Radio (CR) technology has been commonly regarded as an efficient solution to address the abovementioned issues by enabling the opportunistic usage of the frequency bands that are not heavily occupied by licensed users [3,4]. A Cognitive Radio represents a Software Defined Radio (SDR) system [5] capable of exploring the radio environment, learning, and deciding to use the unoccupied portions of the spectrum, called "spectrum holes" or "white spaces", and consequently of dynamically adjusting its operating parameters, based on the decisions made. These decisions must imperatively take into account the impact on the primary users (PUs), which have a license on the chosen spectrum and have the higher priority to access it, in order not to cause them harmful interference. Unlicensed users, which use Cognitive Radio to access the spectrum, are referred to as secondary users (SUs).
Furthermore, the transition from analog to digital television has released many frequencies, known as TV white spaces, which have too high propagation and penetration qualities [6]. For this reason, the FCC authorized in 2008 the use of these frequencies by non-licensed users following a list of rules like using the geo-location capability to obtain the available TV bands, from White Space DataBase (WSDB), before operating [7][8][9]. That has created a lot of opportunities for Cognitive radio users.
The remarkable contribution of this promising technology to the efficient use of spectrum, the minimization of interference, the reduction of cost, etc., has pushed its use in several areas, namely the Internet of Things (IoT).
The main objective of this paper is to provide a comprehensive survey of Cognitive radio with a particular focus given to: • Software Defined Radio, as it is the building block of Cognitive Radio system; • Spectrum sensing, as one of the most important pillars to set up a Cognitive Radio system; • CR-Based IoT, given that Cognitive Radio is one of the important enabler technologies of IoT.
To the best of our knowledge, in the literature, there is no such work that gives a comprehensive survey of the three aforementioned aspects, highlights the relation between them, and exhibits the future research directions to handle their challenges in a single paper. The existing surveys dealt only with a particular aspect.
The remainder of this paper is organized as follows: Section II gives the fundamentals of Cognitive Radio technology. Section III exhibits an overview of Software Defined Radio and its different challenges. Section IV provides a detailed view of spectrum sensing and its challenges. Section V highlights the use of Cognitive Radio in IoT. Finally, this article is concluded in Section VI.

II. COGNITIVE RADIO FUNDAMENTALS
Cognitive Radio technology was first introduced by Joseph Mitola in 1999 to depict an intelligent radio system capable of reconfiguring dynamically its radio parameters according to its operational environment and to the user's QoS requirements [4]. Afterward, Cognitive Radio has been defined in many ways by different entities and researchers. The Federal Communications Commission defined CR as follows: "Cognitive radio: A radio or system that senses its operational electromagnetic environment and can dynamically and autonomously adjust its radio operating parameters to modify system operation, such as maximize throughput, mitigate interference, facilitate interoperability, access secondary markets." [10].
Moreover, Simon Haykin defined CR as "an intelligent wireless communication system, capable of being aware of its environment, learning, and adaptively changing its operating parameters (e.g., transmit-power, carrier-frequency, and modulation strategy) in real-time for providing reliable communication (anytime and anywhere) and efficient utilization of the radio spectrum" [11].
As mentioned in the above definitions, the main characteristics of Cognitive Radio are cognitive capability and reconfigurability [3,11].
Thanks to the cognitive capability feature, the CR user can sense and collect information related to its radio environment and choose the best channel to use. The collected information mainly involves transmission frequency, power, bandwidth, modulation, etc.
The reconfigurability feature allows CR users to adjust automatically its operating parameters (transmission frequency, modulation, power, etc.) based on the gathered information and without the need to change the hardware. Hence an efficient and effective Cognitive Radio system is imperatively built on Software Defined Radio platform. The latter will be briefly reviewed in the next section.

A. Dynamic Spectrum Access
By means of Dynamic Spectrum Access (DSA) techniques, Cognitive Radio enables secondary users to use the unoccupied portions of licensed spectrum which are known as spectrum holes or white spaces. When a primary user appears, the secondary user vacates the current band and moves to another spectrum hole or keeps transmitting on the same band and adjusting its transmission power level or modulation scheme in order not to cause any harmful interference to the licensed user or affect its QoS as illustrated in Fig. 2 [3]. There are three DSA approaches that the SUs can use to dynamically access the available spectral opportunities: underlay, interweave, and overlay [12].

1) Spectrum underlay:
In the underlay transmission mode, the SU can coexist with the PU as long as the SU operates below the noise floor of the PU. In other words, the coexistence between the SU and the PU may occur if only the interference caused by the SU at the PU receiver remains under a predefined threshold, known as the "interference temperature" [13,14]. To meet the interference threshold requirement, SU can use some techniques such as spreading its signal over a wide bandwidth below the noise floor of the PU or using multiple antennas to direct its signals away from the PU receiver [15].
Moreover, in the case of the underlay approach, the spectrum sensing process is not required and the SUs can transmit the data over the spectrum even if it is occupied all the time by the PUs. Therefore, this paradigm is more appropriate to use in situations when the spectrum usage status of PUs changes rapidly [12].
Nevertheless, meeting the interference constraint forces the SU to limit its transmission power and consequently to operate over a small coverage.
2) Spectrum interweave: As regards the interweave transmission mode, it stands for the opportunistic usage of the available spectrum holes which was the major motivation behind the introduction of the Cognitive Radio technology [16]. This paradigm mandates that SUs should have only access to the unoccupied spectrum resources. Thus, spectrum sensing is needed to identify the vacant spectrum bands that are not currently occupied by the PUs.
Furthermore, in this case, harmful interferences to PUs are avoided due to the fact that SUs do not transmit concurrently with the PUs. Whereas, the constant tracking of spectrum opportunities is a challenging task, especially in rapidly changing environments in terms of spectrum occupancy. Hence, this approach is more adequate for slowly changing environments [12,17].
Concerning power resources, they are only limited by the range of the identified spectrum holes.
It is also worth noting that this class of dynamic spectrum access is also referred to as opportunistic spectrum access [18].

3) Spectrum overlay:
In respect to the overlay transmission mode, it is like the underlay approach in that both approaches allow SUs to simultaneously transmit with PUs. However, in the overlay mode, SUs can transmit at any power without a predefined interference threshold constraint.
Moreover, in this paradigm, the performance of the PU shouldn't be negatively affected by the presence of the SU. To meet this requirement, SUs use a variety of techniques that require prior knowledge about PUs' codebooks and messages [19]. For instance, SUs can divide their power into two parts: one is assigned to transmit their packets and the other is allocated to support the PUs' transmissions. In that way, the interference caused by the SU at the PU receiver can be compensated by the enhancement of the PU's signal-to-noise power ratio (SNR), by dint of the part of SU's power that is used to relay the PU packets.
Additionally, SUs can exploit knowledge about PUs' codebooks and messages to cancel the interference caused by PUs, using techniques such as dirty paper coding [19].
Finally, hybrid schemes that combine these transmission modes can be conceived to increase the overall throughput of the wireless networks [20].

B. Cognitive Radio Functions
The various tasks performed by a Cognitive Radio, including detecting spectrum holes, selecting the best available channel, determining the transmission parameters, sharing spectrum with other users, and moving to another frequency band when a licensed user appears are referred to as the cognitive cycle (See Fig. 3) [21].
In general, the cognitive cycle can be divided into three functional steps, namely spectrum sensing and analysis, spectrum management and handoff, and spectrum allocation and sharing [21]: • Spectrum sensing and analysis: in this phase, CR monitors the radio environment, detects the spectrum holes, and estimates its different characteristics.
• Spectrum management and handoff: at this stage, CR chooses the best spectrum white space, determines the transmission parameters, and hops among different bands based on the channel characteristics and user requirements [3,21].
• Spectrum allocation and sharing: through these functions, CR can share and coordinate the spectrum access with other users. The coexistence with licensed users is restricted by their allowable interference level. Thus, secondary users should adjust their transmission parameters accordingly. As for sharing spectrum access with CR users, efficient spectrum access coordination is required so as to avoid collisions and interferences [21]. With respect to the layer they are in, the aforesaid functions can be classified into three groups namely physical layer (PHY) functions, the medium access control layer (MAC) functions, and network layer functions as shown in Fig. 4 [22]: Fig. 4. Key Functions of the PHY, MAC, and Network Layers in a CR [22]. 1) Physical layer functions: CR PHY layer is responsible for many tasks, including, but not limited to, identifying spectrum holes through spectrum sensing and acquiring advanced radio environment knowledge, such as the channel gain from the CR transmitter to the primary receiver and channel-state information (CSI), via environmental learning [22]. Based on the gathered information, cognitive spectrum access is performed by using transceiver optimization and reconfiguration.
2) Medium access control layer functions: CR MAC layer incorporates two key functions that allow to control and manage spectrum sensing operations as well as access to the identified spectrum opportunities. The first function is known as sensing scheduling, whereas the second is referred to as spectrum-aware access control. The operations of these functions are controlled by the sensing-access coordinator, on a time basis, by taking into consideration the compromise between the sensing requirement and the availability of the spectrum access opportunity.
In comparison with the conventional wireless communications MAC layer, the CR MAC layer is more complicated to implement because of the dynamic nature of the radio environment and the constant adaptation process that the CR should perform. More detailed information about the CR MAC layer can be found in [23,24].
3) Network layer functions: CR network layer provides three main functions: network tomography, quality of service (QoS) and error control, and spectrum-aware routing [22].
Network tomography refers to the operation by which the CR nodes sense the traffic patterns of the primary and the coexisting networks. The output of this operation provides important baseline data that allows a better understanding of the routing design and the network utilization at the packet level.
Quality of service (QoS) control and error control are of paramount importance to build a successful CR network. Statistical control can be used to address these tasks over CRNs that are characterized by opportunistic links.
Furthermore, In CR networks, data routing is a challenging problem due to varying link quality, frequent topology changes, and sporadic connectivity caused by the movement of PUs in the network [25]. In such a changing environment, the spectrum-aware routing function should be enabled in order to find optimal routes and paths while avoiding PUs. This function has two problems to handle [21]: the first problem relates to the fact that routing algorithms and protocols should be aware of the various network characteristics such as spectrum availability, PU activity, channel switching delay, and link qualities and take them into consideration while executing their different operations. The second problem deals with the setting up of interaction between routing algorithms and dynamic spectrum allocation routines so as to select routing paths with minimum interferences.
Moreover, the optimization of the energy consumption, the desired QoS, and the spectrum management should be considered while designing routing algorithms and protocols for CR networks. Routing protocols are further detailed in [26].
Finally, the spectrum manager serves as the means of establishing a connection between the three aforementioned layers and ensuring dynamic and efficient access to the available spectrum.

C. Cognitive Radio Networks
A Cognitive Radio Network (CRN) consists of a number of CR nodes with or without a secondary base station.
Based on the presence of infrastructure support, CRNs can be classified as either an Infrastructure-based network (centralized) or an Ad-Hoc network (distributed). Moreover, CRNs can be also deployed in another architecture known as Mesh architecture that combines Infrastructure-based and Ad-Hoc modes. A brief description of these architectures is given below.

1) Infrastructure-based CR network:
It is a centralized architecture which contains a CR base station that is responsible for controlling and coordinating the transmission activities of the CR nodes. In this architecture, the CR base station retrieves the spectrum related information from all the SUs in the network and on the basis of the gathered information, it makes decisions on spectrum access and sharing for all CR nodes.
Compared to Ad-hoc network, infrastructure-based network provides many advantages including, the reliability of the sensing process, collision avoidance, and a high data right for SUs. However, an infrastructure is required to build such a network.
Some examples of centralized networks include: • The IEEE 802.22 network: it is the first wireless regional area network standard that defines specifications for broadband wireless access using CR technology in TVWS bands [27]; • Spectrum Efficient Uni and Multi-cast Services Over Dynamic Radio Network in Vehicular Environments (Over DRiVE) [28]; • European Dynamic Radio for IP services in Vehicular Environment (DRiVE) [29]; • Wi-Fi (IEEE 802.11) [30].
2) Ad-hoc mode CR network: In Ad-hoc CRNs, there is no need for base stations or access points to coordinate the SUs. Thus, in the absence of a central controlling entity, SUs in such a distributed network, make independent decisions concerning spectrum access and transmission parameters. Additionally, SUs must use distributed DSA protocols so as to manage the spectrum access operation. Designing distributed DSA protocols for Ad-hoc CRNs is a challenging task because of the absence of central control entities and the completely distributed networking architecture [12]. These protocols should support a set of functions including, transparency for PUs, collision avoidance, accurate spectrum sensing, and efficient dynamic spectrum allocation [12].

III. SOFTWARE DEFINED RADIO: OVERVIEW
Given that SDR is considered as an enabling technology that handles the implementation of Cognitive Radio, this section will be dedicated to a brief overview of SDR.

A. Definition of SDR
Software Defined Radio [31,32] is referred to as a programmable radio transceiver where digital signal processing functions, such as modulation/demodulation, coding/decoding, error control, interleaving/deinterleaving, and scrambling/descrambling are implemented by means of software instead of hardware as it has been used in traditional radio communication systems. That enables the implementation of different waveform standards in a single platform and switching between them without any change in the hardware components. In some cases, there is just the need of a simple software upgrade to support other modes, bands, and functions.
Many hardware platforms are used to implement the software part of SDR, mainly, General Purpose Processor (GPP), Digital Signal Processor (DSP), Field Programmable Gate Arrays (FPGA), and Application Specific Integrated Circuit (ASIC) [33].
Each of the above-mentioned platforms has its own challenges, limitations, and strengths in terms of computational power, power consumption, implementation cost, flexibility and reconfigurability, and complexity of design (See Table I).

B. SDR Architecture
Joseph Mitola proposed the architecture of an ideal software radio transceiver that includes three components, namely an antenna, a Digital-to-Analog/Analog-to-Digital converter, and a processing unit as illustrated in Fig. 5. The processing unit allows performing, in software, all the digital signal processing functions, including modulation/demodulation, coding/decoding, and error control [3]. Many factors impede the real implementation of this proposed architecture such as the technology limitations, more particularly those related to ADC's performance, computing power, and power consumption of the processing unit.
Unlike the ideal software radio transceiver, the SDR transceiver is feasible. Indeed, the general architecture of SDRs contains more components that make its real implementation possible.
As shown in Fig. 6, the SDR transceiver includes mainly four parts which are an antenna, an analog RF front end, a digital RF front end, and the signal processing unit.

1) Antenna:
One of the main tasks expected from an SDR platform is its ability to cover multiple frequency bands. Thus, SDR platforms often use Intelligent/Smart antennas so as to fulfill the aforementioned task.
A smart antenna consists of an antenna array combined with signal processing blocks that allow to smartly exploit the spatial diversity in order to select the appropriate frequency band and adapt with interference nulling, and mobile tracking [34,35].
An antenna for SDR should ideally integrate some features such as self-adaptation, self-alignment and self-healing [35]. These characteristics can be defined as follows: • Self-adaptation: it is the capability of an antenna to adapt its parameters according to the selected band and the system requirements (gain…); • Self-alignment: it is the capability of an antenna to control its radiation pattern; • Self-healing: it is the capability of an antenna to avoid interferences.
104 | P a g e www.ijacsa.thesai.org 2) Analog RF front end: The RF front end part [34] represents an analog circuitry where the following operations are performed: In the transmission path, Digital-to-Analogue Converter (DAC) converts digital samples into an analog signal which represents the input of the RF Front End. After that, the analog signal is mixed with high frequency carriers, modulated to a preset RF frequency, and then transmitted.
In the receiving path, the RF signal captured by the antenna is fed to the RF Front end section through a matching circuitry which allows achieving an optimum signal power transfer. Then, in order to amplify very low-power signals while guaranteeing a minimum noise level, the RF signal passes through a Low Noise Amplifier (LNA) which is often mounted very close to the antenna. Afterward, the output of the LNA is mixed with a signal from the Local Oscillator (LO) so as to shift to a lower fixed frequency known as intermediate frequency (IF).
The frequency generated by the Local Oscillator is adjustable to ensure that the mixer produces a lower fixed intermediate frequency independent of the incoming RF signal.
The intermediate frequency presents several advantages: it improves the selectivity due to the fact of being fixed and it increases the performance of the processing unit and the global gain of the receiver owing to be lower than the incoming frequency.

3) Digital front end:
The Digital Front end section [34] contains a set of blocks that are responsible for performing all of the succeeding functions: In the transmission path, the digital baseband signal (nearzero frequency range) is shifted into the IF frequency by the Digital Up Converter (DUC) then it passes through the Digital Analog Converter (DAC) that converts it to the analog IF signal. The analog IF signal is later up-converted to RF signal.
In the receiving path, the analog IF signal is converted to digital IF samples by the Analog to Digital Converter (ADC). Next, the Digital Down Converter (DDC) changes the IF samples to a baseband signal which is then resampled and filtered before being processed by the signal processing unit.
These above-mentioned tasks can be divided into two principal functions which are Resampling and Channelization. Resampling or Sample Rate Conversion (SRC) is the process of converting samples from one sample rate to another. As for Channelization, it involves up/down conversion and channel filtering.

4) Signal processing unit:
This block is regarded as the main part of SDR architecture which is designed to perform Digital Signal Processing functions such as modulation/demodulation and encoding/decoding.
As already mentioned in this paper many hardware platforms are used to implement this section, namely DSP, GPP, GPU, ASIC, and FPGA [36][37][38][39]. The real challenge is determining which of these platforms is best to achieve SDR goals and which design approach is appropriate to meet the requested quality of service. Table I shows the strengths and weaknesses of some hardware platforms and highlights certain techniques used to improve their performance.  Use of multi-core GPPs to enable the parallelism and perform more operations per clock cycle. Use of GPU for intensive computing task (Turbo code, Fast Fourrier Transform…).
Lack of the required processing speeds for wideband transmissions. Consuming more power than FPGA.
Running two DSPs in parallel.

ASIC [38]
Computationally powerful. Performing at higher speed than FPGA. Smaller in size. More power efficient than GPP.
Not reprogrammable. Very expensive (Each chip is designed for a specific application). _

FPGA [38]
Computationally powerful. Capability to implement any design or function. Power efficient. Programmability. Seamless switching between. modes and functions. High speed performance. Cheaper than ASIC.
Difficulty to implement new modules. Prior Knowledge of the hardware architecture is required for an efficient module implementation.
The implementation task takes a lot of time.
Limited portability (HDL code). Consuming more power than ASIC. Taking more area than ASICs.
Use of High-Level Synthesis that enables the rapid implementation of new functions with no prior experience with hardware design.
Several metrics are used to compare the performance of hardware platforms, the most used are computing power, energy consumption, flexibility and reconfiguration, adaptability, cost, and complexity.
To exploit the advantages of each platform, researchers have proposed the co-design (hybrid) approach as a solution. This approach consists of regrouping design schemes that employ hardware techniques, such as FPGAs and ASICs, and those that use software solutions including GPPs, into one platform.
This approach presents some issues, the most known are the problem related to the shared access of the internal memory by different units (FPGAs, Processors ...) and the very expensive cost of the whole implementation.
One of the interesting readings that give a detailed review of the aforementioned platforms, can be found in [35].

C. SDR Advantages
Software Defined Radio technology has brought a lot of advantages to the world of wireless communications, such as reconfigurability and flexibility, interoperability, and cost reduction [34,37]: • Reconfigurability and Flexibility: The main feature of SDR is its capacity to handle wireless standards newly developed by simply changing or upgrading the reconfigurable software instead of replacing the hardware platform or its analog components.
• Interoperability: One of the most important benefits of SDR is its ability to resolve interoperability problems between incompatible radios that work with different wireless standards.
• Cost reduction: Several expensive hardware components disappeared due to the fact that in SDR many digital signal processing functions are implemented by means of software.
In addition to the forenamed benefits, SDR allows to test and study several communication standards by using the same platform. Furthermore, SDR is regarded as the block building of a Cognitive Radio system and as already mentioned in this paper, SDR enables the reconfigurability of Cognitive Radio.

D. SDR Tools
There are different commercial and open-source tools that can be used for SDR development. Choosing the more appropriate development tool for a specific design methodology requires prior knowledge of the available tools' features. Examples of these tools include GNU Radio, Universal Software Radio Peripheral (USRP), MATLAB, LabVIEW, and CUDA.
GNU Radio and USRP are the most widely used tools to develop SDR systems [40]. A brief description of these two tools is given below: GNU Radio: GNU Radio is a free & open-source software toolkit for building software radios [35]. It runs on host computers and it provides many signal processing blocks such as filters, decoders, and demodulators which are required to implement software radios. These blocks are programmed in C++ and they are often connected using Python script that has the advantage of allowing the data flow to be at the maximum rate, without being interpreted [41]. In addition, this tool offers the possibility of easily programming and adding new blocks for supporting unavailable functions. GNU Radio can be used jointly with Universal Software Radio Peripheral systems or other alternatives to set up complete SDR platforms.
USRP: Universal Software Radio Peripheral is the most commonly used transceiver for SDR platforms, developed by Ettus 2 Research under GPL license. USRPs are available in several series and versions, differentiated by their hardware performances and their connection method to a host computer. Generally, USRP is a board that integrates the following components: ADC/ DAC, an FPGA board, an RF front end, and a PC host interface [42]. Based on the USRP series, a certain number of daughterboards can also be held. Daughterboards perform functions such as filtering and conversion between RF and baseband signals (up/down conversions) and may support applications operating up to 6 GHz due to being modular. Concerning the other signal processing functions, the majority of them are performed at the host machine and only some operations are processed by the FPGA board [42]. USRP platforms offer several advantages, including ease-of-use, affordability, and flexibility. However, bandwidth limitations of USRP components have an impact on system throughput. That makes USRP platforms only suitable for research experiments and rapid prototyping [35,42].

E. SDR Challenges
In this subsection, the challenges that still remain to be addressed for implementing efficient and practical SDR systems are presented.

1) Security and attack issues:
Although SDR has brought many powerful advantages to the field of wireless communication, it has introduced new types of security threats and attack issues. Indeed, in addition to the known threats that exist in conventional wireless communication systems such as denial of service attacks, misconfiguration issues, listening and capturing data that can be used to perform malicious actions, there are several threats that are specific to SDR, including downloading and running malicious software.
In the absence of authentication and verification techniques, unauthorized software can easily be installed and activated on SDR terminals. The challenge of implementing protection techniques and security mechanisms, to prevent this issue, has been addressed by many researchers. For instance, in [43] a framework for establishing secure download for SDR is presented. This framework uses a public/private key scheme to verify the authenticity of the software. The digital signature is considered as a good solution to keep malicious and unauthorized software from being activated on SDR nodes, nevertheless, it greatly increases the complexity of the 2 https://www.ettus.com/ framework due to the fact that for each combination of waveform and terminal, a digital signature should be created.
Furthermore, the data configuration of SDR components can be prone to extraction, alteration, or destruction. Those issues can be prevented by guaranteeing the integrity of the security administrative module (SAM) and implementing data integrity and protection techniques [44].
2) Energy efficiency: Addressing the power consumption issue is of primary importance especially when designing solutions that are intended for battery-powered devices and low power objects in an IoT network. Several reasons are behind the importance of addressing power consumption management, including limited size and battery, ensuring a longer lifetime of IoT objects, and enabling Green Computing [17,45]. In SDR, many factors contribute to the loss of energy efficiency, namely signal processing complexity and the increased hardware requirements. To alleviate this loss, the authors of [46] proposed a cooperative wireless network scheme that is based on resource sharing (Battery, processing unit, memory…).
3) Antenna requirements for SDR: One of the major challenges in SDR is to design wideband antennas that support different technologies and standards. Although smart and reconfigurable antennas are used to resolve this concern, several constraints still hamper the SDR implementation in portable handsets and other systems, such as bandwidth and gain limitations, which are imposed by the antenna size, and the complexity of a design that meets all the antenna requirements for SDR [47]. 4) Hybrid design: Implementing an optimal SDR design, that meets the real-time requirements at low power and cost while maintaining flexibility and programmability, represents a great challenge. Researchers address this issue by using the hybrid approach which enables the use of hardware schemes (ASICs…) along with software schemes (GPP...) in the same platform in order to take advantage of their different benefits.
The hybrid design has also its own challenges in both physical and MAC layers, including partitioning and scheduling problems [35].

5) ADC and DAC limitations:
The concept of an ideal software defined radio transceiver consists in placing the ADC/DAC as close as possible to the antenna. That requires a very high-speed ADC/DAC with sampling capability up to Giga Samples per second which is actually not feasible. To overcome this issue, an RF front end block is placed right after the antenna so as to shift the incoming frequency to an intermediate frequency that can be supported by the currently available ADC/DAC.

IV. SPECTRUM SENSING
Sensing is considered as the most important and critical phase in the Cognitive Radio cycle. It refers to the operation by which the CR users can be aware of the channel occupancy, the presence of the primary user, the quality of the radio channel, www.ijacsa.thesai.org and other parameters such as transmission power, bandwidth, modulation, etc. Based on this gathered information, the CR users can determine the vacant portion of the spectrum and choose the white spaces which meet its QoS.
This section gives a detailed view of sensing spectrum function in Cognitive Radio Networks.

A. Multi-dimensional Spectrum Sensing
Through the sensing function, Cognitive radio can identify the existing spectrum opportunities in its surrounding environment by using different sensing techniques. Spectrum opportunity is conventionally defined as "a band of frequencies that are not being used by the primary user of that band at a particular time in a particular geographic area" [48,49]. This definition takes into consideration only three dimensions, namely frequency, time, and space. However, there are other dimensions that can be exploited to create new opportunities such as code dimension and angle dimension. Developing sensing algorithms that take into account all those dimensions encounters more complex and challenging issues.
A radio environment in which all the aforementioned dimensions are exploited to share spectrum access among multiple users is known by several names including, hyperspace, electro space, and radio spectrum space. Table II shows parameters that are needed to be sensed for each dimension and highlights its main idea [49].

B. Types of Spectrum Sensing
Spectrum sensing approaches can be divided into several types on the basis of specific aspects, including the cooperation between secondary users, the bands of interest, the sensing execution time, and the number of sensed channels at a time (See Fig. 7) [50]: Based on the bands of interest for the Cognitive Radio system, spectrum sensing falls into two groups: in-band sensing and out-of-band sensing. In-band sensing consists in sensing the channel that is already transmitting, in the aim of detecting primary user signals and avoiding harmful interferences [51,52]. As to out-of-band sensing, CR senses bands other than the band on which it is transmitting so as to discover new spectrum holes [51].
Based on the sensing execution time, two classes of spectrum sensing can be distinguished: reactive (on-demand) and proactive(periodic) sensing. The reactive sensing takes place when the secondary user intends to transmit or as a result of radio environmental changes. In proactive sensing, CR users sense the radio environment persistently so as to detect spectrum opportunities. Reactive sensing is more energy efficient but the time to identify an unoccupied channel may be longer than proactive sensing.
Among the types of spectrum sensing, we also find synchronous sensing and asynchronous sensing. In synchronous sensing, all CRs respect the same schedule to sense a frequency band. In that case, a high synchronization between CRs represents a challenging task. The available frequency band is segmented into disjoint subbands. Identifying opportunities in the frequency domain consists in determining the unoccupied sub-bands. It is unlikely that all the bands can be used concurrently at the same time.

Time
Available time slots in a specific band For a given frequency band, there will be times when it is unoccupied and available for opportunistic usage.

Geographic Space
PU's location (latitude, longitude, an elevation) Distance of primary users At a specific time, certain channels may be available for opportunistic usage in some geographical zones while being entirely occupied in other zones. The path loss in space enables secondary users to identify the presence or the absence of a primary user in a given local area by just looking at the interference level. If there is no interference, then the primary user is absent otherwise it is present. However, the risk of creating harmful interferences to a hidden primary user is possible. This issue is discussed later in this article.
By leveraging advanced antenna technologies (e.g., Beamforming technology), identifying PU's location, and determining PU's beam directions, new spectrum holes in the angle domain might be available for opportunistic usage. Indeed, the secondary user can transmit in the same frequency band along with the primary user at the same time in the same location by choosing a different direction without causing interferences to the licensed user.

Code
PU's spreading code, time hopping (TH), or frequency hopping (FH) sequences. Awareness of timing information is needed so that SU can synchronize its transmission with PU.
By being aware of code sequences that primary users are using at a given time, secondary users can transmit simultaneously along with primary users over the available spectrum by choosing different code sequences in such a way as to avoid creating interferences on primary users. It is important to note that simultaneous transmission is possible by using orthogonal codes.
In the case of asynchronous sensing, each CR has its own schedule to sense a frequency band. Distinguishing between SU signals and PU signals is a challenging problem.
In respect to the cooperation aspect, there are two classes of spectrum sensing: cooperative and non-cooperative (local) Sensing. In non-cooperative sensing, each CR settles for its own sensing data and independently decides on the channel state, i.e. the presence or the absence of the primary user. Decisions that are made through this sensing type are unreliable and error prone under bad channel conditions, multipath fading and shadowing effects, and hidden node issues [53].
The aforementioned issues can be avoided by using cooperative sensing [21,53]. Indeed, when cooperative sensing is enabled, CR users share their local observations and sensing data with others and exploit the shared sensing outcomes of other users to decide on the presence or absence of the primary user. Several works have been carried out on this topic and it has been shown that cooperative sensing contributes to the improvement of detection accuracy and reliability on the cost of increased latency and traffic overhead. It has also been proven that cooperation between secondary users can solve hidden primary user problem and decrease sensing time [53].
There are two types of cooperative sensing: centralized sensing and distributed sensing [3,54]. In centralized sensing [55], a central unit gathers local sensing information from CR users through a control channel, fuses them by means of one of the fusion decision rules [56], identifies spectrum holes by performing binary hypothesis testing algorithm such as Neyman-Pearson test or Bayesian test, and shares the result among other cognitive users or directly controls the cognitive radio traffic. In distributed sensing [54], cognitive nodes exchange their local observations among each other and make their own decisions on channel state. Distributed sensing doesn't require a backbone infrastructure or a centralized base station.
On the basis of interference detection, spectrum sensing is categorized as primary transmitter detection, primary receiver detection, and interference temperature [51]. In primary transmitter detection approaches, spectrum holes are identified by processing received signals at the PU receiver. This class includes several techniques such as energy detection and matched filter detection. In primary receiver detection, the status of primary channels is detected based on the local oscillator leakage power of the PU receiver [57]. This power is emitted by the PU receiver's RF front end while receiving the data from the PU transmitter [58]. As for interference temperature, secondary users transmit simultaneously with primary users as long as the interference caused by the SU at the PU receiver remains under a specified interference limit. In this case, the underlay DSA model is considered.
In regard to the requirement of the PU's information, spectrum sensing schemes can be categorized into two classes: blind and feature detection techniques [50]. The blind detection techniques serve to blindly determine the channel state without any prior knowledge about the primary user signals. This type includes, among others, energy detection and Higher-Order-Statistics detection. The feature detection techniques allow performing signal classification to the detected signal. They are more advantageous than blind detection techniques in the sense that it is possible to distinguish between PU and SU signals and to characterize the different types of PU and SU signals. Matched filter and cyclostationarity detection techniques are examples of feature detection techniques.
Depending on the bandwidth (number of sensed channels at a time), spectrum sensing schemes are classified into two broad groups which are narrowband and wideband sensing techniques [59]: in the narrowband sensing, only one channel is analyzed at a time to detect available opportunities. The most widely and commonly known narrowband methods are energy detection, matched filter detection, cyclostationary feature detection, covariance-based detection, and waveform detection [59].
As for wideband sensing, multiple frequency bands are explored at a time so as to discover spectrum holes. In this case, the available spectrum is usually divided into narrower sub-bands which are sensed either concurrently or sequentially by using narrowband sensing techniques. Wideband sensing techniques contain two groups: Nyquist-based and Sub-Nyquist wideband sensing. The former type processes digital signals at the rate equal to or greater than the Nyquist rate, whereas the latter type processes the signals with a sampling rate lower than the Nyquist rate [59].
Wideband sensing allows to exploit the available spectrum more efficiently but it brings about new challenges related to its implementation.
On the basis of the latest mentioned classification of spectrum sensing schemes (Narrowband sensing/ Wideband sensing), the next subsection will review some of the most common spectrum sensing methods as well as the recent advanced spectrum sensing techniques. 109 | P a g e www.ijacsa.thesai.org

C. Spectrum Sensing Techniques
Before reviewing in detail spectrum sensing techniques, more particularly narrowband sensing techniques, the system model for spectrum sensing is given below.

1) System Model for spectrum sensing:
The fundamental objective of spectrum sensing is to make a choice between two hypotheses: • H 0 : Channel is temporarily available for opportunistic usage i.e. no primary user signal is present; • H 1 : Channel is occupied i.e. a primary user signal is present.
These hypotheses can be expressed as under: Where Y(n) represents the received signal by SU, X(n) represents the transmitted PU signal, N(n) denotes Additive White Gaussian Noise (AWGN) with mean zero and variance 2 .h represents the channel gain, n= 1,2,3…N where n is the sample index, and N is the number of samples.
Generally, a test statistic of Y(n) is compared against a decision threshold value in order to decide between the two hypotheses. If the test statistic is greater than the threshold, H 1 is assumed to be true and thus PU's signal is declared present. in contrast, if the test statistic is less than the threshold, H 0 is assumed to be true and then PU's signal is declared absent. Fig.  8 presents the general model of spectrum detection. Sensing accuracy is typically evaluated using the Receiver Operating Characteristic (ROC) curves. These curves are the plot of the detection probability versus the false alarm probability or plot of the probability of miss detection against the probability of false alarm [60,61]. These probabilities are defined as: Probability of detection (Pd): It is the probability that the SU declares the presence of PU signal when it is actually present.
A high Probability of detection allows avoiding interference impact on primary receivers. Hence a high Pd is eminently desirable.
Probability of false alarm (Pfa): It is the probability that the SU declares the presence of PU signal when it doesn't truly exist.
Pfa= Pr(H 1 /H 0 ) A high Probability of false alarm decreases the efficiency spectral due to the loss of spectrum access opportunities. In addition, the QoS may be negatively affected as a result of this loss. Thus, Pfa should be low to avoid the under-use of potential spectrum holes.

Probability of miss detection (Pm): It is the probability of missing a PU signal when it is present.
Pm= Pr(H 0 /H 1 ) A high Probability of miss detection causes a harmful interference on primary users because, in the case of a miss detection, SUs may transmit simultaneously with PUs in the same band. So, to avoid interference to and from license holder users, Pm should be low.
2) Narrowband sensing techniques: In this subsection, we discuss several narrowband sensing techniques, focusing on their functions, mathematical models, strengths, and drawbacks. a) Energy detection scheme: Energy detection [1,62-64] called also Radiometry or Periodogram, is the most widely used sensing scheme due to its low computational complexity, the simplicity of its implementation, and the absence of need for PU signal information.
In this sensing technique, the received signal energy is computed and compared with a threshold value. If the measured energy is higher than the threshold, the target frequency band is considered to be occupied by a PU; otherwise, the target frequency band is considered to be vacant. The block diagram of the energy detection method is illustrated in Fig. 9 and its decision metric can be written as: Despite its aforementioned advantages, energy detection has several drawbacks, including the degradation of detection accuracy as a result of noise uncertainty (NU). The latter refers to the noise power fluctuations with time caused by the effects of various factors such as thermal noise, filtering effects, radiofrequency circuits, and interference from other signals [65]. Authors of [65] analyzed the impact of NU on energy detection performance using different OFDM system designs. The results of their analyses show that, for all OFDM system designs, the probability of detection is higher for signals, with lower NU and higher SNR, which are transmitted at higher PU transmit power and detected with a higher number of samples. Moreover, energy detection is unreliable at low SNR values [66], ineffective in detecting spread signals [60], and unable to distinguish between PU signals from other signals.
To enhance the performance and the accuracy of energy detection, several methods based on the use of dynamics thresholds are investigated in [67][68][69][70]. 110 | P a g e www.ijacsa.thesai.org b) Matched filter detection: The matched filter detection technique is viewed as the best method for identifying the unutilized bands when the PU transmission characteristics are known a priori, e.g., bandwidth, operating frequency, the modulation type and order, packet format, and pulse shaping [70][71][72]. In this technique, the received signal is correlated with the known PU signal and the result is compared with a threshold to decide on the presence of the PU. The block diagram of matched filter detection is shown in Fig. 10 and its test statistic is given by: The main advantage of this sensing scheme is that it requires only a small number of samples and thus less sensing time to achieve good detection performance due to its resilience against noise uncertainty [73]. Nevertheless, it has several drawbacks. First, there is a need for precise and accurate prior information about the primary user signal, which may not always be available [65]. Second, the performance of the matched filter technique drops when the prior information is incorrect. Third, to detect different types of PUs, a dedicated matched filter structure for each type must be used, which increases the complexity of the system.

c) Cyclostationary Feature Detection: Cyclostationary
Feature Detection [74][75][76] depends on cyclostationary characteristics of the received signals. Indeed, in wireless communications, the transmitted signals are typically characterized by the periodicity of some of their statistics such as mean and autocorrelation [76,77].This periodicity results from the fact that signals are modulated and coupled with cyclic prefixes, hopping sequences, pulse trains, sinusoidal wave carrier, and other features before being transmitted [76,77]. Furthermore, additive noise signals are stationary with no correlation. Therefore, Cyclostationary Feature Detection schemes are very robust to noise uncertainties and can distinguish between the signal and noise by calculating and analyzing the cyclic autocorrelation of the received signals.
The periodicity of the mean and the autocorrelation, of a cyclostationary signal y(t), can be expressed mathematically by: m y (t) = E[y(t)] = m y (t + T 0 ) R y (t, τ) = R y (t + T 0 , τ) Where T 0 represents the period of the signal ( ), represents the time offset, denotes the expectation operator, and is the autocorrelation function of ( ) and it is given by: The block diagram of Cyclostationary Detection scheme is illustrated in Fig. 11, in which The Analog-to-Digital Converter (ADC) digitizes the received analog signal y(t) into digital samples and then it is fed into the N-point FFT block which computes its Fast Fourier Transform. Next, these FFT values are correlated with themselves and then averaged over the number of samples. Finally, in the feature detection block, the sensing decision is obtained by detecting the features of the average outcome.
This scheme has also the advantage of being able to distinguish between various types of PU signals that are characterized by different transmit features [78].
However, this detector also presents some limitations such as the need for a large number of samples and high sampling rate which results in an increase in sensing time, power consumption, and complexity [76,78].
In order to reduce computation complexity while maintaining sufficient detection sensitivity, authors of [79] proposed an improved Cyclostationary Detector with SLC Diversity over Nakagami-m Fading channels, where the test statistic of conventional Cyclostationary detector is reliably simplified. For the same purpose, in [80], an improved Cyclostationary Feature Detection Algorithm is presented, in which authors proved that the cyclic spectrum is conjugate symmetry about the relevant axis, which decreases the computational complexity.

d) Covariance Based Detection:
Covariance-based detection methods exploit the correlation structure inherent in the received data and the noticeable differences between the statistical covariances of signal and noise to decide on the presence of primary signals in background noise without the need for prior knowledge about signal, channel, or noise power [81].
Different statistical tests can be extracted from the covariance matrix of the received signal and used to detect the presence of the signal like the ratio of the maximum eigenvalue to minimum eigenvalue in the case of Eigenvalue-Based Detection Method [82]. The steps of the latter can be summarized as follows: First, the sample covariance matrix of the received signal is built from the received signal samples. Then, the eigenvalues of this matrix are computed using techniques such as singular value decomposition (SVD). Finally, a decision on the presence of the signal is taken by comparing the ratio between the maximum eigenvalue and the minimum eigenvalue with a threshold. The block diagram of this method is shown in Fig. 12. The sample covariance matrix of the received signal can be expressed as [82]: Where Ns is the number of collected samples, L is a positive integer called "smoothing factor", ŷ(n) is the received signal vector at sampling instance n, and ŷ H (n) is its conjugatetranspose.
The test statistic can be written as: T= λ λ (12) Where max and min are respectively the maximum and minimum eigenvalues of Ry (Ns); Using a predefined threshold , the decision can be made as follows: if T> , H 1 is considered to be true, otherwise, H 0 is considered to be true.
It is noteworthy that, despite the robustness of covariance techniques against noise uncertainty, they have a high computational complexity due to two factors, namely covariance matrix computation and eigenvalue decomposition [82].

e) Waveform-based detection:
Waveform-based detection method, also known as coherent detection [49], can be considered as a simplified version of the matched filter scheme. Although, unlike the latter, this method doesn't need complete information about the PU signals. It simply exploits known patterns, that are used in wireless communication systems to support many functions such as synchronization, control, and equalization so as to execute coherent detection. These patterns involve but not limited to the following: • Preambles: a preamble is a known sequence that is sent before each burst; • Midambles: a midamble is a known sequence that is sent in the middle of a slot or burst; • Pilot symbols: pilot symbols are an extra overhead added to the transmitted signal.
When such patterns are available, the received signal is correlated with a known copy of itself to perform signal detection. As such, the test statistic can be expressed as: where R[.] denotes the real part, y(n) is the received signal by SU, x(n)* is the complex conjugate of the signal transmitted by PU, and n= [1,2…. N] is the sample index.
In the absence of the primary user's signal, the given expression can be written as follows: Whereas in the presence of the primary user, the test static can be simplified as under: Where n(n) denotes Additive White Gaussian Noise (AWGN) with mean zero and variance 2 .
The value of the test statistic T is compared to a fixed threshold in order to decide on the presence of a primary user signal. H 1 is considered to be true if T > , and H 0 is considered to be true otherwise.
It is noteworthy that the waveform-based sensing scheme can only be applied to wireless systems having known signal patterns, such as Wi-Fi (IEEE 802.11b) [83] and WIMAX [84].
In [85], it is demonstrated that compared to energy detector technique, this method is more reliable and has less sensing time. In addition, it is demonstrated that the accuracy of this sensing scheme increases with the length of the known primary signal pattern.
In [86], the authors have opted for waveform-based sensing scheme to analyze the sensing performance of the simultaneous transmission-and-sensing (TS) mode, which has proven its effectiveness under imperfect self-interference signal (SIS), unlike energy detection that cannot differentiate between a PU signal and a residual SIS.
In spite of the aforementioned advantages, there are some downsides to this scheme, mainly the need for complete and accurate information concerning waveform patterns as well as high synchronization between PU and SU, which is not always possible to attain.
Concerning the implementation complexity, coherent detection is more complex than Energy detection method and has a lower complexity compared to match filter detection technique.
Table III provides a performance comparison of the previously described narrowband sensing methods based on a set of performance criteria, namely detection accuracy, complexity, need for prior information about the primary user, robustness against noise uncertainty, and sensing time required to achieve a good performance.

3) Wideband sensing techniques:
Wideband spectrum sensing enables detecting spectral opportunities that lie within frequency bands greater than the coherence bandwidth of the channel. One application of this class of sensing is to exploit the available spectrum holes in the UHF (ultra-highfrequency) TV band ranging from 300 MHz to 3 GHz.
As have been discussed earlier, narrowband sensing schemes make a single binary decision for the whole frequency band. That makes these schemes incapable to perform directly wideband sensing, since the latter intends to determine the occupancy of several sub-channels that are involved in a given wideband spectrum at a time.
The two types of wideband sensing techniques (Nyquist / Sub-Nyquist) will be briefly reviewed in this subsection.
112 | P a g e www.ijacsa.thesai.org a) Nyquist wideband sensing: Nyquist wideband sensing is carried out using a standard ADC operating at Nyquist rate to digitize the wideband signal and digital signal processing methods to detect spectral opportunities. It includes, among other, wavelet-based detection, multi-band joint detection, and filter bank detection: Wavelet-based detection [87] determines spectrum holes over a wide frequency band, which is assumed to be composed of a multitude of sub-bands whose locations and power spectral densities are unknown, by using the wavelet transform. The latter serves to identify discontinuities that are located at the boundaries (edges) of each sub-band. The discontinuous changes on the edges correspond to irregularities in power spectral density. As such, information about the locations and intensities of the sub-bands can be retrieved through the wavelet transform and then their status (occupied or unoccupied) can be deduced.
Concerning the multiband joint detection algorithm [88], it senses the primary signal over multiple frequency channels by performing the following procedures: first, sampling the wideband signal using a high sampling rate analog to digital converter. Second, dividing the sampled data into parallel data streams by a serial-to-parallel converter. Third, computing the Fast Fourier Transform (FFT) of the digital signal. Fourth, dividing the wideband spectrum into multiple sub-bands that are occupied by narrowband signals. Finally, detecting spectrum opportunities over each sub-band by using a narrowband sensing scheme such as energy detection. Furthermore, this technique allows to jointly determine the optimal threshold, that maximizes the accuracy of sensing for all the sub-channels, by formulating an optimization problem.
As for filter bank detection [89], a filter bank, consisting of a set of bandpass filters, is used to separate the wideband signal into multiple sub-bands. The bandpass filters are realized through modulation (Poly-phase decomposition) of a prototype filter. The prototype filter is a lowpass filter that is used to implement the zeroth band of the filter bank. The obtained subbands are then sensed separately via a narrowband sensing scheme. In this type of sensing, the sub-bands can be downconverted and consequently re-sampled at a lower sampling rate. However, a large number of RF components will be added, resulting in a high implementation complexity [90].
While Nyquist wideband sensing allows to exploit efficiently the available spectrum, it has certain limitations, including the requirement of a high sampling rate (Waveletbased detection and multiband joint detection) and the high implementation complexity (Filter bank). b) Sub-Nyquist wideband sensing: Sub-Nyquist wideband sensing offers solutions to the challenges facing Nyquist-based sensing, more particularly high sampling rate and high implementation complexity concerns. Sub-Nyquist approaches aim to identify spectral opportunities by exploiting only a few measurements derived from processing wideband signals at sampling rates less than the Nyquist rate.
Among the most important Sub-Nyquist wideband sensing types is compressive-based sensing [91][92][93]. The latter refers to the process of recovering a sparse signal from a few measurements by following a three-step procedure (sparse representation, measurement, and sparse recovery). In the first step, the sparsity of the signal is derived by projecting the signal on an appropriate basis. In second, only a reduced number of measurements are retrieved by multiplying the sparse signal by a measurement matrix. In third, the signal is recovered by using the few collected measurements. Finally, the sensing operation is performed to identify the spectral opportunities.
It is noteworthy that the use of comprehensive sensing, in the context of wideband sensing, is enabled due to the sparsity feature that characterizes the wideband signal in the frequency domain.
Furthermore, the reliability of sub-Nyquist wideband sensing schemes depends largely on the accuracy of sparsity level estimation. Although, the latter suffers from uncertainty because of various factors, mainly the dynamic nature of PUs transmission activities as well as wireless channel impairments.

D. Machine Learning for Spectrum Sensing
As pointed out earlier, CR is an intelligent radio system that incorporates the three main components which any intelligent system should have, namely perception, learning, and reasoning [94]. Perception refers to the ability of the system to sense its radio environment and it can be realized by means of sensing measurements of the spectrum. Learning refers to the ability of the system to convert the gathered information into knowledge and it can be achieved through classification and 113 | P a g e www.ijacsa.thesai.org generalization algorithms. Finally, knowledge is exploited by the system to attain its objectives via reasoning ability [94].Considering this intelligent design, machine learning based spectrum sensing presents itself as a good alternative to determine the channel occupancy in Cognitive Radio Networks by addressing two main issues which are classification and decision making [94].
Machine learning algorithms can be classified into two broad groups: supervised learning and unsupervised learning.
In supervised learning, a classifier learns from a training dataset to make predictions on unforeseen data. According to the training dataset, supervised machine learning problems can be further grouped into classification and regression problems. If the input variables are mapped to discrete output values (categories, labels, classes…), then it is a classification problem. If the input variables are mapped to continuous output values, then it is a regression problem. Some examples of supervised algorithms include support vector machines (SVM), Random forest, and naive Bayesian classifier (NBC).
As for unsupervised learning, its main function consists in finding patterns in a set of untagged data. K-means is one of the simplest and most widely used unsupervised machine learning algorithms.
In the context of Cognitive Radio Networks, several papers have dealt with the use of machine learning algorithms to predict the availability of frequency channels. For instance, in [95], the authors performed a comparative analysis of different supervised and unsupervised machine learning algorithms based on computational time and classification accuracy. They also proposed a new method that combines support vector machines with the firefly algorithm. The authors of [96] proposed a deep learning approach to learn channel activities and predict its availability in future time slots. The ability to predict the channel occupancy in the next time slots may increase the efficiency of selecting the more appropriate channel at the instant t (For example, choosing the channel having the highest probability of being unoccupied in the next time slots).
Generally, in the case of spectrum sensing, researchers adopt a two-phase machine learning approach [95,97]. In the first phase, an unsupervised learning technique, such as Kmeans algorithm, is applied to discover the transmission patterns of primary users. In the second phase, the discovered clusters (channel busy or free) are used to train supervised learning classifiers like support vector machine (SVM) and then to assign the new input data to the suitable cluster. it is worth mentioning that in several works, the sensing clusters are assumed to be known and thus the first phase is omitted. In this case, the researchers adopt a one-phase machine learning approach in which supervised learning techniques are trained with the already known clusters [98,99].
In building machine learning models for spectrum sensing, several features are used, including energy statistic, probability vector, and occupancy over time. Obviously, the accuracy of detecting the primary users may be affected by the selected features.
Finally, to evaluate the performance of a given model, a set of metrics can be used mainly, probability of detection, probability of false alarm, total error rate, sensing time, and accuracy.

E. Sensing Challenges
This subsection is devoted to discussing the various challenges related to the spectrum sensing process in Cognitive Radio Networks as well as highlighting some possible future research directions in this field.
1) Hidden PU problem: As the Carrier Sense Multiple Accessing (CSMA), which is characterized by the presence of hidden node problem, spectrum sensing suffers also from hidden primary user problem. The latter refers to the situation in which the secondary user misses the primary user presence due to many issues, including severe multipath fading and shadowing effects experienced by primary signals, during propagation from PU transmitter to SU receiver. As such, the secondary user may induce undesirable interference to primary user receivers. In several research papers, cooperative sensing has been proposed as a successful approach to handle this issue by exploiting spatial diversity [49,100].
2) Challenges related to cooperative sensing: Cooperative sensing has proven to be effective in improving the reliability and accuracy of detection, especially in the case of the presence of channel impairments. Moreover, it has also been shown to be useful in decreasing individual sensing durations and local processing requirements [21,53].
Despite its different advantages, cooperation among CR users also brought many challenges and invoked significant researches. One of these challenges is mitigating the additional signaling overhead and reducing delays that are induced by the cooperation process [101].
Another challenge is to find a tradeoff between the number of users participating in cooperation and additional processing requirements. Indeed, a large number of cooperative nodes can ensure a high probability of detection, even in the presence of channel uncertainties and detectors with less sensitivity, but it introduces a considerable amount of extra overhead which leads to an increase in the sensing time and processing. Hence, there exists a compromise.
Another challenge consists in developing asynchronous cooperative spectrum sensing algorithms [102,103]. In fact, CR nodes are located at different positions and may perform spectrum sensing at different times [104]. Therefore, CR nodes cannot report their local sensing results to the fusion center at the same time and thus some of the reported information may not be up to date [103]. Furthermore, there is always a time offset between the local observation and the final decision which may incur performance degradation. In addition, reporting channel uncertainties may impact negatively the sensing accuracy.
3) Spectrum sensing duration: Admittedly, a long sensing duration can guarantee a higher accuracy for spectrum sensing results, but it can compromise with interference avoidance, energy efficiency, and throughput.
Regarding interference avoidance, secondary users must be aware promptly of the presence of the primary user and vacate the frequency band rapidly when the incumbent user resumes its transmission in that band. Thus, a real trade-off arises between the quickness with which the secondary user must perform the aforementioned tasks and the required sensing duration to ensure more reliable results.
Concerning energy efficiency, the gain in accuracy achieved by a long sensing duration comes at the expense of energy. Hence, sensing duration and energy efficiency should be optimized.
As for throughput, it is inversely related to sensing time. Therefore, there is a compromise between longer sensing duration for higher performance and lower sensing duration for good throughput.
These trade-offs should be addressed jointly to find an optimum solution that ensure a higher performance under certain constraints.

4) Noise uncertainty:
Several spectrum sensing techniques rely on a threshold value to decide on the presence of primary user signals. Hence, selecting the optimum threshold is crucial and important to ensure high accuracy of sensing results. To determine the best threshold value, many parameters should be taken into consideration such as noise power. The latter is uncertain and developing techniques that are robust to noise uncertainty is still a challenging task. Some research papers have addressed this issue using different approaches. For instance, in [105] a blind spectrum sensing technique based on goodness of fit testing of t-distribution has been proposed to cope with the noise uncertainty problem. 5) Complexity and hardware requirements: Several issues need to be addressed to bridge the gap between the theory and the hardware implementation realities of spectrum sensing schemes from both types, narrowband and wideband sensing. These include the complexity of narrowband sensing techniques, mainly covariance-based and cyclostationary feature detection schemes, which require large processing power that is unsuitable for portable devices. Hence, Additional efforts are required to reduce the complexity of these techniques and take advantage of their various benefits in real-life application. Besides, meeting the hardware requirements of wideband sensing schemes, like highresolution ADCs and high-speed signal processors, while maintaining acceptable complexity and moderate computation power, is a challenging task. 6) Sparsity level uncertainty: In wideband compressive sensing, estimating the accurate sparsity level is of paramount importance, since it is a prerequisite for determining the optimal number of measurements. However, achieving this result is very difficult, especially in rapidly changing environments, due to random changes in spectrum activities and time-varying fading channels. That may lead to calculate the number of measurements using the worst-case sparsity level assumption, resulting in high energy consumption and inefficient use of sub-Nyquist sampling technologies. Therefore, developing blind sub-Nyquist wideband sensing schemes, in which the estimation of sparsity level isn't needed, still a challenging task [90].
In the literature, only a few papers have dealt with the issue of sparsity level uncertainty. For instance, the authors of [106] proposed an algorithm for estimating the sparsity level of the channel over a learned dictionary using Machine Learning algorithms.

7) Security:
As with any wireless network, Cognitive Radio Networks are vulnerable to various cybersecurity attacks that can be performed by selfish or malicious users and induce disruptive effects on network operation. Selfish users exploit network facilities for their interests, namely monopolizing the use of available spectrum opportunities and thus depriving legitimate Secondary users of their fair share of spectrum. As for malicious users, they abuse network facilities by exploiting the existing vulnerabilities and thereby hindering legitimate SUs from using the spectrum.
Some of the cybersecurity attacks in Cognitive Radio Networks include most active band (MAB), primary user emulation (PUE), and spectrum sensing data falsification (SSDF) attacks.
Most active band (MAB) attack aims at detecting and making the most active band, in a multi-band CR network, unavailable by targeting it via a denial of service (DoS) attack and consequently preventing the other users (PU and SU) from using it. The authors of [107] proposed a coordinated concealment strategy to counter this attack. In this strategy, a set of SUs cooperate and transmit useless data in a free band to make it the most active and therefore the attacker's target.
Primary user emulation (PUE) attack is an attack where a selfish or malicious node adjusts its air interface to emulate primary user characteristics and thus mislead secondary users concerning the availability of the spectrum holes [108]. During the sensing process, SUs, under this attack, may detect attacker signals as primary user signals and then refrain from using the spectrum. A range of countermeasures against PUE attack has been investigated in the literature [109]. These countermeasures can be categorized into four types: countermeasures based on cryptography, countermeasures based on fingerprint, countermeasures based on game theory, and hybrid countermeasures that combine the three other types [109].
Spectrum sensing data falsification (SSDF) attack, also known as Byzantine attack, specially targets cooperative spectrum sensing and consists in compromising the fusion center with false spectrum sensing results to deceive decisionmaking. In [110], a reputation-based approach, in which the fusion center recognizes the malicious attackers and eliminates them from the data fusion process, was proposed to counter SSDF attack. While significant efforts have been carried out to detect and cope with cybersecurity issues, there are still several challenges that need to be addressed, including developing advanced techniques that do not need prior knowledge about PU location 115 | P a g e www.ijacsa.thesai.org , as this is not always available in real-world scenarios, developing detection and counter-measures methods based on cryptography that take into account resource constraint (e.g., power and bandwidth), and developing spectrum sensing techniques capable of differentiating between PU signals and malicious user signals.

V. CR-BASED IOT
The wide variety of IoT technologies have led to a rapidly increasing number of networked devices that are expected to reach 51.11 billion by 2023, according to research from Cisco states (See Fig. 13). Such devices involve daily tech gadgets such as smartphones and smart home devices, as well as industrial devices like smart machines and robots. These smart connected devices are capable of gathering, sharing, and analyzing information and creating actions accordingly. By 2023, global spending on IoT will reach 1.1 trillion U.S. dollar [111]. This puts IoT at the core of current and future social and economic transformation. Furthermore, with the massive proliferation of these connected objects, there is an increased demand for spectrum resources. Cognitive Radio proves to be a promising technology to cater to current and future IoT devices in terms of spectrum access. In this section, the integration of the Internet of Things and Cognitive Radio is explored.

A. Definition of IoT
The term "Internet of Things" was coined by Kevin Ashton to depict "a system in which the Internet is connected to the physical world by ubiquitous sensors" 4 .
Internet of Things (IoT) can be defined as a network of objects connected to the Internet and can communicate with each other using different communication technologies. These objects are equipped with sensors, that allow interaction with the environment, and communication modules [112][113][114]. Some of those sensors include temperature sensors, pressure sensors, proximity sensors, and humidity sensors.
Today, the IoT enables the real world and the virtual/or digital world interconnection. Thanks to IoT, things will communicate with each other and develop their own intelligence. Televisions, cars, kitchen appliances, surveillance cameras, smartphones, utility meters, cardiac monitors, thermostats, and almost anything that we can imagine will be connected every day, everywhere and every time.
The idea of the IoT dates back to 1999 [115] and became a reality due to several technologies and protocols, including Machine to Machine (M2M), Wireless Sensor Networks (WSN), Radio frequency Dentification (RFID), Internet Protocol version 6 (IPv6), IPv6 Low power Wireless Personal Area Networks (6LoWPAN), Routing Protocol for Low-Power and Lossy Networks (RPL), Constrained Application Protocol(CoAP), and Cognitive Radio that comes to empower the IoT revolution. This revolution gives birth to the proliferation of small devices such as sensors and actuators, with low consumption at lower cost, and a large number of platforms allowing users to develop their own applications. Thus, the number of connected « things » is increasing exponentially in the world (See Fig. 13).

B. Motivations behind the use of Cognitive Radio in the IoT
Cognitive Radio has a great potential to address several issues and challenges related to the deployment of IoT networks, namely, resource scarcity, interferences problem, limited communication range, purchasing license, storing and analyzing the data generated by IoT objects, heterogeneity, and reconfigurability and autonomicity. Dealing with these issues presents the prime motivation behind the use of Cognitive Radio in IoT.
Regarding spectrum resources, it is difficult to allocate frequency bands to all the ever-increasing number of IoT objects. CR address this issue by enabling frequency reuse.
As for the interference problem, most IoT technologies such as RFID, IEEE 802.15.4 (ZigBee) operates in UHF and ISM frequency bands which are already saturated and can't accommodate more applications. Thus, sharing these bands between a large number of objects creates inevitable interferences. CR deal with this issue by enabling dynamic spectrum access to interference-free channels.
Concerning communication range, ISM unlicensed bands allow wireless technologies to operate only over a limited range. Acquiring a frequency spectrum, that ensures communications over long distances, requires the purchase of licenses which generates superfluous expenses. CR avoids the purchase of license and allows the opportunistic usage of unoccupied bands that enables long-distance communications.
In terms of storing and analyzing the data generated by IoT objects, the objects must find communication links to transmit the generated information to numerous servers (Cloud servers). CR is a proper solution to resolve this issue.
With respect to heterogeneity problems, IoT applications represent a wide range of design options (resources, deployment, connectivity, energy, communication modality, infrastructure, network size, network topology...). Thus, new communication paradigms should be designed to support this heterogeneity by providing environmental discovery, selforganization, and self-management capabilities [116]. CR is 116 | P a g e www.ijacsa.thesai.org one of these paradigms that can be used to tackle heterogeneity issues.
Another reason is related to reconfigurability and autonomicity. In fact, smart objects are expected to have the capacity to reconfigure. themselves without any external action. Thus, objects need to be able to recognize and analyze their environment, detect neighboring objects, and then reconfigure. themselves. CR proves to be a suitable solution to fit these circumstances.
Taking into account all of the above, it can be concluded that Cognitive Radio is genuinely a promising enabler technology for IoT.

C. IoT Applications and CR
The deployment of IoT products and services will be present in all sectors and industries, from the smart home to the smart city, education, health care, manufacturing, energy, utilities, commerce, transportation, monitoring, supply chain, and logistics as illustrated in Fig. 14. In general, the opportunities offered by IoT are unlimited and its full impact and potential will be realized in the near future as more and more devices connect to the Internet. At present, there are few works in the literature dealing with potential applications of CR technology for IoT, including military applications, cognitive radio-vehicular ad hoc networks (CR-VANET), emergency networks, smart grids, smart metering, and medical applications [117][118][119][120][121][122][123]. Table IV describes some IoT applications while demonstrating how CR can be used to address a number of their concerns.

D. Open Research Issues in CR-Based IoT
Several open research issues need to be addressed in order to take advantage of the full potential of Cognitive Radio for IoT networks. In this subsection, some of these issues will be discussed.
1) Optimization of network resources: Efficient spectrum utilization, in the context of a network composed of CR IoT nodes, requires the joint optimization of a set of parameters such as transmission power, energy efficiency, transmission delay, and transmission data rate, which is a challenging task. The authors of [125] formulated an optimization problem to converge to an optimal solution, in a constrained environment, by taking into account three variables namely; transmission power, transmission rate, and transmission delay. To solve this problem, they applied a branch-and-cut polyhedral approach. The results show that an increase in network and packet size leads to an increase in transmission delay, power, rate, and interference.
Formulating and solving multi-objective optimization problems, considering a large number of factors, still need to be addressed.
2) Energy efficiency: One of the main challenges that need to be addressed in CR-based IoT networks is energy efficiency. IoT objects with cognitive radio capabilities consume more energy due to performing additional functions mainly spectrum sensing, which intensifies the power consumption issue, especially for energy-constrained nodes and battery-powered devices.

IoT application Description and CR contribution
Smart Grids [120,121] Smart Grid is an electricity distribution network that allows the flow of information between producers and consumers in order to control and regulate the flow of electricity in real time and enable more efficient management of the electricity grid. The major challenge of this technology is the transmission of data through long distances without investing in the purchase of licenses or the installation of cable trays. Cognitive radio offers a good solution to this problem.
Smart Homes [117] Homes will be equipped with smart objects, allowing to carry out all daily task, such as smart lamps and smart fridges. These objects will integrate sensors endowed with cognitive capabilities that help to avoid interference in the ISM band.
Healthcare and Medical Applications [122,123] Smart sensors are deployed to monitor critical data like blood pressure, glucose levels, and temperature. With Cognitive Radio this information can be transmitted to medical staff in real time, over long distances without worrying about spectrum availability.
Smart Cities [119] The smart city is a paradigm of urban development which integrates information and communication technology (ICT) and IoT systems. In this paradigm, continuous connectivity should be maintained. CRNs can be a good solution to support this requirement.
Internet of Vehicles (IoV) [124] Today, the trends toward less dependence on human beings have led us to the IoV paradigm in which vehicle control is achieved through the integration of communications and embedded systems. The IoV is supposed to be an autonomous travel decisionmaker. Safe navigation may be possible in the future through vehicle-to-vehicle information exchange, vehicle-mounted sensors, and user intentions. The challenge in IoVs is the availability of spectrum for mobile vehicles. CRNs may be a good solution because of their long-range and interference-free spectrum sensing.
Among the solutions that have been introduced to deal with energy efficiency concerns are energy harvesting or scavenging and Cooperative Wireless Networks. Energy harvesting is defined as the process through which energy is extracted from external sources, such as wind and solar energies, and then stored so as to be used as a source of power [126]. Energy harvesting is considered as one of the most enabling technologies for Green Computing and real-world implementation of IoT. In [127] a differential game model has been proposed to resolve the resource allocation problem in cognitive WSN using energy harvesting. Optimal resource allocation strategies for all SUs are obtained by determining the loop Nash equilibrium and the feedback Nash equilibrium solutions of the proposed model. In [128], a CR-based energy harvesting approach has been used to extend the battery's lifetime for unmanned aerial vehicles (UAVs) under reliability and secrecy constraints. To reduce energy consumption, the energy harvested is maximized and the transmission energy consumption is minimized by solving a formulated optimization problem.
Currently, Cognitive Radio networks based on energy efficiency approaches are considered an important research direction.

3) Security:
Addressing security issues in CR-Based IoT networks is a prime concern and a challenging task as most IoT objects are inherently heterogeneous and have their proper uniform security standards. These standards are not adequate for all heterogeneous networks. Several privacy and security aspects should be taken into account in designing IoT systems, including authentication, security assurance, and intrusion soft-ware [117]. Worthy efforts have been done to tackle security issues in some IoT applications with cognitive radio capabilities. For instance, the authors of [129] proposed a distributed cooperative spectrum sensing approach to deal with the security problem in CR-VANETs. This approach uses a weighted consensus-based spectrum sensing technique with trust assistance to ensure the reliability of spectrum sensing operation in a hostile CR-VANET. The validity of the proposed approach was approved by extensive simulations. In [128], the proposed CR-Based energy management scheme for UAVs has been designed in such a way that the secrecy and reliability of the system are ensured. This is illustrated by considering the scenario for the eavesdroppers.
Security remains an open issue to be addressed as cybersecurity attacks and threats are emerging and increasing in parallel with new technologies. Therefore, developing innovative countermeasures is demanded.
VI. CONCLUSION Nowadays, wireless network devices are emerging at an unprecedented rate, which will further exacerbate spectrum shortages. Therefore, addressing the spectrum scarcity problem becomes more urgent. Cognitive Radio is a promising technology to overcome this issue for futuristic networks (IoT and 5G) by enabling an efficient, flexible, and opportunistic usage of the scarce frequency spectrum. This paper provides a review of Cognitive Radio with emphasis is put on SDR, spectrum sensing, and CR-Based IoT. Concerning SDR, this article highlights its architecture, tools, advantages, and some of its ongoing challenges. As for spectrum sensing, it is extensively reviewed: spectrum opportunities considering multiple dimensions are discussed, classification of spectrum sensing based on several aspects is presented, Narrowband and Wideband sensing techniques are analyzed, ML-based spectrum sensing is studied, and challenges and open research directions are reviewed. Regarding CR-Based IoT, the focus was on explaining the motivations behind the use of CR in IoT networks and reviewing some of the open issues related to CR-Based IoT.