<<

Cartan applied to dynamic calculation in robotics

Diego Colón, 1 Phone +55-11-3091-5650 Email [email protected]

1 Laboratório de Automação e Controle - LAC/PTC, Escola Politécnica da Universidade de São Paulo, São Paulo, Brazil

Received: 31 January 2017 / Accepted: 6 June 2018

Abstract

A Cartan connection is an important mathematical object in that generalizes, to an arbitrary Riemannian space, the concept of angular velocity (and twists) of a non-inertial reference frame. In fact, this is an easy way to calculate the angular velocities (and twists) in systems with multiple reference frames, like a robot or a complex mechanism. The concept can also be used in different representations of rotations and twists, like in the Lie groups of unit quaternions and unit dual quaternions. In this work, the Cartan connection is applied to the kinematic and dynamic calculations of a systems of with multiple reference frames that could represent a robotic serial chain or mechanism. Differently from previous works, the transformation between frames is represented as unit quaternions, which are known to be better mathematical representations from the numerical point of view. It is also generalized to this new quaternion representation, previous results like the extended Newton’s equation, the covariant and the Cartan connection. An example of application is provided. AQ1

Keywords Quaternions Robotics Lie groups Screw theory

Technical Editor: Victor Juliano De Negri.

1. Introduction Concepts of differential geometry and Lie groups and Lie algebras have been used in many areas of engineering for a long time. More recently, a renewed interest could be verified in mechanism and robotics [1, 2, 10, 16, 23], where dual quaternions were used, and very complete reference books, like [3], appeared. Classical references in robotics, like [9, 22], used only vector analysis, but some ’s concepts (like orthogonal matrices and the Lie group SE(3)) were already in use. A systematic use of differential geometry, on the other hand, is far more recent [14, 19]. In control theory, differential geometry has also been explored [8, 15].

A Cartan connection is a concept that is fundamental to modern physics and differential geometry, besides the concept of moving frames [4, 18, 20]. In simple terms, given a M (that could be Riemannian), and a field S of reference frames in M, which associates with each point in p ∈ M a reference frame Sp

(generally non-inertial), a Cartan connection Ξ is a derivative field of S such that Ξp contains the information of how the frame Sp changes in each direction. This is the generalized gradient of S, as it also depends on the of M (see Fig. 1(a) for an illustration of a field of frames).

Computationally, S is a field of matrices, as well as Ξ , but of distinct types. In practical terms, a Cartan connection is the angular velocity field in case of pure rotational motion (motion in SO(3)), and a twist (differential screw) in general rigid motion in SE(3) [14]. The inspiration to make this work came from [17] and started in the paper [6], where this author continues the approach in [17] and applies the Cartan connection to obtain some formulas for kinematic chain calculations in robotics, doing them in the Lie groups SO(3), SE(3) and its Lie algebras. Another essential concept, associated with the Cartan connections, is the covariant derivative, and by using it, it is possible to write the Newton’s law and the Euler’s equations in forms that are invariant in any non-inertial frame. This allows the dynamic calculations to be written in an arbitrary non-inertial reference frame. Another advantage of the Cartan connection is that it can be applied to the description of motions in different representations, as in the quaternions, dual quaternions and general Clifford algebras representations [19]. In fact, a pure rotational motion is described, in terms of the unit quaternions, in the Lie group SU(2) (special unitary complex matrices) and the general rigid motion in the Lie group of unit dual quaternions (see preliminary results in [7, 24]).

Fig. 1 Frame field and principal . In this work, it is shown how the dynamic calculations can be done in the framework of Cartan connections, continuing the work presented in [6, 7, 24]. In Sect. 2, the kinematics of pure rotational motion (with several reference frames) and rotation plus translation, using the Lie groups SO(3) and SE(3), is are shortly described. These are only reproduced results already obtained by this author in [5, 6]. The precise notion of Cartan connections and covariant derivative are presented, which is are a classical differential geometric concepts, but essential to the approach with quaternions. In Sect. 3, some concepts of differential geometry and of the Lie group SU(2) that are not standard are presented. In particular, the principal fiber bundle with group SU(2) is presented with details, as it is essential to kinematics and dynamics with unit quaternions. The Cartan connection and the covariant derivative for this case is explored. In Sect. 4, the kinematics for a serial robot is presented and the recursive formula for the Cartan connection is generalized to the case of the group SU(2), which is the main formula for kinematics and is analogous to the recursive formula for the angular velocity calculation. This result will be necessary to the next section. In Sect. 5, the recursive formulas for the dynamic calculations are presented for translational and rotational motions, but in the case of the Lie group SU(2) of unit quaternions. In Sect. 6, the method is applied to a classical example in the literature. In Sect. 7, conclusions and suggestions for future work are presented. The point of view of applying the Cartan connection to kinematic and dynamic calculation in robotics is original of this author, to the best of his knowledge. The new results are presented in Sects. 4, 5 and 6.

2. Kinematics in SO(3) and in SE(3): Cartan connection’s point of view In the following two subsections, a concise review of the basic concepts presented in the literature and some previous results obtained in other publications of this author, particularly [5, 6, 7], are presented.

2.1. Kinematics in SO(3) and SE(3) 3 Following the steps of [5, 17], any point in the R is represented by a 3-vector r′ in the coordinates of a non-inertial frame S′ , and by a 3-vector r in the coordinates of the inertial frame S. Suppose that both frames have the same origin. The transformation matrix from the coordinates of S′ to the coordinates of S is R = R(t) ∈ SO(3) , whose columns are the 3-vectors of the basis of S′ expressed in the coordinates of S. Those 3-vectors are related by r(t) = R(t)r′(t) and after the application of the time derivative, one has ˙r = R (Ωr′ + ˙r′) , where Ω = RT R˙ is an anti-symmetric (time variant) matrix called body angular velocity, that is a trajectory in the so(3) , and represents the angular velocity of S′ in relation to S but 3 in the coordinates of S′ . The matrices R(t) and Ω(t) are operators in R that are representations of the Lie group SO(3) and the Lie algebra so(3) , respectively, in the 3 3-vector space R [19]. The frame S′ could also be attached to a rigid body, and R(t) could be viewed as a trajectory in SO(3) describing the rotational motion of the rigid body.

The simplest form of a Cartan connection is as a field of angular velocity matrices Ω , when the motion of the reference frame (or rigid body) is purely rotational. It can be visualized as a derivative (gradient) field of the frame field represented in Fig. 1(a). As presented in [17], the covariant derivative is an operator that acts in the 3-vectors 3 of R and is given by Dt = ∂/∂t + Ω . If one wants to calculate the time derivative of any 3-vector in a non-inertial reference frame S′ , this operation must be used. In ′ ′ ′ fact, if one applies Dt to r , it results in Ωr + ˙r , which is the velocity of the point r′ as seen in the inertial frame S, but in the coordinates of the non-inertial reference ′ ′ 2 ′ frame S . Another application of the time derivative results in a = Dt r , which is the definition of the acceleration in non-inertial reference frames, and given by ′ 2 ′ ′ ˙ ′ ′ 2 ′ ′ 2 ′ a = Dt r = ¨r + Ωr + 2Ω˙r + Ω r , where ¨r is the relative acceleration, Ω r is the centrifugal acceleration, and 2Ω˙r′ is the Coriolis acceleration. This is the acceleration of point r′ as seen in the inertial frame S but expressed in the coordinates of the non-inertial frame S′ . In order to describe the motion of an arbitrary point of a rigid body, one has to assume that ˙r′ = ¨r′ = 0 . It is easy to deduce that, in the case of a translational + rotational motion of S′ in relation to S, ′ 2 ′ −1 the acceleration is given by a = Dt r + R o¨ , where o is the position of the origin of S′ in relation to S and in the coordinates of S.

3 There is a Lie algebra isomorphism between (so(3), [, ]) and (R , ×) , where [A, B] = AB − BA is the Lie bracket and × is the vector product. This means that 3 there is a correspondence between Then, to the the 3-vectorss r, r′ ∈ R corresponds to and respectively the matrices X, X′ ∈ so(3) describing the motion of a point such that the Lie bracket of those matrices correspond to the vector product of the two vectors . The (fields of) operators R(t) and Ω(t) act differently in the space so(3) , which isare known as the adjoint representations, and the covariant derivative in this new representation is given by D ∂ , where is the Cartan connection. t = ∂t + [Ω, ⋅] Ω Applying this operator to a point of position X′ ∈ so(3) in the non-inertial reference frame, one has:

∂ ∂X′ 1 A′ = D2X′ = + [Ω, ⋅] + [Ω, X′] t ( ∂t ) ( ∂t ) ′ ∂ ′ = X¨ + [Ω, X′] + Ω, X˙ + [Ω, [Ω, X′]] ∂t [ ] ′ ′ = X¨ + Ω˙, X′ + 2 Ω, X˙ + [Ω, [Ω, X′]] . [ ] [ ]

One can easily identify in Eq. (1) the terms of relative, centrifugal and Coriolis acceleration [11]. The formulas in this section will be generalized forto the case of quaternions in the following sections. AQ2

For the case of general motion (rotation + translation) of a frame/rigid body, some additional concepts are important: given an arbitrary manifold M (that could be the 3 Euclidean space R ) and a Lie group G, a G-action of G in M is an application ψ : G × M → M such that: (1) ψ(e, p) = p , where p ∈ M is an arbitrary point and e ∈ G is the identity of the group, and (2)

ψ(g2, ψ(g1, p)) = ψ(g2g1, p), where g1, g2 ∈ G . The family of invertible applications

ψg : M → M indexed by G is the family of transformations of M, that represents motions of points in this space (that could be rigid bodies, as well as fluids). It is

common to represent ψg(p), where g ∈ G by simply gp [4].

ToWith each Lie group G, the a Maurer–Cartan form Ξ is associated. If G is a matrix Lie group, as for example SO(3), the Maurer–Cartan form is calculated by Ξ = g−1 dg . Note the similarity between the formula Ω = RT R˙ and the Maurer –Cartan form and remember that in the Lie group SO(3), the inverse is equal to the transpose [6]. The reader will can see that the Maurer–Cartan form appears naturally in the transformation formula between two Cartan connections.

2.2. Principal fiber bundles and its Cartan connections

A general principal fiber bundle, that is represented by (P, B, π, G) , is composed of a P, which is called the total space, B, which is the base space, the map π : P → B , which is the projection inonto the base, and G, which is the group of G-actions in the base B. For each point b ∈ B , the corresponding pre- image π−1(b) is called fiber, which means that P is partitioned into fibers. Each of these fibers is homeomorphic to the group G. In Fig. 1(b), a representation of the principal fiber bundle (P, B, π, SO(2)) is shown . In this figure, the fibers are circles S1 (that is which are isomorphic to the Lie group SO(2)). Vector fields that are tangent to the fibers (that which are represented by a single arrows) are called vertical vector fields V , that are naturally defined. The vector fields represented by a double arrow, which are not tangent to the fibers, are called horizontal vector fields H . Those fields are not naturally defined, and to each Cartan connection, a horizontal vector field [13] is associated. A section in a principal fiber bundle is an application S : B → P such that π ∘ S = Id . In Fig. 1(b), the bold arcs in the circles (fibers homeomorphic to SO(2)) form a section of that principal fiber bundle.

3 In the case of rigid motions, G = SE(3) is the Lie group of G-actions in R , that is, the group of translations + rotations transformations [19]. The base manifold is 3 3 B = R , and π : P → R is a smooth and surjective application that associates with 3 each element of SE(3)p its origin, that is, p ∈ B = R . A section in this case is a 3 smooth application that associates with each point p ∈ R an element in SE(3)p , 3 that is a field of reference frames and its origins. A curve γ(t) in R represents the translational motion of a rigid body, and a curve Γ(t) in P, such that γ(t) = π(Γ(t)) , is a field of reference frames and its origins along γ(t) and describes the general motion of a rigid body that is translational and rotational [12, 13, 20].

A Cartan connection is defined as being the gradient field of sections S : B → P . In Fig. 1(b), as said before, the reader can see a representation of a section in the principal fiber bundle that areis represented by bold arcs in the fibers. The lengths of the arcs is are the amplitudes in different points of the section in each point of B. The horizontal vector field H represents the gradient field of this section, that is a Cartan connection. In this case, this vector is an element of so(2) , that is, a real number. For the case of rigid motions, in which case the principal fiber bundle is 3 3 (P, R , π, SE(3)) , the Cartan connection is a matrix field Ξ : R → se(3) .

A transformation between two different frame fields can also be represented by a section in the principal fiber bundle. Let us suppose that S, S′ are two frame fields (neither necessarily inertial). As they are fields of matrices, a section A : B → P is a transformation between those frames. The generalized gradients of S and S′ , that are the Cartan connections Ξ and Ξ′ , respectively, are related by [21]:

′ Ξ = A−1 dA + A−1ΞA . 2

Note the presence of the Maurer–Cartan form A−1 dA in the transformation formula. If three or more moving frames are involved (see Fig. 2), the following result is important:

Fig. 2 Transformation between reference frames (see Fig. 2 in [6] from this author). Proposition 1 (Transformation Formulas) Given the sections/frames fields S(0) , S(1), … , S(n−1) , S(n) , then the transformation formula for between the Cartan connections is:

−1 3 Ξ(n) = A(0)A(1) ⋯ A(n−1) d A(0)A(1) ⋯ A(n−1) ( ) ( ) −1 + A(0)A(1) ⋯ A(n−1) Ξ(0) A(0)A(1) ⋯ A(n−1) . ( ) ( ) where A(i) is the transformation between the frame fields S(i+1) toand S(i) .

This proposition can be found and is proved in [6]. In the case of a serial robot with n links, S(0) corresponds to the inertial frame, S(n) is the end-effector frame, and the frames from 1 to n − 1 are attached to the respective links. The matrix A(0)A(1) ⋯ A(n−1) transforms the coordinates from the end-effector to the inertial frame and could be calculated by using, for example, the Denavit–Hartenberg parametrization [9]. Due to the Cartan theorems (see [5] or [21]), there is a reference frame, in a manifold space without curvature, where the Cartan connection is null. In the serial robot case, it is S(0) , so that Ξ(0) ≡ 0 . This means that the Cartan connection in the end-effector is Ξ(n) = (A(0)A(1) ⋯ A(n−1))−1 d(A(0)A(1) ⋯ A(n−1)) , which is the velocity of the reference frame S(n) in relation to S(0) (inertial) but expressed in the coordinates of S(n) . For a more complete development of the kinematics, please refer to [6]. In the following sections, an example is presented in which the dynamics of a serial robot is determined. In future papers, the results will be generalized to parallel robots and mechanisms.

3. Unit quaternions, principal fiber bundle and additional concepts A representation of a group G in a vector space V is a group homomorphism ρ : G → Aut(V ) in which each element of G is represented asby a linear and invertible transformation in V, that is, an element of Aut(V ) (that is also a Lie group). A representation of a group is a special type of G-action in a vector space. ′ The derivative application ρg in a point g ∈ G maps the tangent space TgG into the tangent space Tρ(g) Aut(V ) . If one restricts g = e (the identity element in G), the ′ linear application ρe maps the Lie algebra g into the Lie algebra of the group Aut(V ) . The covariant derivative in this situation is the operator in V given by:

∂ ′ 4 Dt = + ρe(Ξ), ∂t

′ where Ξ is the Maurer–Cartan form of G, and ρe(Ξ) is an element of the Lie algebra of Aut(V ) , which is an operator in V [5].

The adjoint representation is a representation of a Lie group G in its Lie algebra g −1 given by (for the case of matrix groups) AdA(X) = AXA . The differential application of (identity) in , that is , is given by AdI X ∈ g adX = ( d AdI )|X , which is called the adjoint representation of a Lie algebra in adX1 X2 = [X1, X2] itself. If form a basis for the Lie algebra , then k , where {Ej} g [Ei, Ej] = ∑k CijEk k are the structural constants of the Lie algebra. All the isomorphic algebras have Cij the same set of constants, as occur, for example, with so(3) and su(2) . The adjoint representation results inproduces k , which is equivalent to adEi Ej = ∑k CijEk saying that the linear transformation has the matrix representation adEi j . [ adEi ]jk = [Cik]

The of g is defined by K(X, Y) = tr([ adX][ adY]) . It is clear that isomorphic Lie algebras have the same Killing form as, for example, so(3) and su(2) . The Killing forms of semi-simple Lie algebras (like so(3) and su(2) ) are always non-degenerate, which means that they only have nonzero eigenvalues. Another important property of a Killing form is K([X, Y], Z) = K([Z, X], Y) = −K(Y, [X, Z]) [17].

One could also construct different principal fiber bundles with the same base 3 manifold B = R . The fibers could be isomorphic to any other Lie group G. Let us 3 consider the principal fiber bundle (P, R , π, SU(2)) , which associates with each 3 point in R an element of the unit quaternions space (or, more specifically, its matrix representation). If one wants to write the dynamical equations, consider the adjoint representation of SU(2), in which it acts in its very Lie algebra V = su(2) . As this Lie algebra is isomorphic to so(3) , it is possible to represent any velocity (translational and rotational) as vectors in this algebra. The complete velocity of a rigid body is then represented in the Lie algebra su(2) ⊕ su(2) .

A common basis for su(2) is formed by the Pauli matrices:

0 1 0 −i 1 0 5 σ1 = σ2 = σ3 = , [ 1 0 ] [ i 0 ] [ 0 −1 ] but in order to simplify the bracket relations, it is better to use the normalized Pauli matrices, which are σ¯1 = (i/2)σ1, σ¯2 = −(i/2)σ2, σ¯3 = (i/2)σ3 . Then, any element in can be written as 3 i , where is a 3-vector in 3 su(2) X = v ⋅ σ¯ = ∑i=1 v σ¯i v R associated with this element, and σ¯ is a vector with components being σ¯i . The commutation relations are [σ¯1, σ¯2] = σ¯3 , [σ¯3, σ¯1] = σ¯2 and [σ¯2, σ¯3] = σ¯1 .

Any element of the Lie group SU(2) is of the form eθn⋅σ¯ (matrix exponential) and a rotation of a 3-vector x (or its representation X in the Lie algebra su(2) ) around a unitary 3-vector n is given by the adjoin representation X′ = e−θn⋅σ¯Xeθn⋅σ¯ . The vector product of two 3-vectors v × u is then represented by [V, U] , and the Cartan connection Ξ is a 1-form with values in the Lie algebra su(2) and it represents the angular velocity. Very useful relations from the computational point of view are:

−i(θ/2)σ3 i(θ/2)σ3 e σ1e = σ1 cos θ + σ2 sin θ 6 −i(θ/2)σ3 i(θ/2)σ3 e σ2e = − σ1 sin θ + σ2 cos θ −i(θ/2)σ3 i(θ/2)σ3 e σ3e = σ3, that will be are used in the sequel. Other useful formulas can be found in [17].

In order to write down the Euler’s equation in this representation, the covariant derivative must be determined to this representation, which is done in the following lemma.:

Lemma 1 The covariant derivative is the operator that acts in su(2) by the formula:

DtX = ∂X/∂t + [Ξ, X], 7 where X ∈ su(2) .

Proof By using the definition presented in Eq. (4), as the representation being used is the adjoint representation, which is given by ρ(S)X = SXS−1 , suppose that a curve α(t) passes through e ∈ SU(2) such that α˙(0) = Ξ is thean element of the Lie algebra. Then ρ′ d α t α t −1 . It is easy to find that: e(Ξ)X = dt ( ( )X ( ) )|t=0

d dα(t) 1 dα(t) 8 (α(t)Xα(t)−1) = Xα(t)−1 − α(t)X , dt dt α2(t) dt which, for t , is equal to ρ′ dα(0) dα(0) , which = 0 e(Ξ)X = dt X − X dt = [Ξ, X] concludes the proof.□ 4. Kinematics in SU(2) for a system of n reference frames Consider the motion of a rigid body in which the reference frame S(n) is attached. In order to calculate the dynamics, it is considered that the rotational part is separated from the translational. Due to the Cartan's theorem, which states that if the base space has no curvature, there is always a reference frame, the inertial, in which the Cartan connection is zero (see for example [12, 21]), it can be considered that in Eq. (3) one has has Ξ(0) ≡ 0 . This result is important in order to prove the recursive formula for the Cartan connection, as presented in the following Theorem 1. Before its proof, it is important to present the following lemma:

Lemma 2 Given a system of three reference frames S(0), S(1), S(2) with transformation matrices R(0), R(1) , the connection Ξ(2) is given by:

−1 9 Ξ(2) = R(1) Ω(0)R(1) + Ω(1). [ ]

Proof By applying the formula in Eq. (3) with Ξ(0) ≡ 0 , one has:

−1 −1 10 (R(0)R(1))−1 d(R(0)R(1)) = R(1) R(0) ( dR(0))R(1) + R(0) dR(1) [ ] [ ] { } −1 = R(1) Ω(0)R(1) + dR(1) , [ ] [ ] which concludes the proof.□

Theorem 1 Given a system of n + 1 reference frames S(0), S(1), … , S(n) , with transformation matrices R(0), R(1), … , R(n−1) and rotation matrices Ω(i) = [R(i)]−1 dR(i) between S(i) and S(i+1) , the Cartan connection for the frame S(i) can be calculated by the recursive formula:

−1 11 Ξ(i) = R(i−1) Ξ(i−1)R(i−1) + Ω(i−1), [ ] for i = 1, … , n .

Proof The proof is by induction. The base of the induction is presented in Lemma 2. Also, consider that the connection in S(i−1) is given by Proposition 1, that is:

−1 12 Ξ(i−1) = R(0)R(1) ⋯ R(i−2) d R(0)R(1) ⋯ R(i−2) . ( ) ( )

By applying again Eq. (3), one has:

13 Ξ(i) = (R(0)R(1) ⋯ R(i−2) R(i−1))−1 d(R(0)R(1) ⋯ R(i−2)R(i−1)) Q  = −1 −1 QR(i−1) d QR(i−1) = R(i−1) Q−1 dQR(i−1) + Q dR(i−1) ( ) ( ) [ ] { } = −1 −1 R(i−1) Q−1 dQR(i−1) + R(i−1) Q−1Q dR(i−1) and the result[ in] Eq (11) is obtainedfollows[ .□] AQ3 I  = −1 −1 R(i−1) Ξ(i−1)R(i−1) + R(i−1) dR(i−1), [ ] [ ] The formula in Eq. (11) transforms the Cartan connections in two adjacent frames in a simple way. It is important to keep in mind that Ξ(i) is the angular velocity of frame i (and body i) in relation to the inertial frame, but expressed in the coordinates of frame i, and Ω(i−1) is the angular velocity of frame i in relation to frame i − 1 , but expressed in coordinates of frame i.

Lemma 3 The velocity of a point X(i) of a rigid body with frame S(i) attached in it, in relation to frame S(0) but in coordinates of frame S(i) , is given by:

v(i) = Ξ(i), X(i) + v(i) 14 [ ] Oi

where v(i) is the velocity of the origin of S(i) in relation of S(0) but in coordinates of Oi S(i) .

Proof By applying the definition of the covariant derivative, one has:

(i) (i) ∂ (i) (i) (i) (i) (i) 15 v = DtX = + Ξ , ⋅ X = X˙ + Ξ , X { ∂t [ ]} [ ]

which does not yet include the velocity of the origin translation of the frame. As the (i) point in the rigid body does not move in relation to frame S(i) , then X˙ = 0 . The term v(i) must be added in order to obtain the total velocity included and the Eq. Oi (14) result follows is obtained.□ AQ4 5. Dynamics in SU(2) for a system of n reference frames If one has a set of frames like in Fig. 2, as occurs in a serial robot with n links, one must write a dynamic equation to each link (rigid body). The following theorem is then important: Theorem 2 The dynamic equation for the rotational part of a rigid body with  the frame S(i) attached to its center of mass is:

(i) 16 ∂Ξ (i) (i) (i) i + Ξ , iΞ = T , I ∂t [ I ] where T(i) is the torque in the center of mass in body i represented in the Lie algebra su(2) .

Proof By Eq. (14), one has that the velocity of an element of mass dm in point X(i) is given by v(i) = [Ξ(i), X(i)] + v(i) , and it implies that the angular CMi momentum is Λ(i) = − dm[X(i), [X(i), Ξ(i)]] + dm[X(i), v(i) ] . After all the CMi elements of mass sum up, the second term will eventually become m[X(i) , v(i) ] , CMi CMi which is zero, as X(i) = 0 . So let us ignore it from now on. One can define the CMi (i) (i) (i) an operator in su(2) given by Ii(X ) = − dm[X , [X , ⋅]] and then (i) (i) (i) Λ = Ii(X )Ξ . This is the inertia operator for a single volume element. For the whole rigid body, a volume of the rigid body must be performed, in which the measure is dm = ρ dV , where ρ is the mass density. The whole angular (i) momentum is then IiΞ , where Ii is the complete inertia operator of the body, and no longer depends on X(i) .

(i) The rotational Newton’s law has the formula D (i) ∂Λ (i) (i) (i) . tΛ = ∂t + [Ξ , Λ ] = T After the substitution of the angular momentum formula, one obtains the desired result has:

(i) (i) 17 (i) ∂Λ (i) (i) ∂Ξ (i) (i) (i) DtΛ = + Ξ , iΞ = i + Ξ , iΞ = T . ∂t [ I ] I ∂t [ I ]

Some additional properties are necessary for future further calculations, that are presented in the sequel. We use bold lower case letters to denote 3-vectors and bold uppercase to denote matrices:

Lemma 4 The inertial operator I(X) (and consequently I ) is symmetric and positive definite for the case of dynamics in su(2) and in with the metric given by the Killing form 1 K . ⟨Ξ1, Ξ2⟩ = − 2 (Ξ1, Ξ2)

Proof For the Lie algebra su(2) , one has that the Killing form is

K(σi, σj) = −2δij (where δij is the Kronecker delta [17]), then the metric ⟨Ξ1, Ξ2⟩ is positive definite (which is a consequence of the Lie group SU(2) being semi- simple). One can write then:

 18

⟨I(X)Ξ1, Ξ2⟩ 1 = − K( dm[X, [X, Ξ ]], Ξ ) 2 1 2 1 = K( dm[X, Ξ ], [X, Ξ ]) 2 1 2 where it was used the property K([X1, Y], Z) = K([Z, X], Y) = −K(Y, [X, Z]) of = − K(Ξ1, dm[X, [X, Ξ2]]) Killing forms was used. This completes2 the proofand the result follows.□ = ⟨Ξ1, I(X)Ξ2⟩,

As a consequence, all the eigenvalues of the operators I(X) , I are real and positive. 3 Let I be the 3 × 3 inertia matrix of the rigid body, and e1, e2, e3 ∈ R are its eigenvectors (that determine the principal axis), such that Iei = Iiei , where Ii are 3 the three principal moments of inertia. Let ϕ : (R , ×) → su(2) be the a Lie algebra isomorphism, such that as ϕ(x × y) = [X, Y] , where X, Y are the corresponding elements in su(2) of the 3-vectors x, y , and × is the vector product.

Proposition 2 The elements matrices

E1 = ϕ(e1), E2 = ϕ(e2), E3 = ϕ(e3) ∈ su(2) are eigenvectors of the operator I with eigenvalues I1, I2, I3 (principal moments of inertia).

Proof The angular momentum 3-vector is given by l = dm x × (ω × x) = − dm x × (x × ω) , which can be written as l = I(x)ω , where I(x) = − dm x × (x × ⋅) is the inertia matrix for a volume elementoperator. A integration in dm would produce I , that is the complete inertia matrix. Due to the properties of the Lie algebra isomorphism ϕ , one has that:

[X, [X, Ξ]] = [ϕ(x), [ϕ(x), ϕ(ω)]] = [ϕ(x), ϕ(x × ω)] = ϕ(x × (x × ω)), 19 where Ξ = ϕ(ω) . If Ei = ϕ(ei) is an eigenvector of the operator [X, [X, ⋅]] with eigenvalue λi , one has:

[X, [X, Ei]] = λiEi = ϕ(λiei) = ϕ(X × (X × ei)), 20 which implies that ei is an eigenvector of x × (x × ⋅) with eigenvalue λi . Due to the fact that the difference between of I(x) and x × (x × ⋅) is only a constant, which is the same difference between I(X) and [X, [X, ⋅]] , then I(x) and I(X) have the same eigenvalues, as well as I and I , which completes the proof.□

In order to obtain the dynamics for the complete serial robot, the following lemma is important. Lemma 5 The partial derivative is given by the recursive formula: ∂Ξ(i) ∂t i i ∂Ξ( ) −1 ∂Ξ( −1) −1 (i−1) 21 = R(i−1) R(i−1) − Ω(i−1), R(i−1) Ξ(i−1)R(i−1) + Ω˙ . ∂t [ ] ∂t [ [ ] ]

Proof By applying the partial derivative to Eq. (11), one has:

∂Ξ(i) ∂ −1 −1 ∂Ξ(i−1) 22 = R(i−1) Ξ(i−1)R(i−1) + R(i−1) R(i−1) ∂t ∂t {[ ] } [ ] ∂t −1 (i−1) (i−1) + R(i−1) Ξ(i−1)R˙ + Ω˙ . [ ]

−1 −1 (i−1) −1 Due to By using the formulas ∂ [R(i−1)] = −[R(i−1)] R˙ [R(i−1)] and, ∂t { } −1 (i−1) Ω(i−1) = [R(i−1)] R˙ and remembering the definition of Lie bracket, othe following result is obtainedne has:

∂Ξ(i) −1 −1 ∂Ξ(i−1) 23 = − Ω(i−1) R(i−1) Ξ(i−1)R(i−1) + R(i−1) R(i−1) ∂t [ ] [ ] ∂t −1 −1 (i−1) (i−1) + R(i−1) Ξ(i−1)R(i−1) R(i−1) R˙ + Ω˙ [ ] [ ] I  −1 ∂Ξ(i−1) −1 = R(i−1) R(i−1) − Ω(i−1) R(i−1) Ξ(i−1)R(i−1) [ ] ∂t [ ] −1 (i−1) + R(i−1) Ξ(i−1)R(i−1)Ω(i−1) + Ω˙ , [ ] and remembering the definition of Lie bracket, the result followswhich completes the proof.□

Lemma 6 Let S(i) be a frame attached to the i-th rigid body. The acceleration of a point X(i) in relation to frame S(0) but expressed in coordinates of S(i) is given by:

∂Ξ(i) 24 A(i) = , X(i) + Ξ(i), Ξ(i), X(i) + A(i), [ ∂t ] [ [ ]] Oi where A(i) represents the acceleration of the origin of S(i) in relation to S(0) but in Oi coordinates of S(i) .

Proof The definition of acceleration from the Cartan connection point of view is:

25 A(i) = 2 (i) (i) ∂ (i) ∂ (i) (i) (i) (Dt) X + A = + Ξ , ⋅ + Ξ , ⋅ X + A Oi { ∂t [ ]} { ∂t [ ]} Oi = ∂ (i) + Ξ(i), ⋅ X˙ + Ξ(i), X(i) + A(i) { ∂t [ ]} { [ ]} Oi ¨ (i) ˙ (i) Remembering= For the (rigidi) body case, one must have that X = X = 0 for a point (i) ∂Ξ i i (i) i i i (i) in the rigidX¨ body+. After substitution, X( ) + 2 inΞ the( ), Xabove˙ + formula,Ξ( ), Ξthe( ) ,proofX( ) is+ completed.A , , the [ ∂t ] [ ] [ [ ]] Oi result follows.□

The translational dynamic for the body S(i) is then given by:

(i) Theorem 3 If mi is the mass of the body S , the equation for the acceleration of the center of mass is:

(i) 26 ∂Ξ (i) (i) (i) (i) (i) (i) mi , X + mi Ξ , Ξ , X + miA = F , [ ∂t ] [ [ ]] Oi where F(i) is the total force acting in the body.

Proof By applying the covariant Newton’s law in the reference frame S(i) , that is (i) (i) miA = F , and using Eq. (24), the result is obtainedfollows.□

It is important to observe that the forces F(i) and the torques T(i) are causing the motion of the bodies, and they are expressed in the body frame S(i) . In a serial robot, one has to take account of the forces and torques in the joints and the external torques produced by actuators (for example, electric motors) in the joints. In the following section, a example will be provided.

6. Example Let us apply the method presented to determine the kinematics and dynamics of the two link planar robot presented in Fig. 3. This example was extracted from section 6.7, page 201 of the classical Craig’s book [9]. This example was also used in the article [6] from this author , to determine the kinematics using the Cartan connection. It is assumed that, in each link, all the mass is concentrated at the tip, that is, in Li units of distance from the frames’ origin (distal end of each link). Obviously, this point is also the center of mass of the link. For the sake of simplicity and saving of space, differently from [9], it is considered that the gravity force is zero. It is also assumed that in ,into the joints of the robot, there are electric motors that provide active torques τ1 and τ2 . Fig. 3 Two link planar robot (see Fig. 3 in [6], from this author).

In this case, there are three Cartan connections Ξ(0), Ξ(1), Ξ(2) (one for each frame), but the first one is null due to the Cartan's theorem. If R(0), R(1) are the frame transformations between S(0) and S(1) , and S(1) and S(2) , respectively, and Ω(0), Ω(1) are the corresponding angular velocities, the Cartan connections are related by (using the fact that Ξ(0) ≡ 0 ):

−1 27 Ξ(1) = R(0) Ξ(0)R(0) + Ω(0) = Ω(0), [ ] −1 −1 Ξ(2) = R(1) Ξ(1)R(1) + Ω(1) = R(1) Ω(0)R(1) + Ω(1). [ ] [ ]

For each rigid body (link), the Eq. (16) must be applied, which results inthere must be an equation of the form:

∂Ξ(1) (1) (1) (1) 28 I1 ∂t + [Ξ , I1Ξ ] = T , ∂Ξ(2) (2) (2) (2) I2 ∂t + [Ξ , I2Ξ ] = T , that relates the angular velocity of that body in relation to the inertial frame but expressed in the frame attached to that body (that is also the center of mass).

The translational equations are for each body are (by applying Eq. (26)):

29 

∂Ξ(1) (1) (1) (1) (1) (1) (1) m1 , X + m1 Ξ , Ξ , X + m1A = F , [ ∂t ] [ [ ]] O1 ∂Ξ(2) (2) (2) (2) (2) (2) (2) The partialm2 , X , by+ mapplying2 Ξ , Eq.Ξ (21),, X are: + m2A = F . [ ∂t ] [ [ ]] O2

(1) −1 (0) −1 30 ∂Ξ (0) ∂Ξ (0) (0) (0) (0) (0) (0) (0) = R R − ⎡Ω , R Ξ R ⎤ + Ω˙ = Ω˙ , ∂t [ ] ∂t [ ] ≡0 ≡0 ⎣ ⎦ ∂Ξ(2) −1 ∂Ξ(1) −1 (1) = R(1) R(1) − Ω(1), R(1) Ξ(1)R(1) + Ω˙ ∂t [ ] ∂t [ [ ] ] −1 (0) −1 (1) = R(1) Ω˙ R(1) − Ω(1), R(1) Ω(0)R(1) + Ω˙ . [ ] [ [ ] ]

The rotational set of equations, after some substitutions, are:

˙ (0) (1) (0) (0) 31 I1Ω =T − [Ω , I1Ω ], (1) −1 (0) −1 Ω˙ =T(2) − R(1) Ω˙ R(1) + Ω(1), R(1) Ω(0)R(1) I2 I2[ ] I2 [ [ ] ] −1 −1 − R(1) Ω(0)R(1) + Ω(1), R(1) Ω(0)R(1) + Ω(1) . [[ ] I2 ([ ] )]

The equations in Eq. (3231) relate the torques in each link (yet to be determined due to the joints between the links) to the relative angular velocities and rotation (0) matrices. The axis 3 is normal to the plane, which means that Ω = (i/2)θ1σ3 , (0) (1) (1) Ω˙ = (i/2)θ˙1σ3 , Ω = (i/2)θ2σ3 and Ω˙ = (i/2)θ˙2σ3 . In order to calculate the transformations using R(0) = ei(θ1/2)σ3 , R(1) = ei(θ2/2)σ3 , from the third (0) (1) formula in Eq. (6), one concludes that Ω(0), Ω˙ , R(0), Ω(1), Ω˙ , R(1) commute, and the second equation in Eq. (3231) becomes:

(1) (0) Ω˙ + Ω˙ = T(2) + Ω(1), Ω(0) − Ω(0) + Ω(1), (Ω(0) + Ω(1)) . 32 I2 { } I2 [ ] [ I2 ]

Finally, as [σ3, σ3] = 0 , all the brackets are zero, and this equation Eq. (31) is ˙ (1) ˙ (0) (2) further simplified to I2{Ω + Ω } = T . By a similar reasoning, one can ˙ (0) (1) conclude that the first equation in Eq. (3231) is simplified to I1Ω = T .

In Craig’s example, on the other hand, as it is supposed that all the mass in the (1) (2) bodies are concentrated, one has that I1 = I2 = 0 and T = T = 0 . One could have deduced this directly from Eq. (28) and saved one page, but the author thinks it would be instructive to deduce and present Eq. (3231).

The acceleration A(1) is null, and by applying Eq. (24), one has: O1

 33

(2) A = −1 O2 (1) 2 (1) R θ¨1L1σ¯2 − (θ˙1) L1σ¯1 R = ( ) ( ) ei(θ2/2)σ3 θ¨ L σ¯ − (θ˙ )2L σ¯ e−i(θ2/2)σ3 ( 1 1 2 1 1 1) = i i i(θ2/2)σ3 −i(θ2/2)σ3 2 i(θ2/2)σ3 −i(θ2/2)σ3 − θ¨1L1 e σ2e − (θ˙1) L1 e σ1e (1) ( (2) ) ( ) where =X =2 L1σ¯1 , X = L2σ¯1. 2 θ¨ L (σ¯ sin θ + σ¯ cos θ ) − (θ˙ )2L (σ¯ cos θ − σ¯ sin θ ) = 1 1 1 2 2 2 1 1 1 2 2 2 From Eq. θ(29),¨ L thesin θThe− translational(θ˙ )2L cos θdynamicσ¯ +al (equationsθ˙ )2L sin areθ :+ θ¨ L cos θ σ¯ , ( 1 1 2 1 1 2) 1 ( 1 1 2 1 1 2) 2 F(1) = m θ¨ σ¯ , L σ¯ + m θ˙ σ¯ , θ˙ σ¯ , L σ¯ , 1 [ 1 3 1 1] 1 [ 1 3 [ 1 3 1 1]] (2) (2) F = m2 (θ¨1 + θ¨2)σ¯3, L2σ¯1 + m2 (θ˙1 + θ˙2)σ¯3, (θ˙1 + θ˙2)σ¯3, L2σ¯1 + m2A , [ ] [ [ ]] O2 which results in:

(1) 2 F =m1L1θ¨1σ¯2 − m1(θ˙1) L1σ¯1, 35 F(2) = m θ¨ L sin θ − m (θ˙ )2L cos θ − m (θ˙ + θ˙ )2L σ¯ ( 2 1 1 2 2 1 1 2 2 1 2 2) 1 + m (θ˙ )2L sin θ + m θ¨ L cos θ + m L (θ¨ + θ¨ ) σ¯ . ( 2 1 1 2 2 1 1 2 2 2 1 2 ) 2

From now on, analog formulas from those presented in page 199 of [9] will beare used. Those formulas transform the forces and torques in one link to the next. The differences will be in are that those forces and torques are elements of su(2) , the vector product is replaced by the Lie bracket, and the rotation matricesx is are replaced by the adjoint representations of SU(2) in its own Lie algebra. The torque in joint 2 in coordinates of S(2) , which is also the torque of motor 2 (that is ), is given by (2) (2) (2) , which results in: τ2 N2 = [X , F ]

N(2) = L σ¯ , (m θ¨ L sin θ − m (θ˙ )2L cos θ − m (θ˙ + θ˙ )2L )σ¯ 36 2 [ 2 1 2 1 1 2 2 1 1 2 2 1 2 2 1 + m (θ˙ )2L sin θ + m θ¨ L cos θ + m L (θ¨ + θ¨ ) σ¯ ( 2 1 1 2 2 1 1 2 2 2 1 2 ) 2] = m L L (θ˙ )2 sin θ + m L L θ¨ cos θ + m (L )2(θ¨ + θ¨ ) σ¯ . ( 2 1 2 1 2 2 1 2 1 2 2 2 1 2 ) 3

The force in joint 1 in coordinates of S(1) is given by: (1) F = (2) −1 −1 1 R(1)F R(1) + F(1) = R(1)F(2) R(1) + F(1) 2 [ ] [ ] = m θ¨ L sin θ − m (θ˙ )2L cos θ − m (θ˙ + θ˙ )2L ei(θ1/2)σ3 σ¯ e−i(θ1/2)σ3 ( 2 1 1 2 2 1 1 2 2 1 2 2) 1 + m (θ˙ )2L sin θ + m θ¨ L cos θ + m L (θ¨ + θ¨ ) ei(θ1/2)σ3 σ¯ e−i(θ1/2)σ3 ( 2 1 1 2 2 1 1 2 2 2 1 2 ) 2 2 + m1L1θ¨1σ¯2 − m1(θ˙1) L1σ¯1 (1) The torque= in joint 1 in coordinates of S is given by: m θ¨ L sin θ − m (θ˙ )2L cos θ − m (θ˙ + θ˙ )2L (cos θ σ¯ + sin θ σ¯ ) ( 2 1 1 2 2 1 1 2 2 1 2 2) 2 1 2 2 −1 −1 (1) (1) (2) ˙ (1)2 (1) ¨(1) (1) (1) (2)¨ (1)¨ N =R+ Nm2(θR1) L1 sin+θ2X+ m,2Fθ 1L1+cosXθ2 +, Rm2LF2(θ 1 R+ θ 2) (− sin θ2σ¯1 + cos θ2σ¯2) 1 ( 2 [ ] [ ] [ [ ] )] 2 + m1L1θ¨1σ¯2 − m1(θ˙1) L1σ¯1. = m L L (θ˙ )2 sin θ + m L L θ¨ cos θ + m (L )2(θ¨ + θ¨ ) ei(θ1/2)σ3 σ¯ e−i(θ1/2) ( 2 1 2 1 2 2 1 2 1 2 2 2 1 2 ) 3 + L σ¯ , m L θ¨ σ¯ − m (θ˙ )2L σ¯ + L σ¯ , ei(θ1/2)σ3 F(2)e−i(θ1/2)σ3 [ 1 1 1 1 1 2 1 1 1 1] [ 1 1 ] = m L L (θ˙ )2 sin θ + m L L θ¨ cos θ + m (L )2(θ¨ + θ¨ ) σ¯ + m (L )2θ¨ σ¯ ( 2 1 2 1 2 2 1 2 1 2 2 2 1 2 ) 3 1 1 1 + m θ¨ (L )2 sin2 θ − m (θ˙ )2(L )2 sin θ cos θ − m (θ˙ + θ˙ )2L L sin θ σ¯ ( 2 1 1 2 2 1 1 2 2 2 1 2 1 2 2) + m (θ˙ )2(L )2 sin θ cos θ + m θ¨ (L )2 cos2 θ + m L L (θ¨ + θ¨ ) cos θ σ¯ ( 2 1 1 2 2 2 1 1 2 2 1 2 1 2 2) = m L L (θ˙ )2 sin θ + m L L θ¨ cos θ + m (L )2(θ¨ + θ¨ ) σ¯ + m (L )2θ¨ σ¯ ( 2 1 2 1 2 2 1 2 1 2 2 2 1 2 ) 3 1 1 1 + m (L )2θ¨ − m (θ˙ + θ˙ )2L L sin θ + m L L (θ¨ + θ¨ ) cos θ σ¯ . ( 2 1 1 2 1 2 1 2 2 2 1 2 1 2 2) 3

By comparing those equations with those presented in pages 203 and 204 of [9], it is possible to verify that the methodology proposed in this paper produces the same equivalent dynamical and kinematical equations.

7. Conclusion and future works A methodology to obtain the kinematics and dynamics of a serial robot with n links by using the concept of Cartan connection, covariant derivative and principal fiber bundles was presented. In particular, the principal fiber bundle used was 3 3 (P, R , π, SU(2)) , but it could be equally used (P, R , π, SO(3)) . Both the rotational and translational dynamics and kinematics were written in this representation, that is su(2) ⊕ su(2) . Several theoretical results were presented, and the equations were deduced by this method for a classical robot that can be found in the literature.

Several extensions of this methodology are under way, which includes the kinematic and dynamic calculation for parallel robots with kinematic constraints and the extension to the Lie group of unit dual quaternions, in which translational + rotational dynamics will be deduced in the same set of equations. The author also hopes that this methodology could produce new ways to design global nonlinear controllers to the serial and parallel robots, as well as nonlinear filters and state estimators.

References

1. Bernardes M, Adorno B, Poignet P, Borges G (2013) Robot-assisted automatic insertion of steerable needles with closed-loop imaging feedback and intraoperative trajectory replanning. Mechatronics 23(6):630–645

2. Bernardes MC, Adorno BV, Borges GA, Poignet P (2014) 3d robust online motion planning for steerable needles in dynamic workspaces using duty-cycled rotation. J Control Autom Electr Syst 25(2):216–227

3. Bottema O (1979) Theoretical kinematics. North-Holland Pub. Co., New York

4. Choquet-Bruhat Y, DeWitt-Morette C, Dillard-Bleick M (1989) Analysis, and physics: part II: applications, revised edn. North-Holland Pub. Co., Amsterdam

5. Colón D (2014) Connections between screw theory and cartan’s connections. In: Proceedings of the Congresso Brasileiro de Automática 2014. Sociedade Brasileira de Automatica, Belo Horizonte

6. Colón D (2015) Cartan connections as a tool for kinematic chain calculation. J Control Autom Electr Syst 26(6):630–641

7. Colón D, Angelico BA, Toriumi FY, Liduário PUM, Balthazar JM (2015b) Geometric modeling and robust control of a gyroscopic system. In: Proceedings of the ASME 2015 IDETC/CIE 2015, vol 8. ASME, Boston

8. Colón D, Pait FM (2004) Geometry of adaptive control: optimization and geodesics. Int J Adapt Control Signal Process 18:381–392

9. Craig JJ (1989) Introduction to robotics: mechanics and control. Addison- Wesley Longman, Boston

10. de Oliveira AS, De Pieri ER, Moreno UF, Martins D (2014) A new approach to singularity-free inverse kinematics using dual-quaternionic error chains in the davies method. Robotica 34:942–956

11. Humphreys J (1972) Introduction to Lie algebras and . In: Axler S, Gehring FW, Ribet KA (eds) Graduate texts in mathematics series, vol 9. Springer-Verlag, Heidelberg 12. Ivey T, Landsberg J (2003) Cartan for beginners: differential geometry via moving frames and exterior differential systems. Graduate studies in mathematics, vol 61. American Mathematical Society, Providence

13. Kobayashi S, Nomizu K (1969) Foundations of differential geometry, vol 2. Interscience Publishers, Geneva

14. Murray RM, Li Z, Sastry S (1994) A mathematical introduction to robotic manipulation. CRC Press, Boca Raton. AQ5

15. Pait FM, Colón D (2010) Discussion of “switching control for a class of non-linear systems with an application to post-harvest food storage”. Eur J Control 16(5), 574-575. AQ6

16. Radavelli LA, De Pieri ER, Martins D, Simioni R (2014) A screw dual quaternion operator for serial robot kinematics. In: Proceedings of PACAM XIV. Santiago AQ7

17. Sattinger DH, Weaver OL (1986) Lie groups and algebras with applications to physics, geometry and mechanics. In: John F, Marsden JE, Sirovich L (eds) Applied mathematical sciences, vol 61. Springer-Verlag, Heidelberg AQ8

18. Schwarz AS (1996) Topology for Physicists. In: Berger M, Eckmann B, Varadhan SRS (eds) Grundlehren der mathematischen Wissenschaften—a series of comprehensive studies in mathematics, vol 308. Springer-Verlag, Heidelberg

19. Selig J (2005) Geometric fundamentals of robotics. In: Gries D, Schneider FB (eds) Monographs in computer science, vol 2E. Springer-Verlag, Heidelberg

20. Sharpe, RW (1997) Differential geometry: Cartan generalization of Klein . In: Axler S, Gehring FW, Ribet KA (eds) Graduate texts in mathematics, vol 166. Springer-Verlag, Heidelberg

21. Spivak M (2005) Comprehensive introduction to differential geometry, vol 2, 3rd edn. Publish or Perish Inc., Lombard 22. Spong M, Vidyasagar M (1989) Robot dynamics and control. Wiley, Hoboken

23. Yang AT, Freudenstein F (1964) Application of dual-number quaternions algebra to the analysis of spatial mechanicms. J Appl Mech 31(2):300–308

24. Colón, D. (2015). Cartan’s connection, fiber bundles and quaternions in kinematics and dynamics calculations. In: Proceedings of the ASME 2015 IDETC/CIE 2015. Boston: ASME.