Linearize Simulink model with Uncertain State Space block
linearizes the Simulink® model
ulin = ulinearize(
mdl, at the operating point specified in the model,
using the analysis points specified by
io. If you omit
ulinearize uses the root-level input
and output ports in
mdl. The function returns a
ulin that represents the uncertain model response at those
ulin contains all the uncertain elements referenced by
Uncertain State Space blocks in the linearization path.
Uncertain Linearization of Model
Compute an uncertain linearization of a Simulink® model containing Uncertain State Space blocks. The
model rct_ulinearize_uss has three such blocks, each of which references an uncertain
uss model in its Uncertain system variable parameter:
Unmodeled Plant Dynamics — references
Uncertain Plant — references
Uncertain Sensor — references
Create these uncertain
wt = makeweight(0.25,130,2.5); input_unc = ultidyn("input_unc",[1 1]); unc_pole = ureal("unc_pole",-5,"Range",[-10 -4]); plant = ss(unc_pole,5,1,0); sensor_pole = ureal("sensor_pole",-20,"Range",[-30 -10]); sensor = tf(1,[1/(-sensor_pole) 1]);
Open the model.
mdl = "rct_ulinearize_uss"; open_system(mdl)
The model also contains predefined linearization analysis points, an additive input point at the signal
r and an output point at the signal
y. Extract these points from the model in a linearization I/O object.
io = getlinio(mdl);
Compute the uncertain linearization of the model. If you do not specify a linearization operating point,
ulinearize uses the current operating point of the model.
ulin = ulinearize(mdl,io);
ulin is a
uss model object representing the uncertain response of the model from
uss model contains all the uncertain variables referenced in the three Uncertain State Space blocks.
Uncertain continuous-time state-space model with 1 outputs, 1 inputs, 5 states. The model uncertainty consists of the following blocks: input_unc: Uncertain 1x1 LTI, peak gain = 1, 1 occurrences sensor_pole: Uncertain real, nominal = -20, range = [-30,-10], 1 occurrences unc_pole: Uncertain real, nominal = -5, range = [-10,-4], 1 occurrences Type "ulin.NominalValue" to see the nominal value and "ulin.Uncertainty" to interact with the uncertain elements.
mdl — Simulink model name
character vector | string
Simulink model name, specified as a character vector or string. The model must be in the current working folder or on the MATLAB® path.
io — Analysis points
linearization I/O object | vector of linearization I/O objects
Analysis points for linearizing the model, specified as a linearization I/O object
or a vector of linearization I/O objects that represent inputs, outputs, and loop
openings for linearization: To create
If you omit
linearize uses the
root-level inports and outports of the model as analysis points.
For more information on specifying linearization inputs, outputs, and openings, see Specify Portion of Model to Linearize (Simulink Control Design).
op — Operating point
OperatingPoint object | array of
OperatingPoint objects | vector of positive scalars
Operating point for linearization, specified as one of the following:
OperatingPointobject, created using:
OperatingPointobjects, specifying multiple operating points. To create an array of
OperatingPointobjects, you can:
Extract operating points at multiple snapshot times using
Batch trim your model using multiple operating point specifications. For more information, see Batch Compute Steady-State Operating Points for Multiple Specifications (Simulink Control Design).
Batch trim your model using parameter variations. For more information, see Batch Compute Steady-State Operating Points for Parameter Variation (Simulink Control Design).
Vector of positive scalars representing one or more simulation snapshot times. The software simulates
sysand linearizes the model at the specified snapshot times.
blockname — Path to block
string | character vector
Path to block to linearize, specified as a string or character vector.
stateorder — State order in linearization results
cell array of character vectors
State order in linearization results, specified as a cell array of block paths or
state names. The order of the block paths and states in
determines the order of the states in
usys. Specify the state order
as a cell array who cells contain the names of the blocks containing states in the
model. For all blocks, you can enter block names as the full block path. For continuous
blocks, you can alternatively enter block names as the user-defined unique state
You can specify block paths for any blocks in
mdl that have
states, or any named states in
mdl. You do not have to specify
every block and state from
The states you specify appear first in
usys, followed by the
remaining states in their default order.
ulin — Uncertain linearization result
uss model | array of
Uncertain linearization result, returned as a
uss model or an array
uss models (if you specify an array of operating points).
ulin represents the uncertain model response at the specified
operating point and analysis points.
ulin contains all the
uncertain elements referenced by Uncertain State Space blocks in the
Introduced in R2009b