New Option: Model Predictive Temperature Control (Experimental)

Hi all,

Support for a new option to replace PID heating for the hotend has just been merged. This seems to have a lot better control over the hotend heater, and at least in my testing, seems to have a better profile for heating.

You can find the new setting in the Firmware Builder as per the below screenshot.

The documentation is still being processed - but in simple terms, the new command M306 is now added.

The basic options are:

 A<watts/kelvin>           Ambient heat transfer coefficient (no fan).
 C<joules/kelvin>          Block heat capacity.
 E<extruder>               Extruder number to set. (Default: E0)
 F<watts/kelvin>           Ambient heat transfer coefficient (fan on full).
 P<watts>                  Heater power.
 R<kelvin/second/kelvin>   Sensor responsiveness (= transfer coefficient / heat capcity).
 T                         Autotune the active extruder.

Once you flash your printer with a MPC enabled firmware, set your heater power as per the rating - most printers have either 30W or 40W heaters (mine is 70W), so you’d run:

M306 P30 ; 30W heater
M306 P40 ; 40W heater
M306 P70 ; 70W heater

Once that’s done, run the autotune:

M306 T

At this point, the rest of the setup is automatic.

When it finishes, save your settings via M500.

On my personal printer, the heatup profile when from this with an overshoot of 10-15c when using PID:
image

To this when autotuned using MPC:
image

I look forward to seeing peoples feedback on this brand new feature.

1 Like