fuzzy sets and control. fuzzy logic the definition of fuzzy logic is a form of multi-valued logic...

17
Fuzzy Sets and Control

Upload: elwin-ray

Post on 14-Dec-2015

228 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy Sets and Control

Page 2: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy LogicThe definition of Fuzzy logic is a form of multi-valued logic derived fromfuzzy set theory to deal with reasoning that is approximate rather than precise.

Degree of Truths and probabilities range between 0 and 1.

From Wikipedia

Page 3: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

An example of Fuzzy Reasoning

Fuzzy Set Theory defines Fuzzy Operators on Fuzzy Sets. The problem in applying this is that the appropriate Fuzzy Operator may not be known. For this reason, Fuzzy logic usually uses IF-THEN rules, or constructs that are equivalent, such as fuzzy associative matrices.

Rules are usually expressed in the form:IF variable IS property THEN actionFor example, an extremely simple temperature regulator that uses a fan might look like this:IF temperature IS very cold THEN stop fanIF temperature IS cold THEN turn down fanIF temperature IS normal THEN maintain levelIF temperature IS hot THEN speed up fan

Notice there is no "ELSE". All of the rules are evaluated, because the temperature might be "cold" and "normal" at the same time to different degrees.The AND, OR, and NOT operators of boolean logic exist in fuzzy logic, usually defined as the minimum, maximum, and complement; when they are defined this way, they are called the Zadeh operators, because they were first defined as such in Zadeh's original papers. So for the fuzzy variables x and y:NOT x = (1 - truth(x))x AND y = minimum(truth(x), truth(y))x OR y = maximum(truth(x), truth(y)) From Wikipedia

Page 4: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy Set Definition

~

: 0,1F U

The definition of a fuzzy set is given by the membership function

elements of the universe of discourse U, can belong to the fuzzy set with any value between 0 and 1.

The degree of membership of an element u

~

0 ( ) 1F u

i i

iAAA

x

x

x

x

x

xA

)()()(~~~

2

2

1

1

~

when the universe of discourse U, is discrete and finite, it is given for a fuzzy set A by

Page 5: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy Set Operations~~~BAC The union of two fuzzy sets

~ ~~

( ) max ( ), ( )C A Bx x x

is defined by

~ ~~C A B The intersection of two fuzzy sets

~ ~~

( ) min ( ), ( )C A Bx x x

is defined by

C

~~

( ) 1 ( )C Ax x

is defined by The complement of fuzzy set ,A

Page 6: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Properties of Set Operations

Most of the properties that hold for classical sets (e.g., commutativity, associativity and idempotence) hold also for fuzzy sets except for following two properties:

the intersection of a fuzzy set and its complement results in a fuzzy set with membership values of up to ½ and thus does not equal the empty set (as in the case of classical sets)

Law of contradiction ~~AA

Law of excluded middle UAA ~~

Page 7: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Intelligent Control

• An intelligent control system is one in which a physical system or a mathematical model of it is being controlled by a combination of a knowledge-base, approximate (humanlike) reasoning, and/or a learning process structured in a hierarchical fashion.

• Under this simple definition, any control system which involves fuzzy logic, neural networks, expert learning schemes, genetic algorithms, genetic programming or any combination of these would be designated as intelligent control.

Page 8: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy Control• A fuzzy controller consists of three operations:

(1) fuzzification, (2) inference engine, and (3) defuzzification.

• A common definition of a fuzzy control system is that it is a system which emulates a human expert. In this situation, the knowledge of the human operator would be put in the form of a set of fuzzy linguistic rules.

• The human operator observes quantities by observing the inputs, i.e., reading a meter or measuring a chart, and performs a definite action (e.g., pushes a knob, turns on a switch, closes a gate, or replaces a fuse) thus leading to a crisp action

• The human operator can be replaced by a combination of a fuzzy rule-based system (FRBS) and a block called defuzzifier. The input sensory (crisp or numerical) data are fed into FRBS where physical quantities are represented or compressed into linguistic variables with appropriate membership functions.

• These linguistic variables are then used in the antecedents (IF-Part) of a set of fuzzy rules within an inference engine to result in a new set of fuzzy linguistic variables or consequent (THEN-Part). Variables are combined and changed to a crisp (numerical) output.

Page 9: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Fuzzy Control Architecture

System

Fuz

zifi

er Rul

e E

ngin

e

Def

uzzi

fier

realnumbers

realnumbers

FuzzyController

membershipvalues

fuzzysets

Page 10: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

fuzzifier – accepts real number inpuit and outputs its membership

defuzzifier –accumulates the areas and momentsand outputs thecentroid

consequent- cuts tts fuzzy set and computes its area and moment

Simple Rules – if antecedent then consequentEx: fuzzyControlForDec

( )neg x dx

( )negx x dxif then y x neg pos

if then y x pos neg

if then y x zero zero

common domain input, x

Page 11: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Simple Rule Controller

fuzzyControlForDec provides the negative feedback to stabilize the integrator

Page 12: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

common domain input, x

common domain input, v

if and then F neg neg pos

Composite Rules – if antecedent1 and antecedent2 then consequent

Example: fuzzControlFor2To1

AndFn outputs minimum of inputs

if and then F zero zero zero

if and then F pos pos neg x

v

Page 13: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

CompositeRule Controller

fuzzyControlFor2To1 provides the control to settle the spring at zero

Page 14: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Linear Time Invariant Models

[ ]

x A x B u

y C x

x

A x[ ]u B u

y C x

Page 15: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Inverted Pendulum Fuzzy Control

fuzzyControlFor2To1 provides the control to keep the stick stable

Linearized inverted pendulum on a cart

Page 16: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Modeling the Inverted Pendulum

M mass of the cart 0.5 kg

m mass of the pendulum 0.5 kg

b friction of the cart 0.1 N/m/sec

l length to pendulum center of mass 0.3 m

I inertia of the pendulum 0.006 kg*m^2

F force applied to the cart

x cart position coordinate

theta pendulum angle from vertical

Source: http://www.engin.umich.edu/group/ctm/examples/pend/invpen.htmlMoment of Inertia: http://hyperphysics.phy-astr.gsu.edu/hbase/mi2.html#rlin

Page 17: Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory

Inverted Pendulum – Swing Up Non-linear Model

Original Model

sin cos

=inertia of rod

=mass of rod

=gravity of rod

=half length of rod

=horizontal force

d

dtd

J mgl mludt

J

m

g

l

u

source: http://www.control.lth.se/publications/fulldocs/ast_fur96.pdf

Dimensionless model

sin ( , ) cos

( , ) if 0

0,otherwise

turnoff

d

dtd

gaindtgain k

reset theta to 0 when reach 2*pi

detect when pendulum stops rising

detect when angle reaches turn-off level

detect when pendulum stops rising

turnoff

starting from hanging configuration, rod can be made to reach inverted configuration withsufficient force acting until horizontal line is reached

0