Sensor Fusion drift in Roll and Pitch

edited July 2020 in General

Hi
We did some testing yesterday and experienced drift from our MMCs.
It was in jumping with skis and the in-run is rough and there are a lot of mini vibrations.


It starts well at the beginning, but with higher speeds in the in-run (therefore more vibrations) it starts to drift sooner or later. After the takeoff it stops drifting and a little later after the landing the fusion recovers again. In theory roll and pitch should stay about the same (+/- 2-3°) up to the takeoff.
This or similar behavior was measured on all 10 jumps, but some few single sensors seemed to stay correct.

Data gets logged; euler angle and linear accel
MMC: 0.1&0.2, 1.5.0, MN 6
Host is Metahub
Fusion Model was IMU_PLUS and sensors with 16g and 2000dps
In the attached files, the shown sequence starts @09:56:14

In the forum I found this in an older thread, which seems similar to me:
https://mbientlab.com/community/discussion/2240/sensor-fusion-makes-lots-of-noice#latest

My questions are now:
1.
Would you agree that vibrations is the cause of this drift?
If yes: Is there a way to improve my recordings with metahub settings which I could adjust?

2.
In this other thread there is a discussion about a filter mode (1/2 & 1/4) for the BMI160 directly after accel and gyro and before Fusion. e.g. gyroBMI160.filterMode = .OSR4
Is this something that would maybe help me here too, or do a test with it. And is it usable without writing a complete custom app?

Thanks in advance
Goam

Comments

    1. You can test this by seeing if there is drift without the vibrations. You can also try out the other sensor fusion modes to see if you get better results. The magnetometer could also be an issue if there are strong magnets nearby (even a battery is a magnet).
    2. Since you are already using the MetaHub, you already have all the example code pre-loaded so you don't have to write your own app from scratch. Just pick JS or Python and update ones of the examples with your desired sensor fusion settings and run it: www.mbientlab.com/tutorials.
  • 1.
    Sensordrift does not happen without the vibrations. Just wanted to ask if you could think of anything else that would cause it. We´re using IMU_PLUS so the magnetometer shouldn't be a problem?
    2.
    You are right. But I am having difficulties finding these filtermode properties for the BMI160 your colleague Eric mentioned in the link from my initial post (he only posted Swift there...)

    `// Set accelerometer settings
    if let accelerometerBMI160 = device.accelerometer as? MBLAccelerometerBMI160 {
    accelerometerBMI160.fullScaleRange = .range8G
    accelerometerBMI160.filterMode = .OSR4
    }

    // Set gyro settings
    if let gyroBMI160 = device.gyro as? MBLGyroBMI160 {
    gyroBMI160.fullScaleRange = .range1000
    gyroBMI160.filterMode = .OSR4
    }

    // Set sensor fusion settings
    device.sensorFusion?.mode = .nDoF
    // Start the sensor fusion stream
    device.sensorFusion?.eulerAngle.startNotificationsAsync { (obj, error) in
    // ... use obj as needed ...
    }.failure {
    print($0)
    }`

    1. Probably you either aren't using the magnetometer sensor fusion mode or there is something interfering with the magnetometer.
    2. You will need to do the translation in the language of your choice. Think of it as pseudo-code.
Sign In or Register to comment.