# An Integrated Cognitive Radio Network for Coastal Smart Cities
## 3 Simulation Results and Discussion
For that reason, the SDN controller is responsible for providing more stable paths with the help of the BG. Figure 5 also demonstrates that when increasing the idle probability of the PU, the performance improves for all the communication systems. The reason for this is similar to that described above--the higher probability increases the chances of free channels. However, with a decrease in idle probability, the chances among the nodes to show stability also decreases, because low probability causes difficulty for them to have a consensus about a common free channel. This is because a querying node may find another node when the idle probability is low, but it may not choose that one as a relay node due to not reaching a consensus on a common channel, thereby decreasing the chances for nodes to make stable links among them. Consequently, the nodes in the network do not provide better performance, as they do not reach a consensus on a common free channel when the idle probability of the PU is low. Figure 6 shows the routing overhead ratio when the number of vehicles and ships in the network is increased for different communications systems, and when the idle probabilities of the PU is also changed. The routing overhead ratio is a measure of the amount of control packets from the entire amount of packets in the network. From the Figure, we can see that by increasing the number of nodes in the network and decreasing the idle probability of the PU, the overhead ratio increases for each of these scenarios. Nevertheless, the V2S communications performs better  
Figure 5: Performance comparison between the proposed hybrid and pure communications in terms of end-to-end delay. than the other two communications systems in terms of network overhead ratio. This is because the BG and LCs reduce the chances of link fragility, thereby decreasing the amount of control messages in the network. Furthermore, choosing the best stable path from the source to destination at the controller with the maximum reward lowers the overall network overhead. Each querying node sends a request to the controller each time it comes across a mismatch in the packet fields or entails an updated route. Accordingly, with an increase in the number of nodes, the update rate of messages in the network is also increased. The high update rate for fixed nodes is due to not finding a free channel. Figure 6 also shows that a decrease in the idle probability of the PU degrades the network performance in terms of the overhead ratio. This is because the long active state of the PU does not allow for facilitation of any secondary user. Therefore, the chances of finding a common free channel among nodes become fewer, and accordingly, the high exchange rate of messages among nodes degrades the network performance. An additional set of results is demonstrated in Figures 7 and 8. Figure 7a-c, respectively show the packet delivery ratio, end-to-end delay, and overhead ratio of the two cognitive vehicular schemes. Each of these figures were evaluated by varying the idle probabilities of the PU with a different number of vehicles. Similarly, Figure 8a-c, respectively show the packet delivery ratio, end-to-end delay, and overhead ratio of the two cognitive maritime schemes, which were evaluated by varying the number of ships in the network and by changing the idle probabilities of the PU. Our proposed schemes show improved performance than the reference schemes in both vehicular and maritime environments. The first reason is the difference in choosing the next relay to make stable paths from the source to destination. The reference schemes select the nearest vehicle or ship to the destination by measuring the distance between nodes, which merely creates intermittent link connections, thereby decreasing the chances of successfully delivered packets. For the same reason, the reference schemes show poor performance under sparse network conditions.