home *** CD-ROM | disk | FTP | other *** search
-
- This is the documentation for Sample file EXAMPLE1.
-
- Essentially, EXAMPLE1 is used to show the "temperature input from
- 0 to 100 degrees C" graph, the use of colour to denote membership
- functions, and to show the rudiments of Fuzzy Logic as implemented
- by FuzzGen.
-
- The low end of the graph is shown in RED and represents a
- trapezoidal decision shape; it is named LOW.
- The middle ground in VIOLET shows a classic triangular shape. It
- is named MEDIUM.
- The high end in BLUE shows another trapezoidal shape, and we
- named it HIGH.
-
- The Rule set we chose uses the input variable TEMPIN to trigger
- output variable OUTSTATE. The code generated by FuzzGen is
- designed to look at an input data point (i.e. TEMPIN) and determine
- not only what set contains the highest membership percentage but also
- to assign an output state based on this.
-
- Rules use plain english syntax:
-
- IF...THEN...IS
- OR --------- Logical
- AND "
- NOT "
-
- For instance, Rule 1 looks to see if the output state (OUTSTATE)
- is set to 1, which is the set assigned to LOW. OUTSTATE has a
- number of ordinal pseudo-variables assigned to it as follows:
-
- 1 = HIGH HEAT
- 2 = NO_CHANGE
- 3 = LOW_COOL
-
- Construction of simple rules look like this:
-
- RULE 1: IF TEMPIN IS LOW THEN OUTSTATE IS HIGH_HEAT
-
- Which means --
-
- If the input data (TEMPIN) is a member of the LOW set (denoted
- by RED) then the output state is HIGH_HEAT. Essentially, this is
- the sort of logic you'd expect to see in a temperature controller,
- but it serves to illustrate how Fuzzy Logic works.
-
- You'll note that FuzzGen has generated all the code you need except
- for implementation of the RULE set. However, this isn't overly hard
- to do:
-
- in C:
-
- #define HIGH_HEAT 1
- #define NO_CHANGE 2
- #define LOW_COOL 3
-
- If(InputTest(data_that_got_input) == 1)
- Trigger_Temp_Controller(HIGH_HEAT);
-
- This code fragment uses the generated code as an extension of
- Fuzzy Rule #1 and applies it to some function called
- "Trigger_Temp_Controller."
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-