Nonlinear extrusion
-
I'm not quite sure I follow the excel you show as you seem to have a 4th order polynomial and an exponential plot, but no 2nd order polynomial (quadratic) which is what NLE actually uses.
However, one thing that is clear is that you need ~1.56x more extrusion at your max speed than min speed you tested (100/64). First question: is that really true?
Second, what NLE command do you actually have, and have you specified an L parameter? NLE is limited to a maximum factor of 1+L, and L defaults to 0.2. If you haven't specified one, you won't be getting anywhere near the amount of NLE you need at higher speeds (1.2 is a lot less than 1.56). My guess is this is why you are having issues with your e-steps as anything above ~7mm/s would not get enough NLE based on your excel.
Link to the docs for ref, but I guess you've already been there!
https://docs.duet3d.com/User_manual/Reference/Gcodes#m592-configure-nonlinear-extrusion -
@engikeneer
This math is beyond me.
This is a calculator someone or some people developed I got off this forum. There is at least one other but this one seemed to be the most commonly used and most developed so it is what I have been using.These are the values to be entered for A and B
"However, one thing that is clear is that you need ~1.56x more extrusion at your max speed than min speed you tested (100/64). First question: is that really true?"
I never had much luck with the static extrusion test. Plus it isn't super accurate since the restriction during printing is different.
So I have just started adjusting the curve based on over/under extrusion at various flow rates while printing.
As I explained above the math on this curve isn't accurate to actual rates because we have to lower Esteps just to get it remotely working properly.
So as I said above to get my low extrusion rates not over extruding I need to adjust Esteps from around 680 to 625, then to prevent under extrusion at higher flow rates I need to make that up.
So 680/625 is 8.8% Add that to the 64 = 73 and that is probably pretty close to what the "slippage" would be.
Also this goes past what I would be printing at. So I might actually be printing at like 10mm/s and going to 12 just to continue the curve past what I need and likely past what would print well although I haven't dialed this filament too much.So realistically more like 10mm/s and "slippage" probably being more like 20%.
-
Oh yeah and yes I did learn a long time ago to use L.
I assume 1 is the highest value but it doesn't exactly clarify in the documentation. I have tried higher values like 10 and it seems to accept them but I never noticed any difference with values higher than 1. -
Well I still really hope someone from Duet will post in this thread to give some clarification on how this feature is supposed to work and ideally I would really love to see an official Duet calculator that we can know the math is good and compatible with the way it is programmed to work.
Unless I am missing something I also would almost consider the fact that we need to turn esteps way down to prevent over extrusion at lower rates, and that at least in my experience need to add that back to the multiplier to get acceptable extrusion at higher rates should technically be considered a bug or issue either with how it is implemented or the calculators that we are using.With that said having read here and also at least one other person in another thread having experienced this issue of needing to turn their esteps down has helped me. At least I don't feel like I am gaslighting myself if others are experiencing the same. So I went back to my old settings with esteps turned down from the manufacturers recommended 680ish to 625 and have my hard filaments dialed back in to where I would say it is running better across a range than without NLE but I need to do a little more testing.
One thing I experienced in the past and reconfirmed running that aggressive TPU profile in the pic above is that once you go below something like 70% it does seem to actually reduce flow. Now in theory we shouldn't need to go below that or it's probably a sign of pushing filament too hard anyway but it does suggest something is going on in the math either in Duet code or the calculator. Running a harder TPU starting with that profile above and under extruding, then throwing in my settings for something like 80% as the lowest and the extrusion rate in the print increasing significantly.
-
@droftarts @Phaedrux either of you able to help here?
@yoshimitsuspeed sorry I've been away so not able to look into the calculations etc. First thing they ask will be FW and hardware and maybe to see your config file in case there's anything unexpected there (low e jerk etc that might impact etc). You are right that a 'standard calculation sheet' and a method to tune NLE would be good (similar to how we have for pressure advance).
Fundamentally, the process should be:
- calibrate e steps for your chosen filament at a low speed (e.g. 1mm/s extrusion) with NLE off
- run a series of tests where you increase the extrusion rate and measure the level of under extrusion, but keeping as many other things constant as possible
- plug numbers into the calculator and work out your parameters
- rerun your tests with NLE enabled and confirm that it is working as expected
- trial in actual prints
Personally I'd say that the best method would be the static extrusion test (e.g. pebbles) and then weighing them. If you do dynamic (moving) printing, then you may end up against head acceleration and other speed effects, unless you do a simple line at a single set speed and just increase the line width accordingly, but that seems unlikely to be sensible/viable over the range of feedrates you'd want to do.
I can imagine you'd want to repeat this (and your estep calibration!) For different filament types as the drive gear will always dig more into a softer material.One extra thing... I think some of your issue may be down to your parameters you are setting. If you calculate the NLE rate you get at 5mm/s (reasonably high rate, but not crazy) then you get an NLE factor of about 1, so no impact at all. Maybe try plugging in the numbers and see what you're actually asking it to do? The maths is really simple so don't be afraid of it!
-
@engikeneer @yoshimitsuspeed The linear extrusion calculation is here in the code (3.6-dev branch) https://github.com/Duet3D/RepRapFirmware/blob/85432634695d00506d63d0055d65027d6dc3cb9f/src/Movement/DDA.cpp#L1740
So you can check that it's being calculated the way you think it should be calculated, ie
The amount of extrusion requested is multiplied by (1 + min(L, Av + Bv^2)) where v is the requested extrusion speed (calculated from the actual speed at which the move will take place) in mm/sec.
(The calculation is rewritten in the firmware as (1 + min(L, (A + Bv)^2)), but the result is the same.)
I don't see any limitation that would cause a difference when the steps/mm increases; I would think this is probably related to something else you have set. It's worth pointing out that NLE is applied along with many other factors that affect the motion/extrusion system, eg speed, acceleration, jerk, input shaping, pressure advance, etc etc. Also note that NLE is not applied to extruder-only moves, ie moves without XYZ movement.
As @engikeneer said
First thing they ask will be FW and hardware and maybe to see your config file in case there's anything unexpected there (low e jerk etc that might impact etc).
Indeed! @yoshimitsuspeed please post your config.g and response to M122, and any other relevant files. If the problems only surface during print jobs, make sure your slicer isn't emitting Gcode that overrides your config.g settings. And yes, we do understand how it works. Though my personal view is that it's a bit of a hack to try and get more performance from a hot end that is limiting flow.
@engikeneer said in Nonlinear extrusion:
You are right that a 'standard calculation sheet' and a method to tune NLE would be good (similar to how we have for pressure advance).
I'll ask if there's any additional guidance we can supply, but largely the resources @yoshimitsuspeed has found cover it. As @yoshimitsuspeed pointed out, I don't think it's a widely used feature, so devoting resources to it is at the expense of other more pressing issues may not make sense.
You might also look at @timschneider's work on temperature feedforward (T and A parameters in M309), see https://forum.duet3d.com/topic/36364/feature-adaptive-feedforward-temperature-setpoint/, which may allow you to reduce the amount of NLE.
Ian
-
"The maths is really simple so don't be afraid of it!"
"So you can check that it's being calculated the way you think it should be calculated, ie"I just went over this with my partner who has an MBA and a pretty big maths background. Admittedly a while ago and out of practice but after probably a half hour of looking at this, talking about it, trying to figure out what all the variables mean, trying to figure out why we are intermixing polynomials and exponentials, etc, she said it would take a lot more time to even start to figure out how to check the calculator I have, create a calculator, check it against the firmware, or do much of anything with the information provided.
I can tell you for sure that I would have no chance of making anything from that equation without a lot more help.I don't know how popular this feature would be if it was stupid easy, but I can say that even if 9/10 people would use this if it was stupid easy the fact that it is the way it is right now would make all but a few give up or not even bother.
If you read through the threads about this it is mostly a bunch of people trying to hack their way to an answer and many still sounding unsure of whether they succeeded. Even the few calculators seem to have mixed opinions on which to use or if they even work properly.
-
I think while printing pressure is going to be a lot different than results from a static test. For that matter trying to print 0.8mm layer width at 0.1mm height is going to be a lot different than at a 0.3mm layer height and both should be significantly higher than just extruding into the air.
I will say if I didn't print a ton of TPU I could probably get things dialed in well enough with static testing but it was with TPU I started tweaking things mid print because static test settings just didn't get me much better results than without NLE. But issues with inconsitency have still left issues with NLE and struggling to get acceptable extrusion over a wide range of flow. Even more so if we throw in variable layer heights which goes beyond the capabilities of NLE or PA but an issue that would be great to see improved as well.
It is true that trying to make adjustments by watching a print creates a ton more variables and I would be hesitant to even try to walk someone through a methodology because it is a little like trying to fine tune chaos but it can be a useful tool if you notice you are consistently getting under/over extrusion at a given flow rate in different situations that likely eliminate pressure advance, and other things.
-
@droftarts
I can try to get config info at some point. With that said I have had these issues on four different machines, a Duet 2 wifi, Duet 3 mini, and Duet 3 6hc, many different Duet versions, probably at least 7 different extruders and with probably 3 being oribiter 2.0 and 2 being orbiter 3.0 starting with the manufacturers recommended settings and with all different setups showing the same behaviors."Though my personal view is that it's a bit of a hack to try and get more performance from a hot end that is limiting flow."
This seems like a pretty big over simplification.
Even if you manage to keep the filament at the lowest viscosity temp you will still increase pressure as you increase flow. The effects of this are pretty minimal for most filaments within typical ranges but can have a huge impact on soft filaments and I think possibly even some low friction filaments that might be more likely to slip.Printing TPU at 12+mm/s3 on a .6mm nozzle NLE is pretty critical if you have areas that need to slow down significantly.
I think it is awesome that feedforward temp control is being implemented. I will definitely be trying this out as soon as I get a chance and maybe this will help me get my TPU print speeds a little higher still while managing lower flow areas but even with perfect temp control I still think NLE will be pretty much necessary to print well from low flow areas to max build rates.
-
@yoshimitsuspeed please do the following:
- Tell us what firmware version you are using.
- Send
M592 D0 A0 B0
then command 100mm extrusion at 1mm/sec measure the amount of extrusion. I am assuming you are using extruder 0. - Send
M592 D0 A0.01 B0
then command 100mm extrusion at 1mm/sec measure the amount of extrusion. - Send
M592 D0 A0 B0.01
then command 100mm extrusion at 1mm/sec measure the amount of extrusion.
-
Do you want me to do this test with my estep settings as tuned without NLE, or the Estep settings I have found work best with NLE?
-
@dc42
DWC 3.5.4I also assume I will need to do this test as a print move with some kind of XY motion to make M592 work right?
-
Also I have to point out how I specifically asked that this thread be about documentation for proper use for this feature and not about troubleshooting my specific setup and all it has turned into is people trying to troubleshoot my specific setup.
-
So I finally installed my mag filament sensor since it seems like the best tool I have to try to move forward with this and to measure filament usage.
I think I understand how it works.
Most the documentation and threads seem to say 24.80mm/rev is default for the sensor but @timschneider came to 25.3 in his thread which is pretty much exactly what I am getting with my extruder set to manufacturer recommended specs.
So I set L as 25.3 but I don't really understand what that does since the output of M592 D0 seems to be the same regardless of what that number is or if I manually have an L value entered at all.From what I can tell we are looking for deviation in the mm/rev output and it appears to me as though a higher value means less extrusion.
So if I get 25.26mm/rev at 1mm/s and we assume that is nominal, and 25.8mm/rev at 5mm/s then I am taking that to mean 98% extrusion or if I ask for 100mm it is pushing 98mm. Correct?I then did a number of tests using this Gcode to have an XY move included.
M592 D0 A-0.000317 B0.000187
G28
G0 X100Y0 F20000
G92 E0.0
G1 F300 x100 y100 e100 F60Here are the results from those tests. I think you should be able to understand the changes by the file names.
Extrusion test 1mm/s NLE0
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 130 agc 79, measured 25.26mm/rev, min 97% max 102% over 99.4mmExtrusion test 5mm/s NLE0
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 130 agc 77, measured 25.80mm/rev, min 95% max 104% over 99.5mmextrusiontest-1mms-nle- M592 D0 A0.01 B0
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 128 agc 75, measured 25.25mm/rev, min 96% max 104% over 99.7mmextrusiontest-5mms-nle- M592 D0 A0.01 B0
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 131 agc 77, measured 25.87mm/rev, min 97% max 103% over 104.8mmextrusiontest-1mms-nle-M592 D0 A0 B0.01
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 132 agc 77, measured 25.26mm/rev, min 97% max 103% over 99.4mmextrusiontest-5mms-nle-M592 D0 A0 B0.01
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 128 agc 75, measured 26.37mm/rev, min 96% max 104% over 119.2mmextrusiontest-1mms-nle-M592 D0 A-0.000317 B0.000187
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 129 agc 79, measured 25.28mm/rev, min 97% max 103% over 99.5mmextrusiontest-5mms-nle-M592 D0 A-0.000317 B0.000187
Duet3D magnetic filament monitor v4 on pin io3.in, enabled when SD printing, 25.30mm/rev, allow 60% to 160%, check printing moves every 3.0mm, mag 131 agc 79, measured 25.81mm/rev, min 97% max 104% over 100.0mm -
@dc42
The last set is using the calculator I have which already happened to be at 98 for 12mm/s3 so I tried that.But according to the filament sensor it doesn't appear to have had any change compared to NLE A0 B0