Calculating Pitch and Roll Relative to a Velocity Vector from IMU Data

Click For Summary
SUMMARY

This discussion focuses on calculating the pitch and roll angles of an Inertial Measurement Unit (IMU) relative to a 3D velocity vector during motion. The IMU, which includes an accelerometer and gyroscope, is used to track orientation and movement, particularly in applications like frisbee throws. Key methods involve using arccosine of dot products between gyroscope direction vectors and the acceleration vector to derive pitch and roll angles. The challenge lies in accounting for an unknown initial yaw and the complexities introduced by the IMU's fixed position on a rotating platform.

PREREQUISITES
  • Understanding of IMU components, specifically accelerometers and gyroscopes
  • Familiarity with 3D vector mathematics and operations
  • Knowledge of Euler angles and their application in orientation tracking
  • Proficiency in using arccosine and dot product calculations
NEXT STEPS
  • Research methods for integrating accelerometer and gyroscope data for orientation tracking
  • Learn about quaternion representation for handling rotations in 3D space
  • Study the effects of centripetal acceleration on IMU readings in rotating systems
  • Explore the use of Kalman filters for sensor fusion in IMU applications
USEFUL FOR

This discussion is beneficial for robotics engineers, aerospace professionals, and developers working with motion tracking systems, particularly those utilizing IMUs for precise orientation and movement analysis.

FGD
Messages
46
Reaction score
12
I have an IMU that includes an accelerometer and a gyroscope. The IMU is moving through 3D space while rotating around it's z axis(yaw). Here's what I know so far:

  1. Velocity Vector: I have a 3D velocity vector (x, y, z) that was integrated from a resting position using the accelerometer data.
  2. Orientation: I also have an orientation in the form of euler angles, which has been integrated from the gyroscope data, starting from a rest position.
  3. Unknown Initial Yaw: The initial yaw around the Z-axis is unknown.
At a specific point in time, I want to calculate the Pitch and Roll angles relative to the velocity vector.

My question is: How can I determine the pitch and roll angles of the IMU relative to its velocity vector given this information? Are there specific formulas or methods that account for the unknown initial yaw?

Below is a 2D diagram that will hopefully help with understanding what I am trying to accomplish. My end goal though is in 3D space.

ConvertAccelXYRotationsToPitchRoll.jpg
 
Last edited:
Physics news on Phys.org
What's an IMU? I can guess, but it's best if you would define your terms. Can you link to the datasheet?
 
berkeman said:
What's an IMU? I can guess, but it's best if you would define your terms. Can you link to the datasheet?
This is the IMU. https://www.adafruit.com/product/4464. Nothing fancy.
 
  • Sad
Likes   Reactions: berkeman
Pitch and yaw should be available from the 3 gyroscope direction vectors. So, these axises are defined relative to the IMU board. Pitch and yaw angles are obtained from arccosine of dot products of pairs of these vectors. Which vectors depend on your convention choices.

Also, the up vector comes from the acceleration vector.
 
Paul Colby said:
Pitch and yaw should be available from the 3 gyroscope direction vectors. So, these axises are defined relative to the IMU board. Pitch and yaw angles are obtained from arccosine of dot products of pairs of these vectors. Which vectors depend on your convention choices.

Also, the up vector comes from the acceleration vector.
Is this correct? "arccosine(opposite/hypotenuse) using opposite = dot product(x, roll) and hypotenuse = dot product(y, pitch)?

Below is exacly what I am trying to accomplish.
Initial Orientation and Tracking During the Throw:

  1. Determining Initial Orientation:
    • At the start of the throw, while the IMU (Inertial Measurement Unit) is stationary, I calculate the initial orientation using the accelerometer data. This is based on the ratios of the accelerometer readings to the gravity vector (assuming the IMU is at rest and thus only measuring gravity at this point).
    • This initial orientation is relative to the IMU's coordinate system.
  2. Tracking Rotations During Flight:
    • Once the throw begins, I continuously integrate the gyroscope data to track the rotations of the IMU over time.
    • Since the IMU is mounted on a frisbee, I want to determine the exact pitch and roll of the frisbee relative to the throw direction at the moment it leaves the hand.
  3. Calculating Relative Tilt:
    • To find this tilt, I plan to:
      • Compute the difference in angles between the velocity vector (direction of the throw) and the accelerometer data at the moment of release.
      • Use this difference to rotate around the disc surface and derive the pitch and roll angles relative to the throw direction.
 
I missed that the IMU is fixed to a rotating platform. This will make things significantly more complicated. If the unit is off the center of rotation, the accelerometers will have centripetal components. I have no idea off the top of my head what the effect on the gyroscopes will be. I don’t think this is a common use case for IMUs.
 
  • Like
Likes   Reactions: berkeman

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 49 ·
2
Replies
49
Views
4K
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
11K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
14K