function [ans1,ans2,ans3]=auto_tune_PID(val1,val2,val3)
try
    ans1=((1.2/val3)*(val1/val2)/0.2);
    TI=2*val2;
    KI=1/TI;
    KI_max=1/28;
    ans2=(KI/KI_max);
    TD=0.5*val2;
    KD=TD;
    KD_max=23.5;
    ans3=(KD/KD_max);
catch
    error('K and T values wrong: Run the open-loop longer');
end

end