In the existence of torque caused by the hanging object, the controller becomes unstable.
Some parameters
max motor torque
max object torque
9e-3Nm
0.01kg x 10m/s2 x 0.05m=5e-3Nm
Without object external torque: Kp=400 Ki=0 Kd=0. Quick converge.
With object external torque: using the same parameter have ~40% convergence error. When changing the Ki to a larger value like 1e6 (integration ~ 0.02 x 2e4 = 4e2. 400*1.0=4e2). There is a little overshoot, but the problem is resolved.
In the existence of torque caused by the hanging object, the controller becomes unstable.
Some parameters