Ricardo Belchior
Ricardo Belchior

Reputation: 576

Fuzzy logic operators

I am implementing a fuzzy-logic system with the following rules.

inputs:

rules:

Now, if the input of the system activates these rules (ex: temperature=9 and humidity=2), I will get an output similar to:

             -                  -
            - -                - -
           -   -              -   -
          -     -            -     -
         -----------------------------
Danger:   low       medium    high

The COG will give me an output value within the medium range.

My problem is, we know (just by looking at the plot) the danger is high and I don't want to "attenuate" the output value because of the low danger "triangle".

Should I use other deffuzification method? or other activation/accumulation method? I think I might get what I want using weights for each rules, but is this the best way of doing it?

Upvotes: 0

Views: 403

Answers (2)

Ernie Mur
Ernie Mur

Reputation: 571

From the original question it seems, that a normal humidity (or one of them allone) is a weak indicator for low danger. In that case I would make these rules:

IF temperature IS normal AND humidity IS normal THEN danger IS low

IF temperature IS high AND humidity IS high THEN danger IS high

However, it can happen, that one of the sensors is neither normal nor high because it is defective. The AND above eventually would not activate any of the two rules. Therefore, I always make additional rules:

IF temperature IS high THEN danger IS high WITH 0.5

IF humidity IS high THEN danger IS high WITH 0.5

(you can also combine both with or)

false indication of danger is maybe not so dangerous as false indication of no danger, therefore:

IF humidity IS normal or temperature IS normal THEN danger IS low WITH 0.1

Upvotes: 0

rxmxn
rxmxn

Reputation: 499

Why if you have 2 inputs you are making the rules separated. What I recommend is that you make rules to avoid ambiguity problems like "IF temperature IS normal AND humidity IS normal THEN danger IS low".

Upvotes: 1

Related Questions