function sys = myCustomFunction(BlockData)
Td = BlockData.Parameters(1).Value;
Ts = BlockData.Parameters(2).Value;
sys = BlockData.BlockLinearization*Thiran(Td,Ts);
end
Save this function to a location on the MATLAB path.
To use this function as a custom linearization for a block or subsystem, specify the
blocksub.Value.Specification and blocksub.Value.Type fields.
blocksub.Value.Specification = 'myCustomFunction';
blocksub.Value.Type = 'Function';
To set the delay and sample time parameter values, specify the
blocksub.Value.ParameterNames and blocksub.Value.ParameterValues fields.
blocksub.Value.ParameterNames = {'Td','Ts'};
blocksub.Value.ParameterValues = [0.5 0.1];
Algorithms
Model Properties for Linearization
By default, linearize automatically sets the following Simulink model properties:
- BufferReuse = 'off'
- RTWInlineParameters = 'on'
- BlockReductionOpt = 'off'
- SaveFormat = 'StructureWithTime'
After linearization, Simulink restores the original model properties.
Block-by-Block Linearization
Simulink Control Design software linearizes models using a block-by-block approach. The
software individually linearizes each block in your Simulink model and produces the
linearization of the overall system by combining the individual block linearizations.
linearize