In this lesson, we will become familiarized with another representation for orientations in robotics that is called Cayley-Rodrigues Parameters. Cayley-Rodrigues parameters provide local coordinates for SO(3). They are local coordinates because the representation is not singularity-free, and not all orientations can be expressed by them. However, they have properties that make them intriguing.

This lesson is part of the series of lessons on foundations necessary to express robot motions. For the full comprehension of the Fundamentals of Robot Motions and the necessary tools to represent the configurations, velocities, and forces causing the motion, please read the following lessons (note that more lessons will be added in the future):

Also, reading some lessons from the base lessons of the Fundamentals of Robotics course are deemed invaluable.

**Definition of Cayley-Rodrigues Parameters to Express Orientations in Robotics**

Cayley-Rodrigues parameters can be obtained from the exponential representation on SO(3). As we saw in the lesson on the exponential coordinate representation, every rotation matrix R ∈ SO(3) has an exponential coordinate representation ῶθ such that

\[R = e^{[\hat{\omega}]\theta }, ||\hat{\omega} || = 1, \theta \in [0,\pi]\]

Thus, SO(3) can be visualized as a sphere of radius π like the following figure

Then, the exponential coordinates ῶθ can lie anywhere in this sphere.

The Cayley-Rodrigues parameters r ∈ ℝ^{3} can then be obtained as

\[r = \hat{\omega} tan \frac{\theta}{2}\]

If we visualize the SO(3) as a sphere with a radius of π (because ||ῶθ||≤π) depicted above, then Cayley-Rodrigues parameterization of SO(3) has the effect of infinitely “stretching” the radius of the sphere via the tangent half-angle function. To understand this, recall that the function tanθ approaches infinity when θ = ±π/2, therefore tan(θ/2) approaches infinity when θ = ±π:

Therefore, the Cayley-Rodrigues parameterization of SO(3) has the effect of infinitely “stretching” the radius of the sphere via the tangent half-angle function.

θ = π is the singularity of the Cayley-Rodrigues parameterization of orientation because tan(θ/2) approaches infinity at that angle, and this is when trR = -1 (tr is the trace of the matrix which is defined as the sum of the diagonal terms). For more information, please refer to the lesson on the exponential coordinate representation of orientation.

Now let’s see how these parameters are derived when an orientation is represented by the rotation matrix R ∈ SO(3). Note that they are derived using a general formula attributed to Cayley.

**Cayley-Rodrigues Parameters from a Rotation Matrix and Vice Versa **

Suppose that an orientation is represented by a rotation matrix R ∈ SO(3).

If trR ≠ -1 (singularity-free case), then the Cayley-Rodrigues parameters are derived as

\[(R+I)^{-1}(R-I) = [r] \in so(3)\]

Where [r] is the skew-symmetric matrix representation of r. For more information about the definition of the skew-symmetric matrix representation, please refer to the lesson on the exponential coordinates representation of the orientation.

Then, R and [r] are related through the following equations

\[R = (I-[r])^{-1}(I+[r])\\ [r] = (R+I)^{-1}(R-I)\]

These equations provide a one-to-one correspondence between the skew-symmetric matrices of Lie algebra so(3) and those elements of the special orthogonal matrices of the Lie group SO(3) that have traces not equal to -1. To learn more about the Lie group and Lie algebra refer to the lesson on the exponential coordinates representation of the orientation.

These equations can also be explicitly computed as the following equations

\[\begin{matrix} R = \frac{(1-r^Tr)I + 2rr^T + 2[r]}{1+r^Tr}\\ [r] = \frac{R-R^T}{1+trR} \end{matrix}\]

From these equations, we can see that

- r = 0 corresponds to the identity matrix R = I
- -r is the inverse of the rotation corresponding to r

And the following two identities also follow from the above equations

\[1 + trR = \frac{4}{1+r^Tr}\\ R – R^T = \frac{4[r]}{1+r^Tr}\]

**Example: Cayley-Rodrigues Parameters from a Given Orientation Represented by a Unit Quaternion**

Consider the tool of the 6-axis robot KR 6 R900 sixx is rotated from the home orientation to the orientation shown in the figure below

Also, suppose that the orientation of the tool frame with respect to the base frame is represented by the unit quaternion as

\[q = 0.76821 – 0.09907i + 0.52809j + 0.34807k\]

We want to find the Cayley-Rodrigues parameters representing the same orientation.

From the lesson on Unit Quaternions to Express Orientations in Robotics, we can find the axis and angle representation of the orientation given by the above unit quaternion as

\[\begin{matrix} q_0 = 0.76821 = cos\frac{\theta}{2} \rightarrow \theta = 2cos^{-1} {{q_0}} = 79.61^{o}\\ \hat{\omega} = \frac{1}{sin\frac{\theta}{2}}\begin{pmatrix} q_1\\ q_2\\ q_3 \end{pmatrix} = \begin{pmatrix} -0.1547\\ 0.8251\\ 0.5438 \end{pmatrix} \end{matrix}\]

Therefore, the Cayley-Rodrigues Parameters can easily be calculated as

\[r = \hat{\omega} tan\frac{\theta}{2} = \begin{pmatrix} -0.1289\\ 0.6878\\ 0.4531 \end{pmatrix}\]

We can also calculate the rotation matrix representation of this orientation from the Cayley-Rodrigues parameters. Since the angle of rotation is not 180^{o}, then we are dealing with the singularity-free case. Using the definition of the skew-symmetric matrix representation that we learned in the exponential coordinates lesson, we can find [r] as

\[[r] = \begin{pmatrix} 0 & -0.4531 & 0.6878\\ 0.4531 & 0 & 0.1289\\\ -0.6878 & -0.1289 & 0 \end{pmatrix}\]

And, then we can calculate the rotation matrix representing this orientation using either of the formulae that we learned as

\[R = \begin{pmatrix} 0.1996 & -0.6392 & 0.7427\\ 0.43 & 0.7382 & 0.5198\\ -0.8805 & 0.2156 & 0.4222 \end{pmatrix}\]

All three of the q, r, and the rotation matrix R represent the same orientation.

**Cayley-Rodrigues Parameters for the Composition of Two Rotation Matrices**

The attractive feature for Cayley-Rodrigues parameters is a simple form of the composition of two rotation matrices. Suppose that r_{1} is the Cayley-Rodrigues parameters for the rotation matrix R_{1}, and r_{2} is the Cayley-Rodrigues parameters for the rotation matrix R_{2}, then the Cayley-Rodrigues parameters r_{3} for the composition of the rotation matrices R_{3} = R_{1}R_{2} can be computed as

\[r_3 = \frac{r_1 + r_2 + (r_1 \times r_2)}{1-{r_1}^T r_2}\]

**Example:**

Suppose that the final orientation of the body frame with respect to the base frame is obtained after a rotation about the body frame’s z-axis (that is initially coincident with the space frame’s z-axis) by 90^{o}, followed by a rotation about the body frame’s y-axis by 45^{o}:

Therefore, the first rotation can be expressed by the Cayley-Rodrigues parameters as

\[r_1 = \hat{z} tan\frac{\alpha}{2} = \begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix} tan(45^{o}) = \begin{pmatrix} 0\\ 0\\ 1 \end{pmatrix}\]

And, the second rotation can be expressed by the Cayley-Rodrigues parameters as

\[r_2 = \hat{y} tan\frac{\beta}{2} = \begin{pmatrix} 0\\ 1\\ 0 \end{pmatrix} tan(22.5^{o}) = \begin{pmatrix} 0\\ 0.4142\\ 0 \end{pmatrix}\]

Therefore, the Cayley-Rodrigues parameters expressing the composition of rotations can be calculated as

\[r_3 = \begin{pmatrix} -0.4142\\ 0.4142\\ 1 \end{pmatrix}\]

The resulting rotation matrix can either be calculated using the rotation operators that we learned in the previous lessons as

\[R_3 = Rot(\hat{z},90^{o})Rot(\hat{y},45^{o}) = \begin{pmatrix} 0 & -1 & 0\\ 0.7071 & 0 & 0.7071\\ -0.7071 & 0 & 0.7071 \end{pmatrix}\]

Or, using the formula for the rotation matrix from the Cayley-Rodrigues parameters that we learned in this lesson as

\[R_3 = (I-[r_3])^{-1}(I+[r_3]) = \begin{pmatrix} 0 & -1 & 0\\ 0.7071 & 0 & 0.7071\\ -0.7071 & 0 & 0.7071 \end{pmatrix}\]

Which gives the same result. The composition of two rotations is equivalent to a rotation by 98.41^{o} about the unit axis (-0.3574,0.3574,0.8630), or alternatively, a rotation that can be described by the unit quaternion q = 0.6532 – 0.2706i + 0.2706j + 0.6533k. Try to calculate these expressions as a practice for conversions between the representations.

**Angular Velocities and Accelerations in Terms of Cayley-Rodrigues Parameters **

Another attractive feature for Cayley-Rodrigues parameters is that the angular velocities and accelerations have a simple form in terms of them. If r(t) is the Cayley-Rodrigues representation of the orientation trajectory R(t), then the angular velocity expressed in space frame and body frame can be expressed as

\[\omega_s = \frac{2}{1+||r||^2} (r \times \dot{r} + \dot{r})\\ \omega_b = \frac{2}{1+||r||^2} (-r \times \dot{r} + \dot{r})\]

By time differentiating the above expressions, we can get the angular accelerations with respect to the space and body frames as

\[\dot{{\omega}}_s = \frac{2}{1+||r||^2} (r \times \ddot{r} + \ddot{r} -r^T \dot{r} \omega_s)\\ \dot{{\omega}}_b = \frac{2}{1+||r||^2} (-r \times \ddot{r} + \ddot{r} -r^T \dot{r} \omega_b)\]

In the comping lessons, we will study more about the angular velocities and accelerations in the space and body frames. For now, we just want to learn that the angular velocities and accelerations in the space and body frame have rather simpler forms in terms of Cayley-Rodrigues parameters.

Please also note that most of the equations are written without proof since, as roboticists, we are mostly interested in using them for our applications, and we do not want to deal with complex math behind them.

That’s going to wrap up today’s lesson. We hope that it gave you a good understanding of Cayley-Rodrigues parameters and how they are used to express orientations. This is the last lesson on the orientation, and in the next lesson, we will talk about Homogeneous Transformation Matrices to express configurations in Robotics.

The video version of the current lesson can be watched at the link below:

Thanks for reading this post. You can also find the other posts on the Fundamentals of Robotics Course in the link below:

https://www.mecharithm.com/category/learning-robotics-mechatronics/fundamentals-of-robotics-course/

**References:**

📘 **Textbooks**:

*Modern Robotics: Mechanics, Planning, and Control by Frank Park and Kevin Lynch**A Mathematical Introduction to Robotic Manipulation by Murray, Lee, and Sastry*

🌐** Websites:**

- https://robodk.com/

**If you enjoyed this post, please consider contributing to help us with the website’s running costs and keep making awesome content for you. We deeply thank you for your generous contribution!**

### Do not forget to contact us:

**Be sure to let us know your thoughts and questions about this post, as well as the other posts on the website. You can either contact us through the “Contact” tab on the website or email us at support[at]mecharithm.com.**