22
Motivation The VHDL framework Results Conclusions and future work VHDL framework for modeling fuzzy automata Doru Todinca Daniel Butoianu Department of Computers Politehnica University of Timisoara SYNASC 2012 Todinca, Butoianu VHDL framework for modeling fuzzy automata

VHDL framework for modeling fuzzy automatastaff.cs.upt.ro/~todinca/VHDL_framework.pdf · A fuzzy automaton is a VHDL entity that can be simulated FA’s inputs can be given as signals

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

MotivationThe VHDL framework

ResultsConclusions and future work

VHDL framework for modeling fuzzy automata

Doru Todinca Daniel Butoianu

Department of Computers

Politehnica University of Timisoara

SYNASC 2012

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Outline

1 MotivationWhy fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

2 The VHDL frameworkFuzzy sets and fuzzy automataVHDL implementation of FA

3 Results

4 Conclusions and future work

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Why fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

Why fuzzy automata ?

Most engineering applications of fuzzy logic are based onfuzzy inference (fuzzy if-then rules)

A hardware device that implements fuzzy inference is calledfuzzy logic controller (FLC)

No matter how complex its implementation is, a FLC’soutputs depend only on its inputs, no state is considered

However, many applications demand the existence of states ⇒necessity to use fuzzy automata

Fuzzy automata are fuzzy extension of ‘classic’, or crispautomata

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Why fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

Crisp versus fuzzy automata

Crisp automata are used

1 for formal languages2 for hardware applications, in almost any device from everyday

life

Fuzzy automata are linked to fuzzy languages, that havepractical applications (text error correction, patternrecognition, etc)

but there are extremely few applications of FA not related tofuzzy languages

The question is: why FA are not as spread as classic

automata?

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Why fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

The problems encountered by fuzzy automata

1 There are too many types of FA:

fuzzy operators (union, intersection, composition, etc) extendclassic operatorseach classic operator can be extended in several ways ⇒too many operators ⇒ it is confusing for practitionersThis problem appears also in other domains of fuzzy logic, e.g.for fuzzy inferencebut in older domains, several operators or methods haveimposed over the others: e.g. Mamdani inference, center ofgravity defuzzification are more used than other similarmethods.

2 The lack of controllability of FA: in certain conditions a FAcannot be moved from a certain state.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Why fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

Framework for modeling fuzzy automata

We propose a tool that can investigate the behaviour ofdifferent types of FA

The tool will be used for:

investigating the behaviour of different operators used for FAfinding operators that lead to more controllable FAinvestigating the efficiency of different techniques used formaking FA more controllable (e.g. conservation of state, statenormalization);

The tool should be very flexible in order to accommodate FAof different types, with different sizes, and using differentoperators or methods to improve controllability.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Why fuzzy automata ?Why a framework for modeling FA ?Why VHDL ?

Why VHDL ?

VHDL stands for Very High Speed Integrated CircuitsHardware Description Language

Being a hardware description language, VHDL can be used for:

modeling and simulationautomatic synthesis (e.g. on a FPGA)evaluating the hardware characteristics of the circuit:input-output delay, clock rate, number of gates, occupiedsurface, etc.

VHDL is also a high-level programming language, which canwork at different abstraction levels ⇒ flexibility.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

Fuzzy sets

Given an universe of discourse X (a crisp set), a fuzzy setA ⊂ X is the set of ordered pairs

A = {(x , µA(x))|x ∈ X}

where µA(x) : X → [0, 1] is called membership function or

degree of membership.

With fuzzy sets can be defined operations of:

intersection: the minimum between their membership functionsunion: the maximum between their membership functionscomplement: the set having the membership function1− µA(x)

The minimum and maximum operations have been extendedby t-norms and s-norms

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

Crisp automata

Automata in general are computational systems having

inputs, states, outputsa function that computes the transition from the current stateto the next state (transition function)a function that computes the outputsan initial state.

Automata may have also final states.

The classic automata can be deterministic, non-deterministicand probabilistic.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

Fuzzy automata

FA are extensions of classic automata in the sense that thestates, the inputs, and/or the transition functions can befuzzy.

There are different classifications of FA

In Chen’s classification

the inputs and the states can be either crisp or fuzzythe time can be also crisp or fuzzythe time can be discrete (synchronous FA) or continuous(asynchronous FA)

Here we study only discrete synchronous fuzzy automata,

but we plan to extend our framework in order to include othertypes of FA.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

Transition matrix

In this work the inputs, states and outputs of the FA are fuzzysets in the universes U, X and Y .

For every input uj a transition matrix M(uj) is defined:

M(uj) =

µx(x1t+1|x

1t , u

j) . . . µx(xmt+1|x

1t , u

j )...

. . ....

µx(x1t+1|x

mt , uj) . . . µx(x

mt+1|x

mt , uj )

Here µx(xit+1|x

kt , u

j) is the degree of transition from state xktto state x it+1 when the input uj is applied (at the moment t)

all µx are fuzzy values (in the interval [0, 1])

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

Conservation of state

In the computation of the next state are taken into accountnot only the degree of membership of each input, but also thedegrees of membership of the negated inputs.

The formula for next state will be:

µx(xt+1) =∑

x i

uj

[µx(xt)× µu(ut)× µx(xt+1|xt , ut)

+µx(xt)× µu(ut)× µx(xt+1|xt , ut)]∑

and + denote algebraic sum, × represents algebraicproduct, and µu(ut) is the complement of input u (at step t).

The sums are for all states x i and all inputs uj .

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

VHDL implementation of FA

We use a hierarchical system of VHDL packages:

Constants: number of inputs, number of states, number ofoutputsTypes: a fuzzy value type (fv) and arrays of fv for inputs,states, etcFunctions:

parametrized functions for computing fuzzy transitionmatrices with or without conservation of statealgebraic product and sum from previous formulae aregeneralized by functions F1 (membership assignmentfunction) and F2 (multi-membership resolution)a state normalization function.

The transition matrix defining a FA and the initial state areread from a text file

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Fuzzy sets and fuzzy automataVHDL implementation of FA

VHDL implementation of FA (cont’d)

A fuzzy automaton is a VHDL entity that can be simulated

FA’s inputs can be given as signals or read from a text file

FA’s states, inputs and outputs can be visualized as signalsand/or dumped in files.

The FA can be parametrized: which operators to use, whatmethods for improving controllability to use, the names ofinput and output files, etc.

Several FA can be simulated in parallel.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Investigations performed with our framework

We aimed to study the following problems:1 the efficiency of different operations (t-norms and s-norms)

used for FA2 the effectiveness of some methods proposed in literature in

order to overcome the lack of controllability of FA:

1 conservation of state2 normalization of state

We implemented several examples of fuzzy automata fromliterature and tested them using our framework

We used different patterns for the FA’s inputs

Next we present some results for a FA with 2 inputs and 4states.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Example of controllable behaviour

��

��

��

��

���

���

� � � �� �� �� � � �� �� �� � � �� �� �� �

���

���

�����

�����

�����

�����

Figure : Algebraic FA with equal inputs and without conservation of state

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Example of non-controllable FA behaviour

��

��

��

��

���

���

� � � � � �� �� �� �� �� �� �� �� �� �� �� �� �� ��

���

���

������

������

������

������

Figure : Max-product FA with equal inputs and without conservation ofstate

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Simulation results without improvement methods

From the four pairs of s- and t-norms used for the functionsF2 and F1, only the algebraic FA proved to be controllable

For the max-min FA, the degree of membership of its statestook the smallest value of the degree of membership of itsinputs and after that their values could not be increased

For the bounded and drastic FA, the degrees of membershipof all their states went to zero and remained zero after that

In consequence we decided to try to use different s-norms forfunction F2, but only algebraic product for F1

the max-product automaton has an uncontrollable behaviour(see figure).The automata with bounded sum used for F2 and the FA withEinstein sum for F2 behave similarly with algebraic automaton.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

FA with conservation of state

For the max-prod FA, the degrees of membership of the statesgo to zero and remain zero

The method did not improved the behaviour of FA with otherpairs of s- and t-norms.

The method worsens the behaviour of algebraic FA: thedegrees of membership of their states remain very high,mostly between 0.8 and 1.0

this can be explained by the contribution given by the negatedvalues of the degrees of the inputs: when the degree of aninput is low, its negation (i.e 1− degree) is high, and theconsequence is that the degrees of states remain high.

The method was not efficient in our simulations.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

FA with state normalization

It means to determine the maximum value among the degreeof membership of all states and to divide all the degrees ofmembership of the states to that maximum

The method implies division operations, which are costly inhardware

We tested it only for max-product automaton

In our examples the method is inefficient: the degree ofmembership become high (close to 1) and cannot be reducedafter that.

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Conclusions

We have implemented a flexible and efficient VHDLframework for the study of fuzzy automata

The framework permits to test the efficiency of differentfunctions used for state transitions of FA

Our simulations show that the maximum and minimumfunctions (the most used in the literature) do not allow thestate of the automata to be controlled by its inputsThe algebraic sum and product, the bounded sum andalgebraic product, and the combination of Einstein sum andalgebraic product proved to be efficient

We implemented two methods proposed in the literature inorder to improve FA’s behaviour: conservation of state andstate normalization

Both methods gave bad results, which is a new result

Todinca, Butoianu VHDL framework for modeling fuzzy automata

MotivationThe VHDL framework

ResultsConclusions and future work

Future work

To perform simulations and performance studies on otherexamples of FA

To include in our framework other types of FA

To perform FPGA implementation (i.e. synthesis) of severaltypes of FA

To find some interesting applications for FA.

Todinca, Butoianu VHDL framework for modeling fuzzy automata