Precise low speed velocity control

I’m trying to control a motor (27 slots, 30 poles) at 0.1 rev/s with an AS5304 encoder (6880 encoder counts per revolution). At low speeds I get the following output:


blue is vel_estimate
orange is vel_setpoint

The vel_estimate plotted in the graph seems to have discreet jumps that are linked to the encoder bandwidth parameter.

Decreasing this bandwidth parameter from 1000 to 500 seems to improve the velocity estimate resolution, but still doesn’t improve the steady state oscillation.


blue is vel_estimate
orange is vel_setpoint

I performed the anticogging calibration but I don’t think that made any difference.

Are there any encoder parameters I can change to improve this low speed performance?

That is extremely slow. You will need a high resolution encoder, sensor linearity calibration, and tight tunings. The fact that you’re getting +/- ~ 2 count/second resolution is astounding already lol.

You can try reducing the encoder bandwidth a lot more, like 100 or lower, as long as you don’t accelerate too quickly.