Guaranteed detection of the singularities of 3R robotic manipulators

. The design of new manipulators requires the knowledge of their kinematic behaviour. Important kinematic properties can be characterized by the determination of certain points of interest. Important points of interest are cusps and nodes, which are special singular points responsible for the non-singular posture changing ability and for the existence of voids in the workspace, respectively. In practice, numerical errors should be properly tackled when calculating these points. This paper proposes an interval analysis based approach for the design of a numerical algorithm that ﬁnds enclosures of points of interest in the workspace and joint space of the studied robot. The algorithm is applied on 3R manipulators with mutually orthogonal joint axes. A pre-processing collision detection algorithm is also proposed, allowing, for instance, to check for the accessibility of a manipulator to its points of interest. Through the two proposed complementary algorithms, based on interval analysis, this paper aims to provide a guaranteed way to obtain a broad characterisation of robotic manipulators.


Introduction
Algorithms and methods described in this article are applied to the study of a family of robotic manipulators: 3 revolutejointed manipulators with mutually orthogonal joint axes.Those manipulators are first studied because they can be regarded as the positioning structure of a 6R manipulator with a spherical wrist.A main point is that they can be cuspidal, which means that they can change their posture without having to meet a singularity, as detailed in Baili et al. (2004) and Wenger (2007).It may or may not be the desired behaviour.
To help the reader understand the notion of non singular posture changing that motivate the study of cuspidal manipulators, two videos showing, respectively, a non-singular and a singular posture changing trajectory, are proposed alongside the online version of this paper (see Supplement).For a robot with only revolute joint axis, checking that a configuration is singular can be done through a geometrical method.Indeed, a configuration is singular if the end effector is in a revolute joint axis or if the end effector is on a line that cross all of the actuated revolute joint axis (see Baili, 2004).
A cuspidal robot has at least one cusp in a planar cross section of its workspace.On the other hand, the existence of nodes in this section is intimately related to the existence of voids in the robot workspace.Thus, cusps and nodes are important points of interest (Husty et al., 2008).A classification based on the number of such points can be established (Corvez and Rouillier, 2004;Baili et al., 2004).
Cusp points ans nodes points are named after the local form admitted by the image of the singular set at such point.Indeed, a cusp point, in the workspace, is a mathematical cusp point for at least one cross section of the image of the singular set.Similarly, in a cross section of the workspace, a node is located at the crossing of two branches of the image of the singular set.
Formally, a node is defined as a workspace point with two singular inverse kinematic solutions (IKS).In a similar fashion, a cusp can be defined as a workspace point with three equal singular IKS.These definitions are the one used in Baili et al. (2004), so as to define a formal condition for the Published by Copernicus Publications.R. Benoit et al.: Guaranteed detection of the singularities of 3R robotic manipulators presence of cusps and nodes through a characteristic polynomial.
Studying the nature of singular points instead of only isolating them to avoid unstable behaviour is relatively recent (Wenger, 2007).However, this approach is quite complementary to the common objective to detect the singular set of a robot, providing useful information on the properties of the robot, particularly for novel design.Methods for detecting the singular set include the brute force method of evaluating numerically the norm of the determinant of the Jacobian (det(Df)) and extracting the set of points minimizing this quantity.At the opposite of the spectrum, the equation det(Df) = 0 is formally or implicitly solved and numerical solution may be extracted from this resolution.For formally complicated kinematic function, a middle ground is needed in the form of methods returning precise constraints on the singular points.This middle ground usually implies a general scheme synergistic with interval analysis methods and will be detailed in Sect.3.
The main point of the algorithm and methods we are detailing here is to use Interval Analysis to enclose, in a guaranteed way, the cusps and nodes in the generator plane section of the manipulator workspace.To find these points, we use two systems of equations, whose roots are joint space points yielding the cusps and nodes.To enclose the roots of those systems of equations, the Interval Newton method is used.
We will verify that, for manipulators with no internal motion, and with some imprecision in their geometric parameters, it is possible to find their cusp and node points, with the formerly introduced algorithms.
Complete studies of manipulator families, as done in Baili et al. (2004), allow one to choose a manipulator within a large range of geometric parameters, when a precise behaviour is needed.Alternatively, algorithms presented in this article make it possible to study manipulators with geometric parameters between chosen bounds.It makes them a first step in guaranteeing the behaviour of a manipulator, given its geometric parameters, and the precision affordable for building the actual manipulator.

Studied manipulators
The studied manipulators have three unlimited revolute joints.Thus, it is sufficient to restrict the analysis to their last two joints.Since the workspace is symmetric about the first joint axis, it is enough to restrict its analysis to a planar half cross-section in the plane defined by x 2 + y 2 , z , that we will identify to x 2 + y 2 , z for computational purposes.Figure 1 shows the studied manipulator and its geometric parameters.Note that, for a matter of convenience in our algorithms, angles β i have been used instead of the standard α i , where β i = π/2 − α i .
We will first consider the same manipulators as in Baili et al. (2004) that is, manipulators with orthogonal rotations and no offset along their last joint.With conventions chosen in Fig. 1, these manipulators are defined by β 2 = β 3 = r 3 = 0.
Figure 2 shows, for an instance of orthogonal 3R manipulator, the singular sets of its kinematic function, in the joint space (θ 2 , θ 3 ) and the workspace cross section ρ = x 2 + y 2 , z .Figure 2 also illustrate the nature of the cusps and nodes, as the cusps (C1, C2, C3, C4) and the nodes (N1, N2), are pictured in the workspace cross section.Their inverse kinematic solutions, on the singular set in the joint space, which are respectively (c1, c2, c3, c4) and ({n1, n1 }, {n2, n2 }), are also pictured, as they are the points we are effectively searching in this paper.
We will show that our methodology is able to provide the same results as in Baili et al. (2004).Furthermore, our approach can also be used for manipulators with an offset along their last joint and always returns an exact enclosure of the searched singular joint space points.

Interval analysis
Interval analysis is a computing method, that operates on intervals instead of operating on values.The point of this is mainly for numerical computation because it allows one to guarantee values to be in intervals (see Jaulin et al., 2001;Moore, 1996) whose bounds can be exactly stored by a computer.Interval analysis is a simultaneous computation of numbers and errors.
In this article, boxes will be vectors of intervals.The notion of interval can be extended by Cartesian product, so Interval analysis can be extended to boxes by the use of inclusion maps.
Let f be a map.An inclusion map of f is a function In practice, the inclusion map [f ] of f is chosen to minimize the boxes [f ](D) with respect to inclusion.
This computing method is useful for its usability when a limited set of values can be exactly represented, as for numerical computations.In this case, a point P is represented by the smallest box D containing P and f (P ) is represented by [f ](D), the smallest box in the image space containing f (D).

Interval analysis in Robotics
Interval analysis is a tool that, due to its properties seen in Sect.3.1, can be used for many applications in Robotics (see Merlet, 2011) such as computing the kinematics of manipulators, including parallel ones.
One of the robotic applications of Interval Analysis is singularity analysis, that is, finding singular points of the kinematic map of a manipulator.To find those singular points, a general scheme is used, which consists of a subdivision and shrinking process on the box of study.The main idea is that the searched points are defined as roots of an equation.Then, any box whose image by the map associated with the equation does not contain 0, does not contain any searched point.If a box may contain a root, then an operator is used to shrink the box to smaller ones containing the roots in the initial box.Ultimately, when the box cannot be reduced this way, it is cut into several sub-boxes that are studied again.An instance of this scheme, to enclose the singular points of manipulators, can be found in Bohigas et al. (2012) and Bohigas et al. (2013).What makes the general scheme synergistic with Interval Analysis, is that they both operate on boxes and have the purpose to enclose computed values.
As stated previously, several methods, using Interval Analysis or not, exist to enclose the singular points of a manipulator.But, it is also necessary to verify the nature of those singular points.For instance, suppose you succeeded in finding the enclosure of the singular set in the workspace as in  In this paper, we propose an algorithm to enclose specific singular points that define the behaviour of a manipulator, using Interval analysis.Accordingly, next subsection proposes a method to enclose numerically roots from a system of equations, through Interval Analysis: the Interval Newton method.

The Interval Newton algorithm
Given a square system of equations described by f = 0, we can define an operator over boxes.This Interval Newton operator N f associated to the map f is defined by: where D is a box and x ∈ D. df(D) is the matrix of intervals enclosing all the matrices associated to the linear map of the differential of f at a point in D and (.) −1 is the operator of matrix inversion.In practice, in our algorithm, (.) −1 is computed applying the formulae of the inverse of a matrix.It should be noted that, in Eq. ( 1), instead of (df(D)) −1 × f (x), any set (D, f (x)) could be used, as long as it encloses the solutions w of Aw = f (x) where A ∈ df(D).
The main point is that the topological relation between D and N f (D) depends on the presence of a root in D: The Interval Newton method applied with f is defined (see Neumaier, 1990) as being the Algorithm following the flow diagram of Fig. 4.
The Interval Newton algorithm is able to find the roots of a square system of equations if the Jacobian matrix associated with it is invertible for the roots of the studied system, implying that the Interval Newton method can only find isolated roots.
The Interval Newton method can also fail if the chosen precision is not small enough.For instance it can allow a studied box with a size smaller than the precision to contains several roots.One then has to choose a smaller precision, such as no box can contain several roots.

Kinematic map and singularity concepts
We should first recall that Cusps points and nodes points in the workspace are singular positions of the end effector satisfying some additional properties: a cusp admits three equal inverse kinematic solutions and a node admits two distinct pairs of equal inverse kinematic solutions.Instead of searching for those points in the workspace, we are searching for their inverse kinematic solutions.Our points of interest are then what we are defining as Cusps and nodes in the joint space which are the sets of the singular inverse kinematic solutions of the cusp points and node points in the workspace, respectively.
In the case of 3R orthogonal manipulators, using the conventions of Fig. 1, due to their invariance along the rotation of parameter θ 1 we consider the joint space JS defined by JS = {(θ Similarly, instead of considering the entire workspace, we consider a generator cross section of the workspace, SWS, that can be easily defined as the cylinder coordinates around the z axis, minus the angular coordinate.A position (x, y, z) in the workspace is then converted as (ρ = x 2 + y 2 , z).From these consideration, the manipulator kinematic map can be expressed as An internal motion occurs when the end tip point P reaches a joint axis.In this case, the inverse kinematics admits a continuum of solutions, which forms a line in the joint space.On any box that intersect an internal motion line, the proposed algorithm cannot conclude.

Applying the Interval Newton algorithm
Applying the Interval Newton algorithm to find cusps and nodes requires to define those points and pairs of points as roots of square systems of equations.We will then consider the same properties and characterisation of cusp and nodes points, in the joint space, that were developed in Delanoue and Lagrange (2014).Additionally, the situations where the defining systems are degenerated will be handled in a nontrivial manner to allow a quicker execution of the constructed algorithm.

Application to the cusps
In the following, df refers to the differential of f and Df refers to the Jacobian matrix of f , which is the matrix associated to df .
Geometric considerations: we consider that a joint cusp point, C, is a point for which the orthogonal of Ker(df (C)) is collinear with the gradient of the singular curve, defined by det(Df) = 0.It is worth noting that in R 2 , being collinear with a vector v = (v 1 ; v 2 ) = 0 is the same as being orthogonal to the vector w = (−v 2 ; v 1 ) = 0. Also, if Df(P ) = 0, the rows of Df are a base of the orthogonal of Ker(df (P )) and as long as Df(P ) is invertible, the orthogonal of Ker(df (P )) is of dimension 2 and thus it cannot be collinear with grad(det(Df))(P ).Putting all of this together, we can conclude that if grad(det(Df))(P ) is not the null vector and Df(P ) is not the null matrix, then P is a cusp point if: Specificities for the algorithm: system ( 2) is square, which allows one to use the Interval Newton Method to find its isolated roots.The roots of system (2) that we are searching are singular points.Then, we will apply the Interval Newton Method only if a studied box contains a singular point, that is, if det(Df) may be null on the box.The final point is that grad(det(Df))(P ) and Df(P ) must not be null for the searched roots P , in order to detect those.Then, we will always verify that the components of grad(det(Df)) and Df(P ) are not null on the boxes that should contain a cusp-root.If it is not the case on one of the isolated box, it will be cut into pieces that will be studied again.

Application to the nodes
Geometric considerations: node points are much simpler than cusp points for transcription in roots of a map.Indeed, let E be the diagonal of E, that is E = {(a, a)|a ∈ E}.Then, we are searching for couples ( Specificities for the algorithm: to apply the Interval Newton method to the system (3), this system needs to be a square one, which is the case here, with 4 joint variables and 4 equations.We search the roots in JS × JS ⊂ R 2 × R 2 while avoiding the roots in JS ⊂ R 2 , because on this last subset, the Jacobian matrix associated with the system (3) is not invertible while having roots and the Interval Newton method fails.
Let S j be the singular set of f (in the joint space JS).Instead of applying the time consuming process of verifying that a studied box does not intersect JS and verifying the injectivity of f , restricted to a subset of S j each time the intersection occurs, one can build a covering of S j verifying a well chosen property.Indeed, if the covering is done so that any intersecting boxes admit a hull on which f , restricted to S j , is injective, then, it suffices to apply Interval Newton algorithm with system (3) to couples of disjoint boxes, in this last covering.
Note that the covering, built along with the process, is a guaranteed covering of the singular set.

Implementing and running the cusp and node algorithms
All results in this section are valid for any value, or interval of values, of r 3 .
To implement, in C++, the algorithms defined in Sect.4.2, for 3 revolute-jointed manipulators with mutually orthogonal joint axes, formal expressions of the derivatives and matrices derived from f , needed in the algorithms, were calculated.The algorithms evaluate the needed expression on the required boxes, replacing the standard functions and operators by corresponding inclusion maps.To handle intervals and operations on them, the library "Filib++" is used.
The application to more general 3 revolute-jointed manipulators, with β 2 = 0 or β 3 = 0, can be done by calculating their kinematic map.But, as the formal expressions increase in length, the running time of the algorithm may increase and the precision needed to enclose the interest points may need to be higher.
In the implemented algorithms, the initial box of study for (θ 2 , θ 3 ) can be defined using any box or list of boxes, in R 2 .The box of geometric parameters can also be chosen.Our algorithms can also be coupled with a procedure enclosing the usable joint space, given a simple volumetric model of the manipulator.The returned enclosure may also be chosen as the boxes of study.
Table 2 shows results returned by the algorithms, applied to examples of classes of studied parameters for 3 revolute-jointed manipulators with orthogonal axes, reported in Table 1, and with an initial box of study for (θ 2 , θ 3 ) of [−3.1415, 3.1415] × [−3.1415, 3.1415] close to the [−π, π ] × [−π, π ] full range for the joint angles.a, b, d and e of Table 1): the algorithm has been applied to every example of geometric parameters sets in Baili et al. (2004).When the manipulator does not have an internal motion, for a moderate precision, the algorithm needs little time to find the rigorous enclosures of the cusps, and does not return any indeterminate box.

Manipulator inducing no indeterminate (cases
Manipulator inducing indeterminate (case f of Table 1): when the algorithm is applied to a robot that has internal motions, it finds the cusps outside the internal motions, with the same running time as before.The algorithm then has to run for some time until it encloses the lines associated with the internal motions with boxes whose size is the chosen precision.The running time is then dependant of the chosen precision.

The nodes enclosing Algorithm
On boxes where there is no cusps and no internal motion lines (case d of Table 1) the nodes enclosing algorithm concludes after a running time close to the one needed for the cusp enclosing algorithm with no internal motion.However, when the box includes a cusp (cases a, b and e of Table 1) the running time of the algorithm increases quite significantly, because, near cusps, f restricted to S j , is injective only on small boxes.In the same way, the Interval Newton method can conclude, only on small boxes when the hull box of its two components is close to a cusp point.

Performance improvement using contraction methods
As it has been formerly noted, the main drawback of the algorithm is its relatively slow check of the absence of nodes near cusps.To improve on this, we decided to rely on the contraction method library Ibex, available freely at http://www.ibex-lib.org/,with documentation.
A Contractor is an operator on Boxes, associated to a set, that reduce the box to a smaller box without removing any element of the associated set.Contraction methods are used in Interval Analysis to enclose a set.It relies on contractors, associated to the chosen set, and may use subdivisions, so as to get a enclosure of the chosen set.The main interest of those methods is that reducing a box using contractors is a lot less time consuming than bisecting it until a chosen precision.
An Ibex contraction procedure is included in the algorithm as an additional check before applying an iteration of the node Interval Newton method on a couple of disjoint boxes.The procedure is based upon a contractor using the Interval Newton method with the system dedicated to the node as parameter.As the Ibex procedure's contractor reduce quite efficiently the studied boxes, we use it as a quick way to check the absence of node in a couple of boxes (see as a box of double dimension).If the procedure return an empty box as a result, then, there is no node in the initial couple of boxes and it is not needed to apply any subdivision process or interval Newton iterations further.
As a result of including the Ibex calling test in the node searching step, the performances of the algorithm toward the length of checking the absence of nodes have been greatly improved.For instance, the time needed to execute the node searching step, for a 3R manipulators with nodes and cusps is decreased to less than a fifth of its value (case e of Table 1).

Application with boxes of geometric parameters
Our algorithms have been implemented to handle intervals of geometric parameters, so to use intervals of parameters (as for case b of Table 1) it is only needed to define a box of geometric parameters which is not restricted to a point.If the algorithms find a solution box, then, for any set of geometric parameter in the defined box of parameters, there is a single interest point in the solution box.There will be no interest point in any box that is neither a solution box nor an indeterminate box for any set of geometric parameter, in the defined box of parameters.Ultimately, it can exist interest points, for any set of geometric parameter in the defined box of parameters, only in solution boxes and in indeterminate boxes.For a manipulator with an internal motion, the algorithms return, at least, enclosures for a subset of the interest point and a covering of the research space that can contain interest points.

Collisions detection through Interval Analysis
An complementary procedure have been added to our algorithm, allowing the user to get an enclosure of the set of parameters inducing collisions and of the set of parameters inducing no collisions at all.

Used model
Solids that may collide (either elements of the manipulator's kinematic chain or environment obstacle) are considered oblong object defined by a segment and a radius, where the oblong object is the set of all points distant to the segment from at most the defining radius, see Fig. 5.With this model, two objects collide if and only the distance between the respective defining segments is equal or less than the sum of the two defining radius.

Implemented procedure
The implemented procedure is based upon the SIVIA inversion algorithm, and consists in applying it for the distance between every pair of defined segments.As it implies computing the minimum of the distance between a point in one segment and a point in a second one, the two segments are split until a limit size and the distance between each couple of sub-segment is checked if greater than the sum of the radius.
As the distance varies with the articular parameters, the former process is applied for sub-boxes of the initial list of boxes of articular parameters.To sum up, the procedure is applying a list of consecutive double-SIVIA for each couple of solids that may collide, the user defined to be studied.

Joint use with cusp and node detection
The interest of the collision detection procedure in itself is to control the feasibility of given paths in the joint space, by the studied manipulators.Combined with the the knowledge of an enclosure of the singular set, returned by the preprocessing step of the node enclosing procedure, one can also check for the possibility to join two posture by a non singular feasible path.
The joint use of the procedure with the main detection algorithm also allows, quite naturally, to check for the manipulator access to the chosen interest points.In our case, the inaccessibility to the cusps and nodes may not change the behaviour of the manipulator.However, for instance, a wide collision zone around a cusp, may imply, that the manipulator is, in practice, not cuspidal if no articular path can link two IKS without crossing a singularity or inducing collision.

Conclusions
The main interest of the proposed method is that it can be used to find any isolated point of interest for the evaluation of the behaviour of any manipulator, provided it can be defined by a root of a square system of equations.Then, this methodology constitutes a possible way of describing a robotic manipulator singular set, allowing for the guaranteed detection of isolated specific singular points of interest.
It is to be noted that most of the running time of the algorithm is used to treat boxes where the Interval Newton algorithm fails to conclude.To increase the performance of the www.mech-sci.net/7/31/2016/Mech.Sci., 7, 31-38, 2016 algorithm, alternate methods for splitting and localized tests need to be used and are still searched.
As for a lot of Interval Analysis algorithms, our algorithm can be time consuming when dealing with complicated kinematic functions or high dimension boxes of study, especially for the nodes enclosing algorithm, due to the doubled dimension of the box of study, although attenuated by a presubdividing in the joint space.However, provided that the algorithm runs for the time needed with a sufficient precision, it is able to find enclosures for the searched points without errors, or at least a subset of those enclosures and a covering of the searched points.
With the joint use of the collision procedure, the algorithm aims to provide efficient and guaranteed information about the manipulator's kinematic properties.The algorithm could provide additional information that may be relevant to the user's interests with additional procedures to, for instance, enclose the singular positions in the workspace or enclose the non-singular IKS of the singular positions.As such, the reader may found the source code to the algorithms at http://perso-laris.univ-angers.fr/~benoitr/contenu/thom_2d_online.zip.
The Supplement related to this article is available online at doi:10.5194/ms-7-31-2016-supplement.
Edited by: D. Pisla Reviewed by: two anonymous referees

Figure 3 .
Figure 3. Two identical box coverings with two possible couples of covered curves.

Fig. 3 .
Fig.3.The real singular set can be either one of the two instance depicted in this Fig.3.To conclude on the behaviour of the manipulator, it is necessary to verify if the two curves intersect or not.In this paper, we propose an algorithm to enclose specific singular points that define the behaviour of a manipulator, using Interval analysis.Accordingly, next subsection proposes a method to enclose numerically roots from a system of equations, through Interval Analysis: the Interval Newton method.

+Figure 5 .
Figure 5. Oblong solid model as a Minkowski sum of a segment and a ball.

Table 1 .
Some studied cases of robotic manipulators.

Algorithm 1
Set Inversion Via Interval Analysis (SIVIA) algorithm Require: A set S, a function, and a real number (a limit of size) and a list of boxes of research L return 3 lists of boxes I , O and U B∈I B) ⊂ S ⊂ (∪ B∈(I ∪U ) B) and S ∩ (∪ B∈O B) = ∅