# Performance of Fuzzy Inference System for Adaptive Resource Allocation in C-V2X Networks
## 2 C-V2X Mode 4
### Sensing-Based Semi-Persistent Scheduling  
When operating in C-V2X Mode 4, cars make their own decisions on the resources they need without the aid of the cellular infrastructure. They make use of the sensing-based SPS scheduling method that was provided in Release 14 [28; 29]. A vehicle holds the specified resource(s) for an undetermined amount of packets in a row before releasing them. This figure is dependent on either the time between packet transmissions or the number of packets that are transferred every second (\(\lambda\)). This random number is chosen between the ranges of 5 and 15, 10 and 30, and 25 and 75, when \(\lambda\) = 10 Hz, 20 Hz, and 50 Hz, respectively. When a vehicle needs to reserve additional resources, it picks a Reallocation Counter at random from its inventory. The Reallocation Counter is decreased by one after the completion of each transmission. When it reaches a value of zero, new resources have to be chosen and reserved with a chance of 1 over \(P_{rk}\), with \(P_{rk}\) ranging from 0 to 0.8. In its SCI, each vehicle has both the value of its Reallocation Counter as well as the packet transmission interval that it uses. When making their reservation, vehicles make use of this information to estimate which resources are free so as to limit the likelihood of packet collisions. The act of reserving resources may be broken down into the following three stages for easier organization:  
Step 1 is the stage for a vehicle (\(v_{t}\)) to reserve new resources inside an allocation window whenever it has to transmit a new packet, and the reallocation counter is at zero. The Allocation Frame is the temporal window that exists between the point in time at which the packet was created (\(t_{b}\)) and the maximum delay that was set. The highest delay for \(\lambda\) = 10 Hz is 100 milliseconds, for \(\lambda\) = 20 Hz is 50 milliseconds, and for \(\lambda\) = 50 Hz is 20 milliseconds [28]. The vehicle identifies the resources that it has the capacity to reserve while in the Allocation Frame. A resource is defined as a set of contiguous subchannels that are included inside the same subframe and provide sufficient space for the packet (SCI + TB) that is to be broadcast. Step 2 is the stage for the vehicle (\(v_{t}\)) to construct a list of all the available resources (\(L_{A}\)) that it may reserve. All of the resources that were found in Step 1 are included in this list, with the exception of those that fulfill one of the two following requirements:  
1. \(v_{t}\) has received an SCI from another vehicle during the last 1000 subframes, which indicates that it will use this resource in either the Allocation Frame or any of its subsequent Reallocation Counter packets. This information was obtained within the previous 1000 subframes. 2. \(v_{t}\) indicates whether or not the value of the Reference Signal Received Power (RSRP) of a resource is greater than a predetermined threshold. Suppose vehicle (\(v_{t}\)) is transmitting during any prior subframe (\(f_{j}\)), where \(j=i-100\cdot k\) and \(k\in N,1\leq k\leq 10\) for \(\lambda\) = 10 Hz, then vehicle (\(v_{t}\)) excludes all of the resources of subframe (\(f_{j}\)) in the Allocation Frame. This occurs if vehicle (\(v_{t}\)) is operating at 10 Hz. Following the completion of Step 2, \(L_{A}\) must include at least 20% of all the resources that were found in the Allocation Frame during Step 1. In the event that the 20% limit is not achieved, Step 2 is repeated until it reaches 20%. The RSRP threshold is raised by three decibels at the end of each repetition. In Step 3, \(v_{t}\) compiles a list of candidate resources \(L_{C}\), which contain those resources in \(L_{A}\) with the lowest average Received Signal Strength Indicator (RSSI). The size of the \(L_{C}\) has to be equivalent to twenty percent of all of the resources that were found in the Allocation Frame during Step 1. The value of RSSI is then averaged across all of the preceding \(t_{R}-100\cdot j\) subframes (\(j\in N,1\leq j\leq 10\)) when \(\lambda\) is set to 10 Hz.