Arduino-FOC-dcmotor icon indicating copy to clipboard operation
Arduino-FOC-dcmotor copied to clipboard

Small voltage still being applied to the motor after reaching target

Open AndBondStyle opened this issue 8 months ago • 0 comments

When using velocity control (and probably position control also) small voltage/pwm duty is still being applied to the motor after it's completely reached its target (e.g. velocity = 0). It's too small to cause the motor to rotate, but still produces some humming noise similar to coil whine. Right now I'm running velocity control with P=2.0, I=20.0, D=0.01 and OUT_RAMP=200.0. As a workaround, I modified the driver a little to disable PWM output if input voltage is too small (1V in my case, with 12V supply).

Below is an example of stopping the motor (aka target velocity = 0) plotted with FOC studio

Image

My question: is this expected behavior or could it be fixed with more PID tuning or other config options?

AndBondStyle avatar Jun 09 '25 11:06 AndBondStyle