This example shows how to automatically tune a PID Controller block using PID Tuner.
www.mathworks.com