Large amounts of noise present in velocity control


I am benchmarking the ODrive’s different control settings for a project, and I have found that both velocity and current control exhibit a lot of noise, and was wondering where the noise is coming from.

The following graph is sampled at 50Hz (so over 5 seconds). Despite the fact that velocity is what is being commanded (third from top) the measured encoder position graph (top) looks very smooth. The measured velocity (second from top) retrieved from the ODrive looks shockingly jagged. Also surprising is that the derivative of the measured position graph (bottom) is significantly smoother than the actual measured velocity graph; this seems conflicting.

Current control appears to have similar noise charactaristics, but position control tracks the sine wave with very little noise.

Thank you,

1 Like

How many counts do you have on your encoder? Using a low-count encoder with a fast-updating control loop means that the measured velocity can have a lot of noise due to quantization errors.

I am using an encoder with 8192 counts per revolution; if the encoder count was too low, then wouldn’t the numerical derivative (bottom plot) also be noisier?

That depends on the sample rate and/or effective bandwidth of the differentiation. On the ODrive this is determined by encoder.config.bandwidth. Default is 1000/s, but you can change it to your needs. the tradeoff is between noise and response time.
If your sample rate is slower than 1000Hz on the position plot, it’s derivative will appear more filtered.

1 Like