Bryan Mayland
TVWBB Hall of Fame
I want to do some calibration testing sort of like how the commercial NIST calibration blocks work but first I needed a steady temperature. Just running a bench power supply at fixed current output worked ok but it takes a long time to settle at a temperature. I've built a quick test rig using a 4.3 prototype HeaterMeter, an E3D V6 hotend that I had sitting in my parts drawer, and an M6 threaded thermocouple off Amazon (which happens to be the size of E3D nozzle threads). The cartridge heater can be controlled by the HeaterMeter 12V fan output and the aluminum block adds a nice mass to connect the two instead of just kapton taping the two together.
The PID coefficients that I use on the grill didn't do a terrible job but I thought it would be fun to do a PID tuning and post the results. Kp, Ki, and Kd are the PID constants instead of P, I, and D because it is difficult to tell if I mean "(I) did this" or "(The I Term) did this".

That's all there is to it! The problem with possibly applying this to use on a smoker is that instead of a 71 second period for an oscillation, the slow-reacting nature of a fire can cause each period to be 10 minutes or longer. Instead of taking 40 minutes, this would take 400 minutes. In that time, the conditions in the firebox will change which reduce the repeatable nature of each test iteration and could invalidate the entire process.
The PID coefficients that I use on the grill didn't do a terrible job but I thought it would be fun to do a PID tuning and post the results. Kp, Ki, and Kd are the PID constants instead of P, I, and D because it is difficult to tell if I mean "(I) did this" or "(The I Term) did this".

- First step was to get the temperature close to where I wanted to tune (100C) then set Ki and Kd to 0 in the webui as well as setting the Lid Detect to 100% to disable it. I picked a starting Kp of 10 randomly. As you can see following the first hump (by the F in 'Fast Decay') the oscillation error in the system quickly decayed and almost settled out. Needed a higher Kp.
- Kp=15 and restart the test. Looking at the temperature swings, this does a good job but you can see in the Fan Output that the output is decaying which means that the temperature oscillations will also decay, just at a slow pace. Close, but need a higher Kp.
- Kp=18 and restart the test. The first two oscillations decay as the controller locks in, but the next 5 look great. I pop over to the Status -> System Log and scroll to the bottom to see that HeaterMeter has calculated our PID constants for us for a 71 second period, 2 degree amplitude oscillation with no decay (0 gain):
Code:Sat Mar 18 14:54:48 2017 user.warn : New -1 peak @1489848865=98.0 half=35 per=71 amp=-2.0 gain=0.0 Sat Mar 18 14:54:48 2017 user.warn : Ziegler P=10.8 I=0.304 D=3.2
- Enter these new terms into the webui for Kp, Ki, Kd aaaaaand disappointment. The temperature is now oscillating around the setpoint, but it is still oscillating. I would call this the typical pretty terrible results I've seen from PID tuning. The temperature swing is about +0.6C to -1.2C. Using the formulas on the PID Tuning wiki page, I calculate the Tyreus-Luyblen coefficients using the same data from the syslog. P=8.18 I=0.115 D=6.76. This looks better with only +0.1 to -0.2C max oscillation, but seeing the power go up and down shouldn't be happening considering how stable the test device is.
- Cut all PID parameters in half, to P=4.09 I=0.058 D=3.38. This reduces the ability of the controller to react quickly to needed output changes, but reduces sensitivity that can cause fluctuations at steady state. After that, looks great!
That's all there is to it! The problem with possibly applying this to use on a smoker is that instead of a 71 second period for an oscillation, the slow-reacting nature of a fire can cause each period to be 10 minutes or longer. Instead of taking 40 minutes, this would take 400 minutes. In that time, the conditions in the firebox will change which reduce the repeatable nature of each test iteration and could invalidate the entire process.