You are on page 1of 32

INTRODUCTION TO FUZZY

CONTROL
Dr. B. M. Mohan
Professor, Department of Electrical Engineering
Indian Institute of Technology
Kharagpur-721302, India
e-mail: mohan @ ee.iitkgp.ernet.in.

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 1/32


Introduction
Fuzzy - imprecise, indistinct, vague
Control - regulate, track
Fuzzy control system: A system that analyzes
input values in terms of logical variables that take
on continuous values in [0, 1].
Fuzzy logic: Widely used in control. Logic that
uses fuzzy predicates (large, very large, weak,
medium etc). Has the advantage that the solution
to the problem can be cast in terms that human

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 2/32


operators can understand, so that their
experience can be used in the design of
controllers. This makes it easier to mechanize
tasks that are already successfully performed by
humans.
Proposed by Lotfi A .Zadeh (who thought
controllers would respond better to imprecise
inputs if their behaviour is modelled on
spontaneous human reasoning), UCB, in 1965.

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 3/32


Applications
• Cement kiln, Denmark, 1975
• Sendai railway - controlling acceleration,
braking and stopping operations; Seiji
Yasunobu & Soji Miyamoto, Hitachi, 1987
• Stabilization of inverted pendulum with wine
glass & live mouse, Takeshi Yamakawa, 1987
• Matsushita vacuum cleaners
• Hitachi washing machines
• Canon auto focusing camera
• Mitsubishi air conditioner
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 4/32
• Character & hand writing recognition system
• Robots for flower arrangements
• Voice controlled robot helicopters
• Flow control of powders in film manufacturing
• Elevators
• Automated space docking, NASA
• Refrigerators, automotive transmission
systems, energy efficient motors - Boeing,
GM, Allen - Bradley, Chrysler, Easton &
Whirlpool
• Maytag dishwasher, 1995 and so on.......

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 5/32


Preliminaries
Linguistic variable: Variable whose values are
words. Eg: Speed - slow, moderate, fast
Membership function: Mapping that associates
each member of a set with its grade of
membership in the interval [0, 1]. Triangular &
Trapezoidal - most commonly used. Membership
functions can be modified by "hedges" which
include "about", "approximately", "near", "close
to", "very", "slightly", "too", "extremely", and
"somewhat". For eg., "very" squares (narrows)
membership function, "extremely" cubes the
values to produce greater narrowing , and
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 6/32
"somewhat" broadens the function by taking
square root.
Fuzzy set: Let R be a reference set and ‘s’ be an
element of R. The fuzzy set M of R is
{s | µM (s)} , ∀ s ∈ R
where µM (s) - degree of membership of s in M .
Fuzzification: Process of converting crisp input
values into fuzzy sets.
Fuzzy rules: of the form
If brake temp is "warm" AND speed is "not very
high" THEN brake pressure is "slightly
decreased".
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 7/32
Here input variables: brake temp & speed
output variable: brake pressure.
IF part is called "antecedent," and THEN part is
called "consequent".
Fuzzy rules usually have several antecedents
that are combined using fuzzy operators AND
(minimum, algebraic product) and OR
(maximum, bounded sum, algebraic sum). For
example,
IF e is N AND ė is P OR
e is P AND ė is N THEN u is Z.
Inference mechanism: Produces fuzzy sets
representing the conclusions or decision making.
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 8/32
Decision making:
• All rules that apply are invoked using the
membership functions and truth values
obtained from the inputs to determine result
of the rule.
• This result in turn will be mapped into a
membership function and truth value
controlling the output variable.
• These results are combined to give a crisp
answer.
Defuzzification: Method of providing a crisp
answer from the combined result of the rules
applied. Eg: centroid, centre of sums (COS),
height etc.
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 9/32
Why fuzzy control? A system based on
empirical rules may be more effective. Fuzzy
systems can be easily upgraded by adding new
rules / new features to improve performance.
Fuzzy control can be used to improve existing
traditional control systems by adding a layer of
intelligence to the current control method.
Fuzzy controllers: They consist of
Input stage: maps inputs to the appropriate
membership functions and truth values.
Processing stage: invokes each rule and
generates a result, and then combines the
results of the rules.
Output stage: converts the combined result
back into a crisp control output value.
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 10/32
Fuzzy control system design process:
Trial and error approach
• Specify system’s operational specifications,
and identify inputs & outputs.
• Choose fuzzy sets for the inputs & outputs,
and fuzzification process.
• Determine the rule set.
• Choose defuzzification method.
• Run through test suite to validate system, and
make adjustments if necessary.

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 11/32


For eg., consider the block diagram of the fuzzy
controller for steam turbine.
IF T is Cool & P
is Weak THEN D
LN(N3)
F Cold throttle is LP e
temp u Cool IF T is Cool & P MN(N2) f
Normal is Low THEN u
z SN(N1)
Warm throttle is MP
z Hot Z
z throttle
IF T is Cool & P z
i Weak is Ok THEN
f Low
SP(P1) i setting
pressure throttle is Z
i Ok MP(P2) f
Other rules i
e Strong LP(P3)
r High IF T is Cool & P e
is High THEN r
throttle is LN

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 12/32


The input and output variables map into the
following fuzzy sets:

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 13/32


Assume that temp is in "cool" state, and pressure
is in "low" and "OK" states. The pressure value
ensures that only rules 2 and 3 fire. Rule 2 is
evaluated as follows:

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 14/32


Rule 3 is evaluated as follows:

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 15/32


The two outputs are then combined as follows:

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 16/32


Mathematical Model of PI controller :
Increases rise time
Z t
u(t) = KPc e(t) + KIc e(τ )dτ
0
u̇(t) = KPc ė(t) + KIc e(t) = KPc v(t) + KIc d(t)

u(kT ) − u((k − 1)T ) ∆u(kT )


= = KPc v(kT ) + KIc d(kT )
T T
=⇒ ∆u(kT ) = KPd v(kT ) + KId d(kT )

d(kT ) − d((k − 1)T )


v(kT ) =
T

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 17/32


KPd = T KPc and KId = T KIc ;
u(kT ) = ∆u(kT ) + u((k − 1)T )
Mathematical Model of PD controller :
Reduces rise time
u(t) = KPc e(t) + KD
c
ė(t) = KPc d(t) + KD
c
v(t)

u(kT ) = KPd d(kT ) + KD


d
v(kT )
KPd = KPc and d
KD c
= KD
Mathematical models of fuzzy PI and fuzzy PD
controllers ?

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 18/32


Building a fuzzy PI / PD controller

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 19/32


Fuzzy PI or PD controller: Hao Ying, 1993

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 20/32


x = ds or vs X = D or V

−(x − L) (x + L)
µ−X = ; µ+X =
2L 2L
µ−X + µ+X = 1
Rule base: If ds AND vs then us or ∆us
r1 D− V− U−
D− V+
r2 D+ V− U0
r3 D+ V+ U+

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 21/32


Scaled input plane

vs
L

3 *

4
-L 0 L ds
2

-L

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 22/32


Rule Justification

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 23/32


Outcomes of rules using minimum AND and
maximum OR
Region µ− µ0 µ+
1 µD− µD+ µV+
2 µV− µV+ µD+
3⋆ µV− µD− † µD+
4 µD− µV− µV+

† (D− , V− )

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 24/32


Area of inferred fuzzy set
A (µ̂) = H µ̂ (2 − µ̂)

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 25/32


A(µ− )(−H) + A(µ0 )(0) + A(µ+ )(+H)
∆us (k) or us (k) =
A(µ− ) + A(µ0 ) + A(µ+ )
= gd {ds (k), vs (k)} {ds (k) + vs (k)}
H [2L + |ds (k) − vs (k)|]
gd {ds (k), vs (k)} = 2
9L − 2L |vs (k)| − 2d2s (k) − vs2 (k)
in regions 1, 3.
H [2L + |ds (k) − vs (k)|]
=
9L2 − 2L |ds (k)| − d2s (k) − 2vs2 (k)
in regions 2, 4.

gd (0, 0) = 2H
9L − minimum of gd
gd (−L, L) = gd (L, −L) = HL − maximum of gd
INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 26/32
Gain Plot

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 27/32


Control Plot

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 28/32


Example
ẏ = −y(t) + 0.5y 2 (t) + u(t)
r(t) = 3, T = 0.1, KPc = 1.75 ; and KIc = 4
Controller : minimun AND, maximum OR,
Larsen product inference.
H [ds (k) + vs (k)]
∆u(k) = if |ds | ≥ |vs |
K∆u [3L − |ds (k)|]
H [ds (k) + vs (k)]
= if |ds | ≤ |vs |
K∆u [3L − |vs (k)|]

Sd = 2.3, Sv = 1, K∆u = 1.9, L = 6.9, H = 35.4

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 29/32


INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 30/32
References
[1] E.H.Mamdani, Application of fuzzy algorithms for
control of simple dynamic plant, Proc. IEE, Vol. 121,
No. 12, pp: 1585-1588, 1974.
[2] E.Cox, Fuzzy fundamentals, IEEE Spectrum, pp:
58-61, Oct. 1992.
[3] H. Ying, The simplest fuzzy controllers using different
inference methods are different nonlinear
proportional-integral controllers with variable gains,
Automatica, Vol. 29, N0. 6, pp: 1579-1589, 1993.
[4] K.M. Passino & S. Yurkovich, Fuzzy Control,
Addison-Wesley, 1998.
[5] J. Jantzen, Foundations of Fuzzy Control, John Wiley &
Sons, 2007.

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 31/32


THANK YOU

INTRODUCTION TO FUZZY CONTROL Dr. B. M. Mohan – p. 32/32

You might also like