Pressure Advance Calibration
-
@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
-
@deckingman said in Pressure Advance Calibration:
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!
-
@dc42 said in Pressure Advance Calibration:
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.
-
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 retractionThank you!
-
@brunofporto said in Pressure Advance Calibration:
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.
-
@rcarlyle said in Pressure Advance Calibration:
@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.
-
@brunofporto said in Pressure Advance Calibration:
@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.