This MATLAB function designs a PID controller of type type for the plant sys in the unit feedback loop.
www.mathworks.com