# Modification of Pressure Advance for high speed Bowden printers

**URL:** <https://klipper.discourse.group/t/modification-of-pressure-advance-for-high-speed-bowden-printers/13053>\
**Category:** Developers\
**Created:** [January 12, 2024, 1:31am UTC](https://klipper.discourse.group/t/modification-of-pressure-advance-for-high-speed-bowden-printers/13053 "2024-01-12T01:31:51Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![dmbutyugin](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@dmbutyugin](https://klipper.discourse.group/u/dmbutyugin)\
**Post date:** [January 24, 2024, 2:50am UTC](https://klipper.discourse.group/t/modification-of-pressure-advance-for-high-speed-bowden-printers/13053/13 "2024-01-24T02:50:38Z")

</div>

> [@HumbleDeer](#):
>
> To me, it seems you’re both alluding to the same issue.

All I’m suggesting is to try lowering smooth\_time. This may give more accurate filament flow with similar strain on extruder, and may eliminate PA dependency on acceleration - one less variable to worry about, which would be a win. So, at least it’s worth a try.

> [@koconnor](#):
>
> Interesting. One possible explanation for this is that moving the extruder early, due to `pressure_advance_smooth_time`, causes some filament to leave the nozzle (blobbing) that should have otherwise been used to build pressure. Thus during pressure advance calibration, a higher `pressure_advance` value is found, because it is ultimately finding a value that is both the “blobbed amount” and the “pressure amount”.

Yes, I believe that’s what’s happening when smooth\_time is too large. In that case, some of the extra movement goes to waste - it affects the filament flow too early - and so extruder has to do more movements to compensate for that.

> [@koconnor](#):
>
> If this is the case, it could itself introduce a non-linearity to the `pressure_advance` value as extrusion speeds increase. For example, if hypothetically one lost 0.1mm of filament to “early blobbing” during the process of ramping up to 100mm/s, then ramping up to 200mm/s would be unlikely to lose 0.2mm - as the amount of “early blobbing” (if real) may be exponentially decreasing with speed…

Perhaps that could contribute to non-linearity effects, but it seems this cannot explain the effect completely. Say, when input shaping is enabled, the toolhead acceleration also starts earlier and finishes later than commanded. If smooth\_time gets much smaller than the shaper duration, then, essentially, the toolhead can already start executing acceleration, but pressure advance will be lagging behind and not acting just yet. So, there’s a certain threshold value for smooth\_time that one should not go below, and which likely explains why ideal PA value stops to reduce at a certain smooth\_time value. And it so happens that non-linearities in PA vs speed can still be observed even in those conditions.

In general, one could argue that still PA can be out of sync with the actual toolhead motion. So, it goes like this: there’s a certain ‘ideal’ toolhead motion (computed in a look-ahead queue), then there’s a commanded trajectory from input shaping, and there’s actual motion (toolhead response), which is a third thing. Notably, even if input shaping is not enabled, and commanded motion == ‘ideal’ motion, then the actual motion still differs from commanded. Just with input shaping the actual motion is less hectic and may be a bit easier to predict. And it also better matches the ideal motion, but only spatially, not time-wise. So, arguably, Pressure Advance should target the actual toolhead motion, rather than the input shaped or the ‘ideal’ motion (which is the case today). I looked into it as a part of my efforts to improve PA synchronization with input shaped motion. My conclusion there was that one could pick specific smoother functions (and of specific durations) for extruder motion in order to at least approximate the expected response of the toolhead. Then applying PA to that motion would produce PA motion that follows the expected toolhead motion after input shaping to a certain extent, improving the extruder synchronization with the toolhead. FWIW, I concluded that the current extruder smoothing in Klipper can be seen as a first-order approximation of a toolhead response for simple shapers like (M)ZV, so that’s why I recommend setting smooth\_time to a largest or an average of shaper durations for X and Y, at least for direct drive extruders. That said, in my branch I have smooth functions for the extruder generated for each shaper supported there to give better approximations of the toolhead responses. And for smooth input shapers that that branch has, due to their smooth nature and the fact that they are 0 at their ends, I believe the PA does not have that leakage problem. That is, there is no parasitic pressure built-up that results in filament leakage from the nozzle that you talked about. Basically, the extruder does not have to build-up pressure in advance, and it builds up the pressure as the toolhead also smoothly starts to accelerate. And even there I observe that for different velocity transitions the PA value is different. For example (an actual case for one of the filaments and extruders I tested for), 25-\>60 mm/sec transition requires PA = 0.038, 25-\>130 requires PA=0.034, and 60-\>130 requires PA=0.028.

Now, other sources of non-linearity can probably be seen as follows. The extra required filament push for PA `dl` can be calculated as  
`F = k(dl) * dl = gamma(v) * v`  
and `dl = alpha * v`. Then `alpha = gamma(v) / k(dl)`, which is a PA coefficient. So, the higher the resistance of the filament flow `gamma(v)`, or lower the rigidity of the system `k(dl)` is, the higher the PA coefficient `alpha` is. The fact that `alpha` is observed to be larger at smaller velocities could mean two things. Either higher flow resistance at lower velocities, which is counter-intuitive, but perhaps is possible due to viscosity and stickiness of the filament? Or that rigidity `k(dl)` is smaller at lower displacements, which would be not all that surprising, since even the stepper motor produces higher the torque the larger its offset from the equilibrium position is. And on bowden extruders there are even more sources to have low rigidity until all plays between connecting parts are eliminated.

---

_[View the full topic](https://klipper.discourse.group/t/modification-of-pressure-advance-for-high-speed-bowden-printers/13053)._
