DCM versus quaternions

388 views
Skip to first unread message

William Premerlani

unread,
Jan 7, 2012, 11:10:45 AM1/7/12
to uavdevboard
Team,

I am starting a new thread on this subject....

See my recent comments on diydrones regarding the recent post on quaternions.

DCM and quaternion representations are entirely equivalent. You can transform back and forth. There is no difference in accuracy or transient response.

In the present version of MatrixPilot, I actually use both representations. In my opinion, in most cases, DCM is the most convenient representation to use for most of the computations we do in MatrixPilot, but there are a couple of places were quaternions are more convenient, so I do the conversion.

Computing quaternions is a little bit more efficient computationally than DCM, but in MatrixPilot the amount of CPU power used on computing DCM is less than 1%. The largest CPU loads are from communications and A/D conversion.

As a minor point, I note that it is not necessary to do either divide or square root in the renormalization process for either DCM or quaternions. You can use a Taylor's expansion instead.

Also, when I first started out, I was careful not to use divide or square root very much in MatrixPilot, because divide takes 17 CPU cycles, and square root takes a lot more than that. But we found that the architecture of MatrixPilot and the PIC that we are using are very efficient with regard to CPU loading. The single CPU on the UDB4 is currently at about 10% loading, and it is doing the work of the 3 CPUs in the latest version of the Ardu system.

Best regards,
Bill Premerlani

markw

unread,
Jan 7, 2012, 12:04:56 PM1/7/12
to uavde...@googlegroups.com
Bill,

I agree with you on the convenience of using a rotation matrix for orientation representation. 

I made the same choice for my thesis research code which calculated the pose (position and orientation) of a mining vehicle from two stereo video streams. I was chaining sequences of small rotations estimated between successive stereo pairs taken at 30Hz, and it worked rather well.

--markw

William Premerlani

unread,
Jan 7, 2012, 12:12:23 PM1/7/12
to uavde...@googlegroups.com
Hi Mark,
Is your thesis available online? I would enjoy reading it.
Best regards,
Bill

Anish Mohammed

unread,
Jan 7, 2012, 12:22:35 PM1/7/12
to uavde...@googlegroups.com
Hi Mark,
 I too would be interested.
Regards
Anish

Anish Mohammed
Twitter: anishmohammed
http://uk.linkedin.com/in/anishmohammed

markw

unread,
Jan 7, 2012, 12:52:13 PM1/7/12
to uavde...@googlegroups.com
Bill and Anish,

Wow, my readership just doubled!

I haven't tried this before, but it seems pretty simple: markw's thesis

Looking at the snapshots of 3D models in my thesis now I wonder why I didn't use stereo pairs; you really need a 3D viewer to convey the shape.

Let me know if the link doesn't work,
--markw
Reply all
Reply to author
Forward
0 new messages