Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligencealgorithmInteractive simulation

Fuzzy Inference System

Turns fuzzy rules into a single crisp output such as a fan speed.

The idea

A Mamdani-style FIS fuzzifies inputs, evaluates every rule to see how strongly it fires, clips each rule's output set to that strength, merges them, and finally defuzzifies (for example by taking the centroid) to get one number to act on.

output = ∫ x·μ(x) dx / ∫ μ(x) dx

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

temperature °C040fan speed %0100
  • cold / slow
  • warm / medium
  • hot / fast

Goal: choose a fan speed from the temperature using human-style rules: IF cold THEN slow, IF warm THEN medium, IF hot THEN fast.

1/5

A Mamdani fuzzy controller: fuzzify → apply rules → combine → defuzzify. Move the slider and watch the speed glide.

Step by step

  1. 1Fuzzify the crisp inputs.
  2. 2Evaluate each IF-THEN rule to get its firing strength.
  3. 3Clip each rule's output set at that strength.
  4. 4Combine the clipped sets into one shape.
  5. 5Defuzzify (centroid) to a single number.

Where it is used

Industrial controllers, appliances, driver-assist systems.

Watch out for

The rule base grows quickly with the number of inputs.

Related