Validate a control system tuned with `systune`

to determine whether small violations of tuning requirements are acceptable.

When you tune a control system using tuning commands such as `systune`

, use `viewSpec`

to compare the tuned result against the tuning requirements. Doing so can help you determine whether the tuned system comes sufficiently close to meeting your soft requirements.

Open a Simulink® model that contains a control system you want to tune.

Create requirements for tuning the control system. For this example, use tracking, roll-off, stability margin, and disturbance rejection requirements.

Tune the model using these tuning requirements.

Final: Soft = 1.15, Hard = -Inf, Iterations = 57

`ST1`

is a tuned version of the `slTuner`

interface to the control system. `ST1`

contains the tuned values of the tunable parameters of the MIMO controller in the model.

Verify that the tuned system satisfies the margin requirement.

The yellow region denotes margins that do not satisfy the requirement. The red plot represents the actual stability margin of the tuned system, `ST1`

. The blue plot represents the margin used in the optimization calculation, which is an upper bound on the actual margin. For `ST1`

, the plot indicates that the margin requirement is satisfied at all frequencies.

Validate the tracking and disturbance rejection requirements in the frequency domain.

When you provide a vector of requirements, `viewSpec`

puts all the requirements into a single figure window.

The first plot shows that the tuned system very nearly meets the tracking requirement. The slight violation suggests that setpoint tracking will perform close to expectations.

The second plot shows that the disturbance rejection levels off in violation of the requirement at very low frequencies. A small bump near 35 rad/s suggests possible damped oscillations at this frequency.

Use `step`

and `getIOTransfer`

to examine setpoint tracking and disturbance rejection in the time domain.