• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

When to repeat PID Autotune?

Scheduled Pinned Locked Moved
General Discussion
4
12
2.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    wilriker
    last edited by 15 Jun 2018, 19:11

    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?

    Manuel
    Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
    with probably always latest firmware/DWC (incl. betas or self-compiled)
    My Tool Collection

    undefined 1 Reply Last reply 15 Jun 2018, 19:23 Reply Quote 0
    • undefined
      deckingman @wilriker
      last edited by 15 Jun 2018, 19:23

      @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.

      Ian
      https://somei3deas.wordpress.com/
      https://www.youtube.com/@deckingman

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by dc42 15 Jun 2018, 20:55

        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.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        undefined 1 Reply Last reply 16 Jun 2018, 19:16 Reply Quote 2
        • undefined
          wilriker @dc42
          last edited by 16 Jun 2018, 19:16

          @deckingman @dc42 Thank you for clarification and input. 🙂 I am right now running a new autotune with S220.

          Manuel
          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
          with probably always latest firmware/DWC (incl. betas or self-compiled)
          My Tool Collection

          undefined 1 Reply Last reply 16 Jun 2018, 22:34 Reply Quote 0
          • undefined
            Phaedrux Moderator @wilriker
            last edited by 16 Jun 2018, 22:34

            @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.

            Z-Bot CoreXY Build | Thingiverse Profile

            undefined 1 Reply Last reply 17 Jun 2018, 14:09 Reply Quote 0
            • undefined
              dc42 administrators @Phaedrux
              last edited by 17 Jun 2018, 14:09

              @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?

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              undefined 1 Reply Last reply 17 Jun 2018, 17:38 Reply Quote 0
              • undefined
                Phaedrux Moderator @dc42
                last edited by 17 Jun 2018, 17:38

                @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.

                Z-Bot CoreXY Build | Thingiverse Profile

                undefined 1 Reply Last reply 17 Jun 2018, 18:25 Reply Quote 0
                • undefined
                  wilriker @Phaedrux
                  last edited by 17 Jun 2018, 18:25

                  @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.

                  Manuel
                  Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                  with probably always latest firmware/DWC (incl. betas or self-compiled)
                  My Tool Collection

                  undefined 1 Reply Last reply 17 Jun 2018, 19:20 Reply Quote 0
                  • undefined
                    Phaedrux Moderator @wilriker
                    last edited by 17 Jun 2018, 19:20

                    @wilriker it's still a waiting game here. Print has been stuck at 99% for hours!

                    Z-Bot CoreXY Build | Thingiverse Profile

                    undefined 1 Reply Last reply 17 Jun 2018, 19:28 Reply Quote 0
                    • undefined
                      wilriker @Phaedrux
                      last edited by 17 Jun 2018, 19:28

                      @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. 🙂

                      Manuel
                      Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                      with probably always latest firmware/DWC (incl. betas or self-compiled)
                      My Tool Collection

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Phaedrux Moderator
                        last edited by 30 Jun 2018, 22:49

                        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?

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          wilriker
                          last edited by wilriker 7 Mar 2018, 13:18 3 Jul 2018, 12:18

                          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
                          

                          Manuel
                          Duet 3 6HC (v0.6) with RPi 4B on a custom Cartesian
                          with probably always latest firmware/DWC (incl. betas or self-compiled)
                          My Tool Collection

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA