# Documentation

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

### 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 $\frac{P\left(s\right)}{1+P\left(s\right)C\left(s\right)}$.

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. In the figure, the blocks colored blue are included in the linearization. The block colored white is not included.

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.

### 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).

### 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 Linear Analysis or 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 one or more signals that you want to define as a linearization input or output point.

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

2. In the Create linearization I/O set dialog box, click a 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 for a signal from the Configuration drop-down list for that signal. 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 location of any signal in the current list of analysis I/O points, select the I/O point in the list and 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 Linear Analysis or Estimation tab, depending on which you selected originally. The new I/O set is available in the Analysis I/Os menu for both tabs.

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.

### 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 an existing linearization set, either:

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

• Click either the Linear Analysis or Estimation tab. In the Analysis I/Os drop-down list, under View/Edit, select the I/O you want to edit.

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 location of any signal in the current list of analysis I/O points, select the I/O point in the list and 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 one or more signals that you want to add to the linearization I/O set.

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

2. In the Create linearization I/O set dialog box, click one or more signal names under Currently selected signals.

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

4. Select the linear analysis point type for a signal from the Configuration drop-down list for that signal. 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.

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

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. Open the Linear Analysis Tool for the model. In the Simulink model window, select Analysis > Control Design > Linear Analysis.

In the Analysis I/Os drop-down list, under View/Edit, select ```Edit Model I/Os```. The bus elements you specified are selected as linearization I/O points.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 1, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.3266015350818634, "perplexity": 2426.1979718269436}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-18/segments/1430455166292.61/warc/CC-MAIN-20150501043926-00052-ip-10-235-10-82.ec2.internal.warc.gz"}