2 12 orientation parameters
play

2.12 Orientation Parameters We have seen that a rotation is a - PDF document

52 Basilio Bona - Dynamic Modelling The vector x is simply obtained taking the first three elements of the last column of T p 1 t 1 t x p 2 t 2 (2.68) p 3 t 3 Figure 2.16: Dato T calcolare p .


  1. 52 Basilio Bona - Dynamic Modelling The vector x is simply obtained taking the first three elements of the last column of T     p 1 t 1  ⇐  ≡ t   x ≡ p 2 t 2 (2.68) p 3 t 3 Figure 2.16: Dato T calcolare p . Notice that in this way the obtained coordinates are relative to the origin of the reference frame described by T ; if we need to compute the coordinates of a different geometrical point, we should characterize this new point as a vector in R B and transform it using eqn. (2.55). To compute α from R it is necessary to define the physical meaning of the three components α i of α . We assume to use the Euler angles or the RPY angles. It exists the inverse nonlinear function α E = g − 1 E ( R ) that gives the Euler angles from the elements r ij of a rotation matrix R (2.73), and another inverse nonlinear function α RPY = g − 1 RPY ( R ) that gives the RPY angles from the elements r ij of a rotation matrix R (2.77). The inverse solution, if exists, could be non unique, since a finite number of angles α may exist that produce the same rotation matrix R . Since inverse trigonometric functions are involved, we consider as equaivlent solutions those that differ for integer multiples of 2 π . In the following Section we will illustrate the most used ways to characterize the orientation of a rigid body in space. 2.12 Orientation Parameters We have seen that a rotation is a geometrical transformation acting on R 3 , defined by a orthonormal matrix R . At the same time the orientation of a rigid body, with a local reference frame attached to it, is represented by the rotation of the local frame with respect to the world or global frame. We conclude that it is equivalent to speak of the orientation of a rigid body or of its reference frame with respect to

  2. 53 Basilio Bona - Dynamic Modelling some other “fixed” frame Body B Orientation ⇔ Rotation Matrix R B We recall that a rotation is characterized by only three parameters, and all the repre- sentation described in this section will be a different way to “organize” such param- [ ] T , eters; in eqn. (2.65) these three parameters were indicated as α = α 1 α 2 α 3 but there are other parameterizations that use more than three parameters, as the quaternions, introduced in Section 2.12.6. Another example comes from the Euler theorem, that states that any composition of rotations is always a rotation of an angle θ around an axis defined by a unit vector u ; therefore we can represent a ro- tation by the set ( u , θ ), where u has two free parameters, since there is an implicit constraint ∥ u ∥ = 1), and the third one coincide with θ . Other authors use a non unit vector v , whose norm provides the angle value ∥ v ∥ = θ . Now we describe the most common forms used to represent the orientation of a rigid body in R 3 . 2.12.1 Direction Cosines Direction cosines are nothing else that the rotation matrix R itself. Indeed R contains in its columns (or rows) the representation of the unit basis vectors of the local frame with respect to the world frame. This representation needs nine parameters that must obey to six unit norm orthogonality constraints. In this [ ] T are hidden in R but can be extracted using the case the parameters α 1 α 2 α 3 equations (2.12.2) e (2.12.3). 2.12.2 Euler Angles Historically this is the first representation of the orientation of a body: it associates to α 1 , α 2 , α 3 three angles, called Euler angles and usually denoted by φ, θ, ψ . To understand how to build the Euler angles it is necessary to define them through an implicit procedure. The orientation of a mobile reference frame R m described by the Euler angles is obtained by three successive rotations around the principal axes, following a precise rule First rotation, angle φ   c φ − s φ 0   R z,φ ≡ R ( k , φ ) = s φ c φ 0 0 0 1 rotation of an angle φ around the local (mobile) axis z .

  3. 54 Basilio Bona - Dynamic Modelling Second rotation, angle θ   1 0 0   R x,θ ≡ R ( i , θ ) = 0 c θ − s θ 0 s θ c θ rotation of an angle θ around the local (mobile) axis x . Third rotation, angle ψ   c ψ − s ψ 0   R z,ψ ≡ R ( k , ψ ) = s ψ c ψ 0 0 0 1 rotation of an angle ψ around the local (mobile) axis z . Using the rule “pre–fixed” “post–mobile” we compute the complete rotation matrix based on the Euler angles as R ( φ, θ, ψ ) ≡ R z,φ R x,θ R z,ψ ≡ R ( k , φ ) R ( i , θ ) R ( k , ψ ) =   c φ c ψ − s φ c θ s ψ − c φ s ψ − s φ c θ c ψ s φ s θ   s φ c ψ + c φ c θ s ψ − s φ s ψ + c φ c θ c ψ − c φ s θ (2.69) s θ s ψ s θ c ψ c θ This composition rule is not unique in technical literature, since many textbooks adopt a slightly different convention: the second rotation around the x axis is re- placed by a rotation around the mobile axis y , producing a different “Euler” matrix: � R ( φ, θ, ψ ) ≡ R z,φ R y,θ R z,ψ ≡ R ( k , φ ) R ( j , θ ) R ( k , ψ ) =   − s φ s ψ + c φ c θ c ψ − s φ c ψ − c φ c θ s ψ c φ s θ   c φ s ψ + s φ c θ c ψ c φ c ψ − s φ c θ s ψ s φ s θ (2.70) − s θ c ψ s θ s ψ c θ In this notes we will always adopt the first form (2.69), but we recall that in many aerospace engineering textbooks the form (2.70) is widely used. The above formulas are also called direct relations , since, given the three Euler angles they compute the rotation matrix R ( φ, θ, ψ ). The inverse relation, i.e. how to compute the Euler angles given an generic R matrix is solved considering the generic elements of a matrix, provided it is orthonormal   r 11 r 12 r 13   , R = (2.71) r 21 r 22 r 23 r 31 r 32 r 33 where the elements r ij are known. To obtain the Euler angles it is necessary to solve

  4. 55 Basilio Bona - Dynamic Modelling the following nonlinear equation system: r 11 = c φ c ψ − s φ c θ s ψ r 12 = − c φ s ψ − s φ c θ c ψ r 13 = s φ s θ r 21 = s φ c ψ + c φ c θ s ψ r 22 = − s φ s ψ + c φ c θ c ψ (2.72) r 23 = − c φ s θ r 31 = s θ s ψ r 32 = s θ c ψ r 33 = c θ that has the following generic solution θ = ± arccos ( r 33 ) ± 2 kπ ( r 32 ) ψ = ± arccos ± 2 kπ (2.73) s θ ( − r 23 ) φ = ± arccos ± 2 kπ s θ Unfortunately this solution presents some drawbacks 1. the inverse trigonometric function arccos( · ) is not unique: indeed cos( θ ) = cos( − θ ); 2. the solution becomes not definite for r 33 = 1, i.e., when s θ = 0; in this case the angles φ and ψ are not uniquely known; only their sum is given; 3. when θ → 0 ◦ or θ → ± 180 ◦ , the second and the third equations provide inac- curate solutions, since the numeric accuracy of the arccos( · ) function depends on the angle value. To solve these drawbacks, instead of arccos( · ) it is customary to use the function atan2 ( y, x ), that is available in all the mathematical libraries of the most used computer languages. It is definite as: θ = atan2 ( y, x ) = tan − 1 ( y ) = x  0 ◦ 90 ◦ ≤ ≤ if x ≥ 0; y ≥ 0  θ  (2.74)  90 ◦ 180 ◦ ≤ θ ≤ if x ≤ 0; y ≥ 0 = − 180 ◦ − 90 ◦ ≤ ≤ if x ≤ 0; y ≤ 0  θ   − 90 ◦ 0 ◦ ≤ θ ≤ if x ≥ 0; y ≤ 0 Moreover, by default, atan2 (0 , 0) = 0.

  5. 56 Basilio Bona - Dynamic Modelling Using this function, the solution to (2.72) is: φ = atan2 ( r 13 , − r 23 ) ± 2 kπ ψ = atan2 ( − c φ r 12 − s φ r 22 , c φ r 11 + s φ r 21 ) ± 2 kπ (2.75) θ = atan2 (s φ r 13 − c φ r 23 , r 33 ) ± 2 kπ Euler angles singularity We observe that when r 33 = 1 the matrix R ( φ, θ, ψ ) is equal to the elementary matrix R ( k , γ ), that is function of a single angle. In this case we say that the Euler representation is singular ; from the three possible angles we can obtain only two angles; from (2.73) we have θ = 0 , and the product R ( k , φ ) R ( i , θ ) R ( k , ψ ) reduces to R ( k , φ ) R ( k , ψ ) = R ( k , ( φ + ψ )) from which we have γ = ( φ + ψ ); we cannot compute separately the two angles phi and ψ , but only their sum. This situation is described saying that θ does not decouple any more the other two rotations and so a singular configuration is produced. 2.12.3 RPY Angles Also in the case of Roll-Pitch-Yaw angles (RPY for short) θ x , θ y , θ z it is necessary to define them through an implicit procedure. The orientation of a mobile reference frame R m described by the RPY angles is obtained by three successive rotations around the principal axes, following a precise rule First rotation, angle θ x   1 0 0   R x,θ x ≡ R ( i , θ x ) = 0 c θ x − s θ x 0 s θ x c θ x rotation of an angle θ x around the world (fixed) axis x . Second rotation, angle θ y   c θ y 0 s θ y   R y,θ y ≡ R ( j , θ y ) = 0 1 0 − s θ y 0 c θ y rotation of an angle θ y around the world (fixed) axis y . Third rotation, angle θ z   c θ z − s θ z 0   R z,θ z ≡ R ( k , θ z ) = s θ z c θ z 0 0 0 1

Recommend


More recommend