extruder: Don't do pressure advance on velocity changes due to cornering
Due to the lookahead, small changes in the direction of the toolhead cause minor changes in toolhead velocity. These "cornering" velocity changes cause the current extruder code to trigger pressure advance and its associated pressure retract. This causes the extruder to rapidly "jerk" the filament. This code change updates the extruder to detect velocity changes due solely to cornering and avoid pressure advance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
93dd310add
commit
345fc41482
|
@ -150,13 +150,6 @@ Hardware features
|
||||||
Misc features
|
Misc features
|
||||||
=============
|
=============
|
||||||
|
|
||||||
* The "pressure advance" algorithm does improve extruder
|
|
||||||
functionality. However, it's interaction with lookahead is not ideal
|
|
||||||
as it can cause rapid jerks of the filament when the head speed
|
|
||||||
changes briefly during cornering. Ideally, pressure advance would
|
|
||||||
interact better with lookahead to avoid advance during transient
|
|
||||||
speed changes.
|
|
||||||
|
|
||||||
* Possibly use cubic functions instead of quadratic functions in step
|
* Possibly use cubic functions instead of quadratic functions in step
|
||||||
compression code.
|
compression code.
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,15 @@ class PrinterExtruder:
|
||||||
prev_pressure_d += extra_accel_d
|
prev_pressure_d += extra_accel_d
|
||||||
# Update decel and retract parameters when decelerating
|
# Update decel and retract parameters when decelerating
|
||||||
if decel_t:
|
if decel_t:
|
||||||
npd = move.end_v * move_extrude_r * self.pressure_advance
|
if move.corner_min:
|
||||||
extra_decel_d = prev_pressure_d - npd
|
npd = move.corner_max*move_extrude_r * self.pressure_advance
|
||||||
|
extra_decel_d = prev_pressure_d - npd
|
||||||
|
if move.end_v > move.corner_min:
|
||||||
|
extra_decel_d *= ((move.cruise_v - move.end_v)
|
||||||
|
/ (move.cruise_v - move.corner_min))
|
||||||
|
else:
|
||||||
|
npd = move.end_v * move_extrude_r * self.pressure_advance
|
||||||
|
extra_decel_d = prev_pressure_d - npd
|
||||||
if extra_decel_d > 0.:
|
if extra_decel_d > 0.:
|
||||||
extra_decel_v = extra_decel_d / decel_t
|
extra_decel_v = extra_decel_d / decel_t
|
||||||
decel_v -= extra_decel_v
|
decel_v -= extra_decel_v
|
||||||
|
|
Loading…
Reference in New Issue