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

VariableCrisp value
Temperature65
Smoke Level80

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}LaTeX: z^*=\frac{\int z\mu_{out}(z)\,dz}{\int\mu_{out}(z)\,dz}

Solution

Step 1. Specify the membership functions
Input / output positionTrianglePeak
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 LevelLowMediumHigh
LowLowLowModerate
MediumLowModerateHigh
HighModerateHighHigh

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)=0LaTeX: \mu_{Low}(65)=0
\mu_{Medium}(65)=\frac{75-65}{75-50}=0.4LaTeX: \mu_{Medium}(65)=\frac{75-65}{75-50}=0.4
\mu_{High}(65)=\frac{65-50}{75-50}=0.6LaTeX: \mu_{High}(65)=\frac{65-50}{75-50}=0.6
Step 4. Fuzzify Smoke Level = 80
\mu_{Low}(80)=0LaTeX: \mu_{Low}(80)=0
\mu_{Medium}(80)=0LaTeX: \mu_{Medium}(80)=0
\mu_{High}(80)=\frac{100-80}{100-75}=0.8LaTeX: \mu_{High}(80)=\frac{100-80}{100-75}=0.8
Step 5. Evaluate all rules and aggregate matching consequents
TemperatureSmoke LevelFiring strengthConsequent
LowLowmin(0,0) = 0Low
LowMediummin(0,0) = 0Low
LowHighmin(0,0.8) = 0Moderate
MediumLowmin(0.4,0) = 0Low
MediumMediummin(0.4,0) = 0Moderate
MediumHighmin(0.4,0.8) = 0.4High
HighLowmin(0.6,0) = 0Moderate
HighMediummin(0.6,0) = 0High
HighHighmin(0.6,0.8) = 0.6High

Aggregated label strengths: Low = 0, Moderate = 0, High = 0.6.

\mu_{out}(z)=\max_r\min(\alpha_r,\mu_{C_r}(z))LaTeX: \mu_{out}(z)=\max_r\min(\alpha_r,\mu_{C_r}(z))
Step 6. Draw the aggregated output
Swipe across the diagram to read its labels ↔
The shaded upper envelope counts any overlap only once.
Diagram: The shaded upper envelope counts any overlap only once.. Labels: Chosen triangular output sets and their max-aggregate | 0 | 0.5 | 1 | 1 | 25 | 50 | 75 | 100 | μ | Output score | Low | Moderate | High | centroid ≈ 75
The shaded upper envelope counts any overlap only once.
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)/2LaTeX: A=(b-a)(u+v)/2
M=\frac{b-a}{6}\big[(2a+b)u+(a+2b)v\big]LaTeX: M=\frac{b-a}{6}\big[(2a+b)u+(a+2b)v\big]
abuvArea AMoment M
506500.64.5270
65850.60.612900
851000.604.5405
Step 8. Divide total moment by total area
\sum A=21LaTeX: \sum A=21
\sum M=1575LaTeX: \sum M=1575
z^*=\frac{1575}{21}\approx75LaTeX: z^*=\frac{1575}{21}\approx75
Final answer. For these stated triangles and rules, the centroid is 75. This is in the high-risk region of this illustrative fuzzy design.

Because 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.

PieceArea calculationCentreMoment
Left triangle [50,65]½×15×.6=4.5(50+65+65)/3=604.5×60=270
Rectangle [65,85]20×.6=12(65+85)/2=7512×75=900
Right triangle [85,100]½×15×.6=4.5(85+85+100)/3=904.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.