Figure 3: 2-DOF PID Control Loop.
Use the tunablePID2 object to parameterize the 2-DOF PID controller and construct a
tunable model T0 of the closed-loop system in Figure 3.
C = tunablePID2('C','pid');
C.Tf.Value = 0.01; C.Tf.Free = false; % fix Tf=0.01
T0 = feedback(GLSC,1,2,1,+1);
T0 = T0(:,1);
T0.u = 'r'; T0.y = 'y';
Next tune the 2-DOF PI controller for the largest loop gain tried earlier ( ).
% Minimum loop gain inside bandwidth (for disturbance rejection)
alpha = 4;
R3.MinGain = alpha*wc/s;
% Tune 2-DOF PI controller
T4 = systune(T0,R1,[R2 R3]);
Final: Soft = 1.09, Hard = 0.82473, Iterations = 71
Compare the setpoint tracking and disturbance rejection properties of the 1-DOF and 2-
DOF designs for.
clf, step(T3,'b',T4,'g--',4)
title('Setpoint tracking')
legend('1-DOF','2-DOF')
PID Tuning for Setpoint Tracking vs. Disturbance Rejection