## 3 Cognitive Radio Engine Platform Usage Scenario
### Modeling Primary User Traffic in a Cognition Engine  
The application scenarios of the CR engine were designed with a focus on developing a simulated environment, predicting wireless channels that are not used by the primary user, and actively selecting the channels that have a low probability of PU occupancy. In the simulation scenario, the PU were assigned to individual channels, and the number of licensed channels was assumed to be equal to the total number of primary users. It was also assumed that the PU is licensed to the station in the assigned frequency band and does not leave the frequency band. At this time, it is noted that the use of a channel by a PU is considered to be independent for each individual channel, and channel use can change over time. In this environment, for the selective use of the vacant channel, i.e., one not used by the primary user, the CR node needs the technology to detect the vacant channel and the ability to selectively use it. The procedure for generating the PU traffic model is addressed in this subsection using an appropriate statistical distribution of the PU's channel occupancy pattern using data from spectrum sensing. Firstly, it was assumed that the PU channel usage patterns for each channel are independent and that the PU channel occupancy data acquired are perfect. Figure 4 is a conceptual diagram representing the process of switching the PU state between ON and OFF. Figure 4 reflects the PU channel state transitions, and Equation (1) is the formulation for the probability of a PU being in an OFF state relative to all observed channels [18]:  
\[P^{n}_{off}=\frac{\lambda^{n}_{a}}{\lambda^{n}_{a}+\lambda^{n}_{\beta}}. \tag{1}\]  
In addition, Equations (2) and (3) define the exponential probability distribution functions, in which the mean value \(\lambda^{n}_{a}\) of the random variable is the duration time interval of the PU OFF state, whereas the mean value \(\lambda^{n}_{\beta}\) is the duration time interval of the PU ON state:  
\[f_{a,n}(x)= \begin{cases}\lambda^{n}_{a}e^{-\lambda^{n}_{a}x}&x\geq 0\\ 0&x<0\end{cases} , \tag{2}\]  
\[f_{\beta,n}(x)= \begin{cases}\lambda^{n}_{\beta}e^{-\lambda^{n}_{\beta}x}&x \geq 0\\ 0&x<0\end{cases} . \tag{3}\]  
Here, it should be noted that the PU's channel usage can be dynamically adjusted by modifying the \(\lambda^{n}_{a}\) and \(\lambda^{n}_{\beta}\) values. Specifically, Equation (3) is used to calculate the average value of \(P^{n}_{off}\) versus  
Figure 4: Conceptual diagram of changes in PU channel occupancy states. \(N\), the total number of channels to be observed. In this paper, we assume that all the frequency channels are completely utilized by distinct PUs having their own traffic patterns. Here, each traffic pattern is solely dependent on the fixed constant \(P_{off}^{n}\), which is not a random variable, specified by mean values of exponentially-distributed time durations relevant to the PU OFF state, as well as the PU ON state. Since the number of PUs is equivalent to that of frequency channels, many PU traffic patterns are required to be generated in order to conduct the simulation. For the sake of the artificial generation of traffic patterns, which are mutually distinct, it is necessary to make an arbitrary choice of the probability \(P_{off}^{n}\) in the range of [0,1] for each channel. Therefore, to assess the performance of the proposed channel allocation scheme based on the case-based reasoning, the collision probability should be measured as a major indicator considering how much the proposed method is appropriately working. Moreover, in the simulation, the case-based reasoning is carrying out the functionality of characterizing the PU traffic in a certain confined interval of reasoning time with regarding to the histogram pattern of \(P_{off}^{n}\) resulting in the opportunity of assigning channels for CR nodes. Figure 5 shows the distribution in the form of a histogram of \(P_{off}^{n}\), designated as the probability of PU being OFF, where the total number of channels \(N\) is 1000.