SimpleFOC V2.4.0 velocity noise

Trying the new Version 2.4.0 but found the velocity noise is high than the old version v2.3.5

The following picture shows the v2.4.0 velocity noise level

This thus in position mode ,the motor can not stop stable, it continue moves a little bit left and right.

I try AS5600 and AS5047 sensor and also try STM32 and ESP32 MCU, same result. so this is not the hardware issuse. and I also try to adjust the PID and LPF, still not stable as v2.3.5

The following Fig shows the v2.3.5 velocity noise ,very low level.

Hmm, did you use motor parameters with v2.3.5? Did you set the phase resistance and kV rating?

If yes the equivalent torque control mode would be estimated_current in v2.4.0.

Otherwise I don’t see a good reason why the velocity would be more noisy, especially with the same filtering parameters. And across sensors and MCU architectures.

Is the velocity equally as noisy in torque control mode?

What you can try is increasing the minimum time between the velocity calculations. By default it’s 100us. You can make it 1ms or even higher if needed.

sensor.min_elapsed_time=0.001;//1ms