
ST52F510/F513/F514
57/106
Figure 8.5 Example of valid Mbfs
8.6 Output Singleton
The Decision Processor uses a particular kind of
membership functioncalled Singleton for its output
variables. A Singleton doesn’t have a shape, like a
traditional Mbf, and is characterized by a single
point identified by the couple (X, w), where w is
calculated by the Inference Unit as described
earlier. Often, a Singleton is simply identified with
its Crisp Value X.
Figure 8.6 Output Membership Functions
8.7 Fuzzy Rules
Rules can have the following structures:
if A op B op C...........then Z
if (A op B) op (C op D op E...) ...........thenZ
where opis oneof the possible linguistic operators
(AND/OR)
In the first case the rule operators are managed
sequentially; in the second one, the priority of the
operator is fixed by the brackets.
Each rule is codifiedby using aninstruction set,the
inference time for a rule with 4 antecedents and 1
consequent is about 3 microseconds at 20 MHz.
The Assembler Instruction Set used to manage the
Fuzzy operations is reported in the table below.
1
i-th OUTPUT
0
X
ij
X
i0
X
in
ω
i0
ω
ij
ω
in
j-th Singleton
Table 8.1 Fuzzy Instructions Set
Instruction
Description
MBF
n_mbf Ivd v rvd
Stores the Mbf n_mbf with the shape identified by the parameters Ivd v and rvd
IS
n m
Fixes the alpha value of the input n with the Mbf m
ISNOT
n m
Calculates the complementary alpha value of the input n with the Mbf m.
FZAND
Implements the Fuzzy operation AND
FZOR
Implements the Fuzzy operation OR
CON
crisp
Multiplies the crisp value with the last
ω
weight
OUT
n_out
Performs Defuzzyfication and stores the currently Fuzzy output in the register
n_out
FUZZY
Starts the computation of a sigle fuzzy variable
( )
Modify the priority in the rule evaluation