| Contents | Index |
oldio = setlinio('sys',io)
oldio = setlinio('blockpath',io)
As an alternative to the setlinio function, edit linearization I/Os using the:
Analysis I/Os tab of the Linearization Task node in the Control and Estimation Tools Manager GUI for Simulink models.
Linearization inputs/outputs table and Click a signal in the model to select it in the Linearizations tab of the Block Parameters dialog box for Linear Analysis Plots or Model Verification blocks.
oldio = setlinio('sys',io) assigns the settings in the vector of linearization input/output (I/O) objects, io, to the Simulink model, sys. These settings appear as annotations on the signal lines. Use the function getlinio or linio to create the linearization I/O objects. You can save I/O objects to disk in a MAT-file and use them later to restore linearization settings in a model.
oldio = setlinio('blockpath',io) assigns the settings in io as the linearization I/Os in a Linear Analysis Plots or Model Verification block. blockpath is the full path to the block.
This example shows how to assign linearization input/output settings to a Simulink model.
Before assigning I/O settings to a Simulink model using setlinio, you must create a vector of I/O objects representing linearization annotations, such as input points or output points, on a Simulink model.
Open a Simulink model.
magball
Right-click the signal line between the Magnetic Ball Plant and the Controller. Select Linearization Points > Input Point from the menu to place an output point on this signal line. Notice a small arrow pointing away from a small circle just above the signal line. This arrow represents the output point.
Right-click the signal line after the Magnetic Ball Plant. Select Linearization Points > Output Point from the menu to place another output point on this signal line.
The model diagram should now look similar to that in the following figure:

Create an I/O object with the getlinio function:
io=getlinio('magball')
Modify io by editing the object or by using the set function.
io(1).Type='in'; io(2).OpenLoop='on';
Assign the new settings in io to the model.
oldio=setlinio('magball',io)
This assignment returns the old I/O settings (that have been replaced by the settings in io).
2x1 vector of Linearization IOs: -------------------------- 1. Linearization input located at the following signal: - Block: magball/Controller - Port: 1 2. Linearization output located at the following signal: - Block: magball/Magnetic Ball Plant - Port: 1
The model diagram now looks similar to the following figure.

Update linearization input/output settings in a Linear Analysis Plots block
This example shows how to update linearization input/output settings in a Linear Analysis Plots block.
Open the watertank model, and specify input and output (I/O).
Right-click the Desired Water Level output signal, and select Linearization Points > Input Point.
Right-click the Water-Tank System output signal, and select Linearization Points > Output Point.
The linearization I/O markers appear in the model, as shown in the next figure.

Alternatively, you can use linio.
Drag and drop a Bode Plot block from the Simulink Control Design Linear Analysis Plots library into the model window.
Find all I/Os used by the Bode Plot block.
io = getlinio('watertank/Bode Plot')When you drag and drop the block, the block I/Os are set to the model I/Os. The following results appear at the MATLAB prompt:
2x1 vector of Linearization IOs: -------------------------- 1. Linearization input located at the following signal: - Block: watertank/Desired Water Level - Port: 1 2. Linearization output located at the following signal: - Block: watertank/Water-Tank System - Port: 1
Open the loop specified by the block I/Os.
io(2).OpenLoop = 'on';
Update the I/O in the Bode Plot block.
oldio = setlinio('watertank/Bode Plot',io)
Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |