# Performance of Fuzzy Inference System for Adaptive Resource Allocation in C-V2X Networks
## 3 Proposed FIS
### Fuzzy Inference System Approach  
To improve the performance of the matching table approach, we proposed an FIS for adaptive resource reallocation \(P_{rk}\) determination.  
First, we designed and established fuzzy rule bases and membership functions (MBFs) for the input and output variables. We created the membership functions of \(P_{rk}\) according to the number of total vehicles, \(n_{V}\) = 200 and 400 vehicles, separately. Figure 3 shows the FIS, which consists of two inputs and one output. We designed a Mamdani fuzzy inference to construct a control system by integrating a set of linguistic form rules obtained from the matching table simulations. A total of 20 fuzzy rules were established to adjust \(P_{rk}\) as the fuzzy output variable. For the fuzzy input variable, the vehicle distance (d) was chosen as the first fuzzy input variable and the CSI as the second fuzzy input variable.  
Figure 1: PDR performance comparison of matching table and fixed \(P_{rk}\) value for \(n_{V}\) = 200-vehicle scenario.  
Figure 2: PDR performance comparison of matching table and fixed \(P_{rk}\) value for \(n_{V}\) = 400-vehicle scenario.  
The Gaussian combination membership function was chosen to cover the entire universe of discourse of the first input distance (d). The first fuzzy input range was set to [3 150] meters. Four linguistic terms: Short (Sh), Medium Short (MSh), Medium Far (MF), and Far (F), were chosen to cover the universe of discourse of distance (d), as shown in Figure 4. The mean value for the Short (Sh) was set to [\(-\)5 25]' for Medium Short (MSh), to [45 65]; for Medium Far (MF), to [85 105]; and we set Far (F) to [125 155]. The given threshold value was chosen from the initial observations of the fixed \(P_{rk}\) simulations. We analyzed and designed the curve according to the highest PDR results from the fixed \(P_{rk}\) observations.  
The Gaussian membership function was chosen for the second fuzzy input and the fuzzy output, named CSI and \(P_{rk}\), respectively. The ranges for CSI and \(P_{rk}\) were set to [0 1] and [0.4 0.8], respectively. The five linguistic terms chosen to represent the universe of discourse for the CSI were: Very Weak (VW), Weak (W), Average (Av), Strong (St), and Very Strong (VSt), as shown in Figure 5. The mean values for the second fuzzy input CSI were as follows: Very Weak (VW) was set to [0], Weak (W) to [0.25], Average (Av) to [0.5], Strong (St) to [0.75], and Very Strong (VSt) was set to [1]. Again, the curve was designed based on the initial fixed Prk observations.  
Figure 4: Fuzzy membership function for the first input distance (d).  
Figure 3: Proposed FIS structure.  
As for the fuzzy output, five linguistic terms were also chosen to explain the universe of discourse for \(P_{rk}\): Very Low (VL), Low (L), Middle (Md), High (H), and Very High (VH), as shown in Figure 6. The fuzzy output range value [0.4 0.8] was chosen because the highest PDR performance from the initial observation only indicated the corresponding \(P_{rk}\) range. The mean values for the Very Low (VL), Low (L), Middle (Md), High (H), and Very High (VH) terms were set to: [0.4], [0.5], [0.6], [0.7] and [0.8], respectively.  
The Gaussian membership function is usually represented as Gaussian(xc,s), where c and s represent the mean and standard deviation, respectively. The membership function of fuzzy set \(A\), \(\mu_{A}\) can be expressed by  
\[\mu_{A}(x,c,s,m)=exp\left[-\frac{1}{2}\left|\frac{x-c}{s}\right|^{m}\right] \tag{1}\]  
Figure 5: Fuzzy membership function for the second input CSI.  
Figure 6: Fuzzy membership function for output \(P_{rk}\).  
where \(c\) represents the center, \(s\) represents the width, and \(m\) represents the fuzzification factor.  
The fuzzy control rule follows IF-THEN rules with two inputs and one output and can be expressed by [30]  
\[\begin{array}{ll}R_{j}\ :&IF\ distance(d)\ is\ F_{1}^{l_{1}}\ AND\ CSI\ is\ F_{2}^{l_{2}}\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \