Regression in dynamic PA

Awesome, that is a good insight.

I did do a test with 0.02 scv but didn’t notice much of a difference. But since I’ll re run the calibration I’ll throw it in the mix.

I’ll be running the PA tests tomorrow evening as the printer is busy doing its thing till then :slight_smile:

Ps. For printing I use 10k accels for travel and sparse infill as I don’t care about their quality. So even with the wrong PA it doesn’t really matter, at least in a real world case, but interesting to see the results none the less.

Ps2. Probably a more appropriate test would be one that doesn’t use corners to judge PA as this eliminates a few variables. However on the other side we care about best corner performance so it’s a bit of a toss up. Let’s see :slight_smile:

Quick update - have pulled the branch from @dmbutyugin above, reinstalled firmware on the MCU’s and starting a PA changing “soak test” with my stress test Gcode file (around 300mb) with more than 127k PA changes.

Should work fine, but soak testing the change just in case before proceeding with detailed PA testing. Will proceed with the PA tests tomorrow :slight_smile:

Sure, please let me know if any issues arise. And just note, you didn’t really have to reflash the MCUs since there are no code changes to the MCU code. It does not hurt, but also feel free to flash the stock firmware once you’ve done with the testing.

1 Like

So far so good :slight_smile: had to flash them as I was on a danger klipper version testing it out before so better safe than sorry …

No stutter at all from what I can, barely, see. Surface finish tests to follow tomorrow

Ps. The click click noise on retraction is the Bowden collet moving up/down slightly and the filament cutter wiggling ever so slightly on sharp direction changes. As it’s a G2E there is no backlash at the gears so no worries there

And speed transitions here - 140mm/sec internal perimeter, 20-60 external (also with fuzzy skin causing many many tiny segments with varying speeds). No stuttering from what I can see :slight_smile:

Hi @dmbutyugin

The PA change in your PR works wonders.

Standard klipper below:

Your PR:

Seems to be working very well. There are no artefacts in the feature when adapting PA for overhangs and other external features (bridges etc).

Also the soak test from last night finished successfully.

1 Like

Thanks for the feedback! So it seems the implementation works as expected, and it would make sense to send a PR with the changes.

1 Like

So, I pushed a small simplification to the code to my branch. If you will be testing dynamic PA further, please pull the latest state of the branch and test that change as well. If all goes well, I’ll open a PR later this week.

2 Likes

Yeap implementation worked well!

I’ll be pulling the latest changes tomorrow and run the overhang test again, no worries!

Also I need to rerun the PA tests with your earlier recommendations, will start on this tomorrow hopefully too.

Pushed a bit different set of refactorings to the branch, however I think they have less chances of breaking something vs the version you previously tested.

No worries, I haven’t managed to test it yet so will pull the latest branch, thank you!!

Hi @dmbutyugin

I’ve installed your latest code this morning. No regression that I can see - the external walls remain printed well without any artefacts.

Maybe should proceed with raising a PR?

Thank you!!

1 Like

Also printed a couple of .stl on latest dynamic-pa branch + Orca Adaptive PA from igiannakas

Printed fine (STLs and settings were relatively simple for Orca Adaptive PA. But for statistics - everything printed without artefacts or problems)

1 Like

Interesting - thanks for testing.

I’d be curious to see a comparison between dynamic PA (with Dmitry’s patches) and single value PA.

I get the impression from your OrcaSlicer PR that you’ve already done this analysis. I’m hoping you can share a quick summary of your findings - basically why PA needs to be higher for some features and lower for other features.

Thanks again,
-Kevin

2 Likes

I’ve opened a PR. Besides the possibility of doing the dynamic adjustments of PA in the slicer, it is also useful for manual adjustments of the PA by user (if they realize that the currently set value is a bit too high or too low, right now they have to carefully time sending SET_PRESSURE_ADVANCE command to Klipper, in order to avoid a brief pause on some externally visible feature, which can be a pain from my personal experiences).

Hi @dmbutyugin

I’ve started re running the PA profiling tests last night.

Please see below 100mm/sec test done at 1k , 2k ,4k accels with MZV as the input shaper as discussed above. Smooth time is at 0.01 (but will try also one combo with a higher smooth time value).

Enlarge and magnify image to see the deltas :slight_smile:

What I see is that there is a correlation between acceleration and PA too, even at lower acceleration limits. It also appears that the largest delta is between 1k and 2k change with the 2k to 4k change tapering off. At least in the corner test executed.

What I think I see in the above measurements is a PA value of
1k- 0.039-0.041 before perimeter separation begins
2k- 0.032-0.034
4k- 0.029-0.032

It may be a test process limitation as this test validates PA by looking at corner performance. Maybe a straight line slow-fast-slow speed test is more appropriate, so will also test that method using the lines test and will see what it also shows.

Also, as expected, the area of uncertainty for the slower speed tests below, done at 50mm/sec across the same accelerations is wider - it’s more difficult to pick the right value as the delta between sharp corner and ever so slight bulge is narrower. Also it appears that PA delta is far far less at lower speeds between different accelerations. Maybe this is a test limitation or just that the lower extruder velocities impact PA between accelerations far far less.

Kevin,

I’ll consolidate the test results from the orca pr thread and post them here for reference.

But in summary the areas where I personally have seen the biggest improvements:

  1. Post bridging extrusion consistency - bridges appear to like low PA values
  2. Consistency between faster internal and slower external walls and solid infill.

There is much less benefit to varying PA for overhang regions than I expected, at least for my setup. But the revo HF + Galileo 2 extruder seem to control the filament well and be quite a bit more linear than other combos (eg my old volcano v6 CHT with rapido UHF).

Hi Kevin

Please see some experimental results below. For context, my best PA for an “average” feature before using adaptive PA was in the 0.028-0.03 range or so, which was matched to give a good external corner finish. The prints in Grey Polyterra are from my tests and are taken with top down lighting to accentuate the differences.

1) Bridging perimeter performance

Here we can see that bridging perimeters benefit from lower pressure advance, reducing the slight under extrusion post bridging. Also note the general improvement in surface smoothness between the two.

2) Improved cross feature consistency
On the below the PA value was set for optimal external walls, with internal features having artefacts (top print). With adaptive PA this is resolved (bottom print).

Eg. on the below the PA value was set to be the optimal for external walls - but can see the internal features causing artefacts.

vs with adaptive PA setting the PA value to a lower number for internal, faster features vs. external

When optimising PA for external wall quality, on some hotend/extruder combos this may result in a too high PA value for internal features. Hence a compromise is usually being sought where the two are OK - not ideally set for each feature but adequately set to not create significant artefacts. However with adaptive PA this doesnt need to be the case, as you can set the right PA for the feature being printed based on the needed extrusion speed and toolhead acceleration

3) Hypothesis - Improving overhang quality
The jury is still out whether adapting pressure advance for (slower) overhangs is beneficial or not as if set incorrectly it can cause extrusion inconsistencies on its own, which can be bigger than simply having the standard PA for the feature. This needs more experimentation and validation.

For example on the below prints I didn’t notice much of a difference between setting a higher PA for overhangs:

Left adaptive Pa, right stock single PA.

These are really the two core benefits and one hypothesis that is currently being tested, from what I’ve seen and other participants in the PR testing have reported back.

Hope this helps?

1 Like

@dmbutyugin

More Pa tests below. At 150mm/sec 1k and 2k accel

Evidently the PA for 1k is higher than 2k - gaping starts appearing much earlier in the 2k test -around 0.032 vs at 1k where it is closer to 0.04. Why this is, it’s unknown to me - I’m guessing but maybe SCV plays a role? (I’m running at SCV 5).

Also the other item I’ve noticed is with low acceleration (1k) the difference in ideal PA between speeds is greatly diminished. At 2k it’s much more evident and 4k even more so.

Once Ive completed all my PA tests I’ll paste the complete results table.

Managed to negotiate the wife’s lab grade microscope to check my PA tests so posting the below more from a geeking out perspective :slight_smile:

What a too low PA looks like:


Can clearly see the over extrusion in the corner which results in the visible bulging

What too high PA looks like:


Here we can see the perimeters separating right before the corner at the point where PA is invoked to reduce nozzle pressure. Here in this case slightly too high

At 50mm/sec and 1k accel the below is with PA of 0.034

Looks about right. Maybe ever so slightly a small excess of material at the tip of the corner

At 50mm/sec and 1k accel the below is with PA of 0.039


This looks right, if anything maybe ever so slightly too high.

At 50mm/sec and 1k accel the below is with PA of 0.036


This is perfect

At 150mm/sec and 1k accel the below is with PA of 0.036

What conclusions do I draw from this (limited experiment)?
Tuning for slower accelerations:

  1. Firstly, if you can’t easily spot the PA change, there probably isn’t any value in tuning for that speed and acceleration.
  2. The lower accelerations really are not sensitive to PA values. Even with a microscope the delta between 0.034 and 0.039 is not such as to cause a big visual difference in the model. Also the delta between 50mm/sec and 150mm/sec is insignificant.
  3. So when tuning for slower accelerations, pick a fast speed (around 100-150mm/sec) and use the same value throughout. What you see in the testing is just the spread of acceptable values being larger the slower you print. However the right value is still pretty much the same.

Tuning for higher accelerations (2k & 4k)
The table below contains the combined results:
image

At slower accelerations, as said above, the ideal PA is a wider range of values. Also at higher accelerations, the ideal PA range is narrowing down substantially AND the PA value is lower, in like for like speeds.

Finally the higher the speed generally the lower the PA. This is valid for accelerations over 1k or so in my specific printer.

Hope you find this useful :slight_smile:

1 Like

Thank you for your efforts to test it. Overall, I’d need some time to process and think about the results. The only thing that seems surprising to me that I wanted to call out is the PA for bridges. You claim that the print quality improves (the underextrusion is reduced) if the PA for the bridge is reduced. From POV, this seems somewhat counter-intuitive. But the way I can interpret these results is that while printing the bridge, the pressure in the nozzle drops considerably. So after the bridge you need to compensate by pushing more filament into the hotend and nozzle. And constant PA just does not give enough extra filament push to compensate for the loss of pressure. By configuring lower PA value for the bridge itself, you get an extra boost for the filament pushed into the nozzle: there’s regular velocity-based push, and there’s a push coming from higher PA value after the bridge. But I wonder whether the smaller PA value is the actual answer to the problem here, or whether you should simply have a small ‘un-retract’ right after the bridge to compensate for the loss of pressure. Basically, I wonder if reducing PA even to 0 during bridges will be sufficient for all extruders, or whether you got lucky with our setup with 0.01 PA value, but that may not suffice for other users, and you cannot set PA at a negative value.

On the bridges front that is exactly what is going on. There is an extra pressurisation going on because of the Pa change at the end of the bridge. Whether I got lucky it’s uncertain yet - more testing is needed.

However you may be on to something about controlling that pressurisation with an extra material push during the last segment of the bridge instead of a PA change. Basically a slight flow adjustment upwards for the ramp up segment where the bridge transitions to a wall.

I’ll see what I can do in the slicer to test this. Thank you for the pointer!!