How can I optimize my position loop control?
I am using MCSDK 5.Y.4 and add position loop.My controller sends a position command every 4ms.
err=target_pos - current_pos,then the err value (multiply by P) is the speed loop pid input.But I found that the speed is not smooth when the motor changes direction.
There is a lag problem between the current position curve and the target position of the position loop.My position loop only uses P control, no I.

