Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Fuzzy Controller

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Fuzzy Controller

“Fuzzy controllers are used to control the working of a plant


by using fuzzy logic.”

The fuzzy controllers are widely used in the daily life style like for
controlling room temperature with the help of AC, in washing
machines, for auto-speed control in cars etc.

Difference between classical set and fuzzy set

To understand the fuzzy logic, first we’ve to understand the


difference between classical set theory and fuzzy set theory.

In the classical set theory the output variables are only two – true (1)
and false (0) or say the membership function is either 1 or 0, but true
and false is sometimes insufficient when describing human
reasoning. In the fuzzy set theory the output variables/membership
function have a certain degree which lies between 0 and 1 and
instead of values such as true and false, it has multivalued logics such
as true, very true, less true, false, very false, less false etc. Unlike
classical sets, the fuzzy sets have a certain degree of membership for
each element. This allows the plant to settle on the reference input
smoothly. And thus for the imprecise data, fuzzy set is used.

Now, because the elements can have a certain degree of


membership, the functions used are called as the membership
functions.
Let’s consider an input variable x and X to be the field. Then the fuzzy
set A in field X is defined as A={x,µA(x);x∈X}, where µA(x) is the
membership function of x in the fuzzy set A and it ranges from 0
to 1 i.e. µA(x)∈[0,1].

Design of the fuzzy controller

Block diagram of fuzzy controller

The fuzzy controller controls the working of the plant (ex. Air
conditioner, washing machine etc.). The controller tries to match the
reference/desired input with the response output of the signal
(sensed by the sensor).
There are 3 major components used in the fuzzy controller, which
are:

1. Fuzzification & knowledge data base

2. Fuzzy inference system (fuzzy rule base)

3. Defuzzification

Fuzzification

It is referred to convert crisp value inputs into fuzzy value


outputs. It spreads the information provided by the crisp inputs. The
knowledge data base decides the variables and after finding the
variables they are fuzzified by passing through the fuzzification block.
Because the fuzzy rule base employs the rules on only linguistic
variables, the crisp values has to be converted to fuzzy linguistic
variables first. This process of converting crisp numerical variables
into fuzzy variables is called the fuzzification process. The output of
fuzzification process can be called as input fuzzy variables as they are
the inputs for the fuzzy inference system. The fuzzification block is
also known as the fuzzifier.

The knowledge data base uses membership function to define the


input variables into fuzzy variables. The knowledge data base
contains predefined trained data which is used to fuzzify the crisp
input.

Fuzzy inference system

The fuzzy inference system changes the fuzzy variables as per


certain rules. These rules are most important requirement for the
controller. It generally consists of various types of If-Then rules.
Earlier the fuzzy sets and membership functions were decided. Then
a particular If-Then rule is decided for the membership function for a
particular control. That’s how the output is controlled by using these
rules.

Two famous and important types of fuzzy inference methods are:

1. Mamdani fuzzy inference


2. Sugeo fuzzy inference

Fuzzy Rule Base:

The relation between error and change in error to get certain output
is fed into the fuzzy rule base.

The variables considered in the control are:

Z – Zero

PM – Positive Medium

NM –Negative Medium

PL – Positive Large

NL – Negative Large

Consider these 5 variables for the ‘error’ and 5 for the ‘change in
error’. And the same 5 variables for the output too.

Consider the control as:

If error (e) = 0 and change in error (ce) = 0, then no change in


the control.
If e = Non-zero but change in error is zero or almost zero (if
acceptable), then control should be according to the magnitude and
sign of the error.

It is like,

If e is Z

and

ce is PM

then

output is PM

This whole process can be simply shown in a random table as:

ce\e NL NM Z PM PL
NL NL NM NM NM Z
NM NM NL NM Z PM
Z NM NM Z PM PM
PM NM Z PM PM PL
PL Z PM PM PL PL
Membership Function

NL NM Z PM PL

-2 -1 0 1 2 error

Defuzzification

It is the inverse of the fuzzification. Because the plant can’t


read the fuzzy values, the defuzzier converts the fuzzy variables
(output of fuzzy inference system) into the output crisp values, which
to be fed to the plant.

General methods adopted for defuzzification are:

1. Centre of gravity method


2. Bisector of area method
3. Mean of minimum method

The centre of gravity method is mostly used method and this method
the centre of gravity of the fuzzy set region is used. The most fuzzy
sets involves a triangle shape. The triangle is to be cut from the top
and the top part is removed, the remaining figure is in the
trapezoidal shape. Now the centroid of this trapezoid is calculated
and it gives the defuzzified crisp output.

You might also like