A simple method for the autotuning of proportional-integral-derivative (PID) controllers which keeps the PID controllers in a closed loop is proposed. A limit cycle is generated through setpoint relay to extract relevant information about the process dynamics. Ziegler-Nichols tuning formulas based on the reaction curve method and the ultimate gain and ultimate period method are used to calculate the PID parameters. Extensive simulations have shown that the proposed method is accurate and needs not to switch off the existing controller. © 1998 American Chemical-Society.