Create and configure an slTuner interface to the model.
st0 = slTuner(mdl,'MIMO Controller');
st0 is an slTuner interface to the rct_aircraft2 model with the MIMO Controller
block specified as the tunable portion of the control system.
The model already has linearization input points on the signals az ref, delta fin, az,
q, and e. These signals are therefore available as analysis points for tuning goals and
linearization.
Specify the tracking requirement, roll-off requirement, stability margins, and disturbance
rejection requirement.
req1 = TuningGoal.Tracking('az ref','az',1);
req2 = TuningGoal.Gain('delta fin','delta fin',tf(25,[1 0]));
req3 = TuningGoal.Margins('delta fin',7,45);
max_gain = frd([2 200 200],[0.02 2 200]);
req4 = TuningGoal.Gain('delta fin','az',max_gain);
req1 constrains az to track az ref. The next requirement, req2, imposes a roll-off
requirement by specifying a gain profile for the open-loop, point-to-point transfer function
measured at delta fin. The next requirement, req3, imposes open-loop gain and phase
margins on that same point-to-point transfer function. Finally, req4 rejects disturbances
to az injected at delta fin, by specifying a maximum gain profile between those two
points.
Tune the model using these tuning goals.
opt = systuneOptions('RandomStart',3);
rng(0);
[st,fSoft,~,info] = systune(st0,[req1,req2,req3,req4],opt);
Final: Soft = 1.14, Hard = -Inf, Iterations = 46
Final: Soft = 1.13, Hard = -Inf, Iterations = 76
Final: Soft = 1.13, Hard = -Inf, Iterations = 73
Final: Soft = 40, Hard = -Inf, Iterations = 84
st is a tuned version of st0.
The RandomStart option specifies that systune must perform three independent
optimization runs that use different (random) initial values of the tunable parameters.
These three runs are in addition to the default optimization run that uses the current
15 Alphabetical List