Finally figured out the PID settings for the Lichuan servos and the LinuxCNC PID controllers. It's rather important to get the STEPGEN_MAXVEL and STEPGEN_MAXACCEL values high enough, otherwise the stepgen won't allow the servos to move fast enough to satisfy the PID controllers.
This is what I ended up with on the X axis.
STEPGEN_MAXVEL = 125
STEPGEN_MAXACCEL = 750
P = 60
I = 40
D = 1
FF0 = 0
FF1 = 0.4
FF2 = 0.01
BIAS = 0
DEADBAND = 0.0045
The FF1 is similar to the D term but the effect is slightly different, so I found there was benefit in playing with both. Similarly, the FF2 (a second derivative of the position error) was beneficial although the value is very critical. Intuitively, the term addresses the inertia of the system.
Let's just say, the performance looks pretty reasonable.
Can't complain about that. It's certainly a lot better than what I was seeing a couple of days ago and it's a Good Thing I didn't give up back then.
No comments:
Post a Comment