On computing real for matrices in

the

n

Lie group of sp ecial Euclidean motions in IR

J R Cardoso

Instituto Sup erior de Engenharia de Coimbra

Quinta da Nora

Coimbra Portugal

jo carsunisecpt

y

F Silva Leite

Departamento de Matematica

Universidade de Coimbra

CoimbraPortugal

eitematucpt

fax

Abstract

Weshow that the diagonal Pade approximants metho ds b oth for computing

the principal of matrices b elonging to the SEn IR of sp ecial

n

Euclidean motions in IR and to compute the exp onential of elements in

the corresp onding sen IR are structure preserving Also for the

particular cases when n we present an alternative closed form to compute

the principal logarithm These low dimensional Lie groups play an imp ortant

role in the kinematic motion of manymechanical systems and for that reason

the results presented here have immediate applications in rob otics

n

Keywords Lie group of Euclidean motions in IR matrix logarithms matrix

exp onentials Pade approximants metho d

Work supp orted in part by Instituto de Sistemas e Robotica Polo de Coimbra

y

Work supp orted in part by ISR researchnetwork contract ERB FMRXCT and research

grant from Gulb enkian Foundation

Intro duction

It is well known that under some sp ectral conditions anyinvertible real matrix has a

real logarithm Culver Lately there has b een an increasing interest in developing

computational techniques for real logarithms of real matrices the most signicantwork

in this area b eing Kenney and Laub and and Dieci Morini and Papini

An imp ortant fo cus of recentworkisondeveloping approximating metho ds for

matrix Lie groups that are structure preserving in the sense that they pro duce a

matrix in the corresp onding Lie algebra For instance Dieci showed that some

of the metho ds already develop ed when applied to an resp ectively

symplectic matrix always pro duce a real logarithm that is skewsymmetric resp ectively

hamiltonian Cardoso and Silva Leite extended the results of Dieci to a muchvaster

class of Lie groups This article continues in the same direction and the main ob jective

is to show that the Pade approximants metho d is structure preserving for the Lie group

n

of sp ecial Euclidean motions in IR We also present closed forms for computing the

real logarithm for the sp ecial cases when n Our motivation comes from the

imp ortance that these Lie groups play in applications to Engineering

Wenowintro duce some notation that will b e used throughout the whole pap er

Let gln IR denote the real vector space consisting of all n n matrices with real

entries gln IR equipp ed with the commutator op eration A B AB BA forms

a Lie algebra which is the Lie algebra of the Lie group GLn IR consisting of all

invertible matrices in gln IR The n n identity matrix will b e denoted by I Details

ab out the theory of matrix Lie groups and corresp onding Lie algebras may b e found

n

in Sattinger and Weaver Now the rotation group in IR may b e dened as

n o

T

SOn IR X GLn IR X X I detX

n

and the special group of Euclidean motions in IR by

R

n

R SOn I SEn IR R v IR

v

Both SOn IR and SEn IR are Lie groups with corresp onding Lie algebras de

ned resp ectively by

n o

T

son IR A gln IRA A

and

S

n

sen IR S son IR u IR

u

One imp ortant issue in the control of mechanical systems it that of path planning

tra jectories Park and Ravani and Crouch Kun and Silva Leite generalized the

classical De Casteljau algorithm for constructing Bezier curves on Lie groups For the

classical algorithm see for instance Farin It turns out that the implementation

of the De Casteljau algorithm on Lie groups dep ends on sucessiv e computations of

matrix logarithms and exp onentials Since displacements of a rigid b o dy form a Lie

group these interp olation techniques may b e an ecientway to path planning In

n

this context the Lie group of sp ecial Euclidean motions in IR whenn plays an

imp ortant role For instance the motion at every instant of time of a unicycle which

rolls without slipping on a plane is describ ed by a matrix

At

X t SE IR

xt

where xt IR describ es the p osition at time t of the center of mass of the unicycle

with resp ect to an orthonormal xed frame in the plane and At SO IR describ es

its orientation at time t with resp ect to the same inertial frame

Similarly the kinematic motion of an autonomous underwater vehicle is describ ed

by a matrix

At

X t SE IR

xt

where xt IR describ es the p osition at time tofthecenter of mass of the vehicle

in space and At SO IR describ es its orientation at time t with resp ect to an

inertial frame

The organization of the pap er is as follows We start with some basics ab out

logarithms of matrices and show that the principal logarithm of elements in SEn IR

b elong to the corresp onding Lie algebra Section is devoted to show that the Pade

approximants metho ds for computing the principal logarithm is structure preserving

for the sp ecial Euclidean group Wealsoprove a dual result for the exp onential of

elements in the Lie algebra sen IR An algorithm to compute the principal logarithm

of a matrix in SEn IR is included Finally we present closed forms for the principal

logarithm of elements in SE IRandSE IR

The principal logarithm in SEn IR 

X

Consider the matrix equation e T where T is a given matrix b elonging to the

general linear Lie group GLn IR All solutions X of this equation not necessarily

real are called logarithms of T It turns out however see for instance Culver

or Horn and Johnson that if the sp ectrum of T denoted by T do es not



intersect IR thenT has a unique real logarithm whose sp ectrum lies in the strip

C Imz g This logarithm is called the principal logarithm of T and fz

will b e denoted by Log T It also happ ens that if kI T k for any

k

P

I T



kk then the p ower series converges to the principal logarithm of T So

k

k

it makes sense to write



k

X

I T

Log T kI T k

k

k

We also recall a result ab out matrix square ro ots namely that if a real matrix



then there exists a unique real square ro ot of T having T satises T IR

eigenvalues with p ositive real part see for instance De Prima and Johnson This



square ro ot of T will b e the only one used along the pap er and will b e denoted by T

without any further reference In the particular situation when

R

T SEn IR

v

then



R



T





v R I



SOn IRwhenever R SOn IR we conclude that and using the fact that R



T SEn IR

The next result stresses the imp ortance of the principal logarithm of a matrix

b elonging to the Lie group SEn IR



Theorem If T SEn IR and T IR then Log T sen IR

Pro of We rst note that as proved in Dieci the analogue of this theorem for

the case when the Lie group SEn IR is replaced by the rotation group SOn IR is

also true For a generalization to other Lie groups see also Cardoso and Silva Leite

If kI T k the theorem follows by applying this result after having used the

series expansion of Log T On the other hand if kI T k there exists a p ositive

k k

 

k where T is obtained from T after k sucessive integer k such that k I T

k

k k

 

square ro ots So Log T sen IR Now since Log T Log T see Kenney

and Laub it follows that Log T sen IR

Pade approximants metho d

We refer to Baker and Baker and GravesMorris for more details concerning

to general theory of Pade approximants Here we recall how to obtain the diagonal

Pade approximants of a scalar function

P



i

c x is the MacLaurin series of f and that R x Assume that f x

i mm

i

P x

m

with Q is the m mdiagonalPade approximantof f Then one may

m

Q x

m

write

m

P x a a x a x

m m

R x

mm

m

Q x b x b x

m m

where the constants b i m are uniquely determined by solving the system

i

of linear algebraic equations A X B with

c c c c b c

m m m

c c c c b c

m m m

c c c c b c

m m m

A X B

b c c c c c

m m m m m

and the a s i m are then obtained through the following formulas

i

a c

P

i

a c b c i m

i i k ik

k

The following result will b e essencial to prove the main result in this section

Lemma If f is an odd function then the coecients of the diagonal Pade approx

imants of f satisfy a b i

i i

Pro of If f is o dd then the even co ecients c in its MacLaurin series vanish In

i

this situation a simple manipulation with prop erties of will show that

any matrix obtained from A ab ove by replacing each of its even columns by column

B will have zero It then follo ws from applying Cramers rule to the

system A X B that b i Replacing this in wealsoget a i

i i

It is well known that square Pade approximants R A of the matrix function

mm

f ALog I Amay b e used to approximate the principal logarithm of any matrix

T I A with kI T k It turns out that some imp ortant simplications take

place if instead of using the m mdiagonalPade approximantof f ALog I A



one uses the m m diagonal Pade approximantof g B Log I B I B



where B AA I We denote this approximantby S B These twoPade

mm

approximants are related through the identity



R A S AA I

mm mm



The following result shows the advantage of working with S AA I instead

mm

of R Aasanapproximation for Log I T

mm

X of the matrix function g X Log I Lemma The Pade approximant S

mm

 

X I X is of the form g X X X where is a polynomial function

of the odd powers of X and is a polynomial function of the even powers of X both

of degree m

Pro of The result is an immediate consequence of the lemma applied to the

x

o dd function g xLog

x

We are now ready to present the main result

Theorem If T SEn IR and kI T k then R I T sen IR

mm



Pro of Let A I T and B AA I Due to the relation wejusthave

to prove that S B b elongs to sen IR We rst showthatifT SEn IR then

mm

B sen IR We then pro ceed to show that se n IRisinvariant under S which

mm

will conclude the pro of

A simple calculation shows that if

R

T

v

n

where R SOn IR and v IR then



I RR I

B



v R I

Note that since we are assuming that kI T k this implies I T where

X denotes the sp ectrum radius of X and so R I is always invertible It turns

T 

out however that since R R I I RR I son IR and as a consequence

B sen IR Now let us prove that if B sen IRsodoes S B Assume that

mm

S

B

u

n

for some n n skewsymmetric matrix S and some u IR Now applying the last

lemma together with the fact that all o dd p owers of a skewsymmetric matrix are still

skewsymmetric while its even p owers are symmetric it is an easy exercise to check

that B sen IR say

C

B

x

n

T

with C C and x IR andthat

V

B

w c

n

where V is symmetric and invertible w IR and c is a nonzero real numb er Since



V



B



wV

c c

it follows from and that



CV



S B B B

mm



xV

 

Now since C and V are p olynomials in S wehave CV VC CV V C



and also using the skewsymmetry of C and the symmetry of V it follows that



CV son IR and therefore S B sen IR as required

mm

Using this theorem and the explanation during its pro of together with the theorem

T it is clear that when T in the last section and the fact that R I T Log

mm

satises the norm condition kI T k an ecientway to nd the principal logarithm



of T SEn IR is by computing S B where B I T I T In the

mm



case when kI T k and T IR one combines in the usual way the

previous metho d with the so called inverse squaring and scaling techniqueFor that

k



satises the norm assumptions nd an nonnegativeinteger k such that the matrix T

k



of the last theorem then apply the Pade approximants metho d to obtain Log T

k

k



and nally recover Log T using the identity Log T Log T

Note that when we apply the inverse squaring and scaling technique to matrices in

SEn IR no structure is lost In fact as wehave already p ointed out at the end of



the last section T is always in SEn IR whenever T is So theorem guarantees



b elongs to sen IR and since this is a vector that the approximating value of Log T

space rescaling is not going to change the structure of the nal result

Wenow summarize the main steps for computing the principal logarithm of T

SEn IR Although the accuracy of the Padeapproximation increases with mit



has b een shown by Kenney and Laub that R I T is already within

of Log T whenever kI T k So having in mind implementations of this

algorithm wework b ellow with the diagonal Pade approximant

According to the discussion presented b efore the statement of the lemma we

use the Pade approximant S instead of R in the next algorithm Using the Derive

program to compute S one obtains



S AA A

where

A A A A A

A I A A A A

Algorithm



Supp ose that T SEn IRand T IR

k



Compute k successive square ro ots of T until kI T k



k



and B AA I Take A I T



Compute S B B B where and are given by

Approximate Log T using the following relation

k

Log T S B sen IR

For the sake of completeness we include here a result which is the dual of theorem

in the sense that it provides a stable metho d to compute the exp onential of a

matrix in the Lie algebra sen IR

One the most eectiveways to compute the exp onential of a matrix see for in

stance Moler and Van Loan is to use the metho d of Pade approximants together

with scaling and squaring techniques This consists in approximating the exp onential

A

e of a matrix Ab y

A

j

A

e R

mm

j

X

where R X is the m m diagonal Pade approximantof e and j is a nonnegative

mm

A

k It happ ens that the exp onential of a matrix in sen IR integer suchthatk

j

b elongs to the corresp onding Lie group SEn IR and so it is imp ortanttobeableto

guarantee that the pro cedure just describ ed to approximate the exp onential always

pro duces a matrix in that Lie group no matter what order of the Pade approximant

is taken The next theorem ensures that is always the case and the pro of is based on

a similar result for the orthogonal group

Theorem If A sen IRthen R A SEn IR

mm

A

Pro of The m m diagonal Pade approximantof e is given by



R A Q AQ A

mm m m

k

where Q A is a p olynomial of degree m in A the co ecientof A b eing

m

m k m

c k m

k

mk m k

Now since

S

A

u

n

for some S son IR and u IR we obtain after some algebraic computations



Q S Q S

m m

R A

mm

w w



Q S Q S

m m



w w Q S

m

R S

mm

w

n n



for some w w IR and w w w Q S IR Now use the fact

m

that S is skewsymmetric and a result in Cardoso and Silva Leite to conclude that

R S is orthogonal Therefore R A SEn IR

mm mm

Since sen IR is a Lie algebra and so closed under scalar multiplication and

SEn IR is closed under matrix multiplication it follows from the previous theorem

A

that gives an appro ximation to e which b elongs to the right Lie group SEn IR

Closed forms for logarithms in SE IR and SE IR 

In this section we derive formulas that provide an alternativeway to compute the

principal matrix logarithm for the most imp ortant Euclidean groups in applications

SE IRandSE IR

R cos sin



If T SE IR and T IR then R

v sin cos

SO IR for some In this case Log R and if we assume

further that then I R is invertible and it results from applying the series

expansion that

Log R

Log T



v I R Log R

sin sin

v v v v

cos cos

with v v v

Although as stated in section the convergence of the series is only guaranteed

when kI T k it turns out however that the eigenvalues of the matrix in

satisfy Imz and its exp onential is equal to T Sowehave the guarantee

that the formula always gives the principal logarithm of T SEn IR

Now supp ose that

R

T SE IR

v

so that R SO IR andv IR It happ ens that is always an eigenvalue of R

SO IR and consequently the matrix I Risnever invertible So the technique

used for the case n can not b e applied However assuming the convergence of the

series dening the logarithm wemay write

R Log R

Log T Log

v vV



k 

X

I R

where V

k

k

In order to deal with this series we use the Schur decomp osition of R to reduce to

i

the situation of the previous example Since the eigenvalues of R are fe g

T

Q R Q cos sin

sin cos

is the real Schur decomp osition of R where Q is an orthogonal matrix and

tr aceR

arccos is assumed nonzero So

T

Log RQ Q

and

T

I R Q Q

I R

cos sin

where R SinceI R isinvertible wemaynow apply the

sin cos

techniques used for the case n A simple calculation shows that

T

V Q Q



I R Log R

sin

T

Q Q

cos

sin

cos

R

SE IR Thus for computing the principal logarithm of a matrix T

v

we suggest the following formula

Log R

Log T

vV

where Log RandV are given resp ectively by and

Similarly to the case n the eigenvalues f i g of this matrix are always in

the range Imz its exp onential is the matrix T so always gives the

principal logarithm of T SE IR

Wemay also derive closed forms for the principal logarithm using the Lagrange

terp olation formula We start with SE IR just for the sake of complete Hermite in

ness

The principal matrix logarithm is a primary matrix function and as a consequence



there exists a scalar p olynomial pz in the given a matrix T suchthat T IR

complex variable z such that Log T pT This p olynomial interp olates the scalar

k

logarithm Log z and its derivatives at the eigenvalues of T thatisLog

i

k

p for k r where r is the multiplicity of the eigenvalue and

i i i i

may b e computed through the LagrangeHermite formula Horn and Johnson

In general computing p z is hard However when the size is small it is p ossible to

nd the expression of pz after some algebraic manipulations This is now illustrated

for the case when T SEn IRwithn



Assume that T SE IR satises the condition T IR and the eigenvalues

tr aceT 

of T are and cos i sin with arccos By applying the Lagrange

Hermite formula we obtain the following p olynomial representation for Log T T

SE IR

Log T h I h g T g T

where

g

sin

sin

h cot

cos



If T SE IR satises T IR then T has a double eigenvalue equal to

tr aceT 

is assumed to b e nonzero and a pair cos i sin where arccos

Now the p olynomial representation for Log T T SE IR obtained from the

LagrangeHermite formula is given by

Log T h I g h T h g T g T

where

sin

g

sin cos cos

sin cos sin

h cot

cos cos

References

G A Baker Essentials of Pade approximants Academic Press

G A Baker and PGravesMorris Pade approximantsPart I Encyclop edia Math

AddisonWesley

W J Culver On the existence and uniqueness of the real logarithm of a matrix

Proc Amer Math Soc pp

J R Cardoso and F Silva Leite Logarithms and exp onentials for the Lie group

of Porthogonal matrices Submitted

P Crouch G Kun and F Silva Leite The De Casteljau algorithm on Lie groups

and spheres To app ear

L Dieci Considerations on computing real logarithms of matrices Hamiltonian

logarithms and skewsymmetric logarithms Linear Algebra and its Applications

pp

L Dieci B Morini and A Papini Computational techniques for real logarithms

of matrices SIAM Journal on and Applications N

pp



C R DePrima and C R Johnson The range of A A in GLn C Linear

Algebra and its Applications pp

G Farin Curves and Surfaces for CAGD Academic Press Third Edition

N J Higham Computing real square ro ots of a real matrix Linear Algebra and

its Applications pp

R A Horn and C R Johnson Topics in Matrix AnalysisCambridge University

Press

R A Horn and C R Johnson Matrix AnalysisCambridge University Press

C Kenney and A J Laub Pade error estimates for the logarithm of a matrix

International Journal of Control N

C Kenney and A J Laub Condition estimates for matrix functions SIAM Jour

nal on Matrix Analysis and Applications pp

C Kenney and A J Laub A SchurFrechet algorithm for computing the logarithm

and exp onential of a matrix SIAM Journal on Matrix Analysis and Applications

N pp

C Moler and C Van Loan Nineteen dubious ways to compute the exp onential of

a matrix SIAM Review N pp

F Park and B Ravani Bezier curves on Riemannian manifolds and Lie groups

with kinematic applications ASME Journal of Mechanical Design

pp

F Silva Leite P Crouch Closed forms for the exp onential of the innitesimal

generators of matrix Lie groups Submitted

Sattinger and Weaver Lie groups and algebras with applications to physics geom

etry and mechanics Applied Mathematical Sciences Springer Verlag