From dabffcc22c84c92878bbd680a57e23874ded757d Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 14 Dec 2019 10:30:25 -0500 Subject: kin_extruder: Convert pressure advance to use "weighted average" Signed-off-by: Kevin O'Connor --- docs/Kinematics.md | 9 +++++---- docs/img/pressure-velocity.png | Bin 24301 -> 24394 bytes 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/Kinematics.md b/docs/Kinematics.md index f4b84550..ee501dff 100644 --- a/docs/Kinematics.md +++ b/docs/Kinematics.md @@ -284,8 +284,8 @@ rate, the more filament must be pushed in during acceleration to account for pressure. During head deceleration the extra filament is retracted (the extruder will have a negative velocity). -The "smoothing" is implemented by averaging the extruder position over -a small time period (as specified by the +The "smoothing" is implemented using a weighted average of the +extruder position over a small time period (as specified by the `pressure_advance_smooth_time` config parameter). This averaging can span multiple g-code moves. Note how the extruder motor will start moving prior to the nominal start of the first extrusion move and will @@ -294,6 +294,7 @@ continue to move after the nominal end of the last extrusion move. Key formula for "smoothed pressure advance": ``` smooth_pa_position(t) = - ( definitive_integral(pa_position, from=t-smooth_time/2, to=t+smooth_time/2) - / smooth_time ) + ( definitive_integral(pa_position(x) * (smooth_time/2 - abs(t - x)) * dx, + from=t-smooth_time/2, to=t+smooth_time/2) + / (smooth_time/2)^2 ) ``` diff --git a/docs/img/pressure-velocity.png b/docs/img/pressure-velocity.png index 89e91ab4..5268a948 100644 Binary files a/docs/img/pressure-velocity.png and b/docs/img/pressure-velocity.png differ -- cgit v1.2.3-70-g09d2