# Introduction he Smart Devices (SD), which are also referred to as Internet of Things (IoT) are increasing every day and are gaining focus because most organisations and individuals are using the device. Internet of Things refers to billions of physical machines around the globe that are linked to the internet, assembling and sharing data (Nidhi and Rajeev, 2019). Any physical entity can be transformed into an Internet of things machines if it can be linked to the Internet/Ethernet and controlled (Hsu et al, 2016). As of 2016, the prediction of the Internet of things has advanced due to a convergence of numerous technologies, as well as wireless communication, real-time analytics, machine learning, product sensors, and embedded systems. The acceptance of Radio Frequency Identification (RFID) tags (low power chips that can communicate wirelessly) resolved some of this concern. The accessibility of broadband internet, cellular and wireless networking also helps in facilitating the growth of Internet of Things (Hus et al, 2016). Internet of Things also finds application in checking electric grid, telecommunication at real time, and help to encourage healthy living by use of consumer machines such as linked scales or wearable heart check (Hus et al, 2016; Kang et al, 2017). With the advancement in communication technology, the IoT machines have introduced a new class of low-power short-range wireless machines that uses radio spectrum for the switching of information (Asghar et al, 2015). The requirement for these machines are creating irresistible demand on the radio spectrum (secondary licensing) (Asghar et al, 2015); thereby causing shortage of frequency. Other wireless machines that use secondary spectrum have been facing interference (Otermat et al, 2015;Singh et al, 2014), since some range of spectrum are free (secondary spectrum), any user can use any spectrum that he/she assume is good for his/her machine not considering other users (Stankovic, 2014). The number of Internet of Things machines is predicted to reach 200 billion by the year 2020 (Asghar et al, 2015;Stankovic, 2014). This rapid growth of internet of things machines are introducing high demand for the switching of information. Hence with the new discovery, it also brings the crisis; communication field frequency insufficiency which is at the present becoming extremely a main crisis as man discovers appliances every day. To compensate this extraneous demand for radio spectrum, each application have need for spectrum to function, but with limited amount of frequency obtainable for proper throughput communication (secondary spectrum) (Asghar et al, 2015). As a result of this, Primary spectrum need to be analysed in order to locate any vacant spectrum that IoT machines need to utilise, to solve the shortage of radio frequency and throughput. Cognitive radio (CR) device have been proven using a novel method to identify free and used radio spectrum. If IoT machines will be able to regulate their machines parameters, such as transmit (broadcast) power and frequency, in order to optimize their throughput at the same time minimizing intrusion to the primary spectrum license user, with the help of cognitive radio. We can predict the spectrum hole and use the free spectrum (Otermat et al, 2016). This study will have a significant impact on spectrum allocation to secondary user, method that will To communicate between IoT devices over a 2.4/5GHz radio frequency it becomes problematic when other nearby devices are using that frequency (Dawid, 2017). Tan and Wang, (2010) proposed a variant of the Open Systems Interconnection (OSI) model for the IoT architecture. The first layer is splitted between Existed Alone Application System Layer and Edge Technology Layer/Access Layer. The second, third, fourth, and fifth layers are Backbone Network Layer, Coordination Layer, Middleware Layer, and Application Layer, respectively. Each of these different layers possesses its own enabling technology. According to Experts, 30 billion connected devices will exist by 2020, these many devices competing for wireless spectrum will cause severe congestion (Zhang et al, 2012). Alleviating spectrum congestion is the primary reason for incorporating CR in IoT. One of the most revolutionary applications of CR is addressing spectrum scarcity in wireless communications. The spectrum is scarce primarily because of the way it is licensed. CR provides the technical framework for spectrum sharing of the underutilised spectrum (Hassanieh et al, 2014;Haykin, 2015), the underutilised spectrum for use by CIoT devices will be key to the future success of ever increasing IoT networks. Review of the spectrum scarcity research was conducted to prove that spectrum scarcity is indeed a pseudo situation (Omorogiuwa and omozusi, 2018). It is pseudo in the sense that the spectrum remains idle or vacant majority of the time. However, it cannot be utilised by anyone but the primary license holder. This study focused on developing FM frequency allocation to secondary user without interference. # II. Method a) Algorithm Model i. System Architecture There are two types of network architectures in the FM spectrum system: the allocated spectrum and the unallocated spectrum, as we know, the entire spectrum is made up of a number of channels. There are FM spectrum channel in total which can be represented as M and there are allocated FM which can be represented as K and there are unallocated FM spectrum which can be represented as L; with set PUs K?{1,...,K} and SUs as L?{1,...,L}. the PU operational in different channel can either be 1 or 0 which denote PUi i? K and the bitrates of such a channel can be represented as Bi which for kwon is not relevant in this model, Figure 1 # ) Channel Occupancy Model A model is used to represent the status of each channel as discussed in System Architecture, in which there is intermittent channel switching between unallocated idle and unallocated busy, to avoid interference with the PUs allocated and to track the spectrum before transmission, The SUs perform spectrum sensing, this is necessary because the SUs are using the free spectrum of PUs and that means each SUs can be represented by SUj j? L. for a SU can access one frequency of the M channels where it is 0. If PUi is 1 in the spectrum of interest i, i? K is denote by H1i; if PUi is absent, this dente by H0i, but this assumption will not be since, if the FM station allocated are made constant, that means the model will improve to SUi; which means when SU is busy, it will denote H1i and when is idle, it will be SU0i. This assumption was made that every user is entitled to only one transceiver operating in half duplex; it is required of the SU to have spectrum nimbleness with embedded dynamic frequency selection. The likelihood of the SUi being active is connoted as SU1i; the likelihood of it being inactive is connoted as SU0i; that shows SUH1i + SUH0i = 1, Figure 2 shows the chain representation of the model. From Figure 2 there are some probability discretions in regarding the resolution of active (busy) and inactive (idle). First system probability discretion, that channel i is idle and PUi is constant, true negative, which means the probability P0/0i = PH0i(1 -Pf,i) Second system determination that the channel SUi is occupied and PUi remains constant that is a false positive occurring with a probability P1/0i = PH1i,Pfi. Third system determination that channel PUi is dormant while SUi is functional, that is false negative occurring with aa probability P0/1i = PH1i(1 -Pfi) Fourth system determination that channel PUi is active as SUi (means all unallocated FM station) is active that means a true positive occurring with a probability P1/1i = PH1i,Pfi As indicated, the algorithm presented in Channel Occupancy Model shows notable improvements in the alliance formation algorithm which forms the basis of the alliance. The model convergence time is quicker in decision making. This comes as a result of putting PU as constant, while multiple SUs are allowed to sense channel more than one time. Both the processes of channel sensing and access can be performed by Multiple SUs at a time, while the same channels in the PU (constant) spectrum are not sensed or accessed. The outcome thus is that there is no discord or interference of PU in the network. # Code This code was used to display the graph using the simulation. SP: val_F=Data IF Data<100 then R_val=100 -Data Else R_val = 100 Goto sp: End # III. Performance a) Simulation parameters The FM frequency spectrum range contains the network nodes distributed in it. The algorithm was use to compared PU and SU for access and dynamic spectrum sensing. The average utility of SUs in the spectrum used for comparison was the main matrix and this average utility of SUs depends on the constant (PU) value in each State. Simulation parameters of different state as shown in Table 2 this was use to vary and decide the resulting outcome on average spectrum SU utility. Table 1 shows the parameters of the default simulation that was used and the results is shown in Figures 3 to 9. Each state in the Country has an average of 5-12 FM radio stations. Since there are 100 possible radio channels that could be occupied at any given location (latitude and longitude coordinate), that show the FM radio channels in Nigeria is 89% underutilised. # b) Alliance formation The number of channels available determines the number of alliance available to join each channel. To aid visualization of the alliances, charts were drawn to show the total FM spectrum. SUs and PUs in the network were generated with the assumption as discussed in Algorithm Model and Channel Occupancy Model and the colour of the node as shown in Figures 3 to 9 From the chart that was shown in Figure 3-9, First system decision that channel i is idle and PUi is constant, true negative, which means the probability P0/0i = PH0i(1 -Pf,i) as described in Channel Occupancy Model was use to formulated the results in Figures 3 -9. It was an indicator that there is free spectrum in the FM station. This indicates how many SUs and PUs are in each alliance. The organisations of PUs and SUs across the alliances are what the spectrum sensing and access algorithm seeks to optimize, in reflecting the average utility of the spectrum. Second system determination that the channel SUi is occupied and PUi remains constant that is a false positive occurring with a probability P1/0i = PH1i,Pfi, using Abia, Adamawa, Delta State. The assumptions are represented in Figures 10 to 12. From the chart in Figures 10 -12, it was shown that if any spectrums from the secondary user are allocated it becomes constant that means the spectrum cannot be reallocated to any user. # Conclusion In this paper, better approaches of spectrum sharing were obtained and analysis was done. Algorithm model with channel occupancy model for multi-channel dynamic access was presented. The details of a collaborative spectrum sharing technique were presented from an analytical perspective and an adapted algorithm for fast convergence in a hedonic coalition technique was soon. From the technique shown, if compared with other model, that put the primary license holder as parity 1 and secondary user as parity 2, the system will use time to scan if parity 1 is available or when using the spectrum, when parity Model on Optimizing Primary Spectrum Allocation using Cognitive Radio IV. active (primary user), the secondary user will disconnect, which will lead to loss of packet. But the performance of the model can operate in the primary user spectrum and secondary user spectrum without causing interference to the primary spectrum. It will be better if NCC approve this model because if implemented, it will protect the primary license holder and will also protect the secondary user. 1ParameterDescriptionValueMNumber of channels100KNumber of primary usersDepends on the stateLNumber of secondary usersDepends on the statePH1,iProbability of PU activeConstantPH1,iProbability of SU activeVariesPH0,iProbability of SU inactiveVaries 2( ) Volume XIX Issue IV Version Iof Researches in EngineeringS/NStateFM StationsSUnallocated MHzPercentage UnderutilisationGlobal Journal1Abia1018902Adamawa618.8943Akwa Ibom818.4924Anambra1916.2815Bauchi419.2966Bayelsa618.894Source: Omorogiuwa and Nwukor © 2019 Global JournalsModel on Optimizing Primary Spectrum Allocation using Cognitive Radio F © 2019 Global JournalsModel on Optimizing Primary Spectrum Allocation using Cognitive Radio * MHAsghar ANegi NMohammadzadeh Principle Application and Vision in Internet of Things (IoT), International Conference on Computing, Communication and Automation (ICCCA2015) Uttar Pradesh 2015 * WiFi and Bluetooth interference -diagnosing and fixing publisher Dawid's blog DawidSibi?ski 2017 * Sensing and decoding using the sparse fourier transform HHassanieh LShi OAbari EHamed DKatabi Ghz-Wide INFOCOM 2014. 2014 * Cognitive Radio: Brain-Empowered Wireless Communications SHaykin IEEE Journal on Selected Areas in Communications 20 2 2005 * Chin-LungHsu * An empirical examination of consumer adoption of Internet of Things services: Network externalities and concern for information privacy perspectives JudyLin Chuan-Chuan 10.1016/j.chb.2016.04.023 Computers in Human Behavior 62 2016 * An enhanced security framework for home appliances in smart home WonKang SeoMin; Moon ;Yeon JongPark Hyuk 10.1186/s13673-017-0087-4 Human-centric Computing and Information Sciences 7 6 2017 * Monitoring of Spectrum Usage and Signal Identification Using Cognitive Radio OOmorogiuwa EJOmozusi 2018 ICTCS Telecommunication and Communication Science * Analysis of Radio Frequency (87.5 -108 MHz) For Short Range Low Power Smart Device Utilization, ATBU OOmorogiuwa FNNwukor Technology & Education (JOSTE) 2019 Journal of Science * Analysis of the FM Radio Spectrum for Secondary Licensing of Low-Power Short-Range Cognitive Internet of Things Devices DTOtermat IKostanic CEOtero IEEE Access 99 2016 * Analysis of the FM radio spectrum for Internet of Things opportunistic access via Cognitive Radio OtermatDerek T CarlosEOtero IvicaKostanic IEEE 2nd Globe Forum on Internet of Things (WF-IoT) 2015 * A survey of Internet-of-Things: Future Vision, Architecture, Challenges and Services DSingh GTripathi AJJara IEEE Globe Forum on Internet of Things (WF-IoT) Seoul 2014 * Research Directions for the Internet of Things JAStankovic IEEE Internet of Things Journal 1 1 2014 * Future Internet: The Internet of Things LTan NWang Advanced Computer Theory and Engineering (ICACTE) Chengdu 2010 * Cognitive Machine-to Machine Communications: Visions and Potentials for the Smart Grid YZhang RYu MNekovee L SG SXie IEEE Network Journal 2012 * NidhiSharma RajeevMohan Sharma 2019 5G IGI Global