3D Printing Calculators
PID Tuning (Ziegler–Nichols)
https://www.3dsizing.com/calculators/pid-tuning/
Estimate only — not firmware, a slicer profile or a shop quote. Confirm on a test print.
PID Tuning (Ziegler–Nichols)
When a heater sits at the edge of oscillation, Ku is that gain and Tu is the period in seconds. Classic Ziegler–Nichols turns those two numbers into Kp, Ki and Kd. Firmware choice here is documentation — the three gains are the same math.
Inputs
Results
- Kp
- 18.0000
- Ki
- 1.8000
- Kd
- 45.0000
Calculation method
Classic Ziegler–Nichols PID from the ultimate-sensitivity experiment: Kp = 0.6 × Ku, Ki = 2 × Kp / Tu, Kd = Kp × Tu / 8, with Tu in seconds. The firmware dropdown does not alter the numbers; Marlin and Klipper simply expect different G-code or config keys. Invalid if Ku or Tu is not positive. There is no unit conversion — these gains are dimensionless in the usual printer firmware convention.
Exact formula
Kp = 0.6 × Ku. Ki = 2 × Kp / Tu. Kd = Kp × Tu / 8. Marlin M301/M304 and Klipper pid_kp/pid_ki/pid_kd use these symbols with different command syntax. Limits: Classic Ziegler–Nichols is aggressive and can overshoot. Prefer firmware PID_CALIBRATE / M303; never leave a heater unattended hunting Ku.
Related calculations
- is the bed even strong enough — PID cannot invent watts
- motion calibration — different loop, same “measure then type” ritual
Where to paste the numbers
Marlin: M301 for hotend, M304 for bed, then M500. Klipper: pid_Kp, pid_Ki, pid_Kd under the heater section, then SAVE_CONFIG after a real PID_CALIBRATE if you can.
Frequently asked questions
How do I find Ku and Tu?
Raise Kp (others zero) until the temperature oscillates at constant amplitude. Ku is that Kp. Tu is the time between peaks. Then come here. Or skip this and run M303 / PID_CALIBRATE.
Marlin vs Klipper values differ on forums.
Firmware auto-tune uses different algorithms. This page is only classic ZN from Ku and Tu, identical for both.
Bed Tu is huge compared with the hotend.
A 300 mm bed is a slow plant. Tu of tens of seconds is normal. Do not paste hotend PID onto the bed.
My bed overshoots 10 °C.
ZN classic is snappy. Lower Kp a bit or use the firmware autotune, which often damps more.
More in this topic
All tools in this topicFDM calibration & firmware
Stepper Motor E-Steps Calibration Calculator
Calculate new extruder e-steps from old e-steps, commanded length and measured filament. Formula: new = old × requested / actual.
FDM calibration & firmware
Input Shaper Max Acceleration
Compute a conservative Klipper/Marlin max acceleration from measured resonance frequency, allowed ringing deviation and shaper type (ZV, MZV, EI, 2-hump EI).
FDM calibration & firmware
Klipper Rotation Distance Calculator
Convert a measured extrude test into Klipper rotation_distance, or derive rotation_distance from Marlin e-steps, full steps, microsteps and gear ratio.
FDM calibration & firmware
Z-Axis Optimal Layer Height
Snap a desired FDM layer height to the nearest full-step multiple of your Z lead screw and motor step angle to reduce microstep banding.
FDM calibration & firmware
Stepper Motor Vref Calculator
Calculate stepper driver Vref from target RMS current and sense resistor for A4988, DRV8825, TMC2208 and TMC2209. Also reports peak current.
FDM calibration & firmware
Thermal Shrinkage Scaling Calculator
Scale an STL to offset FDM cooling shrinkage for PLA, PETG, ABS, ASA, nylon, PC or a custom percent. Outputs scale factor and the new model size.
FDM calibration & firmware
Maximum Volumetric Flow Rate Calculator
Compute FDM volumetric flow Q = layer height × line width × speed, then the maximum print speed a hotend can hold at a stated mm³/s limit.
FDM calibration & firmware
Z-Axis Lead Screw Resolution Calculator
Calculate Z steps per millimetre and linear resolution from motor step angle, lead-screw pitch and microstepping. Helps diagnose Z banding.