Welcome! Log In Create A New Profile

Advanced

PID tuned, but still slow...

Posted by ketil 
PID tuned, but still slow...
March 23, 2014 06:57PM
Hi,

I'm running a printer with Marlin, and I find the nozzle warm up sequence is really slow. Not because heating is slow, but because the logic is slow. I'd love any tips on how to tune my PID parameters to get started faster. I've used M303 to autotune, but it didn't really improve the situation much.

When I switch on the nozzle heater, temperature increases in steps of 10-11 degrees every time pronterface measures (which is something like every 1-2 seconds or so, not sure). During initial heating the temperature overshoots by about 10 degrees, so as I'm currently printing at 198, it heats to about 208/209, and then slowly falls again. So far, I'm fairly happy, though it could have predicted the overshoot to some degree.

Now, the temperature falls to like 191 degrees, and then sloooowly warms up again, and it takes over a minute from the temperature was falling until it reaches the target temperature again, so after I reached the target temperature the first time (and shot past), it probably takes somewhere between 2 and 3 minutes.

I've seen other people with other printers reach the target faster, so I'm thinking it's possible to improve on this. Do I have to resort to manual tuning? I tried (perhaps halfheartedly) a couple of times after reading some tips online, but I don't know much about this, and didn't have much luck.

Or do I just have to accept it?
Re: PID tuned, but still slow...
March 23, 2014 10:49PM
By default, Marlin's PID doesn't kick in until +/-10C, and outside of that uses bang-bang. If your heater at full power is strong enough to move your process by 10C in a second or two, you would need the system to start tapering off from full power earlier. As is, with the Marlin defaults, it is clearing out the integral accumulator at 190 and 210C, and it has to re-build up the integral term to get to stable power.

If you widen PID_FUNCTIONAL RANGE from its default of 10C, there will be more of a chance of the PID smoothly transitioning from full power down to whatever power level it takes to hold at temperature, and not get reset by the overshoot. If you're slewing 5-10C/second, I'd think you'd want the PID to kick in at least 10s before it gets to setpoint, so maybe #define PID_FUNCTIONAL_RANGE 50 or 100.

Also, in looking at the code around [github.com] instead of getting into manual tuning you could use some related, more conservative parameters by adjusting the M303-derived parameters. See [reprap.org]

For Ziegler-Nichols "some overshoot" tuning: Kp=Kp_classic*.33/.6 , Ki=Ki_classic, Kd=Kd_classic*8/3

For Ziegler-Nichols"no overshoot": Kp=Kp_classic/3 , Ki=Ki_classic*, Kd=Kd_classic*8/3

But in any case, you need to have PID_FUNCTIONAL_RANGE set to at least 255/Kp to have it transition smoothly from full power to the PID.

Edited 3 time(s). Last edit at 03/23/2014 11:08PM by DaveX.
Re: PID tuned, but still slow...
March 24, 2014 12:06AM
maybe a change in of thermistor is in order
Sorry, only registered users may post in this forum.

Click here to login