# A Petri Net Model for Cognitive Radio Internet of Things Networks Exploiting GSM Bands +
## 3 Characterization of the Cognitive Environment
### Characterization of the Secondary User  
Our cognitive environment proposal is composed of a CRIoT network with several devices disseminated inside the coverage area of a GSM cell. Indeed, the use of a heterogeneous wireless sensor network (WSN) that links a wide range of intelligent sensors and actuators has become the cornerstone for IoT-based systems [41]. In the classical application, sensed data and/or human commands are collected and sent to the cloud or to the edge of the network where a dedicated service is running. In this latter scenario, the server usually stores data, somewhat processes it, and sends back some specific commands or sends back data flow to the actuators. Recently, architectural approaches that try to minimize the amount of transferred data in the Cloud-Edge-IoT continuum have been proposed; these approaches also permit the reduction of temporal and throughput requirements [42; 43]. During their normal operating, an IoT device uses a radio technology based on an ISM band (WiFi, for example). Due to the presence of others wireless networks in the same area using the same unlicensed band, the band can become overcrowded and, accordingly, a degradation of the quality of experience (QoE) can occur [18; 44; 45]. Moreover, the WiFi service can be interrupted due to, for example, AP trouble or the Internet connection going down. Once one of these conditions has been detected, the devices of the CRIoT network can decide to use the licensed GSM band as SUs. One of the possible topologies considers a star or mesh network in which the SU sink node is allocated in the GSM base transceiver station (BTS). Using this kind of topology, the SU sensor nodes can sense environmental variables or acquire human commands and opportunistically transmit them using the GSM band. Likewise, the cloud/edge service can reply with commands or have data flow to the SU actuators using the reverse path. The GSM operator, allocating the sink node in the BTS, can offer a free or a charge service that does not interfere with the primary GSM service. Privates can exploit this service by installing SU nodes in the cell coverage area, which operate according to the cognitive access rules. In our approach, each SU must be able to synchronize itself with the GSM frame structure. Thanks to this synchronization, it is possible to detect the boundaries of each single time slot. Once the SU is synchronized, it can run a spectrum sensing algorithm [19; 46; 47; 48] when a new slot starts. Accordingly, it is possible to detect if the channel will be busy in the current time slot due to the transmission of a PU. If the channel is detected to be vacant and the SU has something to be transmitted, it can access the channel and perform the transmission until the end of the current time slot; otherwise, it needs to wait until the beginning of the subsequent time slot. The SU sensing algorithm can slip into two different kinds of errors: (1) the channel is detected as free, but a PU is actually using it; (2) the channel is detected as busy, but nobody is using it. The first error is the worst because SUs can destroy PUs' information. Therefore, it is important to reduce this error to the minimum. However, when this kind of error occurs, the SU's IU will be destroyed as well. Here, we assume that the SU application protocol is able to detect such a situation and retransmits the collided IUs. The second error  
Figure 3: Examples of time slot allocations in different transceivers; time slots used for control signaling are not included in the examples. implies a non-efficient use by the SUs with respect to the band left free by the PUs. When more than one SU in the same coverage area detects the channel that is free in the same time slot, they will access the channel at the same time, and the transmissions will be destroyed due to collision.