Top Banner
Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon 97207, Tel. 503-725-5411, Fax (503) 725-4882, USA FUZZY LOGIC IN FUZZY LOGIC IN ROBOTICS ROBOTICS
58

Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Efficient Decomposition of Large Fuzzy Functions and Relations

Marek Perkowski

+ Portland State University, Dept. Electrical Engineering, Portland, Oregon 97207, Tel. 503-725-5411, Fax (503) 725-

4882, USA

FUZZY LOGIC IN FUZZY LOGIC IN ROBOTICSROBOTICS

Page 2: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Minimization of Fuzzy Functions• Fuzzy functions are realized in:

– analog hardware– software

• Why to minimize fuzzy logic functions?– Smaller area– Lower Power– Simpler and faster program

Page 3: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Minimization Approaches to Fuzzy Functions

• Two level minimization (Siy,Kandel, Mukaidono, Lee, Rovatti et al)

• Algebraic factorization (Wielgus)• Genetic algorithms (Thrift, Bonarini, many authors)• Fuzzy decision diagrams (Moraga, Perkowski)• Functional decomposition (Kandel, Kandel and

Francioni)

Page 4: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Graphical Representations

• Fuzzy Maps

• Lattice of two variables

• The Subsumption rule

• Kandel’s Form to Decompose Fuzzy Functions

Page 5: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

IdentitiesThe identities for fuzzy algebra are:

Idempotency: X + X = X, X * X = X

Commutativity: X + Y = Y + X, X * Y = Y * X

Associativity: (X + Y) + Z = X + (Y + Z),

(X * Y) * Z = X * (Y* Z)

Absorption: X + (X * Y) = X, X * (X + Y) = X

Distributivity: X + (Y * Z) = (X + Y) * (X + Z),

X * (Y + Z) = (X * Y) + (X * Z)

Complement: X’’ = X

DeMorgan's Laws: (X + Y)’ = X’ * Y’, (X * Y)’ = X’ + Y’

Page 6: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

TransformationsSome transformations of fuzzy sets with examples

follow:x’b + xb = (x + x’)b bxb + xx’b = xb(1 + x’) = xbx’b + xx’b = x’b(1 + x) = x’ba + xa = a(1 + x) = aa + x’a = a(1 + x’) = aa + xx’a = aa + 0 = ax + 0 = xx * 0 = 0x + 1 = 1x * 1 = x Examples:Examples:a + xa + x’b + xx’b = a(1 + x) + x’b(1 + x) = a + x’b a + xa + x’a + xx’a = a(1 + x + x’ + xx’) = a

Page 7: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Differences Between Boolean Logic and Fuzzy Logic

Boolean logic the value of a variable and its inverse are always disjoint (X * X’ = 0) and (X + X’ = 1) because the values are either zero or one.

Fuzzy logic membership functions can be either disjoint or non-disjoint.

Example of a fuzzy non-linear and linear membership function X is shown (a) with its inverse membership function shown in (b).

Page 8: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Fuzzy Intersection and Union• From the membership

functions shown in the top in (a), and complement X’ (b) the intersection of fuzzy variable X and its complement X’ is shown bottom in (a).

• From the membership functions shown in the top in (a), and complement X’ (b) the union of fuzzy variable X and its complement X’ is shown bottom in (b).

Page 9: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Fuzzy map may be regarded as an extension of the Veitch diagram, which forms also the basis for the Karnauph map.

The functions shown in (a) and (b) are equivalent to f(x1, x2) = x’1 x2+ x1

x’1 x’2 = x1 x’1

Fuzzy MapsFuzzy Maps

(b) f(x1, x2) = x1 x’1(a) f(x1, x2) =x1 x’1 x2+ x1 x’1 x’2

Page 10: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Lattice of Two Variables• Shows the

relationship of all the possible terms.

• Shows which two terms can be reduced to a single term.

Page 11: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

xxi i x’x’I I ++ ’ x’ xi i x’x’I I = x = xi i x’x’I I

The The Subsumption Subsumption

RuleRule

Used to reduce a fuzzy logic function.

Operations on two variable map are shown with I subsuming i.

Page 12: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Form Needed to Decompose Fuzzy Functions

Form requirements:

1. Sum-of-products2. Canonical

Figures show the function x2 x’2 + x’1 x2 + x1 x’2 + x1 x’1 x’2

before using the subsuming rules in (a) and after in (d) x’1 x2 + x1 x’2 .

x1

Page 13: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

x2 x’2 + x’1 x2 + xx1 1 x’x’2 2 ++ xx1 1 x’x’1 1 x’x’22

= x2 x’2 + x’1 x2 + xx1 1 x’x’22 (1+ x’1) = x2 x’2 + x’1 x2 + xx1 1 x’x’22

= x’1 x2 + xx1 1 x’x’22 .

xxi i x’x’I I ++ ’ x’ xi i x’x’I I = x = xi i x’x’I I subsumption

Let us use subsumption to verify:

Page 14: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Kandel's and Kandel's and Francioni's Approach Francioni's Approach

• Decomposition Implicant Pattern (DIP)

• Variable Matching DIP’s Table

• S-Maps

• Example using Kandel and Francioni approach

Page 15: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition Implicant Pattern (DIP)

Page 16: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Variable Matching DIPs Table

h(X) h’(X) DIP

xi

xixj

x’ix’j

x’ixj

xix’j

xixj + x’ix’j

x’i

x’i x’j

xi xj

xi + x’j

x’i + xj

xix’j + x’i xj

-

1

2

3

4

5

Tabular form of Decomposition Implicant Pattern (DIP) used in Kandel’s and Francioni’s approach

Page 17: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

S-Maps

• Arrange two-variable fuzzy maps for n variables.• This method is just done by iteration to form an n variable

S-map.• This shows X1 is made up of repeated X2 and X3 two

variable maps.

Page 18: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Example using Kandel and Francioni approach

f = x’y’zz’ + xz + w’x’zz’ + wyz

From DIP 1 implies:g(w,y) =wy, G’ (w,y) = w’ + y’f = (wy)z + (w’ + y’) x’zz’ + xz

By substituting: G(w,y) = G(Y) and G’(w,y) = G’(Y)

f = F[(G(w,y), x,z)] = G(Y)z + G’(Y) x’zz’ + xz

Page 19: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

APPROACHES TO FUZZY LOGIC DECOMPOSITION

• Kandel's and Francioni's Approach based on graphical representations:– non-algorithmic– not scalable to larger functions– no software

Fuzzy to Multiple-valued Function Conversion Approach and use of Generalized Ashenhurst-Curtis Decomposition

Our new approach

Page 20: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

New Approach: Fuzzy to Multiple-New Approach: Fuzzy to Multiple-valued Function Conversion and A/C valued Function Conversion and A/C

DecompositionDecomposition

• Fuzzy Function Ternary Map• Fuzzy Function to Three-valued Function

Conversion Example– The MAX operation forms the result– The result from canonical form are the same

as from the non-canonical form– Thus time consuming reduction to canonical

form is not necessary

Page 21: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Fuzzy Function Ternary Map

This shows the mapping between the fuzzy terms and terms in the ternary map.

Page 22: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Fuzzy Function to Three-valued Function ConversionConversion Example

Conversion of the Fuzzy function terms: x2x’2

x’1x2

x1x’2 x1x’1x’2

In non-canonical form using the MIN operation as shown forf = x2x’2 +x’1x2

+x1x’2+ x1x’1x’2

x2x’2

x’1x2

x1x’2

x1x’1x’2

Non-canonical

Page 23: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

The MAX operation form the result• Combining the three-valued term functions into a single

three-valued function is performed using the MAX Operation

Page 24: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

The result from the canonical form is the same as from the non-canonical form

• F = x2x’2 +x’1x2 +x1x’2+ x1x’1x’2 conversion is equal to F(x1x2) =x’1x2+x1x’2

canonical

canonicalNon-canonical

Page 25: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Fuzzy to Multiple-valued Function Conversion Approach

Example– Fuzzy to Multiple-valued Function Conversion

Example• Fuzzy function to Multiple-valued function

• Input and results of decomposition

• Multiple-valued function to fuzzy function with circuit

– Method of Doing More Examples• Using Mathcad to do the MIN, MAX Operations

– Fuzzy Function Decomposition Results

Page 26: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

F(x,y,z) = xz + x’y’zz’ + yzEntire flow of our method

Initial non-canonical expression

Decomposed Function

Generalized Generalized Ashenhurst-Ashenhurst-Curtis Curtis DecompositionDecomposition

Fuzzy to Fuzzy to Ternary Ternary ConversionConversion

decomposed expression

H(x,y) = Gz + zz’.

G(x,y) = x+y

Page 27: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

F(x,y,z) = xz + x’y’zz’ + yzEntire flow of our method

Initial non-canonical expression

Decomposition is Decomposition is based on finding based on finding patterns in this tablepatterns in this table

0 1 0

0 1 1

0 1 2

Only three Only three patternspatterns

Page 28: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Multiple-valued function to fuzzy function with circuitTwo solutions are obtained,

G(x,y) = x+y, H(x,y) = Gz+zz’

Fuzzy terms Gz, G’zz’ and zz’ of Hare shown.

G(x,y) = x+y, H(x,y) = Gz+G’zz’

Page 29: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Contents

• Fuzzy logic

• Fuzzy logic systems applications

• Approaches to fuzzy logic decomposition

Decomposition program

• Conclusion

Page 30: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Generalization of Generalization of the Ashenhurst-the Ashenhurst-

Curtis Curtis decomposition decomposition

modelmodel

Page 31: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.
Page 32: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition is hierarchical At every step many

decompositions exist

Page 33: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Functional DecompositionFunctional DecompositionEvaluates the data function and attempts to

decompose into simpler functions.

if A B = , it is disjoint decomposition

if A B , it is non-disjoint decomposition

X B - bound set

A - free set

F(X) = H( G(B), A ), X = AF(X) = H( G(B), A ), X = A BB

Page 34: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

A Standard Map of function ‘z’A Standard Map of function ‘z’Bound Set

Fre

e S

et

a b \ c

z

Columns 0 and 1and

columns 0 and 2are compatible

column compatibility = 2

Page 35: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition of Multi-Valued Decomposition of Multi-Valued RelationsRelations

if A B = , it is disjoint decomposition

if A B , it is non-disjoint decomposition

F(X) = H( G(B), A ), X = A B

Relation

Rel

atio

n

Rel

atio

n

A

B

X

Page 36: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Forming a CCG from a K-MapForming a CCG from a K-Map

z

Bound Set

Fre

e S

et

a b \ cColumns 0 and 1 and columns 0 and 2 are compatiblecolumn compatibility index = 2

C1

C2

C0

Column Compatibility

Graph

Page 37: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Forming a CIG from a K-MapForming a CIG from a K-MapColumns 1 and 2 are incompatiblechromatic number = 2

z

a b \ c

C1

C2

C0

Column Incompatibility

Graph

Page 38: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

CCG and CIG are CCG and CIG are complementarycomplementary

C1

C2

C0

C1

C2

C0

Column Compatibility

Graph

Column Incompatibility

Graph

Maximal Maximal clique clique coveringcovering

clique clique partitioningpartitioning

Graph Graph coloringcoloring

graph multi-graph multi-coloringcoloring

Page 39: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

clique partitioning clique partitioning example.example.

Page 40: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Maximal clique covering Maximal clique covering example.example.

Page 41: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

G

\ c

g = a high pass filter whose acceptance threshold begins at

c > 1

Map of relation GMap of relation G

G

\ c

From CIG After induction

Page 42: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Cost FunctionCost Function

Decomposed Function Cardinalityis the total cost of all blocks.

Cost is defined for a single block in terms of the block’s n inputs and m outputs

Cost := m * 2n

Page 43: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Example of DFC calculationExample of DFC calculation

B1

B2

B3

Cost(B3) =22*1=4Cost(B1) =24*1=16

Cost(B2) =23*2=16

Total DFC = 16 + 16 + 4 = 36

Other cost functionsOther cost functions

Page 44: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition AlgorithmDecomposition Algorithm

• Find a set of partitions (Ai, Bi) of input variables (X) into free variables (A) and bound variables (B)

• For each partitioning, find decompositionF(X) = Hi(Gi(Bi), Ai) such that column multiplicity is minimal, and calculate DFC

• Repeat the process for all partitioning until the decomposition with minimum DFC is found.

Page 45: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Algorithm RequirementsAlgorithm Requirements

• Since the process is iterative, it is of high importance that minimization of the column multiplicity index is done as fast as possible.

• At the same time, for a given partitioning, it is important that the value of the column multiplicity is as close to the absolute minimumabsolute minimum value

Page 46: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Column MultiplicityColumn Multiplicity

3

2

1

4

00 01 11 10

00 0 0 – 101 – 1 0 011 1 – 1 010 1 1 0 0

Bound Set

Fre

e S

et

1 2 3 4

Page 47: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Column Multiplicity-other Column Multiplicity-other exampleexample

3

2

1

4

00 01 11 10

00 0 0 – 101 – 1 0 011 1 – 1 -10 1 1 0 0

Bound Set

1 2 3 4

Fre

e S

et

ABCD D

C

0

1

0 1

00 00

11 11

X=G(C,D)X=C in this case

But how to calculate function H?

Page 48: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition of multiple-valued relationrelation

Karnaugh Map Compatibility Graph for columns

compatible

Kmap of block G

Kmap of block H

One level of decomposition

Page 49: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Compatibility Checking and Correction for Relations Example

• Function that needs checked and corrected shown in a decomposition-map.

Page 50: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Compatibility Graph Show Cliques

• Cliques before checking and correction:

clique 0 = 0 1 2

clique 1 = 0 3

• Cliques after:

clique 0 = 0

clique 1 = 0 3

clique 2 = 1 2

• Compatibility graph and corrected cliques shown left

Page 51: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Discovering new concepts

• Discovering concepts useful for purchasing a carpurchasing a car

Page 52: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Variable orderingVariable ordering

Page 53: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Vacuous variables removingVacuous variables removing• Variables b and d

reduce uncertainty of y to 0 which means they provide all the information necessary for determination of the output y

• Variables a and c are vacuous

Page 54: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Example of removing inessential variables (a) original function (b)

variable a removed (c) variable b removed, variable c is no longer inessential.

Page 55: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Need to Decompose Multiple-valued Functions and Relations

• Multiple-valued and Inconsistent Data

• Ways to Create Relations– Decomposition Process to Create Relations– Program to Change Inconsistency data into

Relations

Page 56: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Decomposition Structure

• General flow chart of RMVGUD Program.

Page 57: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

Results of Relation Decomposition

3

21

18

68

157

244

132

323

1066

4

10

10

hayes

flare 1

flare 2

No. of

Blocks

No. of

cubes

No. of

Cubes

No. of

Inputs

Output FileInput FileFile

Page 58: Efficient Decomposition of Large Fuzzy Functions and Relations Marek Perkowski + Portland State University, Dept. Electrical Engineering, Portland, Oregon.

CONCLUSION CONCLUSION • Fuzzy functions are efficiently realized as multi-level

networks of fuzzy operators

• The approach has been extended also to relations. Relation is decomposed to network of relations and functions, non-decomposable relations are realized using other methods as the simplest functions

• Advantages of the new approach to fuzzy logic decomposition

– Eliminates the need for time-consuming conversion to canonical form

– Eliminates the use of S-maps

– Entirely algorithmic

– Enables decomposition of large fuzzy expressions

– Software tool exists