Automatic tuning control