optimizeing controller for PID tuneing