Simulink Control Design™ - MathWorks

(Tuis.) #1

After creating the tuning goals, the script sets any algorithm options you had set in
Control System Tuner. The script also designates tuning goals as soft or hard goals,
according to the configuration of tuning goals in Control System Tuner. (See “Manage
Tuning Goals” on page 10-177.)


%% Create option set for systune command
Options = systuneOptions();


%% Set soft and hard goals
SoftGoals = [ TR ; ...
MG1 ; ...
MG2 ];
HardGoals = [];


In this example, all the goals are designated as soft goals when the script is generated.
Therefore, HardGoals is empty.


Finally, the script tunes the control system by calling systune on the slTuner interface
using the tuning goals and options.


%% Tune the parameters with soft and hard goals
[CL1,fSoft,gHard,Info] = systune(CL0,SoftGoals,HardGoals,Options);


The script also includes an optional call to viewGoal, which displays graphical
representations of the tuning goals to aid you in interpreting and validating the tuning
results. Uncomment this line of code to generate the plots.


%% View tuning results
% viewGoal([SoftGoals;HardGoals],CL1);


You can add calls to functions such getIOTransfer to make the script generate
additional analysis plots.


See Also


Related Examples



  • “Create and Configure slTuner Interface to Simulink Model” on page 10-210

  • “Tune Control System at the Command Line” on page 10-221

  • “Validate Tuned Control System” on page 10-225


See Also
Free download pdf