% Define the time delay and Laplace variable tau = 0.05; s = tf('s'); % Define the transfer function G = exp(-tau*s)/(s^2); % Set up the PID controller with automatic tuning C = pidtune(G,'PID'); % Define the setpoint value setpoint = 3; % Plot the closed-loop response with setpoint T_total = feedback(G*C,1); step(setpoint*T_total);