• No results found

ua =Rabb+ ˙Rabub =Rab[ ˙ub+S(ωbab)ub], (2.10) where the propertyR˙ab =RabS(ωbab)has been exploited.

Differentiation of vectors

The process of differentiating a vector~uwith respect to time has to be carried out with reference to some reference frame. Differentiating ~u with respect to time in the{a}-frame yields (Egeland and Gravdahl, 2003)

ad

The time derivative of~uwith reference to{a}may also be found accordingly

ad

The attitude of a rigid body may be represented using different parametriza-tions. In this section, four different parametrizations are presented; the rotation matrix, the Euler angles, the angle-axis, and the unit quaternions.

8 Chapter 2. Theory

2.2.1 Rotation matrix

When deriving the equations of motion for a spacecraft, it is often convenient to represent a vector in more than one coordinate frame and to transform vectors between various frames. A vector represented in frame{a}may be transformed, or rotated, to a vector in frame {b} using a rotation matrix, denoted Rba. The rotation matrix Rba has two interpretations; the first is to transform a vector between two reference frames, where Rba acts as a coordinate transformation matrix, and the second is to rotate a vector within a given reference frame, where Rba acts as a rotation matrix. The coordinate transformation of a vector from frame {a} to a vector in frame {b} is given as (Egeland and Gravdahl, 2003)

vb =Rbava, (2.14)

where the rotation matrix is

Rba={~bi ·~aj}, (2.15) and the elementsrij ={~bi·~aj}of Rbaare called the direction cosines. The rota-tion matrix is sometimes also referred to as the orientarota-tion matrix, the attitude matrix, or the direction cosine matrix (Wen and Kreutz-Delgado, 1991).

Definition of the rotation matrix

The rotation matrix is an element in the special orthogonal group of order three, i.e.,SO(3), defined as (Egeland and Gravdahl, 2003)

SO(3),{R|R∈R3×3, Ris orthogonal, det(R) = 1}, (2.16) and the orthogonality of a matrix is defined as

RR> =R>R=I3×3, (2.17) where I3×3 is the identity matrix.

Properties of the rotation matrix

Egeland and Gravdahl (2003) presents some useful properties of the rotation matrix. For allvb the following holds

vb =Rbava=RbaRabvb, (2.18) which implies

RbaRab =I3×3, (2.19)

Chapter 2. Theory 9 and from (2.19) it follows that

Rba = (Rab)1. (2.20)

The rotation matrix also satisfies the following

Rba = (Rab)1 = (Rab)>. (2.21)

2.2.2 Euler angles

The3×3-rotation matrix describes the orientation of a frame {b}with respect to a frame {a} using nine elements. The rotation matrix is orthogonal, and the orthogonality yields six constraints on the elements of the matrix. From the six constraints, it follows that there are only three independent parameters describing the rotation matrix (Egeland and Gravdahl, 2003). Thus, it is of interest to find a three-parameter representation, i.e., a minimal representation, of the rotation matrix. The Euler angles are often used for this purpose.

The Euler angles consist of three angles, and each angle describes rotation about one of the three principal axes. The description of the rotation matrix using Euler angles, is given as composite rotations about thex, y, and z axes.

Several variations of the Euler angle parametrization exist, and two of the most common include the roll-pitch-yaw angles (ZYX) and the classical Euler an-gles (ZYZ) (Egeland and Gravdahl, 2003; Sciavicco and Siciliano, 2012). The roll-pitch-yaw angles are often used to describe the motion of free moving ob-jects, for instance, spacecraft and satellites, whereas the classical Euler angles are used to describe the rotation of rigid bodies connected to a fixed base, for instance, robotic wrist joints (Egeland and Gravdahl, 2003).

Roll-Pitch-Yaw angles

The rotation from {a} to {b} can be described by roll-pitch-yaw angles as a rotationψabout theza-axis (yaw), followed by a rotationθabout the rotatedya -axis (pitch), and then a rotationφabout the rotatedxa-axis (roll). The resulting rotation matrix is given as (Egeland and Gravdahl, 2003)

Rba =Rz(ψ)Ry(θ)Rx(φ), (2.22) where the rotation matrices are given as (Egeland and Gravdahl, 2003; Fossen, 2021)

10 Chapter 2. Theory

Kinematic differential equations using Euler angles

It is not possible to integrate the body-fixed angular velocity of an object di-rectly to obtain the Euler angles (Fossen, 2021). Instead, the kinematic relation between the object’s angular velocities and the rate of change in the Euler an-gles are exploited to obtain the Euler anan-gles.

The rotation matrix from{d}to {a},Rad, can be expressed in the roll-pitch-yaw case as (Egeland and Gravdahl, 2003)

Rad=Rz(ψ)Ry(θ)Rx(φ), (2.24) where the rotation matrices are given as

Rab =Rz(ψ), (2.25a)

Rbc=Ry(θ), (2.25b)

Rcd=Rx(φ). (2.25c)

The angular velocities associated with the rotations in (2.25) are

ωaab=

Chapter 2. Theory 11 whereωaba denotes the angular velocity of{b}with respect to {a}, expressed in {a}. The angular velocity of {d} with respect to {a}, expressed in{a}, can be expressed as a sum of the angular velocities in (2.26)

ωaad = deriva-tive of the Euler angles, andT−1a (Θ)denotes the inverse of the transformation matrixTa(Θ). Solving (2.27) forΘ˙ gives the kinematic differential equation

Θ˙ =Ta(Θ)ωaad. (2.28) sin-gularity is called theEuler angle singularity, and it could be a challenge when representing attitude using Euler angles. For any sequence of Euler angles, i.e., ZYX or ZYZ, the singularity occurs in the middle angle. To avoid the singular-ity, at least four parameters have to be used to represent the attitude (Fossen, 2021).

2.2.3 Angle-axis

Rotation may also be represented using the angle-axis parametrization. It can be useful to apply the angle-axis parametrization when developing, for in-stance, kinematic models for use in control systems (Egeland and Gravdahl, 2003). Using angle-axis parametrization, it is possible to describe the rotation from {b} to{a}as an angle θ about a unit vector~k fixed in both {a} and {b}. The angle-axis parametrization of the rotation matrix,Rab, is given as (Egeland and Gravdahl, 2003)

Rab =cos(θ)I+S(ka)sin(θ) + (1−cos(θ))ka(ka)>, (2.30) wherekais the coordinate vector of~k in frame{a}.

12 Chapter 2. Theory

2.2.4 Quaternions

The unit quaternions, also known as the Euler parameters, use four parameters to represent attitude. The use of four parameters ensures that the representa-tion is nonsingular for all angles, as opposed to the Euler angles (Fossen, 2021;

Egeland and Gravdahl, 2003). It is convenient to use quaternions to describe the attitude of a spacecraft, as opposed to Euler angles, since the spacecraft moves freely in space and would be affected by the Euler angle singularity.

Moreover, the quaternions are useful in numerical simulations of rotation, as they are more computationally efficient than the Euler angles.

The quaternion,q, can be written as (Egeland and Gravdahl, 2003; Fossen, 2021; Sola, 2017; Chou, 1992)

where η and are given in terms of the angle-axis parameters kand θ, which are discussed in Section 2.2.3, as follows

η=cos(θ

2), (2.32a)

=ksin(θ

2). (2.32b)

The unit quaternion has several properties. One of the properties is that the unit quaternion satisfies the following condition (Egeland and Gravdahl, 2003;

Fossen, 2021)

q>q= 1, (2.33)

which may be expanded to

η2+>2+21+22+23 = 1. (2.34) Another property of the unit quaternion, is the quaternion product between two quaternions, and it is given as (Egeland and Gravdahl, 2003; Fossen, 2021;

Sola, 2017; Chou, 1992)

Chapter 2. Theory 13 Additionally, the inverse quaternion, corresponding to the unit quaternionq in (2.31), is given as (Egeland and Gravdahl, 2003; Fossen, 2021; Sola, 2017;

Chou, 1992)

q−1 = η

. (2.37)

A drawback with the unit quaternions is that they do not represent attitude uniquely since each attitude corresponds to two different quaternion vectors (Chaturvedi et al., 2011). To put it more precisely, a physical attitude R ∈ SO(3) is represented by a pair of quaternions ±q ∈ S3, where SO(3) is the special orthogonal group discussed in Section 2.2.1 andS3 is the non-Euclidean three-sphere (Chaturvedi et al., 2011).