Quantcast

Documentation Center

  • Trial Software
  • Product Updates

removeOpening

Remove opening from list of permanent loop openings in slLinearizer or slTuner interface

Syntax

Description

example

removeOpening(s,op) removes the specified opening, op, from the list of permanent openings for the slLinearizer or slTuner interface, s. You can specify op to remove either a single or multiple openings.

removeOpening does not modify the model associated with s.

Examples

expand all

Remove Opening Using Signal Name

Create an slLinearizer interface for the scdcascade model.

sllin = slLinearizer('scdcascade');

Generally, you configure the interface with analysis points, openings, operating points, and parameter values. For this example, add only openings to the interface.

addOpening(sllin,{'y2m','y1m','u1'});

'y2m', 'y1m', and 'u1' are the names of signals in the scdcascade model. The addOpening command adds these signals to the list of permanent openings for sllin.

Remove the 'y1m' opening from sllin.

removeOpening(sllin,'y1m');

Remove Multiple Openings Using Signal Names

Create an slLinearizer interface for the scdcascade model.

sllin = slLinearizer('scdcascade');

Generally, you configure the interface with analysis points, openings, operating points, and parameter values. For this example, add only openings to the interface.

addOpening(sllin,{'y2m','y1m','u1'});

'y2m', 'y1m', and 'u1' are the names of signals in the scdcascade model. The addOpening command adds these signals to the list of permanent openings for sllin.

Remove the 'y1m' and 'y2m' openings from sllin.

removeOpening(sllin,{'y1m','y2m'});

Remove Opening Using Index

Create an slLinearizer interface for the scdcascade model.

sllin = slLinearizer('scdcascade');

Generally, you configure the interface with analysis points, loop openings, operating points, and parameter values. For this example, add only openings to the interface.

addOpening(sllin,{'y2m','y1m','u1'});

'y2m', 'y1m', and 'u1' are the names of signals in the scdcascade model. The addOpening command adds these signals to the list of permanent openings for sllin.

Determine the index number of the opening you want to remove. To do this, display the contents of the interface, which includes opening index numbers, in the Command Window.

For this example, remove the 'y1m' opening from sllin.

sllin
slLinearizer linearization interface for "scdcascade":

No analysis points. Use addPoint method to add new points.
3 Permanent openings: 
--------------------------
Opening 1:
- Block: scdcascade/Sum3
- Port: 1
- Signal Name: y2m

Opening 2:
- Block: scdcascade/Sum
- Port: 1
- Signal Name: y1m

Opening 3:
- Block: scdcascade/C1
- Port: 1
- Signal Name: u1

Other properties (with dot notation get/set access):
      Parameters         : [] 
      OperatingPoints    : [] (model initial condition will be used.)
      BlockSubstitutions : []
      Options            : [1x1 linearize.LinearizeOptions]

The displays shows that 'y1m' is the second opening of sllin .

Remove the opening from the interface.

removeOpening(sllin,2);

Remove Multiple Openings Using Index

Create an slLinearizer interface for the scdcascade model.

sllin = slLinearizer('scdcascade');

Generally, you configure the interface with analysis points, openings, operating points, and parameter values. For this example, add only openings to the interface.

addOpening(sllin,{'y2m','y1m','u1'});

'y2m', 'y1m', and 'u1' are the names of signals in the scdcascade model. The addOpening command adds these signals to the list of permanent openings for sllin.

Determine the index numbers of the openings you want to remove. To do this, display the contents of the interface, which includes opening index numbers, in the Command Window.

For this example, remove the 'y2m' and 'y1m' openings from sllin.

sllin
slLinearizer linearization interface for "scdcascade":

No analysis points. Use addPoint method to add new points.
3 Permanent openings: 
--------------------------
Opening 1:
- Block: scdcascade/Sum3
- Port: 1
- Signal Name: y2m

Opening 2:
- Block: scdcascade/Sum
- Port: 1
- Signal Name: y1m

Opening 3:
- Block: scdcascade/C1
- Port: 1
- Signal Name: u1

Other properties (with dot notation get/set access):
      Parameters         : [] 
      OperatingPoints    : [] (model initial condition will be used.)
      BlockSubstitutions : []
      Options            : [1x1 linearize.LinearizeOptions]

The displays shows that 'y2m' and 'y1m' are the first and second openings of sllin .

Remove the openings from the interface.

removeOpening(sllin,[1 2]);

Input Arguments

expand all

s — Interface to Simulink® modelslLinearizer interface | slTuner interface

Interface to a Simulink model, specified as either an slLinearizer interface or an slTuner interface.

op — Openingstring | cell array of strings | positive integer | vector of positive integers

Opening to remove from the list of permanent openings for s, specified as:

  • String — Opening signal name.

    To determine the signal name associated with an opening, type s. The software displays the contents of s in the MATLAB® command window, including the opening signal names, block names, and port numbers. Suppose an opening does not have a signal name, but only a block name and port number. You can specify op as the block name.

    You can specify op as a uniquely matching substring of the full signal name or block name. Suppose the full signal name of an opening is 'LoadTorque'. You can specify op as 'Torque' as long as 'Torque' is not a substring of the signal name for any other opening of s.

    For example, op = 'y1m'.

  • Cell array of strings — Specifies multiple opening names. For example, op = {'y1m','y2m'}.

  • Positive integer — Opening index.

    To determine the index of an opening, type s. The software displays the contents of s in the MATLAB command window, including the opening indices. For example, op = 1.

  • Vector of positive integers — Specifies multiple opening indices. For example, op = [1 2].

More About

expand all

Permanent Openings

Permanent openings, used by the slLinearizer and slTuner interfaces, identify locations within a model where the software breaks the signal flow. The software enforces these openings for linearization and tuning. Use permanent openings to isolate a specific model component. Suppose you have a large-scale model capturing aircraft dynamics and you want to perform linear analysis on the airframe only. You can use permanent openings to exclude all other components of the model. Another example is when you have cascaded loops within your model and you want to analyze a specific loop.

Location refers to a specific block output port within a model. For convenience, you can use the name of the signal that originates from this port to refer to an opening.

You can add permanent openings to an slLinearizer or slTuner interface, s, when you create the interface or by using the addOpening command. To remove a location from the list of permanent openings, use the removeOpening command.

To view all the openings of s, type s at the command prompt to display the interface contents. For each permanent opening of s, the display includes the block name and port number and the name of the signal that originates at this location. You can also use getOpenings to programmatically obtain a list of all the permanent openings.

See Also

| | | |

Was this topic helpful?