# Multi-Attributes, Utility-Based, Channel Quality Ranking Mechanism for Cognitive Radio Networks
## 3 Results
Finally, we attributed a utility value to each frequency channel that reflects its ranking. Channels ranked on the top of the list have high values of the utility, while the channels ranked last have small values of the utility. The generated dataset was divided into two parts: training and testing data. The training dataset represented 75% of the overall data, and the testing data represented 25%. The Gradient Descent algorithm determines the optimal values of weights corresponding to each parameter by solving the optimization problem, given by Equation (7). To find the appropriate learning rate and the number of iterations to use with the Gradient Descent algorithm, we varied the learning rates and compared the outputs of the Gradient Descent in terms of error function and convergence time. The learning rate and the number of iterations that have a low error function and a short convergence time are chosen for the Gradient Descent setting. Once the weight corresponding to each parameter is determined, the model can predict the utility function of each channel frequency, and this predicted utility is used to rank the list of frequency channels, which are given in Table 2. This list considers four bands from Global System for Mobile (GSM) and Wi-Fi: GSM 850 MHz, GSM 1900 MHz, Wi-Fi 2.4 GHz, and Wi-Fi 5.8 GHz. This table also gives the list of frequency ranges, the channel spacing, and the number of channels for each band. These frequency channels are considered because they are the most used ones in wireless communication. It is worth mentioning that the experiments have been carried out on Matlab (R2016a, MathWorks corporate, Natick, MA, USA) running on a machine with a processor intel(\(R\)) Core (_TM_) i7-6700 CPU 3.40 GHz. Figure 4: Convergence time as a function of the number of iterations. Figure 5: Error function as a function of the number of iterations. Table 3 shows the obtained values of the global utility for several values of the capacity and the occupancy. As one can see, the utility function tends toward zero with increasing values of the occupancy and decreasing values of the capacity. Thus, based on the obtained ranking, the best channels are the desirable ones. For instance, the 1850 MHz frequency with a capacity of 0.14 and an occupancy of 34% is better than 1856.4 MHz with a capacity of 0.14 and an occupancy of 37%. In addition, the first ranked channel 5725 MHz has the highest capacity and the lowest occupancy. In contrast, the last channel in the ranking is 5815 MHz, which has the lowest capacity and the highest occupancy. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Channels** & **Capacity (Mbps)** & **Occupancy** & **Global Utility** \\ \hline  
\hline \hline \end{tabular}
\end{table} 
Table 3: Global utilities for frequency channels with several values of the capacity and occupancy. Figure 6: Experimental and calculated utilities. According to the results obtained in Table 3, a secondary user can use the channel frequency of 5725 MHz to achieve a higher data rate and a high holding time for the frequency channel, which minimizes the number of switching from a channel to another, therefore reducing the power consumption from the process of sensing and ranking. The channel 5725 MHz has a capacity of 266.32 Mbps, and according to the standard IEEE 802.11 ac, if we use a modulation 64-QAM with a coding rate of 3/4, the secondary user can achieve a data rate of up to 243 Mbps. In contrast, the algorithms that rank the channels using only the remaining idle time, i.e., the channel with the lowest occupancy, which gives the secondary user a high holding time of the channel, are selected. However, selecting the channel with the lowest occupancy does not mean necessarily that this channel has the highest capacity, which makes the secondary users unable to transmit with a high data rate to meet their requirements in terms of quality of service.