DCM - how is the order of rotation chosen?

OK, I've been puzzling over this question for a while, but I've not found an answer yet.  Perhaps the gurus here can tell me?

So when integrating the three gyros that are obviously rotating simultaneously, when you come to fuse them together to rotate your reference vector/DCM/what-have-you, which order do you choose to do it in and, more importantly, why that order?

I may have it wrong, but the APM/Premerlani/DCM code seems to choose Roll-Pitch-Yaw in that order, but what is the science behind this?

I'm assuming that to execute a turn, a fixed-wing aircraft must first roll, then (perhaps) pitch, followed by a resultant yaw, but I'm not sure if this is a good enough reason alone. (probably not)  Of course for a quadcopter, et al, this makes no sense either.

Any clues?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi andrew and William,

    The order of operations actually does matter here. There's a really good explanation on page 16-17 of Airplane Flight Dynamics and Automatic Flight Controls by Jan Roskam. Basically when multiplying non-diagonal matrices, you must do so in order. The best way to prove this is hold a paper airplane in your hand. Now rotate in yaw (about body z axis) to the left by 45deg, then pitch up (around body y axis) by 45 deg. Now restart the aircraft back to the original orientation and reverse the order. Pitch up by 45deg (in body y axis) then rotate in yaw (in body z axis) to the left by 45 deg and you'll see that the aircraft ends up in a different attitude.

    The reason for the order that we use is just a matter of standard convention as far as I know. If I were to give you a set of Euler angles you would know the aircraft attitude relative to the earth if you follow this process. First rotate in yaw from North by the heading angle, then rotate in pitch, then rotate in roll. When you're trying to go from sensors onboard, which measure in body axes, back to earth fixed coordinates, you reverse the order and rotate in roll, then pitch, then yaw.

    Hope this helps.

  • T3

    Andrew,

    One more comment, because I realize my comment regarding "symmetry" might be confusing. So, a bit more clarification.

    The matrix itself is not necessarily symmetric. What I mean by symmetry in the matrix calculations is that the calculations take the same form for each axis, and that there is no "ordering" in the multiplication of two matrices. The primitive multiplications and addition steps involved in performing the multiplication of two matrices can be done in any order whatsoever, and the result will be the same.

    Best regards,

    Bill

  • T3

    Andrew,

    One more thought on the subject....

    The use of the rotation matrix frees you up entirely from Euler roll-pitch-yaw angles, which are not symmetric. The labeling of the gyro signals as "roll-pitch-yaw" is not the same thing as the Euler roll-pitch-yaw angles.

    Best regards,

    Bill

  • T3

    Hi Andrew,

    The rotation of the matrix is computed by multiplying two matrices, so there is no preference given to roll, pitch or yaw. The matrix multiplication operation is perfectly symmetric with respect to roll, pitch, and yaw.

    Of course, you have to build up the rotation matrix before you you can do the matrix multiply, but it makes no difference what order you compute the elements of the matrix since the elements are independent.

    Best regards,

    Bill

     

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…