fuzzy-control

Post on 11-Feb-2016

37 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Fuzzy-Control. Control System Design. plant model. Implementation. Modeling. Controller. Fuzzy- Control. control law. controller design. model. Plant. process. Fuzzy-Control versus classical Control. - PowerPoint PPT Presentation

TRANSCRIPT

1

Fuzzy-Control

2

Control System Design

model

process Plant

plant model

Modeling

controllaw

controllerdesign

Controller

Implementation

Fuzzy-Control

3

Fuzzy-Control versus classical Control

Fuzzy controllers are nonlinear state space controllers with no internal dynamics

Control loop contains additional dynamic transfer elements for integration and differentation (PID- fuzzy control)

The dynamic behavior of a fuzzy controller is not different from a classical controller

The main difference is the representation of the controller (parametrization) and therefore the design methodology Classic: model based Fuzzy: knowledge based

4

Pros and Cons Classical control

Systematic design Stability and quality specifications are implictly met Model uncertainties and disturbance are rejected by

means of robust control design Fuzzy control

Heuristic design No guarantee of stability Controller is transparent and comprehensible State space controller requires observer, observer

requires state space model, therefore why not directly classical control design

5

Fuzzy ControlFuzzy control makes sense if ... there is no system model in form of differential equations (e.g. behavior based robotics, due to environment) the plant is highly nonlinear which complicates or prevents classical control design methods control objectives are vague and imprecise, e.g. smooth switching of an automatic gear box plant and control strategy are so simple that fuzzy control design requires less time and effort than classical control design

6

Types of Uncertainty

Stochastic uncertainty example: rolling a dice

Linguistic uncertainty examples : low price, tall people, young age

Informational uncertainty example : credit worthiness, honesty

7

Classical Setyoung = { x P | age(x) 20 }

characteristic function:

young(x) = 1 : age(x) 200 : age(x) > 20

A=“young”

x [years]

young(x)1

0

{

8

Fuzzy SetClassical Logic

Element x belongs to set Aor it does not:

(x){0,1}

A=“young”

x [years]

A(x)1

0

Fuzzy Logic

Element x belongs to set Awith a certaindegree of membership:

(x)[0,1]

A=“young”

x [years]

A(x)1

0

9

Fuzzy Set

Fuzzy Set A = {(x, A(x)) : x X, A(x) [0,1]} • a universe of discourse X : 0 x 100• a membership function A : X [0,1]

A=“young”

x [years]

A(x)1

0

=0.8

x=23

Definition :

10

Fuzzy set vs. Probabilty U ist the set of nontoxic liquids

Bottle A belongs to U with probability p=0.9 Bottle B belongs to U with degree of membership =0.9 A has the property „non toxic“ either completely with

p=0.9 or not all (toxic) with p=0.1. B has the property „non toxic“ to a high degree (almost

non-toxic)

A B

( ) 0.9p A U ( ) 0.9U B

11

Representation of Fuzzy Sets elementwise specifikation of membership degree

discrete base set

Fuzzy set

definition via membership functions Base set X has values in a continuous range Fuzzy-set is a real-valued scalar function with

values in the unit interval

1 1{( , ( )), ,( , ( )))n nx x x x

1{ , , }nX x x

12

Types of Membership Functions

x

(x)1

0 a b c d

Trapezoid: <a,b,c,d>

x

(x)1

0

Gaussian: N(m,s)

m

s

x

(x)1

0 a b

Singleton: (a,1) and (b,0.5)

x

(x)1

0 a b d

Triangular: <a,b,b,d>

13

Parametrization of Fuzzy-Sets

Triangular functions

Trapezoidal functions

Bell-shaped functions

, ,

falls

: [0,1], falls0 sonst

a b c

x a a x bb ac xx b x cc b

', ', ', '

' ' '' '1 ' ': [0,1], ' ' '' '0

a b c d

x a falls a x bb a

falls b x cxd x falls c x dd c

sonst

2

, 2( ): [0,1], expm sx mx

s

14

Classical truth values for conjunction, disjunction, implication and negation

[ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]1 1 1 1 1 1 1 1 11 0 0 1 0 1 1 0 00 1 0 0 1 1 0 1 10 0 0 0 0 0 0 0 1

[ ] [ ]1 00 1

Konjunktion Disjunktion Implikation

Negation

15

Truth value functions Restriction: The fuzzy truth value should coincide

with the classical truth values for arguments restricted to the binary inputs 0 and 1.

Example: truth value functions conjunction disjunktion negation Lukasiewicz-Implication

Gödel-Implication

( , ) min{ , }w ( , ) max{ , }w ( ) 1w

( , ) min{1 ,1}w

1( , ) ifwotherwise

16

Definition t-Norm

( 1) ( , ) ( , )( 2) ( ( , ), ) ( , ( , ))( 3) Aus folgt ( , ) ( , )( 4) ( ,1)

T t tT t t t tT t tT t

Definition: A function t : [0, 1]2 [0, 1] is called t-Norm (triangular norm), if it complies with the axioms (T1) – (T4).

Monotonic

KommutativityAssociativity

Truth value functions for conjunction

17

Examples for t-NormTruth value function t(, ) = min{, } for conjunction

additional t-norms

Lukasiewicz-t-norm: ( , ) max{ 1,0}algebraic product: ( , )

0 1 { , }drastic product: ( , ) min{ , } otherwise

tt

ift

( 1) min( , ) min( , )( 2) min(min( , ), ) min( ,min( , ))( 3) Aus folgt min( , ) min( , )( 4) min( ,1)

TTTT

18

Extension Principle

For arbitrary functions f:f(A)(y) = max{A(x) | y=f(x)}

f

x

A(x)

y

f(A

)(y)

Assume a fuzzy set A and a function f:How does the fuzzy set f(A) look like?

f

x

A(x)

y

f(A

)(y)

max

19

Operators on Fuzzy SetsUnion

x

1

0

AB(x)=min{A(x),B(x)}A(x) B(x)

x

1

0

AB(x)=max{A(x),B(x)}A(x) B(x)

Intersection

x

1

0

AB(x)=A(x) B(x)A(x) B(x)

x

1

0

AB(x)=min{1,A(x)+B(x)}A(x) B(x)

20

Complement

Negation: A(x)= 1 - A(x)

AA(x) 1AA(x) 0

Classical law does not always hold:

Example : A(x) = 0.6 A(x) = 1 - A(x) = 0.4AA(x) = max(0.6,0.4) = 0.6 1 AA(x) = min(0.6,0.4) = 0.4 0

21

Fuzzy Relations

classical relation R : X x Y defined by R(x,y) = 1 if (x,y) R

0 if (x,y) R

|{fuzzy relationR : X x Y defined by R(x,y) [0,1]

R(x,y) describes to which degree x and y are relatedIt can also be interpreted as the truth value of the proposition x R y

22

Fuzzy Relations

X = { rainy, cloudy, sunny }Y = { swimming, bicycling, camping, reading }

X/Y swimming bicycling camping reading rainycloudysunny

0.0 0.2 0.0 1.00.0 0.8 0.3 0.31.0 0.2 0.7 0.0

Example:

23

Fuzzy Sets & Linguistic VariablesA linguistic variable combines several fuzzy sets.

linguistic variable : temperaturelinguistics terms (fuzzy sets) : { cold, warm, hot }

x [C]

(x)1

0

cold warm hot

6020

24

Fuzzy Rules

causal dependencies can be expressed in form of if-then-rules

general form:if <antecedent> then <consequence>

example:if temperature is cold and oil is cheap

then heating is high

25

if temperature is cold and oil price is low then heating is high

if temperature is hot and oil price is normal then heating is low

Fuzzy Rule Base Temperature :

cold warm hotOil price:

cheap

normal

expensive

high high medium

high medium low

medium low low

Heating

26

fuzzy knowledge base

Fuzzy Data-Base:Definition of linguistic input and output variables

Definition of fuzzy membership functions

Fuzzy Knowledge Base

Fuzzy Rule-Base:if temperature is cold and oil price is cheap

then heating is high….

x [C]

(x)1

0

cold warm hot

6020

27

Schema of a Fuzzy Decision

Fuzzification Inference Defuzzification

t

cold warm hot

measuredtemperature

0.2

0.7

if temp is cold then valve is open

if temp is warm then valve is half

if temp is hot then valve is close

rule-base

cold =0.7

warm =0.2

hot =0.0

v

open half close

crisp outputfor valve-setting

0.2

0.7

28

Fuzzification

t

1

0

cold(t)=0.5

If temperature is cold ...

15C p

1

0

cheap(p)=0.3

and oil is cheap ...

$13/barrel

0.5 0.3

Determine degree of membership for each term of an input variable :

temperature : t=15 C oilprice : p=$13/barrel

1. Fuzzification

29

Fuzzy Combination2. Combine the terms in one degree of fulfillment for the entire antecedent by fuzzy AND: min-operator

ante = min{cold(t), cheap(p)} = min{0.5,0.3} = 0.3

t

1

0

cold(t)=0.5

if temperatur is cold ...

15C p

1

0

cheap(p)=0.3

and oil is cheap ...

$13/barrel

0.5 0.3

30

Fuzzy Inference3. Inference step: Apply the degree of membership of the antecedent to the consequent of the rule

high(h)

... then heating is high

consequent(h)

h

1

0ante =0.3...

h

1

0

high(h)

ante =0.3...

consequent(h)

min-inference:cons. = min{ante , high }

prod-inference: cons. = ante • high

31

Fuzzy Aggregation

h

1

0

... then heating is high

... then heating is medium

... then heating is low

4. Aggregation: Aggregate all the rules consequents using the max-operator for union

32

Defuzzification5. Determine crisp value from output membership function for example using “Center of Gravity”-method:

h

1

0

consequent(h) COG

73

33

Mamdani-ControlerMamdani-Regler is based on a finite set of If-Then-Rules R of the form

(1) ( )1R : Ifi s and ... and is

then is .n

R n R

R

x xy

inputs: x1,...,xnoutputs: y

The fuzzy sets R(i) are often associated with linguisticterms, e.g. vague concepts such as „roughly zero“, „medium large“„negative small “.Fuzzy sets and linguistic terms are often synomously.

34

Mamdani-Controller Rules = {R1,...,Rr} can be interpreted as

piecewise, defined, imprecise function

1 1 1(1) ( )

1

1(1) ( )

1

( ,..., )r r r

nR R n R

nn

R R n R

falls x und und xf x x

falls x und und x

35

Mamdani-Controller For a crisp input vector (a1,...,an) over the input

variables (x1,...,xn) the resulting output fuzzy set is

Fuzzy set can be interpreted as a fuzzy relation across the product space X1 x ... x Xn and Y

Fuzzy set ,a1,...,an corresponds to the image of the one-element set {(a1,...,an)} under the fuzzy relation .

1, ,..., 1: [0,1], ( ,..., , )

n

outputa a nY y a a yR R

36

Mamdani-Controller projection of the crisp input x1 onto output y Rule base = {R1,R2,R3}, Ri : if x is Ai then y is Bi

1,

1

: [0,1]( , )

outputx Y

y x yR

R

: [0,1]

( , ) ( , )X Y

x y x yR

R

37

Defuzzifizication Center of gravity (COG)

Center of output fuzzy sets

Center of singletons

1

1

, ,...,

, ,...,

n

n

outputR R a a R

s outputR R a a

yy

( ) ( )

outputs

output

y y dyy

y dy

i i i i

si i i

AcyA

y

1

0

y

10

COG

ys

y

1

0 y1 y2 y3ys

ys

38

Defuzzification Mean of maxima (MOM)

Centroid of largest (COL)

y'

y'

(y)=max { (y')}

(y)=max { (y')}

s

y dyy

dyy

10

MOM

ys

y

10

COL

ys

COG

39

Defuzzification If X is A then Y is A´ If X is B then Y is B´

x

1

0

A B

y

1

0

A´ B´

Mean of maximaCenter of gravity

40

Fuzzy Toolbox

41

Fuzzy Toolbox

42

Fuzzy Toolbox

43

Fuzzy Toolbox

44

Mamdani-Fuzzy Controler Tank

u

oh

2ghu o uh KA A A

valve

tank

tank:

max[0, ]h hSaturation

0

x kwu C x

valve:

max[0, ]x xSaturation

w

C0

45

Water Level Control

Fuzzy Toolbox: Tank Level Control

Inputs Level error Change of error

Output Change of valve position

Nonlinear system

46

Fuzzy-PD-Regler

47

Fuzzy-PD-Regler : Linguistische Variablen

Wasserstand h

Änderung des Wasserstand dh/dt

Ventilstellung u

48

Fuzzy-PD-Regler : RegelbasisIf (level is okay) then (valve is no change)If (level is low) then (valve is open fast)If (level is high) then (valve is close fast)If (level is okay) and (rate is positive) then (valve is close

slow)If (level is okay) and (rate is negative) then (valve is open

slow)

49

Takagi-Sugeno-Kang-Controler Takagi-Sugeno-Kang-Controler are based on rules of

the form

rule premise is identical to Mamdani controlers rule conclusion is a crisp (linear) function of the

inputs The rule conclusion is a local model of the input-

output relationship in the region defined by the rule premise

in intermediate regions the output results from interpolation between the individual regions (gain scheduling)

(1) ( )1 1: Ifi s and is then ( ,..., )n

R n R R nR x x y f x x

1

1

, ,..., 1

, ,...,

( ,..., )n

n

R R a a R n

R R a a

f x xy

50

Takagi-Sugeno-Kang-Regler TSK-controler often employ linear functions in the conclusion

Gain-Scheduling An verschiedenen Arbeitspunkten wird ein lineares Modell

der Strecke gebildet, bsw. durch Linearisierung um den Arbeitspunkt.

Für jeden Arbeitspunkt wird aufgrund des dort gültigen lokalen linearen Modells ein linearer Regler entworfen.

Im laufenden Betrieb wird dann je nach Arbeitspunkt zwischen den verschiedenen Reglern bzw. Reglerparametern hin- und hergeschaltet.

Um sprungförmige Änderungen der Eingangsgröße zu vermeiden, erfolgt der Übergang vom alten zum neuen Regler möglichst stetig.

(1) ( )1 0 1 1: is and is then ...n

R n R n nR If x x y a a x a x

51

Takagi-Sugeno-Kang-Regler Input X : {very low, low, high, very high} Non-overlapping input sets

Rules: If X is very low then y=x If X is low then y=1 If X is high then y=x-2 If X is very high then y=3

52

Takagi-Sugeno-Kang-Regler Non overlapping input fuzzy sets

Exact representation of local models

53

Takagi-Sugeno-Kang-Regler input X : {very low, low, high, very high} Overlapping input fuzzy sets

rules: If X is very low then y=x If X is low then y=1 If X is high then y=x-2 If X is very high then y=3

54

Takagi-Sugeno-Kang-Regler Interpolation between local linear models

y=x

y=1

y=3y=x-2

55

Takagi-Sugeno-Kang-Regler Lineare TSK-Regler

ki(z(t)) sei der Wahrheitswert der Prämisse der i-ten Regel für die Eingangsgröße z(t)

Normierung der Wahrheitswerte

Die Ausgangsgröße u des TSK-Reglers ergibt sich aus der mit ki gewichteten Überlagerung der Ausgangsgrößen Fix der einzelnen Regler.

(1) ( )1: is and is thenn

i R n R iR If z z u F x

( ( )) 1ii

k z t

( ( ))i ii

u k z t F x

56

Takagi-Sugeno-Kang-Regler TSK-Modelle lassen sich auch zur Modellierung einer Strecke

heranziehen. Für das Zustandsmodell ergibt sich

Für einen geschlossenen Kreis ohne äußere Anregung ergibt sich als TSK-Modell

Reduktion auf einen Index l mit Hilfe von

ergibt für den geschlossenen Kreis

( ) ( ( ))[ ( ) ( )]i i ii

x t k z t A x t B u t

( ) ( ( )) ( ( ))[ ] ( )i j i i ji j

x t k z t k z t A B F x t

( ( )) ( ( )) ( ( ))l i i j

l i j

A A B F

k z t k z t k z t

( ) ( ( )) ( )l ll

x t k z t A x t

57

Positiv und negativ definite Matrizen

Eine Matrix A ist positiv definit wenn für alle x gilt

xT A x > 0

Eine Matrix A ist negativ definit wenn für alle x gilt

xT A x < 0

58

Stabilitätssatz für kontinuierliche TSK-Systeme

Gegeben sei ein kontinuierliches System in der Form

Dieses System besitzt eine globale, asymptotisch stabile Ruhelage x=0, wenn eine gemeinsame, positiv definite Matrix P für alle Teilsysteme A existiert so dass die Matrix

für alle l negativ definit (Ml<0) ist.

Die Frage nach der Existenz einer solchen Matrix P lässt sich in ein LMI-Problem (Lineare Matrix Ungleichung) überführen, für welches effiziente Lösungsalgorithmen bereitstehen, so dass die Frage der Stabilität des Systems auf einfachem Wege beantwortet werden kann.

( ) ( ( )) ( )l ll

x t k z t A x t

Tl l lM A P PA

59

Takagi-Sugeno-Kang-Regler-Entwurf

Linearisiere das nichtlinearen Modell

an den Arbeitspunkten =-0.7, =-0.3, =0.0, =0.3, =0.7

2( ) cos sinM m x bx ml ml F 2( ) sin cosI ml mgl mlx

60

Takagi-Sugeno-Kang-Regler-Entwurf

Entwerfe mit der Methode der Polplatzierung Zustandsregler für die linearisierten Modelle

Partitioniere Eingangsvariable durch dreieckige Fuzzy-Zugehörigkeitsfunktion, deren Schwerpunkte gerade den Arbeitspunkten entsprechen.

Für jeden Arbeitspunkt beschreibe die Zustandsrückführung als TSK-Regel.

Bilde den gesamten TSK-Fuzzy-Regler aus der Überlagerung (Gain-Scheduling) der Regeln an den verschiedenen Arbeitspunkten.

61

Takagi-Sugeno-Kang-Regler-Entwurf

Linearisierung um =0>> [A,B,C,D]=linmod('cart_pole');>> k=acker(A,B,[-2, -2, -1+i, -1-i])

k =

-20.7185 -4.8438 -0.5578 -1.1156 TSK-Regel

1 2 3 4if is zero then

if is zero then 20.7 4.8 0.55 1.11

F k k k x k x

F x x

62

Takagi-Sugeno-Kang-Regler-Entwurf

Gleichgewichtzustand für =0.4>> x=[0.4; 0; 0; 0];>> ix=[1];>> dx=[0; 0; 0; 0];>> idx=[1; 2];>> [x, u, y, dx]=trim('cart_pole',x,[],[],ix,[],[],dx,idx) x= [0.4 0 0 0] u=4.5557 dx=[0 0 0 4.14]

63

Takagi-Sugeno-Kang-Regler-Entwurf

Linearisierung um Gleichgewichtszustand für =0.4>> [A,B,C,D]=linmod('cart_pole‚x,u);>> k=acker(A,B,[-2, -2, -1+i, -1-i])k = -23.5848 -5.2528 -0.5195 -1.0390

TSK-Regeln

0 1 2 3 4if is ... then

if is pos. small then 4.55 23.5 5.25 0.51 1.03

if is neg. small then 4.55 23.5 5.25 0.51 1.03

F k k k k x k x

F x x

F x x

64

Takagi-Sugeno-Kang-Regler-Entwurf

Gleichgewichtzustand für =0.7>> x=[0.7; 0; 0; 0];>> ix=[1];>> dx=[0; 0; 0; 0];>> idx=[1; 2];>> [x, u, y, dx]=trim('cart_pole',x,[],[],ix,[],[],dx,idx) x= [0.7 0 0 0] u=9.0799 dx=[0 0 0 8.25]

65

Takagi-Sugeno-Kang-Regler-Entwurf

Linearisierung um Gleichgewichtszustand für =0.7>> [A,B,C,D]=linmod('cart_pole‚x,u);>> k=acker(A,B,[-2, -2, -1+i, -1-i])k = -31.6989 -6.2897 -0.4396 -0.8792 TSK-Regeln

0 1 2 3 4if is ... then

if is pos. large then 9.08 31.69 6.28 0.44 0.88

if is neg. large then 9.08 31.69 6.28 0.44 0.88

F k k k k x k x

F x x

F x x

66

TSK-Regelbasis

67

TSK-Kennfeld

68

Logikbasierte Regler Mamdani-Regler interpretieren Fuzzy-Regeln als stückweise definierte unscharfe Funktionen. Logikbasierte Regler interpretieren Fuzzy-Regeln im Sinne von logischen Implikationen. Betrachte Regeln mit nur einer Eingangs-Fuzzy-Menge if x is then y is Wie beim Mamdani-Regler, ergibt sich als Ausgabe-Fuzzy- Menge exakt die Fuzzy-Menge , wenn der Eingangswert x einen Zugehörigkeitsgrad von Eins zur Fuzzy-Menge aufweist. Im Gegensatz zum Mamdani-Regler wird die Ausgabe-Fuzzy-Menge jedoch umso größer, je schlechter die Prämisse zutrifft, d. h. je geringer der Wert (x) wird.

69

Logikbasierte Regler Im Extremfall (x) = 0 erhalten wir als Ausgabe die Fuzzy-Menge, die konstant Eins ist. Der Mamdani-Regler würde hier die Fuzzy-Menge, die konstant Null ist, liefern. Bei einem logikbasierten Regler sollte die Ausgabe-Fuzzy-Menge daher als Menge der noch möglichen Werte interpretiert werden. Wenn die Prämisse überhaupt nicht zutrifft ((x) = 0), kann auf- grund der Regel nichts geschlossen werden und alle Ausgabe- werte sind möglich. Trifft die Regel zu 100 % zu ((x) = 1), so sind nur noch die Werte aus der (unscharfen) Menge zulässig.

70

Logikbasierte Regler Eine einzelne Regel liefert daher jeweils eine Einschränkung aller noch möglichen Werte. Da alle Regeln als korrekt (wahr) angesehen werden, müssen alle durch die Regeln vorgegebenen Einschränkungen erfüllt sein, d. h. die resultierenden Fuzzy-Mengen aus den Einzelregeln müssen im Gegensatz zum Mamdani-Regler miteinander geschnitten werden.

71

Logikbasierte ReglerSind r Regeln der Form

1 : Ifi s , then is ( 1,..., )iR RR x y v i r

vorgegeben, ist die Ausgabe-Fuzzy-Menge bei einem logikbasierten Regler daher bei der Eingabe x = a

{1,..., }out, logic: min ., i iR Ri r

Y a y vR a

Hierbei muss noch die Wahrheitswertfunktion der Implikation festgelegt werden. Mit der Gödel-Implikation erhalten wir ( ) falls ( ) ( )

1 sonst,i i i

i

R R RR i R

v y v y aa y v

während die Lukasiewicz-Implikation zumin{1 ( ) ( ),1}

i i i iR R R Ra y v v y a führt.

72

Fuzzy Gütemasse zur Regleroptimierung

Optimierungs-verfahren

Fuzzy-güte-

anforderungen

StreckeLinearer

dynamischerRegler

Stellgröße : u

skalaresGütemass

Regelgröße : y(t)Führungsgröße : w(t)

Regler-Parameter {K,Tn, Tv}

Regelgröße : y

w

-+

e

73

Genetisches Fuzzy System

EvolutionärerAlgorithmus

Bewertungs-Schema

StreckeFuzzy Regler

F: e u

Stellgröße : u

Gütemass

Regelgröße : yFührungsgröße : w

Fuzzy-RegelnFuzzy-Mengen

Regelgröße : y

w

-+

e

74

Traditionelle KI Robotik

Beschränkungen des SMPA-Ansatzes Unsicherheiten in der Sensorik und den

Aktuatoren Unvollständiges Wissen über die Umgebung Fehlende Rückkopplung während der

Ausführung

Wahr-nehmen

Modell-ieren Planen Handeln

Wahrnehmung Kartierung Wegplanung Ausführung

75

Verhaltensbasierte Robotik Keine explizite Modellierung der Umgebung Körperlichkeit und Situiertheit Enge Kopplung zwischen Wahrnehmung und Handeln Ein primitives Verhalten implementiert eine

Regelung für eine spezifische Teilaufgabe Das Gesamtverhalten erwächst aus der Integration

und Wechselwirkung der primitiven Verhalten

Wahrnehmung

Handeln

76

Verhaltensbasierte Robotik mit Fuzzy-Reglern

Hindernisvermeidung If obstacle is close and obstacle is left then turn right If obstacle is close and obstacle is right then turn left If obstacle is close and obstacle is ahead then turn

sharp left If obstacle is far then turn zero

Zielpunktansteuerung If goal is far and goal is left turn left If goal is ahead turn zero If goal is far and goal is right turn right If goal is near turn zero

77

Hierarchische Verhaltensbasierte Architekturen

Wandfolgen

Türpassieren

Zielpunktansteuern

Hindernis-vermeidung

NavigationManipulation

reichen

greifenabstellen

primitive Verhalten

koordinierende Verhalten

78

Kontextabhängiges Überlagern von Verhaltensweisen

schlichtende Fuzzy-Regeln aktivieren oder deaktivieren Verhalten anhand des aktuellen Kontext

if obstacle-close then obstacle-avoidance if obstacle-far then go-to-target

fusionierende Fuzzy-Regeln kombinieren die Präferenzen für Handlungen der aktiven Verhalten

kombiniere Handlungen kombiniere Präferenzen1(a)

a2(a)

a1

a2

a1+2

1(a)

2(a) a1 2

79

Situationsbedingte Fuzzy-Regeln zur Planung

Fuzzy- Plan zur sequentiellen Aktivierung von Verhalten If obstacle then avoid If not obstacle and in(Corr1) and not in(Corr2) then

follow(Corr1) If not obstacle and in(Corr1) and not near(Door2) then

follow(Corr2) If not obstacle and near(Dorr5) and not in(Room5) then

cross(Dorr5) If in(Room5) then still

80

Fuzzy Behavior Coordination for Robot Learning from Demonstration

Frank HoffmannUniversity of Dortmund, Germany

frank.hoffmann@unido.de

81

Outline

robotic behaviors based on fuzzy preferences fuzzy obstacle avoidance behavior coordination of multiple behaviors learning behaviors from demonstration

82

Learning Robotic Behaviors from Demonstration

human teacher drives robot manually while perception action pairs are recorded

learning task: adapt a collection of robotic behaviors to mimic the demonstrated behavior

problems partially observable decision process credit assignment: Which behavior is

responsible for the observed action? ambiguity of training examples due to

ambigious control actions perceptual aliasing

83

Behavior Based Robotics robotic behavior: direct mapping from perceptions to

actions the overall behavior emerges from the cooperation

and coordination of concurrently active primitive behaviors

perception s

response r

84

Behavior Coordination and Command Fusion

Behavior coordination is concerned with how to decide which behavior to activate at each moment.

Command fusion is concerned with how to combine the desired actions of multiple behaviors into one command to be sent to the robot‘s actuators.

85

Behavior Coordination Mechanismsbehavior

coordinationmechanisms

arbitrationcommand

fusion

priority-based

state-based

winner-take-all

voting super-position

fuzzy multipleobjective

86

Fuzzy Behavioral Responses Each behavior states its preferences for all

possible responses instead of a single crisp response r.

Preferences for actions are described by fuzzy sets.

B(r) denotes the desirability of behavior B for executing action r.

B()

heading

preference for a responseB()

crisp response

heading

87

Fuzzy Behavior Coordination aggregate preferences for actions of active

behaviors

fuse actions fuse preferences1(a)

a2(a)

a1

a2

a1+2

1(a)

2(a) a1 2a1+2

88

Fuzzy Behavior for Obstacle Avoidance

Mapping from perceptions to preferences are described by fuzzy rules. If distance is small then preference is low If distance is large then preference is high

Preference as a function of proximity

1.0

d dmin dmax

D d

89

Fuzzy Behavior for Obstacle Avoidance

Preference for a heading depends on distances to obstacles di according to D(di) similarity of heading with obstacle

direction i

1.0

Ddi

K

ilocal perceptual space

90

Fuzzy Behavior for Obstacle Avoidance

180° 45° 90° 135°

1.0

180° 45° 90° 135°

1.0

D 2d

D 3d

D 1d

K

( ) min ( )kk

total response

91

Priority Based Behavior Coordination of Preferences

behaviors are characterized by activation s (dynamic)

applicability: environmental context desirability: task context

priority (static) behavior coordination mechanism

1.0

d dmin dmax

dos

s1

s2

s3

s4

activationw1

w2

w3

actual strength

min{ ,1 }i i jj i

w s s

1.0

92

Priority Based Behavior Coordination of Preferences

1.0

1.0

1.0

Ri

R1

Ri

R2

Ri

R3

1.0

R

( )( ) ii RiR

ii

ww

w1=0.5

w2=0.25

w3=0.25

93

Priority based behavior coordination

94

Priority based behavior coordination

95

Priority based behavior coordination

96

Learning Behavioral Responses from Demonstration

training set<st,rt>

behaviors andbehavior

coordination

match preferenceresponse with examples

optimizationscheme (EA, PSO)

i(s,r)

s,r1 s,r2

fitness

behaviorparametersdemonstration

97

Criteria for Matching Preferences with Training Examples

Consistency: demonstrated actions rt associated with a perceptual state st should have a high preference i(st,rt) if the behavior is active wi(st)>0 in the context st.

Preferences should be as general as necessary.( , ) ( )( )

i t t i tcon

t i t

s r w sfw s

i(s,r)

s,r1 s,r2

98

Criteria for Matching Preferences with Training Examples

Specificity: the preference i(st,r) for actions r that have not been demonstrated in a perceptual state st should be low.

Preferences should be as specific as possible.

i(s,r)

s,r1 s,r2

( , )( ) ( )( )

i t ti t

t i t rspec

i tt

s rw ssf

w s

99

Criteria for Matching Preferences with Training Examples Smoothness: similar responses for the same

state should have similar preferences Inherently achieved by fuzzy representation of

behavioral preferences Optimal compromise among all criteria

i(s,r)

s,r1 s,r2

con specff f

100

Example

00.5

11.5

2

22.5

33.5

4210

220

230

240

250

260

270

dmindmax

fitne

ss

dmin

d max

0 0.5 1 1.5 22

2.2

2.4

2.6

2.8

3

3.2

3.4

3.6

3.8

4

x

200 state-action pairs generated from random distribution of obstacles based on three behaviors

identification of parameters dmin, dmax for obstacle avoidance

original: dmin=1, dmax=3 , fitness=265 PSO optimum: dmin=0.92, dmax=3.76 , fitness=267x

101

SimulationOriginal trajectorydmin=10, dmax=20

trajectory with adaptedparametersdmin=12.5, dmax=16

102

Conclusions

fuzzy framework for learning robotic behaviors from demonstration

matching of ambigious and uncertain perception action pairs with behavioral responses

evaluation on synthetic datasets

103

Preference Responses for ...min

minmin max

max min

max

0 :

( ) :

1D

d dd dd d d d

d dd

(1)

min

min

min

min

1 :

( ) * (1 ) :(1 ( ))( ) ( ) :

( ) * (1 ) :(1 ( ))1 :

kD k

D k

k D k

kD k

D k

a

d a bd

d b c

d c dd

d c

(2)

104

Preference Responses for ...( ) min ( )kk

(3)

min

max0 min max

max min

max

1 :

:

0

d dd ds d d d

d dd d

(4)

105

Preference Responses for ...min{ ,1 }i i j

j iw s s

(5)

( )( ) ii RiR

ii

ww

(6)

max ( )crisp R (7)

22

( )

max ( )crisp Re d

(8)

106

Learning Behavioral Response ...( , ) ( )con i t t i tf s r w s (9)( , ) ( )

( )i t t i t

cont i t

s r w sfw s

(10)

max

min

max min

( , )( )

ri tr

i t r

s r drs

r r

(11)

( , )( ) ( )i t t

spec i ti t r

s rf w ss

(12)

107

Learning Behavioral Response ...( , )( ) ( )

( )

i t ti tt

i t rspec

i tt

s rw ssf

w s

(13)

( , ) ( ) ( , )j t t i t i t ti j

m s r w s s r

(14)

108

Fuzzy Behavioral Responses Each behavior states its preferences for all

possible responses instead of a crisp response Ri.

Preferences for actions are described by fuzzy sets, where the degree of membership B(R) denotes the desirability of behavior B for executing action R.

B()

obstacle avoidanceB()

goal seeking

109

Defuzzifizication Center of gravity (COG)

Mean of maxima (MOM)

Centroid of largest (COL)

( ) ( ) s

y y dyy

y dy y

10

COG

ys

y'

y'

(y)=max { (y')}

(y)=max { (y')}

s

y dyy

dyy

10

MOM

ys

y

10

COL

ys

COG

110

Fuzzy Behavior Coordination

fuse preferences

fuse actions

111

Fuzzy Command Fusion defuzzification of multimodal output sets in case

of conflicting preferences might result in “undesirable” control actions

centroid of largest defuzzification operator additional external constraint-based fusion

mechanism segregate rules with mutually exclusive output

recommendations and use winner-takes-all heuristic

COG fails COL ok COL fails

top related