Discussion Regarding Triangular Calibration

I’ve been diving into the calibration code to see if I can understand it and make some sort of progress using chain compensation factors. One thing I noticed was that there’s a “sled drift compensation” factor which, from what I can tell, is a fudge. It’s not used in the model so it’s an indication that it can’t arrive at a solution without fudging. If I’m correct, if this value is not zero it suggests there’s something else wrong that’s not getting calibrated. The way the calibration works, if you don’t change this sled drift compensation value, you can’t correct the error to cut 3.

So, I’ve spent some time modifying the calibration routine to incorporate the calculation of chain compensation into it AND also allow for calibration of the distance between motors based upon the error in cut 3. After a bazillion test runs trying to figure out the right way of doing it, I’ve been able to arrive at a set of parameters that actually meets the calculation goal (error <0.0001) …

My initial conditions when I ran the calibration test last night were:

motor spacing: 3600.862
y offset: 469.12
rotational radius: 132.992
chain sag: 27.48982
left chain tolerance: 0.3479
right chain tolerance: 0.3605

With these values, I ran a test cut and got the following measurements (this was done using some other tweaks I did to the firmware to possibly correct for issues with chain compensation)
My cut values were:
cut12: 1928.8
cut34: 1927.2
cut5: 236.536
bit: 6.35

I ran my modified calibration routine and after 9141 iterations, I ended up with the following values:

motor spacing: 3602.6
y offset: 468.9
rotational radius: 133.572
chain sag: 39.98098
left chain tolerance: 0.376
right chain tolerance: 0.388

One key to arriving at a solution was to increase the maximum number of iterations, but more importantly, change the motor spacing by very small increments (initial used 0.5 and it was unstable and blew up… changed it to 0.1 and it settled down and reached a solution)

I wish the rotational radius was higher (it’s effective radius is 134.07 when you consider chain compensation) and closer to 138 or so which I believe is where it should be, but I’m going to try these values tonight or tomorrow to see where I end up accuracy-wise.

5 Likes