Vous êtes sur la page 1sur 11

Fuzzy Systems Assignments

1. Statement of the Problem

In the solution of this problem will be used the techniques of fuzzy control for the control
of the grips of a mechanical arm. The objective is develop a Fuzzy Inference System (FIS) for
achieve this control task. Using this method, is possible to translate the way that a human can
describe the problem solve this, in a mathematical equivalence, with the a linguistic variables
and the rules that relate the inputs with the outputs of the system. Furthermore, this description
can achieve better answer than the traditional techniques with uncertainty exist in the model of
the plant.
The fuzzy logic approach needs some criteria to be implemented. First, to understand
the physical plant that needs to be controlled, second to understand which elements are
involved in the control of the plant and what is desired as a response. After understanding the
relationship between inputs and outputs, the rules for their transformation should be defined in

order to obtain the desired output. Basically, these rules are based on if-then declarations. An
example of this is shown in this problem. The process can be summarized as follows:
Fuzzification membership functions used
to graphically describe a situation.
Evaluation of Rules application of the
fuzzy logic rules.
Difuzzification obtaining the desired results.
Graphically, it is represent in a fuzzy controller architecture how

Fig 1. fuzzy controller architecture

The principal operation for the computation on fuzzy sets are:




Fig 2. Graphic representation of And, not and Operations

In this problem the application is in the area of control systems, thanks to the capabilities
of this method for describing the control rules in a simple form, based in the natural language.
The objective in this case is to control a mechanical arm, as shown below.

Fig 3.Mechanical arm

This equipment is used intensively in industries and factories, for a wide range of tasks
and manufacturing processes. For this reason, the accurate control of this machine is an
important problem and must be treated with rigurosity.
To solve this assignment, a Fuzzy Logic Toolbox was used which has a collection of
built-in functions on the MATLAB. It provides tools to create and edit fuzzy inference systems
within the framework of MATLAB. The set of tools are easily handled by the graphic user
interface (GUI) This helps the user accomplish his work. The inputs (or features) are defined in
the problem statement. Two features are highlighted here: The texture, with its linguistic
variables named SOLID and SOFT, and weight, with its linguistic variables named LIGHT and
HEAVY. The output is the graph, and thus have three linguistic variables, GENTLE, MEDIUM
and FIRM. The relationship, we remark, are describing in the statement, and are:

In the toolbox the inputs and outputs are created:


Fig 4 inputs: (a) feature Texture (b) feature weight

Fig 5. output

Next, the rules were added:

Fig 6. Rules

Finally, using the rules viewer, the software computed the output and showed the result.
One operation condition is found below:

Fig 7. Output of the controller for inputs of texture = 5 and weigh = 7

Here, we observe that for a input of [texture, weight] = [5 7], the output of the grasp is
2.92 in the mechanical arm. If the vertical red bar moves sideways or the values in the input
array are changed, it is possible to obtain whatever value is desired. This result can be
reproduced if it is computed by the graphical method. In the figure formed by the superposition
of all the areas generated by the application of the rules, the geometrical center, if this in the x
axis (horizontal axis), corresponds to the value of the output.
The figure is:

Fig 8. Area of the output

This figure is generated by the rules

Rules 1:

Texture: Solid

weight : Heavy

Grasp: Firm

Weight: Heavy

Grasp: Medium

Rules 3:

Texture: Soft

The AND operation always selects the smallest value between the inputs, in rule 1 this
value was 0.75 for Texture: Soft and in rule 2 was 0.25 for Texture: Soft. These values define
the horizontal height where the regions are separated from the output associated in each case.
The final output is split in the next subfigures:

Fig 9. Subareas
Here, the x-coordinates of the geometric center are:
X coordinates of
geometrical center




(1+*0.25) =

(1/2)*0.25*0.25 =







(1+0.25+1+ *0.5)=







Aeq = A_blue + A_red + A_green + A_black = 1.46875

(X*A)eq = X_blue*A_blue + X_red*A_red + X_green*A_green + X_black*A_black =

X_eq = grasp = (X*A)eq / Aeq = 2.91
This value is very close to the value computed by MATLAB of 2.92. The error by this
approximate method is only about 0.27%, an adequate accuracy for the solution.