Maximum Encoder CPR for Anti-Cogging

Hello everyone,

I am trying to use the anti-cogging feature on ODrive and I’m facing the following problem.

My encoder (AS5047P) can work either on ABI (4000 cpr) or SPI (16384 cpr). So far, I was using the ABI and the anti-cogging was working successfully. However, due to the relatively poor analysis, in position control, the motor oscillates between two positions when stationary.
I checked, and the oscillation is fixed with the higher analysis of SPI. However, I hadn’t tried anti-cogging yet, as according to this thread, using an encoder with too high cpr is not suggested, because it will take over a large portion of RAM.

Does anyone know if 16384 cpr is within allowable limits? Otherwise, what is the maximum acceptable cpr? (I will be using only one motor)

Thank you in advance.

At least in the ODrive 3 source code, the anticogging map is fixed to 10 values per degree, so it shouldn’t matter how precice your encoder is.

2 Likes