Nonlinear pressure advance explorer

Comparing the tanh and recipr models. Extra extruder advance = ADVANCE·v + OFFSET·f(v/VELOCITY), where f(x)=tanh(x) or f(x)=x/(1+x). Flow and acceleration are simulated over a trapezoidal test move, smoothed with the firmware's default parabolic extruder smoother. An upstream line shows the mainline linear model (advance = pressure_advance·v) for comparison.

model parameters
ADVANCE0.020
OFFSET0.120
VELOCITY5.0
test move & synchronization
target velocity (mm/s)150
acceleration (mm/s²)5000
smooth_time (s)0.020
time_offset (s)0.0000
upstream comparison (linear pressure advance)
pressure_advance0.040

Click a legend entry on any chart to hide or show that line.

advance amount vs velocity
extruder flow rate over the test move
extruder acceleration demand over the test move
peak extruder flow (mm/s) — tanh / recipr / upstream
/ /
peak |extruder accel| (mm/s²) — tanh / recipr / upstream
/ /
accel demand ÷ toolhead accel — tanh / recipr / upstream
/ /

Model math: klippy/chelper/kin_extruder.c — nonlinear tanh/recipr models and the upstream pressure_advance_linear_model_func (advance = pressure_advance·v). Smoother kernel: klippy/extras/extruder_smoother.py (default parabolic window w(τ)=1.5−6τ²). The test move assumes extruder velocity tracks toolhead velocity 1:1, so flow figures are per-unit-flow — the curve shapes and tanh-vs-recipr differences are the faithful part. Requires an internet connection for Chart.js (CDN).