open-dynamic-robot-initiative / master-board

Hardware and Firmware of the Solo Quadruped Master Board
BSD 2-Clause "Simplified" License
120 stars 41 forks source link

Spikes in motor velocity when passing 0 position #91

Open jviereck opened 3 years ago

jviereck commented 3 years ago

This is a long/known issue with the velocity reported by the cards. Basically, when passing the zero position of the motor, the velocity jumps and a spike shows up in the velocity plot. See the plot enclosed which is from squatting motions on solo12 using a slider box.

On the micro drivers we are running a velocity estimator. My best guess is that this estimator is buggy with respect to jumping at 2 pi angles.

image

luator commented 3 years ago

Unless this is handled differently in the SPI-version of the motor board, the velocity is estimated by the SpinTAC library (search for STPOSCONV_getVelocity/STPOSCONV_getVelocityFiltered in the code) which is unfortunately closed-source, so I'm afraid this will be difficult to debug :( There might be some parameters to influence its behaviour, I'm not sure.