Field Description
Inputs Input signals to the block for which you are defining a linearization,
specified as a structure array with one structure for each block input.
Each structure in Inputs has the following fields:
Field Description
BlockName Full block path of the block whose output connects
to the corresponding block input.
PortIndex Output port of the block specified by BlockName
that connects to the corresponding block input.
Values Value of the signal specified by BlockName and
PortIndex. If this signal is a vector signal, then
Values is a vector with the same dimension.
ny Number of output channels of the block linearization.
nu Number of input channels of the block linearization.
BlockLinea
rization
Current default linearization of the block, specified as a state-space model.
You can specify a block linearization that depends on the default
linearization using BlockLinearization.
Your custom function must return a model with nu inputs and ny outputs. This model
must be one of the following:
- Linear model in the form of a D-matrix
- Control System Toolbox LTI model object
- Uncertain state-space model or uncertain real object (requires Robust Control Toolbox
software)
For example, the following function multiplies the current default block linearization, by a
delay of Td = 0.5 seconds. The delay is represented by a Thiran filter with sample time
Ts = 0.1. The delay and sample time are parameters stored in BlockData.
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.
slTuner