I have a question about the IMU sensor

Hi, I am conducting an experiment to rotate GoPiGo3 in-situ and measure the rotation angle with the IMU sensor.

We use the gyro sensor and compass sensor built into the IMU. Since each of these sensors has noise and accuracy problems, I use sensor fusion using an extended Kalman filter to estimate more accurate angles. The state equation is formulated from the angular velocity measured by the gyro sensor, and the observation equation is formulated from the rotation angle measured by the compass sensor. But I had a question here, which measurement values should I use here, magnetometer(mag[0],mag[1],mag[2]) or Euler Heading(euler[0]) on the IMU sample program?

If anyone can tell me, please let me know.

3 Likes

I am very excited to see someone experimenting with the BNO055/DI Inertial Measurement Unit. In my tests, I ended up not using the mags at all - and got better accuracy using the IMUPLUS mode:

BNO055.OPERATION_MODE_IMUPLUS
# (Fusion using only gyros and accellerometers - no magnemometers)

The Euler data is the output of the fusion processor which is running its own filters, so you may want to take the gyro data and the accelerometer data as input to your EKF combined with wheel encoder data?

You may want to take a look at my pypi packages:

- imu.safe_read_gyroscope()              # returns the gyroscope values x, y, z
- imu.safe_read_accelerometer()          # returns the accels values x, y, z
2 Likes

Thank you for your reply.
I also initially tried to use the angles that can be calculated from the accelerometer and the angular velocity from the gyro sensor, but I figured that the calculation from the accelerometer would not give me the rotation angle yaw angle that I need. The source of the information is here.

https://memo.soarcloud.com/6軸imu~拡張カルマンフィルタ/

“Note that the ψ angle cannot be estimated by the 3-axis acceleration sensor alone, so a 3-axis gyro sensor or a compass sensor is required. The ψ angle is excluded from the equation of state of the extended Kalman filter below, because the extended Kalman filter utilized as a sensor fusion method can only obtain angles that can be estimated by multiple sensors. Alternatively, by adding a compass sensor that can separately observe the ψ angle, the extended Kalman filter can be applied with 9-axis IMU = 6-axis IMU + 3-axis geomagnetic sensor.”

3 Likes

Here are the formulas for the relevant sections.


Sorry for sending the screenshot written in Japanese.

3 Likes

Right. That is why you must use the angle computed from the two wheel encoders with the gyro+accel data.

But it sounds like you are swimming in this more than I can manage, so as mentioned before, I look forward to hearing about your success.

3 Likes

@alex02061022 I ran across an interesting statement today that may influence your work:
“In this video, I have demonstrated how to get absolute orientation from BNO055 using quaternion. All problems related to sensor orientation is resolved. BNO055’s Euler data is not accurate, so as my complementary filter and hence I had to use quaternion data.”

1 Like