Sineos
April 12, 2022, 2:05pm
2
Well, for my setup the PID tuning works good (good enough for me) but you are right, there are edge cases where it does not yield the wanted results. You might want to check:
Ah, yeah, the 255 is in there because other firmware (eg, Marlin) do that - when Klipper was first released it didn’t have the PID_CALIBRATE command and being somewhat compatible with other firmware was sometimes helpful. It’s an annoying legacy thing. It would be hard to change now as it would break everyone’s current config. (So, not worth the havoc.)
As far as I know, the fopdt HEATER_CALIBRATE tool in this experimental branch works as intended. It might be worth merging into the master br…
Background
Many people (myself included in my early 3D printing days) implicitly expect off-the-shelf near “perfection” of the heater performance of their printer. It takes time and practice to learn and appreciate that PID controller tuning is a largely empirical process without a one size fits all solution. Different printer firmware uses different implementations of the PID controllers and different methodologies to derive (approximate) the process PID constants. When this is combined wit…
Klipper3d:master
← akpch:patch-1
opened 09:40PM - 04 Apr 18 UTC
This is 'dead time control' algorithm. I used it with Repetier and loved it. Thi… s is description: https://www.repetier.com/dead-time-control/
Controlled by following parameters in the 'extruder' or 'heatbed' section:
control: deadtime
dt_deadtime: 10 #dead time in seconds as described in the link
dt_deriv_time: 0.5 #minimum poll interval, default is deadtime/10
Signed-off-by: Alexander Ka <shushera38-git@yahoo.com>
Klipper3d:master
← xbladen:work-xbladen-20210216
opened 09:16PM - 16 Feb 21 UTC
module: Heater, extending ControlPID by two new variables allowing different Kd … for rising and falling temp_diff
Introducing two new variables self.Kd_pos and self.Kd_neg filled by config file with default 0.
If not contained in configfile, they are overwritten by self.Kd, that still needs to be in configfile.
If both are submitted, self.Kd is unused, probably someone will work with Kd and Kd_neg, for example.
This gives the possibility to use two different Kd values for rising and falling temp_fiff of the heater.
Typically the heater has a much longer decay time than heat time. This can lead to a situation using a high Kd,
that a falling temperature above target temperatur leads to heating up, much more than needed together with
slow decay. Temperature is oscillating above and never reaches target temperature.
One possibility is to lower Kd, but this can lead to low performance of PID because of a large overshoot on heatup.
Using different Kd for rising/falling can minimize overshoot on heatup (large Kd)
and oscillating (small Kd) on falling temperature.
This is not covered by PID-tuning. A good starting point is the Kd from PID-tune and provide additional
Kd_neg at maybe 1/10 of Kd, depending on the fractional of heat-time to cool-time of some degree.
Line 268 does not need to be changed ...
Signed-off-by: Stefan Verse <verse@amotronics.de>