Linearization input/output (I/O) settings for Simulink model, Linear Analysis Plots block, or Model Verification block
io = getlinio(sys)
io = getlinio(blockpath)
As an alternative to
getlinio, view linearization
I/Os annotated in the Simulink® model in the:
Exact Linearization tab of the
Linear Analysis Tool. In the Setup section, click
to view and edit the
linearization I/Os. The icon appears only when Analysis
I/Os is set to
Linearization inputs/outputs table in the Linearizations tab of the Block Parameters dialog box for Linear Analysis Plots or Model Verification blocks.
finds all linearization inputs/outputs (I/Os) in the Simulink model,
io = getlinio(sys)
and returns a vector of objects,
io. Each object
represents a linearization annotation in the model and is associated
with an output port of a Simulink block. Before running
use the right-click menu to insert the linearization annotations,
or I/Os, on the signal lines of the model diagram.
finds all I/Os in a Linear Analysis Plots block or a Model Verification
io = getlinio(blockpath)
blockpath is the full path to the block.
a vector of objects and has an entry for each linearization port
used by the block.
Each object within the vector,
io, has the
Set this value to
Name of the block with which the I/O is associated
Integer referring to the output port with which the I/O is associated
Choose one of the following linearization I/O types:
|Bus element name with
which the I/O is associated. |
Description of the I/O object
You can edit this I/O object to change its properties. Alternatively,
you can change the properties of
io using the
To upload an edited I/O object to the Simulink model diagram,
setlinio function. Use I/O objects with
linearize to create linear models.
Find linearization inputs/outputs in a Simulink model.
Before creating a vector of I/O objects using
you must add linearization annotations representing the I/Os, such
as input points or output points, to a Simulink model.
Open a Simulink model.
Right-click the signal line between the Magnetic Ball Plant and the Controller. Select Linear Analysis Points > Input Perturbation from the menu to place an input point on this signal line.
A small arrow pointing toward a small circle just above the signal line represents the input point. The input point is not the output of the block, rather it is an additive input to the signal.
Right-click the signal line after the Magnetic Ball Plant. Select Linear Analysis Points > Open-loop Output to place an output point on this signal line.
A small arrow pointing away from the signal line represents the output point.
Create a vector of I/O objects for this model.
io = getlinio('magball')
This syntax returns a formatted display of the linearization I/Os.
2x1 vector of Linearization IOs: -------------------------- 1. Linearization input perturbation located at the following signal: - Block: magball/Controller - Port: 1 2. Linearization open-loop output located at the following signal: - Block: magball/Magnetic Ball Plant - Port: 1
io is a vector with two entries representing
the two linearization annotations previously set in the model diagram. MATLAB® also
The linearization I/O type (input or output) and whether the IO is a loop opening
Block name associated with the I/O
Port number associated with the I/O
Display the properties of each I/O object using the
This example shows how to find linearization inputs/outputs in a Linear Analysis Plots block to update the I/Os.
watertank model, and specify
input and output (I/O).
Right-click the Desired Water Level output signal, and select Linear Analysis Points > Input Perturbation.
Right-click the Water-Tank System output signal, and select Linear Analysis Points > Open-loop Output.
The linearization I/O markers appear in the model, as shown in the next figure.
Alternatively, you can use
Drag and drop a Bode Plot block from the Simulink Control Design™ Linear Analysis Plots library into the Simulink Editor. When you drag and drop the block, the block I/Os are set to the model I/Os.
Find all I/Os used by the Bode Plot block.
io = getlinio('watertank/Bode Plot')
The following results appear at the MATLAB prompt:
2x1 vector of Linearization IOs: -------------------------- 1. Linearization input perturbation located at the following signal: - Block: watertank/Desired Water Level - Port: 1 2. Linearization open-loop output located at the following signal: - Block: watertank/Water-Tank System - Port: 1