Pressure Advance Calibration
-
Ok, so I had to increase PA to 1 to see a result. I really need to switch to direct drive.
-
Thanks to this great script! I ran it, and found 0.1s, which is the value I was using.
-
Thanks for the great script!!!
But I could not use it to set the pressure advance as all my layers look almost the same... Very very thick at the slower part and ok at the high speed parts. Against the light I can see some difference but nothing that can direct me to a decision.
The only thing I changed was the fast speed to 80mm/s and the center position. Maybe I am over extruding to start with?
Thanks!
What else should I check?
-
I'm confused by how y'all are trying to use this script / tuning technique. Are people trying to use pressure advance to eliminate the difference in extrusion flow between 100mm/s and 5mm/s? That should be done with non-linear extrusion, not pressure advance.
All hot ends extrude relatively less material (deviate from linearity between E axis travel and extruded filament volume) as the flow rate starts to approach the hot end's extrusion limit. This limit is largely a function of the nozzle size, and of the hot end's ability to transfer heat to the filament:
- PTFE-lined hot ends allow less heat flux and thus deviate from linearity at lower flow rates / print speeds. Insufficient heat flux = cooler extrusion = more viscosity.
- Higher extrusion rate = shorter residence time in the hot zone = less time for heat to transfer = cooler extrusion = more viscosity.
- Higher flow rate = more pressure drop at the nozzle.
etc.
There's a flow range where extrusion is very close to linear, and once you break out of that range, flow starts to deviate a lot. Basically as the back-pressure at the nozzle gets higher, the compressive force at the extruder gets higher, and the extruder drive loses travel because the hob bites squeeze closer together.
So, it's totally expected that the hot end will extrude less material at a very high print speed, and you SHOULD see differences at 100mm/s vs 5mm/s. That's why the non-linear extrusion feature was made -- to offset that.
Hot ends ALSO also have time lag / afterflow issues that specifically cause blobbing at corners, which is a largely unrelated issue. Flow lag is a transient effect that is only visible close to the speed change. This is primarily a matter of cumulative elasticity or "wind up" of all the components between the extruder motor and the nozzle:
- Torque/error response of the stepper motor
- Elastic shear of the drive hob bite zone
- Compression of the filament between the drive hob and melt pool
- Stretch of the bowden tube
- Bulk compression of the melt pool
(There there's more but I don't want to get into it right now.)
All this elasticity means the extruder system has to "wind up" when it starts extruding to build up full extrusion force (effectively losing some filament volume), and then has to "unwind" when it stops extruding (getting the lost filament volume back as afterflow). Pressure advance is supposed to compensate for that.
-
@brunofporto I had the same thing on my printer, with a long bowden (65cm) tube. I had to set a very high pressure advance to see any result. I think I needed about 0.9 to 1. Not a very desirable value, so I decided to switch to direct drive.
-
@rcarlyle I think you are right. This approach assumes that nonlinear extrusion calibration is performed. In my case, I measured constant (linear) extrusion rates in free air from 1~12 mm^3/s, and extrusion volume only starts dropping off nonlinearly beyond that. 100 mm/sec @ 0.2 mm layer, 0.4 mm width is only 8 mm^3/s. But it is very likely that extrusion rates during extrusion differs from free-air extrusion though. Higher back-pressure, but maybe elasticity also helps drag plastic out when the nozzle is moving.
What I look for here is the z layer where the thickness is as close to uniform as possible across the transition zone (high-to-low, and low-to-high speed). The fact that the lag effect is so significant that it lasts during the entire duration of the high and low speed sections is somewhat surprising, but seems to be the case here. You may be right in that this means that there are two different effects being affected by a single parameter.
An alternative (better) approach would be to:
- Run the same fast/slow extrusion while varying the commanded extrusion width for the fast section. Repeat this twice for two different speeds, e.g. 10 vs 30, and 10 vs 100 mm/s. Find the z height for the two where the layer thickness is equal (in the center of the extrusion segment) and use that to calibrate a nonlinear extrusion model for that particular layer thickness.
- Run this script to find the pressure advance setting that minimizes with changes during the transition period.
-
I reviewed the results I posted above and the reason I saw a color gradient on the short extrusion segments is because of over- and under-extrusion due to pressure lag. Basically, with insufficient pressure advance the short segment tends to become one long elongated blob. If one modifies the script to increase the length of the short segment (
pattern_width
) the center of the slow segments are not thicker than the centers of the fast segments when measured with a caliper on my tests on two different printers. That is not to say that others may see nonlinear extrusion effects already at 8mm^3/s. If one is concerned about this, I'd recommend increasing the length of the slow speed segment.So the method seems valid. I can also report that print quality is improves significantly: this approach virtually eliminates corner and infill blobbing, and under-extrusion during fast sparse infill moves.
Also worth noting is that the single parameter pressure advance model doesn't completely eliminate all acceleration dependent effects – there seems to be some nonlinearities left. There is also some asymmetry in respect to acceleration and deceleration that isn't modelled completely.
-
@digitalvision said in Pressure Advance Calibration:
.......................................Also worth noting is that the single parameter pressure advance model doesn't completely eliminate all acceleration dependent effects – there seems to be some nonlinearities left. There is also some asymmetry in respect to acceleration and deceleration that isn't modelled completely.
Which all comes back to what @RCarlyle has been saying and what I have been banging on about for quite some time, in that whilst this technique may give improvements, it's using pressure advance to compensate for non-pressure related problems.
The lag time between an XY move accelerating up to speed and the extruded filament accelerating up to the same speed, is not the same as nozzle pressure build up.
-
@deckingman said in Pressure Advance Calibration:
Which all comes back to what @RCarlyle has been saying and what I have been banging on about for quite some time, in that whilst this technique may give improvements, it's using pressure advance to compensate for non-pressure related problems.
I'm not sure I follow. This test is all about pressure related compensation. The script ramps extrusion up and down between two extremes and allows selecting a setting that gives an as uniform result as possible.
The lag time between an XY move accelerating up to speed and the extruded filament accelerating up to the same speed, is not the same as nozzle pressure build up.
The fact that the slope of the extrusion ramps are tied to xy acceleration is not necessarily wrong. That's exactly the ramps you will encounter during printing.
Here's a mental model: If you change the minimum speed in the script to exactly match your max instantaneous speed change ("jerk") setting, and shrink the length of the short segments (
pattern_width
) to something insubstantial like 0.1–0.5 mm, the extrusion profile generated here will perfectly match the one you get if you print for example an outline of a cube, or do linear infill.The short segments are stretched out here is because it exacerbates the effect. It allows all (most) of the excessive pressure to bleed off, and separates the effects of overpressure during deceleration from the underpressure during acceleration. The purpose is to make the effect more apparent in order to make tuning easier. I don't think this is adding a systematic error to the process – but I may be wrong.
The thickness of the short segments is (generally) not related to nonlinear extrusion. It s a long continuous blob – exacerbated by the profile.
If you look at the last image I posted, the extruder moves left-to-right on the front outline of the print. On the bottom part of the print you see severe underextrusion during acceleration (gaps in the print) that correspond to what you would see when printing sparse linear infill. This is the opposite of pressure build-up – but also corrected for by the pressure advance parameter.
-
@digitalvision said in Pressure Advance Calibration:
At the risk of seeming to labour the point, you said......Also worth noting is that the single parameter pressure advance model doesn't completely eliminate all acceleration dependent effects – there seems to be some nonlinearities left. There is also some asymmetry in respect to acceleration and deceleration that isn't modelled completely.
Of course pressure compensation doesn't eliminate all acceleration dependent effects. For the simple reason that there are factors other than pressure that are at work during the acceleration and deceleration phases.
Pressure build up in the hot end is both a function of how fast you try to cram filament into it and also the time that you maintain that filament speed (within limits). The pressure build up continues way beyond the acceleration phase and well into the constant speed phase. So if you only calibrate it during the acceleration and deceleration phases, then when you start to do long moves at highish speeds, you'll find that more compensation may be needed.
But hey, I'm not going to labour the point. If you are happy doing it that way, then that's fine. I have a different way of calibrating pressure compensation which works very well indeed for me (edit - and there is no asymmetric requirement for the start of a move and the end of a move) . I just get nervous when people suggest that changes should be made to the way something in firmware works (in this case pressure advance) to suit their particular test method. In a nutshell, "it ain't broke (for me) so please don'y fix it".
-
The Sailfish "JKN Advance" scheme (from, like, 2012) uses two factors, one primary pressure advance factor to pull in corner blobs, and a secondary factor which deals with skew between accel and decel on opposite sides of the corner. I'm not aware of any other pressure advance schemes using two factors like this.
I think we all know pressure advance isn't an ideal or perfectly accurate model... it's just a good fudge factor that helps correct some issues.
-
I have an upcoming blog post that includes pressure advance in the testing, and I think it will surprise quite a few people.
-
“My dear Frodo!’ exclaimed Gandalf. ‘3DPrinters really are amazing creatures, as I have said before. You can learn all that there is to know about their ways in a month, and yet after a hundred years they can still surprise you at a pinch.”
― J.R.R. Tolkien, The Fellowship of the Plastic
-
@brunofporto Very good!
-
@deckingman said in Pressure Advance Calibration:
Pressure build up in the hot end is both a function of how fast you try to cram filament into it and also the time that you maintain that filament speed (within limits). The pressure build up continues way beyond the acceleration phase and well into the constant speed phase. So if you only calibrate it during the acceleration and deceleration phases, then when you start to do long moves at highish speeds, you'll find that more compensation may be needed.
I may have mischaracterized this approach as only being "acceleration and deceleration ramps", as with moderate acceleration settings it really contains long periods of constant speed extrusion – and as you say you can see pressure effects persisting for a long time after the acceleration ramp.
But hey, I'm not going to labour the point. If you are happy doing it that way, then that's fine. I have a different way of calibrating pressure compensation which works very well indeed for me (edit - and there is no asymmetric requirement for the start of a move and the end of a move) .
I'd love to learn more. I proposed this approach since it was fairly easy and quick and gave consistent results that seem to improve print quality significantly compared to not doing any calibration. I'd be the first to jump on a better method. My only disagreement would be with the claim that there is something fundamentally wrong with this approach – like it's abusing a parameter to fudge something mostly unrelated. I still think it's a sound approach.
I just get nervous when people suggest that changes should be made to the way something in firmware works (in this case pressure advance) to suit their particular test method. In a nutshell, "it ain't broke (for me) so please don'y fix it".
I don't think I ever went as far as suggesting a firmware change – especially not based on a synthetic test like this. I merely meant that with a single parameter there is a slight compromise to be made. E.g. in one case I could see a pressure advance parameter of 0.055 being the ideal for the deceleration phase while 0.050 provided a more uniform correction for acceleration. If one picks a balanced value between those you are probably not far off.
@deckingman said in Pressure Advance Calibration:
I have an upcoming blog post that includes pressure advance in the testing, and I think it will surprise quite a few people.
Looking forward to it.
-
@digitalvision Oh, that's OK. If you aren't proposing a change to the firmware, then I can relax.
For info, I was once of the opinion that asymmetric compensation was needed but further tests I did, revealed that this is not the case. I hate the term "pressure advance" because it involves both advancing and retarding the extruder but anyway....The problem with having asymmetric compensation is that if you advance a different amount at the start of a move than you retard at the end of the move, then you would end up with either over or under extrusion (overall for that move).
If you haven't already seen it, take a look at my blog, especially the last post I did on this topic back in January https://somei3deas.wordpress.com/2018/01/15/an-attempt-to-investigate-pressure-in-the-extrusion-system-with-a-diamond-hot-end/. Test 4 is particularly interesting in that it shows significant amounts of filament being extruded after print moves have completed and the extruder is stopped. i.e a long print moves at varying speeds followed by non print moves (extruder stationary) without using retraction at the end of the print moves. This is testing pressure in isolation of all other factors (well most other factors).
-
It's to be expected that with no pressure advance, the effects of changing extrusion rate will persist for some time after the change. Let's suppose you have an extruding move, then you decelerate rapidly to zero. The higher the extrusion rate, the more pressure is required to force the filament through the nozzle at the required rate. Before the deceleration, the pressure will have reached the equilibrium value, if the move was long enough. When the move stops, the pressure is still there and in the absence of pressure advance, it can only be released by filament escaping from the nozzle. If the extrusion rate is linear with pressure (it probably isn't, but let's ignore that for now), the extrusion rate will decay exponentially towards zero. Let's suppose we can measure the decay, and let T be the time taken for the rate of extrusion to decay to 37% of its original value. This time T is the pressure advance constant that you need to eliminate the effect.
An electrical analogy is that we have variable current source (the extruder drive) that we are using to drive the required current I (the rate of extrusion) through a resistor R (the nozzle). This required a certain voltage I*R (the pressure) across the resistor. The problem is that there is a large capacitor C (the elasticity of the filament in the Bowden tube, and the extruder drive) in parallel with the resistor. To allow for the presence of the capacitor, instead of driving it with the current I that we want in the resistor, we turn on pressure advance and drive it with current I' = I + RC * dI/dt. The pressure advance constant is RC.
Things that spoil this simple mode include:
- The pressure needed to force the filament through the nozzle is probably not linear with rate of extrusion;
- The pressure depends on the filament;
- The pressure depends on the extrusion temperature;
- The Bowden tube and extruder drive don't behave like a linear spring.
What would be interesting is to see this pressure advance calibration test repeated at different print speeds on the same printer, to see how the required pressure advance varies with extrusion rate. That would give us an indication of whether nonlinear pressure advance would be worth implementing.
-
@dc42 said in Pressure Advance Calibration:
.....................................................Things that spoil this simple mode include:
- The pressure needed to force the filament through the nozzle is probably not linear with rate of extrusion;
- The pressure depends on the filament;
- The pressure depends on the extrusion temperature;
- The Bowden tube and extruder drive don't behave like a linear spring.
What would be interesting is to see this pressure advance calibration test repeated at different print speeds on the same printer, to see how the required pressure advance varies with extrusion rate. That would give us an indication of whether nonlinear pressure advance would be worth implementing.
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.........
-
Don't give up. I actually read the blog and watched the video (for a second time) today. What I got out of it was that the rate of extrusion (which would have gone up proportionately with the rate of X movement) had no visual impact on the filament extruded.
However, I think what @dc42 is suggesting is to run the specific python generated test posted earlier (at different rates on the same printer.) That might show something different than single extrusion lines on the build plate.
-
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