Skip to content

Improve PID loops #14373

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

Merged
merged 6 commits into from
Jun 22, 2019
Merged

Improve PID loops #14373

merged 6 commits into from
Jun 22, 2019

Conversation

mikeshub
Copy link
Contributor

Description

Discussion in issue. Summary is that there is a windup guard is added and that the kludge in place of said is removed. The bed PID autotune settings are changed to no overshoot because the other two took a long time to settle. The PID loops D filter calculation is simplified and the sign on the D term output is fixed to make debugging the PID loops make more sense when looking at the output. The sign being reversed on the D term makes reading the output very counter intuitive.

Benefits

This provides a minor improvement to the hotend PID loops. This makes the bed PID loop usable. This also makes the bed PID tuning use the no overshoot setting.

Related Issues

#14192

mikeshub added 2 commits June 22, 2019 13:07
Windup guarding was missing. Kludge to act in place of windup guard is removed. D term filter calculations simplified to require fewer float calculations. Sign change for D term output to make debugging output more clear.
Classic and no overshoot take a long time to settle for the bed PID controller.
@thinkyhead thinkyhead changed the title Bugfix 2.0.x Improve PID loops Jun 22, 2019
@mikeshub
Copy link
Contributor Author

temperature.cpp line 812, const?

@thinkyhead thinkyhead merged commit 1db7013 into MarlinFirmware:bugfix-2.0.x Jun 22, 2019
@thinkyhead
Copy link
Member

temperature.cpp line 812, const?

Do you see pid_error being altered within that block? Did I miss it because it happens in a macro?

@mikeshub
Copy link
Contributor Author

No it doesn't. I was just wondering why the change to const float from float. I assume stylistic? I assume the compiler handles both the same way as the size of the binaries see to be unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants