-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
improved the pid calibration algorithm #62
Conversation
added general pid documentation Signed-off-by: Daniel Sherman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome :) thanks so much! I'm out of town for the weekend but maybe @rogerlz will have bandwidth to test this on his machine, but everything looks good to me!
Great work on the docs, too - super clear and a great explanation!
The PR looks nice! I don't have enough knowledge on the subject to understand what it does, but I can say that I have enabled @dans98, we are applying code formatting to make it easier to read.. do you mind if I push a commit to your PR formatting it so the tests can run green? Ty |
oh, @dans98 a question - is pid_v a viable use for hotends? or is it primarily for heaters with large thermal mass - eg, the bed? |
@rogerlz go ahead and push a commit, I have no issues with it. I'm a developer by trade (enterprise grade php), and i'm used to a lot more stringent formatting & documentation. I was just trying to stick to what mainline klipper seems to have, almost no spacing, or inline documentation. |
@bwnance the main benefit of pid_v is that it's not susceptible to integral windup (the overshoot you get when first coming up to temp). its also generally better at holding temp, on a clean signal. I use pid_v on my hot end and bed. If you have a large thermal mass bed you most likely want to use Cohen-Coon parameters instead of Classic Ziegler-Nichols (what klipper generates by default). In the docs I provided a spreadsheet that lets you calculate Cohen-Coon parameters from the data written to the log. |
@dans98 awesome, thank you! would it be feasible (can be in a subsequent PR) to have that parameter calculation in a klipper feature, rather than a spreadsheet? Maybe as a config flag in a heater? specify the parameter type in the heater config block |
Yea I could do a follow up that calculates everything in klipper/python. My only concern would be how do we present it all to the user? The spread sheet takes what's written to the log and then allows you to generate 5 different sets of parameters. should we just calculate them all and dump them all to the log? I wouldn't want people to have to re-run calibration just to try different parameters. Than can take a long time on something like a high thermal mass bed. |
@dans98 could we save the "raw" information (that's currently written to the log) to the config and then use it in conjunction with the chosen parameter type to calculate parameters on heater initialization? |
@bwnance I'm under the weather at the moment, but I'll think about what's possible. |
@dans98 feel better! No rush :) |
I haven't had time to look at the change yet, as soon as i got over the sinus infection my toddler gave me, I got hammered with a big work project. With that being said, I've been incontact with Zeanon about getting his pid profile code in place. |
I've updated the pid calibration algorithm, so it provides better results, and added general pid documentation.
lots of discussion about the changes can be seen here.
https://klipper.discourse.group/t/experimental-pid-improvement-changes/3604