When to repeat PID Autotune?
-
I was wondering when using different materials that require different print temperatures, e.g. in my case PLA@205°C and PETG@240°C, should I do PID autotune for both temperatures and use the resulting
M307
commands based on the material I print?I did my PID autotune some time ago with 205°C and it also keeps my temperature reasonably stable still at 240°C but how is it supposed to be done? What parameters need to change to justify/require a new PID autotuning?
-
@wilriker said in When to repeat PID Autotune?:
I was wondering when using different materials that require different print temperatures, e.g. in my case PLA@205°C and PETG@240°C, should I do PID autotune for both temperatures and use the resulting
M307
commands based on the material I print?I did my PID autotune some time ago with 205°C and it also keeps my temperature reasonably stable still at 240°C but how is it supposed to be done? What parameters need to change to justify/require a new PID autotuning?
Well when I used to calibrate various instruments, you'd always calibrate it at values above and below the lowest and highest that you'd ever want to measure. So if for example it was something that measured temperature between say 20 and 240 deg C, you'd calibrate it to be accurate in the range say 10 to 250. If you only calibrated it up to 205, then you'd be hoping that it would extrapolate correctly up to 240 but you could never be sure. So on that basis, I'd say that you ought to tune the PID up to just above the maximum that you'll use. Then it ought to work at all temperatures within that range. No doubt someone cleverer than I will correct me if I'm wrong.
-
The parameters you get from tuning should also work at temperatures not too far removed from the one you tuned at (perhaps +/- 40C) because the model takes into account the first-order effect of different temperatures. So I suggest you tune at a temperature midway between the lowest and highest ones you use for printing, e.g. 220C.
-
@deckingman @dc42 Thank you for clarification and input.
I am right now running a new autotune with
S220
. -
@wilriker Just because I'm particular I have been using specific PID tunings for different temp ranges. It does complicate things though, especially if you switch filament types a lot. It's not that I have a lot of different tunings, I only have two. High temp and Low temp. But it can get tricky knowing which settings are applied and making sure they are applied when they should be.
In order to try and automate things I use the filament change functionality of the DWC to load and unload filament. This is handy because it automates setting temps and moving the head into position and gives me prompts to follow, but it also loads the filament specific settings like retraction, pressure advance, and PID tunes.
The downside to using the filament load and unload method is that the settings don't carry over from a reboot. I guess I could start using M500 and save the changed values to the config-override.
Also, if you use Slic3r PE there is a filament specific G-Code section you can use to add the values and they get applied whenever you have that filament selected. This is handy because it avoids the issue of the values being over ridden by a reboot. They simply change the values at print time. Unfortunately Cura doesn't have this functionality and I tend to switch between the two frequently.
Finally, in order to catch all these corner cases where settings may not be applied properly, I have a set of macros to load the settings on request.
It's a bit of work to get it all setup, but if you're particular like I am, it can have a noticeable impact on print quality. Especially if you've taken the time to profile for filament for specific retraction and pressure advance settings.
If all you print is PLA and some PETG, it's probably not worth it at all. However, if you're printing PETG, ASA, Nylon, PLA+, etc etc it might be worth going the extra mile.
-
@phaedrux said in When to repeat PID Autotune?:
Just because I'm particular I have been using specific PID tunings for different temp ranges. It does complicate things though, especially if you switch filament types a lot. It's not that I have a lot of different tunings, I only have two. High temp and Low temp.
How different are the model parameters of those two sets?
-
@dc42 I'll have to get back to you on that as I'm in the delivery room waiting for my first born. I turned the printer off before we left for the hospital, but if the settings are stored in a config file somewhere I could check it in a backup. I looked in filaments.csv but that.only records the currently loaded filament.
I can't recall what the values were or if they were very different but I do know the temps were a little more stable especially at the high end. I believe I tuned for 210 and 270 on the hotend and 60 and 90 for the bed.
-
@phaedrux My advise: forget about the printer and concentrate 100% on your new child! The first 24 hours won't repeat themselves so enjoy it!
Other than that, I am basically planning something similar what you described just a little more automated. It is described in Problem with M28 and M29 in the first post. Sadly the issue with writing the file still exists as reported in Filament load macro writing to file in /sys. When this is fixed I will put at least values regarding temperatures as well as FW retraction settings in there. Probably also some PID tunings - not because it's necessary but just because RRF allows for this
- and maybe also some other filament related settings, though I have no idea what they will be, yet.
-
@wilriker it's still a waiting game here. Print has been stuck at 99% for hours!
-
@phaedrux I would have said print is complete but it won't come off the build-plate - but to each it's own.
Anyway, I am happy for you and wish all three of you just the best!
My child turns 1 in less then two weeks and I still can feel it how it was for me.
-
I went ahead and redid my PID tunes as it is summer here now and the room the printer is in can get fairly cool from the air conditioning.
Bed at 60:
M307 H0 A110.5 C172.0 D2.3 S1.00 V24.0 B0 Heater 0 model: gain 110.5, time constant 172.0, dead time 2.3, max PWM 1.00, calibration voltage 24.0, mode PID, inverted no, frequency default Computed PID parameters for setpoint change: P119.8, I5.994, D194.5 Computed PID parameters for load change: P1
Bed at 90:
M307 H0 A151.3 C356.2 D1.8 S1.00 V24.0 B0 Heater 0 model: gain 151.3, time constant 356.2, dead time 1.8, max PWM 1.00, calibration voltage 24.0, mode PID, inverted no, frequency default Computed PID parameters for setpoint change: P227.6, I8.874, D294.1 Computed PID parameters for load change: P2
Hot end at 220:
M307 H1 A517.9 C196.6 D3.0 S1.00 V23.9 B0 Heater 1 model: gain 517.9, time constant 196.6, dead time 3.0, max PWM 1.00, calibration voltage 23.9, mode PID, inverted no, frequency default Computed PID parameters for setpoint change: P22.6, I0.931, D47.4 Computed PID parameters for load change: P22.
Hotend at 280:
M307 H1 A491.0 C190.9 D2.8 S1.00 V23.9 B0 Heater 1 model: gain 491.0, time constant 190.9, dead time 2.8, max PWM 1.00, calibration voltage 23.9, mode PID, inverted no, frequency default Computed PID parameters for setpoint change: P24.4, I1.046, D48.6 Computed PID parameters for load change: P24.
I also just realized that I may want an additional tune for when I loosely enclose the printer to print high warpage materials like ASA.
From the values shown does it appear like there is much of a difference?
-
Also an update on my end: I repeated PID autotune @220°C which falls about in the middle of 205°C (PLA) and 240°C (PETG). Interesting here is that I have worse temperature stability at both printing temperatures compared to having the PID tuning done @205°C. Is there any reason that could explain this? Unfortunately I no longer have the values of the previous
M307
command just the current:M307 H1 A744.4 C223.7 D6.5 S1.00 V13.5 B0 ; Use PID on hotent - tuned@220°C