Professional Documents
Culture Documents
(i)
(ii)
Is the predicate
that height x 1.8 m
Contd.
F ( x)
, x U , F ( x) [ 0, 1]
A ( x)
A ( x)
0.5
10
20
0.5
0
10
20
A ( x)
A ( x)
Scaling
Clipping
0.4
x
Generated during rule based
reasoning process
z
A ( y (1 ) z ) min ( A ( y), A ( z))
y
Triangular Membership
Function
Trapezoidal Membership
Contd.
Gaussian Membership
Function
( x m)2
A ( x) exp
2
2
Example: x = -10:0.1:15;
y= gaussmf (x, [2 5]);
plot (x, y); xlabel ('gaussmf,
p =[2 5]')
Contd.
Bell Shaped
Membership Function
A ( x)
1
xc
1
a
2b
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]')
Contd.
Sigmoid Function
A ( x)
1
1 e
a( x c)
X = 0:.1:20;
y = sigmf (x,[1 10]);
plot (x, y)
xlabel ('sigmf, P =[1 10]')
* A fuzzy set A whose
support is a single point
in U with A ( x) 1
is
called a fuzzy Singleton
A ( x)
1
Contd.
Inter sec tion (Conjunction): A B ( x ) min[ A ( x) , B ( x) ]
Most Popular
Complement : A ( x) 1 A ( x)
A ( x) B ( x)
Contd.
t-norm:
(i) Fuzzy Standard Intersection
Contd.
t-conorm (s-norm)
(i) Fuzzy Standard Union
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
n
ai xi f ( x1 , x2 ,...xn )
( If <antecedent > Then y a0
i 1
Takagi-Sugeno model) ].
If antecedent Then y a
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.
Contd.
Fuzzification
Data Base
Rule
Base
Defuzzification
Inference Engine
Dynamic
Filter
Plant
u (t )
f
Dynamic
Filter
u (t )
(ii) Technical
Design Objectives
Steady state
error, rise time, settling time and Maximum overshoot; in
case of optimal control design
performance weights
play an important role to modify the system response.
(iii) Development of Mathematical Model from the
Physical Laws of the Systems.
Contd.
(iv) Simplification & Linearization of the Plant
Model( near an equilibrium or operating point).
(v) Selection of Controller Structure (Control
algorithm) & Parameters. This transform the
deviation in error into appropriate action in
terms of actuator position with a view to achieve
performance objectives.
Contd.
u (t ) u (t T ) d nu un
Fuzzy-PI Rule:
If e is " A" and e is " B " Then u is " D "
e
Fuzzy Rule
Base
u
Fuzzy-PI
Fuzzy-PD Rule:
z 1
e
e
Contd.
Fuzzy-PID
Fuzzy-PID Rule:
e
e
2
Fuzzy Rule
Base
If e is " A " and e is " B " and 2e is " c " Then u is " D "
Pendulum Dynamics:
F ml 2 sin
g sin cos
M m
(t )
4 m cos 2
l
3
M
Cart Dynamics :
x (t )
F ml 2 sin cos
M m
Contd.
Linearized model
Pendulum Dynamics
Cart Dynamics
F
g
F ml
M m
x (t )
(t )
4
m
m
l
3
M
1 0 0 x1 0
x1
x
0 0 0 x2 b2
u (t ); y 1 0 0 0 2
x3
0 0 1 x3 0
0 0 0 x4 b4
x4
x1
x2
X (t ) A X (t ) b u (t ); where u (t ) k1 k 2 k3 k 4
x3
x
4
3 g ( M m)
3 g m
a21
9.81; a41
3.21;
l 4( M m) 3m
4( M m) 3m
3
3m
1
b2
0.667; b4
1
l 4( M m) 3m
M m 4( M m) 3m
0.889
System Matrices:
0
9.81
A
0
3.21
0 0
0
0.667
0 0 0
; c 1 0 0 0 ; d [0]
;b
0
0 0 1
0 0 0
0.889
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] M 1 ( A) )
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 ]
PendulumVelocity
(rad./sec)
Pole Placement
Pole Placement
Pole Placement
Fuzzy
Controller
u (t )
(i) For each input & output three linguistic terms are
considered as NB, Z & PB.
( )
( )
Z
NB
-0.1
PB
0.1
NB
-0.5
PB
0.5
NB
PB
0
100
-100
To implement fuzzy controller the following Mamdanitype rule-base was constructed.
PB Then
is f PB
Z Then
is f PB
R4: If is Z and
NB Then
is f Z
PB Then
is f PB
is PB and
R2: If is PB and
R1: If
R3: If
is PB and
Contd.
R8: If is NB and
Z Then is
f Z
f NB
f Z
f NB
f NB
Contd.
>> fuzzy
Pendulum Velocity
Pendulum Angle
(rad.)
Fuzzy
Controller
(rad./sec.)
Fuzzy
Controller
Cart Velocity
(m/sec.)
Fuzzy
Controller
Fuzzy
Controller
time
Remarks
Note: Design of conventional Controller is based
on mathematical model of a plant. Fuzzy
Controller is basically an adaptive and non-linear
control which gives robust performance for a
linear or non-linear plant with parametric
uncertainty and moreover, the controller does
not require any knowledge of mathematical
model of dynamic system.
for
x 1
for
x 1
1
1 x
A1
2
0
if x 1
if x 1
0
1 x
if 1 x 1 ; A2
if 1 x 1
2
if 1 x
if 1 x
1
Contd.
A1
A2
Contd.
Rule-1:
If x1 is A1
Rule-2:
If x1 is A2
Then
Then
y1 f1 ( x1 ) 2 2 x1
y1 f 2 ( x1 ) 1 4 x1
1 3
2
x1 x1
2 2
2 2 x1
1 4 x1
if
1 x1 1
if
x 1
if
x 1
i 1, 2,......L
Contd.
th
i Rule :
IF
THEN
X (i ) (t ) A( i ) X (t ) B ( i )U (t )
Or X (k 1) F (i ) X (k ) G (i )U (k ); i 1, 2,...L
X (t )
(i )
(i )
(
X
(
t
))[
A
X
(
t
)
B
U (t )]
i
i 1
i ( X (t ))
i 1
, where i ( X (t )) Aij ( x j )
j 1
Contd.
T
L (i )
L (i )
X (t ) A i ( X (t )) X (t ) B i ( X (t )) U (t ), where 1 2 .... L
i 1
i 1
i 1
1, and 1 2 .... L 0, 1
T
X (t ) A X (t ) B U (t )
THEN
U (i ) K ( i ) X (t )
Or U (i ) (k 1) K ( i ) X (k ); i 1, 2,...L, and K
Contd.
In this case,
L
U (t ) K
j 1
j ( X (t )) X (t ), where j
( j)
j ( X (t ))
L
j 1
( X (t ))
L (i )
L (i )
L ( j)
X (t ) A i ( X (t )) X (t ) B i ( X (t )) K j ( X (t )) X (t )
i 1
i 1
j 1
V ( X (t )) X T (t ) PX (t )
Let
is a Lyapunov function with
P>0. To check the Fuzzy closed-loop system is
globally asymptotically stable, V ( X (t )) 0, X (t )
V ( X (t )) X T (t ) P X (t ) X T (t ) P X (t )
L
L i
(
X
(
t
))
(
X
(
t
))
i
j
L
L
T
i
j
i 1
J 1
X (t ) P
B i ( X (t )) K j ( X (t )) X (t )
L
i 1
j 1
j ( X (t ))
J 1
T
i
A
(
X
(
t
))
(
X
(
t
))
i
j
L i
L j
T
i 1
J 1
X (t )
B i ( X (t )) K j ( X (t )) PX (t )
L
i 1
j 1
j ( X (t ))
J 1
L
Contd.
After simplification we get,
i
i
j
i
i
j
X (t ) i ( X (t )) j ( X (t )) A B K P P A B K X (t )
i, j
T
i
i
j
i
i
j
X (t ) A B K P P A B K X (t ), where 0 i ( X (t )) j ( X (t )) 1
i, j
A B K
i
Note: We need to find out common matrix P such that the Lyapunov
equations are negative definite. Linear matrix inequality (LMI)
methods can be used to find P if it exists. A brief outline of LMI is
given below.
LMI- Problems
Definition: A LMI is linear matrixm inequality
expression of the form F ( X ) F0 xi Fi 0
i 0
where xi variables and Fi symmetric matrices
are given. The feasibility problem is to determine
the variables xi , i 1, 2,...m so that the above
Inequality holds. Multiple LMIs F (i ) 0, i 1, 2,...... p,
.
(1)
(2)
( p)
diag
F
F
.....
F
0.
can be expressed as a single LMI
A BF
P A BF P 0
The control problem is to find ' F ' such that the closed
loop system is stable. This stabilization problem can be
recast as an LMI problem in the following way.
P
A BF
P A BF P1 P1 0
A BF X X 1 A BF X X 0, where X P 1
T
X AX BM X 1 AX BM 0, where M FX
T
For
X 0, we have F M X 1
AX BM
AX BM
A B K
i
P P Ai Bi K i 0, i 1, 2,...... L
and
Gij P PGij 0,
Where,
Gij A B K
i jL
P P Aj B jKi , i j L
L (i )
L (i )
L ( j)
X (t ) A i ( X (t )) X (t ) B i ( X (t )) K j ( X (t )) X (t )
i 1
i 1
j 1
is asymptotically stable.
X (k 1) i ( X (k )) Ai X (k ) B iU (k )
TS Model:-
i 1
U (k ) i ( X (k )) F ( i ) X (k )
TS Controller:-
j 1
X (k 1) i ( X (k )) j ( X ( k )) Ai B i F j X ( k )
i 1 j 1
i 1
i 1 j i
i
i
j
j
j i
Where, G A B F A B F ,
ij
i j
such that i j 0
A B F P A B F P 0,
i
and
i 1, 2,....L
Where,
Ai Bi F j A j B j F i
Gij
2
Z P 0
Ai Z B i M i
A Z B M
i
0 , for i 1, 2,....L
T
Z
Gij Z
0; for i j L
G Z
Z
ij
1
i
Z
P
The feedback gain F and P can be obtained as
P Z 1 and
F i M i Z 1.
Theorem-2 (b)
Ai Z B i M i
A Z B M
i
0 , for i 1, 2,....L
T
Z
Gij Z
and
0; for i j L
G Z
Z
ij
i 1
i 1 j i
X (k 1) A G(k ) X (k ), X (k ) X 0
A Gm 1
note : A max
limk X (k ) 0
.....
Contd.
AI
b
c
.
.
b
c
21
21
2n
2 n
.
. .
bn1 cn1 . .
bnn
cnn
Contd.
AI (k ) Ac Am
X (k 1)
i 1
A X (k )
L
i 1