% easy examples - Magnitude Optimum for delayed inputs
%case 4: : PID controller plus PT1 / oscillating element and integrator 

Vs=2; Tau=1; D=0.5; T3=0.1; T4=Tau; Case4_bo_d_gen=[];
for i=1:3 k=10^(i-1);
   Reg=bo_d_gen(13,Vs,1,conv(conv([Tau^2  2*D*Tau  1],[k*T3  0]),[T4  1]));
         % bo_d_gen: code 13 or 3 means PID controller
         %           code 13: switch off for display commands
    Case4_bo_d_gen(i,:)=[Reg(1,1:2),Reg(1,4),Reg(1,4)*Reg(1,2),Reg(1,2)];
end

disp('Sequence of parameters VR, TN, TV, TFi2, TFi1:')
format long, Case4_bo_d_gen, format short,
disp('"bo_d_case4_01_sim.slx" will be called - compare parameters')
bo_d_case4_01_sim; sim('bo_d_case4_01_sim',100),
disp('Repeat bo_d_gen call at MATLAB promt, if search algorithm fails')
