Filament Shrinkage Calibration - different take

Thought it would make sense to move one of my replies to a separate topic to give it a bit more visibility considering it might be of general interest.

Originally I was writing about improving dimensional accuracy of prints on the a1 series, so there is some stuff beyond shrinkage calibration. Hope the following text helps.

The idea is to isolate dimensional errors that depend on the print’s size from those that are size-independent.

This in itself leads to a way to isolate (and calibrate) filament shrinkage uninfluenced by other calibration values like flow or pressure advance.

--------------------------- snip ---------------------------
In terms of getting as much accuracy as possible with the least amount of trial & error, proportional errors need to be separated from constant errors.

Proportional / linear error sources:

  • (a) motion system (mechanical axis & drive system arrangement, motor & driver)
  • (b) filament shrinkage

Constant error sources:

  • (c) axis backlash
  • (d) input shaping effects
  • (e) extrusion
  • In reality (c)(d)(e) are also influenced by feed, accel, jerk, shape of the print but they are definitely not proportional to the size of the print

Determining (a) is beyond the typical user’s scope. Simplyfying things we can burry (a) in (b) and call it factor f.

Formalizing the problem a bit we get a nice and simple linear equation

d' = d * f + e
where 
	d : is the target dimension
	d': is the resulting printed dimension
	f : is the proportional factor
	e : is a constant error (sum of (c) (d) (e))

Having f we can set the filament shrinkage percent and having e we can offset the model’s perimeter walls by the right amount ( -0.5 * e)!


To find f and e we need a series of test prints that are shaped in such a way that e doesn’t fluctuate between sizes, like this for example:

  • seam at constant position and as far away as possible from measurement points
  • no infill, just multiple wall loops allowing for a consistent continuous print motion
  • single contact round measurement face avoiding pressure advance artifacts

And a measurement setup that is consistent and reliable:

  • caliper head is temporarily affixed to the granite plate
  • jo blocks ensure parallel alignment
  • none of these extra tools are really required - it just makes consistent measurements much easier

We will then have a set of target and resulting dimensions to do a linear regression to find f and e. A few lines of python will do the job:

import statistics

# list designed target dimensions
d_targets = [39, 78, 117, 156]

# list resulting dimensions
d_measured = [38.75, 77.65, 116.59, 155.53]

f, e = statistics.linear_regression(d_targets, d_measured)
f = round(f, 6)
e = round(e, 4)
print(f'shrinkage f:\t\t{f} or {f*100} %')
print(f'constant error e:\t{round(e, 3)} mm')

Output for those values:

shrinkage f:		0.998154 or 99.8154 %
constant error e:	-0.19 mm

In case anybody really goes all the way - you can follow this link to enter your values and run the code online.


There is also the issue of x and y behaving differently - combine the info above with the following post to fix that (applies to x/p series too):

1 Like

Nice summary. I would look out for further sources of displacements on top of linear and constant errors. E.g., in my experience, concave walls tend to be printed slightly to small. The smaller the radius, the stronger the effect. E.g. a hole with 20mm inner diameter comes out as 19,8mm. A hole of 4mm comes out as 3,7mm. A 1,5mm hole becomes 1mm. (Numbers just made up).

Not sure I would call it a ‘summary’ considering I haven’t seen yet somebody outline a method to differentiate constant from linear errors via a simple test print.

In terms of the ‘dynamic error’ you mention - that’s mainly input shaping and the general nature of squeezing molten plastic into a shape. I don’t see a way to capture required corrections by simple calculations.

For the input shaping compensation closed loop axes would do fine but currently we don’t have that.

The molten plastic thing is Machine Learning territory…

Nice to see yet another take on a problem only fixed for larger scale industrial printers so far…

I doing this 3D printing stuff now for more years than I like to count.
And if you started with the early Marlin and such firmwares on 8-bit controllers than you really have seen it all several times already - NO OFFENCE !

What I am trying to say is that both firmwares and slicers have come a long way.
Where one struggles the other provides a workaround.
The problem as I see it seems to be that no one really cares about physics any more :frowning:

Print something in vase mode, with 1 ,2, 3 and 5 wall loops and measure the results - no real consistency.
Same for holes, especially small holes that are none.
A hole is more like a wall for the printer and slicer.
Just that the infill is on the other side.
We don’t like lines, we want a proper arc so prevent corners…
All this and much more is addressed on multiple levels through the path from slicer to printed model.
We are stuck now for quite a few years with no real breakthrough in the firmware department.
Fundamentally changing pathway and extrusion parameters affects all parts of a print and would require a lot of beta testing.
Bambu prefers to import those things from Orca and other sources so I really think such nice calculations and tests should be posted there as you WILL get much for feedback from those developing than here.

I have experienced that inward shrinking on my venerable Ultimaker 2. Typically I printed at 30mm/s and input shaping was far away at that time. The X1C does it in a very similar way so I’m sure that it doesn’t come from input shaping or other dynamic variables but instead is a static phenomenon of FDM printing.

Regarding prior investigations: Stefan from CNC kitchen did a very good video on calibration cubes and why they are a terrible idea to use. There, he also explains how to avoid constant errors when calibrating filament shrinking. Vector3d created the Califlower model which takes the constant errors out of the equation by providing inside and outside measurements that are to be averaged. Interestingly all the slicers provide a tool to compensate constant errors, e.g. in bambulab via XY contour offset (dont remember the exact name). But except for Orca slicer, none allow to correct for filament shrinking, which in my opinion is the most relevant source for incorrect dimensions.