After a string of one problem after another with both classic jerk and junction deviation in Marlin, and coming to understand that the whole mathematical model for both of them is rather bogus (as I understand it, there's nothing to keep jerk from junctions of multiple tiny segments from accumulating to unbounded near-instantaneous chage in velocity), I kinda want to just disable jerk entirely (set it to zero). But of course this would give really slow printing.

What I'm wondering, though, is if it makes sense (and if so, how) to try to compute and use an acceleration value sufficiently high to achieve what jerk was trying to achieve, without it.

Mechanically, if a printer can handle a given jerk without skipping steps or harmful vibration, it should be able to handle acceleration high enough to achieve exactly the same stepping at corners/junctions. However, perhaps acceleration limits also involve current to the motors, heat dissipation at the motors/stepper drivers, or other factors that make "instantaneous" extreme acceleration okay but sustained extreme acceleration bad. (Of course, without extreme max speeds, extreme acceleration should only take place momentarily, in some sense proportional to as much a jerk takes effect.)

Am I crazy for thinking about doing this? If not, what would be a good model for determining the appropriate acceleration to try?


In order to evaluate whether this is possible, it's necessary to realize that following a curved path with zero jerk (in the classic jerk sense) requires stopping and restarting at each junction point in the piecewise-linear approximation of the curve that occurs in the gcode. This is because there's no way to accelerate/decelerate the individual axes continuously through a non-smooth corner. So paradoxically, as the number of segments approximating a curve goes to infinity, speed goes to zero. If the length of any one segment is bounded below by a constant, then acceleration can be chosen high enough to ensure that arbitrarily close to 100% of the segment is at full nominal speed. For example, for a minimum length of 0.1 mm, speed of 60 mm/s, reaching speed in 10% of the nominal segment time (1.6 ms) would take an acceleration of 360000 mm/s². So, not happening.

On the other hand, with very low but nonzero (classic) jerk, just to handle the matter of smooth curves approximated by small segments, this might be practical. Just looking at 90 degree cornering between segments long enough to run at nominal speed, to match the time spent cornering with 60 mm/s speed, 20 mm/s jerk, and 3000 mm/s² acceleration, it should only take 4500 mm/s² acceleration (original, scaled by 60/(60-20) to account for having to decelerate/accelerate to/from 0 instead of 20). This is completely reasonable.

How small can jerk be without breaking motion for approximations of smooth curves? As the number of segments approaches infinity, the lower bound should go to zero. For a circle approximated with 15° steps, one component of the change in velocity looks like it can be around 25%, so "25% of nominal speed" seems to be what you get. Oops. For 60 mm/s, that's 15 mm/s. Not very low at all. I may have gotten this math wrong; I'll review it later. But it doesn't look good for declaring this practical.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.