Documentation Center

  • Trials
  • Product Updates

Contents

Specify Model Portion to Linearize

Specifying Subsystem, Loop, or Block to Linearize

Simulink® Control Design™ lets you specify the subsystem, loop, or block to linearize using linearization input and output points (linearization I/O points).

A linearization input point defines the additive input signal to the linear model. A linearization output point defines the output signal of the linear model.

You can linearize:

  • Closed- or open-loop responses using a linearization input point on the input signal to the portion of the model you want to linearize, and a linearization output point at the output signal of that portion of the model.

  • Specific subsystem or block.

    In this case, linearization I/O points are the input and output signals corresponding to the subsystem or block.

You can define other linear models using additional types of linear analysis points:

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

  • 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 to ignore the effect of some loops.

  • Sensitivity — Specifies an additive input followed by an output measurement. Use to compute sensitivity transfer function for an additive disturbance at the signal.

  • Complementary Sensitivity — Specifies an output followed by an additive input. Use to compute closed-loop transfer function around the loop.

Linearization I/O points are pure annotations and do not impact model simulation.

 More About

Opening Feedback Loops

If your model contains one or more feedback loops, you can choose to linearize an open-loop or a closed-loop system.

Simulink Control Design lets you remove the effects of the feedback loop by inserting an open loop point without having to manually break signal lines. In fact, for nonlinear models, do not open the loop by manually removing the feedback signal from the model; this action changes the model operating point and produces a different linear model.

    Note:   If a model is already linear, it has the same form regardless of the operating point.

Correct placement of the loop opening is critical to obtaining the right linear model. For example, you might want to linearize only the plant model in a feedback control loop.

To understand the difference between open-loop and closed-loop analysis, consider this single-loop control system.

Suppose you want to linearize the plant, P, about an equilibrium operating point of the model.

To linearize only the plant P, you must open the loop at the output of the P block. If you do not open the loop, and if C and P are linear, the linearized model between U and Y is .

The loop opening does not need to be in the same location as the linearization input or output point. For example, the next figure shows a loop opening after the gain on the outer feedback loop, which removes the effect of this loop from the linearization. To check whether you correctly excluded the feedback signal, linearize the model and highlight the blocks included in the linearization.

In this example, if you place a loop opening at the same location as the linearization output point, the effect of the inner loop from the linearization is also removed.

 More About

Ways to Specify Portion of Model to Linearize

There are several ways to specify linearization inputs, outputs, and loop-opening locations (linear analysis points, linearization I/O sets, or, simply, I/O sets) that define the portion of the model you want to linearize. Each method has its own advantages. You can:

  • Specify linearization I/O points and loop openings directly in the model. An advantage of this method is that the locations of linearization I/O points and loop openings are shown graphically in the model. When you specify linearization I/O sets this way and save the model, the I/O set persists in the model.

  • Interactively define linearization I/O sets using the Linear Analysis Tool. The Create linearization I/O set dialog box in the Linear Analysis Tool allows you to define multiple open-loop or closed-loop transfer functions for your model interactively. This approach does not make changes to the model.

  • Define linearization I/O sets at the command line using linio. This method allows you to define multiple open-loop or closed-loop transfer functions without changing the model.

  • Define analysis points and openings for an slLinearizer interface at the command line. This method allows you to obtain multiple open-loop or closed-loop transfer functions without changing the model.

Specify Portion of Model to Linearize in Simulink Model

To specify linearization I/O points and loop openings directly in your Simulink model:

  1. Right-click on the signal you want to define as a linearization input point or output point.

    This action opens a context menu on the signal.

  2. Hover the cursor over Linear Analysis Points in the context menu.

    A submenu appears listing types of linear analysis points.

  3. Select the type of linear analysis point you want to define at the signal.

    1. Right-click the block output signal corresponding to the linearization input point. For example, select Linear Analysis Points > Input Perturbation. This type of input point specifies an additive input to a signal.

      If you want to specify the signal as a open-loop input point, select Linear Analysis Points > Open-loop Input. This option specifies an input point after a loop opening. Opening the loop removes the effects of the feedback signal on the linearization without changing the model operating point. The loop opening marker appears in the model.

        Caution   Do not open the loop by manually removing the feedback signal from the model. Removing the signal manually changes the operating point of the model.

    2. Right-click the block output signal corresponding to the linearization output point. For example, select Linear Analysis Points > Output Measurement. This type of output point takes measurement at a signal.

      If you want to specify the signal as a open-loop output point, select Linear Analysis Points > Open-loop Output. This option specifies an output point before a loop opening.

    Depending on the response you want, you can select one of the following additional linear analysis points:

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

    • 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 to ignore the effect of some loops.

    • Sensitivity — Specifies an additive input followed by an output measurement. Use to compute sensitivity transfer function for an additive disturbance at the signal.

    • Complementary Sensitivity — Specifies an output followed by an additive input. Use to compute closed-loop transfer function around the loop.

    When you specify linearization inputs and outputs or loop openings, markers appear in your model indicating the linear analysis point type.

  4. Repeat step 3 for all signals you want to define as linearization I/O points or open-loop points.

Specifying linear analysis points using the context menu changes the model (makes the model "dirty", that is, saving the model stores the points with the model).

 More About

Specify Portion of Model to Linearize in Linear Analysis Tool

You use linearization inputs, outputs, and loop-opening locations (linearization I/O sets) to specify which portion of the model to linearize. You can specify one or more linearization I/O sets interactively in the Linear Analysis Tool, without introducing changes to the model.

To access the Create linearization I/O set dialog box:

  1. Click the Exact Linearization or Frequency Response Estimation tab.

  2. From the Analysis I/Os drop-down list, select Create new linearization I/Os.

The Create linearization I/O set dialog box opens.

Create Linearization I/O Set

To create a new linearization I/O set:

  1. In your Simulink model, select a signal that you want to define as a linearization input or output point.

    The selected signal appears in the Create linearization I/O set dialog box under Currently selected signals.

  2. In the Create linearization I/O set dialog box, click the signal name under Currently selected signals.

  3. Click Add. The signal appears in the list of Analysis I/Os.

  4. Select the linearization point type from the Configuration drop-down list. For example:

    • If you want the selected signal to be a linearization output point, select Output Measurement.

    • If you want the signal to be an open-loop output point, select Open-loop Output.

  5. Repeat steps 1–4 for any other signals you want to define as linearization I/O points.

      Tip   To highlight in the Simulink model the blocks that are included in the linearization specified by the current list of Analysis I/Os, click Highlight.

  6. After you define all the signals for the I/O set, enter a name for the I/O set in the Variable name field located at the top-left of the window.

  7. Click OK.

The Create linearization I/O set dialog box closes. A new linearization I/O set appears in the Linear Analysis Workspace of the Linear Analysis Tool. The new linearization I/O set displays the name you specified.

The newly created linearization I/O set is automatically selected in the Analysis I/Os menu for either the Exact Linearization or Frequency Response Estimation tab, depending on which you selected originally.

Creating linearization I/O sets in the Linear Analysis Tool does not change the Simulink model. You can create multiple I/O sets for a single model.

 More About

Edit Portion of Model to Linearize in Linear Analysis Tool

You can interactively edit a linearization I/O set stored in the Linear Analysis Workspace using the Linear Analysis Tool Edit dialog box.

Open Edit Dialog Box

To open the Edit dialog box for editing a linearization set, either:

  • In the Linear Analysis Workspace, double-click the I/O set.

  • Click either the Exact Linearization or Frequency Response Estimation tab. If the I/O set is selected in the Analysis I/Os menu, click the edit icon next to the Analysis I/Os menu.

Either of these actions opens the I/O set edit dialog box for the linearization I/O set. You can now edit the I/O set as needed. When you have finished editing, click to close the dialog box and save your changes.

    Tip   To highlight in the Simulink model the blocks that are included in the linearization specified by the current list of Analysis I/Os, click Highlight.

Add Signal to I/O Set

To add a linearization input point, output point, or loop opening to the linearization I/O set:

  1. In your Simulink model, select a signal that you want to add to the linearization I/O set.

    The selected signal appears in the Create linearization I/O set dialog box under Currently selected signals.

  2. In the Create linearization I/O set dialog box, click the signal name under Currently selected signals.

  3. Click Add. The signal appears in the list of Analysis I/Os.

  4. Select the linear analysis point type from the Configuration drop-down list. For example:

    • If you want the selected signal to be a linearization output point, select Output Measurement.

    • If you want the signal to be an open-loop linearization output point, select Open-loop Output.

Remove Signal from I/O Set

To remove a linearization input point, output point, or loop opening from the linearization I/O set:

  1. Select the signal in the list of Analysis I/Os.

  2. Click Delete to remove the signal from the linearization I/O set.

Change Linear Analysis Point Type

To change the type of linear analysis point type for a signal, locate the signal in the list of Analysis I/Os. Then, use the Configuration drop-down list for the signal to define the type of linear analysis point.

For example, if you want the signal to be a linearization output point, select Output Measurement from the Configuration drop-down list. If you want the signal to be an open loop output point, select Open-loop Output.

Select Bus Elements as Linear Analysis Points

This example shows how to select individual elements in a bus signal as linearization input/output (I/O) points. Linearization I/O points define the portion of the model to linearize.

 Code Alternative

  1. Open Simulink model.

    sys = 'scdbusselection';
    open_system(sys)

  2. In the Simulink model window, define portion of the model to linearize:

    1. Right-click the COUNTERBUS signal, and select Linear Analysis Points > Select Bus Element.

      This option appears only if Mux blocks used to create bus signals in the Configuration Parameters > Diagnostics > Connectivity pane is error. Otherwise, right-clicking the bus signal lets you specify all elements in the bus as linearization input or output points.

      The Select Linearization Points in the Bus dialog box opens, which shows signals contained in the COUNTERBUS bus signal.

    2. In the Bus Hierarchy area, expand the bus named limits. Then, select upper_saturation_limit.

        Tip   For large buses, you can enter search text for filtering element names in the Filter by name edit box. The name match is case-sensitive. Additionally, you can enter a MATLAB® regular expression.

        To modify the filtering options, click adjacent to the Filter by name edit box.

         Filtering Options

    3. Click Add.

      The selected signal now appears in the Linearization Inputs/Outputs area, and is configured as a linearization input point.

      Click OK.

    4. In the Simulink model window, right-click the OUTPUTBUS signal, and select Linear Analysis Points > Select Bus Element.

    5. In the Bus Hierarchy area, expand the bus named limits, and select upper_saturation_limit.

    6. Click Add to add the selected signal to the Linearization Inputs/Outputs area.

    7. Select Output Measurement in the Configuration column.

      Click OK.

      Tip   In the Simulink model window, select Display > Signals & Ports > Linearization Indicators to view the linearization I/O markers.

    You can select multiple elements in the same bus with different I/O types. The marker appears on the bus signal to indicate multiple bus element selections with different I/O types.

  3. In the Simulink model window, select Analysis > Control Design > Linear Analysis.

    The Linear Analysis Tool for the model opens.

    Click the Exact Linearization tab. Click adjacent to the Analysis I/Os list to see the bus elements selected as linearization I/O points.

  4. In the Exact Linearization tab, click to linearize the model using the model initial condition as the operating point.

 Related Examples

Was this topic helpful?