Hot end auto-tuning failed due



  • Hi,

    I tried re-tuning my hot end heater today, a 40W 24V unit heater cartridge (cheap clone).
    My current heater model is: M307 H1 A539.5 C221.2 D3.2 S0.80 V24.1 B0
    It is working just fine for PLA the last months, but now I'm starting to print PETG which requires a bit higher temps, so I wanted to re-tune at 245C:
    M303 H1 P0.85 S245

    But it fails, because just as it hits the max temp, the heater cuts out for a second, causing this weird kink.
    And then during the cool-down phase, the auto-tune fails with: failed due to bad curve fit.
    I tried different PWM settings, 1.0, 0.9, 0.85, 0.5 - always the same error.

    0_1528284689898_Screen Shot 2018-06-06 at 13.31.03.png

    I can heat-up manually to 245C via DWC just fine without getting this kink, so something in the auto-tuning process must be causing it...
    I think DWC plots the kink in the graph before displaying the "Heater off" message, but it is all happing within a few seconds, so it is hard to tell.

    The the existing heater PID model affect the re-tuning in any way? should I reset the values before running the auto-tune (to which values)?

    Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 1.21 (2018-03-21)
    WiFi Server Version: 1.21
    Web Interface Version: 1.21


  • administrators

    That heater cut-out is causing the problem. What temperature limit did you set with M143?



  • @dc42 I don't have a M143 in my config.
    I just tried with M143 H1 S270 - no difference, I still get the same kink & auto-tuning error.


  • administrators

    If you increase or decrease the target temperature by 5C or 10C, does the kink move with the target temperature or remain at the same temperature?

    What type of temperature sensor are you using?

    Stick with PWM 1.0.



  • I'm using a v6-clone hot end, 40W 24V heater, no silicone sock, and an old-style glass thermistor bead:
    M305 P1 S"Hotend" R4700 T100000 B4725 C0.0000000706.

    I just completed a successful auto-tuning with P0.85 S210, although I also saw a tiny kink at roughly 210C (smaller kink, and close to the expected target temp).

    Tuning with P1.0 S245 now resulted in a Auto tune cancelled because temperature peak was not identified and a kink close to 245C (and a pesky warning - which I can ignore 🙂 )

    This weird kink feels like the auto-tuning state machine is switching too soon into the peak-detect or turns off the heater too early...


  • administrators

    @resam said in Hot end auto-tuning failed due:

    This weird kink feels like the auto-tuning state machine is switching too soon into the peak-detect or turns off the heater too early...

    That's why I want to know whether the position of the kink moves up and down with target temperature.


  • administrators

    PS - which firmware version are you using?



  • Firmware Name: RepRapFirmware for Duet 2 WiFi/Ethernet
    Firmware Electronics: Duet WiFi 1.02 or later
    Firmware Version: 1.21 (2018-03-21)
    WiFi Server Version: 1.21
    Web Interface Version: 1.21

    And yes, the kink moves up and down.
    Tuning for 210C causes a kink at roughly 205-210.
    Tuning for 245C causes a kink at roughly 240-245.


  • administrators

    Thanks, this is now on my list to investigate for the next firmware release. Meanwhile, I suggest you either use your existing model (it shouldn't change much with temperature), or else tune at the highest temperature that works but be prepared to increase the dead time parameter if the temperature oscillates.



  • Well, now I'm printing at 257C - and the fluctuations get quite big now... up and down of almost 10C in total.
    I found another forum post with a similar issue, but no answer there either: https://forum.duet3d.com/topic/3279/pid-autotune-fails

    I'm doing a rather long print at the moment, but I will try a few more auto-tune runs this weekend. Maybe I get lucky once.
    I also suspect my PSU to be a bit weird, because the speed of the internal fan somehow oscillates as well... maybe it's related.



  • If it is a clone V6 then it is likely to have a thermistor with a B Value of 3950 specified at 25/50 degrees and not the same as the E3D ones maybe thats the issue?



  • @dougal1957 I performed a successful auto-tuning about 8-9 months ago, and I didn't change my thermistor settings since then...
    Next thing on my list to check is wiring and the thermistor itself - and maybe replace it.



  • fair do's


  • administrators

    @resam said in Hot end auto-tuning failed due:

    Well, now I'm printing at 257C - and the fluctuations get quite big now... up and down of almost 10C in total.

    If the fluctuations are regular oscillations (not caused by e.g. the print cooling fan turning on), increase the dead time (D parameter in M307) until they stop. The kink you are getting in the tuning temperature curve is causing the dead time to be under-estimated.

    Dead time should be independent of temperature, so try the 3.2 seconds that you were using before.



  • I now tried various combinations of parameters and configs - no luck.
    The kink goes down too quickly to be caused by actual cooling - so I'm guessing this must be some other non-heat-related measurement error...0_1529099981641_Screen Shot 2018-06-15 at 23.58.00.png

    PSU voltage stays fairly constant at 24.1 - 24.2V.
    30mm hotend cooling fan comes on at full power at 50C and does not blow on the heater block. No part cooling fans are active.


  • administrators

    I agree, the kink looks like a firmware artefact. It's on my list to see if I can reproduce it.



  • I didn't find any wiring issues or other obvious faults, but I did manage to play with the model parameters to get a stable temperature while printing. I do get a big initial overshoot of 10-15C when heating up from a cold state, but after that has settled down, I get a stable 257C with +/- 0.5C.

    My old model was M307 H1 A539.5 C221.2 D3.2 S0.80 V24.1 B0
    (auto-tuned a few months ago).

    My new model is M307 H1 A560.0 C130.0 D10.0 S1.0 B0
    (tweaked by hand until I saw a flat temp curve).


  • administrators

    The initial overshoot suggests that you have set the gain too high or the time constant too low. I find it suspicious that your new time constant is half the value you had from auto turning. Also your dead time is very high and will prevent the PID from reacting very fast.



  • @resam said in Hot end auto-tuning failed due:

    M307 H1 A560.0 C130.0 D10.0 S1.0 B0

    I didn't fine tune it yet - I just tried with D5.0 and it was even better, less initial overswing, and also stable at 255C.
    I did notice another oddity, when I used DWC to set the heater to 0C (i.e., OFF), I got another weird kink (far right)!
    0_1529309932158_Screen Shot 2018-06-18 at 10.16.50.png

    Is my 24V 40W heater somehow affecting the thermistor reading when I turn it off? Voltage drop on the ADC reference?


  • administrators

    Yes I think there is an interaction between your hot end heater being powered and the temperature sensor. But it's unlikely to be the ADC reference. What type of temperature sensor are you using?


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.