open_system('rct_distillation')
tuned_blocks = {'PI_L','PI_V','DM'};
st0 = slTuner('rct_distillation',tuned_blocks);
addPoint(st0,{'L','V','y','r','dL','dV'});
This system is now ready for tuning with looptune, using tuning goals that you specify.
For example, specify a target bandwidth range. Create a tuning requirement that imposes
reference tracking in both channels of the system, and a disturbance rejection
requirement.
wc = [0.1,0.5];
req1 = TuningGoal.Tracking('r','y',15,0.001,1);
max_disturbance_gain = frd([0.05 5 5],[0.001 0.1 10],'TimeUnit','min');
req2 = TuningGoal.Gain({'dL','dV'},'y',max_disturbance_gain);
controls = {'L','V'};
measurement = 'y';
[st,gam,info] = looptune(st0,controls,measurement,wc,req1,req2);
Final: Peak gain = 1.03, Iterations = 81
looptune successfully tunes the system to these requirements. However, you might want
to switch to systune to take advantage of additional flexibility in configuring your
problem. For example, instead of tuning both channels to a loop bandwidth inside wc, you
looptuneSetup