Simulating PID Controllers Using MATLAB: Theory and Applications