PID Controller Tuning

PID Controller Tuning

Calibrating a PID Controller can be tricky, so here are some tools to help folks get the job done.

Extruder Heater PID Settings

In the v2.x firmware release, Adam rewrote and made the heater's control system proportional, integral and derivative (PID) parameters changeable from ReplicatorG. If your Plastruder MK4 extruder's heater has difficulty reaching and/or maintaining a target 220C temperature, check and set them to the following new set of Adam default values:

  1. Launch ReplicatorG
  2. Select menu item Machine - Onboard Preferences - Set Extruder Parameters
  3. Set Proportional to 7.0
  4. Set Integral to 0.35
  5. Set Differential to 36.0

Relay-Driven Gen3 Electronics Driven Plastruder MK5 PID Settings

Note: These settings were gathered for Cupcakes with relay-driven MK5 extruders and Gen3 firmware support. See the next section for Thing-O-Matic/Gen4 recommended settings.

From the "MK5 PID tuning?" discussion, the following PID settings may be a better starting point:

  1. Set Proportional to 5.143
  2. Set Integral to 0.0612
  3. Set Differential to 108.0

I'm using these settings with my MK5: (Bre)

  1. Set Proportional to 5.1367*
  2. Set **Integral to 0.055
  3. Set Differential to 108.0

I'm using these settings with my MK5: (Isaac)

  1. Set Proportional to 5.00*
  2. Set **Integral to 0.0078125
  3. Set Differential to 35.00

Gen4 Electronics Driven Plastruder MK5 PID Settings

The recommended defaults for a Thing-O-Matic or similar machine using a Mk5 extruder driven directly by Gen4 electronics are listed below:

  1. Set Proportional to 6.25
  2. Set Integral to 0.4140625
  3. Set Differential to 100.0

The Ziegler-Nichols Tuning Method

Pulled from Wikipedia's PID Controller Page, where T is the Time Constant and L is the Delay Time:

  • Proportional Term: KP = 1.2*T/L
  • Integral Term: KI = 0.6*T/L^2
  • Derivative Term: KD = 0.6*T

Wolfram Alpha Widgets

For a Plastruder MK4, the seed values of T=60 and L=10.286 produce approximately KP=7.0, KI=0.34, KD=36.

For a Plastruder MK5, the seed values of T=180 and L=42 produce KP=5.143, KI=0.0612, KD=108

jmil says:
For a Plastruder MK5 for PLA printing, the seed values of T=34 and L=8 produce KP=5.1, KI=0.31875, KD=20.4

From the Manual Tuning page, decreasing both KP and KI should improve system stability. From the above Ziegler-Nichols Tuning equations, decreasing the Time Constant and increasing the Delay Time will have this effect on the PID values.

Depending on your tuning goals (improved performance versus improved stability), use the following Wolfram-Alpha Widgets to determine appropriate sets of starting points for modifying your PID values.

KP - Proportional Term

KP Notes

  • Pick Time Constant and Delay Time values to keep KP in the 5.0 to 7.0 range.
  • Decreases in KP should improve stability.

KI - Integral Term

KI Notes

  • Changes to the Delay Time will have the greatest effect on the KI factor.
  • Decreases in KI should improve stability.
  • Increases in KI should significantly decrease steady-state error.

KD - Differential Term

KD Notes

  • Only changes in Time Constant influence the KD term.
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.