Video of IMU Drifting Test on Rumble Strips (Nose Dipping/Lifting)

As it stands, IMU Drifting is in my opinion easily the biggest thing holding back VESC when it comes to both racing and even casual riding to an extent. I have a rumble strip spot out by my place that I decided to do some testing on to show this issue in action, and help provide data for those with minds bright enough to potentially help resolve this.

Accidentally left Torque Tilt on, which is why the slight nose up in pitch when accelerating. Bump Comp set to 500/0.5. Bumps are 10.5cm wide, 20cm apart, meaning the actual impacts (leaving the bump) are 30.5cm apart. Bumps are maybe 1cm deep. Most problematic speeds were ~3-7mph, which equates to a frequency of around 4-11 Hz (if 1Hz = one bump / rumble strip per second).

Going faster than this would usually either keep the board somewhat level, or even raise the nose weirdly enough. Keep in mind, increasing the frequency in this situation also naturally lessens the amplitude since you’re airing over the bumps more, so it’s hard to say which variable is more at play here. Honestly, I’d bet the amplitude is a bigger factor here.

Worth noting that when going over the rumble strips, the IMU reading for Roll is also very evidently drifting. Likely in the same way as pitch is, but since the board stays rolled straight under my feet, it can’t try to correct that like it does for pitch with dipping/lifting.

Hard to say if this directly mimics the same problem we’re having on high speed trails, especially since this specific spot also happens to make FM boards nose dip in a similar way which is a rarity, but still worth taking a look at.

YouTube Link: VESC Bump Test (DETAILS IN DESCRIPTION) - YouTube
Google Drive Link: https://drive.google.com/file/d/1vNPFWP70W16Pshf7xCXZoKRqUHFJrGed/view?usp=sharing

3 Likes

Follow up, noticed that IMU Pitch Drifting was almost always accompanied by IMU Roll Drifting as well. However, unlike the Pitch which the board tries to compensate for with nose lifting/dipping, Roll is physically controlled by the rider. Therefore, the effects of IMU drift can be witnessed in the Roll value. After noticing this, I decided to run a quick test with Turn Tilt to see how effective it would be to utilize this Roll Drift to trigger tiltback, fighting against nose dipping

To achieve this, I used fairly strong Turn Tilt, with a strength of 45, max angle of 12 degrees, and a quick tilt speed. Allowing IMU Roll Drift to trigger turn tilt does in fact help greatly with countering negative Pitch Drift (nose dipping), though it still negatively impacts riding and can work against you if the IMU confusion actually causes the nose to raise vs. dip, since the roll is still affected the same way. It certainly isn’t a real world solution, just a proof of concept test. Nonetheless, it shows promise as a potential tool to help detect when the IMU is confused and potentially help combat it.

Video of Turn Tilt Test: VESC Bump Test w/ TURN TILT (DETAILS IN DESCRIPTION) - YouTube

From what I understand, the nose dipping is caused by the high Mahoney Kp, I solved nose dipping on my board by lowering it to 1, and adjusting other parameters to smooth it out. I like a pretty aggressive ride though, so maybe not ideal for everyone.

High Mahoney KP definitely intensifies the effects of IMU confusion greatly due to the nature of it. Unfortunately, a high Mahoney KP so far has been the only reliable option to achieving the soft FM-like board behavior I’m after, where I have a great amount of control over the board’s angle.

For high speed trail racing, this behavior can often be crucial for navigating quick ascents and descents without losing too much momentum and making sure the nose or tail clears. Luckily, this behavior at least makes the nose dipping somewhat controllable and manageable with enough skill, but still definitely far from desirable.

Ive been dealing with i belive this same issue since i installed my vesc. Tiny bumps before say a parkong block are throwing the board off. Especially when in coming at it on a angle, its a nightmare i cant stand it .

This is a cool problem that I will probably put some time into. Thanks for the video. That is a great test spot.

I have always noticed some nose down behavior on the FM onewheel at the bottom of steep dirt hills. Usually, mountain bikes will rut up the bottom of the hill from hard braking essentially making a set of speed bumps. I don’t feel like it is worse with the VESC but I’m sure we can make it better. I see a few possible approaches:

  1. Reduce mahony kp and re-tune across the board like massagineer suggests. I would like to try this. Could you provide the other parameters you changed @massagineer?
  2. Has anyone tried the madgwick fusion? I wonder if that would clear up the noise or if madgwick makes it too slow or something.
  3. We can try introducing secondary filters like Kalman at some point but that might be cumbersome.

I’ve done some more research into this issue. It seems to be a problem for all imu systems that experience high vibration. My understanding is that high translation accelerations will cause drift. Shown in this video. To improve this without reducing the response time we can model the acceleration to remove it or by improving the accuracy of the gyro integration. Essentially, the system needs more information or more accuracy to improve.

This lines up with my own RT data where accel x and y will start going nuts when the pitch starts to drift. I have tried madgwick fusion with mahony kp 2 and madwick beta 2. It feels a little less twitchy than normal mahony but that might be placebo. I don’t notice any effect on pitch drift.

Apologies for the late response, just slowly catching up on a lot, but this video is a precursor to Mitch’s Accelerometer Lowpass Filter, which when applied aggressively on the Z-Axis (we use 1Hz), it tends to solve this issue nearly completely if not completely. It’s set by the IMU wizard automatically if you select Balance Skateboard, but make sure you have Accel Lowpass Z set to 1Hz under App CFG → IMU. @Kjberger Just tagging you as well since you also mentioned struggling with this.

Of course, there is also still the factor of losing traction on bumpy offroad terrain, which can have a similar effect but isn’t due to IMU confusion, but rather not being grounded enough or having the traction needed in order for the board to catch up underneath you, leading to the nose dropping or drifting down until you catch your balance or traction is regained.

Thanks for the update. I have been running 1hz lowpass z since we moved over to 6 and I don’t think that solves it completely.

I actually pretty satisfied with how it works, but I don’t race so I can just slow down in the chop. I would be interested in a data comparison on the rumble strip with lowpass filter. Can’t find a feature quite as good so I am just capturing data out on the trails.

I have thought about traction and how it creates a sort of PWM, where your power is reduced by the amount of time you lose traction. But given a steady period of traction loss, the PID loop should still increase output to until the nose lifts. Assuming you are not at maximum output of course.

I dont have video with data like here, but i can confirm at least on this rumble strip that there is absolutely no nose hunting at any speed with the Accel Z Lowpass filter.

1 Like

Is there actually easy software solution? How do electric unicycles deal with it?

Maybe stupid idea → Would not be easier just to have two IMUs(imu chip is not expensive) with exact distance from each other, one fliped upside down, and let math to cancel the imu drift?

Read my comments above, we deal with this using a lowpass filter on the Accelerometer Z Axis. The main reason this is an issue in the first place is our heavy use of a strong Mahony Filter (Mahony KP of ~2.0), which heavily relies on the accelerometer much more than without (Mahony KP of ~0.2 is closer to what would be expected for an EUC). We use this to get the delayed, “drunken” feel that actually makes the board feel good to ride, but due to how much bumps affect the accelerometer, this lowpass filter is required on the accelerometer in order to prevent nose hunting.

1 Like