kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.04k stars 472 forks source link

Limitations/Considerations when 3D-tracking a fast rotating object for 1 second #494

Open MichaelQun opened 7 months ago

MichaelQun commented 7 months ago

Hello Kris,

at first i would like to thank you for the work you've put in in this implementation - really cool!

Prior to starting my little project i would like to know your thoughts if f it is possible to 3D-track a fast rotating object (skateboard, max 1000 deg/second) for 1 second max. The IMU will be fixed to the skateboard.

I was thinking about tracking the 3D rotation/movement of a skateboard which is rotating with max 1000deg/second. The 3D tracking is as said just 1 second which is basically the time the board is in the air.

To achieve this, I plan to utilize an ESP32 and an MPU-9250. By using the Quaternions (and subtracting gravity), my intention is to double integrate the linear accelerations to get the board's position in 3D during the trick. Do you believe this approach is viable, with a reasonable margin of position error?

If you send me your paypal address i will buy you a beer for your invested time in the answer.

TY

kriswiner commented 7 months ago

Thanks for the kind words!

"Do you believe this approach is viable, with a reasonable margin of position error?" In a word, no.

I am not sure why simpler absolute orientation wouldn't suffice here but if you intend to derive absolute 3D position then this will be very challenging.

There are several problems you must overcome before this could work accurately. These include:

1) Proper calibration of the sensors for scale errors, off-axis and cross-axis alignment errors, etc 2) Gyro drift 3) Magnetic interference from the environment or the ESP32 (500 mA!) 4) Fusion rate at the rate of the gyro, or logging for off-board analysis. If you would be seeing 1000 degrees per second rotation rate, I would think the data read/fusion//logging rate would need to be a few times this, so 2

And there are others I am sure...

The one thing in your favor is the short time required to track the position. But this alone is not going to be enough without addressing at least these issues first. This is because each of these factors adds error to the orientation estimation which is magnified rapidly by each integration step such that at the end you will have a poor position estimation, even over a 1 second time interval.

This https://www.tindie.com/products/onehorse/usfsmax-module-and-carrier/ could help with 1) and 4), this https://github.com/kriswiner/ICM42688 could help with 2) although we haven't finished testing this solution in the module form factor. You could try to use a lower power MCU like this https://www.tindie.com/products/tleracorp/katydid-wearable-ble-sensor-board/ one designed for such an application to reduce 3). In order to deal with 5) you would need some kind of gain scheduling to derate the accel during high interital forces. We are working on this too (same problem when trying to measure orientation in an airplane), but it is not ready to productize yet.

I would recommend adding an accurate barometer like the LPS22DF https://github.com/kriswiner/LSM6DSV_GestureEngine/blob/main/README.md, which allows altitude changes of ~3 inches to be detected easily and at very low power. If you measure height changes accurately and independently this will help constrain your 3D position estimate.

All that being said, I would encourage you to try it. The material cost is low and you will learn a lot. And it just might work well enough for your application, who knows?

Please keep me informed of your progress. Thanks!

On Sun, Feb 25, 2024 at 2:12 AM Michael Q @.***> wrote:

Hello Chris,

at first i would like to thank you for the work you've put in in this implementation - really cool!

Prior to starting my little project i would like to know your thoughts if f it is possible to 3D-track a fast rotating object (skateboard, max 1000 deg/second) for 1 second max. The IMU will be fixed to the skateboard.

I was thinking about tracking the 3D rotation/movement of a skateboard which is rotating with max 1000deg/second. The 3D tracking is as said just 1 second which is basically the time the board is in the air.

To achieve this, I plan to utilize an ESP32 and an MPU-9250. By using the Quaternions (and subtracting gravity), my intention is to double integrate the linear accelerations to get the board's position in 3D during the trick. Do you believe this approach is viable, with a reasonable margin of position error?

— Reply to this email directly, view it on GitHub https://github.com/kriswiner/MPU9250/issues/494, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTDLKT5C4VFIFROCBS2663YVMFBFAVCNFSM6AAAAABDYXWH4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TENRZGIYTONQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>