Regression in dynamic PA

OK, thanks for the explanation of the issue, I think my new code should work fine with this scenario. As for the current mainline behavior, Klipper cannot really change the extruder PA while extruding, as this would require an immediate change in the extruder position, and would result in stepcompress errors. In order to avoid this problem altogether, when PA is changing, Klipper flushes its internal move queue and effectively makes the toolhead stop. Then the extruder does not have to change position on the PA change - since the velocity is 0, PA adjustment of position is also 0 regardless of the value of advance coefficient. Then Klipper continues printing with the new PA value. So the PA value changes exactly where needed, however, due to momentary stop of the toolhead (the pause lasts ~ smooth_time seconds) you are likely to get a blob in this spot, so this kind of defeats the purpose of the dynamic PA feature. If I were to take a wild guess, perhaps Danger Klipper simply removed that move queue flushing, but then the PA will be applied at some random point in time (typically before it was actually supposed to take effect) and if you change the PA too much, you are very likely to run into stepcompress errors (and timer too close errors are also possible).

Thank you for the offer, but I’m not currently using Orca slicer, so it is a bit of work to set things up, and I did waste quite a bit of efforts in the past on non-linear PA already. I will likely take a look at it some time in the future, but I hope to see more real-life tests first.

And thanks for providing a brief overview of your models. For comparison, the two non-linear models I have implemented earlier just do an interpolation between two PA values, essentially, with PA(extruder_velocity == 0) > PA(extruder_velocity → infinity), using one of the two smooth functions I came up with. FWIW, I did not observe the dependency on the acceleration, but I did not study that too much. So, for my understanding, in your first post here you indicated the parameters such as smooth_time, acceleration and velocity. What is ‘LH=0.2’ and what are the shapers that you are using and what their maximum recommended accelerations are? This is for me to put the tests into perspective and to understand the observed effects better.