-
Notifications
You must be signed in to change notification settings - Fork 85
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
PID-Profiles #145
PID-Profiles #145
Conversation
thanks for the PR! this looks awesome. once dan and @rogerlz test i think it should be good - could you black format it? thanks :) |
Of course, once I find out what that is XD |
I'm out of town till mid week, but after that I should be able to take a look at this. |
I did a first pass code review tonight, i'll try and take a deeper look tomorrow. |
Just a general info: |
thanks @Zeanon! It is a really nice feature, and I am personally interested in using it. |
Go for it |
@Zeanon Do you mind providing a basic description of what PID profiles are, what they do and why a user would want to do this? I haven't quite caught onto why I need to have this feature in my life. |
Yeah maybe I should improve the doc a bit |
If you print different materials at different temps, you want different pid parameters. For example on my printer If I calibrate for at 260c, but try and print at 220c. The plot of the hotend temp will look like a sin wave, because the parameters are to aggressive for the lower temp. The opposite happens if I calibrate low and try and print high. |
Thanks for the detail. This is a good feature for me as I have seen a small issue for my 255C PID tune when I need to run 305C for a ASA-CF material. As you feature allows, It would be great to have a few PID profiles to cover the range of temperatures. At the most intensive case a user could create profiles at ~5 degree increments to have the best resolution for a PID model tuned to the specific print temperature? As a side note, PID_v was an improvement for a 255C tune and print at 305C but still not perfect. |
The 5° increments is exactly what I did |
I pushed automated testing. It will fail due to the issue with |
@rogerlz I have fixed the stuff you pointed out and noticed another missing info in the docs (I added the load_clean and reset_target options later to smooth out the temps when switching profiles and apparently forgot to add them to the other commands as well, documentation is not my strong suit if I'm being honest) Another thing I noticed yesterday: I also implemented a |
@Zeanon I would keep it. It might be useful to others too. Do you want to add it to the docs or happy as it is?
I'd say only the name to not be too verbose.
I don't think so, but your change is great!! I loved it. |
I actually already added the get_values to the doc but forgot a part of the command XD |
I forgot the readme |
no worries! I took the opportunity to shuffle it a bit |
This reverts commit bb2e634.
@Zeanon I'd really appreciate some more details on how to implement this. In no particular order here are a few questions:
If you want I can help support writing some basic documentation to help users like me implement the feature. |
Basically pid_profiles behave the same as bed_mesh profiles you have to do a calibration for each profile (I started working on a way to calculate pid values for every temperature without having to a calibrate each time but it is extremely complex) Concerning the LUT, take a look in here: https://github.com/LastZeanon/Klipper_LynxBot_Config/blob/master/LUT/pid.cfg |
Awesome, thanks for that info and config reference. Exactly what i needed to know. Curiously I wanted to see how linear the PID parameters were for your extruder. For your setup you could calculate PID parameters from a linear fit. That is, when an arbitrary extruder temp is set, you could calculate and load a suitable set of PID parameters. These linear fits could be calculated from only a few PID calibrations. I'll try to do a similar analysis on my printer to see how the PID parameters are over a range of temps. |
* PID-Profiles * added documentation * I forgot to add * Black formatting * adding pid_profile tests * Fixed Remove_Profile * Updated doc * Small fix to doc * readme changes --------- Co-authored-by: Rogerio Goncalves <rogerlz@gmail.com>
* PID-Profiles (#145) * PID-Profiles * added documentation * I forgot to add * Black formatting * adding pid_profile tests * Fixed Remove_Profile * Updated doc * Small fix to doc * readme changes --------- Co-authored-by: Rogerio Goncalves <rogerlz@gmail.com> * readme with new pr number --------- Co-authored-by: Zeanon <thezeanon@gmail.com>
It took me quite some time but I had to refine some stuff, smooth out switching between profiles and so on.
Code is working perfectly fine in my fork, though I might have missed something while transfering it so it should be tested (unfortunately I can't really test it since I would have to redo a whole printer as all my printers are running my fork)
Luckily @dans98 offered to test it so there's that