You are on page 1of 51

FUZZY LOGIC CONTROL

for
Power Electronics

Dr. Shailendra Kumar Jain


Professor
Dept. of Elect. Engg.
Maulana Azad National Institute of Technology
Bhopal
26/10/2020 S Jain, NITB, Material for Educational Purpose 1
26/10/2020 S Jain, NITB, Material for Educational Purpose 2
As complexity rises, precise statement lose meaning
and meaningful statements lose precisions

L. A. Zadeh

S Jain, NITB, Material for Educational


26/10/2020 3
Purpose
What we have to learn to do,
We learn by doing……

Aristotle Ethics

S Jain, NITB, Material for Educational


26/10/2020 4
Purpose
FUZZY LOGIC

 Fuzzy logic is another form of artificial intelligence,

 It is argued that human thinking does not always follow crispy “yes” – “no”
logic, but is often vague, uncertain, indecisive, or fuzzy.

 Based on this, Lofty Zadeh, a computer scientist at the University of


California, Berkerly, originated the “fuzzy logic” or fuzzy set theory in 1965
that gradually emerged as a discipline in AI.

S Jain, NITB, Material for Educational


26/10/2020 5
Purpose
Introduction

 Modern control-theory based controllers are


 state-feedback controllers,
 self-tuning controllers, and
 model reference adaptive controllers etc.

These controllers also need mathematical models and are therefore


sensitive to parameter variation.

S Jain, NITB, Material for Educational


26/10/2020 6
Purpose
1. Fuzzy Logic Introduction
• Advantages
• Examples
• Areas and applications

S Jain, NITB, Material for Educational


26/10/2020 7
Purpose
• Advantages of FLC

Recently, fuzzy logic controllers (FLC’s) have generated a good deal of interest in certain
application. The advantages of FLC’s over the conventional controllers are :

(i) It does not need accurate mathematical model;


(ii) It can work with imprecise inputs;
(iii) It can handle non-linearity, and
(iv) It is more robust than conventional nonlinear controllers.

 The FLC seems to be a viable controller for non linear applications

S Jain, NITB, Material for Educational


26/10/2020 8
Purpose
Fuzzy Logic
• Form of AI – development of computer program based on human
intelligence

FUZZY LOGIC PRINCIPLE


• Fuzzy logic, unlike Boolean or crispy logic, deals with problems that have
Vagueness,
Uncertainty,
Imprecision, or
Qualitative-ness, as mentioned before.
• Boolean logic - logic 1 or logic 0.
• Fuzzy logic - degree of membership range of 0 to 1

Ex. –
• Temperature representation
• Marks Distribution
• Diagnostics
26/10/2020 • Robotics S Jain, NITB, Material
Purpose
for Educational
9
• A fuzzy variable has values that are expressed by natural English language.

For example, the stator temperature of a motor can be defined by

• Qualifying linguistic variables (also defined as fuzzy sets or fuzzy subsets)


COLD, MILD, or HOT (Fig. 1),

• The fuzzy sets can have more subdivision, such as ZERO, VERY COLD,
MEDIUM COLD, MEDIUM HOT, VERY HOT and so on, for precious
description of the variable.

• Although the triangular membership function is most commonly used, the shape
may be trapezoidal or Gaussian (bell shaped).

S Jain, NITB, Material for Educational


26/10/2020 10
Purpose
CRISPY/BOOLEAN LOGIC

COLD MILD HOT

Temp
0 20 30 50

FUZZY LOGIC

COLD HOT
MILD
1

Degree of Membership

Temp
0 20 30 50

Universe of Discourse

S Jain, NITB, Material for Educational


26/10/2020 11
Purpose
Areas & Applications
Fuzzy logic has recently been applied
o In process control,
o Modeling,
o Estimation,
o Identification,
Areas –
o Diagnostics,
• Fuzzy Control
o Stock market prediction, • Fuzzy Pattern Recognition
o Agriculture, • Fuzzy Arithmetic
o Military science etc. • Fuzzy Probability Theory
• Fuzzy Decision Analysis
• Fuzzy Neural Networks Theory

S Jain, NITB, Material for Educational


26/10/2020 12
Purpose
Steps Involved
• Describing human knowledge having vague concepts
• Develop a cost effective solution

Motivation
- Solving real world problem with vague input
(Control complex process)
- Use of AI
(Use of human knowledge - implement control
strategies of operator)

Ex – Bath water temp


- Speed control of bike
- Washing Machine
26/10/2020
- Robots S Jain, NITB, Material for Educational
13
Purpose
Automatic Washing Machine

Problem – Selection of
- Washing Cycle
- Washing Time

Automated
Selection

Use of Nature of Human decision making (daily life example)

Goal – Simple & auto operation


26/10/2020
of machine
S Jain, NITB, Material for Educational with high quality
14
Purpose
Applications
• Consumer Products
• Cam & camcorders (Image stabilisation), Washing Machine,
Refrigerators, Vacuum Cleaners etc
(Whirlpool, canon, sharp, siemens)
• Automotive & Power Generation
• Power train & transmission control in automobiles, Engine control
(Honda, Mazda, Nissan)
• Industrial Process Control
• Cement Kiln, Refining, Distillation

• Robotics and Manufacturing

S Jain, NITB, Material for Educational


26/10/2020 15
Purpose
2. Basics of Fuzzy Logic
2.1 Fuzzy Sets – sets with boundaries
• Difference of Fuzzy and Classical Sets
• Fuzzy Membership Function
– set represent smooth and gradual transition
- Symmetric & Asymmetric
• Design a MF
• Linguistic Variables – which can be described by qualitative &
quantitative fuzzy sets

2.2 Membership functions & their design


- Possibility distribution

2.3 Fuzzy If-Then Rules – Knowledge

2.4 Fuzzy Operators


S Jain, NITB, Material for Educational
26/10/2020 16
Purpose
• Design a MF
• By experience of concerned (big limitation – based on trail & error)
• From available data (used with ANN & Genetic)
• From feedback

• Guide Lines to Design a MF


• Use of parameterized functions [Tri MF – 3 parameters]
[ Trapz MF – 4 parameters]
• Simplicity
• To learn MF (with ANN) choose a differential (continuous) MF

S Jain, NITB, Material for Educational


26/10/2020 17
Purpose
Fuzzy Membership Function
Symmetrical Triangular MF
Asymmetrical Triangular MF

Degree of membership
Degree of membership

Trapazoidal MF

Degree of membership
1
1 1

0.5 0.5 0.5

0 0 0
0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
Universe of Discourse Universe of Discourse Universe of Discourse

y = trimf(x, [2 4 6]); y = trimf(x, [2 4 8]); y = trapmf(x, [2 3 7 9]);

Gaussian MF Gaussian Bell MF Sigmoidal MF

Degree of membership
Degree of membership

Degree of membership

1 1 1

0.5 0.5 0.5

0 0 0

0 2 4 6 8 10 0 2 4 6 8 10 0 2 4 6 8 10
Universe of Discourse Universe of Discourse Universe of Discourse

y = gaussmf(x, [1 5]); y = gbellmf(x, [2 4 6]); Sigmoidal-right MF


y = sigmf(x, [4 5]);

S Jain, NITB, Material for Educational


26/10/2020 18
Purpose
3. Internal Structure of Fuzzy System

The main components of fuzzy system are -


• (i) Fuzzification ; which is the classification of input data into suitable
linguistic values or sets;
• (ii) Decision making : which is inferring fuzzy control action from knowledge
of the control rules and the linguistic variable definition; and
• (iii) Defuzzification : which is the conversion of the inferred fuzzy control
action to a crisp or non-fuzzy control action.

e(n)
Imax(n)
Imax=Imax(n-1)
Fuzzification Defuzzification +Imax(n)
Vdc,ref

ce(n)
Vdc

Decision making

Fuzzy Logic Controller

S Jain, NITB, Material for Educational


26/10/2020 19
Purpose
The Non-Fuzzy Approach
tip = 0.15 tip=0.20/10*service+0.05

tip = 0.20/20*(service+food)+0.05;

S Jain, NITB, Material for Educational


26/10/2020 20
Purpose
The Fuzzy Approach
Rule descriptions.
1. If service is poor, then tip is cheap
2. If service is good, then tip is average
3. If service is excellent, then tip is generous

Including the food’s effect on the tip


4. If food is rancid, then tip is cheap
5. If food is delicious, then tip is generous

Combine the two different lists of rules


1. If service is poor or the food is rancid, then tip is cheap
2. If service is good, then tip is average
3. If service is excellent or food is delicious, then tip is generous

S Jain, NITB, Material for Educational


26/10/2020 21
Purpose
Fuzzy Inference System for restaurant tipping
2- input, 3-rule, 1-output fuzzy System

Rule 1
Input 1
Service (0 -10) Fuzzification
Output
Rule 2 Defuzzification
Input 2 Tip (0-25%)
Fuzzification
Food (0 -10)
Rule 3
Crispy Input Fuzzy Input Fuzzy Output Crispy Output

Variables of fuzzification

Fuzzy variables Linguistic Numerical range Membership functions


variables
Input Service 0–10 Poor, good, and excellent
Food 0–10 Bad and delicious
Output Tip 0–20% Cheap, average and generous

S Jain, NITB, Material for Educational


26/10/2020 22
Purpose
Second Input Variable ‘Food’
First Input Variable ‘Service’

Output Variable ‘Tip’ (in %)

S Jain, NITB, Material for Educational


26/10/2020 23
Purpose
Information processing in a fuzzy inference system for
restaurant tipping
Rule 1 : If service is poor or the food is bad, then tip is cheap
Input 1 Input 2 Output Implication
1
Poor Bad Cheap
µpoor = 0.5 0.5

µbad = 0

0 2 4 6 8 10 0 1 3 5 7 9 0% 5 10 15 20%
0% 5 10 15 20%
Rule 2 : If service is good, then tip is average
Good Average
No impact of
input Food
0.3
µgood = 0.3

0 2 4 6 8 10 0 1 3 5 7 9 0% 5 10 15 20%
0% 5 10 15 20%
Rule 3 : If service is excellent or food is delicious, then tip is generous
Excellent Delicious Generous

µdelicious = 0.4 0.2


µexce = 0

0 2 4 6 8 10 0 1 3 5 7 9 0% 5 10 15 20%
0% 5 10 15 20%
Aggregation
Service = 3 Food = 7.5

Tip = 8.5%

0% 5 10 15 20%

S Jain, NITB, Material for Educational


26/10/2020 24
Purpose
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 25Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
• Mamdani Type – commonly used

• Lusing Larson Type – scaled to peak value instead of truncating

• Sugno Type – o/p MFs are constant, or have linear relation


(used in Adaptive Neuro Fuzzy inference system, ANFIS)

S Jain, NITB, Material for Educational


26/10/2020 26
Purpose
PRINCIPLE OF FUZZY CONTROL

IF – THEN production rules.

Ex. - for a boiler control


IF TEMPERATURE IS LOW AND
PRESSURE IS HIGH
THEN SET THE FUEL VALVE TO MEDIUM
FUZZY VARIABLES corresponding to fuzzy sets
- LOW, MEDIUM, HIGH, and so on, are
- the temperature,
- pressure, and
- fuel valve setting
Rule may appear as
IF TEMPERATURE < 150oF AND PRESSURE > 50 PSI
THEN SET THE FUEL VALVE 50%
S Jain, NITB, Material for Educational
26/10/2020 27
Purpose
Design a Fuzzy Controller

S Jain, NITB, Material for Educational


26/10/2020 28
Purpose
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 29Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 30Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 31Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 32Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 33Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
S Jain, NITB, Material for Educational
26/10/2020 34
Purpose
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 35Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 36Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
IMPLEMENTATION OF FUZZY CONTROL

S Jain, NITB, Material for Educational


26/10/2020 37
Purpose
S Jain, NITB, Material for Educational
26/10/2020 38
Purpose
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 39Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 40Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 41Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 42Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 43Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 44Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
“Modeling and Simulation using MATLAB – SIMULINK”
S Jain, NITB, Material for Educational by Shailendra Jain, MANIT
26/10/2020 45Bhopal
Purpose Copyright  2011 Wiley India Pvt. Ltd. All rights reserved.
Fuzzy Logic Controlled SAPF

Vsa x 0.1(volts) Vsa x 0.1(volts)


Transient Response (Switch-in response)

Vsa x 0.1(volts) Vsa x 0.1(volts)


35 35
iLa (amps)

iLa (amps)
&

0 0

&
-35 -35
0 0.05 0.1 0.15 0.2 0.25 0 0.05 0.1 0.15 0.2 0.25
35 35
isa (amps)

isa (amps)
&

0 0

&
-35 -35
0 0.05 0.1 0.15 0.2 0.25 0 0.05 0.1 0.15 0.2 0.25
20 20
(amps)

(amps)
ica

0 0

ica
-20 -20
0 0.05 0.1 0.15 0.2 0.25 0 0.05 0.1 0.15 0.2 0.25
760 760
(volts)

(volts)
Vdc

Vdc
680 680

600 600
0 0.05 0.1 0.15 0.2 0.25 0 0.05 0.1 0.15 0.2 0.25
time (sec) time (sec)

(a) (b)

Fig. 5.5 Switch-in response of 3-phase, 3-wire system (Diode rectifier with RL load)
(a) Fuzzy controller
(b) PI controller

S Jain, NITB, Material for Educational


26/10/2020 46
Purpose
Fuzzy Logic Controlled SAPF

Transient Response (Load Perturbation response)

Vsa x 0.1(volts) Vsa x 0.1(volts)


35
Vsa x 0.1(volts) Vsa x 0.1(volts)

iLa (amps)
35
iLa (amps)

&
0
&

-35
-35 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45 35
35

isa (amps)
isa (amps)

&
0
&

-35
-35 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45 20
20

(amps)
(amps)

ica
0
ica

-20
-20 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45 700
700

(volts)
(volts)

Vdc
Vdc

680
680
660
660 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45
time (sec)
time (sec)

(a) (b)

Fig. 5.6 Simulation results during sudden decrease in load current, phase A
(diode rectifier with RL load)
(a) Fuzzy controller
(b) PI controller

S Jain, NITB, Material for Educational


26/10/2020 47
Purpose
Fuzzy Logic Controlled SAPF

Transient response

Table 5.2
Parameters during transient conditions (diode rectifier with RL load)

Parameter Fuzzy PI Controller


Controller

Settling time Approx 2.5 Approx 5


cycles cycles

Vdc rise/dip (% of Vdc,ref)


During load change from 14.35 A to 6.2 A. 2.5% 2.79%

During change of load current from 6.2 to 2.46% 2.79%


14.35 A
Vdc peak to peak ripple at
14.35 A (rms) 0.9 Volt 0.9 Volt

6.2 A (rms) 0.55 Volt 0.6 Volt

S Jain, NITB, Material for Educational


26/10/2020 48
Purpose
Fuzzy Logic Controlled SAPF

Phase Plane Trajectory during Transients

20 20

10 10
change in error (ce)

change in error (ce)


0 0

-10 -10
PI PI
Fuzzy Fuzzy
-20 -20
-20 -10 0 10 20 -20 -10 0 10 20
error (e) error (e)

Fig. 5.7(a) Phase plane trajectory during sudden Fig.5.7) Phase plane trajectory during
decrease in load current from steady state for sudden increase in load current, from steady
similar time interval (0.3 to 0.35 sec) state for similar time interval (0.45 to 0.5 sec)

S Jain, NITB, Material for Educational


26/10/2020 49
Purpose
Fuzzy Logic Controlled SAPF

Transient Response (Diode Rectifier with RC load)

40 40
(amps)

(amps)
iLa
iLa

0 0

-40 -40
0.25 0.3 0.35 0.4 0.45 0.25 0.3 0.35 0.4 0.45

Vsa x 0.1(volts)
35 35
Vsa x 0.1(volts)

isa (amps)
isa (amps)

&
0
&

-35
-35 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45
700
700

(volts)
Vdc
(volts)

680
Vdc

680

660
660 0.25 0.3 0.35 0.4 0.45
0.25 0.3 0.35 0.4 0.45 time (sec)
time (sec)

(a) (b)

Fig. 5.8 Simulation results during sudden decrease in load current


(diode rectifier with RC load)
(a) Fuzzy controller
(b) PI controller

S Jain, NITB, Material for Educational


26/10/2020 50
Purpose
S Jain, NITB, Material for Educational
26/10/2020 51
Purpose

You might also like