8. Presentation of the algorithm

The presentation of the fuzzy logic algorithm has been introduced (see Figure 6); this logic affects one or more steps of the algorithm to try to increase its performance including accuracy and speed, and there are several variables. Some of these variables expand, and the abbreviation of the corresponding iterative point asserts that it would be a good response to the algorithm. To make an algorithm choice, there are several criteria that must be checked:

• speed,

6. Instruments for measuring capacity

50 Fuzzy Logic Based in Optimization Methods and Control Systems and Its Applications

for the sharp radius of correction stylets.

ergonomic shapes, turbine blades, etc.).

The accuracy of the probe during scanning is generally several tens of micrometers, but this accuracy is generally not achieved for the measurement of well-known shapes as well as when the size of the part greatly exceeds the radius of the feeler ball because of the algorithms used

For example, spline profiles that do not compose a part of a geometric primitive known as (circle, sphere, cone, torus, etc.), they present particular difficulties to establish the method of the normal vector. Left surfaces are now very common (car, bodies, consumer products of

In addition, small features become commonplace and, although measurements are made by digitization, the correction can result in the introduction of unacceptable errors [16–18].

In fact, this semi-experimental part is very important for applying these notions of fuzzy logic to the contour of the flank of the left or right tooth. However, we are able to bring back information through a known mathematical model or by asking a laboratory to provide it to us. In short, the result of the processing of information is the same, either by borrowing the

7. Measures the coordinates of tooth profile points by the

mathematical model or by directly probing by CMM (see Figures 4–6) [8, 11].

three-dimensional measuring machine (CMM)

Figure 5. Mathematical model: sections (A-A), (B-B) and (C-C).

• precision,

Figure 6. Flowchart of fuzzy estimator logic.


The importance of any of these four criteria depends on the application of the final program. The development of a complete system of the quality inspection of the manufactured parts requires the coordination of a set of processes to acquire data, its dimensional evaluations, and comparisons with the proposed reference model. For this, it is essential to make certain conceptual knowledge profitable not only for the object to be analyzed but also for the environment. In this case, the goal of this chapter is to establish a procedure for automating the modeling of the surface inspection of complex parts such as gears. Allowing to correct the relative differences of the manufacturing parameters, then, the adopted criteria includes fast convergence, the robustness of the system, and the simplicity of the interface. Finally, the new algorithm is summarized by the diagram of the following flowchart [2]:

#### 9. Calculation of the corrected measured points

We used the following equations to achieve these results (see Figure 7). Equation of right which is between the points Pi+1, Pi�1:

$$y\_i = a\_i \mathbf{x}\_i + b\_i \tag{3}$$

We take theoretically the tolerance values for each point gained in the range (0.0001.rd).

ai <sup>¼</sup> yiþ<sup>1</sup> � yi�<sup>1</sup> xiþ<sup>1</sup> � xi�<sup>1</sup> bi <sup>¼</sup> yi�<sup>1</sup> � yiþ<sup>1</sup> � yi�<sup>1</sup>

ci ¼ �1=ai di ¼ yi � ci:xi ei <sup>¼</sup> yi�<sup>1</sup> � yi�<sup>2</sup> xi�<sup>1</sup> � xi�<sup>2</sup> <sup>f</sup> <sup>i</sup> <sup>¼</sup> yi�<sup>1</sup> � ei:xi�<sup>1</sup> mi ¼ �1=ei ni ¼ yi � mi:xi

:ci � 2:xi � �<sup>2</sup> <sup>þ</sup> <sup>4</sup>: xi

N.B: We took into consideration the rest time of the 0.25 s machine. We calculate the Cartesian

� � � ffiffiffiffiffi

4:r<sup>2</sup> � ð Þ xi � xi�<sup>1</sup>

4:r<sup>2</sup> � ð Þ xi � xi�<sup>1</sup>

2ð Þ ci þ 1

xsi <sup>¼</sup> � <sup>2</sup>:di:ci � <sup>2</sup>:ci:yi � <sup>2</sup>:xi

<sup>2</sup> <sup>þ</sup> <sup>y</sup> � yi

� �<sup>2</sup> <sup>¼</sup> <sup>r</sup>

xiþ<sup>1</sup> � xi�<sup>1</sup>

:xi�<sup>1</sup>

<sup>2</sup> <sup>þ</sup> di � yi � �<sup>2</sup> <sup>þ</sup> <sup>r</sup>

<sup>2</sup> � �ð Þ ci <sup>þ</sup> <sup>1</sup> (9)

Δi p

<sup>2</sup> � yi � yi�<sup>1</sup>

<sup>2</sup> � yi � yi�<sup>1</sup>

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

� �<sup>2</sup> <sup>q</sup> 2 ffiffiffiffiffiffiffiffiffiffiffiffiffi aoi <sup>þ</sup> <sup>1</sup> <sup>p</sup>

� �<sup>2</sup> <sup>q</sup> 2 ffiffiffiffiffiffiffiffiffiffiffiffiffi aoi <sup>þ</sup> <sup>1</sup> <sup>p</sup>

<sup>2</sup> (7)

Fuzzy Logic Applications in Metrology Processes http://dx.doi.org/10.5772/intechopen.79381

(8)

53

(10)

(11)

ð Þ x � xi

Equation of the circle includes

r is the radius of the probe sphere (r = 0.2–5 mm).

Δ<sup>i</sup> ¼ 2:di:ci � 2:yi

coordinates Xsi (xsi, ysi):

(see Figures 8 and 9)

We have determined the following values ai, bi, ci, di,Δi.

8

>>>>>>>>>>>>>>>>>>><

>>>>>>>>>>>>>>>>>>>:

We can take the numbers that vary between i = 1 and 200 points.

et

8 >>><

>>>:

We can calculate the coordinates of the points Xai (xai, yai):

xai <sup>¼</sup> xi <sup>þ</sup> xi�<sup>1</sup>

yai <sup>¼</sup> yi <sup>þ</sup> yi�<sup>1</sup>

et

8 >>>>>>><

>>>>>>>:

ysi ¼ ci:xi þ di

<sup>2</sup> � aoi:

<sup>2</sup> � aoi:

(see Figure 7)

The equation of the line that passes through the point Pi and perpendicular to the line that passes through the points (Pi+1Pi�1):

$$y\_i = c\_i x\_i + d\_i \tag{4}$$

The equation between two points Pi�1, Pi�2:

$$y\_i = e\_i \mathbf{x}\_i + f\_i \tag{5}$$

The equation of the line that passes through the point Pi and perpendicular to the line (Pi�1Pi�2):

$$y\_i = m\_i \mathbf{x}\_i + n\_i \tag{6}$$

Figure 7. Determination of Aki, Δαi, Azi (sections B-Band C-C).

We take theoretically the tolerance values for each point gained in the range (0.0001.rd).

Equation of the circle includes

$$\left(\left(\mathbf{x} - \mathbf{x}\_i\right)^2 + \left(y - y\_i\right)^2\right)^2 = r^2 \tag{7}$$

#### (see Figure 7)

• stability,

• robustness and simplicity.

The importance of any of these four criteria depends on the application of the final program. The development of a complete system of the quality inspection of the manufactured parts requires the coordination of a set of processes to acquire data, its dimensional evaluations, and comparisons with the proposed reference model. For this, it is essential to make certain conceptual knowledge profitable not only for the object to be analyzed but also for the environment. In this case, the goal of this chapter is to establish a procedure for automating the modeling of the surface inspection of complex parts such as gears. Allowing to correct the relative differences of the manufacturing parameters, then, the adopted criteria includes fast convergence, the robustness of the system, and the simplicity of the interface. Finally, the new

We used the following equations to achieve these results (see Figure 7). Equation of right

The equation of the line that passes through the point Pi and perpendicular to the line that

The equation of the line that passes through the point Pi and perpendicular to the line (Pi�1Pi�2):

yi ¼ aixi þ bi (3)

yi ¼ ci:xi þ di (4)

yi ¼ eixi þ f <sup>i</sup> (5)

yi ¼ mixi þ ni (6)

algorithm is summarized by the diagram of the following flowchart [2]:

9. Calculation of the corrected measured points

52 Fuzzy Logic Based in Optimization Methods and Control Systems and Its Applications

which is between the points Pi+1, Pi�1:

passes through the points (Pi+1Pi�1):

The equation between two points Pi�1, Pi�2:

Figure 7. Determination of Aki, Δαi, Azi (sections B-Band C-C).

r is the radius of the probe sphere (r = 0.2–5 mm).

We have determined the following values ai, bi, ci, di,Δi.

$$\begin{cases} a\_i = \frac{y\_{i+1} - y\_{i-1}}{x\_{i+1} - x\_{i-1}} \\ b\_i = y\_{i-1} - \frac{y\_{i+1} - y\_{i-1}}{x\_{i+1} - x\_{i-1}} \dots\_{X\_{i-1}} \\ c\_i = -1/a\_i \\ d\_i = y\_i - c\_i.x\_i \\ e\_i = \frac{y\_{i-1} - y\_{i-2}}{x\_{i-1} - x\_{i-2}} \\ f\_i = y\_{i-1} - e\_i.x\_{i-1} \\ m\_i = -1/e\_i \\ n\_i = y\_i - m\_i.x\_i \end{cases} \tag{8}$$

$$
\Delta\_i = \left( 2.d\_i.c\_i - 2.y\_j.c\_i - 2.x\_i \right)^2 + 4.\left( \mathbf{x}\_i^2 + \left( d\_i - y\_i \right)^2 + r^2 \right)(c\_i + 1) \tag{9}
$$

We can take the numbers that vary between i = 1 and 200 points.

N.B: We took into consideration the rest time of the 0.25 s machine. We calculate the Cartesian coordinates Xsi (xsi, ysi):

$$\begin{cases} \mathbf{x}\_{si} = \frac{-\left(2.d\_i.c\_i - 2.c\_i.y\_i - 2.x\_i\right) \pm \sqrt{\Delta\_i}}{2(c\_i + 1)}\\ \text{et} \\ \mathbf{y}\_{si} = c\_i.x\_i + d\_i \end{cases} \tag{10}$$

(see Figures 8 and 9)

We can calculate the coordinates of the points Xai (xai, yai):

$$\begin{cases} \mathbf{x}\_{di} = \frac{\mathbf{x}\_{i} + \mathbf{x}\_{i-1}}{2} \pm a\_{oi} \cdot \frac{\sqrt{4.r^2 - \left(\mathbf{x}\_{i} - \mathbf{x}\_{i-1}\right)^2 - \left(y\_{i} - y\_{i-1}\right)^2}}{2\sqrt{a\_{oi} + 1}}\\ \text{et} \\\\ \mathbf{y}\_{di} = \frac{y\_{i} + y\_{i-1}}{2} \pm a\_{oi} \cdot \frac{\sqrt{4.r^2 - \left(\mathbf{x}\_{i} - \mathbf{x}\_{i-1}\right)^2 - \left(y\_{i} - y\_{i-1}\right)^2}}{2\sqrt{a\_{oi} + 1}} \end{cases} \tag{11}$$

Then, the values Δzi, Δki are:

(see Figures 8–10)

Figure 10. Section B-B.

Figure 10).

Δzi ¼

Δki ¼

et

8 >>>><

>>>>:

In our work, we use the generalized bell shape:

screen language values define for each input value.

� di�bi ai�ci � xi � �<sup>2</sup>

� ni�<sup>f</sup> <sup>i</sup> ei�mi � xi � �<sup>2</sup>

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

� � � � <sup>2</sup> <sup>r</sup>

According to the graphs of fuzzy logic, we can conclude the values of Δα<sup>i</sup> (see Figure 8). We calculated Δzi and Δki using the formula of the above relation (13) to calculate these quantities; we determine the values Δα<sup>i</sup> using fuzzy logic, max-min inference, and the generalized function bell and then defuzzification by the centroid method [18] (see

where z (r) and k (r) represent the values of the linguistic variables of the deviations Δzi and Δki. From these, we deduce the angular difference Δαi. Figure 8 shows an impression of the

yi <sup>¼</sup> <sup>1</sup>

<sup>þ</sup> ei ni�bi ei�mi

di�bi ai�ci <sup>þ</sup> bi � yi

þ f <sup>i</sup> � yi

Fuzzy Logic Applications in Metrology Processes http://dx.doi.org/10.5772/intechopen.79381

<sup>1</sup> <sup>þ</sup> ð Þ ð Þ xi <sup>þ</sup> <sup>14</sup> <sup>=</sup><sup>7</sup> <sup>3</sup> � �<sup>2</sup> � � (13)

(12)

55

þ ai

� � � � <sup>2</sup> <sup>r</sup>

Figure 8. Screen printing of Δzi, Δki, defuzzification, Δα<sup>i</sup> conclusions according to Mamdani rules [6, 15].

Figure 9. Section A-A.

Figure 10. Section B-B.

Then, the values Δzi, Δki are:

$$\begin{cases} \Delta z\_i = \sqrt{\left(\left(\frac{d\_i - b\_i}{a\_i - c\_i} - \mathbf{x}\_i\right)^2 + \left(a\_i \left(\frac{d\_i - b\_i}{a\_i - c\_i} + b\_i - y\_i\right)\right)^2\right)}\\ \text{et} \\ \Delta k\_i = \sqrt{\left(\left(\frac{n\_i - f\_i}{c\_i - m\_i} - \mathbf{x}\_i\right)^2 + \left(e\_i \left(\frac{n\_i - b\_i}{c\_i - m\_i} + f\_i - y\_i\right)\right)^2\right)} \end{cases} \tag{12}$$

#### (see Figures 8–10)

Figure 8. Screen printing of Δzi, Δki, defuzzification, Δα<sup>i</sup> conclusions according to Mamdani rules [6, 15].

54 Fuzzy Logic Based in Optimization Methods and Control Systems and Its Applications

Figure 9. Section A-A.

According to the graphs of fuzzy logic, we can conclude the values of Δα<sup>i</sup> (see Figure 8). We calculated Δzi and Δki using the formula of the above relation (13) to calculate these quantities; we determine the values Δα<sup>i</sup> using fuzzy logic, max-min inference, and the generalized function bell and then defuzzification by the centroid method [18] (see Figure 10).

In our work, we use the generalized bell shape:

$$\mathbf{y}\_{i} = \frac{1}{\left(1 + \left(((\mathbf{x}\_{i} + 14)/7)^{3}\right)^{2}\right)}\tag{13}$$

where z (r) and k (r) represent the values of the linguistic variables of the deviations Δzi and Δki. From these, we deduce the angular difference Δαi. Figure 8 shows an impression of the screen language values define for each input value.
