You are on page 1of 24

21-11-2020

• According to Bezdek (1994), Computational


Computational Intelligence is a subset of Artificial
Intelligence.
Intelligence and Artificial
• There are two types of machine intelligence:
Intelligence. • the artificial one based on hard computing
techniques
• and the computational one based on soft
computing methods, which enable adaptation
to many situations.

What is Computational Intelligence? Swarm Intelligence


According to Engelbrecht CI consists of five paradigms-

• Neural Networks
• Evolutionary Computations (Genetic Algorithms)
• Swarm Intelligence (Particle Swarm, Ant Colony, etc.)
• Fuzzy Systems Swarm-intelligence principles inspired by the collective insect
• Artificial Immune Systems societies are used for developing computer algorithms and motion
control principles for robotics.

1
21-11-2020

Swarming – The Definition Why do animals swarm?


• aggregation of similar animals, generally cruising in the same • To forage better
direction • To migrate
• As a defense against predators
• Termites swarm to build colonies • Social Insects have survived for millions of years.
• Birds swarm to find food
• Bees swarm to reproduce

Swarming is Powerful Swarming – Example


• Swarms can achieve things that an individual cannot • Bird Flocking

• “Boids” model was proposed by Reynolds


• Boids = Bird-oids (bird like)

2
21-11-2020

Only three simple rules

Velocity Matching
Only three simple rules
• Rule 2: Match the velocity of neighboring birds

• members try to avoid colliding with other members of the group


and other objects in environment

Flock Centering
• Rule 3: Stay near neighboring birds
Swarming - Characteristics
• Simple rules for each individual

• No central control
• Decentralized and hence robust

• Emergent
• Performs complex functions

• members try to stay as close as possible to the center of the flock or school
 centering the flock locally reduces computational complexity

3
21-11-2020

Swarm Intelligence - Definition


• Particle Swarm Optimization
• Particle swarm optimization (PSO) is a population-based
• “any attempt to design algorithms or distributed problem-solving stochastic optimization algorithm motivated by intelligent collective
devices inspired by the collective behavior of social insect colonies behavior of some animals such as flocks of birds or schools of fish.
and other animal societies” [Bonabeau, Dorigo, Theraulaz: Swarm • metaheuristic algorithm based on the concept of swarm intelligence
capable of solving complex mathematics problems existing in engineering.
Intelligence]
• Solves optimization problems • Ant Colony Optimization
• the ant colony optimization algorithm (ACO) is a probabilistic technique
for solving computational problems which can be reduced to finding good
Swarm intelligence systems are: paths through graphs.
• Robust • Artificial Ants stand for multi-agent methods inspired by the behavior of
• Relatively simple real ants.

Particle Swarm Optimization


• Particle swarm optimization imitates human or insects social
behavior.
• Individuals interact with one another while learning from
their own experience, and gradually move towards the goal.
• It is easily implemented and has proven both very effective
and quick when applied to a diverse set of optimization • Bird flocking is one of the best example of PSO in
problems. nature.
• One motive of the development of PSO was to model
human social behavior.

4
21-11-2020

Applications of PSO
• Neural networks like Human tumor analysis, Computer numerically
controlled milling optimization;
• Ingredient mix optimization;
• Pressure vessel (design a container of compressed air, with many
Ant Colony Optimization
constraints).

Basically all the above applications fall in a category of finding the


global maxima of a continuous, discrete, or mixed search space, with
multiple local maxima.

Ant Colony Optimization - Biological


Foraging behavior of Ants
Inspiration
• Inspired by foraging behavior of ants.
• Ants find shortest path to food source from nest.
• Ants deposit pheromone along traveled path which is used by other ants
to follow the trail.
• This kind of indirect communication via the local environment is called
stigmergy.
• Has adaptability, robustness and redundancy. • 2 ants start with equal probability of going on either
path.
A pheromone is a chemical that an animal produces which changes the behavior of another animal of the
same species.
Stigmergy (/ˈstɪɡmərdʒi/ STIG-mər-jee) is a mechanism of indirect coordination, through the
environment, between agents or actions.

5
21-11-2020

Foraging behavior of Ants Foraging behavior of Ants

• The ant on shorter path has a shorter to-and-fro time • The density of pheromone on the shorter path is higher because
from it’s nest to the food. of 2 passes by the ant (as compared to 1 by the other).

Foraging behavior of Ants Foraging behavior of Ants

• The next ant takes the shorter route. • Over many iterations, more ants begin using the path
with higher pheromone, thereby further reinforcing
it.

6
21-11-2020

Foraging behavior of Ants Generic ACO


• Formalized into a metaheuristic.
• Artificial ants build solutions to an optimization problem and
exchange info on their quality vis-à-vis real ants.
• A combinatorial optimization problem reduced to a construction
graph.
• Ants build partial solutions in each iteration and deposit pheromone
• After some time, the shorter path is almost on each vertex.
exclusively used.

A metaheuristic is a high-level problem-independent


algorithmic framework that provides a set of guidelines or
strategies to develop heuristic optimization algorithms

List of applications using SI growing fast • Neural networks are parallel computing devices, which is
Swarm Intelligence-based techniques can be used in a number of basically an attempt to make a computer model of the brain.
.
applications
• Controlling unmanned vehicles. • The main objective is to develop a system to perform various
computational tasks faster than the traditional systems.
• Satellite Image Classification
• These tasks include pattern
• Movie effects  recognition and classification,
• A 1992 paper by M. Anthony Lewis and George A. Bekey discusses the possibility of  approximation,
using swarm intelligence to control nanobots within the body for the purpose of killing
cancer tumors.  optimization,
• Conversely al-Rifaie and Aber have used Stochastic Diffusion Search to help locate  and data clustering.
tumours.
• Swarm intelligence has also been applied for data mining.

7
21-11-2020

Biological Neuron

What is Artificial Neural Network? A nerve cell neuron is a special biological cell that processes information.

According to an estimation, there are huge number of neurons, approximately 1011 with
Artificial Neural Network ANN is an efficient computing numerous interconnections, approximately 1015.
Schematic Diagram
system whose central theme is borrowed from the analogy
of biological neural networks.

ANNs are also named as “artificial neural systems,” or


“parallel distributed processing systems,” or “connectionist
systems.”

Working of a Biological Neuron ANN versus BNN

let us take a look at the similarities based on the terminology between these two.
As shown in the above diagram, a typical neuron consists of the
following four parts with the help of which we can explain its
working − Biological Neural Artificial Neural
•Dendrites − They are tree-like branches, responsible for receiving Network BNNBNN Network ANNANN
the information from other neurons it is connected to. In other Soma Node
sense, we can say that they are like the ears of neuron.
Dendrites Input
•Soma − It is the cell body of the neuron and is responsible for
processing of information, they have received from dendrites. Synapse Weights or
•Axon − It is just like a cable through which neurons send the Interconnections
information. Axon Output
•Synapses − It is the connection between the axon and other
neuron dendrites.

8
21-11-2020

Model of Artificial Neural Network

• ANN acquires a large collection of units that are interconnected in some


pattern to allow communication between the units. Applications:
• These units, also referred to as nodes or neurons, are simple processors
which operate in parallel. •Data Compression.
• Every neuron is connected with other neuron through a connection link. •Pattern Recognition.
• Each connection link is associated with a weight that has information •Computer Vision.
about the input signal. •Sonar Target Recognition.
• This is the most useful information for neurons to solve a particular •Speech Recognition.
problem because the weight usually excites or inhibits the signal that is •Handwritten Characters Recognition
being communicated.
• Each neuron has an internal state, which is called an activation signal.
• Output signals, which are produced after combining the input signals and
activation rule, may be sent to other units.

9
21-11-2020

FUZZY LOGIC

BASIC CONCEPTS
AND
THEORY

10
21-11-2020

CONCEPT AND DEFINITION OF FUZZY LOGIC

• “Fuzzy refers to blurry, imprecise in shape or frayed (Oxford University 1993)”.

• Fuzzy logic can be defined as a branch of mathematics, the theory for which was provided by
Zadeh for modelling imprecision and vagueness of cognitive process inherent in human and to
solve complex and poorly defined problems due to incomplete, ambiguous, vague and uncertain
information of the real-world system.

• This theory is found suitable for those reasoning which are based uponhuman intuitive thinking,
uncertainty and approximation.

• The concept of fuzzy logic is based on multiple-valued logic; it processes and introduces
interpretations which are expressed in vague linguistic terms rather than exact and precise crisp
value. The theory is very useful for handling the partial truth issues.

11
21-11-2020

Example of fuzzy set


Let us discuss about fuzzy set.
X = All students in PHD
S = All Good students.
Debasis

12
21-11-2020

13
21-11-2020

Fuzzy Membership
Functions
Debasis

DIFFERENCE BETWEEN CRISP SET AND FUZZY SET

• Difference between crisp set and fuzzy set can be explained with the following example:
• Consider the example of the “height of a student”. Any one might state that “height of a student less than 150 cm
is short”. In classical set this statement is expressed as short = {x|x ≤ 150} and the membership function for this
statement is represented as shown in fig.

14
21-11-2020

MEMBERSHIP FUNCTION Contd…


• In contrast to classical set where a clear and sharp boundary of membership function are
allowed but in the case fuzzy sets fuzzy or blurred boundaries are permitted by the introduction • The term ‘Linguistic variable’ refers to a variable the values for which are expressed in “linguistic terms” rather
of the concept of membership degree. For a height of 155cm the degree of membership is zero than numerically. In this example as shown in fig. 3.14, ‘Height’ is a linguistic variable whose linguistic value is
‘short’. It can be expressed through other linguistic variables such as ‘very short’, ‘moderately short’ and ‘tall’ and
in case of classical set .It is not at all considered a member of group of short persons, Whereas ‘very tall’. All linguistic values are characterized by a fuzzy set (membership function) and the features and
a height of 155cm can be taken into consideration as short with a lesser degree of membership characteristics of each fuzzy set depend on the type of the problem. They can be defined by the following quintuple
function than for 150cm (i.e μ short(x = 155) = 0.75) in fuzzy set. • Linguistic variable = (x, H (x), U, R)
• Where,
• x represents the name of variable
• H (x) represents the set of linguistic terms which consists of value of the variable
• U stands for set of universe of discourse
• R stands for semantic rules which map terms in H (x) to fuzzy sets in U

Contd… MEMBERSHIP FUNCTION DIAGRAM

• The linguistic variable A to describe ‘Height ‘' can be represented as:


• A = (Height, H (Height), U, R) In fuzzy logic a membership function (MF) is represented by a curve that defines the fuzziness value (or degree of
membership) of linguistic variables in between 0 and 1. Membership function gives a numerical meaning for each
• Height: name of the variable A label.
• H (Height) = {short, moderately short, tall, very tall} set of linguistic terms to describe height.
• U: [0-200] universe of discourse
• These linguistic terms are of subjective nature; they can be expressed in given example as:
• ‘short’ is for height below about 150cm
• ‘moderately short’ is for height around 160 cm
• ‘tall’ is for height around 170 cm
• ‘Very tall’ is for height around 180 cm

15
21-11-2020

MEMBERSHIP FUNCTIONS TRAPEZOIDAL FUZZY NUMBER


• There are different shapes of membership functions, viz, triangular, trapezoidal, Gaussian, generalized bell-shaped,
piecewise-linear etc.
• A triangular fuzzy number x with membership function can be expressed as given below:
• A fuzzy number x with membership function can be expressed as shown in fig.

FUZZY RULES
Fuzzy Rules: In fuzzy expert systems, linguistic variables are used
• A fuzzy system is a compilation of IF-THEN rules that connect input linguistic variables to an
output value. Each fuzzy rule contains the antecedent and the consequent that includes fuzzy in fuzzy rules. For example:
propositions. These propositions in turn are statements and join the linguistic variables with o IF wind is strong THEN sailing is good.
linguistic operators “and”, “or” and “not”. o IF project_duration is long THEN completion_risk is high.
o IF speed is slow THEN stopping_distance is short.
• The general form of a fuzzy rule used in fuzzy logic control system can be explained by relation
as given below:  For Air Conditioner example, the following rules can be used:
1) IF (temperature is cold OR too-cold) AND (target is warm)
• If x1 is A1 AND x2 is A2 then y is B
THEN command is heat.
2) IF (temperature is hot OR too-hot) AND (target is warm)
THEN command is cool.
• Where x1, x2 are input linguistic variables with A1, A2 being their corresponding fuzzy values 3) IF (temperature is warm) AND (target is warm) THEN
and y is the output linguistic variable with B as its fuzzy value.
command is no-change.

16
21-11-2020

DEFUZZIFICATION FUZZY OPERATORS

• Defuzzification • Important fuzzy operators “AND”, “OR” and “NOT” are employed to construct the
• Defuzzification can be described as the procedure of obtaining a single crisp number from the fuzzy rules. These "fuzzy combination" operators can be explained as follows:
output of the aggregated fuzzy set resulting from fuzzy inference process. As the fuzzy
outcome which is produced through fuzzy inference cannot be applied as it is in the
• Consider the two fuzzy sets A and B be with membership functions μA(x) and
applications; hence the fuzzy quantities are converted into crisp quantities for further μB(x) respectively.
processing. Defuzzification reduces the collection of membership function values in to a single • The intersection operation (corresponds to the logical ‘AND’) can be defined as:
crisp value.
• μA∩B(x) = min [μA(x), μB(x)]
• The following are the known methods of defuzzification.
• Center of sums method (COS) • Union operation (which corresponds to the logical ‘OR’) can be defined as:
• Center of gravity (COG) / Centroid of area (COA) method • μAUB(x) = max [μA(x), μB(x)]
• Center of area / Bisector of area method (BOA) • Complement operator can be defined as (which is corresponding to the logical
• Weighted average method operator ‘NOT’):
• Maxima Methods • μA¯(x) =1 − μA(x)

FUZZY OPERATORS FUZZY INFERENCE

17
21-11-2020

STEPS OF FUZZY INFERENCE Contd….


• STEP 1: Fuzzification
• STEP 3: Apply implication method
• The input variable and output variables are first of all defined. For input and output variables, Fuzzy sets in the
form of fuzzy number are generated. Instead of using the numerical value, fuzzy sets are used to represent a • The weights of the rules first should be determined to apply the implication method, each rule weights
variable in terms of human language. The membership function is used to denote the degree that each variable between 0 and 1, which is used when one rule is relatively important then other but normally this weight
belongs is a part of certain fuzzy set. Afterwards fuzzy input values are generated by fuzzification process by taking is 1 and hence does not affect the implication process. As a consequent a fuzzy set is obtained which is
a real time input value and by evaluating it with the stored membership function. Fuzzy sets of any shape such as represented by a membership function. The input for the process of implication is a single figure given
triangular, trapezoidal, Gaussian, generalized bell shaped etc. can be employed for this purpose. by the antecedent and the output is a fuzzy set. Implication process is applicable for each rule. Built-in
• STEP 2: Apply fuzzy operator methods ‘AND’ method: min (minimum) truncates the output fuzzy set whereas and prods (product)
method scales the fuzzy set of output variable.
• When antecedent portion of a rule includes more than a number of rules, fuzzy operators are needed to be
applied. These rules are combined and converted into single rule by using this fuzzy operator, which is the product • Step 4: Aggregate all outputs
of the entire antecedent for that rule. The input which is provided to the fuzzy operator has two or more than two • All the fuzzy sets so obtained as output of each rule are combined by aggregating them. Aggregation is
membership values but the result is a single truth value. As described in Logical Operations section there are performed prior to defuzzification.
three built in method such as ‘AND’ methods to supports min (minimum), prod (product) OR methods to support
max (maximum), and the probabilistic OR method .The probabilistic OR method (also known as the algebraic sum) • Step 5: Defuzzify
is calculated as per the following equation:
• The output of the independent variables and the inference rules is the fuzzy set of the generated
• Probor (a, b) = a + b - ab dependent variable. These aggregated fuzzy set has a variety of output values, hence they are defuzzified
to get a single output value. After defuzzification, a numerical value may be used to represent the output
fuzzy set.

FUZZY LOGIC TOOLBOX OF MATLAB PROGRAM SOFTWARE MAIN FEATURES OF GUI TOOLBOX

• Fuzzy inference process to obtain crisp output from input data is performed using Fuzzy Logic • Main features of GUI toolbox is being described in this section. It consists of
Toolbox™ software of MATLAB Program. The Tool box is a compilation of all the functions following five primary graphical user interface (GUI) tools (see fig.3.22) which are
of the MATLAB® software’s mathematical computing environment. Fuzzy logic tool box used to build, edit, and observe fuzzy inference process in the toolbox.
provides tools to edit and create fuzzy inference systems. The toolbox provides three categories
of tools:
• Fuzzy Inference System (FIS) Editor
• Membership Function Editor
• Following three types of tools are provided • Rule Editor
• Command line functions • Rule Viewer
• Graphical, interactive tools
• Surface Viewer
• Simulink blocks and examples

18
21-11-2020

MAIN COMPONENTS OF GUI TOOLBOX FIS EDITOR


WINDOW
FIS Editor window is shown in fig. The input and
output variables are specified in FIS Editor.
Number names, range and the form of input and
output are edited using FIS editor. Fuzzy
inference functions such as defuzzication methods
can also be edited by FIS editor.

MEMBERSHIP
FUNCTION EDITOR
Graphical User Interface (GUI) Tools
Fuzzy Inference System (FIS) Editor As shown in fig. membership functions of each
variable of input and output are edited by
Membership Function Editor. All variables name,
shape, range and numbers are specified and
edited by means of it.
Define number of
input and output
variables

Adjust fuzzy Name and edit


inference names of input,
functions output variables

October 2005 75

19
21-11-2020

RULE EDITOR
Graphical User Interface (GUI) Tools
As shown in fig. , Rule Editor edits the
Membership Function Editor various rules constructed in the system. As
mentioned earlier fuzzy systems are collection
of IF-THEN rules. Such rules connect input
variables to an output variable. Each fuzzy rule
is constructed by the antecedent and the
consequent component by including fuzzy
proposition. These propositions statements link
Select & edit
the various variables with the help of fuzzy
attributes of operators such as “and”, “or” and “not”. Using
membership the rule editor general structure of a fuzzy rule is
function constructed.
If x1 is A1 AND x2 is A2 then y is B
Where x1, x2 are input linguistic input
Display & edit Name & edit variables and A1 and A2 are corresponding fuzzy
values of current parameters of values to x1 and x2, y is the output linguistic
variable membership variable and B is its corresponding fuzzy value.
function These fuzzy Rules could be deleted, added or
changed; Rules weights that can be applied to
each fuzzy rule if needed are signified through a
number in parentheses.
October 2005 77

RULE VIEWER
Graphical User Interface (GUI) Tools Fuzzy inference process is presented
through rule viewer as shown in fig. The
Rule Editor basic function of it is to determine that how
an individual membership function shapes
manage the output. Rows of plots represent
rules and various columns represent number
of variables. First three columns of plots
(the six yellow plots) demonstrate the
Rules –
membership functions of input variable that
automatically
refers to the antecedent which means the if-
updated
part of the rules. The last column of plots
(the three blue plots) shows the output
variable’s membership function that is
refers to the consequent which means then-
part of each rule. By the Rule Viewer entire
Create and edit fuzzy inference process can be understood
rules immediately. Rule Viewer also explains that
how the different membership functions of
input variables controls the output result.

October 2005 79

20
21-11-2020

Graphical User Interface (GUI) Tools SURFACE VIEWER


Rule Viewer It may be called as a micro viewer of the
“fuzzy inference system’’ as it presents a
kind of micro view of the fuzzy inference
system. The output surface that is, the
complete span of the output variable set
Shows how input which are the result of the entire span of the
variable is used in input variable set can be observed. The
rules Surface Viewer has an extraordinary
potential that is very useful with two or
more inputs and one output. The axes of the
Surface Viewer could be repositioned in
Shows how output
variable is used in
order to observe a diverse three-
rules; shows dimensional view on the data.
output of fuzzy
system

October 2005 81

Graphical User Interface (GUI) Tools


Surface Viewer
The Tipping Problem

Let’s create a fuzzy control system which models how


you might choose to tip at a restaurant.
Shows output
surface for any
system output
versus any one (or • When tipping, you consider the service and food
Specify input and two) inputs
output variables quality, rated between 0 and 10.
• You use this to leave a tip of between 0 and 25%

October 2005 83

21
21-11-2020

Inputs
• Service •Consequents (Outputs)
• Universe (ie, crisp value range): How good was the • Tip
service of the wait staff, on a scale of 0 to 10?
• Fuzzy set (ie, fuzzy value range): Poor, Good, • Universe: How much should we tip, on a scale of 0% to 25%

Excellent • Fuzzy set: Cheap, average, generous

• Food quality

• Universe: How tasty was the food, on a scale of 0 to 10?


• Fuzzy set: rancid , delicious

Golden rules for tipping:


Usage
1. IF the service is poor OR the food is rancid, THEN tip is cheap
(5%). • If I tell this controller that I rated:
• the service as 3, and
2. IF the service is good, HENCE tip is average (15%).
• the quality as 8,
3. IF the service is excellent OR the food is delicious, THEN tip is
generous (25%). • it would recommend I leave:
• a 14.8% tip.

87

22
21-11-2020

Example: Dinner for two Example: Dinner for two


Fuzzy Inference System (FIS) Editor

input
variables

output
variable

October 2005 89 October 2005 90

Example: Dinner for two Example: Dinner for two


Membership Function Editor Rule Editor

Select type of
membership
function
October 2005 91 October 2005 92

23
21-11-2020

Example: Dinner for two Example: Dinner for two


Rule Viewer Defuzzified Surface Viewer
output

October 2005 93 October 2005 94

24

You might also like