## 3 Cognitive Radio Engine Platform Usage Scenario
### Modeling Primary User Traffic in a Cognition Engine
As shown in Equations (2) and (3), \(\lambda_{\alpha}^{n}\) and \(\lambda_{\beta}^{n}\) are not random variables, but constant values, whose values are distinctive depending on the channel. More specifically, those values are nothing but the average of the exponentially-distributed random duration of time associated with the PU OFF state and ON state, respectively. To create the artificial simulated environment, in which all the channels experience distinctive PU traffic patterns, the corresponding mean values \(\lambda_{\alpha}^{n}\) and \(\lambda_{\beta}^{n}\) are specified differently on purpose. Along the way of achieving the result as in Figure 5, a priori, 1000 pairs of \(\lambda_{\alpha}^{n}\) and \(\lambda_{\beta}^{n}\) are generated for every channel to be assigned, and subsequently, the histogram of \(P_{off}^{n}\) is generated. In Figure 5, Case I, Case II, and Case III reflect the three distinct PU traffic situations, where Case I indicates that most of the value of \(\lambda_{\alpha}^{n}\) is larger than that of \(\lambda_{\beta}^{n}\). Case III reflects the opposite case, and Case II deals with the case that most of the value of \(\lambda_{\alpha}^{n}\) is almost similar to that of \(\lambda_{\beta}^{n}\). Figure 5: Off-state probability histogram of the primary user. As can be seen in the preliminary simulation results in Figure 5, for Case I, there are many channels in the OFF state, so that the frequency of PU channel occupancy is low. Thus, there would be a high opportunity for the usage of the cognitive radio node. On the other hand, for Case III, the updated histogram reflecting channel occupancy probabilities is slightly skewed to the left, which means that the PU traffic is heavy, so the opportunity for usage becomes low. After generating the value of \(P_{off}^{n}\) for the aforementioned OFF state of the PU channel in terms of \(\lambda_{a}^{n}\) and \(\lambda_{\beta}^{n}\), the next step is to define the instant of time at which the PU activity state changed. Equation (4) determines whether or not the PU state changes for a particular unit of time, designated by the time slot \(t\) at channel index \(n\). After the \(P_{off}^{n}\) value is set, a random variable based on the \"Russian roulette\" method is created to model the state change of the channel that satisfies the idle probability for the channel. At this time, the occupied state value for the corresponding channel is set to zero or one by comparing the uniform distribution random variable \(q\) and the \(P_{off}^{n}\) value. Once the random variable \(q\) is chosen in the range of \(0<q<1\), the PU state can be specified as the following:  
\[S_{n}(t)= \begin{cases}0&q\leq P_{off}^{n}\\ 1&q>P_{off}^{n}\end{cases} . \tag{4}\]  
Figure 6 shows a conceptual diagram for the generation of the PU traffic in which the PU channel in the occupied or unoccupied state at each time slot is designated as zero or one, respectively, as defined in Equation (4). For example, Figure 6 shows the modeling of a state transition associated with three channels. Among them, for the case of Ch.1, \(\lambda_{a}^{n}\) and \(\lambda_{\beta}^{n}\) are the same such that the \"OFF (0)\" state and the \"ON (1)\" state appear at the same ratio, and their mean values are one. Similarly, other kinds of PU traffic models can be generated by assigning PU ON and OFF state patterns through the statistical modeling previously described. Figure 6: State transitions for occupied and unoccupied states of each channel modeled as zero and one, respectively.