Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

getlinio

Linearization input/output (I/O) settings for Simulink model, Linear Analysis Plots or Model Verification block

Syntax

io = getlinio('sys')
io = getlinio('blockpath')

Alternatives

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 Model I/Os.

  • Linearization inputs/outputs table in the Linearizations tab of the Block Parameters dialog box for Linear Analysis Plots or Model Verification blocks.

Description

io = getlinio('sys') finds all linearization inputs/outputs (I/Os) in the Simulink model, 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 getlinio, use the right-click menu to insert the linearization annotations, or I/Os, on the signal lines of the model diagram.

io = getlinio('blockpath') finds all I/Os in a Linear Analysis Plots block or a Model Verification block. blockpath is the full path to the block. io is a vector of objects and has an entry for each linearization port used by the block.

Each object within the vector, io, has the following properties:

Active

Set this value to 'on', when the I/O is used for linearization, and 'off' otherwise

Block

Name of the block with which the I/O is associated

PortNumber

Integer referring to the output port with which the I/O is associated

Type

Choose one of the following linearization I/O types:

  • 'openinput' — Open-loop input. Specifies a linearization input point after a loop opening.

    Typically, you use this input type with an open-loop linearization output to linearize a plant or controller.

    For example, to compute the plant transfer function, G, in the following feedback loop, specify the linearization points as shown:

    Similarly, you can compute the controller transfer function, K, by specifying openinput at the input signal and open-loop linearization output at the output signal of the Controller block.

  • 'openoutput' — Open-loop output. Specifies a linearization output point before a loop opening.

    Typically, you use this output type with an open-loop linearization input openinput or input perturbation input to linearize a plant or controller, as shown in the preceding figure.

  • 'looptransfer' — Loop transfer. Specifies an output point before a loop opening followed by an input.

    Use this input/output type to compute the open-loop transfer function around the loop.

    For example, to compute -GK in the following feedback loop, specify the linearization input/output point as shown:

    Similarly, compute -KG by specifying looptransfer at the output signal of the Controller block.

  • 'input' — Input perturbation. Specifies an additive input to a signal.

    For example, to compute the response -K/(1+KG) of the following feedback loop, specify an input perturbation and an output measurement point as shown:

    Similarly, you can compute G/(1+GK) using input at the output signal of the Controller block and an output measurement output at the output signal of the Plant block.

  • 'output' — Output measurement. Takes measurement at a signal.

    For example, to compute the response -K/(1+KG), specify an output measurement point and an input perturbation as shown in the preceding figure.

  • 'loopbreak' — Loop break. Specifies a loop opening.

    Use to compute open-loop transfer function around a loop. Typically, you use this input/output type when you have nested loops or want to ignore the effect of some loops.

    For example, to compute the inner loop seen by K1 and exclude the outer loop, specify the input/output points and loopbreak as shown:

  • 'sensitivity' — Sensitivity. Specifies an additive input followed by an output measurement.

    Use to compute sensitivity transfer function for an additive disturbance at the signal.

    For example, compute the input/load sensitivity, 1/(1+KG), in the following feedback loop, specify the linearization input/output point as shown:

    Similarly, compute output sensitivity at the plant output, 1/(1+GK), by specifying a sensitivity input/output point at the output signal of the Plant block.

  • 'compsensitivity' — Complementary sensitivity. Specifies an output followed by an additive input.

    Use to compute closed-loop transfer function around the loop.

    For example, to compute -GK/(1+GK) (the transfer function from r to y) in the following feedback loop, specify the linearization input/output point at the output signal of the Plant block as shown:

BusElement

Bus element name with which the I/O is associated. Empty string ('') if the I/O is not a bus element.

Description

String 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 set function. To upload an edited I/O object to the Simulink model diagram, use the setlinio function. Use I/O objects with the function linearize to create linear models.

Examples

Find linearization inputs/outputs in a Simulink model.

Before creating a vector of I/O objects using getlinio, you must add linearization annotations representing the I/Os, such as input points or output points, to a Simulink model.

  1. Open a Simulink model.

    magball
    
  2. 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.

  3. 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.

  4. 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 displays:

    • 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 get function.

 

This example shows how to find linearization inputs/outputs in a Linear Analysis Plots block to update the I/Os.

  1. Open the watertank model, and specify input and output (I/O).

    1. Right-click the Desired Water Level output signal, and select Linear Analysis Points > Input Perturbation.

    2. 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 linio.

  2. 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.

  3. 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

See Also

| | | |

Was this topic helpful?