Skip to Main Content Skip to Search
Product Documentation

linio - Construct linearization input/output (I/O) settings for Simulink model

Syntax

io = linio('blockname',portnum)
io = linio('blockname',portnum,type)
io = linio('blockname',portnum,type,openloop)
io = linio('blockname',portnum,type,openloop,'buselementname')

Alternatives

As an alternative to the linio function, create linearization I/O settings by using the right-click menu on the model diagram.

Description

io = linio('blockname',portnum) creates a linearization input/output (I/O) object for the signal that originates from the outport with port number portnum of the block blockname in a Simulink model. The default I/O type is 'in', and the default OpenLoop property is 'off'. Use io with linearize to create linearized models.

io = linio('blockname',portnum,type) creates a linearization I/O object with specified type of linearization I/O type. Available linearization I/O types are:

io = linio('blockname',portnum,type,openloop) creates a linearization I/O object with specified loop-opening status openloop. The openloop property is 'off' when the I/O point is not an open-loop point and is set to 'on' when the I/O point is an open-loop point.

io = linio('blockname',portnum,type,openloop,'buselementname') creates a linearization I/O object for the element buselementname at the bus signal that originates from the portnum of blockname.

Examples

This example shows how to create linearization I/O settings for a Simulink model.

  1. Create an I/O setting for the signal originating from the Controller block of the magball model.

    io(1)=linio('magball/Controller',1)
    

    By default, this I/O is an input point.

    1x1 vector of Linearization IOs: 
    --------------------------
    1. Linearization input located at the following signal:
    - Block: magball/Controller
    - Port: 1
  2. Create a second I/O setting within the object, io.

    io(2)=linio('magball/Magnetic Ball Plant',1,'out','on')
    

    This I/O originates from the Magnetic Ball Plant block, is an output point and is also an open-loop point.

     1x2 vector of Linearization IOs: 
    --------------------------
    1. Linearization input located at the following signal:
    - Block: magball/Controller
    - Port: 1
    
    2. Linearization output with a loop opening located at the following signal:
    - Block: magball/Magnetic Ball Plant
    - Port: 1
 

Select Individual Bus Element as Linearization I/O point

This example shows how to create a linearization I/O setting for individual bus elements in a bus signal.

  1. Open Simulink model.

    sys = 'sldemo_mdlref_bus';
    open_system(sys);
    
  2. Specify to linearize the CounterA block using linearization I/O points on an individual bus element.

    io(1) = linio('sldemo_mdlref_bus/COUNTERBUSCreator',1,'in',...
    			'off','limits.upper_saturation_limit');
    io(2) = linio('sldemo_mdlref_bus/CounterA',1,'out','off',...
    			'limits.upper_saturation_limit');
    
  3. Update the model to reflect the linearization I/O object.

    setlinio(sys,io)
    set_param(sys,'ShowLinearizationAnnotations','on')

    The linearization I/O markers appear in the model. Use these markers to visualize your linearization points.

  4. Linearize the model at the model operating point.

    sys = linearize(mdl,io);

See Also

getlinio | linearize | setlinio

Tutorials

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS