So I’ve been looking into the calibration process. The first question to me was, is it possible in general to get an accurate and fast calibration? Some physical problems can be difficult to solve numerically, as they might converge slowly, or accumulate error, or be so sensitive that small errors or roundoff can distort the answers and make accurate solutions impossible.
What I did was to take a couple of examples from the discussion here and generate a solution using Excel Solver. Solver is a pretty powerful and flexible tool for solving numerical problems, and while we would not build it into the Maslow, it is a good tool to show us what is possible.
First I took the results that @ronlawrence3 posted on 4/14 of a 300x300 with 3x3 points, resulting in a fitness score of 0.693, a solution that took 107,200 iterations (!).
I set up a spreadsheet that for each calibration point, each of four intersection points from the four sets of adjacent belts was calculated and the distance from each point to the centroid of that set of 4 was calculated (the ‘errors’). All these error distances were squared and summed to create the sum-squared error (SSE) across the whole set of calibration points. I then told Solver to minimize the SSE by changing the five belt mounting point dimensions.
The results were better than those found by the Maslow software. SSE decreased by a factor of 8, and both the maximum and average errors (relative to the centroid) decreased by a factor of 3-4X. I tried to calculate the fitness but clearly I don’t understand exactly how it is done because my values are different than the ones the Maslow gives - 0.48 improving to 1.34, instead of 0.68 improving to ??
What is interesting is that the belt mounting points I found were significantly different than those found by the Maslow, by more than 200mm in many cases. The results were:
|
|
@RL |
Excel |
|
|
Maslow_tlX |
-61.50 |
-51.05279978 |
|
|
Maslow_tlY |
2226.10 |
2505.73 |
|
|
Maslow_trX |
2615.60 |
2362.86 |
|
|
Maslow_trY |
2223.20 |
2490.14 |
|
|
Maslow_blX |
0 |
0 |
|
|
Maslow_blY |
0 |
0 |
|
|
Maslow_brX |
2614.30 |
2364.88 |
|
|
Maslow_brY |
0 |
0 |
|
|
|
|
|
|
|
Max Error: |
4.18 |
1.17 |
Relative to centroids |
|
Avg. Error: |
1.37 |
0.50 |
Relative to centroids |
|
SSE: |
121.03 |
15.04 |
|
|
‘Fitness’: |
0.482930245 |
1.341027121 |
Not right |
I’ve attached the spreadsheet.
I was a little concerned that the results were affected by a small 3x3 grid run in a space of 300x300mm in the center of a much larger frame, resulting in larger frame size variations than you might get with a larger grid. So I then repeated this process with the results reported by @Markus_Rinn on 4/17 using a 5x3 grid in a 1260x550mm space. This time the Maslow solution had a fitness of only 0.199. When I ran his CLBM values through the spreadsheet I got the following results:
|
|
@MR |
Excel |
|
|
Maslow_tlX |
13.50 |
6.422244741 |
|
|
Maslow_tlY |
2214.60 |
2548.90 |
|
|
Maslow_trX |
4422.60 |
4227.82 |
|
|
Maslow_trY |
2187.30 |
2544.42 |
|
|
Maslow_blX |
0 |
0 |
|
|
Maslow_blY |
0 |
0 |
|
|
Maslow_brX |
4430.50 |
4239.26 |
|
|
Maslow_brY |
0 |
0 |
|
|
|
|
|
|
|
Max Error: |
22.17 |
2.57 |
Relative to centroids |
|
Avg. Error: |
6.33 |
1.23 |
Relative to centroids |
|
SSE: |
4291.16 |
126.99 |
|
|
‘Fitness’: |
0.103916256 |
0.536827722 |
|
Again, Solver found a superior solution, with a 5-10X improvement in the maximum and average errors. My calculation of fitness improved from 0.104 to 0.537, incorrect numbers but directionally accurate. The belt anchoring points were different by more than 300mm in some cases.
This spreadsheet is also attached.
What is really interesting is that each of these solutions took no more than 30 iterations, fewer if your initial guess is better. Note that some initial guesses for the frame size are trigonometrically impossible and the math will crash.
Excel Solver is using the GRG Nonlinear model with (this is important) the ‘Make all unconstrained variables non-negative’ box UNchecked (default is checked).
Obviously it would be great if someone looked at my results carefully and looked for mistakes. Also it would be great if @ronlawrence3 and @Markus_Rinn put the frame dimensions I found into their units and see if it produces better results, and found the proper fitness values.
If I didn’t mess up, then there are some really interesting conclusions:
First, we know that it is feasible to determine an accurate solution in a small number of iterations.
Second, sometimes large variations in frame shape produce small errors at the router. This observation, combined with the large differences between the different frame size solutions and the observations made by several people that the measure frame size differed significantly from the values found by the Maslow, makes me suspect that (at least at this point in time) it might actually be more accurate to measure the distances between the belt mounting points than to run the calibration routine. If you measure the diagonals and do the math (or sketch it out in CAD) you can get the proper frame locations allowing for non-parallel sides. At the very least, measuring the frame in this manner may allow the Maslow to start the calibration routine in better shape so there are fewer problems with slack belts and mysterious behaviors.
Next I’m going to try to prototype a numerical solution on Excel so we don’t have to rely on Solver.
Let me know what you think
20240415 ronlawrence3 300x300 3x3.xlsx (32.2 KB)
20240417 Markus_Rinn 5x3.xlsx (70.3 KB)