Numerical Example: Fuzzy Logic Control Process
Given Inputs:
Distance to Obstacle (d) = 0.3 meters
Angle to Obstacle (θ_obs) = 0 radians
Step 1: Fuzzification
Fuzzification is the process of transforming crisp input values into fuzzy membership values. This
step converts the exact measurements of the distance and angle to obstacle into linguistic variables
using predefined membership functions (MFs).
1.1. Distance to Obstacle (d = 0.3 m)
The linguistic terms used for the distance are VeryClose, Close, and Far. These are represented
using triangular membership functions as follows:
VeryClose: Triangular [0, 0, 0.8]
Close: Triangular [0.2, 0.8, 1.4]
Far: Triangular [0.8, 1.4, 1.5]
Calculating membership degrees:
VeryClose:
𝜇VeryClose (0.3) =
Close:
𝜇Close (0.3) =
0.8 − 0.3
= 0.625
0.8 − 0
0.3 − 0.2
= 0.1667
0.8 − 0.2
Far:
𝜇Far (0.3) = 0
1.2. Angle to Obstacle (θ_obs = 0 rad)
The linguistic terms used for the angle are Front, Left, and Right, with triangular MFs:
Front: Triangular [0, 0, π/6]
Left: Triangular [0, 0, π/2]
Right: Triangular [π/2, π, π]
Calculating membership degrees:
Front:
𝜇Front (0) = 1(at peak)
Left:
𝜇Left (0) = 1(at peak)
Right:
𝜇Right (0) = 0
Step 2: Rule Evaluation
Fuzzy rule evaluation applies the fuzzy logic inference mechanism using a rule base. The selected
rules from the inference table (Table 3.5) are:
1. If VeryClose AND Front → High Avoidance Weight
Strength = min(0.625,1) = 0.625
1. If VeryClose AND Left → High Avoidance Weight
Strength = min(0.625,1) = 0.625
1. If Close AND Front → Medium Avoidance Weight
Strength = min(0.1667,1) = 0.1667
1. If Close AND Left → Medium Avoidance Weight
Strength = min(0.1667,1) = 0.1667
Step 3: Aggregation and Defuzzification
Aggregation combines the fuzzy outputs of all rules to derive a single fuzzy set. Here, the output
membership functions for the avoidance weight (α) are:
Low: Triangular [0, 0, 0.5]
Medium: Triangular [0, 0.5, 1]
High: Triangular [0.5, 1, 1]
Weighted Centroid Defuzzification is used to compute the crisp output:
𝛼=
∑(Area𝑖 ⋅ Centroid𝑖 )
∑Area𝑖
1. High Membership Contribution:
Area ≈ 0.2148, Centroid ≈ 0.816
2. Medium Membership Contribution:
Area ≈ 0.1528, Centroid ≈ 0.5
𝛼=
(0.2148 × 0.816) + (0.1528 × 0.5)
≈ 0.684
0.2148 + 0.1528
Conclusion
The resulting Avoidance Weight (α) ≈ 0.68 indicates a strong priority for obstacle avoidance,
corresponding to approximately 68% influence on avoidance behavior and 32% focus on trajectory
tracking. This comprehensive example showcases the application of fuzzy logic in real-time robotic
navigation.