**2. Logical inference**

A connection between cause and effect, or a condition and a consequence is made by reasoning. Reasoning can be expressed by a logical inference or by the evaluation of inputs in order to draw a conclusion. We usually follow rules of inference which have the form: IF cause1 = A and cause2 = B THEN effect = C. Where A, B and C are linguistic variables.

#### **2.1 Fuzzy sets**

A fuzzy set is represented by a membership function defined on the universe of discourse. The universe of discourse is the space where the fuzzy variables are defined. The membership function gives the grade, or degree, of membership within the set of any element of the universe of discourse. The membership function maps the elements of the universe onto numerical values in the interval [0, 1]. A membership function value of zero implies that the corresponding element is definitely not an element of the fuzzy set, while a value of unity means that the element fully belongs to the set. A grade of membership in between corresponds to the fuzzy membership to the set. In practical situations there is always a natural **fuzzification** when someone analysis statements and a smooth membership curve usually better describes the grade that an element belongs to a set (Erdirencelebi et al., 2011).

**Fuzzification**: is the process of decomposing a system input and/or output into one or more fuzzy sets. Many types of curves can be used, but triangular or trapezoidal shaped membership functions are the most common because they are easier to represent in embedded controllers.

Fig. 1 shows a system of fuzzy sets for an input with trapezoidal and triangular membership functions.

The figure illustrates the process of fuzzification of the air temperature in order to control the operation of an air-conditioning system. There are five fuzzy sets for temperature: COLD, COOL, GOOD, WARM, and HOT.

**Defuzzification**: After fuzzy reasoning, we have a linguistic output variable that needs to be translated into a crisp value. The objective is to derive a single crisp numeric value that best represents the inferred fuzzy values of the linguistic output variable. Defuzzification is such inverse transformation which maps the output from the fuzzy domain back into the crisp domain.

Most commercial fuzzy products are rule-based systems that receive current information in the feedback loop from the device as it operates and control the operation of a mechanical or

Fuzzy control strategies come from experience and experiments rather than from mathematical models and, therefore, linguistic implementations are much faster accomplished. Fuzzy control strategies involve a large number of inputs, most of which are relevant only for some special conditions. Such inputs are activated only when the related condition prevails. In this way, little additional computational overhead is required for adding extra rules. As a result, the rule base structure remains understandable, leading to

A connection between cause and effect, or a condition and a consequence is made by reasoning. Reasoning can be expressed by a logical inference or by the evaluation of inputs in order to draw a conclusion. We usually follow rules of inference which have the form: IF cause1 = A and cause2 = B THEN effect = C. Where A, B and C are linguistic variables.

A fuzzy set is represented by a membership function defined on the universe of discourse. The universe of discourse is the space where the fuzzy variables are defined. The membership function gives the grade, or degree, of membership within the set of any element of the universe of discourse. The membership function maps the elements of the universe onto numerical values in the interval [0, 1]. A membership function value of zero implies that the corresponding element is definitely not an element of the fuzzy set, while a value of unity means that the element fully belongs to the set. A grade of membership in between corresponds to the fuzzy membership to the set. In practical situations there is always a natural **fuzzification** when someone analysis statements and a smooth membership curve usually better describes the grade that an element belongs to a set

**Fuzzification**: is the process of decomposing a system input and/or output into one or more fuzzy sets. Many types of curves can be used, but triangular or trapezoidal shaped membership functions are the most common because they are easier to represent in

Fig. 1 shows a system of fuzzy sets for an input with trapezoidal and triangular membership

The figure illustrates the process of fuzzification of the air temperature in order to control the operation of an air-conditioning system. There are five fuzzy sets for temperature:

**Defuzzification**: After fuzzy reasoning, we have a linguistic output variable that needs to be translated into a crisp value. The objective is to derive a single crisp numeric value that best represents the inferred fuzzy values of the linguistic output variable. Defuzzification is such inverse transformation which maps the output from the fuzzy domain back into

Most commercial fuzzy products are rule-based systems that receive current information in the feedback loop from the device as it operates and control the operation of a mechanical or

efficient coding and system documentation.

**2. Logical inference** 

(Erdirencelebi et al., 2011).

embedded controllers.

the crisp domain.

COLD, COOL, GOOD, WARM, and HOT.

functions.

**2.1 Fuzzy sets** 

other device (Simoes & Friedhofer, 1997; Simoes & Franceschetti, 1999). A fuzzy logic system has four blocks as shown in figure 2. Crisp input information from the device is converted into fuzzy values for each input fuzzy set with the fuzzification block. The universe of discourse of the input variables determines the required scaling for correct per-unit operation. The scaling is very important because the fuzzy system can be retrofitted with other devices or ranges of operation by just changing the scaling of the input and output. The decision-making-logic determines how the fuzzy logic operations are performed, and together with the knowledge base determine the outputs of each fuzzy IF-THEN rule. Those are combined and converted to crispy values with the defuzzification block. The output crisp value can be calculated by the center of gravity.

Temperature

Fig. 1. Fuzzy sets defining temperature.

Fig. 2. Fuzzy Controller Block Diagram.

In order to process the input output reasoning, there are six steps involved in the creation of a rule based fuzzy system:


Control of Efficient Intelligent Robotic Gripper Using Fuzzy Inference System 89

**Layer 1:** the fuzzy membership function (MF) represented by the node: All the nodes in this

( ) *O x i Ai* i=1,2

*Ai* and *Bi* can be any appropriate fuzzy sets in parameter form. For example, if bell MF is

1 [( ) ] *<sup>i</sup>*

*x c a*

*i*

**Layer 2**: The nodes in this layer are fixed (not adaptive). These are labeled M to indicate that

 () () 

**Layer 3**: Nodes in this layer are also fixed nodes. These are labeled N to indicate that these perform a normalization of the firing strength from previous layer. The output of each node

> 1 2 *i*

**Layer 4**: All the nodes in this layer are adaptive nodes. The output of each node is simply

Where: pi , qi , and ri are design parameters (consequent parameter since they deal with the

**Layer 5**: This layer has only one node labeled S to indicate that it performs the function of a

5, 2 1

In this ANFIS architecture, there are two adaptive layers (1, 4). Layer 1 has three modifiable parameters (ai, bi , and ci) pertaining to the input MFs. These parameters are called premise

*i i i i*

*O f wf*

2

*i*

1

1

*i i*

*w f*

*i*

*w*

*i*

2

*w w*

*i b*

( ) *O y i Bi* i=3,4 (1)

i=1,2 (2)

i=1,2 (3)

i=1,2 (4)

(6)

4, ( ) *O w f w px qy r i ii i i i i* i=1,2 (5)

layer are adaptive nodes, i is the degree of the membership of the input to

1, 

1, 2 

 <sup>2</sup> <sup>1</sup> ( )

they play the role of a simple multiplier. The outputs of these nodes are given by:

*Ow x y* 2,*i i Ai Bi* 

The output of each node in this layer represents the firing strength of the rule.

3,

*i i <sup>w</sup> O w*

the product of the normalized firing strength and a first order polynomial:

simple summer. The output of this single node is given by:

*Ai*

*x*

Where *<sup>i</sup> a* , *<sup>i</sup> b* , and *<sup>i</sup> c* are the parameters for the MF

used then

in this layer is given by:

then-part of the fuzzy rule).
