1 Introduction

The parallel robot manipulators, owing to their closed-loop structure possess a number of advantages over traditional series manipulators such as high rigidity, high value of power density, high natural frequencies, speeds and high precision [1]. However, they also have a few disadvantages such as a relatively small workspace, relatively complex forward kinematics as well as the existence of singularities inside the workspace. [2]. The geometrical model analysis of parallel manipulators is divided into two types namely direct and inverse models. The inverse geometrical model which maps the operational space in the joint space, is not difficult to solve. Unlike direct geometrical model that performs the reverse operation presents difficulties in problem solving. Moreover, the existence not only of multiple direct geometrical solutions (or work patterns) is another problem in the geometrical analysis [3]. The analysis of the singularity of planar parallel manipulators has been studied by many researchers [4, 5]. Efforts to solve the direct geometry of planar parallel manipulators have focused on the manipulator plane 3RPR due to its inherent simplicity. It is established that the direct geometrical solution of this type of manipulator leads to a polynomial [6, 7]. However, the study of the problem of direct geometry leads to a maximum of six real solutions. A neural network-based approach was developed to curb the problem of the inverse geometric model. Many efforts have been made on the applications of adaptive neuro-fuzzy inference system (ANFIS) in different types of parallel machine tools due to their extreme flexibility and nonlinear approximation ability of the correspondence function output/input [8,9,10,11,12]. Multiple neural networks can solve the problem of multiple branches of the direct or inverse geometrical problem. This approach also overcomes the problem of singularities and uncertainties arising from the path planning. In this approach, a network is formed using the data generated by the inverse geometrical model.

An analysis and comparison of the three used methods are made for determining the best optimal solution concerning the minimum error with minimum execution time. The analysis shows that the optimal solution is obtained by the polynomial method.

2 Main objective of the study

This study represents the comparison of three methods, graphical method, analytical method and ANFIS interactive method which represents the main part of our project. The objective of this study was the general formalization of a direct geometry problem for parallel robots, which proves that this method is an interactive method used to solve problems of the optimal position of industrial robots. The results obtained by this method encourage us to consider the following points:

  • Modeling of nonlinear systems by the fuzzy hybrid approach (ANFIS).

  • Inject the neuro-fuzzy control into the application of industrial robots.

  • Build programs that are able to perform increasingly complex and precise calculations in the robots’ work space.

After presenting the degeneracy of the system we examine the situations where the direct geometry degenerates.

After we go on to the main problem of our study, which consists of conducting an investigation in the direct geometrical model that we tried to solve with several methods with a good precision at the beginning with the polynomial solution that sought the existence of the angle φ then find the coordinates of the platform p (x, y).

3 Kinematics of parallel manipulators

Kinematic analysis of parallel manipulators includes solution for both forward and inverse kinematic problems. The forward kinematics of a manipulator deals with the computation of the position and orientation of the manipulator end-effector in terms of the active joints variables. Forward kinematic analysis is one of essential parts in control and simulation of parallel manipulators. Contrary to the forward kinematics, the inverse kinematics problem deal with the determination of the joint variables corresponding to any specified position and orientation of the end-effector. The inverse kinematics problem is essential to execute manipulation tasks. Most parallel manipulators can admit not only multiple inverse kinematic solutions but also multiple forward kinematic solutions. This property produces more complicated kinematic models but allows more flexibility in trajectory planning [13]. In other words a manipulator configuration can be defined either by actuator coordinates q = [q1,…, qn]T or by cartesian end effector coordinates x = [x1,…, xn]T with n the DOF of the manipulator under study. The transformation between actuator coordinates and cartesian coordinates is an important issue from the viewpoint of kinematic control. Computation of the end effector coordinates from given actuator coordinates (forward kinematics) can be written in the general form as:

$$ {\text{X}} = {\text{f}}\left( {\text{Q}} \right) $$
(1)

The inverse task which is to establish the actuator coordinates corresponding to a given set of end effector coordinates (inverse kinematics) can be also expressed in the general form by:

$$ {\text{Q}} = {\text{f}}^{ - 1} \left( {\text{X}} \right) $$
(2)

The forward kinematics model is given by:

$$ \dot{X} = J\dot{Q} $$
(3)

where J is the Jacobian matrix.

The inverse kinematics model is expressed by the following relation:

$$ \dot{Q} = J^{ - 1} \dot{X} $$
(4)

J is the inverse matrix of J−1

Inverse kinematic singularity occurs when different inverse kinematic solutions coincide that happens usually at the workspace boundary. Hence the manipulator loses one or more degrees of freedom. Mathematically they can detected by det (Jq) = 0. Forward kinematic singularity occurs when different forward kinematic solutions coincide. Hence the manipulator gains one or more degrees of freedom. That happens inside the workspace so it is a great problem. Mathematically they can detected by det (Jx) = 0.

Let X = [x, y φ]T, the vector of the operational coordinates (3 degrees of freedom DOF of the robot) which corresponds to the position [x, y] T of the geometric center P1 of the reference of the platform and to the orientation of the latter With respect to the x-axis of the base marker located as shown in Fig. 1.

Fig. 1
figure 1

Schematic representation of the robot 3 RPR

Let \( \varvec{Q} = \varvec{ }\left[ {\varvec{q}_{1} \varvec{ q}_{2} \varvec{ q}_{3} } \right]^{{\varvec{T }}} \) be the vector of the articular variables corresponding to the elongations.

From the diagram of the robot 3RPR (Fig. 1) one can deduce the solution to the inverse geometric problem.

It can be easily written as follows:

$$ q1 = \sqrt {x^{2} + y^{2} } $$
(5)
$$ q2 = \sqrt {\left( {x + l_{2} \cos \varphi - x_{2} } \right)^{2} + \left( {y + l_{2} sin\varphi } \right)^{2} } $$
(6)
$$ q3 = \sqrt {\left( {x + l_{3} \cos \left( {\varphi + \beta } \right) - x_{3} } \right)^{2} + \left( {y + l_{3} \sin \left( {\varphi + \beta } \right) - y_{3} } \right)^{2} } $$
(7)

The direct geometric problem can be solved using the analytical method proposed by [14]. The loop closure equations are expressed:

$$ A_{i} P_{i} = q_{i}^{2} i = \left( {1,3} \right) $$
(8)

From the system of Eqs. (7) the equations of the inverse geometric problem can be written as follows:

$$ q_{1}^{2} = x^{2} + y^{2 } $$
(9)
$$ q_{2}^{2} = \left( {x + l_{2} \cos \varphi - x_{2} } \right)^{2} + \left( {y + l_{2} sin\varphi } \right)^{2} $$
(10)
$$ q_{3}^{2} = \left( {x + l_{3} \cos \left( {\varphi + \beta } \right) - x_{3} } \right)^{2} + \left( {y + l_{3} \sin \left( {\varphi + \beta } \right) - y_{3} } \right)^{2} $$
(11)

4 Workspace

The workspace corresponds to the set of poses (positions and orientations) that the characteristic point of the end effector can reach. The workspace of a robot manipulator is considered a key feature for the various applications in robotics. It is used to analyze the performance of robot manipulators and also for optimal design. The working space is determined by the geometrical parameters of the robot manipulator such as the lengths of the elements as well as the articular limits of the motorized and passive links. From the industrial point of view, the working space of a manipulator robot is a primordial and fundamental datum. Indeed, when a trajectory is programmed we must verify that all the poses are located inside the workspace of the robot manipulator. In other more complex cases such as collision and avoidance much of the research involves analyzing the work space of a manipulator robot. This work presents different methods and techniques for determining, representing and characterizing the different types of workspaces. For our robot this is the operative zone of the robot where it is possible to fix the position G (x, y) and orientation \( \varvec{ \varphi } \) of platform. It is obtained by drawing the three circles centered on the fixed points \( \varvec{ A}_{\varvec{i}} \), and having for their respective radii the three articular coordinates \( \varvec{ q}_{1} \), \( \varvec{q}_{2} \) and q3. In the graphics window (Fig. 2), this procedure has been automated by selecting the Work Plan menu and then the Work Area submenu. The software then displays an editor which allows the intervals of variation to be entered for each joint. The domain delimited by the three circles thus defines the working space.

Fig. 2
figure 2

Graphical view of the Workspace

5 Geometric method

5.1 Method of graphic construction

The geometric method makes it possible to determine by graphic construction the direct geometry of the robot by drawing three concentric circles \( \varvec{C}_{\varvec{i}} \left( {\varvec{i} = 1:3} \right) \), the centers of which are placed at the fixed points of articulation \( \varvec{A}_{\varvec{i}} \varvec{ }\left( {\varvec{i} = 1:3} \right) \) and whose radius correspond to the articular coordinates \( \varvec{q}_{\varvec{i}} \varvec{ }\left( {\varvec{i} = 1:3} \right). \) It is then sufficient to place the platform in such a way that the vertices of the triangle \( \varvec{P}_{\varvec{i}} = \left( {1:3} \right) \) are positioned on the corresponding circles. This procedure can be automated as follows:

  1. 1.

    The vertex 1 will be moved in such a way that it scans the entire circle. Let \( \varvec{P}_{1} \varvec{ } \) be its initial position \( \varvec{P}_{1} \left( {\varvec{q}_{1} ,0} \right) \).

  2. 2.

    For each position \( \varvec{ P}_{1} \), we will trace a circle of radius \( \varvec{l}_{{2\varvec{ }}} \) will be drawn which will intersect the circle \( \varvec{C}_{2} \) at a point or two points (\( \varvec{P}_{2} \) and \( \varvec{P}_{2}^{\prime } \)). The intersection condition must be verified beforehand: distance between the two centers less than the sum \( \varvec{q}_{1} + \varvec{q}_{2} + \varvec{l}_{2} \)

  3. 3.

    From \( \varvec{ P}_{2} \), one will draw a circle of radius \( \varvec{l}_{1} \) and another circle of center P1 and having a radius equal to \( \varvec{l}_{3} \). These two circles intersect at a point \( \varvec{P}_{3} \)

It will be checked whether the point \( \varvec{P}_{3} \) belongs to the circleC3, by calculating the distance \( \varvec{A}_{3} \varvec{P}_{3} \varvec{ } \) which must be equal to \( \varvec{q}_{3} \varvec{ } \) to a precision fixed in advance.

  1. 4.

    The point will be retained in this eventuality, otherwise we will proceed in the same way with the second point \( \varvec{P}_{2}^{\prime } \)

  2. 5.

    The point \( \varvec{P}_{1} \) will be moved on the circle until it is completely swept. It is obvious that the condition of intersection of the circles makes it possible to sweep only certain points of the circle \( \varvec{C}_{1} \varvec{ } \) to the detriment of others.

The sweeping step is necessarily limited (we have taken 1000 points or an increment of 0.36°), once the solution is found, the procedure is resumed by determining the successive positions of the solutions that will be retained, refining the step to find the solution Optimal corresponding to the minimum error (quadratic criterion)

5.2 Calculation of the intersection coordinates of two circles known by their centers and radius \( \varvec{C}_{1} \left( {\varvec{x}_{1} ,\varvec{y}_{1} ,\varvec{r}_{1} } \right)\,{\text{and}}\,\varvec{C}_{2} \left( {\varvec{x}_{2} ,\varvec{y}_{2} ,\varvec{r}_{2} } \right) \)

  • Case where x1 = x2

$$ y_{c} = \frac{{r_{1}^{2} - r_{2}^{2} + y_{2}^{2} - y_{1}^{2} }}{{2\left( {y_{2} - y_{1} } \right)}} $$
(12)
$$ x_{c} = x_{1} \pm \sqrt {r_{1}^{2} - \left( {\frac{{r_{1}^{2} - r_{2}^{2} + \left( {y_{2} - y_{1} } \right)^{2} }}{{2\left( {y_{2} - y_{1} } \right)}}} \right)^{2} } $$
(13)
  • Case where y1 = y2

$$ x_{c} = \frac{{r_{1}^{2} - r_{2}^{2} + x_{2}^{2} - x_{1}^{2} }}{{2\left( {x_{2} - x_{1} } \right)}} $$
(14)
$$ y_{c} = y_{1} \pm \sqrt {r_{1}^{2} - \left( {\frac{{r_{1}^{2} - r_{2}^{2} + \left( {x_{2} - x_{1} } \right)^{2} }}{{2\left( {x_{2} - x_{1} } \right)}}} \right)^{2} } $$
(15)
  • General case

$$ Ax^{2} - 2Bx + C = 0 $$
(16)
$$ A = 1 + \left( {\frac{{x_{2} - x_{1} }}{{y_{2} - y_{1} }}} \right)^{2} $$
(17)
$$ B = x_{1} + \frac{{\left( {x_{2} - x_{1} } \right)}}{{\left( {y_{2} - y_{1} } \right)^{2} }}\left( {r_{1}^{2} - r_{2}^{2} + x_{2}^{2} - x_{1}^{2} + \left( {y_{2} - y_{1} } \right)^{2} } \right) $$
(18)
$$ C = x_{1}^{2} - r_{1}^{2} + \left( {\frac{{r_{1}^{2} - r_{2}^{2} + x_{2}^{2} - x_{1}^{2} + \left( {y_{2} - y_{1} } \right)^{2} }}{{2\left( {y_{2} - y_{1} } \right)}}} \right)^{2} $$
(19)
  • Case where B2 − AC = 0

$$ x_{c} = \frac{B}{A} $$
(20)
$$ y_{c} = y_{1} \pm \sqrt {r_{1}^{2} - \left( {x_{c} - x_{1} } \right)^{2} } $$
(21)
  • Case where B2 − AC > 0

$$ x_{c} = \frac{{B \pm \sqrt {B^{2} - AC} }}{A} $$
(22)
$$ y_{c} = \frac{{r_{1}^{2} - r_{2}^{2} + x_{2}^{2} - x_{1}^{2} + y_{2}^{2} - y_{1}^{2} - 2x_{c} \left( {x_{2} - x_{1} } \right)}}{{2\left( {y_{2} - y_{1} } \right)}} $$
(23)
  • Case where B2 − AC < 0 No Solutions

5.3 Graph construction

This graph was made for the following data:

A1(0,0), A2(3,0), A3(2,3), \( {\text{A}}_{1} \left( {0,0} \right),{\text{A}}_{2} \left( {3,0} \right),{\text{A}}_{3} \left( {2,3} \right),{\text{T}}\left( {1,1,60^\circ } \right),{\text{and}}\,{\text{Q}} = \left[ 1.3132 2.2361 2.1918 \right] \)

Corresponding to the initial pose P (1, 1, 0)

The polynomial method gives us two solutions:

$$\begin{aligned} {\text{P}}_{1} & = \, \left[ {1.000 \, - 1.0000} \right],\quad {\text{P}}_{2} = \, \left[ {2.0000 \, - 1.0000} \right],\\ & \quad {\text{ P}}_{3} = \, \left[ {1.5000 \, - 0.1330} \right] \end{aligned} $$

and:

$$\begin{aligned} {\text{P}}_{1} &= \left[ {1.0150 \, 0.9838} \right],\quad {\text{P}}_{2} = \left[ {2.0131 \, 1.0277} \right],\\ &\quad {\text{P}}_{3} = \left[ {1.3773 \, 1.8715} \right] \end{aligned} $$

We have represented the graph corresponding to the first solution (Fig. 3).

Fig. 3
figure 3

Graphic construction of the solution

The sweeping of the circle requires a not inconsiderable calculation time which depends on the power of the processor. This method is systematic and finds all possible solutions even in the case of degeneration. However, it can generate several solutions according to the fixed accuracy criterion. The higher the accuracy, the more care will be taken to retain only the exact solutions. However, if an acceptable precision is sufficient, we find solutions that the analytical calculus cannot give.

(a) Case of non-degeneration

A numerical example of the geometric method is now presented to show the case of non-degeneration given assembly. The geometric parameters are

$$ x_{2} = 4 ,x_{3} = 2,\quad y_{3} = 4, \quad l_{2} = 1, l_{3} = 1\quad \beta =\uppi / 3, $$
$$ q_{1} = 1.4142,\quad q_{2} = 3.1196 \,{\text{and}}\, q_{3} = 2.6084 $$

From the direct geometry it is an optimization which allows finding the optimal solution, presenting the minimal quadratic error, and the poses of the corresponding robot. A Matlab program was developed to calculate the minimal squared error and the robot poses (Tables 1, 2, 3).

Table 1 Solutions for a non-degenerate manipulator
Table 2 Positions Pi for a non-degenerate manipulator
Table 3 Positions Pi, the articular vector and the overall resultant error for a non-degenerate manipulator

To which correspond the two positions Pi (i = 1: 3) of the vertices of the platform of the robot.

The two poses of the platform that corresponds to these two solutions of which the data below, the arrow segments point to the numbers of the solutions of the preceding table (Fig. 4).

Fig. 4
figure 4

The assembly mode corresponding to Table 1 for solution geometric non-degenerate

(b) Case degeneration of the first order

A numerical example of the geometric method is now presented to show the case of first-order degeneracy given assembly. The geometric parameters are

$$\begin{aligned} & x_{2} = 2 , x_{3} = 0, \quad y_{3} = 1, \quad l_{2} = 2, l_{3} = 1.5 , \\ & \quad \beta = \uppi/ 3 ,\quad q_{1} = q_{2} = q_{3} = 1 \end{aligned} $$

Four solutions are found in (Table 4).

Table 4 The four solutions for a first order degenerate manipulator

With the corresponding positions Pi in Table 5.

Table 5 Positions Pi for a first-order degenerate manipulator

With the corresponding articular vector and the overall resultant error in Table 6.

Table 6 The articular vector and the overall resultant error for a first-order degenerate manipulator

The graphs of the four poses are shown below (Fig. 5).

Fig. 5
figure 5

The four assembly modes corresponding to Table 3 for two non-degenerate solutions, one degenerate

(c) Case of degeneracy of the first order: four roots non degenerate, one degenerate

A numerical example of the geometric method is now presented to show the case of first order degeneracy (four degenerate roots, one degenerate) given assembly. The geometric parameters are \( x_{2} = 2 , x_{3} = 0.5 , y_{3} = 1, l_{2} = 2, l_{3} = 1.5 , \beta = \uppi/ 3 \), \( q_{1} = q_{2} = 1, q_{3} = 0.7 \)

We find the four solutions, including one (φ = 0) degenerate (Table 7).

Table 7 The six solutions for a manipulator for the case of four non degenerate roots, one degenerate

The corresponding poses Pi are in the Table 8.

Table 8 Pi positions for a manipulator for the case of four non-degenerates roots, one degenerate

With the corresponding articular vector and the overall resultant error in Table 9.

Table 9 articular vector and overall resultant error for a manipulator for the case of four non-degenerate roots, one degenerate

The four positions are shown in the following Fig. 6.

Fig. 6
figure 6

The six assembly modes corresponding to Table 5 for four non-degenerate solutions, one degenerate

(d) Case of degeneration of order three

A numerical example of the geometric method is now presented to show the case of degeneracy of order three assembly data. The geometric parameters are

$$ \begin{aligned} & x_{2} = 2 , x_{3} = 1 ,\quad y_{3} = 1, \quad l_{2} = 1, l_{3} = 1, \\ &\quad \beta = -\uppi / 2 , \quad q_{1} = 0.8, q_{2} = q_{3} = 1.5 \end{aligned} $$

The possible solutions are shown in the Table 10.

Table 10 The six solutions for a manipulator for the case of degeneracy of order three

The corresponding Pi positions are in the Table 11.

Table 11 Positions Pi, for a manipulator for the case of the degeneration of order three

For this example we have determined the articular vector and the overall resultant error in Table 12.

Table 12 Articular vector and overall resultant error for a manipulator for the case of degeneracy of order three

The different poses are described below (Fig. 7).

Fig. 7
figure 7

The ten assembly modes corresponding to Table 7 for degeneration of order three

The geometric method is a systematic method which allows finding all the solutions generated by the polynomial method with the same precision. It also makes it possible to generate other solutions that satisfy the method precision test conditions (ten solutions instead of six in the last example). The precision of the solution can be improved by reducing the sweep pitch of the circle centered on the point A1 and of radius q1.

We have resumed the four examples previously studied by the graphical method.

The geometric method that allows finding all the solutions generated by the Graphic method.

6 Polynomial solution

The direct geometric problem can be solved using the analytical method proposed by [15]. The loop closure equations are expressed by the expression of equation.

$$ A_{i} P_{i} = q_{i}^{2} i = \left( {1,3} \right) $$
(24)

From the system of Eqs. (5), the equations of the inverse geometric problem can be written as follows:

$$ q_{1}^{2} = x^{2} + y^{2 } $$
(25)
$$ q_{2}^{2} = \left( {x + l_{2} \cos \varphi - x_{2} } \right)^{2} + \left( {y + l_{2} sin\varphi } \right)^{2} $$
(26)
$$ q_{3}^{2} = \left( {x + l_{3} \cos \left( {\varphi + \beta } \right) - x_{3} } \right)^{2} + \left( {y + l_{3} \sin \left( {\varphi + \beta } \right) - y_{3} } \right)^{2} $$
(27)

The system of Eqs. (911) can be written in the simplified forms:

$$ q_{1}^{2} = x^{2} + y^{2} $$
(28)
$$ q_{2}^{2} = x^{2} + y^{2} + Qx + Ry + C $$
(29)
$$ q_{3}^{2} = x^{2} + y^{2} + Ux + Vy + F $$
(30)

With intermediate variables:

$$ Q = 2l_{2} \cos \varphi - 2x_{2} $$
(31)
$$ R = 2l_{2} \sin \varphi $$
(32)
$$ C = x_{2}^{2} + l_{2}^{2} - 2l_{2} x_{2} {\text{cos}}{\varphi } $$
(33)
$$ U = 2l_{3} \cos \left( {{\varphi } + \beta } \right) - 2x_{3} $$
(34)
$$ V = 2l_{3} \sin \left( {{\varphi } + \beta } \right) - 2y_{3} $$
(35)
$$ F = x_{3}^{2} + y_{3}^{2} + l_{3}^{2} - 2l_{3} x_{3} \cos \left( {{\varphi } + \beta } \right) - 2l_{3} y_{3} \sin \left( {{\varphi } + \beta } \right) $$
(36)

It has already been established that, at most for a given combination of articular variables, there may be six possible solutions. The solutions are always even: two or four or six. In the case where the solution exists it is always matched. In the case of non-existence all solutions are complex.

(a) Case of non-degeneration

A numerical example of the polynomial method is now presented to show the case of non-degeneracy (two solutions) given assembly. The geometric parameters are

$$ \begin{aligned} & x_{2} = 4 , x_{3} = 2, \quad y_{3} = 4, l_{2} = 1, l_{3} = 1 , \quad \beta = \uppi/ 3, \\ & q_{1} = 1.4142, \quad q_{2} = 3.1196,\quad q_{3} = 2.6084 \\ \end{aligned} $$

The dimensions of the platform are defined by the vector T = [l2l3β]

The passive points Ai are defined by the matrix:

$$ A = \left[ \begin{aligned} \begin{array}{*{20}c} {\mathop x\nolimits_{1} } & {\mathop y\nolimits_{1} } \\ \end{array} \hfill \\ \begin{array}{*{20}c} {\mathop x\nolimits_{2} } & {\mathop y\nolimits_{2} } \\ \end{array} \hfill \\ \begin{array}{*{20}c} {\mathop x\nolimits_{3} } & {\mathop y\nolimits_{3} } \\ \end{array} \hfill \\ \end{aligned} \right] $$

This combination was obtained by calculating the inverse geometry which starting from the position data of the three fixed points A, whose coordinates are represented by the matrix A. The configuration of the triangle representing the platform (matrix T [l2l3 opening angle β (In degrees)]. The coordinates of the point M = P1 (x, y, φ) calculates the articular vector Q = [q1, q2, q3] and the remaining points P (P2 and P3).

The call of the program function implementing the polynomial method and displaying the platform poses with the indication of the angle and coordinates of the vertex P1 gives the values of the other points Pi in the structured variable P and the corresponding angles in the φ vector. The input arguments are the matrix as already defined, the vector T and the vector Q (Fig. 8).

Fig. 8
figure 8

Two assembly modes corresponding to Table 13 correspond to non-degeneracy with two solutions

The two possible solutions are shown in the following Table 13.

Table 13 The two sets of solutions for a manipulator correspond non-degeneration has two solutions

The positioning error for each pose is calculated by the Matlab function, Which, starting from the positions Pi (i = 1:3), the matrix A, and the vector T, Addresses the Matlab function which returns the actual articular coordinates and compares it to the desired joint position using a quadratic criterion (Table 14).

Table 14 Positions Pi for a corresponding manipulator to no degeneration with two solutions

We find an error: \( {\text{Er}}\, = \,[ 0.0888\,\,\,0.1110 ]\cdot10^{ - 14} \).

(b) Case of degeneration of order 1: four solutions

A numerical example of the polynomial method is now presented to show the case of degeneracy of order 1 (four solutions) given assembly. The geometric parameters are

$$ \begin{aligned} & x_{2} = 2 , x_{3} = 1 , \quad y_{3} = 1,\quad l_{2} = 1, l_{3} = 1,\\ &\quad \beta = -\uppi / 2,\quad q_{1} = 0.8, q_{2} = q_{3} = 1.5 \end{aligned} $$

We are in the case where x2 = l2 and q1 = q2. We shall therefore be faced with degeneration of the first order. The angle phi equal to zero admits two positions

The degeneracy conditions for the three solutions are verified for these data (Fig. 9).

Fig. 9
figure 9

The four assembly modes corresponding to the Table 15 corresponding to the degeneration of order 1 with four solutions

The four sets of solutions are reported in Table 15.

Table 15 The four sets of solutions for a manipulator correspond to degeneration of order 1 has four solutions

The six sets of positions Pi are reported in Table 16.

Table 16 Positions Pi for a manipulator the last two correspond to degeneration of order 1 has four solutions

We find an error: \( {\text{Er}} = [ 0.0089\,\,\, 0.0011 \,\,\, 0.0022 \,\,\, 0.1132 ]\cdot10^{ - 13} \).

(c) Case degeneration of order 1: six solutions

A numerical example of the polynomial method is now presented to show the case of degeneracy of order 1 (six solutions) given assembly. The geometric parameters are defined by x2 = l2 = 2, \( x_{3} \) = 1/2, y3 = 1,\( l_{3} \) = 3/2 and β = π/3.

$$ {\text{q}}_{1} = {\text{q}}_{2} = 1\,{\text{and}}\,{\text{q}}_{3} = 7/10, $$

As before, x2 = l2 and q1 = q2. The angle phi equal to zero admits two positions. The four other solutions will be non-degenerate (Fig. 10).

Fig. 10
figure 10

The six assembly modes corresponding to Table 14 with the last two corresponding to the degenerate root

The six sets of solutions are reported in Table 17.

Table 17 The six sets of solutions for a manipulator with the last two corresponding to the degenerate root

The six sets of positions Pi are reported in Table 18.

Table 18 Positions Pi, for a manipulator with the last two corresponding to the degenerate root

We find an error: \( {\text{Er}} = [0.0067 \,\, 0.5473 \,\, 0.0033 \,\, 0.0100 \,\, 0.0100 \,\, 0.0344 ]\cdot10^{ - 13} \).

(d) Case of degeneration over the whole space

A numerical example is now presented to show the different modes of degenerate manipulation given assembly. The geometric parameters are \( x_{2} \) = l2 = 1,\( x_{3} \) = 0,\( y_{3} \) = 1,l3 = 1 and β = -π/2 these parameters fulfill the geometric conditions for manipulation to be degenerate. The direct kinematics is now a calculator for q3 = 4/5, q2 = q3 = 3/2.

The six sets of solutions are reported in Table 19.

Table 19 The six sets of solutions for a degenerate manipulator

The six sets of positions Pi are reported in Table 20

Table 20 Positions Pi for a degenerate manipulator

The conditions of degeneracy for the set of solutions are verified for these data (Fig. 11).

Fig. 11
figure 11

The six assembly modes corresponding to Table 16

We find an error:

$$ \begin{aligned} {\text{Er}} & = \big[ 2.2210 \cdot 10^{ - 15} \quad 1.7763 \cdot 10^{ - 15} \quad 4.4408 \cdot 10^{ - 16} \\ &\quad 2.2204 \cdot 10^{ - 16} \quad 1.1738 \cdot 10^{ - 08} \quad 1.1738 \cdot 10^{ - 08} \big] \end{aligned} $$

The polynomial method is systematic. It always gives even solutions in the case where the polynomial of order six admits solutions. The problematic case is that where the solution is degenerate which corresponds to a singularity that is to say that for the same articular coordinates. There correspond two distinct solutions which must be calculated according to the procedure. This type of singularity is distinct from that encountered when calculating the direct kinematics where the calculation of the operational speeds may prove impossible for certain configurations of the robot.

7 Method using ANFIS

7.1 Introduction to the adaptive neuro fuzzy inference system method (ANFIS)

Neuro- Fuzzy systems combine the advantages of two complementary techniques. Fuzzy systems provide a good representation of knowledge. The integration of neural networks within these systems improves their performance through the ability to learn neural networks. Conversely, the injection of fuzzy rules into neural networks, which are often critical for their lack of readability, clarifies the meaning of the network parameters and facilitates their initialization, which represents a considerable saving of time for their identification [16,17,18,19].

In this paper, a supervised ANFIS approach is developed to control the movement of 3RPR planar parallel manipulators. The hybrid approach (Neuro-Fuzzy) is used to solve the problem of direct kinematic solutions. This approach also overcomes the problems of singularities and uncertainties that occur during trajectory planning because it has, like any ANFIS algorithm, a generalization capacity [20,21,22] (Fig. 12).

Fig. 12
figure 12

Flowchart of training process

We have illustrated this method on the first example analyzed by the two previous methods and which admits two solutions. The Matlab function geo_directe_fuzzy that implements this method is given in the “Appendix”. It calls for the following remarks:

  1. 1.

    It uses the Matlab anfis tool to automatically generate the inference rules using the neural networks of the three structures with three inputs q1, q2 and q3 and one output, x, y and phi, respectively anfis1, anfis2 and anfis3.

  2. 2.

    The number of channels that can be taken by the output depends on the number of membership functions adopted for each input. If we call n1, n2 and n3 the number of these membership functions (MF: Membership function), then the number of channels of the neural structure will be equal to n1 × n2 × n3

  3. 3.

    Firstly, two candidate functions will be taken by input of the bell function type (gbellMF), which will generate 8 channels at the output, then thereafter one will take three functions per input which will generate 27 channels. The fuzzy structures will be called fismat1, fismat2 and fismat3.

  4. 4.

    The values of the variation intervals for each joint value, that of the parameters of the membership functions, as well as the linear and non-linear coefficients of the outputs are given in “Appendix”.

  5. 5.

    The matrix of the input data for each structure will have a size of n3 if n is the grid pitch adopted for each of the three dimensions (meshgrid). One notices that this size becomes rapidly voluminous and can lead to an overflow of the memory signaled by Matlab. The execution times for the two examples studied are on average two (02) and nine (09) minutes for each structure of the two examples. The compilation times quickly become exhibitory as soon as the grid density (mesh) increases.

  6. 6.

    In order to apply this method, we have been led to reduce the search domain of the solution and to split the grid size by two by assigning half of the data to the initiation step (the odd indices), and the remaining half (even indices) to learning which will generate the final fuzzy structure. The definition files are given in the “Appendix” for both examples.

7.2 First case: case where two membership functions per input are used

The analysis research domain that allows generating the three dimensional grid is as follows:

$$ 0.8 \le x \le 1.2,\quad 0.8 \le y \le 1.2,\quad 45^\circ \le \varphi \le 90^\circ $$

Calling the Matlab function geo_directe_fuzzy with these parameters uses the anfis function which defaults to two bell membership functions for initiating the fuzzy structure and automatically generating inference rules.

The schematic of the structure obtained by the Matlab rule edit or rule view commands followed by the selection of the “Edit” and then “Structure” menus is given below (only the AND operator is used): Fig. 13.

Fig. 13
figure 13

Structure output

The 23 = 8 inference rules are as follows: (Rule Edit command)

  1. 1.

    (if q1 is inmf1) and (q2 is inmf1) and (q3 is inmf1) then (x is outmf1)

  2. 2.

    (if q1 is inmf1) and (q2 is inmf1) and (q3 is inmf2) then (x is outmf2)

  3. 3.

    (if q1 is inmf1) and (q2 is inmf2) and (q3 is inmf1) then (x is outmf3)

  4. 4.

    (if q1 is inmf1) and (q2 is inmf2) and (q3 is inmf2) then (x is outmf4)

  5. 5.

    (if q1 is inmf2) and (q2 is inmf1) and (q3 is inmf1) then (x is outmf5)

  6. 6.

    (if q1 is inmf2) and (q2 is inmf1) and (q3 is inmf2) then (x is outmf6)

  7. 7.

    (if q1 is inmf2) and (q2 is inmf2) and (q3 is inmf1) then (x is outmf7)

  8. 8.

    (if q1 is inmf2) and (q2 is inmf2) and (q3 is inmf2) then (x is outmf8)

The bell membership functions for the three inputs can be visualized by the Matlab mfedit command or calculated directly from the data of their parameters a, b, c. We can also address the function Matlab gbellmf (Table 21; Figs. 14, 15, 16, 17):

Table 21 coefficients a, b, c of the bell functions
Fig. 14
figure 14

Plot of the membership functions

Fig. 15
figure 15

Output curves X = f (q1, q2, q3)

Fig. 16
figure 16

Output curves Y = g (q1, q2, q3)

Fig. 17
figure 17

Output curves φ = h (q1, q2, q3)

$$ f\left( x \right) = \frac{1}{{1 + \left| {\frac{x - c}{a}} \right|^{2b} }} $$

The curves of the three outputs according to the three inputs will have the following appearance (Fig. 15).

We can then evaluate the predicted outputs for the three structures that correspond to the solution of the problem of direct geometry by the Matlab evalfis

Input Articular Vector:

$$ \begin{array}{*{20}l} {\text{Q}} = [ 1.414213562373095\quad 3.119623504137779 \\ \quad 2.608418597022603 ] \hfill \\ {{\text{Sortie}}\,{\text{x}} = {\text{evalfis}}\left( {{\text{Q}},{\text{anfis}}1} \right) = 1.000027167658954} \hfill \\ {{\text{Sortie}}\,y = {\text{evalfis}}\left( {Q,{\text{anfis2}}} \right) = 1.000670581045958} \hfill \\ {{\text{Sortie}}\,{\varphi } = {\text{evalfis}}\left( {Q,{\text{anfis3}}} \right) = 1.049580733914649} \hfill \\ {{\text{Theoretical}}\,{\text{value}}\left[ {1, \, 1, \,\uppi/4} \right]} \hfill \\ \end{array} $$

Let an absolute squared error be equal to: 2.47·10−3 to improve this precision, one can either decrease the value of the pitch of the meshgrid, or increase the number of membership functions, thus the number of rules of inferences.

We have adopted this approach for the second example.

7.3 Second case: use of three MF membership functions per entry

The three functions induce twenty-seven 27 rules obtained by factorial combination of 3 × 3 × 3 values. The resulting neural structure (fismat1, fismat2 and fismat3) for the three outputs will be as follows, only the AND connector is used (Fig. 18).

Fig. 18
figure 18

Structure of the output

The coefficients a, b, c for the three inputs is shown in the following Table 22.

Table 22 Coefficients a, b, c of candidate bell functions

As before, only the mapping of the membership functions for output X is given. The variation of these functions is given by (Fig. 19).

Fig. 19
figure 19

Plot of the membership functions

The graphs of the outputs as a function of the inputs are represented by the two-dimensional curves (Figs. 20, 21, 22).

Fig. 20
figure 20

Plot of the Output X Membership Functions

Fig. 21
figure 21

Plot of the Output Y Membership Functions

Fig. 22
figure 22

Plot of the Membership Functions φ Output

The solution found is obtained by following the same approach will be:

$$ \begin{array}{*{20}l} {{\text{x}} = 1.000000956587682} \hfill \\ {{\text{y}} = 0.9999828841351883} \hfill \\ \end{array} $$

Let an absolute squared error equal to: 1.57·10−4.

A 25% step reduction (n = 75) will require an average execution time of 20 min (20 min) per structure and gives the following results

$$ \begin{array}{*{20}l} {{\text{x}} = 1.000000956587682} \hfill \\ {{\text{y}} = 1.000000956587682} \hfill \\ {{\varphi } = 1.049506257922610} \hfill \\ \end{array} $$

The model of the PC used is Intel type dual core, 2.4 GHz, and 1 Gb of RAM.

Let us consider an absolute squared error equal to: 1.56·10−4 of the same order as that found above but with three entries. An increase in the number of inputs with the grid pitch being maintained (n = 5), improves the absolute precision on the abscissa X) and the gate at 0.9·10−5. However, at the cost of a run time for A single structure (output X) of two hours and fifty minutes (2 h 50 min).

The calculation of the direct geometry by the neural network-fuzzy logic approach requires relatively long execution times for the determination of the structures that establish the input–output correspondence. But this step necessary to determine the fuzzy structure once realized, will be able to determine the solution of the problem for any input articular vector insofar as it belongs to the intervals of variations.

The accuracy is greatly improved by reducing the grid pitch value of the variation range. This is also the case if the number of membership functions per entry is increased.

However, this method cannot determine all the solutions corresponding to a given articular vector or a fortiori degenerate solutions.

Moreover, the grid of the whole domain for a satisfactory precision leads to prohibitive matrix sizes and will inevitably lead to memory overruns.

The solution is either to work on a high-performance workstation with computational power and enough RAM or to partition the domain into subdomains on which so many structures will be defined, look for the optimal solution, checks the conditions of belonging to the domain and presents the minimum error if several solutions are found.

8 Conclusion

The work presented in this paper concerns the modeling of nonlinear systems using advanced techniques such as ANFIS, the geometric method and the polynomial method.

The proposed approaches rely on the optimization of the error of position as the objective function as well as to exploit the advantages of each of them to develop a better method.

An analysis and comparison of the three used methods are made for determining the best optimal solution concerning the minimum error with minimum execution time. The analysis shows that the optimal solution is obtained by the polynomial method.