Strange problem - noisy performance first few seconds on every startup

I am using GIM4305 10:1 gear motor from Steadywin. It is run on 14.4v, Atmelsam custom driver, closed-loop with AS5047D encoder.

After every run it is changed to ME0. When I restart it, the motor is very noisy first 5-7 seconds. Then it starts running smoothly. It happens ever time.

If the motor is going back and forth in a loop, then it does not happen after every loop, only happens the first time it is activated ME0 > ME1.

Also, if you listen to the noise in video before the motor starts, there is some oscillation noise even when motor is on Zero, I somehow can’t get rid of it.

EDIT: I get that constant noise if I take it to 35rpm at 14.4v. On the other hand, the PID seems good with following output:

Screenshot from 2024-05-22 16-20-48

My PID values are as below:

motor.controller = MotionControlType::velocity;
motor.torque_controller = TorqueControlType::voltage;
motor.foc_modulation = FOCModulationType::SinePWM;
motor.voltage_limit = 14.4;
//motor.current_limit = 1;

motor.motion_downsample = 5;
//motor.voltage_sensor_align = 1;

// need to be tuned
motor.PID_velocity.P = 0.17;
motor.PID_velocity.I = 1;
motor.PID_velocity.D = 0.0002;
motor.LPF_velocity.Tf = 0.085;
//motor.LPF_angle.Tf = 0.01;
//motor.PID_velocity.output_ramp = 1000; // lets keep this quite low!

Any suggestions?

Hey,

If the noise is happening only after calling ME1, then perhaps it can help to reset the PIDs before enabling?

motor.PI_velocity.reset()

Otherwise I can’t really explain at the moment why the motor would “change noise” during operation, without any other commands sent…

Thanks!

I’ll give it a try.