addOpening
Add signal to list of openings for slLinearizer
or slTuner
interface
Description
addOpening(
adds
the specified point (signal) to the list of permanent openings for the s
,pt
)slLinearizer
or slTuner
interface, s
.
Use permanent openings to isolate a specific model component for the purposes of linearization and tuning. 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.
Examples
Add Opening Using Signal Name
Suppose you want to analyze only the inner-loop dynamics of the scdcascade
model. Add the outer-loop feedback signal, y1m
, as a permanent opening of an slLinearizer
interface.
Open the scdcascade
model.
mdl = 'scdcascade';
open_system(mdl)
Create an slLinearizer
interface for the model.
sllin = slLinearizer(mdl);
Add the y1m
signal as a permanent opening of sllin
.
addOpening(sllin,'y1m');
View the currently defined analysis points within sllin
.
sllin
slLinearizer linearization interface for "scdcascade": No analysis points. Use the addPoint command to add new points. 1 Permanent openings: -------------------------- Opening 1: - Block: scdcascade/Sum - Port: 1 - Signal Name: y1m Properties with dot notation get/set access: Parameters : [] OperatingPoints : [] (model initial condition will be used.) BlockSubstitutions : [] Options : [1x1 linearize.LinearizeOptions]
Add Opening Using Block Path and Port Number
Suppose you want to analyze only the inner-loop dynamics of the scdcascade
model. Add the outer-loop feedback signal, y1m
, as a permanent opening of an slLinearizer
interface.
Open the scdcascade
model.
mdl = 'scdcascade';
open_system(mdl)
Create an slLinearizer
interface for the model.
sllin = slLinearizer(mdl);
Add the y1m
signal as a permanent opening of sllin
.
addOpening(sllin,'scdcascade/Sum',1);
The y1m
signal originates at the first (and only) port of the scdcascade/Sum
block.
Add Bus Elements as Openings
Open the scdbusselection
model.
mdl = 'scdbusselection';
open_system(mdl);
Create an slLinearizer
interface for the model.
sllin = slLinearizer(mdl);
The COUNTERBUS
signal of scdbusselection
contains multiple bus elements. Add the upper_saturation_limit
and data
bus elements as openings to sllin
. When adding elements within a nested bus structure, use dot notation to access the elements of the nested bus, for example limits.upper_saturation_limit
.
blk = {'scdbusselection/COUNTERBUSCreator','scdbusselection/COUNTERBUSCreator'}; port_num = [1 1]; bus_elem_name = {'limits.upper_saturation_limit','data'};
Both bus elements originate at the first (and only) port of the scdbusselection/COUNTERBUSCreator
block. Therefore, blk
and port_num
repeat the same element twice.
Input Arguments
s
— Interface to Simulink® model
slLinearizer
interface | slTuner
interface
Interface to a Simulink model, specified as either an slLinearizer
interface or an slTuner
interface.
pt
— Opening
character vector | string | cell array of character vectors | string array | vector of linearization I/O objects
Opening to add to the list of permanent openings for s
,
specified as:
Character vector or string — Signal identifier that can be any of the following:
Signal name, for example
'torque'
Block path for a block with a single output port, for example
'Motor/PID'
Path to block and port originating the signal, for example
'Engine Model/1'
or'Engine Model/torque'
Cell array of character vectors or string array — Specifies multiple signal identifiers. For example,
pt = {'Motor/PID','Engine Model/1'}
.Vector of linearization I/O objects — Use
linio
to creatept
. For example:pt(1) = linio('scdcascade/setpoint',1) pt(2) = linio('scdcascade/Sum',1,'output')
Here,
pt(1)
specifies an input, andpt(2)
specifies an output. However, the software ignores the I/O types and adds them both to the list of permanent openings fors
.
blk
— Block path identifying block where opening originates
character vector (default) | string | cell array of character vectors | string array
Block path identifying the block where the opening originates, specified as a character vector or cell array of character vectors.
Dimensions of blk
:
For a single opening, specify
blk
as a character vector or string.For example,
blk = 'scdcascade/C1'
.For multiple openings, specify
blk
as a cell array of character vectors or string array.blk
,port_num
, andbus_elem_name
(if specified) must have the same size.For example,
blk = {'scdcascade/C1','scdcascade/Sum'}
.
port_num
— Port where opening originates
positive integer (default) | vector of positive integers
Port where the opening originates, specified as a positive integer or a vector of positive integers.
Dimensions of port_num
:
For a single opening, specify
port_num
as a positive integer.For example,
port_num = 1
.For multiple openings, specify
port_num
as a vector of positive integers.blk
,port_num
, andbus_elem_name
(if specified) must have the same size.For example,
port_num = [1 1]
.
bus_elem_name
— Bus element name
character vector (default) | string | cell array of character vectors | string array
Bus element name, specified as a character vector or cell array of character vectors.
Dimensions of bus_elem_name
:
For a single opening, specify
bus_elem_name
as a character vector or string.For example,
bus_elem_name = 'data'
.For multiple openings, specify
bus_elem_name
as a cell array of character vectors or string array.blk
,port_num
, andbus_elem_name
(if specified) must have the same size.For example,
bus_elem_name = {'limits.upper_saturation_limit','data'}
.
More About
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
that 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 programmatically obtain a list of all the permanent
loop openings using getOpenings
.
Version History
Introduced in R2013b
See Also
slLinearizer
| slTuner
| addPoint
| addBlock
| linio
| removeOpening
| removeAllOpenings
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)