Dynamics II

MEC3403


Orientation


The rotation matrix is made up of the three mutually orthogonal unit vectors that are the basis vectors of the final frame.  These are often denoted by n, o and a

But what does the transformation 'mean'?

Let us consider orientation from the point of view of an aircraft.  We are flying straight and level in the x-direction, the left wing is in the y direction and the z-direction is straight up through the cabin roof.

So we start off with the aircraft axes lined up with the reference axes.

Consider a rotation about the z axis, changing the heading of the aircraft.  This is called the azimuth or yaw axis.

The reference axes, frame 0, is our usual one.

The rotated axes, frame 1, are rotated through an angle a1 (from East towards North).

So if we start with a point with coordinates (x1, y1, z1)T relative to frame 1, its frame 0 coordinates are given by

x0 = x1 cos a1 - y1 sin a1

y0 = x1 sin a1 + y1 cos a1

z0 = z1

So if we write cos a1 as c1 and sin a1 as s1, then in matrix form we have

      
x0
y0
z0
=
 c1 -s1  0
 s1  c1  0
 0    0   1

x1
y1
z1

'Pitch' is a rotation about the aircraft's y axis through the wings, a positive rotation bringing the nose of the aircraft down.  If this is the second transformation we have

      
x1
y1
z1
=
c2  0   s2
  0   1   0
-s2  0  c2

x2
y2
z2

'Roll' is a rotation about the length of the aircraft, its x axis.  A positive roll will bring the left wing up.
For the third transformation we have

      
x2
y2
z2

=
1   0   0
0  c3 -s3
0  s3  c3

x3
y3
z3

Putting the first two transformations together we have

      
x0
y0
z0
=
 c1c2 -s1 c1s2
 s1c2  c1 s1s2
  -s2    0    c2

x2
y2
z2

and working in the third gives

      
x0
y0
z0
=
 c1c2  -s1c3+c1s2s3   s1s3+c1s2c3
 s1c2   c1c3+s1s2s3  -c1s3+s1s2c3
-s2           c2s3              c2c3 

x3
y3
z3

Having multiplied a string of elementary rotation transformations we have found the orientation as this general 3x3 rotation matrix, rather than as the three angles of azimuth, pitch and roll.

Can we unravel the matrix to get the three angles?

The ratio of the top two terms in the first column will give a value for cot a1, the ratio of the second and third terms in the bottom row will give tan a3 and by some squaring and adding we have two ways to find the magnitude of the cosine of a2, while -sin a2 can be seen at the foot of the first column.  Take care, though, because we need to know the signs of the sines and cosines to be sure of the quadrant.

We can find expressions for the 'inverse kinematics', but they are not necessarily unique.

Ambiguity

Have a look at these examples of rotating axes and a rotating cube.  As you slide the mouse along the control bars, you see the effect of changing the pitch, roll and yaw angles.  Pull all three angles to the right, so that all three angles are 180 degrees.  What is the value of the transformation matrix?

Try the same exercise on your own hand.  Hold your upper arm forwards, your forearm and your hand upwards, as though you are stopping traffic.  You are looking at the back of your hand.

Now rotate in pitch by bending your wrist and elbow down, so that your fingers are downwards and you can see the palm of your hand.

Rotate in roll by rotating your forearm outwards - your fingers are now upwards and you are looking at your palm.

Finally rotate in yaw, turning your hand so that you are again looking at the back.

After these three 180 degree manoeuvres you are back where you started, just like the simulation..