Exponential variable for pressure advance?
-
As pressure doesn't build linearly based on speed, I see that corners made when the nozzle is moving slow bulge more than when the nozzle is moving fast. You can see this based on printing say a 20mm cube vs a 40mm cube.
Would it be possible to get an exponential variable for pressure advance? Leaving this default at 1 shouldn't affect any current configurations, but would give more tuning for pressure advance.
actual_extrusion_speed = requested_extrusion_speed + (K * current_extruder_acceleration * X)
Where X is something like speedX / speed.. not sure exactly, but something along those lines.
Thanks
-
I can second this. Slower layers have different corners than faster layers on the same print.
-
Can you generate a single layer test print gcode file that demonstrates this, and that could be used to test modifications to the pressure advance algorithm?
-
Can you generate a single layer test print gcode file that demonstrates this, and that could be used to test modifications to the pressure advance algorithm?
Here's an example where the pressure advance is too aggressive at high speed, but works ok at low speed.
The outer layer is printed at 20mm/s, and the inner at 60mm/s. 0.6mm volcano nozzle, 0.2mm layer height, pressure advance at 0.1. Just a quick example.
Another variable in the equation to compensate for speed would be nice. I imagine it would be exponential, but not sure. Could be a simple factor. In this case, an exponent < 1 would reduce pressure advance at the higher speeds.
-
thoughts?
-
Have you established that reducing pressure advance improves the quality of the higher speed corner in that print? If so, how much did you need to reduce it?
-
Yes, but I don't recall how much. I'll recreate it tomorrow, print running at the moment.
-
This time with a 0.4mm nozzle since it was loaded up… volcano with ruby nozzle 0.2mm layer height
Maybe add a factor and exponential variable to tune the equation as necessary? Thoughts?
gcode: https://pastebin.com/x4nu19ah
inner perimeter speed: 75mm/s
outer perimeter speed: 30mm/s0.15 pressure advance on both:
0.08 on inner, 0.15 on outer:
-
Good work.
I've done quite a bit of testing with pressure advance but only at high speeds so what you've discovered is useful. Link to my blog here. https://somei3deas.wordpress.com/2018/01/15/an-attempt-to-investigate-pressure-in-the-extrusion-system-with-a-diamond-hot-end/
From that testing, it appeared that pressure increases as print speed is increased but only up to a point, and thereafter seems to remain fairly constant. i.e. pressure increases up to a certain speed and further increasing the speed does not further increase the pressure. That is of course a somewhat subjective statement based on empirical observation - we'd need to fit a transducer of some sort to be able confirm that. However, it does seem likely.
So my suggestion would be that if we introduce an exponential variable to increase pressure advance with speed, then we also need to add a maximum speed limit beyond which the pressure advance remains constant. Or conversely, set the maximum pressure advance but introduce a tapering effect so that pressure advance is applied in the range zero to maximum over a print speed range of zero to some threshold value. (not sure if I explained that well).
-
Good work.
I've done quite a bit of testing with pressure advance but only at high speeds so what you've discovered is useful. Link to my blog here. https://somei3deas.wordpress.com/2018/01/15/an-attempt-to-investigate-pressure-in-the-extrusion-system-with-a-diamond-hot-end/
From that testing, it appeared that pressure increases as print speed is increased but only up to a point, and thereafter seems to remain fairly constant. i.e. pressure increases up to a certain speed and further increasing the speed does not further increase the pressure. That is of course a somewhat subjective statement based on empirical observation - we'd need to fit a transducer of some sort to be able confirm that. However, it does seem likely.
So my suggestion would be that if we introduce an exponential variable to increase pressure advance with speed, then we also need to add a maximum speed limit beyond which the pressure advance remains constant. Or conversely, set the maximum pressure advance but introduce a tapering effect so that pressure advance is applied in the range zero to maximum over a print speed range of zero to some threshold value. (not sure if I explained that well).
Interesting. I wasn't sure it was remaining constant beyond a certain speed, just that less was required as speed increased It would be awesome to be able to graph this with a pressure sensor, but that's more effort then I can see spending on this. In this case, I'd use the variable to limit pressure advance as speed increases, with a value less than 1.
In the end, I just want to see it working reliably…. Using a factor of 10 and an exponent of 0.3 would get pretty close, for example using the speeds above...
The PA value would be multiplied by this...
10 * ( 75 ** 0.3 / 75 ) => 0.48691944197021614
10 * ( 30 ** 0.3 / 30 ) => 0.9247303715573938
-
I wasn't aware of the behaviour at low speeds, as I hadn't tested so well done for that.
My tests went up to 300mm/sec (which is possible by using a 3 or 5 melt chambers and extruders and a Diamond hot end) so that's probably why you won't have been aware of the behaviour at high speeds. I agree about the pressure sensor (mentioned that very fact in my blog).
What is also important is that different nozzles and hot ends have different characteristics. As a general rule, the pressure builds up more with a smaller nozzle than a larger one. The values you used above might work for your particular setup but other configurations might need different values, So any modifiers to the algorithm such as the exponential term or boundary limits ought to be configurable by the user rather than hard coded, fixed values.
We're on the same page though. Over to DC to see what he can come up with…..
-
Have you established that reducing pressure advance improves the quality of the higher speed corner in that print? If so, how much did you need to reduce it?
Any thoughts on the above posts?
Cheers
-
I was configuring my pressure advance and ran into the same conclusion. Of course I understand that pressure advance is not perfect but I’d be curious to see the mechanics behind it.
It is indeed a matter of speed + total length that will determine how much the pressure builds up
-
just my opinion:
1. At 0.4 mm nozzle width, 30 and 75 mm/s at 0.2 mm layer height is "no speed" for a volcano, 0.6 at 20 and 60 mm/s also not, the pressure build up difference should not be that impressive (only if you print e.g. PETG at 200 °C….) - at which temperature and with which filament did you try ?
In which direction did the print head move on the 20/60 mm/s picture ?
2. For me it looks like "skipping steps/increased filament slippage" because of too high E jerk when accelerating. What happens if you lower the E jerk (besides that it might slow down your print speed) ? What kind of extruder do you use ?
There is a firmware suggestion, to be able to have different jerk settings for acceleration and deceleration, but it was not implemented. The problem is, that pressure advance can use the max + E jerk possible to push filament in the nozzle, but the viscose damping effect adds an additional force to speed changes. If your extruder cannot handle this, you get more filament slippage and extrude less - it even can be that you would be able to extrude more material without pressure advance (==lower pressure advance values), because pressure advance uses high E jerks and by that amplifies the problem/slippage. Once your filament slippage is too high, the material is lost - underextrusion happens.
In case the firmware would support different setting for +- jerk (and acceleration), this problem could be overcome. Retraction can be done much much faster than extruding - without any additional slippage.
What also happens is, that the viscosity adds a phase shift (time lag) between the extruder moves and the real filament moves at the nozzle tip. All though pressure advance is not desgined for, by the way it works, a part fo this phase shift is compensated. But not all, the phase shift compensation would have to be adjusted with speed. So at the time being pressure advance cannot work perfectly.
Adjusting the pressure advance settings with speed is in my opinion the wrong way, it doesn´t solve the root problem. The root problem is very likely filament slippage caused by too high jerk/acceleration when accelerating.
3. Try to increase the temperature and test again to see if the pressure build up is really that important. At higher temperature the viscosity will go down and by that the viscose speed related damping effect will be smaller. In other works, E jerk has a better chance to work.... or tighten your extruder gear if possible, but over tighten it and deforming the filament too much will show the opposite effect.
5. The inner (fast) lines are not as wide as the outer (slow) ones. Before you start to use pressure advance, you should correct the extrusion multiplier according to extrusion rate using M952. M952 will increase the extrusion rate even more when "jerking" with pressure advance and by that probably not help your problem, but at least the fast and slow straight parts are OK. But maybe it helps, because M952 compensates the extrusion rate correlated slippage as far as it is not too high.
6. A Ruby nozzle might not be a good reference. Afaik it has no real chamfer at the inner side of he tip and by that gives unnecessary pressure build up and maybe other fancy behavior. But for sure it you want to use it, you want to optimize it. But what you found out is maybe not that much relevant for other nozzles - but this could be clarified easily by testing other nozzles.
I am used to print at high speeds/accelerations/jerks and and pressure advance has no value for me, because if you use high accelerations (> 1g) there are anyhow no bleeding edges and i would have to lower the E-jerk to get pressure advance working - and by that i would not print fast anymore - so i don´t use it. But i did try to improve retracts with pressure advance (but it doesn´t help).
-
@vp:
…....................................
I am used to print at high speeds/accelerations/jerks and and pressure advance has no value for me, because if you use high accelerations (> 1g) ..................Congratulations. Most of us mere mortals can't print with satisfactory quality with accelerations and jerk settings in excess of 9807mm/s^2 so for us, pressure build up is a real problem.
-
@vp:
just my opinion:
1. At 0.4 mm nozzle width, 30 and 75 mm/s at 0.2 mm layer height is "no speed" for a volcano, 0.6 at 20 and 60 mm/s also not, the pressure build up difference should not be that impressive (only if you print e.g. PETG at 200 °C….) - at which temperature and with which filament did you try ?
Volcano hot ends require more pressure advance as there's a longer melt zone.
@vp:
In which direction did the print head move on the 20/60 mm/s picture ?
counter clockwise
@vp:
2. For me it looks like "skipping steps/increased filament slippage" because of too high E jerk when accelerating. What happens if you lower the E jerk (besides that it might slow down your print speed) ? What kind of extruder do you use ?
no steps are being skipped. These are 1.7a motors with titan extruders. No signs of skipped steps anywhere, even at much higher speeds and flow rates.
@vp:
Adjusting the pressure advance settings with speed is in my opinion the wrong way, it doesn´t solve the root problem. The root problem is very likely filament slippage caused by too high jerk/acceleration when accelerating.
This is just not correct. The same trouble is visible with minimal jerk and acceleration.
@vp:
3. Try to increase the temperature and test again to see if the pressure build up is really that important. At higher temperature the viscosity will go down and by that the viscose speed related damping effect will be smaller. In other works, E jerk has a better chance to work…. or tighten your extruder gear if possible, but over tighten it and deforming the filament too much will show the opposite effect.
That was PLA printed at 245C. That's pushing it already. The thermistor has been validated accurate as well by external probes, and the tests provided are on two entirely different hot ends/extruders.
@vp:
5. The inner (fast) lines are not as wide as the outer (slow) ones. Before you start to use pressure advance, you should correct the extrusion multiplier according to extrusion rate using M952. M952 will increase the extrusion rate even more when "jerking" with pressure advance and by that probably not help your problem, but at least the fast and slow straight parts are OK. But maybe it helps, because M952 compensates the extrusion rate correlated slippage as far as it is not too high.
Extrusion is consistent between inner and outer layers.
@vp:
6. A Ruby nozzle might not be a good reference. Afaik it has no real chamfer at the inner side of he tip and by that gives unnecessary pressure build up and maybe other fancy behavior. But for sure it you want to use it, you want to optimize it. But what you found out is maybe not that much relevant for other nozzles - but this could be clarified easily by testing other nozzles.
you're just guessing here, and again, that's not accurate. At least not for the Olsson model.
@vp:
I am used to print at high speeds/accelerations/jerks and and pressure advance has no value for me, because if you use high accelerations (> 1g) there are anyhow no bleeding edges and i would have to lower the E-jerk to get pressure advance working - and by that i would not print fast anymore - so i don´t use it. But i did try to improve retracts with pressure advance (but it doesn´t help).
That's great, but this printer, and many others, cannot run high acceleration. Even with high acceleration, you'll still have issues with oozing during moves and lack of filament at line starts when pressure advance is required.
This post wasn't really constructive. The point is, pressure does not build linearly, and having other variables to control it based on speed would be nice.
-
This would be an interesting topic for research. If a university would like to have a student do an MSc project or similar on it then I expect we could provide a Duet. But at the current stage in our software development cycle (preparing version 1.21 for release), I can't work on it at present.
-
guess ill setup a build environment and start messing with it. if i get any positive results ill submit a pull request.
the new linear advance in marlin is interesting, as its based on length of filament compressed.
-
@nyt:
the new linear advance in marlin is interesting, as its based on length of filament compressed.
Marlin linear advance is the same algorithm that RepRapFirmware uses; but Marlin implemented it 2 yards later, and the Marlin implementation makes some approximations because it doesn't do precise acceleration.
-
@nyt:
the new linear advance in marlin is interesting, as its based on length of filament compressed.
Marlin linear advance is the same algorithm that RepRapFirmware uses; but Marlin implemented it 2 yards later, and the Marlin implementation makes some approximations because it doesn't do precise acceleration.
Did you see the new v1.5 code? They just changed it up
https://github.com/Sebastianv650/Marlin/commits/LIN_ADV_v1.5_final_1.1.x