Kinematic aspects of a robot-positioner system in an arc welding application

This paper focuses on the kinematic control of a redundant robotic system taking into account particularities of the arc welding technology. The considered system consists of a 6-axis industrial robot (welding tool manipulator) and a 2-axis welding positioner (w orkpiece manipulator) that is intended to optimise a w eld joint orientation during the technological process. The particular contribution of the paper lies in the area of the positioner inverse kinematics, w hich is a key issue of such system off-line programming and control. It has been proposed a novel formulation and a closed-form solution of the inverse kinematic problem that deals with the explicit deﬁnition of the weld joint orientation relative to the gravity. Similar results have also been obtained for the known problem statement that is based on a unit vector transformation. For both the cases, a detailed investigation of the singularities and uniqueness-existence topics have been carried out. The presented results are implemented in a commercial software package and veriﬁed for real-life applications in the automotive industry.


Introduction
Welding technology is a traditional application area of industrial robots, so it encourages intensive research and development of sophisticated model-based control and programming tools.Such software systems allow to optimise some process parameters, which directly influences the product quality and the working cycle of the system.Besides, the model-based programming allows one to complete most of the process preparation actions without access to the workcell, and therefore, to make the robotic systems competitive for small-batch manufacturing.However, there are still a number of theoretical problems, which at the present stage are overcome in industry by combining simulation with the expertise of the designer.This paper concentrates on one of such problems, the kinematic control of a redundant robot-positioner system.
Such emphasis on the kinematics is originated from the dual nature of the robotic system control and programming, which requires defining both a logical structure of the manufacturing task and specifying spatial relations that are presented as motion parameters.Obtaining these spatial relations is a very tedious and time-consuming process, which is typically about 10-100 times longer than the product welding circle (Bolmsj . o, 1999;Pashkevich, 1996).And even the application of the off-line programming systems does not reduce this time drastically, while the robot idle time (when the robot cannot be used for the production because of the programming) is obviously decreased.
In the arc welding, the kinematic capabilities of a 6axis robot are not usually sufficient to ensure the required working envelope and/or the desired orientations of the technological tool (the welding torch).The robot must move the tool along the weld joint with the prescribed velocity and orientation relative to the joint, while the weld must be also properly oriented relative to the gravity vector.For this reason, a typical welding station (Fig. 1) includes several computer-controlled machines: a 6-axis industrial robot (tool manipulator); a 1-2-axis positioner (object manipulator); and, optional, a 2-3-axis gantry (robot manipulator).
Such an arrangement forms a redundant kinematic system, which usually does not possess a closed-form solution for the inverse kinematics of all the machinery.Because of the complexity of this problem, it is usually decomposed in several separate tasks, which are solved sequentially: Each of these steps requires multiple coordinate transformations for the corresponding machines (both direct and inverse ones).However, in the robotic literature, the main research activity focuses on the 6 d.o.f. and redundant robots, which are investigated in detail (Lee, Woernle, & Hiller, 1991;DeMers & Kreutz-Delgado, 1997;Kauschke, 1996;Hsu, 1993;Perdereau & Drouin, 1996 and others).To our knowledge, only Bolmsj . o (1987) and Nikoleris (1990) from the Lund Institute of Technology (Sweden) investigated the positioner kinematics for the welding applications.And even in sophisticated industrial packages, such as ROBCAD (Tecnomatix Technologies) and IGRIP (Deneb Robotics), the optimisation process (''redundant kinematic chain balancing'') is still semi-automatic and employs the direct/inverse kinematics for robots, but only direct kinematics for positioners.
This paper extends the results of Bolmsj .o and Nikoleris by proposing closed-form solutions for the optimal weld joint orientation problem and includes a careful investigation of the singularities and solution existence issues.There are also proposed expressions for the positioner configuration indices, which ensure a unique solution of the problem for a single input and continuous solutions for a sequence of inputs defining the welding path.The latter is extremely important for the coordinated control of the positioner and the robot in the Cartesian space, when change of the configuration during welding is not allowed.
The remainder of this paper is organised as follows.Section 2 describes the kinematic control architecture and introduces the kinematic description of the welds.Section 3 is devoted to a formal statement of the weld joint orienting problems.In Section 4, the direct kinematic model of a general welding positioner is derived.Section 5 gives the inverse kinematic solution as well as a detailed investigation of the singularities and uniqueness-existence issues.In Section 6, an industrial implementation is presented and real-life industrial applications are described.And, finally, Section 7 summarises the main contributions of this paper.

Control hierarchy
In contrast to the early robotic manipulators, in which capabilities were limited by the servo-control of separate joint axes, the modern industrial robotic systems should implement the task-level control that essentially simplifies the manufacturing task definition for the end user (Bolmsj . o & Nikoleris, 1993;Nikoleris, Bolmsj . o, Olsson, & Brink, 1994).It results in including a kinematic control module as a built-in part of the hierarchical control system, where the high-level command is sequentially decomposed to the lower level ones, up to the axis drives and the process variable controllers.However, in spite of the apparent simplicity, defining of a particular content of each control level requires development of specific mathematical methods that take into account particularities of the relevant technology.
For the arc welding applications, five levels of control are typically used (Fig. 2).The highest of them highly relies on the kinematic modelling and deals with obtaining the optimal technological and geometrical parameters, such as the orientation angles of the weld joint and the welding gun, the weld sequence, the weld speed, etc.The fourth level performs appropriate coordinate transformations via the direct/inverse kinematics of all mechanical components (robot, positioner, gantry).The remaining three levels deal with the implementing of tool/workpiece movements in the Cartesian space, in the manipulator axis space and, finally, in the motor shaft space.(It should be noted that for some manipulators, the interrelation between the axis angle and the motor shaft angle is non-trivial.) At present, control techniques for all the abovementioned hierarchical levels are being intensively developed.For instance, advanced commercial controllers already include the forward dynamic models, which essentially improve the operational speed and accuracy.However, various aspects of the fourth and the fifth control levels are still subject of research and only limited industrial applications are reported.
This paper focuses on the kinematic aspects of the robot-positioner system (which are essential for the second control level), assuming that the simultaneous motion of the robot and the positioner are aimed at providing the optimal workpiece orientation relative to the gravity during welding.Since in the modern controllers such motions are implemented in the ''master-slave'' mode (when a robot follows the moving weld joint), the main attention is paid to the positioner direct/inverse kinematics, as well as to the definition of the weld joint world orientation in terms of the technological requirements.

Kinematic description of the welds
The spatial location of the welding object, as a general rigid body, can be defined by a single frame that incorporates six independent parameters (three Cartesian coordinates and three Euler angles).However, defining geometry of each weld requires some additional efforts, depending on the joint profile.Since capabilities of modern commercial robotic systems allow to process two basic types of the contours (linear and circular), only these cases are considered below.
For the linear joints, a moving frame with the specific definition of the axes can describe the weld geometry.In this paper, this frame is defined so that: It should be noted that, in practice, it is prudent to define the Y w -axis as the bisectrix of the corresponding weld joint surfaces.
Taking into account the above definitions, the kinematic model of the linear weld relative to the WBframe (i.e., the workpiece base frame, see Fig. 3) can be described by the following homogenous parametric equation: where the parameter l is the welding torch displacement, the left superscript ''WB'' refers to the workpiece base coordinate system, the right superscript ''s'' and the subscript ''w'' denote starting point of the weld, n s w is the unit vector of the welding direction (axis X w ), s s w is the unit vector of the approaching direction (axis Y w ), ------------------and p s w is the position vector of the weld starting point.It should be stressed that the vectors n s w ; s s w ; p s w are defined relative to the WB-frame and, in practice, they are easily derived from the workpiece 3D CAD model.
For the circular joints, a similar approach is used, but the moving frame is computed to ensure the tangency of the welding path and the X w -axis at every point (Fig. 4).It is evident that the initial frame is subject to the rotational transformation and the weld kinematics is described by the following parametric equation: where the parameter l and the sub/superscripts ''WB'', ''w'', ''s'' have the same meaning as in (1), the orthogonal 3 Â 3 matrix is expressed as R s w ¼ ½n s w s s w n s w Â s s w and defines the orientation of the weld frame at the starting point, r is the radius of the circular welding joint, W ¼ l=r is the angle of rotation, the vector p e defines the position of the circle centre, and R e ðWÞ is the general rotation matrix (Fu, Gonzalez, & Lee, 1987) around the axis, which is determined by the unit vector e ¼½e x e y e z T (see Fig. 4): As in the previous case, the required vectors n s w ; s s w ; p s w and e; p e ; as well as the radius r; may also be easily derived from the workpiece 3D model using capabilities of the modern graphical simulation systems to generate straight lines, planes and circles.Thereby, expressions (1)-(3) completely define spatial location (i.e., the position and the orientation) of the weld joint relative to the WB-frame (workpiece base), which should be adjusted by the positioner to optimise the weld orientation relative to the world coordinate system (see Fig. 1).Hence, the absolute (world) location of the weld joint is described by the product of the homogenous matrices 0 WðlÞ¼½ 0 T PB Á PðqÞÁ PF T WB Á WB WðlÞ; ð4Þ where the left superscript ''0'' refers to the world coordinate system, the matrix 0 T PB defines the absolute (world) location of the positioner base PB; the matrix PF T WB describes the workpiece base WB location relative to the positioner mounting flange PF ; and the matrix function PðqÞ is the positioner direct kinematic model, while q is the vector of the positioner joint coordinates.
To ensure good product quality and to increase the welding speed, the weld joint should be properly oriented relative to the gravity.The exact interrelations between these parameters are not sufficiently well known and require empirical study in each particular case.But practising engineers have developed a rather simple rule of thumb that is widely used for both the online and off-line programming: ''the weld should be oriented in the horizontal plane so that the welding torch is vertical, if possible'' (Bolmsj . o, 1987).It is obvious that the simulation-based approach requires numerical measures of the ''horizontality'' and the ''verticality'', which are proposed below.
Let us assume that the Z 0 -axis of the world coordinate system is strictly vertical (i.e.directed opposite to the gravity vector), and, consequently, the X 0 Y 0 -plane is horizontal.Then, the weld orientation relative to the vector of gravity can be completely defined by two angles: The numerical expressions for y; x can be obtained directly from the definition of the RPY -angles (Fu et al., 1987;Craig, 1989), taking into account that the weld orientation ðy; xÞ¼ð0; 0Þ corresponds to the horizontal direction of the axis X w and the vertical direction of the Y w (see Fig. 5 where 0 W R is the 3 Â 3 orientation submatrix of the 4 Â 4 matrix of the weld location; R x ; R y ; R z are the 3 Â 3 rotation matrices around the axes X ; Y ; Z; respectively, and c is the yaw angle which is non-essential for the considered problem.Multiplication of these matrices leads to  ------------------where C and S denote, respectively, cosð:Þ and sinð:Þ of the corresponding angle specified at the subscript.Therefore, the weld joint orientation angles y; x can be derived as follows: where 0 n w ; 0 s w ; 0 a w are the corresponding column vectors of the orthogonal matrix 0 W R : Taking into account the interrelations between these vectors, the angles y; x can be finally expressed as functions of the weld joint direction 0 n w and the approaching In the singular case, if n wE ½00 71 and consequently yE7p=2; for y ¼Àp=2: Hence, the expression for x degenerates (the uncertainty 0/0) and x can take any value from the half-open interval ðÀp; p: In this case, as follows from the geometrical meaning, the weld joint is directed strictly vertically and the approach vector completely lies in the horizontal plane.So, any value of x is equivalent from the physical point of view, if yE7p=2: It should be noted that it is possible to introduce an alternative definition of the weld roll, which is nonsingular for all values of the weld slope.It is x 0 A½0; p which is the angle between the approaching direction 0 s w and the vertical axis Z 0 (see Fig. 5): As in the case of the angles ðy; xÞ; the description ðy; x 0 Þ also defines the 3rd row of the weld joint orientation matrix 0 W R ; however, the sign of the component a z w may be chosen arbitrary: Hence, the interrelation between both the definitions of the roll angle x and x 0 is given by the equation cosðyÞ cosðxÞ¼cosðx 0 Þð 10Þ and both ðy; xÞ and ðy; x 0 Þ may be used equally.

Weld joint orienting problems
In the robotic welding station, the desired orientation of the weld relative to the gravity is achieved by means of the positioner, which adjusts the slope and the roll angles ðy; xÞ by alternating its axis coordinates.Using the kinematic model ( 4) and the definitions from the previous section, the problems of the welding joint orientation can be stated as follows: Direct Problem.For given values of the positioner axis coordinates q; as well as known homogenous transformation matrices 0 T PB ; PF T WB and the weld frame location relative to the object base W; find the weld frame orientation in the world coordinate system 0 W and the slope/roll orientation angles ðy; xÞ: Inverse Problem 1.For given values of the slope/roll orientation angles ðy; xÞ; as well as known homogenous transformation matrices 0 T PB ; PF T WB and the weld frame location relative to the object base W; find the values of the positioner axis coordinates q: There is also another statement of the inverse problem for the welding positioner (Nikoleris, 1990) that deals with a reduced version of expression (4), which describes only a single unit vector transformation: where the unit vectors 0 s w and s w define the weld approach direction relative to the world coordinate system and the object base, respectively.Using the accepted notations, this formulation can be stated as follows.
Inverse Problem 2. For given values of the world coordinates of the weld approach vector 0 s w ; as well as for known homogenous transformation matrices 0 T PB ; PF T WB and the normal vector orientation relative to the object base s w ; find the values of the positioner axis coordinates q: It should be stressed that both the formulations require two independent input parameters (two angels or a unit vector); however, they differ by the elements of the matrix 0 W R they deal with.Thus, the first formulation deals with the third row of the 3 Â 3 matrix 0 W R ; which includes only the Z-coordinates ½n z s z a z that are not sensitive to the rotation around the gravity.In contrast, the second formulation operates with the second column ½s x s y s z T of this matrix, which incorporates the X ; Y -coordinates that are sensitive to the mentioned rotation.As a result, the second approach does not allow achieving the desired weld slope and roll simultaneously.Therefore, the second formulation of the inverse problem is less reasonable from the technological point of view.
The only case when the second formulation is sensible, is the so-called ''optimal weld orientation'', for which the approaching vector is strictly vertical (i.e. 0s w ¼½001 Þ and, consecutively, the weld direction vector 0 n w ¼½ ** 0 lies in the horizontal plane.But the first formulation also successfully tackle this case, as it corresponds to ðy; xÞ¼ð0; 0Þ: However, the second formulation can be successfully applied in the case, which is singular for the first formulation ðy ¼ 7p=2Þ; when defining the roll angle does not make sense.It is achieved by reformulating the problem, i.e. replacing the approaching vector by the weld direction vector, which must be directed vertically (i.e. 0n w ¼½0071).For this reason, both formulations of the inverse problem will be considered below.
While applying the inverse formulation to real-life problems, it should also be taken into account that engineering meaning of the slope and the roll is not sensitive to the sign of these angles.For instance, the negative slope can be easily replaced by the positive one if the weld starting and ending points are interchanged.Also, the positive and negative rolls are equivalent with respect to the gravity force.Therefore, four cases ð7y; 7xÞ must be investigated while orienting the weld joint for a particular manipulating task.A similar conclusion is valid for the alternative definition of the weld orientation angles ðy; x 0 Þ; where x 0 > 0; but two cases ð7y; x 0 Þ yield four different matrices 0 W R :

Direct kinematic problem
As follows from Eq. ( 4), successive multiplications of the corresponding homogenous matrices gives, for the given axis coordinates q; the full world location (position and orientation) of the weld frame.Then, the required angles ðy; xÞ or ðy; x 0 Þ are extracted from the matrix 0 W R in accordance with expressions (6)-( 9).Therefore, the only problem is to find the matrix PðqÞ that describes the transformation from the positioner base to its mounting flange (or the face plate).
Because the weld joint orientation relative to the gravity is completely defined by two independent parameters, a universal welding positioner has two axes.Though, the simplest robotic cells also utilise 1-axis positioners (turntables and turning rolls) that are not capable of providing the full weld orientation but also increase a potential of the welding station.Robotic manufactures also produce 5-axis positioners that are, in fact, a combination of two 2-axis machines that are placed into the robot workspace in turn (using the 5th axis), to make possible changing the workpiece while the robot is welding on the other side.Therefore, the 2-axis positioner can be considered as the basic orienting component of the welding station, so the remainder of this Section is devoted to the positioners with two degrees of freedom.
While building the positioner model, it should be taken into account that the intersection point of the positioner axes may be located above the faceplate, to be closer to the workpiece centre of gravity (Fig. 6a).Such a design allows avoiding large payload moments that are specific for heavy and bulky objects.But in some cases, this point may lie above the plate (Fig. 6b).For this reason, it is prudent to release the usual constraint that assumes locating of the positioner base frame at the intersection of its two axes.
The kinematic model of the general 2-axis positioner is presented in Fig. 7.It includes four linear parameters ða 1 ; d 1 ; a 2 ; d 2 Þ and one angular parameter a that defines the direction of the Axis 1 : Without loss of generality, the Axis 2 is assumed to be normal to the faceplate and directed vertically when q 1 ¼ 0: The geometrical meaning of the parameters is clear from the figure.
Similar to other manipulators, the kinematics of the positioner can be described by the Denavit-Hartenberg model (Fu et al., 1987).However, for the considered 2axis system, it is more convenient to use a product of elementary transformations that can be derived directly from the Fig. 7: Þ are the 4 Â 4 homogenous transformation matrices that describe, respectively, the translation and rotation along (or around) the axes specified by the subscript.Substituting the regular expressions for the translational and rotational matrices into Eq.( 12) yields the final result for the non-trivial components of the positioner transformation matrix Pðq 1 ; q 2 Þ: where, similar to Section 2, the vectors n; s; a; p define the upper 3 Â 4 block of the matrix P; and C; S; V denote, respectively, cosð:Þ; sinð:Þ; versð:Þ of the angle specified at the subscript.It should be noted that compared with the model proposed by Bolmsj . o (1987), the developed one includes less geometrical parameters while it also describes the general case.Besides, the obtained expressions are less awkward and more computationally efficient than the known ones.
Therefore, expressions ( 13)-( 16) completely define the direct kinematics of the 2-axis positioner.But the obtained model can be also reduced to describe the kinematics of the general 1-axis mechanism (see Appendix A).It is achieved by fixing Axis 1 or Axis 2 and choosing an appropriate value of a: For instance, for the turntables, the only axis variable is q 2 while q 1 ¼ 0: But for the turning rolls the axis variable is q 1 ; while q 2 ¼ 0a n da ¼ 0:

Inverse kinematic problems
In accordance with Section 3, solving the inverse kinematic problem for the positioner means finding the axis angles ðq 1 ; q 2 Þ that ensure the desired world orientation of the weld joint, which is defined by the pair of the orientation angles (Problem 1) or by the unit vector (Problem 2).Let us consider these cases separately.

Solution of the Inverse Problem 1
Since the weld joint orientation angles ðy; xÞ or ðy; x 0 Þ completely define the third row of the orthogonal 3 Â 3 matrix 0 W R ; the basic kinematic equation ( 4) can be rewritten as where the subscript ''3 Â 3'' denotes the rotational part of the corresponding homogenous transformation matrix and g T ¼½001 : Then, after the appropriate matrix multiplications, it can be converted to the form and, without loss of generality, the transformation 0 T PB is assumed not to include the rotational components other than R z : Further substitution in accordance with (13) yields three mutually dependent scalar equations of two unknowns ðq 1 ; q 2 Þ: where v x ; v y ; v z are the corresponding components of the vector v: The third of these equations can be easily solved for q 1 : The value of q 2 can be found by solving the first and the second equations for C 2 and S 2 : 1 Þ: This leads to the following expression for q 2 : Therefore, Eqs. ( 18) and ( 19) represent the closed-form solution of the first inverse problem, which in the general case for given weld orientation angled ðy; xÞ or ðy; x 0 Þ yields two pairs of the positioner axis angles ðq 1 ; q 2 Þ:

Solution of the Inverse Problem 2
For the second formulation, the input data defines the second column of the matrix 0 W R ; so the basic kinematic equation (4) can be rewritten as follows: where g ¼½010 T : Then, after the appropriate matrix multiplications, this equation can be converted to the form where and the subscript ''3 Â 3'' means the upper left 3 Â 3 submatrix of the corresponding homogenous matrix (i.e. its orthogonal rotational part).Further expansion of PðqÞ in accordance with (12) and relevant regrouping yields or, in a detailed form, It leads to the following scalar equations: from which the third one can be transformed to the form and solved for q 1 : where u xz ¼ S a u x À C a u z : It should be noted that these two alternative solutions for q 1 correspond to different ''configurations'' of the positioner, which are strictly defined below.Besides, both the solutions must be adjusted to the feasible interval ðÀp; p; since the sum of a tan 2ð:Þ and a cosð:Þ can be out of the mentioned limits.
To find the value of q 2 ; let us consider the first two equations of system (25) and solve them for C 2 and S 2 : where It leads to the following expression for q 2 : Therefore, Eqs. ( 26) and ( 28) represent the closed-form solution for the second inverse problem, which in the general case for given unit vectors ðu; wÞ yields two pairs of the positioner axis angles ðq 1 ; q 2 Þ:
For the first inverse problem, a detailed investigation of Eq. ( 20) shows that the value of q 1 can be definitely computed if and only if Taking into account the geometrical meaning of v z ; which is the scalar product of the unit vectors extracted from the third rows of the orthogonal matrices 0 W R and ½ PF T WB Á W R 3Â3 (see Eqs. ( 17), ( 18)), and denoting v z ¼ cosðwÞ; wA½0; pð 30Þ this condition can be presented as follows: Proposition 1a.For Inverse Problem 1, the values of q 1 can be computed definitely from expression (20) if and only if the angle w between Z-axes of the conjugate frames 0 W T R and ½ PF T WB Á W R T 3Â3 describing, respectively, the desired world orientation of the weld joint and its orientation relative to the positioner faceplate is less than ðp À 2aÞ or equal to it: For a typical industrial application case, when the Zaxis of the workpiece frame is parallel to the positioner Axis 2 ; expression (29) can also be rewritten as The corresponding value of q 2 is uniquely defined by expression (21) if either its numerator or denominator is not equal to zero.A detailed investigation of the opposite case yields v z ¼ 1 and consequently q 1 ¼ 0 (the case of v z ¼À1 is excluded because of inequality ( 29)).So, the existence and uniqueness of solutions for q 2 are subject to the following proposition: Proposition 1b.For Inverse Problem 1, the value of q 2 (for given q 1 ) can be computed uniquely from Eq. ( 21) if and only if the Z-axes of the conjugate frames 0 W T R and ½ PF T WB Á W R T 3Â3 are not coincide, i.e. w > 0: Otherwise,if these axes coincide (i.e.w ¼ 0), then q 1 ¼ 0 and any value of q 2 satisfies the kinematic equation.
Therefore, for the first inverse problem, the singularity exists only with respect to the positioner Axis 2 ; while it is oriented strictly vertically and upward (i.e. when q 1 ¼ 0).
However, for the second inverse problem, the singularity may also arise for Axis 1 : As follows from the analysis of Eq. ( 26), the a tan 2 function is indefinite if u xz ¼ 0a n du y ¼ 0: Moreover, the corresponding kinematic equations are converted to the identity, if u z ¼ w z : So any value of q 1 is a solution for such input data.The corresponding condition can also be presented as the parallelism of the vector u and Axis 1 ; as well as the equality for the z-components of u and w; i.e.
To ensure definite computing of q 1 ; it is additionally required that the a cos argument in Eq. ( 26) belongs to the interval ½À1; 1: After appropriate rearranging, this condition can be presented as After denoting the angles between the vectors u; v and the Axis 1 ; Axis 2 ; respectively, as m; Z and assuming that ðm; ZÞA½0; pÂ½0; p; this inequality can be rewritten as This yields the following domain for ðm; ZÞ: So, the results for q 1 can be summarised as follows: Proposition 2a.For Inverse Problem 2, the values of q 1 can be computed definitely from expression (26) if and only if the angles m; Z between the positioner Axis 1 ; Axis 2 and the vectors u; w; respectively, satisfy inequalities (36) and; additionally, ma0 and p: Otherwise, if ðm; ZÞ¼ ð0; p=27aÞ; any value of q 1 satisfies the kinematic equation.
As follows from Fig. 8, the highest ''reachability'' in the positioner u-space is achieved for ZA½p=2 À a; p=2 þ a: And, in contrast, if Z ¼ 0o rp; the ''workspace'' is reduced to a single cone with the parameter m ¼ p=2 À a or p=2 þ a: In accordance with Eq. ( 26), computing of q 2 can fail only in the case of w x ¼ w y ¼ 0; i.e. for Z ¼ 0o rp: Geometrically, it corresponds to the vector w; which is normal to the positioner faceplate and, consequently, cannot be alternated by rotation around the Axis 2 : So, the existence and uniqueness of solutions for q 2 are subject to the following proposition: Proposition 2b.For Inverse Problem 2, the value of q 2 (for given q 1 ) can be computed uniquely from expression (27), if and only if the angle Z between the positioner Axis 2 and the vectors w satisfies the conditions Za0 and p: Otherwise, if Z ¼ 0o rp; any value of q 2 satisfies the kinematic equation (provided that the solution for q 1 exists).
Therefore, for the second inverse problem, the singularity may exist for both axes, when u is parallel to Axis 1 or w is parallel to Axis 2 :

Positioner configurations
Similar to other manipulating systems, the positioner inverse kinematics is non-unique because of the existence of two solution branches (see ''7'' sign in Eqs. ( 20) and ( 26)).However, both the off-line programming and the real-time control require distinguishing between them to ensure continuity of the positioner motions.For this reason, the direct kinematics must yield an additional output, the configuration index M ¼ 71 describing the positioner posture, which is also used as an additional input for the inverse transformation, to produce a unique result.
For the first inverse problem, the configuration index is defined trivially (see Eq. ( 20)), as the sign of the coordinate q 1 : But for the second problem, such an index must identify the sign of the second term only (see Eq. ( 26)).So it should be defined as From the geometrical point of view, the index M 2 indicates the relative location of two planes passing the Axis 1 : The first of them is obtained by rotating of the X 0 Z 0 -plane around Axis 1 by the angle q 1 : And the second plane is passed via Axis 1 and the vector u: It should be also noted that the index M 2 substantially differs from the traditional one for robotics orientation index M 5 ¼ sgnðq 5 Þ (Canudas de Wit, Siciliano, & Bastin, 1996;Sciavicco & Siciliano, 1996), which describes the wrist configuration of the typical 6 d.o.f.manipulator.

Optimal orienting of the weld joint
As adopted by practising engineers, the optimal weld orientation is achieved when the approaching vector is strictly vertical and, consecutively, the weld direction vector lies in the horizontal plane, i.e. ðy; xÞ¼ð0; 0Þ and 0 s w ¼½001 : Let us investigate this particular case in details.
For both the inverse problems, substitution of the values ðy; xÞ and the vector 0 s w into Eqs.( 20), ( 21) and ( 26), ( 28) yields the similar result: So the condition of the solution existence ( 36) is reduced to This means that the ''working space'' of the positioner does not include the cone with the downward directed central axis and the aperture angle 4a: And, thereby, the corresponding welds cannot be optimally oriented.But it can be proved that applying the first inverse problem with the input parameter the orientation of such welds can be essentially improved and approached to the optimal one.The corresponding ''suboptimal'' solution is defined by the axis angles i.e. the exact equalities are achieved for the first and second equations of system (19), while for the third one the residual is minimised only.Another approach, which is based on the simultaneous optimisation of all residuals is presented in Appendix B.

Comparison with other techniques
The main contribution of this paper is the novel formulation and the closed-form solution of the inverse kinematic problem for the robotic positioner, which takes into account the complete orientation of the weld joint with respect to the gravity.Besides, a new, computationally more efficient, solution for the known inverse problem has been obtained which deals with only the partial definition of the weld orientation.
In comparison with other results, the proposed approach does not require a heuristic-based iterative search (Bolmsj . o, 1987) or a solution of two quadratic equations and their root checking by a substitution (Nikoleris, 1990).In addition, the proposed definition of the weld orientation allows investigating the permissible tolerances with respect to the optimal weld orientation.

Generalisation of the results
In the general case, the robotic welding station may also include a 3-axis or a 1-axis positioner which manipulates the workpiece.For the 3-axis positioner, the proposed model can be expanded by adding the rotational term R z ðq 0 Þ to the left-hand side of ( 12), which corresponds to R z ðcÞ in (5).So the kinematic equations ( 17) and ( 22) can be analytically solved for q 0 after computing q 1 and q 2 provided that the additional constraint is imposed to resolve the redundancy.It should be also noted that the kinematics of the 3-axis positioner is similar (up to a certain degree) to the kinematics of a robotic wrist, which is studied in detail in Wampler (1989) and Pashkevich (1997).However, the wrist axes are usually perpendicular to each other, while the welding positioners are not subject to this constraint.
The direct kinematic model of the general 1-axis positioner can be easily derived from ( 12) and ( 16) by eliminating Axis 2 and setting q 2 ¼ 0: However, because of limited capabilities of such machine, the inverse kinematic problems should be modified by replacing the exact equalities ( 18) and ( 23) with the residual minimisation condition.In this case, both the inverse problems are also resolved analytically.For instance, for the first inverse problem, the least-squares solution of Eq. ( 18) after the unit vector and the orthogonal matrices multiplication yield that leads to the homogenous trigonometric equation which is solved using the methodology applied above.(However, one of the two possible solutions must be rejected because it gives the maximum of (43) instead of the minimum; see Appendix A for details.) The presented 2-axis positioner model can be also generalised by releasing the typical industrial constraint with respect to the Axis 2 that is assumed to be strictly vertical while q 1 ¼ 0: This generalisation can be done by replacing the matrix product R y ðÀaÞR x ðÀq 1 ÞR y ðaÞ in Eq. ( 12) by R y ðÀa 1 ÞR x ðÀq 1 ÞR y ða 2 Þ that courses only a slight modification of the analytical expressions describing the kinematic models.

Industrial implementation
The algorithms developed here have been successfully implemented on the manufacturing floor, as a novel component of the ROBOMAX CAD package (Buran Co, Russia-USA).This package is a powerful integrated system for the computer-aided design and the off-line programming of the welding robotic cells (Kurkin, Kukareko, & Pashkerich, 1998).The core of ROBO-MAX has being developed in Robotic Laboratory of BSUIR (Minsk, Belarus) in cooperation with several other technical universities, and now the package has been widely used in the Russian automotive industry.In particular, it has been successfully applied by leading Russian automotive companies, e.g. for the manufacturing line design for the LADA cars and the GAZEL lorries and mini-vans (Lobzin et al., 1999).In contrast to other robotic CAD packages, which employ a lot of interactive tools, ROBOMAX incorporates a number of numerical routines which enable the user to design the welding robotic cells (lines) in the semi-automatic mode.In particular, it includes the software tools for the automatic robot placement, distribution of the weld joints among the robots and optimisation of the robotic cell layout.It should be stressed that all the abovementioned tools require fast and reliable coordinate transformations for the welding positioner which have been considered in this paper.
Thus, using the proposed direct and inverse kinematic routines, the designer can optimise the spatial location of both a single weld and a collection of welds.In the case of a single weld, the user can directly input the desired angles ðy; xÞ to obtain the coordinates ðq 1 ; q 2 Þ or, alternatively, he can choose these coordinates in the interactive mode, picking a point from the plots (Figs. 9 and 10) describing the functions yðq 1 ; q 2 Þ; xðq 1 ; q 2 Þ or x 0 ðq 1 ; q 2 Þ: For the collection of the weld joints, the positioner kinematic models are employed in the Paretooptimisation algorithm that yields a compromise solution, optimising the orientation of the ''worst welds'' from the given set.The developed routines are also Fig. 9. 3D plot of the function x 0 ðq 1 ; q 2 Þ: utilised for the weld clustering, i.e. for dividing them in groups that are processed separately, for different positioner postures.
As reported by the manufacturing experts from the GAZ Company (Lobzin et al., 1999), ROBOMAX has been successfully applied to the design of four welding lines (consisting of 35 robots) for the lorry production of the Gazel family.The primary problems during the design were the optimal robot placement, the manufacturing task clustering (i.e.distribution of 432 welds among robots) and the off-line programming of the corresponding robot-positioner systems.These problems were solved using the relevant ROBOMAX tools, which utilise the kinematic routines that are discussed in the paper.During the design, there were compared several solutions created using different software packages.The best of them was the ROBOMAX solution, which required only 35 robots to fulfil the manufacturing task (while the alternative designs required at least 2 robots more).Besides, all of the 432 welds were accessible in the optimal (or sub-optimal) orientation, while some of the alternative designs required eliminating several welds from the robotic processing (and, consequently, they were left for manual welding).Hence, the developed technique has yielded the solution, which ensure better quality because of the proper workpiece orientation during the welding and elimination of the manual operations.
The recent application of ROBOMAX is the design of a robotic welding station for a new LADA car (AutoVAZ Co, Russia).The station includes four KUKA robots and a positioner with 7 d.o.f.(Fig. 11), which is actually a combination of three 2-axis positioners.The workpiece consists of two longerons, two floor connectors, an engine mounting flange, and a conductor plate with fixture jigs and clamps.The manufacturing task was divided among the robots taking into account the total length of the welds ð1120 mmÞ; number of the overlap welding layers (both straight and weaved), and the relative spatial location of the weld joints.It resulted in the distribution of from 6 to 8 weld joints per robot.Then, using the ROBOMAX ''autoplace'' tool, a primary layout of the robotic cell was created, which takes into account the kinematic capabilities of the relevant robot-positioner systems separately.Then, in the final stage, the design was optimised and verified for the complete workcell with four robots and the positioner.The program in SRCLlanguage was also created (Siemens Robot Control Language) for the robot controllers with a cycle time of 23:3s: As follows from the results of the industrial tests, the proposed kinematic algorithms ensure the required properties of the weld joint orientation during the processing, and allow to avoid the kinematic singularities which are difficult to eliminate while using other techniques.

Conclusions
The developed technique allows to coordinate movements of two manipulators (the robot and the positioner) taking into account the particularities of the welding technology.Combining their kinematic descriptions with technological knowledge, it becomes possible to implement the multi-level control and to plan the optimal weld path for both the linear and the circular joints (or piecewise linear/circular ones).By using this technique together with the workpiece CAD-data, it is also possible to achieve an essential time reduction of the design and programming for the robotic welding station.
The particular contribution of this paper deals with the inverse kinematics of the 2-axis positioner, which is a key issue in the coordinated kinematic control of the welding robotic system.It has been proposed the novel formulation and the closed-form solution of the inverse problem that deals with the explicit definition of the weld joint orientation relative to the gravity.Similar results have been also obtained for the known problem statement (Bolmjo and Nikoleris) that is based on the unit vector transformation.For both the cases, a detailed investigation of the singularities and the uniqueness-existence topics have been carried out.
The obtained results have been implemented in the commercial software that is already used in the Russian automotive industry.These results will also encourage further research in the task-level control of the welding robotic systems, such as optimising of the weld sequence and the optimal weld joint clustering in accordance with the dynamic capabilities of the robot and the positioner.
As mentioned in Section 5.7, the developed technique can be also applied to the case of the 1-axis positioner, which is used in some industrial applications.However, it should be taken into account that because of the lack of the degrees of freedom, the 1-axis positioner is not able to provide a complete required weld orientation (in the general case).So, for such machines, the inverse kinematic problems can be stated in a modified form, as a minimisation of the corresponding residuals of the kinematic equations.

A.1. Solution of the first inverse problem
For the first problem, Eq. ( 18) must be replaced by the expression ; which after the multiplication and rearranging (and taking into account that v The corresponding scalar form can be obtained directly from Eqs. ( 18) and ( 19): Differentiating this expression with respect to q 1 yields the following equation: which in the non-singular case has two solutions but only one of them gives the desired minimum of the residual (provided that aAð0; p=2Þ): where all notations are taken from Section 5.1.

A.2. Solution of the second inverse problem
For the second problem, Eq. ( 23) must be replaced by the expression which after corresponding transformation is reduced to For the 1-axis positioner, the rotational part of the homogenous matrix Pðq 1 Þ is the following: So, differentiating the objective function with respect to q 1 gives the following equation: This is transformed to the scalar form ½ðu x w y À u y w x ÞS a þðu y w z À u z w y ÞC a ÁC 1 The obtained equation also has (in the non-singular case) two solutions, but only one of them gives the desired minimum of the residual: To prove this, it is necessary to present the objective function as a linear function of C 1 and S 1 and substitute both of the solutions to it.

A.3. Optimal orienting of the weld joint
To find the solution for the special case, when the weld joint direction is horizontal and the welding torch is vertical, let us apply the second inverse problem solution with the input vector u ¼½001 T : The direct substitution of these values gives (provided that aAð0; p=2Þ): which looks similar to the general solution of the first inverse problem.

Appendix B. Optimisation-based solution of the inverse problem for the 2-Axis positioner
As it is proved in Section 5.3, for the 2-axis positioner, for certain the set of input data, the exact solution of the inverse problem does not exist.So, in this case the inverse problems may be also reformulated in the similar way (see Appendix A), as the minimisation of the corresponding residuals.

B.1. Solution of the first inverse problem
Similar to the 1-axis positioner case, the minimisation of the residual square sum is replaced by Differentiating this expression with respect to q 1 and q 2 yields the following system of equations: which may be also presented as From the second equation, it can be obtained that Substituting these expressions into the first equation gives Then, taking into account that ½v x v y v z T is the unit vector and factoring out, the equation for q 1 can be transformed to Provided that S 1 a0; the last equation can be rewritten as Then, after computing squares of both the sides and rearranging, it is transformed to the product which gives two possible cases for root finding.The first of them, when v z ¼ S 2 a V 1 þ C 1 ; corresponds to a straightforward solution of the kinematic equation and, obviously, yields a minimum of the residuals.While the second case, when v z ¼ÀðS 2 a V 1 þ C 1 Þ; corresponds to the residual maximum.
In the singular case, when S 1 ¼ 0; i.e. q 1 Af0; pg; the objective function derivatives are equal to zero if It gives two sub-cases to investigate, which are q 1 ¼ 0 and p: If q 1 ¼ 0 (i.e.C 1 ¼ 1 and V 1 ¼ 0), the value of the objective function J is equal to v z : Otherwise, if q 1 ¼ p (i.e.C 1 ¼À1 and V 1 ¼ 2), the objective is equal to ðS 2a À C 2a v z Þ: Therefore, if the exact inverse kinematic solution does not exist (i.e.v z p À C 2a ), the optimisation-based formulation yields q 1 ¼ p; q 2 ¼Àatan 2ðv y =v z Þ: The geometrical meaning of this result is the following: the welds that are directed ''partially downward'' must be ''overturned'' using the capabilities of Axis 1 and ''approached'' to the vertical line (i.e. the gravity) using the capabilities of Axis 2 :

B.2. Solution of the second inverse problem
Similar to the 1-axis positioner case, the minimisation of the residual square sum is replaced by the maximisation of J ¼ u T Á Pðq 1 ; q 2 Þ 3Â3 Á w-max q 1 ;q 2 ; and its scalar form can be presented as where Computing of the derivatives with respect to q 1 and q 2 yields the following system of equations: where From the second equation it can be obtained that where Substituting these expressions into the first equation gives where A ¼ u y C 1 À u xz S 1 : Then, after computing squares of both the sides and rearranging, it is transformed to the product, which gives three cases for root finding: The first of them, with the ''minus'' sign, corresponds to a straightforward solution of the kinematic equation and, obviously, yields a minimum of the residuals.While the second case, with the ''plus'' sign, corresponds to the residual maximum.
If A ¼ 0 and, correspondingly, the objective function derivatives are equal to zero if Therefore, the second angle can be expressed as It gives four sub-cases to choose the right combination of the signs ''7'', depending on the particular vectors u and w: The geometrical meaning of this result is the following: first, the vector w must be rotated around Axis 2 to be located in the plane X 0 Z 0 ; then, it should be rotated around Axis 1 to achieve the same angle with respect to this plane as the vector u:

Fig. 4 .
Fig. 4. Definition of the weld frames for the circular weld.

Fig. 10 .
Fig.10.The contour plot of the function x 0 ðq 1 ; q 2 Þ: 1 ¼ u xz w y À S a u y w x ; a 2 ¼ S a u xz w x þ u y w y ; a 3 ¼ u xz w x þ S a u y w y ; a 4 ¼ S a u xz w y À u y w x ; b 1 ¼ C a u y w z ; b 2 ¼ C a u xz w z ; b 3 ¼ u x0 w y ; b 4 ¼ u x0 w x :