Improving Quality of Service Provisioning of Optimised Cuckoo Search Ad Hoc on-demand Distance Vector Routing Scheme for Cognitive Radio Ad Hoc Networks.

Spectrum mobility, cloud computing and the Internet of Things (IoTs) create large data sets, while the demand for more spectrum is increasing. Unfortunately, the spectrum is a scarce resource which is being underutilized by licensed users. The cognitive radio network, also known as intelligent radio, is a network that can adjust to environment changes and, detect available channels. It has emerged as a promising solution for the underutilization of the licensed spectrum and overcrowded free spectrum. Furthermore, given spectrum mobility, frequent link breakages impact negatively on the delivery of packets and the performance of the network. Hence there is need to address the routing problem. We therefore investigated which control methods can be utilized to improve the QoS provisioning in CRAHNs to minimize the signal overhead and to increase the achievable throughput. The study integrated the QoS requirements with optimized cuckoo search (OCS) algorithm to enhance the ad hoc on-demand distance vector (AODV) algorithm to establish a scheme we refer to as OCS-AODV. NS 2 simulation were run on Linux operating system. The comparative results show that the proposed scheme performed well in terms of end-to-end delay and throughput. However, the scheme does not backup alternative paths which can be used in the event of link breakages. The route discovery has to be re-initiated again. Though the route discovery process is faster because of the capability of the CS technique, it still degrades the performance of the scheme.


Introduction
Quality of Service (QoS) aware technologies that seek to guarantee the provisioning of the requirements of high-priority applications and traffic under the constraints of limited network capacity [1]. The goal of QoS provisioning is to achieve a more deterministic network behavior, so that data can be delivered efficiently while network resources are utilized efficiently. The fundamental of cognitive radio ad hoc network (CRAHN) is to deliver the QoS requirements while the unlicensed users access network channels opportunistically when the spectrum is idle [2]. CRAHN has to ensure that interference with the licensed user's activities is avoided. Therefore, the need to meet QoS requirements of unlicensed users is a challenge [3]. The spectrum mobility and the Internet of Things (IoT) have generated large volumes of data, which require the more bandwidth and spectrum for data transmission. Unfortunately, the spectrum is a scarce resource which is underutilized by licensed users while unlicensed spectrum is overcrowded.
Cognitive networks are spectrum-agile devices that changes their configurations based on the spectral environment [4]. Cognitive network has emerged as a promising solution to the underutilization and overcrowding of the spectrum by allowing unlicensed users to utilize these free channels opportunistically when they are idle.
This technique is expected to reduce contention on the channels and minimize the interference and improve the average channel efficiency [5]. There are various accessible spectrum ranges, such as global system for mobile (GSM), Television, wireless local area network (WLAN), military, and long-term evolution (LTE) as depicted in figure 1 that cause spectral inefficiency.

Figure 1
In ad hoc networks, each node is able to perform routing functions but due to the unique characteristics of a dynamic environment and frequent changes in the topology. The network is characterized by limited and varying bandwidth and power limitations of mobile devices and the lack of centralized infrastructure, it is a challenge to meet QoS requirements [6]. Furthermore, routing problem requires further consideration given the fact that current routing protocols designed for traditional networks are not suitable for CRAHNs because of node and spectrum mobility [7]. The study is motivated by the potential of cognitive radios, which are designed to address the spectrum scarcity. The study investigates the efficient routing strategies that can be applied to CRAHNs to improve the QOS and the flexibility of the routing protocols while ensuring that they remain reliable and stable.
The study proposes an optimized cuckoo search ad hoc on-demand distance vector (OCS-AODV) scheme which is a meta-heuristic optimization algorithm designed to solve the routing problem and improve QoS [8]. Cuckoos are parasite birds that ordinarily uses other birds' nests to lay their eggs. They replace the host eggs with their own in an endeavor to ensure that their eggs are not detected. The algorithm was originally created in 2009 by Deb and Yang and the cuckoo search algorithm is an NPhard algorithm which was designed to solve complicated and hard problems efficiently.

Literature review
In [9] the authors proposed a discrete variants of the cuckoo search optimization (DCSO) scheme, namely the levy and the random walk approach to achieve improvement on route discovery in ad hoc networks. The proposed scheme was compared to a genetic algorithm (GA). The simulation results show that the proposed scheme achieved a better performance under various network scenarios. However, the proposed algorithm performs poorly for real time applications. It incurs a lot of delay experienced during random movement made by each node and there seems to be more challenges experience during node movement [10]. The study may be optimized for complex cases where the nodes are moving randomly in an area with obstacles and QoS sensitive users.
In [2], the authors proposed a routing protocol called TIHOO for VANETs. The routing scheme intelligently utilizes fuzzy and cuckoo methods. The scheme is effective in large search space because it selects stable and optimal paths among the available paths by calculating the fitness function based on criteria such as path lifetime, path stability and the availability of the adequate buffer space [11]. The simulation results show that the proposed scheme performs better than ANT and AODV in terms of throughput and packet delivery ratio. However, when the mobile nodes increase, the source node generates more packets causing a delay and overwhelms the receiving node. The scheme is not designed for QoS and routing overhead [12].
In [13], the authors proposed a hybrid computational intelligent scheme known as TCSA, which is the extension of the CSA. It is designed to solve the multi-constrained QoS routing problem experienced by ad hoc networks. The results proved that the proposed scheme TCSA outperformed the PSO and CSA schemes in terms of packet delivery ratio (PDR), end-to-end delay, path success ratio. The proposed scheme is effective and efficient. Furthermore, the scheme can be enhanced to consider the network robustness and real time applications as they are crucial when it comes to time deadline and constraints.
In [14], the authors proposed an improved AODV routing scheme to solve the end-toend delay and improve achievable throughput. The simulation results show that the proposed scheme was able to reduce routing overhead through the selection of the best route to the destination. However, the scheme increases packet drop rate. In trying to solve the high packet drop rate the authors in [15] proposed a virtual ad-hoc routing designed to minimizes energy consumption in discovering the alternative paths. The simulation results show that the scheme seems to have managed to reduce energy consumption at the cost of increased routing overhead associated with the discovery alternative routes. The scheme is therefore not effective and hasn't effectively addressed the routing problem.
A routing scheme was proposed in [16] which is cluster-based multipath routing which was designed to reduce the link failures caused by spectrum and node mobility, cloud computing and the Internet of Things (IoT). The experiments results show that the scheme was able to solve the link failure problem however, poor selection of gateway nodes is a challenge. Hence there is still a need to design an algorithm optimized for the discovery of optimum route [17]. Improving the routing problem would mean increased PDR, fewer packet losses, less delay, and increased achievable throughput.

Results
We evaluate the proposed scheme in terms of the end-to-end delay. The comparative results are there presented analyzed in this Section. The proposed scheme incurred the least delay and guaranteed the delivery of most packets within deadline constraints. The other schemes incurred delay relating to the retransmission of lost packets which was not the case with the OCS-AODV. The retransmission protocols in the other schemes, increased the amount of delay.
In figure 2, we observed that the existing schemes incur longer delay caused by the network congestions as a result of packet losses. The delay is dependent on the network's state; when the network performance degrades, the delay problem worsens.
As a result, packets are buffered for longer periods until they are timed out. Dropped packets will require to be retransmitted. The proposed scheme avoids retransmissions and reduces delay in the network by ensuring that quality routes are selected.
The CS-DSDV protocol experiences the worst delay when the number of nodes increases. The performance of CS-DSDV performance is affected by the delay in route repair. Secondly, when a link is broken, the route cannot be repaired locally. Thus, the route discovery and repair incur a lot of delay. Frequent route updates incur a lot of overhead.

Figure 2
In figure 3, we observed that the proposed scheme had a lower delay, few packets dropped and higher PDR. These three factors helped the OCS-AODV scheme improve its performance as it was able to achieve higher throughput than ACO-AODV and CS-DSDV.
The throughput of CS-DSDV was affected by delays and periodic route updates. The scheme experiences a lower throughput due to network bottlenecks and high overhead cost. The ACO-AODV suffers from lengthy search and very slow convergence in route discovery process.
The study observed that the proposed scheme OCS-AODV is optimized for QoS constraints; it ensures that a path chosen is energy efficient, stable and has sufficient network resources required by an application. While the DSDV depletes the battery power due to periodic updates of routing tables.  nodes increases, the delay also increases. Applying the optimised CS algorithm to the AODV had a significant impact on the selection of the best route. We observed that the OCS-AODV algorithm incurred less delay due to the selection of reliable paths with sufficient network resources. The longer delay in CS-DSDV is due to frequent updates of its routing tables, which consumes a lot of battery power and bandwidth even when the network is idle.
Topological changes cause the CS-DSDV to take long to converge and degrades in high dynamic network environment. The OCS-AODV has a fast convergence rate and selects optimal paths faster. Furthermore, the configuration of the fitness function of the AODV protocol, considering parameters such as available buffer, helps in identifying candidate paths for de-selection in endeavour to avoid congested paths.  The study also observed that all the routing protocols are degraded by congestion.
However, the OCS-AODV still outperforms the other protocols in such congested and highly mobile network scenarios.

DISCUSSIONS
The study observed that the DSDV is not suitable for ad hoc networks and highly mobile network scenarios due to a need to freshen routes on regular basis. Based on the results, the study observed that the proposed OCS-AODV scheme in dynamic environment obtained less delay even when the number of nodes increased. CS-DSDV incurs longer delays as it attempts to discover alternative routes after the existing routes become outdated and when link failures are experienced.
The OCS-AODV utilizes the CS scheme search space, which is very fast and efficient in establishing paths. It also avoids disruptions of services as nodes with sufficient power are considered. As a result, shorter delays and increased achievable throughput are incurred. The proposed also losses less packets in the event of link failures. Less delay is incurred as a result while achievable throughput increases. In a high mobile environment, the scheme is effective due to the number of backup available paths. When a link breaks the backup path is immediately utilized.

Conclusion
CRAHNs is a network is a promising technology which addresses the spectrum scarcity problem. The IoT smart devices have increased the need for spectrums which affects the QoS provisioning. This study focused on the factors which affects the QoS routing and proposed an OCS-AODV scheme which utilizes an effective search technique and provides quality solutions. The scheme selects paths with sufficient battery life to prolong the network lifetime during data transmissions. Based on the experimental results of this study, we conclude that the OCS-AODV is a QoS aware routing protocol which performs well in CRAHNs.

Quality of service challenges
In a conventional system, QoS requirements are met using either overprovisioning or the network traffic engineering techniques. However, the fist technique is not suitable for ad hoc networks due to limited resources and the second one is sub optimum for the ad hoc environment [18]. For example, the buffering approach cause the network to drop and loose packets when packets are generated at higher rate than they are consumed resulting in the producer and consumer challenge [19]. Redesigning and optimizing the traffic engineering technique for ad hoc networks is a challenge.
Most applications require QoS support to meet guarantee reliability required to solve the unbalanced traffic in order to address the mobility routing challenge characterized by node and spectrum mobility [20]. Due to the unique nature of ad hoc networks, is susceptible to high incidents of node failures, high energy consumption, node mobility and frequent partitioning of the network.
When a node initiates a route, it may not secure sufficient resources to guarantee QoS requirements. Meeting QoS requirements in routing involves the selection of paths with sufficient network resources [21]. However, there are challenges in providing the QoS in ad hoc networks, such as hidden terminal problem, lack of coordination, insecure medium, limited resources, frequent network topologically changes, error prone radio channel and imprecise state information [22].

Cuckoo search algorithm overview
Cuckoo search algorithm is inspired by natural selection and was first developed by Yang and Deb in 2009. The cuckoo birds lay eggs in the host bird's nest and leave them to be incubated by the host bird. The cuckoo eggs can be blue, earthly coloured, green or grey or with various spots and patterns. When the cuckoo lays its egg in another host birds' nest, it replaces the host bird' eggs with its own to ensure that its eggs are not detected. Therefore, the Cuckoo eggs should be of the same colour and texture like the host eggs for them to be undetected.

Adaptation of cuckoo search algorithm for cognitive radio ad hoc network.
Cuckoo Search study which was adapted for CRAHNs designed to improve the routing issue through the provisioning of QoS requirements. A fixed number of local area networks (LANs) referred to as host nests with existing solutions (mobile nodes) is assumed. A new solution node (cuckoo egg) exists within each LAN and acts as a gateway node which links a LAN to other LANs. A LAN with a gateway node is regarded the best fit as the gateway is regarded to be providing a better network lifetime. The gateway is used for external transmission and for meeting QoS requirements. If the cuckoo egg is detected by the host bird, it is rejected. This means that the nest in this case the LAN does not have a solution or gateway and it cannot be used for the next generations. This means that in our context, a given LAN cannot communicate with other LANs. We therefore assume that there always exists a solution in every LAN.

Proposed methodology
We propose a routing scheme called an optimized cuckoo search ad hoc on-demand distance vector (OCS-AODV). The routing scheme combines the AODV and OCS attributes to improve the efficiency of the routing protocol. The proposed scheme was evaluated according to route stability of each link, the throughput and the end-to-end delay.
To reduce the routing overheads as the network traffic increase, this study establishes multiple paths and calculate their fitness function values to ensure that a selected path meets the QoS requirements. The scheme reduces the routing overhead, increases the achievable throughput and reduces the end-to-end delay to guarantee data transmission while it addresses the routing problem. The OCS-AODV routing scheme is based on a wide area network (WAN) whereby each node within the LAN stores neighbourhood data. The communication between two nodes in different LANs takes place through gateway nodesthe Cuckoo eggs.

Implementation steps
 Initialization stepthere exist a network with mobile nodes, and a new gateway node. Considering N to be the number of nodes in CRAHNs, with number of nodes (n), step size α, discovering probability (Pα) and the maximum number of iterations to be an end state.
 Generating gateway nodes using levy flightto generate gateway node using levy flight distribution.
 Population of nodesmobile nodes are generated randomly. Figure 7 denotes the LANs within the WAN and each LAN has one gateway node.

Figure 7
 Best and worse networka queue is formed by orchestrating the best and worse nodes using the levy flight values, where the best network is passed on to the next generationconsidered for routing purposes in our case.
 Significance of Gateways in the networkgateway nodes facilitate communication to take place between two nodes belonging to different LANs.
They form a network backbone in a WAN while networking LANs to ensure connectivity within the WAN.
Cognitive radio devices must have three qualities to achieve optimal spectrum utilization such as sensing spectrum, meeting the QoS requirements and the utilization of the capabilities of cognitive radios. The primary goal of QoS is to manage packet loss and reduce latency and jitter within a network. QoS policies ensure QoS of different classes of data are met.

Proposed cuckoo search algorithm
One of the latest nature-inspired search algorithms, which was proposed by Deb and Yang in 2009 [26], known as cuckoo search (CS). To apply the CS as an optimization tool, there are three principles that needs to be considered such as:  Cuckoo bird lays its egg in some random chosen nest at any given time.
 A nest containing the cuckoo egg would be viewed as the best nest and would be considered for the next generations. Assumptions  We assume that the cuckoo egg within the host bird's nest cannot be detected.
 Each nest must have a cuckoo egg.

Significance of cuckoo search in CRAHNs.
We have studied how the cuckoo bird multiplies its species and this study applies the cuckoo strategy to improve the routing problem. There is a fixed number of local area networks forming a WLAN, each LAN has a gateway node, which facilitates communication between two mobile nodes. The study investigated different QoS routing metrics, CRAHN protocols, their shortcomings and quality before proposing a routing scheme that integrates AODV and OCS to improve the routing issue.
To reduce the frequently occurring routing overheads as the network traffic increases, the study establishes multiple paths and calculate their fitness function values to ensure that a chosen path meets the QoS requirements. The proposed scheme, the OCS-AODV is a WLAN scheme consisting of several LANs, whereby each node within the LAN is responsible for constructing data about it current state.
The step size is as follows: Where max and min represent the maximum and minimum of the step size because the global best solution cannot be found unless there is many iterations which results in consuming a lot of energy associated with searching. When the value of is high, according to the step length causes the generated solution to be further from the current local best solution and it cannot guarantee convergence to the optimal solution.
Hence, a proper step size is important to find global best solution. The N_iter and N_itertotal represents the current number of iterations, and total number of iterations.
The probability that the cuckoo egg can be detected is Pa, which is associated with the fitness of the solution, declaring a nest having higher fitness value closer to current global optimum has a higher probability to be selected as the population of the next generation.
New cuckoo eggs can be generated using the levy flight distribution as follows: Where > 0, is the development measure identified with the sizes of the problem of interests. The levy flight gives an arbitrarily walk while the irregular advance length is drawn from a duty distributed which is denoted by Which consist of both the infinite mean and variance. However, the next location is based on the current location.

Random walk
Random walk is a process that consists of taking a series of consecutive random steps. Mathematically, can be denoted as, say SN denotes the sum of each consecutive random step say Xi, then the SN can form a random walk represented as follows: Where the Xi is an arbitrary step that is drawn from irregular dispersion and the relationship could be written as a recursive formula denoted by: where the next step depends on the current state SN-1 and the transition of Xn is based on the existing state to reach the targeted state. Hence the step size and the Wt is a variable step. Utilising the Mantegna's algorithm to ascertain the progression length is indicated by the: where the β is a boundary between the range [1,2] interval. The incentive for β is given to be 1.5; where the estimations of u and v are drawn from the normal distribution denoted as: where N denotes the normal distribution; σu and σv can be calculated using the following equation: where the Γ denotes the gamma function. The discovery of the new route is performed using the matrix P, and its probability is computed as follows: Where Pij is the probability of finding node i and j within the matrix P. The P value is contrasted within (0,1) to determine whether the local random walk is considered or not and the rand is a random number in [0,1] after the discovery of probabilities, new nodes are generated using equation (10).
new_node t = nodes t + S * P In addition, S denotes the local step size matrix produced using: S = rand () * (nodes (randperm1 (n, :)nodes (randperm2 (n), : ) Where the rand ( ) value is the random number generator with the interval 0 and 1, randomperm1 and randperm2.
QoS varies from one application to another for example, multimedia depends on metrics such as delay, throughput, packet loss rate, scalability and overhead communication. The cuckoo search optimisation is concerned with certain reproduction behaviour because it pertains improved methods as opposed to metaheuristics algorithms.
There are only two significance reasons for combining the cost optimisation and the multi constrained routing: I. QoS routing issues ordinarily are figured as far as various rules and the multicast structure should recognise a reasonable way from source to destination.
II. The most important objective is to minimise the network resource utilisation Summing the above two points, it can be denoted by the following formula: The study considers two QoS routing metrics which are throughput and end-to-end delay as shown is equation 14 and 15 respectively.
Bandwidth (R(x, y)) = min (bw(x)) , x∈R (x,y) And the end-to-end delay which is the amount of allowed limit delay that each branch of network can incur such as:

Simulation parameters
The simulation experiments were conducted using the network simulator version 2.31.
It was patched with cognitive radio cognitive network (CRCN). Using the CRCN patch is able to address the radio spectrum scarcity, avoids intentional radio jamming scenarios, switching the power saving protocol, improve the satellite communications and improves quality of service.
The duration of the simulation was set to 100 simulation seconds, the mobile nodes ranges from 10 to 100, the mobility of each mobile node was set to 30 km/h. The network resources are only assigned to nodes that meet the QoS requirements, this strategy ensures that resources are not assigned to nodes that compromises the availability of resources. Table 1 shows the parameters and their values which were utilized for the experiment.

Declarations
We confirm that the manuscript has been read and approved by all named authors and that there are no other persons who satisfied the criteria for authorship but are not listed. We further confirm that the order of authors listed in the manuscript has been approved by all of us. We confirm that we have given due consideration to the protection of intellectual property associated with this work and that there are no impediments to publication, including the timing of publication with respect to intellectual property. In so doing we confirm that we have followed the regulations of our institutions concerning intellectual property. We attest that this paper has not been published in whole elsewhere and is prepared following the instructions to authors.

Availability of data and materials
The datasets used or analyzed during the current study are available from the corresponding author on reasonable request. Figure 1 is the illustration of the spectrum channels, showing that the GSM, LTE and WLAN are overcrowded whereas the military and television channels are underutilised. Figure 2 depicts the incorporation of the quality of service support to users.   is the illustration of the throughput results, where it shows the proposed scheme OCS-AODV generating a higher throughput than the CS-DSDV and ACO-AODV routing protocols. Figure 6 is the illustration of the end-to-end delay results in a higher environment, where it shows the proposed scheme OCS-AODV generating a higher throughput than the CS-DSDV and ACO-AODV routing protocols. Figure 7 is the illustration of the throughput results in a higher environment, where it shows the proposed scheme OCS-AODV generating a higher throughput than the CS-DSDV and ACO-AODV routing protocols.