aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Kinematics.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-12-14 10:30:25 -0500
committerKevin O'Connor <kevin@koconnor.net>2019-12-20 12:21:58 -0500
commitdabffcc22c84c92878bbd680a57e23874ded757d (patch)
tree57b90f0862c15066b59eac53e3ab61b8faa32deb /docs/Kinematics.md
parent54149e38f9cfa113a413e57dc663c0ddfd700a0f (diff)
downloadkutter-dabffcc22c84c92878bbd680a57e23874ded757d.tar.gz
kutter-dabffcc22c84c92878bbd680a57e23874ded757d.tar.xz
kutter-dabffcc22c84c92878bbd680a57e23874ded757d.zip
kin_extruder: Convert pressure advance to use "weighted average"
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/Kinematics.md')
-rw-r--r--docs/Kinematics.md9
1 files changed, 5 insertions, 4 deletions
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 )
```