PID Tuning

From RepRap
Revision as of 15:21, 10 May 2013 by Mitchese (talk | contribs) (Created page with 'PID tuning refers to a proportional-integral-derivative control algorithm used in some repraps for hot ends and heated beds. PID needs to have a P, I and D value defined to con…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PID tuning refers to a proportional-integral-derivative control algorithm used in some repraps for hot ends and heated beds.

PID needs to have a P, I and D value defined to control the nozzle temperature. If the temperature ramps up quickly and slows as it approaches the target temperature, or if it swings by a few degrees either side of the target temperature, then the values are incorrect.

To run PID in Marlin and other firmares, run

 M303 S175 C8

This will cycle through 8 times (C8) at the given temperature (S175) and return 3 values for P I and D.

These values can be entered with:

 M301 P1 I2 D3 

If the EEPROM is enabled, save with M500

For the bed, use:

 Bed: M303 E1 S60 C8 

and save bed settings with:

 M304 P1 I2 D3 

For manual adjustments:

  • if it overshoots a lot and oscillates, either the integral gain needs to be increased or all gains should be reduced
  • Too much overshoot? Increase D, decrease P.
  • Response too damped? Increase P.
  • Ramps up quickly to a value below target temperature (0-160 fast) and then slows down as it approaches target (160-170 slow, 170-180 really slow, etc) temperature? Try increasing the I constant.


A good article on PID tuning is here

See also Wikipedia