More Efficient Batch Linearization Varying Parameters
This example shows how to speed up the batch linearization of a model when a set of
model parameters are varied.
The decrease the linearization time, you pass the varying parameter values to the
linearize function. linearize avoids recompiling the model when the varied
parameters are tunable parameters. The best improvements in the overall linearization
time are for models with large model update times. To run this example, you need
Aerospace Blockset™ software.
Plant Model
In this example, you linearize a lightweight airplane model. For more information on this
model, see “Lightweight Airplane Design” (Aerospace Blockset).
Open the model.
mdl = 'scdskyhogg';
open_system(mdl)
io = getlinio(mdl);
op = operpoint(mdl);
Linearize Model By Calling linearize Multiple Times
For this example, you vary the gains of the altitude and pitch controllers by +/- 10%.
Initialize the gains of the controllers to vary with MATLAB® workspace variables k1 and
k2.
open_system('scdskyhogg/Vehicle System Model/Avionics/Autopilot')
blks = {'scdskyhogg/Vehicle System Model/Avionics/Autopilot/Alt Controller';...
3 Batch Linearization