Fuzzy
Programming Language


[Togai Name]

The World's Source For Fuzzy Logic Solutions




The Fuzzy Programming Language (FPL) was developed by Togai InfraLogic (TIL) specifically for the implementation of fuzzy logic systems. Consisting of fifteen different objects, FPL provides ease and flexibility in defining fuzzy systems.

TILShell accelerates the fuzzy system design process by allowing you to define and manipulate the objects of FPL graphically rather than as text. The debugging and tuning tools of TILShell interact directly with the FPL file which allows the fuzzy system to be thoroughly tested before turning it into an executable form, thus saving considerable time and effort in the development process.

FPL utilizes a hierarchical object structure as shown in the figure below. Specific rules apply to where certain objects can be defined. For example, Rule objects can only be defined in Rulebase objects while Rulebase objects can only be defined in Project or Package objects (see also the FPL Example below).

Click on any of the objects in the diagram below for an explanation of the object.



The hierarchical object structure of FPL


FPL Example

TILShell saves the FPL code it generates in a DOS text file that can be edited within TILShell or externally with ordinary text editors or word processors if desired.

The example below shows the syntax of a typical FPL file.

 

PROJECT Pend

    VAR Error
        TYPE float
        MIN -1
        MAX 1

        MEMBER N
            POINTS -1,1 -0.5,1 0,0 
        END

        MEMBER Z
            POINTS -0.5,0 0,1 0.5,0 
        END

        MEMBER P
            POINTS 0,0 0.5,1 1,1 
        END
    END

    VAR dError
        TYPE float
        MIN -1
        MAX 1

        MEMBER N
            POINTS -1,1 -0.5,1 0,0 
        END

        MEMBER Z
            POINTS -0.5,0 0,1 0.5,0 
        END

        MEMBER P
            POINTS 0,0 0.5,1 1,1 
        END
    END

    VAR Current
        TYPE float
        MIN -1.5
        MAX 1.5
        DEFAULT 0

        MEMBER Z
            POINTS -0.55,0 0,1 0.55,0 
        END

        MEMBER NB
            POINTS -1.5,0 -1.1,1 -0.55,0 
        END

        MEMBER PB
            POINTS 0.55,0 1.1,1 1.5,0 
        END

        MEMBER PS
            POINTS 0.25,0 0.8,1 1.3,0 
        END

        MEMBER NS
            POINTS -1.3,0 -0.8,1 -0.25,0 
        END
    END

    RULEBASE Pendulum

        RULE Rule1
            IF (Error IS N) AND (dError IS Z) THEN
                Current = PB
        END

        RULE Rule2
            IF (Error IS N) AND (dError IS P) THEN
                Current = PS
        END

        RULE Rule3
            IF (Error IS Z) AND (dError IS P) THEN
                Current = NS
        END

        RULE Rule4
            IF (Error IS Z) AND (dError IS Z) THEN
                Current = Z
        END

        RULE Rule5
            IF (Error IS Z) AND (dError IS N) THEN
                Current = PS
        END

        RULE Rule6
            IF (Error IS P) AND (dError IS N) THEN
                Current = NS
        END

        RULE Rule7
            IF (Error IS P) AND (dError IS Z) THEN
                Current = NB
        END

        RULE Rule8
            IF (Error IS P) AND (dError IS P) THEN
                Current = NB
        END

        RULE Rule9
            IF (Error IS N) AND (dError IS N) THEN
                Current = PB
        END
    END

    CONNECT
        FROM Error
        TO Pendulum
    END

    CONNECT
        FROM dError
        TO Pendulum
    END

    CONNECT
        FROM Pendulum
        TO Current
    END
END





| TIL Home Page | Main TILShell Page | TIL Shell Editors | FPL Objects | Top of This Page |

This site is http://www.ortech-engr.com/fuzzy/fpl.html.
Send inquiries, comments, or suggestions to webmaster@ortech-engr.com.
Page Stats: Visitors -- Last Modified on: -- Thanks for visiting from: .