%easy examples - Magnitude Optimum for delayed inputs
%case 1: PID controller / 2 first-order time-delay elements plus integrator

Vs=2; T1=1; T2=0.1; T3=1; Case1_bo_d_gen=[]; Case1_bo_d_speso=[];
for i=1:3 k=10^(i-1); 
         Reg = bo_d_gen(13,Vs,1,conv(conv([k*T1  1],[k*T2  1]),[k*T3  0]));
         % bo_d_gen: code 13 or 3 means PID controller
         %           code 13: switch off for display commands
         Case1_bo_d_gen(i,:)=...
                          [Reg(1,1:2),Reg(1,4),Reg(1,4)*Reg(1,2),Reg(1,2)];
          [Reg1,Reg2] = bo_d_speso(11,Vs,k*T1,k*T2,k*T3);
          % bo_d_speso: code 11 or 1 means case 1 regarding plant structure
          %             code 11: switch off for display commands
          Case1_bo_d_speso(i,:)=...
           [Reg1(1,1:2),Reg1(1,4),Reg2(1,1)*Reg2(1,2),Reg2(1,1)+Reg2(1,2)];
end
disp('Sequence of parameters VR, TN, TV, TFi2, TFi1:')
format long, 
Case1_bo_d_gen, Case1_bo_d_speso, 
format short,
disp('"bo_d_case1_01_sim.slx" will be called - compare parameters')
bo_d_case1_01_sim; sim('bo_d_case1_01_sim',800),
