# System Design for Opportunistic Spectrum Access Using Statistical Decision-Making and Coded-MAC

Authors: Enrique Rodriguez-Colina; Ricardo Marcelín-Jiménez; Leonardo Palacios-Luengas; Michael Pascoe-Chalke
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

Different mechanisms have been proposed to solve opportunistic spectrum access (OSA). In order to address spectrum management efficiently, these mechanisms can be divided into four main functionalities, spectrum sensing, decision-making, sharing, and mobility. These functionalities depend on the interpretation and adaptation of different parameters, for example, sensing and data interpretation for adaptive modulation, power adjustments, and changes regarding the range of frequency operation. For the decision-making function, a novel approach is proposed in which coding information is added to the establishment of the communication process thus assisting the medium access control (MAC). The presence of cognitive radio devices in the network coverage range can be controlled or coordinated by using specific redundancy codes. Hence, Reed Solomon (RS) code is used in this paper as part of the handshaking process to provide error correction. In addition, a redundancy strategy based on Rabin’s information dispersal algorithm (IDA) is presented to provide fault tolerance to the communication between cognitive radio devices. In this case, the information is divided into fragments dynamically, and each fragment is coded by an RS code and reassigned to a subset of recipients using alternate paths. This work shows how to optimize spectrum access based on IDA and RS codes to diversify channel occupation without losing significant information with several frequency hops presented in cognitive radio communications. The validations were executed in a discrete event simulator developed in Python. The proposed system for OSA was found to perform better than other approaches using pilot sequences. Our proposal, therefore, provides fault tolerance, to diversify channel occupation, and helps identify the presence of primary and secondary users when a common control channel (CCC) is implemented by the optimization of the spectrum use.


---

## Body

## 1. Introduction

The implementation of a practical and useful cognitive radio (CR) device that attempts to achieve opportunistic spectrum access (OSA) requires several functionalities that using current technology results in various open issues to be solved. In the last 15 years, there has been exhaustive research to solve the main issues to make CR networks (CRN) effective and practical [1–5]. Several authors have proposed different functionalities for CR devices which can be divided into four main functionalities, such as spectrum sensing [6, 7], decision-making [8], sharing, and mobility in order to solve the OSA efficiently [9]. These functionalities depend on the interpretation and adaptation of different parameters, for example, sensing and data interpretation for adaptive modulation, power adjustments, and the changes regarding the range of frequency operation.In the proposed system, the CR device is able to work with current available technology and avoids the use of a dedicated common control channel (CCC). This can be achieved mainly through changing its operation parameters in four domains: space, frequency, time, and coding. The decision-making functionality in combination with coding to medium access control (MAC) is used to identify cognitive devices in the network and can be implemented for the selection of unused bands. The presence of cognitive users is coordinated by the use of redundancy codes to cause minimum interference to the primary users (PUs) during the CR devices’ handshaking process. Furthermore, the CR device considers that sensing functionality is performed accurately and as fast as possible. The ability of each cognitive device to modify its parameters accurately and as fast as possible is directly related with interference avoidance to primary users. In addition to coding, information redundancy is considered. Here, the dispersion process considers fragments ofn information that are sent through different channels. Thus, due to constant channel interruptions, it will be possible to recover the information with only m surviving dispersals. Observe that Figure 1 shows the domains to change communication parameters.Figure 1
Four domains for adaptive parameters. The blocks represent current communications for the time, frequency, space, and coding parameters.The four main functions that the CR device should perform are based on obtaining knowledge from the environment, making decisions using the information acquired, adapting parameters to modify operation, and learning from other devices. The sensing function obtains information from the environment and spectrum sensing is performed by the CR device. For this purpose, the spectrum can be divided into frequency slots which correspond to communication channels or frequency bands to be sensed. Spectrum segmentation in slots facilitates working with digital numbers or codewords in order to describe whether the channel is free to be used or occupied. A time-division approach is used to determine whether other CR and PUs are operating in the same frequency slot. Using this time-division approach, the presence of PUs is detected, and then, the CR devices change their communication channel without losing contact with their communication peer and with a minimum time interference to PUs. This is mainly performed through sending out predefined set of previously selected channels from the proposed decision-making module (DMM), which in turn requires the use of packets with specific information in the header frame.The CR devices can operate in different environments where either primary users can exist or not. For the establishment of connection and channel mobility, the CR devices basically operate under the sharing technique for spectrum access known as underlay [10], in which wideband and low power signal below a predefined threshold is used for establishing connection, i.e., handshaking and mobility tasks in the presence of primary users. During the communication process, once communication has been established, an overlay technique is used in which interference to primary users is only reduced to the short time that it takes to detect the primary user signal and in addition to the time it takes the CR device to hop to another channel.The remainder of this paper is structured as follows. Section2 presents a state-of-art review, focusing on related works. Section 3 discusses the system’s main contributions. Section 4 describes the proposed system which includes the significant functionality modules, such as slots for spectrum sensing, decision-making, and the Coded-MAC Algorithm. Section 5 presents a simulation and analysis of the results. Finally, section 6 provides the conclusions.


## 2. State-of-Art Review

Cognitive radio (CR) technology is a paradigm that promises to be used in the future for wireless communication systems. For this purpose, different strategies have been developed which can be divided into four functionalities: (i) detection, (ii) decision-making, (iii) exchange, and (iv) spectrum management mobility. This section considers some strategies for DMM used in CR devices and will basically focus on network coding [11, 12].Some strategies are based on coding for information exchange between a base station (BS) and users. Zhao et al. [13] propose an asymmetric network coding. The main idea is to apply the concept of CR in network coding transmissions, in which BS tries sending new information while helping user transmissions as a relay. Qu et al. [14] proposed a study on learning how to use two-dimensional multiarmed bandit (MAB) to use network coding to improve SU throughput in CRNs when channel quality is unavailable at SUs. Qu et al. [15] developed an efficient network coding strategy for SUs while considering uncertain idle durations in CRNs. Essentially, systematic network coding (SNC) is employed to opportunistically use the idle duration left by PUs. Liang et al. [16] proposed an adaptive dynamic network coding scheme (ADNC) conceived for cooperative cognitive radio (CCR) for devising a novel ADNC-CCR system. Qin et al. [17] investigated the limitations of transmission control protocol (TCP) in multichannel multiradio multihop CRNs and proposed a novel TCP called TCPJGNC (TCP Joint Generation Network Coding, JGNC) based on network coding. Khosroazad et al. [18] proposed a physical layer network coding an extended method for CR, the main goal of which is to maximize CRN capacity while keeping the total interference imposed on the primary users under a certain threshold.Other techniques are based on the improvement in spectrum exchange over routing channels. For example, Zhu et al. [19] mentioned that OSA is one of the core technologies of cognitive radio, which emphasizes the intelligence of the network and adapts spectrum utilization, and in this publication, the authors consider the analysis of each channel to evaluate the best option. We do the same but the difference consists in the method used which provides a proactive approach to the decision-making process combined with a reactive approach. The main improvement is that we provide a solution algorithm to distribute the communication in the spectrum opportunities, (i.e., spectrum holes) by using backup channels dynamically assigned and which contain the dispersed information with the use of Rabin’s IDA algorithms. A crucial difference in the decision-making process in our proposed system is to consider contention rather than a time slot operation or cooperative approaches as most of the literature shows, this a more practical point of view since most of the systems operated with contention for medium access.Sangi et al. [20] proposed a channel-route failure-based Cognitive-Ad-hoc on-demand distance vector (Cognitive-AODV) routing protocol with the modifications in channel-route-error (channel-RERR) to detect the exact channel-route failure and provide the best alternate end-to-end channel-route path in between source and destination. Deng et al. [21] proposed a cognitive routing and optimization protocol based on multiple channels with a cross-layer design to study joint optimal cognitive routing with maximizing network throughput and network lifetime. Mei et al. [22] proposed a hybrid network coding scheme under different channels to improve the efficiency of idle spectrum utilization, the successful transmission rate, and the packet loss rate that can be increased and decreased through redundant coding. Sboui et al. [23] proposed a new approach using a multilayer-coding (MLC) strategy, i.e., a broadcast approach, to enhance spectrum sharing over fading channels.Other approaches are based on resilience to the interference caused by PUs and noise disturbances via information dispersal in SU’s messages over multiple frequencies and time intervals [24]. Hamza et al. [25] proposed a new multiuser transmission coding scheme, cooperative quadrature physical-layer network coding (CQPNC) for cognitive wireless networks.Nadendla et al. [26] proposed a mechanism using the information dispersal algorithm (IDA) and Reed Solomon (RS) code. Hence, with Rabin’s dispersal algorithm, the confidentiality and integrity of the messages are evaluated. For this purpose of redesigning the original version and evaluating the proposal, the presence of an attacker is considered as an attempt to compromise the communication paths because there is an intentional breach in the confidentiality and integrity of the source message. In addition, the RS code is used as an error corrector. In this paper, a DMM based on coding and dispersal information algorithm is proposed. The main contributions are described in the next section.


## 3. Main Contributions of the Proposed System

This work’s main contribution is the development of a DMM in which coding is added to the establishment of the communication process. The DMM that was developed makes use of an RS code that offers low processing power requirements and a considerable amount of advantages to identify encoded signals intended for wireless applications. Thus, one of the main advantages of our mechanism is that it communicates with an RS code to establish the communication that assigns an identification code used for an additional connection in the communication range [27]. This makes communication robust to noise and able to compensate losses caused by multiple frequency hops. In this way, adequate effectiveness in the coding rate must be achieved; for this purpose, different RS coding simulations were carried out considering that very short bursts of information must be transmitted and have a high processing speed. Thus, for our proposal, an RS codeword (15,9) was implemented, which considers an adequate coding rate according to different functional tests.An additional consideration is that PU operation is not predictable in most cases and CR users cannot obtain a reliable communication band. Moreover, CR devices may not detect any single spectrum band to meet application requirements. CR users can adopt a multiradio transmission method in which each radio interface transmits to different spectrum bands. Transmission in multiple spectrum bands, i.e., diversity, allows lower power to be used in each spectrum band. As a result, primary users could support multiple spectrum selection capabilities for transmission, thus requiring the use of distributed system techniques to manage redundancy. If communication experiences losses due to mobility, for instance, the information transmission will fail. The most frequent solution to this problem in a noncognitive network consists of sending a backup copy of the information through a second device, or an alternate path. This solution’s main drawback is that the alternate component reduces its effective available performance in order to manage the backup copy. Besides, if the first and second components fail, the transmitted message will be lost. Hence, a common feature is the use of a redundancy strategy in order to provide fault-tolerance and, particularly, integrity. In this context, the simplest approach consists of file replication. Due to CR characteristics, it is necessary to consider a proper combination of the number of disperses to be generated per file. For this, the probability of failure is considered. As a result of this analysis, with the increase of disperses, the probability of failure occurrence increases, thus implying longer dispersion time and recovery. The DMM has the following characteristics:(i)
The proposed RS code mechanism makes communication robust to noise and able to compensate for additional losses caused by multiple frequency hops(ii)
Using RS codeword (15,9), an adequate coding rate is achieved with low power for the process of exchanging handshaking between cognitive devices(iii)
A redundancy strategy based on Rabin’s information dispersal algorithm is presented to provide fault tolerance. Here, the information is divided into fragments, each of which is coded by an RS code and reassigned to a subset of recipients or an alternate path(iv)
A configuration of IDA with parameters (5,3) is selected, considering an adequate relationship according to different analyses. Thus, the proposed system sends five dispersed fragments through different channels and, in case information is interrupted, the information can be retrieved with only three of them(v)
A solution algorithm to distribute the communication according to the spectrum holes availability by using backup channels dynamically assigned with information dispersed with the use of Rabin’s IDA algorithms(vi)
We proposed a method for the DMM which provides a proactive approach to the decision making process combined with a reactive approach which improves the response of the system(vii)
The proposed system considers contention for the MAC rather than a time slot operation or cooperative approaches, this a more practical point of view since most of the systems operated with contention for medium access


## 4. System Description

A CR using currently available technology was designed, focusing on four main characteristics in order to as much as possible avoid the interference to PUs combining underlay and overlay approaches and thus have a robust decision-making mechanism based on statistical analysis, i.e., proactive and reactive decisions [28, 29]. This aims to facilitate the coordination of CR devices and reduce the computational complexity for required control instructions and coding. The proposed model comprises five main modules to perform the OSA functionalities and effective communication, as shown in Figure 2. The system’s input requires a collection of sensors which represent the Physical Interface. As aforementioned, spectrum sensing is very demanding and requires the highest possible sensitivity.Figure 2
Simplified block diagram of the proposed CR device.


### 4.1. Spectrum Sensing (Monitoring)

Most of the testbeds developed operate within the 2.4 GHz band. Thus, an example of a free licensed band is provided in which the frequency spectrum is divided into frequency slots which correspond to the spectrum frequency channels. Consequently, dividing the spectrum into slots facilitates working with discrete numbers and enables a representation of the occupied and free channels as a vector of logic ones and zeros. Figure3 illustrates how the 2.4 GHz band is divided, for example, into 14 channels which can be seen as spectrum frequencies with the presence of a primary signal and secondary signals. Channels size is independent of current mobile technology, i.e., it can be used in any part of the frequency spectrum.Figure 3
Frequency slots for 14 channels system with occupied and free channels.Segmentation of the frequency spectrum serves to increase resolution for sensing capabilities (see Figure4). This segmentation allows for the determination of the presence of energy in a reduced frequency band in order to detect the presence of PUs more accurately. With the segmentation process, more sensors and computational power are required in order to avoid interference. However, for our analysis, the result segmentation with occupied and free channels is taken as a vector of logic ones and zeros.Figure 4
Segmentation of frequency slots to form subchannels.


#### 4.1.1. Decision-Making Module (DMM)

Several factors and attributes should be considered to make a proper decision based on sensed or captured information. The proposed DMM comprises two main capabilities: the first is based on a modified version of the analytic hierarchy process (AHP) algorithm, and the second uses assigned codes for a MAC mechanism which allows an easy identification of CRs. The second module provides significant information about the status of the CR device, such as the power range and the detection of nearby PUs. As a powerful tool to avoid interference during the handshaking process, the use of a Reed Solomon (RS) Code in the MAC mechanism was proposed. This code can be implemented without the requirement of complex computing capabilities on the CR device. This code is also used as a CR device identifier in order to increase fairness among secondary users accessing the communication medium. The information received by the CR device is used for local and distributed cooperative decision-making.


#### 4.1.2. Multiple Criteria Decision-Making Module

The AHP is part of the proposed multiple criteria decision-making module. The AHP is a general problem-solving method that serves to make complex decisions, for example, multicriteria decisions based on variables without numerical costs. The decision makes modeling through using multiple attribute AHP which consists of the following five steps: structuring the decision model, entering alternatives, establishing priorities among elements, synthesizing, and conducting sensitivity analysis. In the case of our proposed decision method, the AHP is complemented and combined by statistical analysis of the behavior of the channels stored in a database and correlated with the last measurements “snapshot-measurements” and then to provide feedback data to the AHP as an additional element for the decision. This considers the statistics through time of the channels, i.e., the history of the channel behavior is provided as feedback to the system to be combined with AHP, as shown in Figure5. The AHP organizes the decision-making breaking down the decision problem into a hierarchy of interrelated decision elements. At the top of the hierarchy lies the main decision objective, which in this case is to select the best band available. The lower levels of the hierarchy contain attributes, i.e., objectives which contribute to find the best solution for specific characteristics or applications. At lower hierarchy levels, the detail increases, and once the hierarchy is established, the CR devices evaluate the alternatives using the given criteria in order to obtain the priority vectors, which are also known as criteria weights. The attribute samples are periodically supplied to the decision-making function. This function processes them and produces a ranking of the frequency bands ordered from best to worst as a function of the criteria weights. Since there are numerous combinations for the spectrum bands between communication source and destination, it is infeasible to consider all possible bands for spectrum decision. However, the AHP model can manage a considerable number of bands without a significant delay, which is around 6 microseconds for 15 bands. Similar to [30], a modification was proposed which includes a feature with output-related feedback regarding the statistics managed by the modified AHP. Information feedback regarding the decision-making mechanism includes error probability. This feedback is a function of the four criteria previously provided to the system; consequently, a fifth criterion is added. This alters the rules of the original AHP, and therefore, the behavior of the decision-making mechanism is also altered.Figure 5
Proposed feedback AHP model.Figure5 shows the AHP feedback model referred to in this paper as the feedback AHP (FAHP) algorithm. In the model, each time the CR device performs the spectrum sensing function, it obtains snapshot-measurements from the environment. The snapshot-measurements are sent as attribute samples that feed the decision-making function. Here, FAHP is used to calculate the bands ranking taking attribute values into account. This band ranking is represented as a vector with the available options from the best to the worst bands for each sample, as depicted in Figure 5. Simulation results show that the proposed FAHP algorithm computes a trade-off between diverse priority attributes meeting the application requirements. The resulting band ranking, i.e., “processed sample” outcome is sent to the CR mobility and sharing functionalities and is simultaneously kept in the knowledge database for further processing. This database processing results in histograms characterizing the number of times that the bands have been selected for each position. Subsequently, the statistics for each frequency band are contrasted with the “processed sample vector” (SV) for each interaction of the decision-making process. This contrasting of information provides possible discrepancies between the “processed sample vector” and statistical behavior, which is in fact current ranking versus statistical ranking.Hence, a probability error when selecting available options can be determined by comparing the statistical ranking with the current ranking vector. The “processed sample vector” is a parameter that indicates the transients in band ranking. In addition, the statistical database helps to identify possible periodical behavior for the band ranking. Although the AHP helps to find optimum bands for a particular application or service, a combination of decision methods should be essential for the CR communications.


### 4.2. Coded-MAC Design

The proposed Coded-MAC incorporates the RS code for the handshaking and mobility processes and IDA as an extra redundancy mechanism communication. The proposed model also comprises the use of an identifier for the communication between CR devices which improves the connection with a device without the need of a dedicated CCC. The Coded-MAC has been tested with a developed discrete event simulator to characterize CR devices communicating in the presence of PUs. Therefore, if the data is transmitted in burst mode or the data is sent through different routes, the RS code can provide error detection and correct them. This enables a robust communication without interferences with the PU. Furthermore, it is suitable for the cognitive radio environment in which the packet loss is severely affected by the constant frequency hops. The RS code also works for synchronization between cognitive devices when movement to another frequency band is required. In addition, low power can be managed for the handshaking process among cognitive devices.


#### 4.2.1. Reed Solomon Coding

Regardless of the coding used in the transmission systems, e.g., CDMA and OFDMA, adaptive forward error correction (FEC) is commonly used in wireless communications, such as convolutional, Reed Solomon, and Turbo codes [31–33]. In this paper, a novel application for the decision-making function is proposed in which a Reed Solomon (RS) code can be implemented for communication. Communication between secondary users can be controlled or just coordinated through using specific redundancy codes. Due to communication’s constant intermittency, a short length of the data block and transmission speed should be considered. In order to evaluate block length and redundant information that should be added, a communication system was proposed using BPSK modulation and demodulation. Initially, the data is binarized and encoded. Subsequently, the encoded binary data is passed through a Gaussian channel in which Additive White Gaussian Noise (AWGN) is added to the channel. Afterward, the binary noisy data are demodulated and decoded. Figure 6 compares the probability of error obtained from uncoded messages and messages encoded with (z,k) RS code for different blocks such as (7, 5) RS, (15, 9) RS, and (20, 15) RS code. Note that error probabilities are presented as a function of the ratio of energy dedicated to a bit Eb and the spectral density of noise N0. Thus, Figure 6 demonstrates that as the energy of the bits increases, the propagation of error decreases since the message is less affected by noise.Figure 6
Comparison of bit error rate performance of (z, k) RS code for different block lengths.The different bit error rates (BER) are shown in Figure6, the message encoded with the (20, 15) RS code, and the performance of the error rate improves with respect to the uncoded message. Regarding the (7, 5) RS code, it improves Eb/N0 in order to reach a bit error rate of 10-3 in approximately 6 dB. However, (15, 9) RS code remains below in all cases, which improves the Eb/N0 to reach a minimum BER of 10-8 in approximately 7 dB. Thus, the RS code used for the proposal is (z, k) in which the block length: z=15 symbols, and the data length is k symbols = 9. The encoding algorithm expands a block of 9 symbols to 15 symbols by adding 6 redundant check symbols. The entire z-tuple space contains 2n=215=32768z-tuples, of which 2k=29=512 (or 1/64 of the z-tuples) are codewords. Consequently, the RS codes have the remarkable property that they can correct any set of z−k symbol erasures within the block. A wireless device can easily compute these codes without significant power consumption.According to Figure7, the approach shown here is mainly planned as an infrastructure network topology in which a base station (BS) helps to connect devices in order to share information all over the network. This approach, however, is not constrained to infrastructure architectures, so it can be implemented in other types of architecture, such as Ad-Hoc networks. When a CR user enters a specific location area, it should identify itself as a CR device. Thus, the BS assigns a local identification to the CR device which is, in fact, a communication code apart from the device’s identification (ID), independent from of the permanent address and physical ID number. The communication code assigned by the BS identifies the device as cognitive radio and in our proposal is transmitted using the RS code. This RS cognitive code (RSCC) identifies the device at the location and power range of the BS and identifies only cognitive device communications. The RSCC helps to gain fair access to the CR device network because this registration process distinguishes the CR device from other opportunistic users in the area, and consequently, a more effective media access control (MAC) can be implemented.Figure 7
Handshaking process for two CR devices.Once the CR device is registered on the network and when this device is communicating, the RSCC identification code also serves for the reception of poor signal detection. In addition, with the use of RSCC during communication, privacy and recognition of the communication signal are managed by the CR device and the BS. The CR device signal can be identified and differentiated from primary users and other devices. Another variant of this process provides codes for primary users making it easier to identify between primary, secondary, and other types of communication devices in the area. Thus, the proposal is to use the (15, 9) RS code in order to determine the RSCC for identification of the CR devices, which was implemented in the simulation using a developed program in Python.


#### 4.2.2. The Proposed Coded-MAC

The proposed Coded-MAC solves the opportunistic spectrum access problem considering an overlay approach when there is a pair of CR devices communicating with each other. However, it uses an underlay approach when the handshaking for the connection of two CR devices is in process. This eliminates the use of a CCC, although minimum interference is produced during connection.The interface lapse depends on the spectrum sensing time and the exchange of messages to coordinate common free channel options. The spectrum sensing’s function is to inform the CR devices about spectrum white spaces. Once the connection is established on an available channel, the interference is null until a PU attempts to occupy this free channel. The list of available channels is updated according to changes in the spectrum; hence, if a primary user enters that portion of the spectrum, a spectrum mobility mechanism is set off based on the previous sensing information of the backup (BK) channels. The sensing information of channel availability is acquired continuously and stored. To deal with the “hidden terminal” and “the far-away from terminal” effects, the proposed Coded-MAC is designed in response to the frame exchange sequence (FES), RTS-CTS-DATA-ACK. The sequence of received acknowledgments is also controlled. The CR device that requires to communicate mounts its signal as a peer to peer network connection on a free channel, using a network identifier (idNetwork).This idNetwork, in addition to the CR identifier, is used by the caller CR device in order to specify to whom it requires to call. Then, the called CR device senses the spectrum and knows that another CR is calling. The Coded-MAC also comes up with a solution when CR devices cannot detect the same available channels by sending coordination packets to establish communication in other free channels by emitting 4-bytes coordination message. This coordination message produces a reduced interference time to the PU that has been coded, which is equal to the four bytes divided by the data rate. The proposal considers network scalability, and consequently, a modified version of the overlay carrier sense multiple access with collision avoidance (O-CSMA/CA) protocol for CR is implemented.Figure8 shows the frame used for general communication between CR devices. The first block of the frame includes the information necessary to start the handshaking process and to identify whether a packet has been sent successfully or not. Then, the idSource is the CR identification of the caller device, and the idTarget is the identification of the CR device to be called. The channel transmission block determines the channel through which the pair of devices must communicate. The next block indicates the BK channels used to move the communication if the channel transmission becomes busy. These channels are used in case of the presence of a PU and when the CR devices must change their transmission to another free channel. This action is referred to as “channel hops.” The counter block is used to count the number of attempts through which to find a free channel to communicate. The idNetwork is a parameter which identifies the communication in progress. The idNetwork is also used when the CR device wishes to call another CR device. Then, a communication signal with the idTarget and the idNetwork is sent through an available channel until the required CR device receives this signal and answers the call. This establishes the communication in the available channel. During the handshaking (see Figure 9), there are two possible options: the CR devices move to a free BK channel, if available, or they search for a new channel through which communicate and are obliged to wait. In fact, the idNetwork is an identifier number which corresponds to the signal of the CR device trying to communicate, so the called device is able to identify by scanning the spectrum who is calling and to acquire the list of available channels for both devices. Thanks to the idNetwork, the CR transmitting can identify whether the accessing device is a PU or another CR. The block in the frame with the amount of packets indicates how many packets have been successfully sent to the receiver. Finally, the data stream is incorporated in the last part of the frame, in which the information is divided into fixed-size packets.Figure 8
CR communication frame in Coded-MAC.Figure 9
Network registration and communication.


#### 4.2.3. Communication Stage

Figure10, which shows the flow chart for the handshaking and communication between CR devices, illustrates the OSA Communication process stage. The following considerations should be assumed. (i) Each CR device has an associated identification number (id). (ii) It is assumed that communication involves CR devices, sources (CS), and targets (CT). (iii) Redundant channels must be considered for use in case a PU arrives during a communication. The communication process starts the moment the CS sends a call request. The following selection criterion is applied: when communication is established the CR network with a lower id is chosen. This connection is made in the same channel, and it is necessary to choose only one. If this condition is met, CT establishes a connection in the free channel using an id network. Consequently, reading the identification network created for the CS, the devices continue to detect the medium during communication to verify if the channel is still free or whether the PU has arrived. If at any time a collision is detected (the entry of a PU has been detected), CR devices move as fast as required given the BK channel information they have. According to Figure 10, if the CR devices cannot find a common free channel, the CS cancels the call and repeats the process. On the other hand, CS checks whether the TC is communicating through the new free channel in order to continue with the communication interrupted by the PU. For this, the system has a counting mechanism that indicates the number of attempts made. If the number of attempts is smaller, then the CS updates the network’s id and waits for the CT’s response. In another case, the handshaking process starts from the beginning.Figure 10
Communication, caller, and called CR devices.


#### 4.2.4. Additional Redundancy Stage

If communication experiences losses due to mobility, the information transmission will fail. The most frequent solution to this problem in a noncognitive network consists of sending a backup copy of the information through a second device (or an alternate path). This solution’s main drawback is that the alternate component reduces its effective available performance in order to manage the backup copy. Besides this, if the first and the second components fail, the transmitted message will be lost. Hence, a common feature is the utilization of a redundancy strategy in order to provide fault-tolerance and, particularly, integrity. In order to send a file, it can be split into various information units. In this case, several copies of the resulting units are allocated to a given subset of devices. In contrast, there are systems in which information redundancy is implemented through using error-correcting codes [34]. The use of an additional approach to the Reed Solomon code based on the Information Dispersal Algorithm (IDA), developed by Rabin [35], is here proposed. Let us say F is a file, F could be transformed into n files called dispersals. Each of size F/m, where n>m>1. The dispersals are then sent to different channels. From the algorithm properties, it is granted that if any n−m dispersals were lost, the original information could be reconstructed from the m surviving dispersals. In this case, the cost of the reconstruction is compensated due to the greater tolerance that the system supports, in addition to the reduction of devices required for redundancy.Due to the features characterizing of cognitive radio, it is pertinent to think about what could be considered a good combination ofm and n. For a fixed K=n−m, it is possible to have different combinations of n and m, but although m⟶n would seem a good option especially when n is greater than or equal to 10, because redundancy is significantly reduced, this implies two considerations: (i) dispersion and recovery times increase, and (ii) what is even more important, the probability that K or more faults occur increases with n, as argued below. Consider two instances of IDA with parameters (5, 3) and (10, 8), respectively. Both offer the same tolerance, but the second case does so with a lower cost in redundancy (0.666 vs. 0.25, respectively). It would seem that the second case is better, but the probability that there exist two or more failures as a function of n should be considered. This is obtained by modeling the probability of faults with a binomial distribution where p is the probability that dispersal is lost since there are n initial dispersals, then the probability that two or more faults will occur should be calculated, but this is the complement that 0 or 1 failure occurs. The result is a function that grows with an n value. The conclusion is that, although it seems interesting to increase n, maintaining the number of failures that can be tolerated (n−m), this criterion can lead to greater risk. It is also important to consider that a large n value implies a longer dispersion and recovery time. Therefore, alternative m⟶n, when n takes a very large value, e.g., >10 it does not seem very convenient given the processing cost but, above all, the risk faced by the overall system.In this paper, (5, 3) was chosen. This means that an initial file is transformed into five dispersals and can be recovered with any three of them. Each dispersal is the size ofF/3, and therefore, there is an excess of information, or information redundancy, equal to 2F/3. Table 1 shows all possible combinations of IDA parameters for n=2,⋯,7 and m=1,⋯,6. Each entry represents a 2-tuple, (n, m), with its corresponding redundancy n−m/m. Reading this information by rows, the rightmost entry represents the combination supporting the biggest number of losses or missing dispersals, for a fixed n. Nevertheless, the price to pay is an excess of redundant information, i.e., BW which, in the extreme case (n, 1), implies that each dispersal is actually a replica of F. Reading by columns instead, each column represents all the possibilities that may compensate the same number of losses, i.e., the ith column (from left to right) describes all combinations that support up to i losses. It should be noted that a given entry supports the same number of losses as any lower entry in the same column. However, this results in high redundancy [36]. Figure 11 shows that each dispersal is sent through different channels, and in case of information interruption, the information with three dispersals can be recovered.Table 1
IDA parameter combinations and their redundancy levels.
(2,1)1(3,2)1/2(3,1)2(4,3)1/3(4,2)2/2(4,1)3(5,4)1/4(5,3)2/3(5,2)3/2(5,1)4(6,5)1/5(6,4)2/4(6,3)3/3(6,2)4/2(6,1)5(7,6)1/6(7,5)2/5(7,4)3/4(7,3)4/3(7,2)5/2(7,1)6Figure 11
Use of IDA to send information through different channels.


## 4.1. Spectrum Sensing (Monitoring)

Most of the testbeds developed operate within the 2.4 GHz band. Thus, an example of a free licensed band is provided in which the frequency spectrum is divided into frequency slots which correspond to the spectrum frequency channels. Consequently, dividing the spectrum into slots facilitates working with discrete numbers and enables a representation of the occupied and free channels as a vector of logic ones and zeros. Figure3 illustrates how the 2.4 GHz band is divided, for example, into 14 channels which can be seen as spectrum frequencies with the presence of a primary signal and secondary signals. Channels size is independent of current mobile technology, i.e., it can be used in any part of the frequency spectrum.Figure 3
Frequency slots for 14 channels system with occupied and free channels.Segmentation of the frequency spectrum serves to increase resolution for sensing capabilities (see Figure4). This segmentation allows for the determination of the presence of energy in a reduced frequency band in order to detect the presence of PUs more accurately. With the segmentation process, more sensors and computational power are required in order to avoid interference. However, for our analysis, the result segmentation with occupied and free channels is taken as a vector of logic ones and zeros.Figure 4
Segmentation of frequency slots to form subchannels.


### 4.1.1. Decision-Making Module (DMM)

Several factors and attributes should be considered to make a proper decision based on sensed or captured information. The proposed DMM comprises two main capabilities: the first is based on a modified version of the analytic hierarchy process (AHP) algorithm, and the second uses assigned codes for a MAC mechanism which allows an easy identification of CRs. The second module provides significant information about the status of the CR device, such as the power range and the detection of nearby PUs. As a powerful tool to avoid interference during the handshaking process, the use of a Reed Solomon (RS) Code in the MAC mechanism was proposed. This code can be implemented without the requirement of complex computing capabilities on the CR device. This code is also used as a CR device identifier in order to increase fairness among secondary users accessing the communication medium. The information received by the CR device is used for local and distributed cooperative decision-making.


### 4.1.2. Multiple Criteria Decision-Making Module

The AHP is part of the proposed multiple criteria decision-making module. The AHP is a general problem-solving method that serves to make complex decisions, for example, multicriteria decisions based on variables without numerical costs. The decision makes modeling through using multiple attribute AHP which consists of the following five steps: structuring the decision model, entering alternatives, establishing priorities among elements, synthesizing, and conducting sensitivity analysis. In the case of our proposed decision method, the AHP is complemented and combined by statistical analysis of the behavior of the channels stored in a database and correlated with the last measurements “snapshot-measurements” and then to provide feedback data to the AHP as an additional element for the decision. This considers the statistics through time of the channels, i.e., the history of the channel behavior is provided as feedback to the system to be combined with AHP, as shown in Figure5. The AHP organizes the decision-making breaking down the decision problem into a hierarchy of interrelated decision elements. At the top of the hierarchy lies the main decision objective, which in this case is to select the best band available. The lower levels of the hierarchy contain attributes, i.e., objectives which contribute to find the best solution for specific characteristics or applications. At lower hierarchy levels, the detail increases, and once the hierarchy is established, the CR devices evaluate the alternatives using the given criteria in order to obtain the priority vectors, which are also known as criteria weights. The attribute samples are periodically supplied to the decision-making function. This function processes them and produces a ranking of the frequency bands ordered from best to worst as a function of the criteria weights. Since there are numerous combinations for the spectrum bands between communication source and destination, it is infeasible to consider all possible bands for spectrum decision. However, the AHP model can manage a considerable number of bands without a significant delay, which is around 6 microseconds for 15 bands. Similar to [30], a modification was proposed which includes a feature with output-related feedback regarding the statistics managed by the modified AHP. Information feedback regarding the decision-making mechanism includes error probability. This feedback is a function of the four criteria previously provided to the system; consequently, a fifth criterion is added. This alters the rules of the original AHP, and therefore, the behavior of the decision-making mechanism is also altered.Figure 5
Proposed feedback AHP model.Figure5 shows the AHP feedback model referred to in this paper as the feedback AHP (FAHP) algorithm. In the model, each time the CR device performs the spectrum sensing function, it obtains snapshot-measurements from the environment. The snapshot-measurements are sent as attribute samples that feed the decision-making function. Here, FAHP is used to calculate the bands ranking taking attribute values into account. This band ranking is represented as a vector with the available options from the best to the worst bands for each sample, as depicted in Figure 5. Simulation results show that the proposed FAHP algorithm computes a trade-off between diverse priority attributes meeting the application requirements. The resulting band ranking, i.e., “processed sample” outcome is sent to the CR mobility and sharing functionalities and is simultaneously kept in the knowledge database for further processing. This database processing results in histograms characterizing the number of times that the bands have been selected for each position. Subsequently, the statistics for each frequency band are contrasted with the “processed sample vector” (SV) for each interaction of the decision-making process. This contrasting of information provides possible discrepancies between the “processed sample vector” and statistical behavior, which is in fact current ranking versus statistical ranking.Hence, a probability error when selecting available options can be determined by comparing the statistical ranking with the current ranking vector. The “processed sample vector” is a parameter that indicates the transients in band ranking. In addition, the statistical database helps to identify possible periodical behavior for the band ranking. Although the AHP helps to find optimum bands for a particular application or service, a combination of decision methods should be essential for the CR communications.


## 4.1.1. Decision-Making Module (DMM)

Several factors and attributes should be considered to make a proper decision based on sensed or captured information. The proposed DMM comprises two main capabilities: the first is based on a modified version of the analytic hierarchy process (AHP) algorithm, and the second uses assigned codes for a MAC mechanism which allows an easy identification of CRs. The second module provides significant information about the status of the CR device, such as the power range and the detection of nearby PUs. As a powerful tool to avoid interference during the handshaking process, the use of a Reed Solomon (RS) Code in the MAC mechanism was proposed. This code can be implemented without the requirement of complex computing capabilities on the CR device. This code is also used as a CR device identifier in order to increase fairness among secondary users accessing the communication medium. The information received by the CR device is used for local and distributed cooperative decision-making.


## 4.1.2. Multiple Criteria Decision-Making Module

The AHP is part of the proposed multiple criteria decision-making module. The AHP is a general problem-solving method that serves to make complex decisions, for example, multicriteria decisions based on variables without numerical costs. The decision makes modeling through using multiple attribute AHP which consists of the following five steps: structuring the decision model, entering alternatives, establishing priorities among elements, synthesizing, and conducting sensitivity analysis. In the case of our proposed decision method, the AHP is complemented and combined by statistical analysis of the behavior of the channels stored in a database and correlated with the last measurements “snapshot-measurements” and then to provide feedback data to the AHP as an additional element for the decision. This considers the statistics through time of the channels, i.e., the history of the channel behavior is provided as feedback to the system to be combined with AHP, as shown in Figure5. The AHP organizes the decision-making breaking down the decision problem into a hierarchy of interrelated decision elements. At the top of the hierarchy lies the main decision objective, which in this case is to select the best band available. The lower levels of the hierarchy contain attributes, i.e., objectives which contribute to find the best solution for specific characteristics or applications. At lower hierarchy levels, the detail increases, and once the hierarchy is established, the CR devices evaluate the alternatives using the given criteria in order to obtain the priority vectors, which are also known as criteria weights. The attribute samples are periodically supplied to the decision-making function. This function processes them and produces a ranking of the frequency bands ordered from best to worst as a function of the criteria weights. Since there are numerous combinations for the spectrum bands between communication source and destination, it is infeasible to consider all possible bands for spectrum decision. However, the AHP model can manage a considerable number of bands without a significant delay, which is around 6 microseconds for 15 bands. Similar to [30], a modification was proposed which includes a feature with output-related feedback regarding the statistics managed by the modified AHP. Information feedback regarding the decision-making mechanism includes error probability. This feedback is a function of the four criteria previously provided to the system; consequently, a fifth criterion is added. This alters the rules of the original AHP, and therefore, the behavior of the decision-making mechanism is also altered.Figure 5
Proposed feedback AHP model.Figure5 shows the AHP feedback model referred to in this paper as the feedback AHP (FAHP) algorithm. In the model, each time the CR device performs the spectrum sensing function, it obtains snapshot-measurements from the environment. The snapshot-measurements are sent as attribute samples that feed the decision-making function. Here, FAHP is used to calculate the bands ranking taking attribute values into account. This band ranking is represented as a vector with the available options from the best to the worst bands for each sample, as depicted in Figure 5. Simulation results show that the proposed FAHP algorithm computes a trade-off between diverse priority attributes meeting the application requirements. The resulting band ranking, i.e., “processed sample” outcome is sent to the CR mobility and sharing functionalities and is simultaneously kept in the knowledge database for further processing. This database processing results in histograms characterizing the number of times that the bands have been selected for each position. Subsequently, the statistics for each frequency band are contrasted with the “processed sample vector” (SV) for each interaction of the decision-making process. This contrasting of information provides possible discrepancies between the “processed sample vector” and statistical behavior, which is in fact current ranking versus statistical ranking.Hence, a probability error when selecting available options can be determined by comparing the statistical ranking with the current ranking vector. The “processed sample vector” is a parameter that indicates the transients in band ranking. In addition, the statistical database helps to identify possible periodical behavior for the band ranking. Although the AHP helps to find optimum bands for a particular application or service, a combination of decision methods should be essential for the CR communications.


## 4.2. Coded-MAC Design

The proposed Coded-MAC incorporates the RS code for the handshaking and mobility processes and IDA as an extra redundancy mechanism communication. The proposed model also comprises the use of an identifier for the communication between CR devices which improves the connection with a device without the need of a dedicated CCC. The Coded-MAC has been tested with a developed discrete event simulator to characterize CR devices communicating in the presence of PUs. Therefore, if the data is transmitted in burst mode or the data is sent through different routes, the RS code can provide error detection and correct them. This enables a robust communication without interferences with the PU. Furthermore, it is suitable for the cognitive radio environment in which the packet loss is severely affected by the constant frequency hops. The RS code also works for synchronization between cognitive devices when movement to another frequency band is required. In addition, low power can be managed for the handshaking process among cognitive devices.


### 4.2.1. Reed Solomon Coding

Regardless of the coding used in the transmission systems, e.g., CDMA and OFDMA, adaptive forward error correction (FEC) is commonly used in wireless communications, such as convolutional, Reed Solomon, and Turbo codes [31–33]. In this paper, a novel application for the decision-making function is proposed in which a Reed Solomon (RS) code can be implemented for communication. Communication between secondary users can be controlled or just coordinated through using specific redundancy codes. Due to communication’s constant intermittency, a short length of the data block and transmission speed should be considered. In order to evaluate block length and redundant information that should be added, a communication system was proposed using BPSK modulation and demodulation. Initially, the data is binarized and encoded. Subsequently, the encoded binary data is passed through a Gaussian channel in which Additive White Gaussian Noise (AWGN) is added to the channel. Afterward, the binary noisy data are demodulated and decoded. Figure 6 compares the probability of error obtained from uncoded messages and messages encoded with (z,k) RS code for different blocks such as (7, 5) RS, (15, 9) RS, and (20, 15) RS code. Note that error probabilities are presented as a function of the ratio of energy dedicated to a bit Eb and the spectral density of noise N0. Thus, Figure 6 demonstrates that as the energy of the bits increases, the propagation of error decreases since the message is less affected by noise.Figure 6
Comparison of bit error rate performance of (z, k) RS code for different block lengths.The different bit error rates (BER) are shown in Figure6, the message encoded with the (20, 15) RS code, and the performance of the error rate improves with respect to the uncoded message. Regarding the (7, 5) RS code, it improves Eb/N0 in order to reach a bit error rate of 10-3 in approximately 6 dB. However, (15, 9) RS code remains below in all cases, which improves the Eb/N0 to reach a minimum BER of 10-8 in approximately 7 dB. Thus, the RS code used for the proposal is (z, k) in which the block length: z=15 symbols, and the data length is k symbols = 9. The encoding algorithm expands a block of 9 symbols to 15 symbols by adding 6 redundant check symbols. The entire z-tuple space contains 2n=215=32768z-tuples, of which 2k=29=512 (or 1/64 of the z-tuples) are codewords. Consequently, the RS codes have the remarkable property that they can correct any set of z−k symbol erasures within the block. A wireless device can easily compute these codes without significant power consumption.According to Figure7, the approach shown here is mainly planned as an infrastructure network topology in which a base station (BS) helps to connect devices in order to share information all over the network. This approach, however, is not constrained to infrastructure architectures, so it can be implemented in other types of architecture, such as Ad-Hoc networks. When a CR user enters a specific location area, it should identify itself as a CR device. Thus, the BS assigns a local identification to the CR device which is, in fact, a communication code apart from the device’s identification (ID), independent from of the permanent address and physical ID number. The communication code assigned by the BS identifies the device as cognitive radio and in our proposal is transmitted using the RS code. This RS cognitive code (RSCC) identifies the device at the location and power range of the BS and identifies only cognitive device communications. The RSCC helps to gain fair access to the CR device network because this registration process distinguishes the CR device from other opportunistic users in the area, and consequently, a more effective media access control (MAC) can be implemented.Figure 7
Handshaking process for two CR devices.Once the CR device is registered on the network and when this device is communicating, the RSCC identification code also serves for the reception of poor signal detection. In addition, with the use of RSCC during communication, privacy and recognition of the communication signal are managed by the CR device and the BS. The CR device signal can be identified and differentiated from primary users and other devices. Another variant of this process provides codes for primary users making it easier to identify between primary, secondary, and other types of communication devices in the area. Thus, the proposal is to use the (15, 9) RS code in order to determine the RSCC for identification of the CR devices, which was implemented in the simulation using a developed program in Python.


### 4.2.2. The Proposed Coded-MAC

The proposed Coded-MAC solves the opportunistic spectrum access problem considering an overlay approach when there is a pair of CR devices communicating with each other. However, it uses an underlay approach when the handshaking for the connection of two CR devices is in process. This eliminates the use of a CCC, although minimum interference is produced during connection.The interface lapse depends on the spectrum sensing time and the exchange of messages to coordinate common free channel options. The spectrum sensing’s function is to inform the CR devices about spectrum white spaces. Once the connection is established on an available channel, the interference is null until a PU attempts to occupy this free channel. The list of available channels is updated according to changes in the spectrum; hence, if a primary user enters that portion of the spectrum, a spectrum mobility mechanism is set off based on the previous sensing information of the backup (BK) channels. The sensing information of channel availability is acquired continuously and stored. To deal with the “hidden terminal” and “the far-away from terminal” effects, the proposed Coded-MAC is designed in response to the frame exchange sequence (FES), RTS-CTS-DATA-ACK. The sequence of received acknowledgments is also controlled. The CR device that requires to communicate mounts its signal as a peer to peer network connection on a free channel, using a network identifier (idNetwork).This idNetwork, in addition to the CR identifier, is used by the caller CR device in order to specify to whom it requires to call. Then, the called CR device senses the spectrum and knows that another CR is calling. The Coded-MAC also comes up with a solution when CR devices cannot detect the same available channels by sending coordination packets to establish communication in other free channels by emitting 4-bytes coordination message. This coordination message produces a reduced interference time to the PU that has been coded, which is equal to the four bytes divided by the data rate. The proposal considers network scalability, and consequently, a modified version of the overlay carrier sense multiple access with collision avoidance (O-CSMA/CA) protocol for CR is implemented.Figure8 shows the frame used for general communication between CR devices. The first block of the frame includes the information necessary to start the handshaking process and to identify whether a packet has been sent successfully or not. Then, the idSource is the CR identification of the caller device, and the idTarget is the identification of the CR device to be called. The channel transmission block determines the channel through which the pair of devices must communicate. The next block indicates the BK channels used to move the communication if the channel transmission becomes busy. These channels are used in case of the presence of a PU and when the CR devices must change their transmission to another free channel. This action is referred to as “channel hops.” The counter block is used to count the number of attempts through which to find a free channel to communicate. The idNetwork is a parameter which identifies the communication in progress. The idNetwork is also used when the CR device wishes to call another CR device. Then, a communication signal with the idTarget and the idNetwork is sent through an available channel until the required CR device receives this signal and answers the call. This establishes the communication in the available channel. During the handshaking (see Figure 9), there are two possible options: the CR devices move to a free BK channel, if available, or they search for a new channel through which communicate and are obliged to wait. In fact, the idNetwork is an identifier number which corresponds to the signal of the CR device trying to communicate, so the called device is able to identify by scanning the spectrum who is calling and to acquire the list of available channels for both devices. Thanks to the idNetwork, the CR transmitting can identify whether the accessing device is a PU or another CR. The block in the frame with the amount of packets indicates how many packets have been successfully sent to the receiver. Finally, the data stream is incorporated in the last part of the frame, in which the information is divided into fixed-size packets.Figure 8
CR communication frame in Coded-MAC.Figure 9
Network registration and communication.


### 4.2.3. Communication Stage

Figure10, which shows the flow chart for the handshaking and communication between CR devices, illustrates the OSA Communication process stage. The following considerations should be assumed. (i) Each CR device has an associated identification number (id). (ii) It is assumed that communication involves CR devices, sources (CS), and targets (CT). (iii) Redundant channels must be considered for use in case a PU arrives during a communication. The communication process starts the moment the CS sends a call request. The following selection criterion is applied: when communication is established the CR network with a lower id is chosen. This connection is made in the same channel, and it is necessary to choose only one. If this condition is met, CT establishes a connection in the free channel using an id network. Consequently, reading the identification network created for the CS, the devices continue to detect the medium during communication to verify if the channel is still free or whether the PU has arrived. If at any time a collision is detected (the entry of a PU has been detected), CR devices move as fast as required given the BK channel information they have. According to Figure 10, if the CR devices cannot find a common free channel, the CS cancels the call and repeats the process. On the other hand, CS checks whether the TC is communicating through the new free channel in order to continue with the communication interrupted by the PU. For this, the system has a counting mechanism that indicates the number of attempts made. If the number of attempts is smaller, then the CS updates the network’s id and waits for the CT’s response. In another case, the handshaking process starts from the beginning.Figure 10
Communication, caller, and called CR devices.


### 4.2.4. Additional Redundancy Stage

If communication experiences losses due to mobility, the information transmission will fail. The most frequent solution to this problem in a noncognitive network consists of sending a backup copy of the information through a second device (or an alternate path). This solution’s main drawback is that the alternate component reduces its effective available performance in order to manage the backup copy. Besides this, if the first and the second components fail, the transmitted message will be lost. Hence, a common feature is the utilization of a redundancy strategy in order to provide fault-tolerance and, particularly, integrity. In order to send a file, it can be split into various information units. In this case, several copies of the resulting units are allocated to a given subset of devices. In contrast, there are systems in which information redundancy is implemented through using error-correcting codes [34]. The use of an additional approach to the Reed Solomon code based on the Information Dispersal Algorithm (IDA), developed by Rabin [35], is here proposed. Let us say F is a file, F could be transformed into n files called dispersals. Each of size F/m, where n>m>1. The dispersals are then sent to different channels. From the algorithm properties, it is granted that if any n−m dispersals were lost, the original information could be reconstructed from the m surviving dispersals. In this case, the cost of the reconstruction is compensated due to the greater tolerance that the system supports, in addition to the reduction of devices required for redundancy.Due to the features characterizing of cognitive radio, it is pertinent to think about what could be considered a good combination ofm and n. For a fixed K=n−m, it is possible to have different combinations of n and m, but although m⟶n would seem a good option especially when n is greater than or equal to 10, because redundancy is significantly reduced, this implies two considerations: (i) dispersion and recovery times increase, and (ii) what is even more important, the probability that K or more faults occur increases with n, as argued below. Consider two instances of IDA with parameters (5, 3) and (10, 8), respectively. Both offer the same tolerance, but the second case does so with a lower cost in redundancy (0.666 vs. 0.25, respectively). It would seem that the second case is better, but the probability that there exist two or more failures as a function of n should be considered. This is obtained by modeling the probability of faults with a binomial distribution where p is the probability that dispersal is lost since there are n initial dispersals, then the probability that two or more faults will occur should be calculated, but this is the complement that 0 or 1 failure occurs. The result is a function that grows with an n value. The conclusion is that, although it seems interesting to increase n, maintaining the number of failures that can be tolerated (n−m), this criterion can lead to greater risk. It is also important to consider that a large n value implies a longer dispersion and recovery time. Therefore, alternative m⟶n, when n takes a very large value, e.g., >10 it does not seem very convenient given the processing cost but, above all, the risk faced by the overall system.In this paper, (5, 3) was chosen. This means that an initial file is transformed into five dispersals and can be recovered with any three of them. Each dispersal is the size ofF/3, and therefore, there is an excess of information, or information redundancy, equal to 2F/3. Table 1 shows all possible combinations of IDA parameters for n=2,⋯,7 and m=1,⋯,6. Each entry represents a 2-tuple, (n, m), with its corresponding redundancy n−m/m. Reading this information by rows, the rightmost entry represents the combination supporting the biggest number of losses or missing dispersals, for a fixed n. Nevertheless, the price to pay is an excess of redundant information, i.e., BW which, in the extreme case (n, 1), implies that each dispersal is actually a replica of F. Reading by columns instead, each column represents all the possibilities that may compensate the same number of losses, i.e., the ith column (from left to right) describes all combinations that support up to i losses. It should be noted that a given entry supports the same number of losses as any lower entry in the same column. However, this results in high redundancy [36]. Figure 11 shows that each dispersal is sent through different channels, and in case of information interruption, the information with three dispersals can be recovered.Table 1
IDA parameter combinations and their redundancy levels.
(2,1)1(3,2)1/2(3,1)2(4,3)1/3(4,2)2/2(4,1)3(5,4)1/4(5,3)2/3(5,2)3/2(5,1)4(6,5)1/5(6,4)2/4(6,3)3/3(6,2)4/2(6,1)5(7,6)1/6(7,5)2/5(7,4)3/4(7,3)4/3(7,2)5/2(7,1)6Figure 11
Use of IDA to send information through different channels.


## 4.2.1. Reed Solomon Coding

Regardless of the coding used in the transmission systems, e.g., CDMA and OFDMA, adaptive forward error correction (FEC) is commonly used in wireless communications, such as convolutional, Reed Solomon, and Turbo codes [31–33]. In this paper, a novel application for the decision-making function is proposed in which a Reed Solomon (RS) code can be implemented for communication. Communication between secondary users can be controlled or just coordinated through using specific redundancy codes. Due to communication’s constant intermittency, a short length of the data block and transmission speed should be considered. In order to evaluate block length and redundant information that should be added, a communication system was proposed using BPSK modulation and demodulation. Initially, the data is binarized and encoded. Subsequently, the encoded binary data is passed through a Gaussian channel in which Additive White Gaussian Noise (AWGN) is added to the channel. Afterward, the binary noisy data are demodulated and decoded. Figure 6 compares the probability of error obtained from uncoded messages and messages encoded with (z,k) RS code for different blocks such as (7, 5) RS, (15, 9) RS, and (20, 15) RS code. Note that error probabilities are presented as a function of the ratio of energy dedicated to a bit Eb and the spectral density of noise N0. Thus, Figure 6 demonstrates that as the energy of the bits increases, the propagation of error decreases since the message is less affected by noise.Figure 6
Comparison of bit error rate performance of (z, k) RS code for different block lengths.The different bit error rates (BER) are shown in Figure6, the message encoded with the (20, 15) RS code, and the performance of the error rate improves with respect to the uncoded message. Regarding the (7, 5) RS code, it improves Eb/N0 in order to reach a bit error rate of 10-3 in approximately 6 dB. However, (15, 9) RS code remains below in all cases, which improves the Eb/N0 to reach a minimum BER of 10-8 in approximately 7 dB. Thus, the RS code used for the proposal is (z, k) in which the block length: z=15 symbols, and the data length is k symbols = 9. The encoding algorithm expands a block of 9 symbols to 15 symbols by adding 6 redundant check symbols. The entire z-tuple space contains 2n=215=32768z-tuples, of which 2k=29=512 (or 1/64 of the z-tuples) are codewords. Consequently, the RS codes have the remarkable property that they can correct any set of z−k symbol erasures within the block. A wireless device can easily compute these codes without significant power consumption.According to Figure7, the approach shown here is mainly planned as an infrastructure network topology in which a base station (BS) helps to connect devices in order to share information all over the network. This approach, however, is not constrained to infrastructure architectures, so it can be implemented in other types of architecture, such as Ad-Hoc networks. When a CR user enters a specific location area, it should identify itself as a CR device. Thus, the BS assigns a local identification to the CR device which is, in fact, a communication code apart from the device’s identification (ID), independent from of the permanent address and physical ID number. The communication code assigned by the BS identifies the device as cognitive radio and in our proposal is transmitted using the RS code. This RS cognitive code (RSCC) identifies the device at the location and power range of the BS and identifies only cognitive device communications. The RSCC helps to gain fair access to the CR device network because this registration process distinguishes the CR device from other opportunistic users in the area, and consequently, a more effective media access control (MAC) can be implemented.Figure 7
Handshaking process for two CR devices.Once the CR device is registered on the network and when this device is communicating, the RSCC identification code also serves for the reception of poor signal detection. In addition, with the use of RSCC during communication, privacy and recognition of the communication signal are managed by the CR device and the BS. The CR device signal can be identified and differentiated from primary users and other devices. Another variant of this process provides codes for primary users making it easier to identify between primary, secondary, and other types of communication devices in the area. Thus, the proposal is to use the (15, 9) RS code in order to determine the RSCC for identification of the CR devices, which was implemented in the simulation using a developed program in Python.


## 4.2.2. The Proposed Coded-MAC

The proposed Coded-MAC solves the opportunistic spectrum access problem considering an overlay approach when there is a pair of CR devices communicating with each other. However, it uses an underlay approach when the handshaking for the connection of two CR devices is in process. This eliminates the use of a CCC, although minimum interference is produced during connection.The interface lapse depends on the spectrum sensing time and the exchange of messages to coordinate common free channel options. The spectrum sensing’s function is to inform the CR devices about spectrum white spaces. Once the connection is established on an available channel, the interference is null until a PU attempts to occupy this free channel. The list of available channels is updated according to changes in the spectrum; hence, if a primary user enters that portion of the spectrum, a spectrum mobility mechanism is set off based on the previous sensing information of the backup (BK) channels. The sensing information of channel availability is acquired continuously and stored. To deal with the “hidden terminal” and “the far-away from terminal” effects, the proposed Coded-MAC is designed in response to the frame exchange sequence (FES), RTS-CTS-DATA-ACK. The sequence of received acknowledgments is also controlled. The CR device that requires to communicate mounts its signal as a peer to peer network connection on a free channel, using a network identifier (idNetwork).This idNetwork, in addition to the CR identifier, is used by the caller CR device in order to specify to whom it requires to call. Then, the called CR device senses the spectrum and knows that another CR is calling. The Coded-MAC also comes up with a solution when CR devices cannot detect the same available channels by sending coordination packets to establish communication in other free channels by emitting 4-bytes coordination message. This coordination message produces a reduced interference time to the PU that has been coded, which is equal to the four bytes divided by the data rate. The proposal considers network scalability, and consequently, a modified version of the overlay carrier sense multiple access with collision avoidance (O-CSMA/CA) protocol for CR is implemented.Figure8 shows the frame used for general communication between CR devices. The first block of the frame includes the information necessary to start the handshaking process and to identify whether a packet has been sent successfully or not. Then, the idSource is the CR identification of the caller device, and the idTarget is the identification of the CR device to be called. The channel transmission block determines the channel through which the pair of devices must communicate. The next block indicates the BK channels used to move the communication if the channel transmission becomes busy. These channels are used in case of the presence of a PU and when the CR devices must change their transmission to another free channel. This action is referred to as “channel hops.” The counter block is used to count the number of attempts through which to find a free channel to communicate. The idNetwork is a parameter which identifies the communication in progress. The idNetwork is also used when the CR device wishes to call another CR device. Then, a communication signal with the idTarget and the idNetwork is sent through an available channel until the required CR device receives this signal and answers the call. This establishes the communication in the available channel. During the handshaking (see Figure 9), there are two possible options: the CR devices move to a free BK channel, if available, or they search for a new channel through which communicate and are obliged to wait. In fact, the idNetwork is an identifier number which corresponds to the signal of the CR device trying to communicate, so the called device is able to identify by scanning the spectrum who is calling and to acquire the list of available channels for both devices. Thanks to the idNetwork, the CR transmitting can identify whether the accessing device is a PU or another CR. The block in the frame with the amount of packets indicates how many packets have been successfully sent to the receiver. Finally, the data stream is incorporated in the last part of the frame, in which the information is divided into fixed-size packets.Figure 8
CR communication frame in Coded-MAC.Figure 9
Network registration and communication.


## 4.2.3. Communication Stage

Figure10, which shows the flow chart for the handshaking and communication between CR devices, illustrates the OSA Communication process stage. The following considerations should be assumed. (i) Each CR device has an associated identification number (id). (ii) It is assumed that communication involves CR devices, sources (CS), and targets (CT). (iii) Redundant channels must be considered for use in case a PU arrives during a communication. The communication process starts the moment the CS sends a call request. The following selection criterion is applied: when communication is established the CR network with a lower id is chosen. This connection is made in the same channel, and it is necessary to choose only one. If this condition is met, CT establishes a connection in the free channel using an id network. Consequently, reading the identification network created for the CS, the devices continue to detect the medium during communication to verify if the channel is still free or whether the PU has arrived. If at any time a collision is detected (the entry of a PU has been detected), CR devices move as fast as required given the BK channel information they have. According to Figure 10, if the CR devices cannot find a common free channel, the CS cancels the call and repeats the process. On the other hand, CS checks whether the TC is communicating through the new free channel in order to continue with the communication interrupted by the PU. For this, the system has a counting mechanism that indicates the number of attempts made. If the number of attempts is smaller, then the CS updates the network’s id and waits for the CT’s response. In another case, the handshaking process starts from the beginning.Figure 10
Communication, caller, and called CR devices.


## 4.2.4. Additional Redundancy Stage

If communication experiences losses due to mobility, the information transmission will fail. The most frequent solution to this problem in a noncognitive network consists of sending a backup copy of the information through a second device (or an alternate path). This solution’s main drawback is that the alternate component reduces its effective available performance in order to manage the backup copy. Besides this, if the first and the second components fail, the transmitted message will be lost. Hence, a common feature is the utilization of a redundancy strategy in order to provide fault-tolerance and, particularly, integrity. In order to send a file, it can be split into various information units. In this case, several copies of the resulting units are allocated to a given subset of devices. In contrast, there are systems in which information redundancy is implemented through using error-correcting codes [34]. The use of an additional approach to the Reed Solomon code based on the Information Dispersal Algorithm (IDA), developed by Rabin [35], is here proposed. Let us say F is a file, F could be transformed into n files called dispersals. Each of size F/m, where n>m>1. The dispersals are then sent to different channels. From the algorithm properties, it is granted that if any n−m dispersals were lost, the original information could be reconstructed from the m surviving dispersals. In this case, the cost of the reconstruction is compensated due to the greater tolerance that the system supports, in addition to the reduction of devices required for redundancy.Due to the features characterizing of cognitive radio, it is pertinent to think about what could be considered a good combination ofm and n. For a fixed K=n−m, it is possible to have different combinations of n and m, but although m⟶n would seem a good option especially when n is greater than or equal to 10, because redundancy is significantly reduced, this implies two considerations: (i) dispersion and recovery times increase, and (ii) what is even more important, the probability that K or more faults occur increases with n, as argued below. Consider two instances of IDA with parameters (5, 3) and (10, 8), respectively. Both offer the same tolerance, but the second case does so with a lower cost in redundancy (0.666 vs. 0.25, respectively). It would seem that the second case is better, but the probability that there exist two or more failures as a function of n should be considered. This is obtained by modeling the probability of faults with a binomial distribution where p is the probability that dispersal is lost since there are n initial dispersals, then the probability that two or more faults will occur should be calculated, but this is the complement that 0 or 1 failure occurs. The result is a function that grows with an n value. The conclusion is that, although it seems interesting to increase n, maintaining the number of failures that can be tolerated (n−m), this criterion can lead to greater risk. It is also important to consider that a large n value implies a longer dispersion and recovery time. Therefore, alternative m⟶n, when n takes a very large value, e.g., >10 it does not seem very convenient given the processing cost but, above all, the risk faced by the overall system.In this paper, (5, 3) was chosen. This means that an initial file is transformed into five dispersals and can be recovered with any three of them. Each dispersal is the size ofF/3, and therefore, there is an excess of information, or information redundancy, equal to 2F/3. Table 1 shows all possible combinations of IDA parameters for n=2,⋯,7 and m=1,⋯,6. Each entry represents a 2-tuple, (n, m), with its corresponding redundancy n−m/m. Reading this information by rows, the rightmost entry represents the combination supporting the biggest number of losses or missing dispersals, for a fixed n. Nevertheless, the price to pay is an excess of redundant information, i.e., BW which, in the extreme case (n, 1), implies that each dispersal is actually a replica of F. Reading by columns instead, each column represents all the possibilities that may compensate the same number of losses, i.e., the ith column (from left to right) describes all combinations that support up to i losses. It should be noted that a given entry supports the same number of losses as any lower entry in the same column. However, this results in high redundancy [36]. Figure 11 shows that each dispersal is sent through different channels, and in case of information interruption, the information with three dispersals can be recovered.Table 1
IDA parameter combinations and their redundancy levels.
(2,1)1(3,2)1/2(3,1)2(4,3)1/3(4,2)2/2(4,1)3(5,4)1/4(5,3)2/3(5,2)3/2(5,1)4(6,5)1/5(6,4)2/4(6,3)3/3(6,2)4/2(6,1)5(7,6)1/6(7,5)2/5(7,4)3/4(7,3)4/3(7,2)5/2(7,1)6Figure 11
Use of IDA to send information through different channels.


## 5. Tests and Analysis of Results

The results show a test scenario where PUs accesses the channels randomly. For this test scenario, if a pair of CR devices are communicating and a PU unexpectedly occupies the channel, the involved CR devices have to move as soon as possible to another available free channel. The simulation parameters are 5 Mbps data rate for the transmission of a file of 30 1500-byte packets. The file was split into packets in order to acknowledge the received packets and manage the number of correctly received packets, i.e., goodput. Thus, if the CR communication is interrupted by a PU, the CR communication can continue from the last acknowledged packet, although the CR devices are obliged to move to another channel. As aforementioned, a pair of CR devices establish communication while they are interrupted by a PU occupying the channel at random. This random occurrence simulates when CR devices move spatially from one place to another or just because the PUs operate switching on and off randomly.


### 5.1. A System with Two CR Devices Communicating

The CR devices exchange information by sending a testing file of 45 kbytes which is divided into 1500-byte packets. The optimum time to transmit this testing file without interruptions, i.e., without channel movements, is around 0.07 seconds, as shown in Figure12. This is an optimal time because there is no need to move to another channel during transmission of the entire testing file. The time elapsed comprises the time of 30 packets sent and their corresponding acknowledgment received by the sender. Figure 12 illustrates the elapsed time during which the two CR devices are communicating and the number of channel movements is varied up to eight times. It also shows the communication when the number of BK channels varies from one to six.Figure 12
System performance with a pair of CR devices communicating, and with BK channels.The system’s performance is depicted when BK channel availability is not always present. These results demonstrate when BK channels can be occupied by a PU in any unpredictable moment. The Coded-MAC performance was also tested for different packet sizes in order to find the most favorable ratio between channel hops and retransmissions of unacknowledged packets (see Figure13).Figure 13
System performance varying the packet size.The goodput for the transfer of the testing file which is divided into 3000-byte packet sizes results in the best performance, as demonstrated in Figure13. This is because the number of acknowledgments is lower than the other case scenarios in which packet sizes are smaller. This behavior was expected, but it was important to measure how the transmission would be affected by the interruptions per channel hops.


### 5.2. System with More than Two CR Devices Communicating

In the second scenario, 20 CR devices were considered. They each sent a 45-kbyte file and split it into 1500-byte packets at a 5 Mbps data rate. The communication was also evaluated when the number of BK channels varied from one to six. The random entrance of PUs into the channels occupied by CR devices was simulated with a random uniform distribution. The number of channel hops required by the CR devices was plotted against the time elapsed to conclude the testing file transfer. Figure14 demonstrates that the elapsed time increases when the CR devices have to find free channels in order to establish communication. The proposed Coded-MAC performance was tested for different packet sizes in order to find the most favorable ratio between channel hops and retransmissions of unacknowledged packets. The simulation considers n fragments of the information sent through different previously chosen channels were similarly considered, and messages were able to be retrieved with only m dispersed. This causes information to be transferred quickly in small blocks, thus reducing energy consumption in CR devices.Figure 14
System performance with 20 CR devices communicating and with BK channels.


### 5.3. Coded-MAC vs. O-CSMA/CA

Coded-MAC vs. O-CSMA/CA adapted for cognitive radio networks for the transmission of a file in which secondary users are contending for medium access were compared.Figure15 demonstrates that Coded-MAC performs similarly to the O-CSMA/CA when CR devices contend for the medium without PUs. However, if BK channels are available, the Coded-MAC has a significant advantage over the O-CSMA/CA.Figure 15
Coded-MAC vs. O-CSMA/CA without PU presence.As observed in Figure16, the decision-making process is faster when backup channels are used to distribute information by means of dynamic dispersal of the information using Rabin’s IDA approach and the Coded MAC that provides a predictive behavior by the statistics assessed with the available channels and their characteristics.Figure 16
Coded-MAC for different BK channels to communicate with PU presence.


## 5.1. A System with Two CR Devices Communicating

The CR devices exchange information by sending a testing file of 45 kbytes which is divided into 1500-byte packets. The optimum time to transmit this testing file without interruptions, i.e., without channel movements, is around 0.07 seconds, as shown in Figure12. This is an optimal time because there is no need to move to another channel during transmission of the entire testing file. The time elapsed comprises the time of 30 packets sent and their corresponding acknowledgment received by the sender. Figure 12 illustrates the elapsed time during which the two CR devices are communicating and the number of channel movements is varied up to eight times. It also shows the communication when the number of BK channels varies from one to six.Figure 12
System performance with a pair of CR devices communicating, and with BK channels.The system’s performance is depicted when BK channel availability is not always present. These results demonstrate when BK channels can be occupied by a PU in any unpredictable moment. The Coded-MAC performance was also tested for different packet sizes in order to find the most favorable ratio between channel hops and retransmissions of unacknowledged packets (see Figure13).Figure 13
System performance varying the packet size.The goodput for the transfer of the testing file which is divided into 3000-byte packet sizes results in the best performance, as demonstrated in Figure13. This is because the number of acknowledgments is lower than the other case scenarios in which packet sizes are smaller. This behavior was expected, but it was important to measure how the transmission would be affected by the interruptions per channel hops.


## 5.2. System with More than Two CR Devices Communicating

In the second scenario, 20 CR devices were considered. They each sent a 45-kbyte file and split it into 1500-byte packets at a 5 Mbps data rate. The communication was also evaluated when the number of BK channels varied from one to six. The random entrance of PUs into the channels occupied by CR devices was simulated with a random uniform distribution. The number of channel hops required by the CR devices was plotted against the time elapsed to conclude the testing file transfer. Figure14 demonstrates that the elapsed time increases when the CR devices have to find free channels in order to establish communication. The proposed Coded-MAC performance was tested for different packet sizes in order to find the most favorable ratio between channel hops and retransmissions of unacknowledged packets. The simulation considers n fragments of the information sent through different previously chosen channels were similarly considered, and messages were able to be retrieved with only m dispersed. This causes information to be transferred quickly in small blocks, thus reducing energy consumption in CR devices.Figure 14
System performance with 20 CR devices communicating and with BK channels.


## 5.3. Coded-MAC vs. O-CSMA/CA

Coded-MAC vs. O-CSMA/CA adapted for cognitive radio networks for the transmission of a file in which secondary users are contending for medium access were compared.Figure15 demonstrates that Coded-MAC performs similarly to the O-CSMA/CA when CR devices contend for the medium without PUs. However, if BK channels are available, the Coded-MAC has a significant advantage over the O-CSMA/CA.Figure 15
Coded-MAC vs. O-CSMA/CA without PU presence.As observed in Figure16, the decision-making process is faster when backup channels are used to distribute information by means of dynamic dispersal of the information using Rabin’s IDA approach and the Coded MAC that provides a predictive behavior by the statistics assessed with the available channels and their characteristics.Figure 16
Coded-MAC for different BK channels to communicate with PU presence.


## 6. Conclusions

The proposal presented in this work demonstrates a decision-making module (DMM) which contributes to the functionalities required for opportunistic spectrum access (OSA). This function is based on coding for mitigation of the effects of frequent channel hops in the cognitive radio environment. The novel system solves spectrum allocation with simple resources and presents a dispersal algorithm that optimizes dynamically the spectrum allocation, while it is combined with the proposed MAC mechanism for the decision-making function recommended for cognitive radio networks.The Reed Solomon (RS) code is used for establishing the communication process assisting medium access control (MAC). The communication code assigned by the base station (BS) identifies the device as a cognitive radio. This RS cognitive code (RSCC) is used to identify the device at the location and power range of the BS and identifies only cognitive device communications. The RSCC helps to gain fair access to the network for the cognitive radio (CR) devices because this registration process distinguishes the CR device from other opportunistic users in the area, and as a consequence, a more effective MAC can be implemented.The use of an additional approach to the RS code was proposed using the information dispersal algorithm (IDA) which provides an effective redundancy to mitigate the effect of channel hops on CR networks (CRNs). It is important to diversify the information in order to optimize the spectrum use in cognitive radio networks, and the dispersal algorithm proposed is intended to dynamically allocate the communication in different available channels. This combined with the decision-making process to adapt spectrum utilization using intelligence by means of the multiple criteria decision-making module proposed.The performance of the proposed system was proven when the backup (BK) channel availability was not always present, since BK channels can be occupied by a primary user (PU) at any unpredictable moment simulated by a probability uniform distribution. The proposed Coded-MAC performance was also tested for different packet sizes in order to find the most favorable ratio between channel hops and retransmissions of unacknowledged packets.



---

*Source: 8816760-2020-10-23.xml*