Main Content

Tune Control System at the Command Line

After specifying your tuning goals using TuningGoal objects (see Tuning Goals), use systune to tune the parameters of your model.

The systune command lets you designate one or more design goals as hard goals. This designation gives you a way to differentiate must-have goals from nice-to-have tuning goals.systune attempts to satisfy hard requirements by driving their associated cost functions below 1. Subject to that constraint, the software comes as close as possible to satisfying remaining (soft) requirements. For best results, make sure you can obtain a reasonable design with all goals treated as soft goals before attempting to enforce any goal as a hard constraint.

Organize your TuningGoal objects into a vector of soft requirements and a vector of hard requirements. For example, suppose you have created a tracking requirement, a rejection requirement, and stability margin requirements at the plant inputs and outputs. The following commands tune the control system represented by T0, treating the stability margins as hard goals, the tracking and rejection requirements as soft goals. (T0 is either a genss model or an slTuner interface previously configured for tuning.)

SoftReqs = [Rtrack,Rreject];
HardReqs = [RmargIn,RmargOut];
[T,fSoft,gHard] = systune(T0,SoftReqs,HardReqs);

systune converts each tuning requirement into a normalized scalar value, f for the soft constraints and g for the hard constraints. The command adjusts the tunable parameters of T0 to minimize the f values, subject to the constraint that each g < 1. systune returns the vectors fSoft and gHard that contain the final normalized values for each tuning goal in SoftReqs and HardReqs.

Use systuneOptions to configure additional options for the systune algorithm, such as the number of independent optimization runs, convergence tolerance, and output display options.

See Also

| |

Related Topics