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

Thanks for reply. I did not set the phase resistance and kV rating.

I tryed this parameter sensor.min_elapsed_time=0.001;//1ms

The noise level see fig below. seems better but still can not reach the V2.3.5 level.

This is the only filter difference I know of between 2.4.0 and 2.3.x (not sure it applies to your case). This is the code to come back to the former default:

   // Disable current LPF.
   // This was not required in previous FOC versions, but FOC v2.4.0 added
   // LPF_current_q filtering in the estimated_current torque path, which didn't
  // exist in v2.3.x voltage mode. Adding this filter introduces phase lag.
  this->LPF_current_q.Tf = 0;
  this->LPF_current_d.Tf = 0;