Lesson 4: Orientation in Robotics ‐ Exponential Coordinates, and Euler Angles - madibabaiasl/kinematics-robotic-arms-modern-approach GitHub Wiki
- Explain the axis–angle (exponential coordinate) representation of orientation.
- Derive the relationship between rotation matrices and exponential coordinates using Rodrigues’s formula.
- Understand the role of matrix exponentials and matrix logarithms in expressing rotations.
- Describe how Euler angles represent orientation through a sequence of rotations.
- Recognize singularities and their implications in different orientation representations.
After completing this lesson, you will be able to:
- Express a 3D rotation using exponential coordinates and convert between this form and a rotation matrix.
- Apply Rodrigues’s formula to compute rotation matrices and interpret their geometric meaning.
- Compute the axis and angle from a given rotation matrix using the matrix logarithm.
- Represent and interpret orientation using ZYX Euler angles.
- Identify the strengths and limitations of different orientation parameterizations in robotics applications.
In the Degrees of Freedom lesson, you learned how many independent motions a robot can perform. In the Rotation Matrices lesson, you learned how to mathematically describe one of those motions (rotation). This lesson takes that understanding further. Now, we explore more compact and intuitive ways to represent orientation. Exponential coordinates (axis–angle) show how a robot rotates (about what axis, and by how much), while Euler angles let us describe rotations in the sequence most robot joints actually move.
In the previous lesson, we became familiar with rotation matrices, and we saw that the nine-dimensional space of rotation matrices subject to six constraints (three unit norm constraints and three orthogonality constraints) could be used to implicitly represent the three-dimensional space of orientations.
There are also other methods to express the orientation with a minimum number of parameters. Exponential coordinates that define an axis of rotation and the angle rotated about that axis (it is also sometimes called axis-angle representation), the three-parameter Euler angles, the three-parameter roll-pitch-yaw angles, and the unit quaternions (uses four variables subject to one constraint) are some of the methods to express the orientations with a fewer number of parameters. We will discuss the exponential coordinates and one type of Euler angles (due to their importance) in this lesson and the rest will be left for your own study (they are not required in our class).
Exponential coordinates of orientation are a three-parameter representation of orientation in which a rotation matrix R can be parameterized in terms of a rotation axis
The Exponential Coordinate Representation of Orientation
Here, note that if a frame initially coincident with the space frame {s} were rotated by
axis-angle-representation.mp4
If we combine these two parameters, we get the exponential coordinate representation of orientation as:
In the exponential coordinate (axis-angle) representation of orientation, a rotation matrix R is described by two parameters: a unit vector
A) The exact positions of the coordinate frame axes in space.
B) The axis about which the rotation occurs and the magnitude of that rotation.
C) The scaling of the coordinate system relative to the base frame.
D) The shear transformation between two coordinate frames.
The relationship between a rotation matrix and exponential coordinates of orientation can be explained using Rodrigues’s formula as:
Here,
Start of Math Note
By definition, if we have a vector defined as:
Note that since [a] is a skew-symmetric matrix, then:
End of Math Note
If you want to know the physics and mathematics behind Rodrigue's formula and why it can represent a rotation matrix, you can watch the following video (the proof is not required in our class):
https://youtu.be/I2p1lCcmOsM?list=PLlqdnFs9xNwpD9zJr8BgAbfHH3AyixTqt
Question 1. In Rodrigues’s rotation formula:
A) A diagonal matrix whose entries are the components of the axis vector
B) A symmetric matrix that ensures orthogonality of the rotation.
C) A skew-symmetric matrix representation of
D) A projection matrix that projects vectors onto the axis
Question 2. Using Rodrigues’s formula, compute the rotation matrix R for a rotation of
Rodrigue's formula uses the matrix exponential to construct a rotation matrix from a rotation axis
Given a vector
Exponentiation (maps Lie algebra to Lie group):
We can also conclude that the matrix exponential from Rodrigue's formula can act as an operator and rotate a frame or a vector:
-
$e^{[\hat{\omega}]\theta} p$ : here the matrix exponential can rotate the vector$p \in \mathbb{R}^3$ about the fixed frame axis$\hat{\omega}$ by an angle$\theta$ . -
if R is a rotation matrix with 3 column vectors:
- then
$R' = e^{[\hat{\omega}]\theta} R = Rot(\hat{\omega}, \theta) R$ is the orientation achieved by rotating R by$\theta$ about the axis$\hat{\omega}$ in the fixed frame. - and
$R'' = R e^{[\hat{\omega}]\theta} = R Rot(\hat{\omega}, \theta)$ is the orientation achieved by rotating R by$\theta$ about the axis$\hat{\omega}$ in the body frame.
- then
Question 1. What does the matrix exponential
A) A translation matrix
B) A scaling transformation
C) A rotation about the axis
D) A shear transformation
Question 2. The set of all 3×3 real skew-symmetric matrices is called:
A) SO(3)
B) so(3)
C) SE(3)
D) so(n)
Question 3. According to Rodrigues’s formula, what happens when we apply
A) The vector p is translated along
B) The vector p is rotated about the
C) The frame is scaled relative to p.
D) The vector p is rotated about the
Question 4. If R is a rotation matrix with 3 column vectors, then:
A)
B)
C) Both correspond to scaling in different frames.
D) Both correspond to reflections in different frames.
Now let's solve the reverse problem. What if we have a rotation matrix
So now the problem is we have the rotation matrix
and we want to find the corresponding
Where
After doing some math that can be found in the above given video, we can get the skew-symmetric matrix form of the axis of rotation for the given rotation matrix R as:
Note here that
-
$sin\theta \ne 0$ ($\theta$ is not an integer multiple of$\pi$ ): With$[\hat{\omega}]$ found above and$\theta$ from this equation, R can be expressed as the exponential matrix$R = e^{[\hat{\omega}]\theta}$ . -
$sin\theta = 0$ ($\theta = k\pi$ and k is some integer):- Case 1: k is an even integer, then no matter what the axis of rotation
$\hat{\omega}$ is, we have rotated back to R = I, so the axis of rotation$\hat{\omega}$ is undefined. - Case 2: k is an odd integer (
$\theta = (\pm\pi, \pm 3\pi, ...)$ ), and then$R = I + 2[\hat{\omega}]^2$ . For this case, we can find the rotation axis by equating this rotation matrix to the given rotation matrix.
- Case 1: k is an even integer, then no matter what the axis of rotation
In summary: if we are given
Example. If the rotation matrix R is defined by successive rotations about the z-axis of the space frame by 180 deg followed by a rotation about the x-axis of the space frame by 90 deg as (notice the order in which the rotations are written):
Click to reveal answer
The rotation operators about the x and z axes used in this calculation can be found in the rotation matrices lesson. If you like to visualize this rotation, you can watch the following demonstration and verify that the orientation of the final frame with respect to the base frame is indeed the rotation matrix above:
successive.rotations.example.mp4
We want to find a unit vector
Solution: Let's first calculate
Click to reveal answer
Therefore, the angle of rotation is an odd integer multiple of
Click to reveal answer
Now equate this to the given orientation:
Click to reveal answer
Note here that since
From the equation above, we can have:
Click to reveal answer
Solving these equations:
Click to reveal answer
Here, note that when the angle of rotation is an odd integer multiple of
So, the orientation of the frame achieved by a rotation from the initial orientation about
Question 1. The matrix logarithm of a rotation matrix
A)
B)
C)
D)
Question 2. When is the skew-symmetric matrix
A) when
B) when
C) when
D) when
Question 3. If
A) It becomes arbitrary.
B) It is undefined because R = I.
C) It points along the z-axis only.
D) It equals the exponential coordinates
Question 4. If
A) R = I
B) R = -I
C)
D)
Question 5. Given the rotation matrix
use the matrix logarithm approach to compute the axis of rotation
In the lesson about the degrees of freedom of a robot, we learned that there are at least three independent parameters needed to express the orientation of a rigid body. At the start of this lesson, we learned about the exponential coordinate representation for the orientation which is a three-parameter representation for a rotation matrix R, and parameterizes the rotation matrix using a unit axis of rotation and the angle of rotation about this axis.
There are also other explicit representations that are useful in different applications when dealing with orientations. In this part, we will talk about Euler Angles and will see how we can use this representation to parameterize an orientation. Euler angles are commonly used when controlling the 3 degrees of freedom (DOF) of the wrist in robotic inverse kinematics due to their effectiveness in representing and controlling orientation.
Euler angles are a set of three angles that describe the orientation of a rigid body or object in three-dimensional space by specifying a sequence of rotations. There are different sequences or conventions for defining Euler angles, and each sequence represents a unique way of describing the orientation. Here are some commonly used types of Euler angles: XYZ Euler Angles (Roll-Pitch-Yaw), ZYX Euler Angles, ZYZ Euler Angles, etc. Here, we will discuss ZYX Euler Angles and the rest can be easily deduced from this.
Consider the body frame {b} is instantaneously attached to a rigid body and was initially aligned with the space frame {s}:
The ZYX Euler angles
These rotation operators are found in the Rotation Matrices lesson, and the above equation for the final orientation of the body can be interpreted as starting from the initial orientation when the body frame is coincident with the space frame and thus R = I, then rotate it by

Video below shows a demonstration of the ZYX Euler angles to represent the orientation:
zyx-euler-angle-orientation-representation.mp4
Demonstration of the ZYX Euler Angle Representation. Shout out to Husam Aldahiyat for writing the MATLAB code for this simulation.
The opposite problem, which is so common in finding the inverse kinematics of a robotic arm wrist, is determining the Euler angles
does there exist
Given the rotation matrix
find all the corresponding Euler angles
Since we are dealing with cosines and sines here, Euler angles like any other 3-parameter representation of orientation suffer from singularities. When cosines or sines approach zero or values close to zero, it can lead to singularities in the Euler angle representations, resulting in situations where multiple sets of Euler angles can represent the same orientation or where certain orientations cannot be effectively represented. This is problematic in practical applications where the robot’s controller will be confused at those poses and can generate solutions that can cause problems.
There are also other ways to represent orientation like unit quaternions and the Cayley-Rodrigues parameters that you can refer to the videos below if you are interested in learning them (they are not required in our class):
Important Note: If you read 100 robotics books/articles, you will encounter 99 different notations. I read at least 5 different robotics books (Craig, Siciliano, Asada, Peter Corke, and our main textbooks (Lynch and MLS)), and the Modern Robotics book by Kevin Lynch offers a better notation. I found it easier for learning and research.
- Kevin, M.L. and Frank, C.P., 2017. Modern robotics: mechanics, planning, and control
- Murray, R.M., Li, Z. and Sastry, S.S., 2017. A mathematical introduction to robotic manipulation. CRC press.
- Corke, P., 2023. Robotics, Vision and Control: Fundamental Algorithms in Python (Vol. 146). Springer Nature.