What is the difference between pos_estimate and pos_cpr?

Hello

I just got my Odrive and it is an amazing piece of hardware that I might buy more of in the future. However, the documentation lacks a section dedicated to defining each variable in Odrive.

Currently I am trying to understand the difference between pos_estimate and pos_cpr. Both seem return the value of the encoder but they don’t show the same value (usually off by 3~5 counts). I know that pos_cpr clamps the position to values between [0,encoder cpr -1 ] but why they don’t show the exact same value in this range?

Thanks all.

pos_cpr uses a raw count from the encoder (like shadow_count). pos_estimate is an estimate of the position, based on the last position and the estimate of velocity. It’s intended to remove phase lag in the position measurement (see https://en.wikipedia.org/wiki/State_observer)

was going to ask that question but decided to do a search before asking, thanks for the reply as it answered same question