An enhanced automatic tuning procedure developed for process control of PI and PID controllers addresses several potential problems present in current standard autotuners. The proposed enhanced autotuner uses a novel technique based on relay feedback to estimate the process frequency response at two specified phase lags on the Nyquist curve automatically. An iterative procedure then uses these two points to obtain a transfer-function model of the process. Based on this model and a controller-selection scheme, an appropriate controller (PI or PID) is applied to the process automatically. The controller is tuned so that the Nyquist curve of the compensated system is appropriately shaped to satisfy a combined gain and phase-margin type of specification. The effectiveness of this enhanced autotuner is demonstrated both in simulations and in real-time experiments for level control of a coupled-tanks system.