Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Linear advance incompatible with S-Curve acceleration #14728

Closed
vadsh opened this issue Jul 25, 2019 · 24 comments
Closed

[BUG] Linear advance incompatible with S-Curve acceleration #14728

vadsh opened this issue Jul 25, 2019 · 24 comments

Comments

@vadsh
Copy link

vadsh commented Jul 25, 2019

As described here #10812 by @ejtagle (creator of linear advance who seems to quit working on project about 9 months ago) current implementation of linear advance is incompatible with amazing new feature of Marlin S-Curve acceleration.

As far as I understand current (Marlin 2.0.x) implementation of linear advance uses trapezoidal model different from S-Curve Bezier curve profile (see detailed description provided by linear advance author by link above).

I also suspect that direct extruders with low k-factor are more susceptible due to very fast response time. Mine is dual drive BMG extruder with short (~5cm) 1.9 diameter Capricorn tubing going to e3d V6 heatbreak. K-factor is 0.03

If both (LA and SC) are enabled - underextrusion and overextrusion happen at the edges of acceleration/deceleration phases.

Artifacts are especially noticeable with high speed (150 mm/s) and low acceleration (300 mm/s2) - which means longer acceleration/deceleration time and distance and bigger area where trapezoidal model of linear advance conflicts with bezier model of S-Curve.

Attached is a picture with related artifact (speed: 150mm/s acc: 300 mm/s2 k-factor: 0.03). Artifact disappears completely with K-factor = 0
Notice consistent underextrusion at the edge of acceleration/deceleration (where trapeziodal linear-advance conflicts with bezier s-curve)
IMG_20190726_012143

@EvilGremlin
Copy link
Contributor

I use both for a few months and never noticed that. With jerks and junction deviation. My k-factor is around 0.15, direct extruder.

@ManuelMcLure
Copy link
Contributor

My understanding is that LA is not perfect when used with S-curve, but it still results in an improvement over not using LA at all. So "no s-curve with LA" is better than "s-curve with LA" which is still better than "s-curve with no LA".

@vadsh
Copy link
Author

vadsh commented Jul 25, 2019

but it still results in an improvement over not using LA at all. So "no s-curve with LA" is better than "s-curve with LA" which is still better than "s-curve with no LA".

Not in my case. I've updated original posts. Please look at the picture.

@ManuelMcLure
Copy link
Contributor

Did you rerun the K-factor calibration after enabling S-curve acceleration?

@vadsh
Copy link
Author

vadsh commented Jul 25, 2019

Did you rerun the K-factor calibration after enabling S-curve acceleration?

Calibration pattern is another story. I believe it is also subjected to this issue.
I did it multiple times with steps as low as 0.001

The thing is none of the calibration lines seems to be perfect. K=0 is one of the best actually. All the other have different issues. 0.03 is a little better than others (not ideal though).

@thisiskeithb
Copy link
Member

With a proper K value & S_CURVE_ACCELERATION enabled, I haven't seen underextrusion like this on Marlin bugfix-1.1.x (MKS GEN-L/TMC2208s) or bugfix-2.0.x (SKR 1.3/TMC5160s), but I'm printing at 65mm/s or less.

@vadsh
Copy link
Author

vadsh commented Jul 26, 2019

With a proper K value & S_CURVE_ACCELERATION enabled, I haven't seen underextrusion like this on Marlin bugfix-1.1.x (MKS GEN-L/TMC2208s) or bugfix-2.0.x (SKR 1.3/TMC5160s), but I'm printing at 65mm/s or less.

I believe the effect is largely dependent on the path from extruder to meltzone. The tighter it is the more the effect. Bowden extruders should not suffer so much. Lower speeds with high acceleration should also suffer less (due to very low transition time).

I've also added the link to detailed description of this issue from linear advance creator who seems to stop updating it 9 months ago.

@thisiskeithb
Copy link
Member

Both configs are BMG/direct drive, but I haven't pushed speeds like you're running.

@vadsh
Copy link
Author

vadsh commented Jul 26, 2019

I use both for a few months and never noticed that. With jerks and junction deviation. My k-factor is around 0.15, direct extruder.

As 0.15 k-factor is typical for bowden - it seems that you have pretty much space for filament bending between exctuder and meltzone. Which alleviates the symptoms.

I have k-factor of 0.03 due to short capricorn (low internal diameter) tube between extruder and meltzone.

If you print at lower speeds (around 60 mm) and with acceleration of 1000 (or higher) - artifacts also should be minimal due to very short and fast acceleration/decelerations periods.

Issue should be most prominent with tight extruder-meltzone space, high speeds and low accelerations.

@vadsh
Copy link
Author

vadsh commented Jul 26, 2019

Both configs are BMG/direct drive, but I haven't pushed speeds like you're running.

what is you k-factor?

@ManuelMcLure
Copy link
Contributor

I'm also running BMG direct drive into a genuine V6 - I use 0.07 as my K factor for PLA. I use 0 for PETG because I haven't yet run a calibration pattern with PETG.

@thisiskeithb
Copy link
Member

thisiskeithb commented Jul 26, 2019

what is you k-factor?

Depends on the filament. 0.07-0.15 is about average.

@boelle boelle changed the title Linear advance incompatible with S-Curve acceleration [BUG] Linear advance incompatible with S-Curve acceleration Jul 26, 2019
@boelle
Copy link
Contributor

boelle commented Jul 26, 2019

me use 0.05 for both PLA and PET-G, no issues as i also use S-Curve and lin. advance

@vadsh
Copy link
Author

vadsh commented Jul 26, 2019

Please don't close the issue for a while - I need several days to run tests and make reliable steps to reproduce for others.

@tphan26363
Copy link

Same for me. K = 0.03 speed = 100mm/s direct extruder. Sorry for fuzzy picture. I did notice this after turn on S-Curve. It did not (or vaguely) show up on short move.
Kfactor-Conflict

@SFRSKZ
Copy link

SFRSKZ commented Sep 10, 2019

my prints are normal now. but with s curve and junction they were ugly, under or over extruded walls. i also dont use la anymore, i dont print fast and dont need la for quality since prints are already good. i used marlin 2 (1 week old from now), got annoying sound at y motor while doing certain moves. i guess marlin 2 needs some time to be reliable.

@boelle
Copy link
Contributor

boelle commented Sep 24, 2019

@vadsh had time to do more testing?

@boelle
Copy link
Contributor

boelle commented Oct 12, 2019

Lack of Activity
This issue is being closed due to lack of activity. If you have solved the
issue, please let us know how you solved it. If you haven't, please tell us
what else you've tried in the meantime, and possibly this issue will be
reopened.

@boelle boelle closed this as completed Oct 12, 2019
@Crisis64
Copy link

Crisis64 commented Apr 1, 2020

i have disabled S_Curve & left Lin_Advance enabled

@thierryzoller
Copy link

Do you have the same issue?

@Crisis64
Copy link

Yes I did, but I have disabled S_Curve. I also tested S_Curve, with Junction Deviation, & have reverted all back to classic jerk, with Linear Advance. This seems to produce best prints for me

@fiveangle
Copy link
Contributor

@thinkyhead - you may want to consider re-opening

@thinkyhead
Copy link
Member

Yes I did, but I have disabled S_Curve. I also tested S_Curve, with Junction Deviation, & have reverted all back to classic jerk, with Linear Advance. This seems to produce best prints for me

I believe that is the best combination for any printer with a moving (Y) bed, if you want the nice extrusions. S-Curve Acceleration dynamically adjusts the feedrate throughout acceleration and deceleration, and this takes it out of phase with S-Curve Acceleration.

I would hazard a guess that if you are printing at a certain range of speeds (on 32-bit) you could get away with S-Curve Acceleration plus a very small amount of Linear Advance just to clean up corners.

you may want to consider re-opening

It's not so much "actionable" as "awaiting LA version 2.0." And the expertise and time needed for a rewrite of the planner is not currently available.

I'll put a sanity-check warning into Marlin when these features are enabled together (especially on AVR). At the current time there's no simple way to make Linear Advance work with S-Curve Acceleration. Linear Advance predicts the duration of the move to be able to relax at the right time and with the right amount, and S-Curve Acceleration makes the duration less predictable, especially on longer lines.

@github-actions
Copy link

github-actions bot commented Jul 2, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests