Axes systems, orientation and motion notation

download Axes systems, orientation and motion notation

of 29

Transcript of Axes systems, orientation and motion notation

  • 8/9/2019 Axes systems, orientation and motion notation

    1/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    Axes Systems, Orientation and Motion Notation

    Learning Outcomes

    By the end of this session the student should be able to:

    Describe the inertial and body axes systems.

    Define Euler angles and describe their use in axis transformations.

    Distinguish when to use alternative methods for defining vehicle orientation.

    Describe the quaternion method of axis transformation.

    Describe the standard motion variables and control surface notation.

    1 IntroductionAir-vehicle motion can be conveniently described by a number of variables that are related to asuitably chosen system of axes. In the United Kingdom the generally adopted scheme of notation,axes systems and transformation matrices are defined in a series of datasheets produced by theEngineering Science Data Unit (ESDU 67001, (alias?), ESDU 67003 and ESDU 98024). The systemis based on the notation previously proposed by Hopkins [1966]. The process of model buildingcan be made orderly and consistent by making the appropriate choice of axis system and utilisingstandard motion and control variable notation. For aerial navigation the vehicles motion relativeto the earth is estimated from measurements taken on-board. For flight simulation purposes, boththe motion of the vehicle relative to the earth, and its orientation in space are required in order

    to provide the appropriate visual display of the vehicles response. Sensors in the air-vehicle, suchas accelerometers and rate gyros, measure the motion characteristics relative to axes fixed withinthe airframe. In general, three accelerometers aligned along each axis measure the components ofabsolute linear time-varying acceleration, including the Coriolis acceleration and gravity generatedby the changing vehicle orientation in space. Three rate gyros measure components of vehicle angularvelocities about each of these fixed axes. To estimate vehicle motion in relation to the earth requiresconversion of this on-board information using either Euler angles or quaternions. Initially the Eulerangle method of axis and motion parameter conversion is addressed before outlining the quaternionmethod. The quaternion method is defined in terms of four parameters that can be shown to beequivalent to an alternative set of Euler angle transformations. Expressions are developed for thebody angular velocities in terms of quaternion parameters and then in terms of the rates of change

    of the quaternion parameters themselves.

    2 Axes Systems

    2.1 Earth Centred

    For the purposes of normal atmospheric flight, air-vehicle motion can be measured with reference toan earth fixed framework. The accepted convention for defining earth axes, and reproduced here fromESDU 98024 and Cook [2007], determines that a reference point O0on the surface of the earth is theorigin of a right-handed orthogonal system of axes (Ox0, Oy0, Oz0), where Ox0 points to the north,Oy0 points to the east and Oy0 points vertically down along the gravity vector toward the centre of

    the earth, see Figure 1. The plane (O0

    , x0

    , y0

    ) defines the local horizontal plane which is tangentialto the surface of the earth. Therefore, the flight path of an aircraft flying in the atmosphere in thevicinity of the reference point O0 may be completely described by its co-ordinates in the axis systemassuming a flat earth, where the vertical is aligned with the gravity vector.

    Axes Systems

    January 13, 2011

    Page 1

  • 8/9/2019 Axes systems, orientation and motion notation

    2/29

    School of Engineering

    Aerospace Dynamics MSc

    Figure 1: Conventional earth axes

    2.2 Body Fixed

    It is usual practice to define a right-handed orthogonal body-fixed axis system (O x, Oy Oz) fixed ina rigid air-vehicle. For simple simulations it is convenient to make the origin, O, coincident with thecentre of gravity (cg). It is also normal convention to use the subscript b to identify that the axissystem is body fixed. The fore/aft,xb, and vertical, zb, plane typically defines the plane of symmetryof the aircraft, with the x-axis directed toward the nose, the y-axis pointing to starboard (to theright) and the z-axis directed downwards, see Figure 2.

    Another system that is in common use is the stability or wind axis system, conventionally iden-tified by subscript w. It is another right-handed axis system however the Oxw axis is aligned withthe aircrafts total velocity vector and as such it is the conventional axis system for measuring windtunnel data which, longitudinally is specified in terms of lift and drag (forces perpendicular and

    parallel to the air stream respectively). The wind axes orientation in the airframe changes withaircraft incidence and so is usually different for each flight condition. However, for any given flightcondition the wind axes orientation is defined and can be fixed in the aircraft at trim. It will thenbe constrained to move with it during any subsequent disturbance.

    3 Aircraft Orientation

    3.1 Euler (Attitude) Angles

    The position of an air-vehicle in space may be specified by the aircrafts attitude and by the location

    of a fixed point, typically the body axes centre, relative to the earth. The attitude of an aircraft isdefined as the angular orientation of the body axes (Oxb, Oyb Ozb) with respect to the moving earthaxes (Ox0, Oy0, Oz0). The angles defined by the right-handed rotation about the three axes of aright-handed system of axes are called the Euler angles and are defined as yaw angle, , pitch angle,

    Page 2 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    3/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    Figure 2: Body-fixed axes

    , and bank angle, (ESDU 67003), see Figure 3. It can help in an appreciation of these angles

    to consider a sequence of plane rotations from the axes (Ox0, Oy0, Oz0), through two intermediateaxes, (Ox1, Oy1, Oz1), and (Ox2, Oy2, Oz2), to the final axes (Oxb, Oyb, Ozb) defined as follows.With reference to Figure 4, starting with the (Ox0, Oy0, Oz0) axis system:

    1. Rotate about the vertical axis Oz0 through a yaw angle, , to (Ox1, Oy1, Oz1);

    2. Rotate about horizontal axis Oy1 through a pitch angle, , to (Ox2, Oy2, Oz2);

    3. Rotate about axis Ox2 through a roll angle, , to (Oxb, Oyb, Ozb).

    It is important that this specific sequence of rotations (, , ) is followed if the correct transformationis to be achieved.

    3.2 Axes Transformations and the Direction Cosine Matrix

    An important element within aircraft simulation is the transformation of both linear and angularmotion variables and related parameters, such as accelerations, velocities and displacements, fromone system of axes to another.

    3.2.1 Linear Motion Transformation

    Angular relationships that are used to describe aircraft attitude may be generalised to describe theangular orientation of one set of axes with respect to another. A convenient way to express this is interms of direction cosines. Referring again to Figure 4 and treating each rotation separately:Rotate about the vertical axis Oz0 through a yaw angle, , to (Ox1, Oy1, Oz1):

    Ox1Oy1Oz1

    =

    cos sin 0 sin cos 0

    0 0 1

    Ox0Oy0

    Oz0

    = T

    Ox0Oy0

    Oz0

    (3.1)

    Axes Systems

    January 13, 2011

    Page 3

  • 8/9/2019 Axes systems, orientation and motion notation

    4/29

    School of Engineering

    Aerospace Dynamics MSc

    Figure 3: Definition of Euler angles

    Figure 4: Axes transformations

    Page 4 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    5/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    Rotate about horizontal axis Oy1 through a pitch angle, , to (Ox2, Oy2, Oz2):

    Ox2Oy2

    Oz2

    =

    cos 0 sin 0 1 0

    sin 0 cos

    Ox1Oy1

    Oz1

    = T

    Ox1Oy1

    Oz1

    (3.2)

    Rotate about axis Ox2 through a roll angle, , to (Oxb, Oyb, Ozb):

    OxbOyb

    Ozb

    =

    1 0 00 cos sin

    0 sin cos

    Ox2Oy2

    Oz2

    = T

    Ox2Oy2

    Oz2

    (3.3)

    By repeated substitution, Equations 3.1, 3.2 and 3.3 may be combined to give the required trans-formation matrix, T containing nine direction cosines, known as the Direction Cosine Matrix(DCM):

    T =

    cos cos cos sin sin cos sin + sin sin cos cos cos + sin sin sin sin cos

    sin sin + cos sin cos sin cos + cos sin sin cos cos

    The DCM is often written in the form:

    T =

    cc cs scs+ssc cc+sss sc

    ss+csc sc+css cc

    (3.4)

    As the transformation matrix is orthogonal and normal:

    T T1

    = T T

    T = I

    Since the subscript notation, , indicates transformation of a vector from one system to anotherthe reverse notation, , indicates the opposite. So:

    T =T1

    = TT

    Hence, the transformation of translational components such as velocity and force in earth axes,x0y0z0, to body axes, xbybzb can be achieved by:

    xyz

    b

    =T x0y0

    z0

    e

    ==T x0y0

    z0

    e

    (3.5)

    Likewise, the inverse relationship, giving earth axes components in terms of body axes componentsis:

    x0y0

    z0

    e

    =TT

    xy

    z

    b

    (3.6)

    3.2.2 Angular Motion Transformation

    Euler angles are also used to transform angular motion variables between axes systems. Figure 5shows the relationship between the angular body axis rates, p, q, r and the Euler rates, , , .Hence, the angular velocities of the air-vehicle in terms of the rates of change of yaw, pitch and roll

    Axes Systems

    January 13, 2011

    Page 5

  • 8/9/2019 Axes systems, orientation and motion notation

    6/29

    School of Engineering

    Aerospace Dynamics MSc

    Figure 5: Definition of Euler rates

    angles are:

    = rate of change of yaw about Oz0 = rate of change of pitch about Oy1 = rate of change of roll about Ox2 rate of change of roll about Oxb

    The rate of change of bank angle is already related to the vehicles body-axis roll rate, p, definedin the axis system (Oxb, Oyb, Ozb) and so no conversion is necessary. Both the pitch and yaw ratesrequire conversion from axis systems (Ox1, Oy1, Oz1) to (Oxb, Oyb, Ozb) and from (Ox0, Oy0, Oz0)to (Oxb, Oyb, Ozb) respectively. Thus in terms of the transformation matrices T and T:

    pqr

    = 00

    + T 0

    0

    + TT 00

    Substituting Equations 3.2 and 3.3 for the transformation matrices gives:

    pq

    r

    =

    10

    0

    +

    0cos

    sin

    +

    1 0 00 cos sin

    0 sin cos

    sin 0

    cos

    Hence:

    pq

    r

    =

    1 0 sin 0 cos sin cos

    0 sin cos cos

    = LB

    E

    Page 6 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    7/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    Euler attitude rates in terms of the body rates required for the equations of motion can be obtainedby inverting the above transformation matrix, see Appendix A: Therefore:

    =

    1 sin tan cos tan

    0 cos sin 0 sin sec cos sec

    p

    qr

    = LE

    B

    p

    qr

    (3.7)

    Note that = p only when = 0 and = qonly when= 0. Analysis of Equation 3.7 shows clearlythat as 90 both tan and sec causing a singularity. This can cause problemswhen simulating high agility vehicles as the expressions for and become indeterminate. Hence,for air-vehicles which perform post-stall manoeuvring and aerobatics, an alternative formulation isrequired so that the derivation of the aircraft attitude angles is robust.

    3.3 Quaternions

    A practical alternative for defining the orientation of an aircraft, which avoids the mathematical

    singularity, is to use four parameters or quaternions (ESDU 98024). A quaternion, denoted bye,is composed of four parts and defined by:

    e= e0+e1+e2+e3

    where , and are operators such that:

    = 1 = = = 1 = = = 1 = =

    the quaternion has a conjugate, e, and magnitude, or norm ||e||, given by:

    e =e0 e1 e2 e3 ||e|| =ee =ee= e2

    0+e2

    1+e2

    2+e2

    3

    Now a quaternion with a length of unity can be used to describe a co-ordinate transformation. Thus

    if||e|| = 1 and Q = X+ Y +Zthen the operation e

    Qe represents a coordinate transformationfrom one axes system to another. So:

    Q = eQe

    Q = (e0 e1 e2 e3) ((X+Y +Z) (e0+e1+e2+e3)

    which leads to, see Appendix B.1:xy

    z

    b

    =

    (e

    20

    +e21

    e22

    e23

    ) 2(e1e2+e0e3) 2(e1e3 e0e2)2(e1e2 e0e3) (e

    20

    e21

    +e22

    e23

    ) 2(e2e3+e0e1)2(e1e3+e0e2) 2(e2e3 e0e1) (e

    20

    e21

    e22

    +e23

    )

    x0y0

    z0

    e

    (3.8)

    given that:

    e2

    0+e2

    1+e2

    2+e2

    3= 1 (3.9)

    As there are four parameters describing the orientation when only three are strictly necessary; Equa-tion 3.9 becomes a constraint equation. Also from Appendix B.2 we can write:

    e0 = cos

    2cos

    2cos

    2+ sin

    2sin

    2sin

    2 (3.10)

    e1 = sin

    2cos

    2cos

    2 cos

    2sin

    2sin

    2 (3.11)

    e2 = cos

    2sin

    2cos

    2+ sin

    2cos

    2sin

    2 (3.12)

    e3 = cos

    2

    cos

    2

    sin

    2

    sin

    2

    sin

    2

    cos

    2

    (3.13)

    These expressions are necessary to derive initial values for the quaternion parameters when the Eulerangles, , , are known. This usually occurs at initialisation when the simulation starts from aknown trim condition.

    Axes Systems

    January 13, 2011

    Page 7

  • 8/9/2019 Axes systems, orientation and motion notation

    8/29

    School of Engineering

    Aerospace Dynamics MSc

    3.3.1 Quaternion Differential Equations

    We have seen that the four quaternion parameters can be initialised from the Euler angles and thenused to compute the nine elements of the DCM. The linear differential equations that allow the

    quaternions to be propagated forward in time can be determined using Equations 3.7 and 3.8, seeAppendix B.3:

    e0e1e2e3

    = 12

    0 p q rp 0 r qq r 0 pr q p 0

    e0e1e2e3

    (3.14)

    Which provide the means to generatee0, e1, e2, e3 from the body axis components of angular velocityp, q, andr and therefore can be used in place of Euler equations derived previously. The body angularrates about all three axes may be provided by the air-vehicles rate gyros.

    3.3.2 Quaternion Error Correction

    It may be necessary to correct the tendency for the quaternion integration process to drift due tocomputing rounding errors. To achieve this an error term, , can introduced in place of the zerodiagonal elements in the matrix of Equation 3.14:

    e0e1e2e3

    = 12

    0 p q rp 0 r qq r 0 pr q p 0

    e0e1e2e3

    + 2

    e0e1e2e3

    = 12

    p q rp r qq r pr q p

    e0e1e2e3

    where is the error in the quaternion parameters obtained from the constraint equation:

    = 1

    e2

    0+e2

    1+e2

    2+e2

    3

    The constant is chosen, according to ESDU 98024, on the basis of the type of manoeuvres to beexecuted and such thath 1.0 for integration step sizeh. It can be shown that the correction loopwill not interfere with the original equation if

    p2 +q2 +r2. Now the rate of change of error is

    given by differentiating the modified constraint equation:

    = 2 (e0e0+e1e1+e2e2+e3e3)

    or, from Equation 3.14:

    = 2

    e0

    e1

    e2

    e3

    e0e1

    e2e3

    =

    e0

    e1

    e2

    e3

    0 p q rp 0 r q

    q r 0 pr q p 0

    e0e1

    e2e3

    It can be shown from Appendix B.4 that the constraint equation satisfies the original differentialequations and thus if e0, e1, e2 and e3 are obtained without error then any deviation in satisfyingthe constraint equation will remain unchanged as the simulation progresses. Therefore if, assumingappropriate initialisation, any deviation in satisfying the constraint equation occurs following inte-grating of the quaternion rates it must be due to solely to errors in the integration process; thismeans that both truncation and rounding errors are responsible.

    In non real-time, or off-line, simulation the states are usually accumulated in double precisionand high order integration algorithms are used with large time steps. Consequently most errors

    are truncation and not rounding errors. In real-time simulation, simple integration rules such astrapezoidal are used but the time steps are made very small in a attempt to reduce the phase shiftsbetween simulation and the real world environment. In that case rounding errors may predominate.In either case if the errors are significant then some form of correction will be required.

    Page 8 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    9/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    3.3.3 Derivation of the Euler Angles

    For flight simulation the Euler angles will be required to define the aircrafts attitude within theoutside world view and for display on the pilots instrumentation. Using a suitable choice from

    Equations 3.4 and 3.8 enables the Euler angles to be derived as follows, see Equation B.7:

    sin = 2 (e0e2 e1e3)

    thus for pitch attitude:

    = sin1 (2e0e2 2e1e3) (3.15)

    By definition, as is the elevation angle of the aircrafts x-axis above, or below, the horizontal planeand therefore lies in the range 90

    (/2), the inverse process will provide a unique value for .From Equation B.8:

    cos cos = e20

    +e21

    e22

    e23

    or:

    cos =e20

    +e21

    e22

    e23

    cos

    as can vary between -180

    and +180

    we must ensure the correct sign is obtained during thesimulation. From the constraint on we know that cos will always be positive and so thus the signof sin can be obtained from:

    cos sin = 2 (e1e2+e0e3)

    that is:

    sgn[sin ] = sgn(e1e2+e0e3)

    which leads to:

    = cos1

    e20

    +e21

    e22

    e23

    cos

    sgn(e1e2+e0e3) (3.16)

    Likewise from Equation B.10 and noting that can vary between -180

    and +180

    :

    cos cos = e20

    e21

    e22

    +e23

    and:

    cos sin = 2 (e2e3+e0e1)

    thus:

    = cos1

    e20

    e21

    e22

    +e23

    cos

    sgn(e2e3+e0e1) (3.17)

    If the simulation is going to maintain flight close to = 90

    then some alternative relationship willbe required. As:

    cos cos = e20

    e21

    e22

    +e23

    and cos sin = 2 (e2e3+e0e1)

    then:

    tan = 2 (e2e3+e0e1)

    e20

    e21

    e22

    +e23

    Axes Systems

    January 13, 2011

    Page 9

  • 8/9/2019 Axes systems, orientation and motion notation

    10/29

    School of Engineering

    Aerospace Dynamics MSc

    likewise:

    cos cos = e20

    +e21

    e22

    e23

    and cos sin = 2 (e1e2+e0e3)

    and:

    tan = 2 (e1e2+e0e3)

    e20

    +e21

    e22

    e23

    so now and are no longer functions of 1/cos. Robust methods exist to calculate the arctangentas it is often necessary to smoothly cover the interval . MATLAB

    provides the functionatan2(y,x)for this eventuality, thus:

    = atan2

    2 (e2e3+e0e1) , e2

    0 e2

    1 e2

    2+e2

    3

    and

    = atan2

    2 (e1e2+e0e3) , e2

    0+e2

    1 e2

    2 e2

    3

    3.4 Summary

    In the Euler method, the orientation of an axis system fixed in the air-vehicle relative to anotherfixed in the earth can be defined from three separate rotations about each of three axes, where therotations are completed in strict order. The rotational angles are the Euler angles of yaw, pitch androll, they have a direct physical interpretation and are suitable for all vehicle motions involving pitchchanges of less than 90

    . However, when the pitch angle approaches 90

    , both and approachinfinity, so computational difficulties arise. The quaternion is a four-parameter system that may be

    physically interpreted as a rotation through some angle about a specific fixed axis system, each axisof which lies at an angle to a fixed orthogonal (x,y,z) axis system. The quaternion is consequentlyhard to visualise but its advantages can outweigh the remoteness of physical interpretation.

    Hence, the Euler technique is simple and widely used in flight simulation. However, its weaknessis the singularity at the zenith and the nadir. The quaternion technique is more complex and lessfamiliar but is robust and will cope with all kinds of manoeuvres. The constraint equation in manycases does not need to be imposed, only checked to see that it is being satisfied to reasonable accuracy,that is it approximates to 1.0. The solution sequence of events for each case is shown in Figures 6and 7.

    1

    s

    1

    s

    1

    s

    phi

    theta

    psi

    dcmebdcm

    phi

    theta

    r

    q

    p

    phidot

    thetadot

    psidot

    kinephi,theta,psi

    Figure 6: Euler Angle Solution Scheme

    Page 10 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    11/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    1

    s

    1

    s

    1

    s

    1

    s

    e0

    e1

    e2

    e3

    dcmebdcm

    e0

    e1

    p

    q

    r

    e2

    e3

    e0dot

    e1dot

    e2dot

    e3dot

    q_kine dcmeb

    phi

    theta

    psi

    euler

    Figure 7: Quaternion Solution Scheme

    4 Motion Variables

    The motion of the aircraft is described in terms of force, moment, linear and angular velocities andattitudes resolved into components with respect to the chosen aircraft fixed axis system, see Figures 3and 8. In steady, non-accelerating, flight the aircraft is in equilibrium and the forces and momentsacting on the airframe are in balance and sum to zero. The initial condition is usually referred toas trimmed equilibrium. Whenever the aircraft is disturbed from equilibrium, the force and momentbalance is upset and the resulting transient motion is quantified in terms of the perturbation variables,

    shown in Figure 8.

    L, P

    U, X

    N, R

    V, Y

    W, Z

    z

    xy

    body axes centre

    M, Q

    Figure 8: Body Axes System - Motion Variable Notation

    The positive sense of the variables is determined by the choice of a right-handed axis system andhas been summarised for the normal convention in Table 1 A typical aircraft with conventionalaerodynamic control surfaces is shown in Figure 9. Such aircraft also usually have a fourth control,

    Axes Systems

    January 13, 2011

    Page 11

  • 8/9/2019 Axes systems, orientation and motion notation

    12/29

    School of Engineering

    Aerospace Dynamics MSc

    symbol description sign convention

    X force along x-axis forwardY force along y-axis (side force) to the right (starboard)

    Z force along z-axis downL moment about x-axis (rolling moment) right wing downM moment about y-axis (pitching moment) nose upN moment about z-axis (yawing moment) nose to the rightU motion along x-axis (surge - forward velocity) forwardV motion along y-axis (sway - lateral velocity) to the right (starboard)W motion along z-axis (heave - vertical velocity) downP rotation about x-axis (roll rate) right wing downQ rotation about y-axis (pitch rate) nose upR rotation about z-axis (yaw rate) nose to the right

    Table 1: Body Axes System - Motion Variable Sign Convention

    namely thrust controlled manually through the engine throttle usually defined using .

    StarboardAileron

    Port

    Aileron

    Rudder

    Elevator

    Elevator

    positive controlangles shown

    Figure 9: Conventional Control Deflections (taken from Cook [2007])

    Interpretation of Figure 9 shows that a positive elevator deflection, , will result in a negative pitchmotion, a positive mean aileron deflection, , will result in a negative roll motion and a positiverudder deflection, , in a negative yaw motion. The aileron and rudder flight control surfaces willalso generate secondary motion (moments) in addition to their principal effects on the aircraft motion.

    References

    ESDU 67001. Introduction to notation for aircraft dynamics. ESDU International. With AmendmentA, April 2003.

    ESDU 67002. Notation for aircraft dynamics. ESDU International. With Amendment A, April 2003.

    ESDU 67003. The equations of motion of a rigid aircraft. ESDU International. With AmendmentA, April 2003.

    Page 12 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    13/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    ESDU 98024. Quaternion representation of aeroplane attitude and motion characteristics. ESDUInternational. With Amendment A, November 2002.

    M. Cook. Flight Dynamics Principles. Elsevier Aerospace Engineering. Butterworth-Heinemann,

    2nd edition, 2007.

    M. E. Dreier. Introduction to Helicopter and Tiltrotor Flight Simulation. AIAA Education Series,2007.

    H. R. Hopkins. A scheme of notation and nomenclature for aircraft dynamics and associated aero-dynamics. Technical Report TR 66200, Royal Aircraft Establishment, June 1966.

    J. M. Rolfe and K. J. Staples. Flight Simulation. Cambridge University Press, 1986.

    B. L. Stevens and F. L. Lewis. Aircraft Control and Simulation. John Wiley & Sons, 1992.

    P. H. Zipfel. Modelling and Simulation of Aerospace Vehicle Dynamics. AIAA Education Series, 2nd

    edition, 2007.

    Axes Systems

    January 13, 2011

    Page 13

  • 8/9/2019 Axes systems, orientation and motion notation

    14/29

    School of Engineering

    Aerospace Dynamics MSc

    A Conversion of Euler attitude rates to body rates

    Now:

    pqr

    = 1 0 sin 0 cos sin cos 0 sin cos cos

    So:

    =

    1 0 sin 0 cos sin cos

    0 sin cos cos

    1 pq

    r

    But

    1 0 sin 0 cos sin cos 0 sin cos cos

    = cos2 cos + sin2 cos = cos

    Also the matrix of co-factors is: cos

    2 cos + sin2 cos 0 0sin sin cos cos sin cos sin sin cos cos

    Thus the adjoint is given by:

    cos2

    cos + sin2

    cos 0 0sin sin cos cos sin cos sin sin cos cos

    T

    = cos sin sin cos sin 0 cos cos sin cos

    0 sin cos

    Hence:

    1 0 sin 0 cos sin cos

    0 sin cos cos

    1

    = 1

    cos

    cos sin sin cos sin 0 cos cos sin cos

    0 sin cos

    1 0 sin 0 cos sin cos

    0 sin cos cos

    1

    =

    1 sin tan cos tan 0 cos sin

    0 sin sec cos sec

    Therefore:

    =

    1 sin tan cos tan 0 cos sin

    0 sin sec cos sec

    pq

    r

    Page 14 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    15/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    B Transformations using quaternions

    B.1 Obtaining the equivalent direction cosine matrix

    Now:

    Q = (e0 e1 e2 e3) (X+Y +Z) (e0+e1+e2+e3)

    Thus:

    Q = (e0 e1 e2 e3) [Xe0+Xe1+Xe2+Xe3+. . .

    Y e0+Y e1+Y e2+Y e3+Z e0+Ze1+Ze2+Ze3]

    Q = (e0 e1 e2 e3) [Xe0 Xe1+X e2 X e3+. . .

    Y e0 Y e1 Y e2+Y e3+Z e0+Z e1 Ze2 Ze3]

    Q = Xe20

    Xe0e1+X e0e2 X e0e3+Y e2

    0 Y e0e1 Y e0e2+Y e0e3+. . .

    Z e20+Z e0e1 Ze0e2 Ze0e3 [Xe0e1 Xe2

    1+Xe1e2 Xe1e3+. . .

    Y e0e1 Y e2

    1 Y e1e2+Y e1e3+Ze0e1+Ze2

    1 Ze1e2 . . .

    Ze1e3] [Xe0e2 X e1e2+Xe2

    2 Xe2e3+Y e0e2 Y e1e2 . . .

    Y e22

    +Y e2e3+Ze0e2+Ze1e2 Ze2

    2 Z e2e3] [Xe0e3 . . .

    X e1e3+Xe2e3 Xe2

    3+Y e0e3 Y e1e3 Y e2e3+Y e

    2

    3+. . .

    Ze0e3+Ze1e3 Ze2e3 Z e2

    3]

    Q = Xe20 Xe0e1+X e0e2 X e0e3+Y e2

    0 Y e0e1 Y e0e2+Y e0e3+. . .

    Z e20

    +Z e0e1 Ze0e2 Ze0e3 [Xe0e1 Xe2

    1 X e1e2 X e1e3+. . .

    Y e0e1+Y e2

    1 Y e1e2 Y e1e3 Z e0e1+Z e

    2

    1+Ze1e2 Ze1e3] . . .

    [X e0e2 X e1e2+Xe2

    2+Xe2e3 Y e0e2 Y e1e2 Y e

    2

    2 Y e2e3+. . .

    Ze0e2 Ze1e2+Z e2

    2 Z e2e3] [X e0e3 X e1e3 Xe2e3+Xe2

    3 . . .

    Y e0e3+Y e1e3 Y e2e3+Y e2

    3 Ze0e3 Ze1e3 Z e2e3 Z e2

    3]

    Q = Xe20

    Xe0e1+X e0e2 X e0e3+Y e2

    0 Y e0e1 Y e0e2+Y e0e3+. . .

    Z e2

    0+Z e0e1 Ze0e2 Ze0e3+Xe0e1+Xe2

    1+X e1e2+X e1e3 . . .Y e0e1 Y e

    2

    1+Y e1e2+Y e1e3+Z e0e1 Z e2

    1 Ze1e2+Ze1e3+. . .

    X e0e2+X e1e2 Xe2

    2 Xe2e3+Y e0e2+Y e1e2+Y e2

    2+Y e2e3 . . .

    Ze0e2+Ze1e2 Z e2

    2+Z e2e3 X e0e3+X e1e3+Xe2e3 Xe2

    3+. . .

    Y e0e3 Y e1e3+Y e2e3 Y e2

    3+Ze0e3+Ze1e3+Z e2e3+Z e

    2

    3

    which simplifies to:

    Q = Xe20

    +X e0e2 X e0e3+Y e2

    0 Y e0e1+Y e0e3+Z e

    2

    0+Z e0e1 . . .

    Ze0e2+Xe2

    1+X e1e2+X e1e3 Y e0e1 Y e

    2

    1+Y e1e2+Z e0e1 . . .

    Z e21+Ze1e3+X e0e2+X e1e2 Xe22+Y e1e2+Y e22+Y e2e3 . . .

    Ze0e2 Z e2

    2+Z e2e3 X e0e3+X e1e3 Xe2

    3+Y e0e3+Y e2e3 . . .

    Y e23

    +Ze1e3+Z e2e3+Z e2

    3

    Axes Systems

    January 13, 2011

    Page 15

  • 8/9/2019 Axes systems, orientation and motion notation

    16/29

    School of Engineering

    Aerospace Dynamics MSc

    or:

    Q = [X(e20

    +e21

    e22

    e23

    ) + 2Y(e0e3+e1e2) + 2Z(e1e3 e0e2)] +. . .

    [2X(e1e2 e0e3) +Y(e2

    0 e2

    1+e2

    2 e2

    3) + 2Z(e0e1+e2e3)] +. . .

    [2X(e0e2+e1e3) + 2Y(e2e3 e0e1) +Z(e20 e21 e

    22+e

    23)]

    that is:X

    Y

    Z

    =

    (e

    20

    +e21

    e22

    e23

    ) 2(e1e2+e0e3) 2(e1e3 e0e2)2(e1e2 e0e3) (e

    20

    e21

    +e22

    e23

    ) 2(e2e3+e0e1)2(e1e3+e0e2) 2(e2e3 e0e1) (e

    20

    e21

    e22

    +e23

    )

    XY

    Z

    or:

    xy

    z

    =

    e20

    +e21

    e22

    e23

    2(e1e2+e0e3) 2(e1e3 e0e2)2(e1e2 e0e3) e

    20

    e21

    +e22

    e23

    2(e2e3+e0e1)

    2(e1e3+e0e2) 2(e2e3 e0e1) e2

    0 e2

    1 e2

    2+e2

    3

    x0y0

    z0

    B.2 Relationships between quaternions and Euler angles

    Now: xy

    z

    =

    e

    20

    +e21

    e22

    e23

    2(e1e2+e0e3) 2(e1e3 e0e2)2(e1e2 e0e3) e

    20

    e21

    +e22

    e23

    2(e2e3+e0e1)2(e1e3+e0e2) 2(e2e3 e0e1) e

    20

    e21

    e22

    +e23

    x0y0

    z0

    (B.1)

    but

    xyz

    = cc cs s

    cs+ssc cc+sss scss+csc sc+css cc

    x0y0z0

    (B.2)

    Adding the leading diagonal leads to:

    e20

    +e21

    e22

    e23

    +

    e20

    e21

    +e22

    e23

    +

    e20

    e21

    e22

    +e23

    = cc+cc+sss+cc

    which gives

    3e20

    e21

    e22

    e23

    = cc+cc+sss+cc

    Now applying constraint equation:

    4e20

    = 1 +cc+cc+cc+sss

    Or:

    4e20

    = 1 + cos cos + cos cos + cos cos

    +

    2sin

    2cos

    2

    2sin

    2cos

    2

    2sin

    2cos

    2

    Now:

    (1 + cos )(1 + cos )(1 + cos ) = (1 + cos )(1 + cos + cos + cos cos )(1 + cos )(1 + cos )(1 + cos ) = 1 + cos + cos + cos + cos cos +

    cos cos + cos cos + cos cos cos

    Page 16 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    17/29

  • 8/9/2019 Axes systems, orientation and motion notation

    18/29

  • 8/9/2019 Axes systems, orientation and motion notation

    19/29

  • 8/9/2019 Axes systems, orientation and motion notation

    20/29

  • 8/9/2019 Axes systems, orientation and motion notation

    21/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    B.3 Development of the differential equations

    Now:

    pqr

    = 1 0 sin 0 cos sin cos 0 sin cos cos

    but from equations B.8 and B.10:

    sin = 2 (e0e2 e1e3) = 2A

    sin cos = 2 (e1e2+e0e3) = 2B

    cos cos = e20

    +e21

    e22

    e23

    = C

    sin cos = 2 (e2e3+e0e1) = 2D

    cos cos = e20

    e21

    e22

    +e23

    = E

    also:

    cos =

    1 sin2 =

    1 4A2 =F

    Thus:

    pq

    r

    =

    1 0 2A0 E/F 2D

    0 2D/F E

    and:

    cos = 2 (e0e2+e0e2 e1e3 e1e3)

    thus

    = 2

    F (e0e2+e0e2 e1e3 e1e3)

    or

    = 2

    F

    e2 e3 e0 e1

    e0 e1 e2 e3

    T

    Now from Equation B.11

    tan = 2D

    E thus sec2 =

    2DE 2D E

    E2

    but:

    D= e2e3+e2e3+ e0e1+e0e1 and E= 2 (e0e0 e1e1 e2e2+ e3e3)

    so:

    cos2 =

    2E(e2e3+e2e3+ e0e1+e0e1) 4D (e0e0 e1e1 e2e2+ e3e3)

    E2

    as:

    E2 = cos2 cos2

    Axes Systems

    January 13, 2011

    Page 21

  • 8/9/2019 Axes systems, orientation and motion notation

    22/29

    School of Engineering

    Aerospace Dynamics MSc

    then:

    =2E(e2e3+e2e3+ e0e1+e0e1) 4D (e0e0 e1e1 e2e2+ e3e3)

    F2

    or:

    = 2

    F2[e0(Ee1 2De0) + e1(Ee0+ 2De1) + e2(Ee3+ 2De2) + e3(Ee2 2De3)]

    = 2

    F2

    (Ee1 2De0) (Ee0+ 2De1) (Ee3+ 2De2) (Ee2 2De3)

    e0 e1 e2 e3T

    Also from Equation B.9

    tan =2B

    C thus sec2 =

    2BC 2B C

    C2

    but:

    B = e1e2+e1e2+ e0e3+e0e3 and

    C= 2 (e0e0+ e1e1 e2e2 e3e3)

    so:

    cos2 =

    2C(e1e2+e1e2+ e0e3+e0e3) 4B(e0e0+ e1e1 e2e2 e3e3)

    C2

    as:

    C2 = cos2 cos2

    = 2

    F2[e0(Ce3 2Be0) + e1(Ce2 2Be1) + e2(Ce1+ 2Be2) + e3(Ce0+ 2Be3)]

    = 2

    F2

    (Ce3 2Be0) (Ce2 2Be1) (Ce1+ 2Be2) (Ce0+ 2Be3)

    e0 e1 e2 e3T

    Hence:

    pq

    r

    = 2

    F2

    1 0 2A0 E/F 2D

    0 2D/F E

    (Ee1 2De0) (Ee0+ 2De1) (Ee3+ 2De2) (Ee2 2De3)F e2 F e3 F e0 F e1

    (Ce3 2Be0) (Ce2 2Be1) (Ce1+ 2Be2) (Ce0+ 2Be3)

    e0e1e2e3

    that is:

    p

    qr

    =

    2

    F2

    A11 A12 A13 A14

    A21 A22 A23 A24A31 A32 A33 A34

    e0e1

    e2e3

    So:

    A11= (Ee1 2De0) 2A (Ce3 2Be0)

    however:

    Ce3 2Be0 = e2

    0e3+e

    2

    1e3 e

    2

    2e3 e

    3

    3 2e0e1e2 2e

    2

    0e3

    = e20

    e3+e2

    1e3 e

    2

    2e3 e

    3

    3 2e0e1e2

    = e2

    0+e2

    1 e2

    2 e2

    3 e3 2e0e1e2=

    e20 e21 e22 e23

    e3 2e0e1e2+ 2e21e3

    = e3 2 (e0e2 e1e3) e1

    Ce3 2Be0 = e3 2Ae1

    Page 22 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    23/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    also:

    Ee1 2De0 = e2

    0e1 e3

    1 e1e2

    2+e1e2

    3 2e0e2e3 2e2

    0e1

    = e20e1 e3

    1 e1e2

    2+e1e

    2

    3 2e0e2e3

    =

    e20

    e21

    e22

    +e23

    e1 2e0e2e3

    =

    e20

    e21

    e22

    e23

    e1 2e0e2e3+ 2e1e

    2

    3

    = e1 2 (e0e2 e1e3) e3

    Ee1 2De0 = e1 2Ae3

    thus:

    A11= e1 2Ae3+ 2A (e3+ 2Ae1) = e1 2Ae3+ 2Ae3+ 4A2e1 = e1

    1 4A2

    = F2e1

    Likewise:

    A12= (Ee0 2De1) 2A (Ce2 2Be1)

    however:

    Ce2 2Be1 = e2

    0e2+e

    2

    1e2 e

    3

    2 e2e

    2

    3 2e2

    1e2 2e0e1e3

    = e20

    e2 e2

    1e2 e

    3

    2 e2e

    3

    3 2e0e1e3

    =

    e20

    e21

    e22

    e23

    e2 2e0e1e3

    =

    e20 e2

    1 e2

    2 e2

    3

    e2 2e0e1e3+ 2e

    2

    0e2

    = e2+ 2 (e0e2 e1e3) e0

    Ce2 2Be1 = e2+ 2Ae0

    and:

    Ee0+ 2De1 = e3

    0 e0e2

    1 e0e2

    2+e0e2

    3+ 2e1e2e3+ 2e0e2

    1

    = e30+e0e2

    1 e0e2

    2+e0e2

    3+ 2e1e2e3

    =

    e20

    +e21

    e22

    +e23

    e0+ 2e1e2e3

    =

    e20

    +e21

    +e22

    +e23

    e0+ 2e1e2e3 2e0e

    2

    2

    = e0 2 (e0e2 e1e3) e2

    Ee0+ 2De1 = e0 2Ae2

    thus:

    A12= e0 2Ae2 2A (e2+ 2Ae0) =e0 2Ae2+ 2Ae2 4A2e0= e0

    1 4A2

    = +F2e0

    Also:

    A13= (Ee3+ 2De2) 2A (Ce1+ 2Be2)

    but:

    Ce1+ 2Be2 = e2

    0e1+e

    3

    1 e1e

    2

    2 e1e

    2

    3+ 2e1e

    2

    2+ 2e0e2e3

    = e20

    e1+e3

    1+e1e

    2

    2 e1e

    2

    3+ 2e0e2e3

    = e2

    0+e2

    1+e2

    2 e2

    3 e1+ 2e0e2e3=

    e20+e21+e22+e23

    e1+ 2e0e2e3 2e1e23

    = e1+ 2 (e0e2 e1e3) e3

    Ce1+ 2Be2 = e1+ 2Ae3

    Axes Systems

    January 13, 2011

    Page 23

  • 8/9/2019 Axes systems, orientation and motion notation

    24/29

    School of Engineering

    Aerospace Dynamics MSc

    and:

    Ee3+ 2De2 = e2

    0e3 e

    2

    1e3 e

    2

    2e3+e

    3

    3+ 2e2

    2e3+ 2e0e1e2

    = e20

    e3 e2

    1e3+e

    2

    2e3+e

    3

    3+ 2e0e1e2

    =

    e20

    e21

    +e22

    +e23

    e3+ 2e0e1e2

    =

    e20+e2

    1+e2

    2+e2

    3

    e3+ 2e0e1e2 2e

    2

    1e3

    = e3+ 2 (e0e2 e1e3) e1

    Ee3+ 2De2 = e3+ 2Ae1

    thus:

    A13= e3+ 2Ae1 2A (e1+ 2Ae3) =e3+ 2Ae1 2Ae1 4A2e3 = e3

    1 4A2

    = +F2e3

    Similarly:

    A14= (Ee2 2De3) 2A (Ce0+ 2Be3)

    however:

    Ce0+ 2Be3 = e3

    0+e0e

    2

    1 e0e

    2

    2 e0e

    2

    3+ 2e1e2e3+ 2e0e

    2

    3

    = e30

    +e0e2

    1 e0e

    2

    2+e0e

    2

    3+ 2e1e2e3

    =

    e20+e2

    1 e2

    2+e2

    3

    e0+ 2e1e2e3

    =

    e20+e2

    1+e2

    2+e2

    3

    e0+ 2e1e2e3 2e0e

    2

    2

    = e0 2 (e0e2 e1e3) e2

    Ce0+ 2Be3 = e0 2Ae2

    and:

    Ee2 2De3 = e2

    0e2 e

    2

    1e2 e

    3

    2+e2e

    2

    3 2e2e

    2

    3 2e0e1e3

    = e20

    e2 e2

    1e2 e

    3

    2 e2e

    2

    3 2e0e1e3

    =

    e20 e2

    1 e2

    2 e2

    3

    e2 2e0e1e3

    =

    e20 e2

    1 e2

    2 e2

    3

    e2 2e0e1e3+ 2e

    2

    0e2

    = e2+ 2 (e0e2 e1e3) e0

    Ee2 2De3 = e2+ 2Ae0

    A14= e2+ 2Ae0 2A (e0 2Ae2) = e2+ 2Ae0 2Ae0+ 4A2e2= e2

    1 4A2

    = F2e2

    and so:

    p= 2 (e1e0+e0e1+e3e2 e2e3)

    Now:

    A21 = Ee2+ 2D (Ce3 2Be0)

    = Ee2 2D (e3+ 2Ae1)

    = Ee2 2De3 4DAe1

    A21 = e2+ 2Ae0 4DAe1

    Page 24 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    25/29

  • 8/9/2019 Axes systems, orientation and motion notation

    26/29

    School of Engineering

    Aerospace Dynamics MSc

    and:

    A24 = Ee1+ 2D (Ce0+ 2Be3)

    = Ee1+ 2D (e0 2Ae2)

    = Ee1+ 2De0 4ADe2

    = e1+ 2Ae3 4A (e2e3+e0e1) e2

    = e1+ 2Ae3 4A

    e0e1e2 e2

    1e3+e2

    1e3+e2

    2e3

    = e1+ 2Ae3 4A

    Ae1+e2

    1e3+e

    2

    2e3

    = e1 4A2e1 2A

    2e2

    1+ 2e2

    2 1

    e3

    =

    1 4A2

    e1 2A

    2e21

    + 2e22

    e20

    e21

    e22

    e23

    e3

    = F2e1 2a

    e20+e2

    1+e2

    2 e2

    3

    e3

    A24 = F2e1+ 2AEe3

    Hence:

    q= 2 [e2e0 e3e1+e0e2+e1e3] + 4AEF2

    [e0e0+e1e1+e2e2+e3e3]

    as e20

    +e21

    +e22

    +e23

    = 1 then differentiating with respect to time gives:

    0 = 2 (e0e0+e1e1+e2e2+e3e3)

    thus:

    q= 2 (e2e0 e3e1+e0e2+e1e3)

    Now:

    A31 = 2De2+E(Ce3 2Be0)

    = 2De2 E(e3+ 2Ae1)= e3 2Ae1 2AEe1

    = e3 2Ae1 2A

    e20 e2

    1 e2

    2+e2

    3

    e1

    = e3 2Ae1 2A

    e20

    e21

    e22

    e23

    + 2e20

    + 2e23

    e1

    = e3 2Ae1 2A

    1 + 2e20

    + 2e23

    e1

    = e3 4A

    e20

    +e23

    e1

    = e3 4A

    e20e1+e1e2

    3 e0e2e3+e0e2e3

    = e3 4A [(e1e3 e0e2) e3+ (e0e1+e2e3) e0]

    = e3+ 4A2e3 4ADe0

    A31 = F2

    e3 4ADe0

    Likewise:

    A32 = 2De3+E(Ce2 2Be1)

    = 2De3+E(e2+ 2Ae0)

    = +e2 2Ae0+ 2AEe0

    = +e2 2Ae0+ 2A

    e20

    e21

    e22

    +e23

    e0

    = +e2 2Ae0+ 2A

    e20

    +e21

    +e22

    +e23

    2e21

    2e22

    e0

    = +e2 2Ae0+ 2Ae0 4A

    e21

    +e22

    e0

    = +e2 4A e0e2

    1+e0e

    2

    2 e1e2e3+e1e2e3

    = +e2 4A [(e0e2 e1e3) e2+ (e0e1+e2e3) e1]

    = +e2 4A2e2 4ADe1

    A32 = +F2e2 4ADe1

    Page 26 Axes Systems

    January 13, 2011

  • 8/9/2019 Axes systems, orientation and motion notation

    27/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    similarly:

    A33 = 2De0+E(Ce1+ 2Be2)

    = 2De0+E(e1+ 2Ae3)

    = 2De0+Ee1+ 2AEe3

    = e1 2Ae3+ 2AEe3

    = e1 2Ae3+ 2A

    e20

    e21

    e22

    +e23

    e3

    = e1 2Ae3+ 2A

    e20

    +e21

    +e22

    +e23

    2e21

    2e22

    e3

    = e1 2Ae3+ 2Ae3 4A

    e21

    +e22

    e3

    = e1 4A

    e21e3+e2

    2e3 e0e1e2+e0e1e2

    = e1 4A [(e1e3 e0e2) e1+ (e2e3+e0e1) e2]

    = e1 4A [Ae1+De2]

    = e1+ 4A2e1 4ADe2

    A33 = F2e1 4ADe2

    finally:

    A34 = 2De1+E(Ce0+ 2Be3)

    = 2De1+E(e0 2Ae2)

    = e0 2Ae2 2AEe2

    = e0 2Ae2 2A

    e20

    e21

    e22

    +e23

    e2

    = e0 2Ae2 2A

    e20

    e21

    e22

    e23

    + 2e20

    + 2e23

    e2

    = e0 4A e20

    +e23

    e2

    = e0 4A

    e2

    0e2 e0e1e3+e0e1e3+e2e2

    3

    = e0 4A [(e0e2 e1e3) e0+ (e0e1+e2e3) e3]

    = e0 4A [Ae0+De3]

    = e0 4A2e0 4ADe3

    A34 = F2e0 4ADe3

    So:

    r= 2 [e3e0+e2e1 e1e2+e0e3] 4AD

    F2 [e0e0+e1e1+e2e2+e3e3]

    thus:

    r= 2 (e3e0+e2e1 e1e2+e0e3)

    Thus:

    pqr0

    = 2

    e1 e0 e3 e2e2 e3 e0 e1e3 e2 e1 e0e0 e1 e2 e3

    e0e1e2e3

    or:

    e0e1e2e3

    = 12

    e1 e0 e3 e2e2 e3 e0 e1e3 e2 e1 e0e0 e1 e2 e3

    1

    pqr0

    = 12 B

    pqr0

    Axes Systems

    January 13, 2011

    Page 27

  • 8/9/2019 Axes systems, orientation and motion notation

    28/29

  • 8/9/2019 Axes systems, orientation and motion notation

    29/29

    Department of Aerospace Sciences

    Air Vehicle Modelling and Simulation

    but:

    p

    e3 e0 e1e2 e1 e0e1 e2 e3

    = p

    e3 (e1e3 e0e2) e0(e2e3 e0e1) +e1

    e22

    +e21

    = p

    e1e2

    3+e0e2e3 e0e2e3+e

    3

    0e1+e1

    e22

    +e21

    = pe1

    e23

    +e30

    +e22

    +e21

    = pe1

    and:

    q

    e0 e3 e2e2 e1 e0e1 e2 e3

    = q

    e0(e1e3 e0e2) e3(e2e3 e0e1) e2

    e22+e2

    1

    = q

    e0e1e3 e2

    0e2 e2e2

    3+e0e1e3 e2

    e22+e2

    1

    = qe2 e23+e30+e22+e21= qe2

    also:

    +r

    e0 e3 e2

    e3 e0 e1e1 e2 e3

    = r

    e0(e0e3 e1e2) e3

    e23

    e21

    e2(e3e2 e0e1)

    = r

    e20e3 e0e1e2+e3

    e23+e2

    1

    +e22e3+e0e1e2

    = re3

    e20

    +e33

    +e21

    +e22

    = re3

    Hence:

    e0=1

    2

    |B1|

    |B| =

    1

    2(+pe1+qe2+re3)

    Likewise:

    e1 = 1

    2(pe0+qe3 re2)

    e2 = 1

    2(pe3 qe0+re1)

    e3 = 1

    2(+pe2 qe1 re0)

    or:

    e0e1e2e3

    = 12

    0 p q rp 0 r qq r 0 pr q p 0

    e0e1e2e3

    B.4 Error propagation

    Now:

    =

    e0 e1 e2 e3

    0 p q rp 0 r qq r 0 p

    r q p 0

    e0e1e2

    e3

    =

    e0 e1 e2 e3

    pe1+qe2+re3pe0 re2+qe3qe0+re1 pe3

    re0 qe1+pe2

    = pe0e1+qe0e2+re0e3 pe0e1 re1e2+qe1e3 qe0e2+re1e2 pe2e3 re0e3 qe1e3+pe2e3

    0