Intelligent Systems II · M2 · papers
Q2(a) Fuzzy fire-hazard system [10]
Re-examination · 31 Jan 2026
Longer past-paper practice restricted to Fuzzy, GA and PSO.
A building safety department wants a fuzzy logic system to predict fire hazards. Inputs are Temperature (1–100°C) and Smoke Level (1–100). The output Fire Risk (1–100) has labels Low, Moderate and High. Define triangular membership functions, construct at least nine rules, explain Mamdani inference and defuzzify for Temperature=65°C and Smoke=80. [10 marks]
Answer
Given
| Variable | Crisp value |
|---|---|
| Temperature | 65 |
| Smoke Level | 80 |
The question asks us to design the membership functions. This solution chooses Low=Tri(1,25,50), Medium=Tri(25,50,75), High=Tri(50,75,100) for both inputs. Output labels use the same triangles in their respective order. These are explicit design choices, not additional printed givens.
To find
A complete stated design and its continuous Mamdani centroid.
Formula and why it applies
Use min for AND and implication, max for aggregation and the true area centroid of the resulting shape. A peak-only weighted average is a different defuzzifier.
z^*=\frac{\int z\mu_{out}(z)\,dz}{\int\mu_{out}(z)\,dz}Solution
Step 1. Specify the membership functions
| Input / output position | Triangle | Peak |
|---|---|---|
| Low / Low | (1,25,50) | 25 |
| Medium / Moderate | (25,50,75) | 50 |
| High / High | (50,75,100) | 75 |
Use 0 outside each triangle, the rising fraction before the peak and the falling fraction after it. This design is evaluated at the requested input; a deployed controller would also need coverage/fallback at all boundary values.
Step 2. Write all nine rules
| Temperature / Smoke Level | Low | Medium | High |
|---|---|---|---|
| Low | Low | Low | Moderate |
| Medium | Low | Moderate | High |
| High | Moderate | High | High |
Read each cell as an IF–AND–THEN rule. For example, the centre cell combines Medium with Medium.
Step 3. Fuzzify Temperature = 65
\mu_{Low}(65)=0\mu_{Medium}(65)=\frac{75-65}{75-50}=0.4\mu_{High}(65)=\frac{65-50}{75-50}=0.6Step 4. Fuzzify Smoke Level = 80
\mu_{Low}(80)=0\mu_{Medium}(80)=0\mu_{High}(80)=\frac{100-80}{100-75}=0.8Step 5. Evaluate all rules and aggregate matching consequents
| Temperature | Smoke Level | Firing strength | Consequent |
|---|---|---|---|
| Low | Low | min(0,0) = 0 | Low |
| Low | Medium | min(0,0) = 0 | Low |
| Low | High | min(0,0.8) = 0 | Moderate |
| Medium | Low | min(0.4,0) = 0 | Low |
| Medium | Medium | min(0.4,0) = 0 | Moderate |
| Medium | High | min(0.4,0.8) = 0.4 | High |
| High | Low | min(0.6,0) = 0 | Moderate |
| High | Medium | min(0.6,0) = 0 | High |
| High | High | min(0.6,0.8) = 0.6 | High |
Aggregated label strengths: Low = 0, Moderate = 0, High = 0.6.
\mu_{out}(z)=\max_r\min(\alpha_r,\mu_{C_r}(z))Step 6. Draw the aggregated output
Step 7. Calculate area and moment of each straight-line strip
For a strip from a to b with endpoint heights u and v, its trapezoid area is A. Its first moment M is the integral of z times the line height.
A=(b-a)(u+v)/2M=\frac{b-a}{6}\big[(2a+b)u+(a+2b)v\big]| a | b | u | v | Area A | Moment M |
|---|---|---|---|---|---|
| 50 | 65 | 0 | 0.6 | 4.5 | 270 |
| 65 | 85 | 0.6 | 0.6 | 12 | 900 |
| 85 | 100 | 0.6 | 0 | 4.5 | 405 |
Step 8. Divide total moment by total area
\sum A=21\sum M=1575z^*=\frac{1575}{21}\approx75Because the paper asks for a design, a different explicitly specified membership/rule system can yield a different numerical output. Explain the choices and use the chosen defuzzification method consistently; no particular examiner mark outcome is promised.
Why the clipped High shape is symmetric about 75
Only the High output survives, at height .6. Its triangle is (50,75,100). Solve its rising edge: (z−50)/25=.6, so z=50+15=65. Solve its falling edge: (100−z)/25=.6, so z=100−15=85.
| Piece | Area calculation | Centre | Moment |
|---|---|---|---|
| Left triangle [50,65] | ½×15×.6=4.5 | (50+65+65)/3=60 | 4.5×60=270 |
| Rectangle [65,85] | 20×.6=12 | (65+85)/2=75 | 12×75=900 |
| Right triangle [85,100] | ½×15×.6=4.5 | (85+85+100)/3=90 | 4.5×90=405 |
The horizontal centroid of a triangle is the average of the three vertex x-coordinates. Add areas: 4.5+12+4.5=21. Add moments:270+900+405=1575. Divide 1575/21=75, agreeing with symmetry.