- "Tracking" requirement to specify a response time of about 0.2 seconds to step
changes in r - "MaxLoopGain" requirement to force a roll-off of -20 dB/decade past the crossover
frequency 10 rad/s - "MinLoopGain" requirement to adjust the integral gain at frequencies below 0.1 rad/s.
s = tf('s');
wc = 10; % target crossover frequency
% Tracking
R1 = TuningGoal.Tracking('r','y',2/wc);
% Bandwidth and roll-off
R2 = TuningGoal.MaxLoopGain('u',wc/s);
% Disturbance rejection
R3 = TuningGoal.MinLoopGain('u',wc/s);
R3.Focus = [0 0.1];
Tuning of 1-DOF PID Controller
Use systune to tune the PID gains to meet these requirements. Treat the bandwidth and
disturbance rejection goals as hard constraints and optimize tracking subject to these
constraints.
T1 = systune(T0,R1,[R2 R3]);
Final: Soft = 1.12, Hard = 0.99987, Iterations = 149
Verify that all three requirements are nearly met. The blue curves are the achieved values
and the yellow patches highlight regions where the requirements are violated.
figure('Position',[100,100,560,580])
viewGoal([R1 R2 R3],T1)
PID Tuning for Setpoint Tracking vs. Disturbance Rejection