Help understanding high bandwidth operation

Hi! I’m doing some tests to try and figure out the limits of ODrive’s high-bandwidth performance. When doing so, I’m running into some behavior that I haven’t been able to understand or tune out. First, my test setup:

I have a 5208 class brushless motor with an AS5147P encoder connected in SPI mode. I’m running a 24V ODrive off a 24V/20A lab power supply. My test motion uses the trajectory planner to move at roughly a constant velocity from position 0 to position 1. I set the trajectory config to have very high accel/decel (10000.0) so as to make the velocity waveform as square as possible. I’ve increased the current and encoder bandwidth to 500Hz (3141 rad/s) and set the vel_integrator_gain to 0. With a 20rev/s motion, I get a weird overshoot and slow return to the final position that I haven’t been able to understand.

Here’s a 1000fps video of the motion:

Are there config options I’m missing? The ODrive parameters I believe are relevant are at: In [322]: odrv0.axis0.motor.config O -

My initial guess would be that because such high accelerations are not physically feasable, you get some integrator windup which you see decaying to the final resting state. However since you disabled the velocity integrator I am not certain. I suppose it could be the current control integrator, though 3000/s bandwidth is quite fast compared to the recede dynamics you see, so not sure if it’s that.

It could also be cogging torque, and the fact that the velocity integrator is disabled it is not able to resist the drift due to the cogging.

Thanks. Yeah, it is hard to imagine that cogging torque would cause that, since the cogging torque is largely time invariant. I guess I’ll have to keep fiddling to figure out where the additional integration is coming from.

What happens if you further increase the encoder bandwidth? We don’t feed the expected velocity forward to the encoder estimation, so I wouldn’t be super surprised if the position / velocity estimator was overshooting (it’s a critically damped 2nd order characteristic at the bandwidth you’ve specified)