• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Exponential variable for pressure advance?

Scheduled Pinned Locked Moved
Firmware wishlist
7
29
5.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    nyt
    last edited by 2 May 2018, 00:56 5 Feb 2018, 00:46

    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

    1 Reply Last reply Reply Quote 0
    • undefined
      cbusillo
      last edited by 5 Feb 2018, 03:58

      I can second this. Slower layers have different corners than faster layers on the same print.

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 5 Feb 2018, 10:36

        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?

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • undefined
          nyt
          last edited by 2 Jul 2018, 06:20 7 Feb 2018, 05:54

          @dc42:

          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.

          https://pastebin.com/btAvUt3H

          1 Reply Last reply Reply Quote 0
          • undefined
            nyt
            last edited by 19 Feb 2018, 20:11

            thoughts?

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators
              last edited by 19 Feb 2018, 22:22

              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?

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • undefined
                nyt
                last edited by 20 Feb 2018, 06:58

                Yes, but I don't recall how much. I'll recreate it tomorrow, print running at the moment.

                1 Reply Last reply Reply Quote 0
                • undefined
                  nyt
                  last edited by 3 May 2018, 09:03 5 Mar 2018, 08:00

                  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/s

                  0.15 pressure advance on both:

                  0.08 on inner, 0.15 on outer:

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    deckingman
                    last edited by 5 Mar 2018, 09:07

                    @nyt

                    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).

                    Ian
                    https://somei3deas.wordpress.com/
                    https://www.youtube.com/@deckingman

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      nyt
                      last edited by 5 Mar 2018, 09:23

                      @deckingman:

                      @nyt

                      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

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        deckingman
                        last edited by 5 Mar 2018, 09:46

                        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…..

                        Ian
                        https://somei3deas.wordpress.com/
                        https://www.youtube.com/@deckingman

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          nyt
                          last edited by 8 Mar 2018, 03:05

                          @dc42:

                          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

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            3D_low
                            last edited by 8 Mar 2018, 23:18

                            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

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              vp
                              last edited by 9 Mar 2018, 08:07

                              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).

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                deckingman
                                last edited by 9 Mar 2018, 08:26

                                @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.

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  nyt
                                  last edited by 3 Sept 2018, 20:03 9 Mar 2018, 19:38

                                  @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.

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators
                                    last edited by 9 Mar 2018, 20:48

                                    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.

                                    Duet WiFi hardware designer and firmware engineer
                                    Please do not ask me for Duet support via PM or email, use the forum
                                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      nyt
                                      last edited by 9 Mar 2018, 22:31

                                      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.

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        dc42 administrators
                                        last edited by 10 Mar 2018, 08:23

                                        @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.

                                        Duet WiFi hardware designer and firmware engineer
                                        Please do not ask me for Duet support via PM or email, use the forum
                                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                                        1 Reply Last reply Reply Quote 0
                                        • undefined
                                          nyt
                                          last edited by 3 Oct 2018, 08:45 10 Mar 2018, 08:40

                                          @dc42:

                                          @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

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA