%Cvejn, J.: The magnitude optimum design of the PI controller for plants 
%with complex roots and dead time. Archives of Control Sciences, vol. 32, 
%no. 1, pp. 5-35, 2022; plant examples: number 5 till 8, controllers: PID

p5den=     conv([ 0.4^2     2*0.5*0.4        1 ],[ 0.3   1 ]);   p5dt=0;
p6den=          [ 0.7071^2  2*0.7071*0.7071  1 ];                p6dt=4;
p7den=          [ 1         2*0.5*1          1 ];                p7dt=0.2;
p8den=conv(conv([ 1.4142^2  2*0.3536*1.4142  1 ],...
                [ 1.4142^2  2*0.3536*1.4142  1 ]),[ 1.7   1 ]);  p8dt=0;
            
% controller parameter sequence: VR_TN_TR0_TV
R5ugen=bo_u_gen(13,1,1,p5den),
R6ugen=bo_u_gen(13,1,1,p6den,p6dt,39),
R7ugen=bo_u_gen(13,1,1,p7den,p7dt,39),
R8ugen=bo_u_gen(13,1,1,p8den),

R5dgen=bo_d_gen(13,1,1,p5den),
R6dgen=bo_d_gen(13,1,1,p6den,p6dt,39),
R7dgen=bo_d_gen(13,1,1,p7den,p7dt,39),
R8dgen=bo_d_gen(13,1,1,p8den),

cv_PID_5till8_sim; sim('cv_PID_5till8_sim',70)
