1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: When using Quaternion what is w ?

  1. Dec 2, 2007 #1


    User Avatar

    When using Quaternion what is "w"?

    I think using Quaternion for my vector matrix rotation problem, but I can not find and explination of what the "W" parameter is/used for.

    Many thanks IMK
  2. jcsd
  3. Dec 2, 2007 #2
    Can you give some more info on where exactly the w parameter is used? I mean is it possible to give the formula?

    "w" can have several meanings in the theory of quaternions, p.e. the scalar part of the quaternion or the unit vector of the rotation axes. See p.e.


    Both meanings are used here (read it with care), probably you will find the explanation you need in the link.
  4. Dec 3, 2007 #3
    The time deravative of a quaternion is

    q = 1/2 (0,w)q

    Can someone please explain and derive this relationship(hint : apply an infinitesimally small rotation. )
  5. Dec 3, 2007 #4
    w stands for omega , IMK.
  6. Dec 3, 2007 #5

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    You have to be very careful when working with quaternions to represent rotations and transformations. First, there is a distinction between rotations and transformations that a lot of people don't quite grasp. A rotation represents a physical rotation of some entity around some axis. A pencil, or a top, or an aircraft can be rotated about some axis. This 3D rotation can be represented in a number of ways: A set of Euler angles (which are evil), a matrix, Rodriguez parameters, a quaternion, and others.

    Now take a vector that represents for example the direction in which a pencil is pointing. There is a distinct different between how this vector is represented and what it is. What it is doesn't change between reference frames. How it is represented does. A transformation takes the representation of this vector from one reference frame to another. A transformation is a representational change. It is not a physical change. This 3D transformation can be represented in a number of ways: A set of Euler angles (which are evil), a matrix, Rodriguez parameters, a quaternion, and others.

    The two concepts are related but are different. One way to construct a new reference frame is to take an existing reference frame and physically rotate that frame. The rotation matrix that represents the physical rotation from the old frame to the new frame and the transformation matrix that the transformation of a vector as represented in the old frame and the new frame are not equal. Instead, one is the transpose of the other.

    With quaternions things becomes even more confused. Quaternions can be represented as having a real scalar part and an imaginary 3-vector part. Quaternions can be represented as four vectors by catenating the scalar part and the vector part or by catenating the vector part and scalar part. There is no standard convention. I have seen problems arise simply because one group of people use scalar/vector and another uses vector/scalar notation. The biggest source of problems, however is with this:

    [tex]Q \bmatrix 0 \\ \vec x \endbmatrix Q^*[/tex]

    This how some rotate or transform a vector quantity with a unit quaternion. Others do this:

    [tex]Q^* \bmatrix 0 \\ \vec x \endbmatrix Q[/tex]

    In other words, does the quaternion itself go on the left or the right? Different people do use different conventions. It is silly to argue which convention is correct. It is very important when working with quaternions to be very clear on what the components of a quaternion represent, whether it represents a rotation or transformation quaternion, and whether it is a "left" or "right" quaternion.

    For example, I use the scalar/vector notation for left transformation quaternions. This is how I represent the derivative of the left transformation quaternion that transforms a vector from frame A to frame B:

    [tex]\dot Q_{A \to B} = -\,\frac 1 2 \bmatrix 0 \\ \vec \omega_{B:A \to B}\endbmatrix Q_{A \to B}[/tex]

    Why the difference in sign between the quoted post and my result above? I use left transformation quaternions. I would take it that meetscorpianque uses something else. Sign differences are one of the things that pop up all the time when different groups use different representations. Note well: I am not saying I'm right and you're wrong. I am saying one needs to be very careful.

    So, how to derive this? Start with what some call the transport theorem, which relates the time derivative of a vector quantity as seen by an observer fixed in frame A to the time derivative as seen by an observer fixed in frame B:

    [tex]\frac {d \vec u}{dt}_A = \frac {d \vec u}{dt}_B + \vec \omega_{A\to B}\times \vec u[/tex]
  7. Dec 3, 2007 #6


    User Avatar

    Oh many many thanks for all the input on this one as this is bring to the fore what I am trying to do. Basically I have a set of 3D Accelerometer force vectors that I am trying to rotate in order to align them with another set of calibration vectors from the same device.

    If anyone would like more info on what I am trying to do, and help me find the math I would really appreciated it.

    Again many thanks IMK
  8. Dec 4, 2007 #7
    Thanks for your input DH
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook