tl;dr: If you know the resonant frequency of your print head and the maximum acceleration that it can sustain before print artifacts develop then, in principle, you can calculate a maximum jerk value for each axis.
Marlin and other 3D printer firmwares1What I say here applies to firmwares generally, but Marlin is the one I really know. Feel free to apply what I say mutatis mutandis to other firmwares. limit sudden speed changes to prevent exceeding the capabilities of the printer. We use the word “jerk” to refer to sudden speed changes2The obligatory side note at this point is to observe that in the 3D printer world “jerk” is used differently to the physics sense of rate of change of acceleration.. These sudden speed changes occur at the corners between every pair of print segments. So limiting jerk is about calculating cornering speed. In Marlin there are two ways to calculate cornering speed, Classic Jerk and Junction Deviation. Junction Deviation has its issues3It attempts to calculate a maximum jerk based on a pseudo toolpath for which the maths is relatively easy. Unfortunately the mathematical simplification differs sufficiently from the real world to make JD problematic – one day I might write about this. Or search the Marlin and 3D Printing Discord servers to find what I have written there. so this post is just about Classic Jerk.
There is a maximum jerk each axis can tolerate before print artifacts develop. In Marlin you have to manually configure the jerk values for each axis and you establish these values heuristically.
A similar situation exists with regards to acceleration. There is a maximum acceleration each axis can tolerate and Marlin limits acceleration to values that are established heuristically and configured by the user or printer manufacturer.
However there’s a point here which Marlin (and I think probably other firmwares too) do not engage with well: the effects of jerk and acceleration are cumulative. When accelerating with zero jerk, the printer can handle greater acceleration and vice versa. Acceleration and jerk limits are actually both dealing with the same underlying physics. Classic Jerk is an attempt to unify these two concepts but we need something better. And in theory I think we may have something…
Now that we have input shaping, there is a third factor which is established heuristically: the resonant frequency of each axis. And this begins to get into the actual physics of the axis, I have written about this here. It turns out that the acceleration and jerk limits impose limits on how far the axis can oscillate away from its zero acceleration trajectory and it is these extremes of oscillation which are the limiting factor for the axis. Both jerk and acceleration contribute to these oscillations but they do so in ways we can calculate and this gives us a relationship between max jerk and max acceleration.
Here is the maths:

Cleaning that up a bit:
So if we set jerk to zero for an axis we can find some MAX_ACCEL
which gives acceptable prints and then we can calculate values for and
.
An interesting follow up question is what is the optimal split between and
? This needs more exploration but this is where I have got so far:
On an acceleration ramp if the start speed is and the cruise speed is
then the time to accelerate at
and with a jerk of
is:
If it is possible to set then time is zero. However
is limited to
, otherwise
would go negative.
When is not possible, we can find a minimum of the
function above by differentiating with respect to
and setting to zero.
The solution to this equation is:
The only problem here is that is dependent on the jerk speed when cornering and the cruise speed is potentially dependent on cornering speed and acceleration. So more work is needed.
↑1 | What I say here applies to firmwares generally, but Marlin is the one I really know. Feel free to apply what I say mutatis mutandis to other firmwares. |
---|---|
↑2 | The obligatory side note at this point is to observe that in the 3D printer world “jerk” is used differently to the physics sense of rate of change of acceleration. |
↑3 | It attempts to calculate a maximum jerk based on a pseudo toolpath for which the maths is relatively easy. Unfortunately the mathematical simplification differs sufficiently from the real world to make JD problematic – one day I might write about this. Or search the Marlin and 3D Printing Discord servers to find what I have written there. |