[go: up one dir, main page]

0% found this document useful (0 votes)
46 views12 pages

How To Measure Angular Motion With A Gyroscope

This document discusses how to measure angular motion with a gyroscope. It defines key terms like reference frames, orientation, and quaternions. It explains that orientation can be defined using a rotation matrix, Euler angles, or quaternions relating two reference frames. The document then discusses how gyroscopes and accelerometers in devices like enDAQ sensors can be used to calculate angular velocity and acceleration by measuring orientation over time.

Uploaded by

sontruonghuu3k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views12 pages

How To Measure Angular Motion With A Gyroscope

This document discusses how to measure angular motion with a gyroscope. It defines key terms like reference frames, orientation, and quaternions. It explains that orientation can be defined using a rotation matrix, Euler angles, or quaternions relating two reference frames. The document then discusses how gyroscopes and accelerometers in devices like enDAQ sensors can be used to calculate angular velocity and acceleration by measuring orientation over time.

Uploaded by

sontruonghuu3k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

How to Measure Angular Motion with a


Gyroscope

ANALYSIS ENVIRONMENTAL SENSORS 0 COMMENTS

SHARE THIS

   

BY STANLEY NORMILE

SHARE THIS

   
▲ TOP
Measuring angular motion can be important in a wide variety of applications, including sports
biomechanics and astronomy. In this blog post, I'll go over how to define rotation and what's
needed to calculate angular velocity. I’ll then walk you through how to measure rotation and what’s 
required (including formulas) to calculate angular velocity with an accelerometer. There are a variety
Signthat
of accelerometers and DAQ systems Up canfor
helpSensing Tips!
measure both orientation and acceleration, but
for this post I’ll be using one of my company’s enDAQ sensors, as it comes equipped with in-built
gyroscopes and accelerometers.
Email Address* SIGN ME UP

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 1/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

I'll cover:

Reference Frames
Orientation
Quaternions
Angular Velocity
Acceleration
Application to enDAQ Sensors
Conclusion
References

Reference Frames
In order to define rotation (and by extension angular velocity and acceleration) it is first necessary to
define some terms:

Vector Basis
A vector basis is a set of non-coplanar vectors that are used to define orientation. Vector bases may
have additional properties such as:

Orthogonal - the basis vectors are mutually orthogonal. Orthogonal vector bases are also
rigid by definition
Normal - all of the basis vectors are unit vectors
Rigid - the angles between the basis vectors are constant. This introduces a sense of time to
the basis since time must be defined in order for the angles to not change over time.

An example of a 3D orthonormal vector basis is the unit vectors that form a basis in .

Reference Frame
A reference frame is an infinite set of non-collinear points where the distance between any two
points is constant. Once again, the term constant implies a sense of time. Reference frames define
both position and orientation. A convenient way to define a reference frame N is using a point and 
an orthonormal vector basis fixed in N. Reference frames can be Newtonian or non-Newtonian:
Sign Up for Sensing Tips!
Newtonian Reference Frame - (also known as an inertial reference frame) a non-accelerating
(this includes non-rotating) reference frame in which accurately predicts all motion.
By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 2/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

The Earth is a non- Newtonian reference frame, however it can often be approximated as a
Newtonian reference frame.

Non-Newtonian Reference Frame - an accelerating reference frame in which


does not apply.

For the purposes of this guide, we will restrict our focus to 3D orthonormal vector bases.
Orientation and its derivatives (angular velocity and acceleration) can be defined without specifying
any points, so they can be defined in terms of a pair of vector bases. Since reference frames contain
vector bases, orientation can also be defined in terms of two reference frames. Position and its
derivatives (velocity and acceleration) are defined between two points, and thus require at least one
reference frame to be defined.

Orientation
The orientation of a rigid body is defined by the alignment between a vector basis attached to the
body and another vector basis or reference frame. For the purposes of this guide, we will consider
the orientation of a body B (defined by orthonormal basis vectors ) in the world reference
frame W (defined by orthonormal basis vectors ). There are several ways to define the
orientation of B in W.

1. Rotation Matrix - the rotation matrix bRw which is defined such that:

2. Euler Angles - successive rotations about the b basis vectors. These rotations can be
performed in any order such as XYZ or YZY .
3. Euler Parameters (Quaternions) - Any rotation(s) that can be expressed using either of the
two preceding methods can also be expressed as a single rotation θ about the unit vector .
is fixed in both W and B for this rotation and θ is the angle between two arbitrary vectors
(fixed in W) and (fixed in B) which are initially equal. It should be noted that is fixed
for this rotation only, and is not guaranteed to remain fixed for subsequent rotations. Rotation

using Euler parameters can be conveniently expressed and efficiently computed using
quaternions.
Sign Up for Sensing Tips!
Conversion between these forms can be accomplished using the formulas found in this NASA
Technical Brief [2].
By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 3/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

Quaternions
A quaternion is a hypercomplex number of the form

(1)

where

(2)

For the purposes of this document, quaternions will be expressed in bold font. A more convenient
way to express (1) is as the sum of a scalar and a vector

(3)

There are several properties and definitions of quaternions that will be relevant to this analysis.

Table 1: Quaternion Properties and Definitions

Name Symbol Definition

Quaternion Conjugate

Quaternion Norm

Unit Quaternion

Pure Quaternion
Quaternion Sum a+b
Quaternion Product ab 
Quaternion Time Derivative Sign Up for Sensing Tips!

As mentioned previously, quaternions are a convenient way to express Euler parameters (


By signing up you are agreeing to our Privacy Policy.
rotations). This can be done by re-writing (3) as the unit quaternion

https://blog.endaq.com/how-to-measure-angular-motion#orientation 4/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

(4)

Suppose that is a vector in the body basis B. can be expressed as the pure quaternion

(5)

Suppose also that the transformation between the body basis B and the world frame W is achieved
by the rotation of θ about , expressed with the unit quaternion q as defined in (4). Transforming
into the world frame W can be done using

(6)

This operation is known as a frame rotation, because the reference frame is rotating and the vector
itself is unchanged. A proof for this relation can be found in [3].

Angular Velocity
The angular velocity of the body B expressed in the world frame W is denoted as . When
working with rotations, it is tempting to express the angular velocity of the rotating frame as

however, this is only valid if remains fixed in both frames! If is changing, the angular velocity is

(7)

(8)

the proof of which can be found in [4]. Since is a vector, it must be differentiated in a reference
frame (or vector basis). It turns out that the time derivative of is the same in both the world 
frame and body basis. Using (4), (7) can be written as
Sign Up for Sensing Tips!
(9)

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 5/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

where . This equation can be proven a number of different ways [1][3]. When
solving (9) numerically, the real part of may be nonzero, however this can be ignored to a
reasonable approximation.

Acceleration
In addition to calculating the angular velocity, quaternions can also be used to transform the
accelerometer data between reference frames. Acceleration is derived from position, and thus must
be defined in a reference frame as opposed to a vector basis. The most convenient way to form a
reference frame in this case is with a point and a vector basis. The choice of this point is arbitrary, as
the acceleration of one reference frame in another does not depend on the absolute distance
between any two points. Any vector, such as acceleration, can be transformed from one reference
frame to another using Equation (6).

It should be noted that the world reference frame is a non-Newtonian reference frame due to the
rotation of the earth. This effect may or may not be relevant to your measurements, depending on
the application and length of data acquisition.

Application to enDAQ Sensors


enDAQ sensors feature an IMU unit that outputs orientation in the form of an array of quaternions.
These quaternions provide the enDAQ sensor vector basis D (defined in Figure 1) in one of two
possible reference bases at each data acquisition point.


Sign Up for Sensing Tips!
Figure 1. enDAQ S4 Sensor with basis vectors labeled

The two possible reference bases are related


By signing toagreeing
up you are how the orientation
to our is calculated by the IMU:
Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 6/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

1. Absolute Orientation - The orientation is calculated using the gyroscope with corrections from
the accelerometer and the magnetometer. The reference basis is the world basis, W, which is
formed by pointing North, pointing opposite the gravity vector, and forming a right-
handed system
2. Relative Orientation - The orientation is calculated using the gyroscope with corrections from
the accelerometer only. The reference basis D0 is coincident with the enDAQ sensor basis D at

the first data acquisition point

More detail on the advantages and disadvantages of these two systems can be found in this enDAQ
blog post: Quaternions for Orientation.

The gyroscope in the IMU measures the angular velocity and then integrates to find the orientation.
This means that we can differentiate the orientation to find the angular velocity without worrying
about amplifying the noise. Figure 2 compares the angular velocity calculated using (9) and the
angular velocity measured directly by the IMU. It should be noted that the IMU in the enDAQ sensor
cannot simultaneously provide the orientation quaternion and the raw IMU angular velocity, so the
data in Figure 2 was taken by two enDAQ sensors mounted to the same rotating surface. The slight
variation between them is a result of differing noise levels, as well as imperfections in the cross-
correlation of the two signals.


Sign Up for Sensing Tips!

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 7/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

Figure 2. Angular velocity calculated by differentiating the quaternion and pulled directly from the
IMU

Acquiring Angular Velocity and Acceleration from an enDAQ Sensor


IMU
1. Format the enDAQ sensor by selecting absolute orientation or relative orientation.

2. Acquire the data.

3. Numerically differentiate the quaternion array to find using



Sign Up for Sensing Tips!

These lecture notes give a good overview of finite difference methods of numerical
integration. By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 8/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

4. Calculate the angular velocity and acceleration of the enDAQ basis D in the reference basis A
(where A is either the world basis W or the initial reference basis D0) numerically using

Equation (9) and Table 1.

where .

5. The reference basis that you chose may not be the most convenient for expressing the
angular velocity, so it can be transformed into a new basis N using

where q is the quaternion that describes the transformation between A and N.

Transforming enDAQ Sensor Acceleration Using Quaternions


The quaternion array can also be used to transform the acceleration data from the rotating enDAQ
sensor reference frame into a stationary reference frame at each data acquisition point using

where , D is the enDAQ reference frame and A is either the world reference frame W or
the initial reference frame D0 depending on if the unit is in absolute or relative position mode.

Conclusion
So that is your overview of angular motion and how to use an enDAQ sensor to measure rotation
and angular velocity. I hope you found it helpful. For more content like this, don't forget to subscribe
to our blog and if you have any questions, don't hesitate to leave a comment below or contact us
directly.

Related Posts:

Quaternions for Orientation



Vibration Measurements: Accelerometer Basics
Sign Up for Sensing Tips!
Frequency Leakage in Fourier Transforms

For more on this topic, visit our dedicated Environmental Sensors resource page. There you’ll find
more blog posts, case studies,Bywebinars,
signing up you are agreeing to our Privacy Policy.
software, and products focused on your environmental

https://blog.endaq.com/how-to-measure-angular-motion#orientation 9/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

testing and analysis needs.

References
[1] Basile Graf. "Quaternions and Dynamics". en. In: arXiv:0811.2889 [math- ph] (Nov. 2008). arXiv:
0811.2889 [math-ph].

[2] D M Henderson. "Euler Angles, Quaternions, and Transformation Matrices". en. In: (1977), p. 42.

[3] Yan-Bin Jia. Quaternions. Sept. 2019.

[4] Paul Mitiguy. Advanced Dynamics and Motion Simulation. 2015.

SHARE THIS
   


Sign Up for Sensing Tips!

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 10/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

Stanley Normile
Mechanical Engineer at Mide Technology

W H AT ARE Y OU R T H OU GHT S?

Comment
Enter your comment here...

First Name

Last Name

Email


Sign Up for Sensing Tips!
protected by reCAPTCHA
Privacy - Terms

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 11/12
10/17/23, 11:12 PM How to Measure Angular Motion with a Gyroscope

Post Comment

By signing up you are agreeing to our Privacy Policy

COMMENTS (0)

   


Sign Up for Sensing Tips!

By signing up you are agreeing to our Privacy Policy.

https://blog.endaq.com/how-to-measure-angular-motion#orientation 12/12

You might also like