To validate the hinfstruct control design, analyze the tuned output models described in Interpret the Outputs of hinfstruct. Use these tuned models to examine the performance of the tuned system.
This example shows how to obtain the closed-loop step response of a system tuned with hinfstruct in MATLAB®.
You can use the tuned versions of the tunable components of your system to build closed-loop or open-loop numeric LTI models of the tuned control system. You can then analyze open-loop or closed-loop performance using other Control System Toolbox™ tools.
In this example, create and analyze a closed-loop model of the HDA system tuned in Tune the Controller Parameters. To do so, extract the tuned controller values from the tuned closed-loop model. Use getBlockValue to get the tuned value of a tunable Control Design Block. Use getValue to evaluate a genss model using parameter values from another genss model.
Ctuned = getBlockValue(T,'C'); Ftuned = getValue(F,T);
Then construct the tuned closed-loop response of the control system from r to y.
Try = connect(G,Ctuned,Ftuned,Sum1,Sum2,'r','y'); step(Try)
This example shows how to write tuned values to your Simulink® model for validation.
The slTunable interface linearizes your Simulink model. As a best practice, validate the tuned parameters in your nonlinear model. You can use the slTunable interface to do so.
In this example, write tuned parameters to the rct_diskdrive system tuned in Tune the Controller Parameters.
Make a copy of the slTunable description of the control system, to preserve the original parameter values. Then propagate the tuned parameter values to the copy.
ST = copy(ST0); setBlockValue(ST,T);
This command writes the parameter values from the tuned, weighted closed-loop model T to the corresponding parameters in the interface ST.
You can examine the closed-loop responses of the linearized version of the control system represented by ST. For example:
Try = getIOTransfer(ST,'r','y');
Since hinfstruct tunes a linearized version of your system, you should also validate the tuned controller in the full nonlinear Simulink model. To do so, write the parameter values from the slTunable interface to the Simulink model.
You can now simulate the model using the tuned parameter values to validate the controller design.