• Here's a thought that's relevant

What we are trying to do is model in maths a real world situation with lots of variables.

Mathematically it is very difficult/impossible to get a precise perfect answer as in the real world you cannot account for everything.

There are a couple of things you can do to simplify and that will get you close to an answer.

Iterate, try things physically and mathematically and see if they work. That is what Pressure advance is, Philosophically it's a Fudge factor which will get us nearer to our goal of faster higher quality work with less effort making a perfect machine.

It will never be the perfect answer to everything but it improves things and gives us more control

it gives us a compensation factor that allows us to come closer to a real world answer.

An old Physics professor of mine used to tell a story involving a physicist and a farmer had the tag line as

"...... first we model the cow as a frictionless sphere in a vacuum "....

Strangely hypnotic watching my printer doing a tall thin print, which is my only excuse

• I give up!

I've done all that, written up the test methodology and results, presented my findings backed up with evidence in the form of both video and still images, and provided links in this thread to all that research and testing.

I really don't know why I bother with doing all this testing and keeping a blog.........

I'm sorry Ian, I've just re-read that blog entry, and I see that you found that the same pressure advance setting worked at all speeds you tried. In which case, non-linear pressure advance isn't needed!

• I'm sorry Ian, I've just re-read that blog entry, and I see that you found that the same pressure advance setting worked at all speeds you tried. In which case, non-linear pressure advance isn't needed!

Exactly so. Neither does it need to be asymmetrical, nor is it affected by temperature (but it might vary with filament type - I need to test that).

More importantly, if you noticed at the end of that post, the video showed the problems I had doing arcs at that time, which effectively meant that I could not use pressure advance for anything other than plain rectangular objects. If you recall, that was the subject of a long running thread spanning over year. But that is now fixed and the test work I'm currently doing shows it working absolutely brilliantly. The results, to be published on my blog soon, are amazing. So please, please don't mess with it.

• @dc42

Any suggestions on how to approach the calibration of this feature?

I was reading the https://duet3d.dozuki.com/Wiki/Pressure_advance and as it is mentioned here we need to consider the retraction and extrusion jerk parameters.

So... I would set the retraction to zero to start with.... Set the pressure advance first and then do my standard routine for setting retraction.

But how do I make sure that the jerk is not interfering with the tests? What would indicate that the jerk is too big or too small? Is there a good way to tune the extrusion jerk beforehand?

For now, I have this with my Bowden (60cm of "generic" Capricorn and cloned all metal E3D V6):

M566 X720 Y720 Z300 E600 ; Set maximum instantaneous speed changes (mm/min)
M201 X1300 Y1300 Z100 E6000 ; Set accelerations (mm/s^2)

M572 D0 S0.05 ; Set Pressure advance
M207 S2 R-0.10 F3000 Z0.0 ; Set firmware retraction

Thank you!

• But how do I make sure that the jerk is not interfering with the tests? What would indicate that the jerk is too big or too small? Is there a good way to tune the extrusion jerk beforehand?

As I understand it, jerk is an unspecified max acceleration ramp with the stepper at max torque and presumably with a lot of lag ( noting that time and distance are very short so the lag is possibly only important at a higher jerk) before the specified acceleration ramp. This would mean the jerk behaviour is dependent on your moving mass and your motors and mA and micro stepping settings.

If so then the jerk setting would not be transferrable between machines.

It also raises the possibility of tuning your mA to at least achieve the desired max acceleration (see calculator elsewhere in this forum) with limited or no lag but with for jerk deliver a higher acceleration with greater lag . [my knowledge of steppers is limited !!]

• @garis â€śjerkâ€ť in the sense we use it for 3D printer settings is telling the printer to change velocity instantly by that amount. So if your jerk is 20mm/s, the printer will jump from 0 to 20mm/s â€śinstantlyâ€ť at the start of a motion, decelerate to 20mm/s at every sharp corner, and then jump from 20 to 0 when the motion is finished. (Roughly speaking, anyway. Every firmware does it a little different.)

Personally, I think naming this motion behavior â€śjerkâ€ť was a spectacular screw-up in GRBL, because in accepted physics the term jerk already means something else, and thus I prefer the term â€śvelocity jump.â€ť

The point of allowing velocity jumps is for overall print speed (not having to slow to a stop at every corner) and to reduce corner blobbing (because you get less afterflow if you donâ€™t try to stop the extruder).

To that second point, jerk and pressure advance are two different ways to do the same thing: maintain more accurate extruder volume control through corners. If your jerk is high, you wonâ€™t have enough blobbing to properly tune pressure advance.

Pressure advance is better than a high jerk setting because jerk contributes to ringing. Itâ€™s very violent for the printer.

As far as what physically happens during a jerk or commanded velocity jump, the simplest case is jumping to a stop: you can imagine a mass (the moving carriage and drivetrain) crashing into a spring (the motorâ€™s torque/error response). The mass has inertia / kinetic energy and wants to keep moving, while the motor â€śspringâ€ť applies a force that increases as it gets more overshoot or â€ścompressedâ€ť. When the mass is slowed to a stop, the spring will be compressed such that its potential energy will equal the kinetic energy lost from slowing the moving mass. (Ignoring some complicated factors like electrical motor braking and damping factors and such.) That spring potential energy turns into ringing.

So, how much acceleration is applied by the motor during a jerk? You can back that out from the peak overshoot or â€śspring compression.â€ť It can be a lot. Depends largely on the motor torque per unit error, relative to the moving mass: a high-torque 0.9 degree stepper with a light, stiff drivetrain might experience 10 gâ€™s. The only real limit is the motor skipping steps, and if you run the numbers on that, you can get ridiculously huge numbers. In practice, velocity jumps shouldnâ€™t use the full motor torque, but you can use say 25% and perform fine.

As David and others have noted in other threads, there are some complex interactions between acceleration and jerk, so ringing and motor capacity isnâ€™t as simple as Iâ€™m presenting here, but itâ€™s a good start.

• @garis I know that the jerk is intimately dependant on my machine masses, motors, etc.

I would like to know if there is a methodology to test and tune the jerk for extrusion - and then how correlates to pressure advance tunning.

• @garis â€śjerkâ€ť in the sense we use it for 3D printer settings is telling the printer to change velocity instantly by that amount. So if your jerk is 20mm/s, the printer will jump from 0 to 20mm/s â€śinstantlyâ€ť at the start of a motion, decelerate to 20mm/s at every sharp corner, and then jump from 20 to 0 when the motion is finished. (Roughly speaking, anyway. Every firmware does it a little different.)

Far be it for me to question one as knowledgeable as yourself, but are you sure about that? I'm fairly certain that instantaneous speed change is never applied at the beginning of a move from rest. That would be a very bad thing to do. My understanding is that instantaneous speed change is only applied when the head is already in motion but there is a change of direction. i.e when decelerating in one direction towards a corner, the print head will decelerate until it reaches the "jerk" value, then change direction, the accelerate again from the "jerk" speed.

In practice, there are very few moves that actually start from rest. Even infill, because there is always a change of direction from one infill line to the next. So too low a "jerk" can slow the print down.

• @garis I know that the jerk is intimately dependant on my machine masses, motors, etc.

I would like to know if there is a methodology to test and tune the jerk for extrusion - and then how correlates to pressure advance tunning.

On the basis that extruders are treated as axes, then extruder jerk should be set high. For any given point in time, the print head will travel at whichever speed is the slowest of X, Y or E. Therefore, if extruder jerk is set too low, then it will affect all the other axes. Try it. Do a test cube then reduce extruder jerk. You'll find that when the extruder jerk is less than the jerk for all other axes, then the print slows down - the head will slow down more at the end of a move before changing direction and starting the next move. So my take on it is to set extruder jerk really high so that it does not affect axis movement. The only time that extruder jerk gets applied is for extruder only moves. These will be retract and un-retract. BUT, because these moves involve a 180 degree change of direction, I'm not convinced that jerk is even applied to them.

I guess what I'm trying to say is that too low and extruder jerk will slow down the print head because the extruder is treated as an axis. But too high an extruder jerk is unlikely to have any negative impact so set it high. By the same token, extruder acceleration should always be set higher than any axis, otherwise chnaging X or Y acceleration will have no effect.

• The main interaction of pressure advance and jerk is that if the extruder jerk is set too low, then increasing pressure advance may cause acceleration to be reduced in order to satisfy the extruder jerk limit.

• The main interaction of pressure advance and jerk is that if the extruder jerk is set too low, then increasing pressure advance may cause acceleration to be reduced in order to satisfy the extruder jerk limit.

Yup, my printer is completely different since disabling pressure advance. Unfortunately the jerk can't be that high on E3D Titan because it makes very strange noises (K0.2, bowden, Titan jerk set at 400).
I was always wondering why bumping speeds, jerk and acceleration didn't make the printer more noisy/abrupt, until it struck me that it has to be related to pressure advance (i.e. extruder jerk).

Now the printer hardly sits on the table with XY accel at 5000. The quality didn't drop enough with the new real acceleration and pressure advance disabled to warrant enabling it again.

• Titan extruders seem to vary, perhaps because they have varying amounts of backlash in the years. The one on my delta works well with pressure advance 0.2, but some other users report that they become noisy.

• @deckingman all the firmwares handle start/stop jerks a little differently and I donâ€™t know what RRF does specifically. Repetier uses half the jerk for starts/stops/reversals as it does for corners iirc. Sailfish treats every axis separately (axis speed change not tool vector velocity jump) and uses zero jerk when an axis reverses direction, full jerk at starts/stops. But all extruders across all non-S-Curve firmwares to my knowledge use start/stop jerks regularly as they retract, reprime, etc.

Thereâ€™s nothing wrong with velocity jumps on starts/stops. If you just think about XY Cartesian motion, thereâ€™s no difference to the Y axis if itâ€™s doing a right turn from +20 X motion to +20 Y motion versus starting+20 Y motion from a dead stop.

• @rcarlyle Ah OK. I bow to your superior knowledge - I only have experience of using RRF. I do recall David saying that "jerk" is not applied at the start of print head moves from a standstill and can confirm that this is the behaviour that I have observed.

• @deckingman fair enough, firmware-specific info always trumps, but what does RRF do on reprime between a travel move and a printing move? Thatâ€™s just another corner as far as XYZ is concerned, but itâ€™s starting from a standstill for the extruder.

• @deckingman fair enough, firmware-specific info always trumps, but what does RRF do on reprime between a travel move and a printing move? Thatâ€™s just another corner as far as XYZ is concerned, but itâ€™s starting from a standstill for the extruder.

For extruder jerk? I have no idea. The moves are a bit short and fast to say that I've ever paid much attention. Interesting thought though. Also, I use firmware retraction so I wonder if that behaves any differently to slicer generated E moves. Guess we need DC to step in here.

• but what does RRF do on reprime between a travel move and a printing move? Thatâ€™s just another corner as far as XYZ is concerned, but itâ€™s starting from a standstill for the extruder.

RRF doesn't apply jerk at the join between a printing move and a non-printing move. A printing move is one that has both forward extrusion and XY movement.

• Geez I haven't posted in a long long time, connected my Duet to new delta printer, since my previous printer which housed it got disassembled, but speaking of pressure advance calibration - are there types of prints where it shouldn't be used?

I've spent last 2 day testing pressure advance, settings of jerk/acceleration etc, got to the point where a cube would print ok, but other shapes had issues. It's a Bowden tube, 65cm-ish, quite long, after temperature calibration of the PLA I'm using, I've found the sweet spot for retraction and S value of 0.18 gave me best edges.

Now, I have used Marlin K factor calibration tool as my basis ( http://marlinfw.org/tools/lin_advance/k-factor.html ), modified it to suit Duet, removed what I didn't need etc, came up with a code to test the best S value this way - and it's S 0.65 where the line is most uniform right across.

Printing geometric shapes like cubes, polygons etc looks much worse than with lower value, thick seams, bit rounded corners etc, now to make it even stranger, I'm printing a twisted tower model as I'm writing this, which is an "organic" shape, not just technical straight shapes - started it off with S value of 0.18 but the quality was shocking, extruder was having a seizure, each layer looked inconsistent compared to the previous one etc... after 10mm I've disabled it - model from there on looks perfect.

Is it not recommended to use PA for organic shapes? Sorry if it's something that was discussed to death, haven't visited this forum for a good year by now.

Here's the gcode I've used to test S value: 0_1539501893621_sfactor0.5.gcode

• To see if I could separate extrusion from motion effects, as an experiment, I built a small jig to measure the thickness of a single-walled print. I then printed a 150 mm long print with uniform print speed (50 mm/s), but varying extrusion volume (0.7 -> 0.4 -> 0.7 mm extrusion width) as a step function. One caliper of the jig measures thickness (mechanically magnified 4x) and another the x position along the test print. Manually measuring a number of positions gave the following result. I'm treating `wall thickness` * `layer height` * `linear distance` as an approximation for extrusion volume here (ignoring the fine layer induced surface structure).

For a first quick experiment, I'm pretty happy with how nice the data looks. Interfacing digitally with the calipers would make this a lot quicker though.

I'm not sure why the first segment didn't converge to the same value as the last one â€“ but I can see some minor ripples that look like the print needs a bit more cooling towards the end of the first segment that may pollute the measurements a bit. I'll retry with some delay between each layer to allow for more cooling next time.

@dc42, when running at constant linear speed but varying extrusion rate like this pressure advance doesn't seem to have any effect. Is that expected?

I'll redo this for a few different extrusion rate pairs and see how well I can get the current model to fit.

• @mo said in Pressure Advance Calibration:

Now, I have used Marlin K factor calibration tool as my basis ( http://marlinfw.org/tools/lin_advance/k-factor.html ), modified it to suit Duet, removed what I didn't need etc, came up with a code to test the best S value this way - and it's S 0.65 where the line is most uniform right across.

Printing geometric shapes like cubes, polygons etc looks much worse than with lower value, thick seams, bit rounded corners etc, now to make it even stranger, I'm printing a twisted tower model as I'm writing this, which is an "organic" shape, not just technical straight shapes - started it off with S value of 0.18 but the quality was shocking, extruder was having a seizure, each layer looked inconsistent compared to the previous one etc... after 10mm I've disabled it - model from there on looks perfect.

Is it not recommended to use PA for organic shapes? Sorry if it's something that was discussed to death, haven't visited this forum for a good year by now.

Please explain what you mean by "extruder was having a seizure". High values of pressure advance cause the extruder to retract filament before the end of some printing moves. For this to work well, the extruder must have low backlash. With some geared extruders, the gears don't mesh tightly enough, resulting in high backlash and a lot of noise.

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.