Beruflich Dokumente
Kultur Dokumente
= e
= e
=
= + + + +
= + + + +
Normal & Subnormal Fuzzy Set
Normal Fuzzy Set Subnormal Fuzzy Set
10 20
10 20
Subnormal Fuzzy Set
1
0
x
( )
A
x
( )
A
x
0
0.5
( )
A
x
x
0.5
1
0
Clipping
0
0.4
( )
A
x
Scaling
Generated during rule based
reasoning process
1
x
x
Convex Fuzzy Set
Convex Fuzzy Set:- A fuzzy set A is convex
fuzzy if the membership values are strictly
monotonically increasing then strictly
monotonically decreasing with increasing values of
elements in the universe.
( (1 ) ) min ( ( ), ( ))
A A A
y z y z + >
0
y
z
x
( )
A
x
Convex Fuzzy Set
1
Types of Membership Functions
Triangular Membership
Function
This membership function is
very often used in the
application of Fuzzy logic
controller.
Example: x= -3:0.1: 6; y=trimf
(x,[-1 1 4]); plot (x, y); xlabel
(trimf, p=[-1 1 4])
Trapezoidal Membership
Due to simple formulas and
computational efficiency this mf
very popular in control problem.
Example:x= -3:0.1: 6; y=trapmf
(x,[-1 1 4 5]); plot (x, y); xlabel
(trapmf, p=[-1 1 4 5])
Contd.
Gaussian Membership
Function
Example: x = -10:0.1:15;
y= gaussmf (x, [2 5]);
plot (x, y); xlabel ('gaussmf,
p =[2 5]')
Note: Gaussian membership
function achieve
smoothness and it is
symmetric about the
center.
2
2
( )
( ) exp
2
A
x m
x
o
| |
=
|
\ .
Note:
&
.
m denote the the center
and width of the function
o
Contd.
Bell Shaped
Membership Function
Adjust c & a to
vary center and width
of the function & use
b to control the
slopes at the crossing
points.
X = 0:.1:200;
Y = gbellmf (x,[20 4
120]);
Plot (x, y)
xlabel ('gbellmf, P =[20
4 120]')
2
1
( )
1
A
b
x
x c
a
=
+
Contd.
Sigmoid Function
X = 0:.1:20;
y = sigmf (x,[1 10]);
plot (x, y)
xlabel ('sigmf, P =[1 10]')
( )
1
( )
1
A
a x c
x
e
=
+
Shape of the curve depends
on (a, c) parameters.
*
A fuzzy set A whose
support is a single point
in U with is
called a fuzzy Singleton
( ) 1
A
x =
0
x
1
( )
A
x
Basic Operation on Fuzzy Sets
Let be two fuzzy sets in U with
membership function respectively.
A and B
( ), ( )
A B
x x
{ }
{ }
, ( ) , ( ) [ 0, 1]
, ( ) , ( ) [ 0, 1]
( ) : ( ) max[ ( ), ( ) ]
( ) ( )
A A
B B
A B A B
A B
A x x x
B x x x
Union Disjunction x x x
x x
c
c
=
=
=
= v
Contd.
sec ( ): ( ) min[ ( ) , ( ) ]
( ) ( )
: ( ) 1 ( )
* , ,
int sec ,
,
A B A B
A B
A
A
Inter tion Conjunction x x x
x x
Complement x x
A fuzzy conjuction also called a t norm represrents a
generalized er tion operator while a fuzzy
disconjuction also calle
=
= .
=
, ( )
.
d a t conorm s norm represrents
a generalized union operator
Most Popular
Contd.
t-norm:
(i) Fuzzy Standard Intersection
(ii) Algebraic Product
(iii) Bounded Product
( ( ), ( )) min[ ( ), ( ) ]
A B A B A B
x y x y
=
( ( ), ( )) ( ) ( )
A B A B A B
x y x y
= -
{ }
( ( ), ( )) max 0, ( ) ( ) 1
A B A B A B
x y x y
= +
Contd.
t-conorm (s-norm)
(i) Fuzzy Standard Union
(ii) Algebraic Sum
(iii) Bounded Sum
( ( ), ( )) max[ ( ), ( ) ]
A B A B A B
x y x y
=
( ( ), ( )) ( ) ( ) ( ) ( )
A B A B A B A B
x y x y x y
= + -
{ }
( ( ), ( )) min 1, ( ) ( )
A B A B A B
x y x y
= +
Fuzzy System
A fuzzy inference system (or fuzzy system) basically
consists of a formulation of the mapping from a given
fuzzy input set to an fuzzy output set using fuzzy
logic.
Step-1: Identify ranges of the inputs & outputs.
Create fuzzification (fuzzy sets) of each input and
output variable.
Step-2: Application of fuzzy operator (AND, OR,
NOT) in the IF (antecedent) part of the rule.
Fuzzy
output
Fuzzy
input
Fuzzy system
Contd.
Step-3: Implication from antecedent to
consequent (conclusion) is Then part of the
rule [ (i) crisp consequent (If < antecedent >
Then y = a (ii) fuzzy consequent ( If
<antecedent > Then y = A (A is Fuzzy Set)
Mamdani model) (iii) functional consequent
( If <antecedent > Then
Takagi-Sugeno model) ].
0 1 2
1
( , ,... )
n
i i n
i
y a a x f x x x
=
= + =
Contd.
Step-4: Aggregation of the consequent across the
rules.
Step-5: Defuzzification (it is a mapping from the
space of a fuzzy set to a space of crisp values.
Step-6: Implement the fuzzy system, test it, and
modify fuzzy rules if necessary.
If antecedent Then y a < > = If antecedent Then y a < > =
Contd.
Architecture of Fuzzy Controller
Fuzzy Logic
Controller
Data Base
Rule
Base
Inference Engine
Defuzzifica-
tion
Fuzzifica-
tion
Dynamic
Filter
Dynamic
Filter Plant
( ) u t
( ) u t
f
Fuzzy Logic Controller Scheme
Design Tips for Antecedent
Membership Function
(i) Each membership function Overlaps Only
with the closest neighboring membership
function.( )
For any possible input data, its membership
values in all relevant fuzzy sets should sum
equal to 1(or nearly so).( )
( ) , 1, 1
i j
A A null set j i i i | = = +
( ) 1
i
A
i
x =
u
u A
Fuzzy-PI
Fuzzy-PD Rule:
" " " " " " If e is A and e is B Then u is D A
u
Fuzzy Rule Base
e
e
Contd.
Fuzzy-PID Rule:
Fuzzy Rule
Base
}
e
e
u A
2
e A
Fuzzy-PID
u
2
" " " " " " " " If e is A and e is B and e is c Then u is D A A A
Example-1:- Stabilization of Inverted
Pendulum System
Obtain of Control Law (i) Modern Control approach (ii)
Fuzzy logic Approach
Mathematical Modeling of cart &
pendulum System
Pendulum Dynamics:
( )
2
2
2
sin
sin cos
( )
4 cos
3
:
sin cos
( )
F ml
g
M m
t
m
l
M m
Cart Dynamics
F ml
x t
M m
u u
u u
u
u
u u u u
| |
+
|
+
\ .
=
| |
|
+
\ .
+
=
+
To stabilize in upright position & this in turn
implies that can be neglected in the above expressions.
0
0 ( ) nearly zero u
2
u
Contd.
Linearized model
( )
4
3
F
g
M m
t
m
l
M m
u
u
+
=
| |
|
+
\ .
Pendulum Dynamics
( )
Cart Dynamics
F ml
x t
M m
u
=
+
Note: One can also linearize the above system by Taylor
series expansion (retaining only first order terms in the
expression.
Two coupled second-order linearized models are
then transformed into state-space form (assuming,
and position of the pendulum angle & cart
position are measurable & Syst. is controllable)
1 2 3 4
; ; ; x x x x x x u u = = = =
1
x u =
| |
| |
1 1 1
2 21 2 2 2
3 3 3
4 41 4 4 4
1 2 3 4
0 1 0 0 0
0 0 0
( ); 1 0 0 0
0 0 0 1 0
0 0 0
1
2
( ) ( ) ( ); ( )
3
4
x x x
x a x b x
u t y
x x x
x a x b x
x
x
X t AX t bu t where u t k k k k
x
x
( ( ( ( (
( ( ( ( (
( ( ( ( (
= + =
( ( ( ( (
( ( ( ( (
( ( ( ( (
(
(
(
= + =
(
(
(
(
3
x
System Parameters & Elements of
Matrices
{ }
{ }
21 41
2 4
3 ( ) 3
9.81; 3.21;
4( ) 3 4( ) 3
3 1 3
0.667; 1
4( ) 3 4( ) 3
0.889
g M m g m
a a
l M m m M m m
m
b b
l M m m M m M m m
+
= = = =
+ +
| |
= = = +
`
|
+ + +
\ .
)
=
1 ; 1 ; 0.5 & 9.81 l m M kg m kg g = = = =
System Matrices:
| |
0 1 0 0 0
9.81 0 0 0 0.667
; ; 1 0 0 0 ; [0]
0 0 0 1 0
3.21 0 0 0 0.889
A b c d
( (
( (
( (
= = = =
( (
( (
Regulator Design Using Pole-
Placement Technique
Matlab Program to obtain controller gain K
% Stabilization of inverted pendulum using pole-
placement technique
A=[0 1 0 0; 9.81 0 0 0; 0 0 0 1;-3.27 0 0 0];
B=[0;-0.667;0;0.889];
C=[1 0 0 0];
d=[0];
%Check for controllability
%Rank of controllabilty matrix(M)
%=
rank_of_M=rank(ctrb(A,B))
2 1
[ ......... ]
n
Rank B AB A B A B
Contd.
%enter the desired characteristic equation
chareqn=[1 12 72 192 256]
%Calculate desired closed loop poles
desired_poles=roots(chareqn)
%Calculate feedback gain matrix ' K ' using
Ackermann's formula (K=[0 0 .1] )
K=acker(A,B,desired_poles)
Results: rank_of_M=4; chareqn= 1 12 72 192 256; -4.0
+j 4.0; -4 j 4.0; -2 +j 2 & -2 j 2.
K=[ - 174.82 -57.12 -39.14 -29.35 ]
1
( ) M A |
=
+ >
=
=
=
+
= =
Contd.
( ) ( )
1 2
1 1
( ) ( ( )) ( ) ( ( )) ( ), ....
L L
T
i i
i i L
i i
X t A X t X t B X t U t where
= =
| | | |
( = + =
| |
\ . \ .
( ) ( )
( ) ( ) ( ) X t A X t B U t = +
, , 1, 2,...... , Note for i L wehave =
| |
1 2
1
0, 1, .... 0, 1
L
T
i i L
i
and c
=
( > = =
=
=
= =
= =
= =
=
= =
= =
=
(
(
| |
| |
( =
|
|
( \ .
\ .
(
| |
| |
+
|
|
\ .
\ .
( )
T
PX t
(
(
(
(
(
Contd.
( ) ( )
{ }
,
( ) ( ( )) ( ( )) ( )
T
T i i j i i j
i j
i j
X t X t X t A B K P P A B K X t
(
= +
(
i
x
i
F
.
, 1, 2,...
i
x i m =
( )
0, 1, 2,...... ,
i
F i p > =
( )
(1) (2) ( )
..... 0.
p
diag F F F >
Application of LMI Problems
Fuzzy Control Problem ( Discrete System)
Let us consider a discrete-time system (for one rule
only) is
(quadratically) stable if such that
( 1) ( ) ( ) ( ) ( ) X k AX k BU k for U k FX k + = + =
0 P - >
| | | |
0
T
A BF P A BF P <
The control problem is to find such that the closed
loop system is stable. This stabilization problem can be
recast as an LMI problem in the following way.
' ' F
| | | |
1 1 1
0
T
P A BF P A BF P P
<
( ) ( )
| | | |
1 1
1
0,
0,
T
T
A BF X X A BF X X where X P
X AX BM X AX BM where M FX
( ( < =
> =
For
1
0, X we have F M X
> =
This nonlinear (convex) inequality can now be converted to
LMI form using Schur Complements. The resulting LMI
( )
( )
0
T
X AX BM
AX BM X
(
>
(
(
Thus the closed loop discrete time system is quadratically
stable if such that the above LMI condition holds.
The state-feedback gain is
0 X and M - >
1
. F MX
=
.
Theorem:-1 (Continuous Time Fuzzy
TS System)
If for some the conditions 0 P >
( ) ( )
0, 1, 2,......
T
i i i i i i
A B K P P A B K i L + < =
0,
T
ij ij
G P PG i j L + < < s
and
( ) ( )
,
T
i i j j j i
ij
G A B K P P A B K i j L = + < s
Where,
are satisfied, then the closed-loop system modeled by
( ) ( )
1 1
( ) ( ( )) ( ) ( ( ))
L L
i i
i i
i i
X t A X t X t B X t
= =
| | | |
=
| |
\ . \ .
( )
1
( ( )) ( )
L
j
j
j
K X t X t
=
| |
|
\ .
is asymptotically stable.
Design of stable fuzzy controller for
discrete time system:
TS Model:-
1
( 1) ( ( )) ( ) ( )
L
i i
i
i
X k X k A X k BU k
=
(
+ = +
( )
1
( ) ( ( )) ( )
L
i
i
j
U k X k F X k
=
=
TS Controller:-
1 1
( 1) ( ( )) ( ( )) ( )
L L
i i j
i j
i j
X k X k X k A B F X k
= =
(
+ =
= >
( )
( )
0 , 1, 2,....
T
i i i
i i i
Z A Z B M
for i L
A Z B M Z
(
(
> =
(
( )
( )
0;
T
ij
ij
Z G Z
for i j L
G Z Z
(
(
> < >
(
The feedback gain can be obtained as
i
F and P
1
Z P
=
1
P Z and
=
1
.
i i
F M Z
=
.
Theorem-2 (b)
If for some symmetric positive definite the
following conditions
Z
( )
( )
0 , 1, 2,....
T
i i i
i i i
Z A Z B M
for i L
A Z B M Z
(
(
> =
(
and
( )
( )
0;
T
ij
ij
Z G Z
for i j L
G Z Z
(
(
> < >
(
are satisfied, then the closed-loop system (see below) is stable
1 1
( 1) ( ( )) ( ( )) ( ) 2 ( ( )) ( ( )) ( )
L L L
i i i
i i i i ij
i i j i
X k X k X k A B F X k X k X k G X k
= = >
( + = +
Fuzzy System Stability Via Interval
Matrix Method:
Discrete time system:
( )
0
( 1) ( ) ( ), ( ) X k A G k X k X k X + = + =
Stable matrix
Unknown Time-Varying Perturbed Matrix
( )
m
G k G for all k s
where,
& inequality holds
element-wise.
Theorem: The time-varying discrete-time system described
above asymptotically stable if
( ) ( ) ( ) ( )
1 1
1 : max .....
m n
A G note A + < =
lim ( ) 0
k
X k
=
.
Contd.
Definition: An interval matrix is an
matrix whose elements consist of interval
, 1, 2,........
ij ij
b c for i j n
(
=
( )
I
A k
| | | |
| | | |
| | | |
11 11 1 1
21 21 2 2
1 1
. .
. .
. . . .
. .
n n
n n
I
n n nn nn
b c b c
b c b c
A
b c b c
(
(
(
=
(
(
(
Contd.
Note: The center matrix , and the maximum
difference matrix of are defined by
C
A
m
A
I
A
,
2 2
c m
B C C B
A A
+
= = { } { }
, .
ij ij
B b and C c = =
, where
| |
( ) ( ) ( )
I c m c m c m
A k A A A A A A k with A k A = + = +A A s
Note: can be expressed
I
A
Lemma: The interval matrix is asymptotically
stable if the matrix is stable and .
( )
I
A k
c
A
( )
1
c m
A A + <
.
Stability of discrete fuzzy TS type
model using Interval matrix
approach.
Sufficient condition: Let us consider TS type
discrete model & rules are stated as
1
1 2
( ) ...... ( 1) , 1, 2,....
( 1) ( ) ( 1) ...... ( 1)
( 1) ( ) ( )
i i
n
i i i i
n
i
If x k is A and and x k n is A i L
Then x k a x k a x k a x k n
or X k A X k transform tocanonical form
+ =
+ = + + + +
+ =
The output of effective fuzzy model after defuzzification can be obtained
in the following form
1
1
( )
( 1)
i i
L
L
i
i
i
A X k
X k
e
e
=
=
+ =