% plant example according to K.G. Papadopoulos, PID Controller Tuning 
% Using the Magnitude Optimum Criterion, Springer, 2015, p. 103/105
% here: ideal PID structure, no consideration of non-ideal D-terms

Vs3=1; nump3=conv([-2  1],[-1.8  1]);
denop3 =conv([1 0],conv([1 1],conv([1 1],conv([1 1],conv([1 1],[1 1])))));

A2A=1; i=0; while (A2A(1)>1.0e-08)
[Rdt2e3_PI,A2A,FlagA] =bo_d_gen(12,Vs3,nump3,denop3); i=i+1; % VR,TN,TR0
          end
Rdt2e3_PI, A2A, FlagA, iA=i,

A2B=1; i=0; while (A2B(1)>1.0e-12)
[Rdt2e3_PID,A2B,FlagB]=bo_d_gen(13,Vs3,nump3,denop3) ;i=i+1; % VR,TN,TR0,TV
          end
Rdt2e3_PID, A2B, FlagB, iB=i,

disp('"Pp_t2ex3_sim.slx" will be called - compare parameters')
Pp_t2ex3_sim; sim('Pp_t2ex3_sim',300),
disp('Repeat bo_d_gen call at MATLAB promt, if search algorithm fails')
