IMU -> rotation angle -> quaternions

In summary, to determine the rotation of an IMU using quaternions, you can use an Extended Kalman Filter to fuse together accelerometer and gyroscope data, and then use the quaternion equation to calculate the orientation.
  • #1
ritchie888
1
0
I'm trying to determine the link between an IMU I have (tri-axis accelerometer, gyroscope, and magnetometer) and determining its rotation using quaternions.

I've spent a while reading up on the IMU's properties, and quaternions, but I can't get my head around how the two meet.

So, scenario: I have my IMU collecting accelerometer data (in G's) and gyroscope data (in degrees/s) at 64Hz (for example, we're also ignoring magnetometer here). My IMU is sitting on a desk with x pointing away from me, y pointing to the left, and z point up to the sky. The accelerometer data will read x = 0, y = 0, z = 1 (due to gravity). I turn my IMU by 90° to the left (x pointing to the left, y pointing towards me, z still pointing up, data remains the same) and then put it on its side (x still pointing left, y pointing to the ground, z pointing towards me, data now x = 0, y = -1, z = 0. Gyroscope data of course changes during the movements.

Now, I know I need to do some form of double integration to get the acceleration to velocity and then position. But what exactly I'm not too sure. I assume once the necessary calculations have been performed they will be in an angular form which I can put into the quaternion equation.

Could someone please help me break down the task/math so that I can work out the rotation, please.

Thank you!
 
Physics news on Phys.org
  • #2
The best way to approach this is by using an Extended Kalman Filter (EKF). An EKF fuses together the accelerometer and gyroscope data, and then uses the quaternion equation to determine the orientation of the IMU. The EKF will take in the accelerometer and gyroscope data as inputs. The accelerometer data will be used to calculate the linear acceleration of the IMU, while the gyroscope data will be used to calculate the angular velocity. From this, you can integrate to get the linear and angular positions of the IMU. You can then use the linear and angular position data to calculate the quaternion describing the orientation of the IMU. Specifically, you would use the following equations:Quat = [cos(θ/2), ax*sin(θ/2), ay*sin(θ/2), az*sin(θ/2)]Where θ is the angle of rotation, and ax, ay, and az are the components of the axis of rotation. Once you have the quaternion, you can then use it to determine the orientation of the IMU.
 

Related to IMU -> rotation angle -> quaternions

What is an IMU?

An IMU (Inertial Measurement Unit) is a device that measures and reports a body's specific force, angular rate, and sometimes the orientation of the body. It typically consists of accelerometers, gyroscopes, and magnetometers.

How is rotation angle calculated from an IMU?

To calculate rotation angle from an IMU, the angular rate data from the gyroscope is integrated over time. This integration yields the change in rotation angle over a specific time interval.

What are quaternions in relation to IMU and rotation angle?

Quaternions are a mathematical representation of orientation and rotation. They are used to represent the three-dimensional rotation of an object in space, making them useful in IMUs for measuring orientation and rotation.

Why are quaternions preferred over other methods for representing rotation?

Quaternions have several advantages over other methods for representing rotation, including their compactness, numerical stability, and ability to avoid singularities. They also have faster computation times compared to other representations.

How are quaternions converted into other representations of rotation?

Quaternions can be converted into other representations of rotation, such as Euler angles or rotation matrices, using mathematical equations. These equations take into account the properties of quaternions, such as their non-commutativity and the unit quaternion constraint.

Similar threads

  • General Engineering
Replies
2
Views
2K
  • Mechanical Engineering
Replies
3
Views
515
  • Advanced Physics Homework Help
Replies
1
Views
664
Replies
3
Views
764
Replies
2
Views
800
  • Mechanical Engineering
Replies
2
Views
1K
Replies
8
Views
2K
  • Mechanics
Replies
3
Views
138
  • Mechanics
Replies
10
Views
1K
Replies
8
Views
3K
Back
Top