# A Petri Net Model for Cognitive Radio Internet of Things Networks Exploiting GSM Bands +
## 4 QoS Evaluation of Secondary User Based on NMSPNs
### The Secondary User Model  
The model in Figure 5 has been designed with the aim of evaluating the performance of a secondary user that tries to access a GSM/EDGE transponder band as described in Section 3. It is constituted by two main blocks, which represent the workload generated by the SU (_SU workload_) and the SU data transmission when a GSM slot is found to be free (_SU transmission_), respectively. The _SU workload_ block is characterized by two places: population and sending. The former is used to represent the maximum number of IUs managed by the system, and the latter takes into account the number of IUs produced by the SU and waiting to be transmitted. To this aim, until the tokens are in place population, a new IU could be generated and accepted by the system; we limited the number of requests to the buffer size \(N_{B}\), even if the application would need to send data; if this is the case, the request is lost. It is worth noting that a specific workload profile is modeled by appropriately setting the _SU Workload_ block; it is enough to design a block (it can be arbitrary complex) where the place sending stores tokens representing IUs to send. In this work, we considered an SU workload (Figure 5) characterized by a Poisson arrival process and consistently sized IUs. This choice has been made to capture the behavior of a typical IoT source, and it was only adopted as an example as also reported in other studies. Specifically, it can also model other specific sources, such as Voice over IP [56; 57], flows obtained by frame aggregation techniques, and optimal frame size \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Transition** & **Enabling Function** \\ \hline \multirow{4}{*}{_PU model_} & CS\({}_{\mathtt{slot}}\) & \#enabledSlot == \(i\) \\  & CS\({}_{\mathtt{i}}\) & \#enabledSlot == \(i\) \\  & V\({}_{\mathtt{i}}\)2S\({}_{\mathtt{i}}\) & \#enabledSlot == \(i\) \\  & S\({}_{\mathtt{i}}\)2V\({}_{\mathtt{i}}\) & \#enabledSlot == \(i\) \\ \hline \multirow{4}{*}{_SU model_} & primary & \#sending == 0 \\  & secondary & \#sending > 0 \\  & chkT\({}_{\mathtt{CS}}\) & \(4\leq\#\mathtt{starting}\leq 7\) \\  & chkF\({}_{\mathtt{CS}}\) & \(4\leq\#\mathtt{starting}\leq 7\) \\  & chkT\({}_{\mathtt{CS}}\)+PS & \(1\leq\#\mathtt{starting}\leq 3\) \\  & chkF\({}_{\mathtt{CS}}\)+PS & \(1\leq\#\mathtt{starting}\leq 3\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Enabling functions used in the NMSPN models. adaptation [58] for IEEE 802.11x WLANs [59; 60]. It is important to highlight that the SU traffic model is arbitrary for the proposed approach; the user can change it to their liking, setting the distributions of both the arrivals and the IUs size according to the specific behavior of the SUs that need to be modeled. According to our choice of SU workload, we set the firing time of transition \(\mathrm{I}\mathrm{U}_{\mathsf{gen}}\) to an exponentially distributed random variable (r.v.) with parameter \(\lambda_{B}\) and we set the firing time of the deterministic transition \(\mathtt{End}\) to a constant value \(\tau_{IU}\), which expires based on the channel availability, as will be subsequently described. Until there is space to store new frames, place population is not empty, the transition \(\mathrm{I}\mathrm{U}_{\mathsf{gen}}\) is enabled, and it will fire, adding a new token in place sending. In our approach, the model could be extended to represent other workload profiles. In principle, any _SU workload_ block can be used with the only requirements being to have the places population and sending (with the meaning introduced above), which are connected to the _SU transmission_ block as in Figure 5.  
The _SU transmission_ block is designed to model the transmission of IUs. Our idea is based on the transition \(\mathtt{End}\); it is a deterministic transition whose delay is computed while considering the size \(N_{B}\) of an IU and the SU transmission bit rate \(\lambda_{G}\).