Combine linearization results from specified blocks and model


lin = linlftfold(lin_fixed,blocksubs)


lin = linlftfold(lin_fixed,blocksubs) combines the following linearization results into one linear model lin:

  • Linear model lin_fixed, which does not include the contribution of specified blocks in your Simulink® model.

    Compute lin_fixed using linlft.

  • Block linearizations for the blocks excluded from lin_fixed

    You specify the block linearizations in a structure array blocksubs, which contains two fields:

    • 'Block' is a character vector specifying the block path of the Simulink block to replace.

    • 'Value' is the value of the linearization for each block.


Linearize the following parts of the scdtopmdl Simulink model separately and then combine the results:

  • Fixed portion, which contains everything except the Parameter Varying Controller model reference

  • Parameter Varying Controller model reference, which references the scdrefmdl model

% Open the Simulink model
topmdl = 'scdtopmdl';

% Linearize the model without the Parameter Varying Controller
io = getlinio(topmdl);
blocks = {'scdtopmdl/Parameter Varying Controller'};
sys_fixed = linlft(topmdl,io,blocks);

% Linearize the Parameter Varying Controller
refmdl = 'scdrefmdl';
sys_pv = linearize(refmdl);

% Combine the results
BlockSubs(1) = struct('Name',blocks{1},'Value',sys_pv);
sys_fold = linlftfold(sys_fixed,BlockSubs);

Introduced in R2009b

Was this topic helpful?