addPoint

Add signal to list of analysis points for slLinearizer or slTuner interface

Syntax

  • addPoint(s,blk,port_num) example
  • addPoint(s,blk,port_num,bus_elem_name) example

Description

example

addPoint(s,pt) adds the specified point to the list of analysis points for the slLinearizer or slTuner interface, s.

Analysis points are model signals that can be used as input, output, or loop-opening locations for analysis and tuning purposes. You use analysis points as inputs to the linearization commands of s: getIOTransfer, getLoopTransfer, getSensitivity, and getCompSensitivity. As inputs to the linearization commands, analysis points can specify any open- or closed-loop transfer function in a model. You can also use analysis points to specify tuning goals for systune.

example

addPoint(s,blk,port_num) adds the point that originates at the specified output port of the specified block as an analysis point for s.

example

addPoint(s,blk,port_num,bus_elem_name) adds the specified bus element as an analysis point.

Examples

expand all

Add Analysis Point Using Signal Name

Add the u1 and y1 signals of the scdcascade model to an slLinearizer interface.

Open the scdcascade model.

mdl = 'scdcascade';
open_system(mdl);

Create an slLinearizer interface for the model.

sllin = slLinearizer('scdcascade');

Add u1 and y1 as analysis points for sllin.

addPoint(sllin,{'u1','y1'});

Add Analysis Points Using Block Path and Port Number

Suppose you want to linearize the magball model and obtain a transfer function from the reference input to the plant output. Add the signals originating at the Design Height and Magnetic Ball Plant blocks as analysis points to an slLinearizer interface.

Open the magball model.

open_system('magball');

Create an slLinearizer interface for the model.

sllin = slLinearizer('magball');

Add the signals originating at the Design Height and Magnetic Ball Plant blocks as analysis points of sllin. Both signals originate at the first (and only) port of the respective blocks.

blk = {'magball/Desired Height','magball/Magnetic Ball Plant'};
port_num = [1 1];

addPoint(sllin,blk,port_num)

Add Bus Elements as Analysis Points

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 lower_saturation_limit bus elements as analysis points to sllin.

blk = {'scdbusselection/COUNTERBUSCreator','scdbusselection/COUNTERBUSCreator'};
port_num = [1 1];
bus_elem_name = {'upper_saturation_limit','lower_saturation_limit'};

addPoint(sllin,blk,port_num,bus_elem_name);

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

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.

pt — Analysis pointstring | cell array of strings | vector of linearization I/O objects

Analysis point to add to the list of analysis points for s, specified as:

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

    To specify multiple signal identifiers, specify pt as a cell array of strings.

  • Cell array of strings — Specifies multiple signal identifiers.

  • Vector of linearization I/O objects — Use linio to create pt. For example:

    pt(1) = linio('scdcascade/setpoint',1)
    pt(2) = linio('scdcascade/Sum',1,'output')

    Here, pt(1) specifies an input, and pt(2) specifies an output. The interface adds all the signals specified by pt and ignores the I/O types. The interface also adds all 'loopbreak' type signals as permanent openings.

blk — Block path identifying block where analysis point originatesstring (default) | cell array of strings

Block path identifying the block where the analysis point originates, specified as a string or cell array of strings.

Dimensions of blk:

  • For a single point, specify blk as a string.

    For example, blk = 'scdcascade/C1'.

  • For multiple points, specify blk as a cell array of strings. blk, port_num, and bus_elem_name (if specified) must have the same size.

    For example, blk = {'scdcascade/C1','scdcascade/Sum'}.

port_num — Port where analysis point originatespositive integer (default) | vector of positive integers

Port where the analysis point originates, specified as a positive integer or a vector of positive integers.

Dimensions of port_num:

  • For a single point, specify port_num as a positive integer.

    For example, port_num = 1.

  • For multiple points, specify port_num as a vector of positive integers. blk, port_num, and bus_elem_name (if specified) must have the same size.

    For example, port_num = [1 1].

bus_elem_name — Bus element namestring (default) | cell array of strings

Bus element name, specified as a string or cell array of strings.

Dimensions of bus_elem_name:

  • For a single point, specify bus_elem_name as a string.

    For example, bus_elem_name = 'upper_saturation_limit'.

  • For multiple points, specify bus_elem_name as a cell array of strings. blk, port_num, and bus_elem_name (if specified) must have the same size.

    For example, bus_elem_name = {'upper_saturation_limit','lower_saturation_limit'}.

More About

expand all

Analysis Points

Analysis points, used by the slLinearizer and slTuner interfaces, identify locations within a model that are relevant for linear analysis and control system tuning. You use analysis points as inputs to the linearization commands, such as getIOTransfer, getLoopTransfer, getSensitivity, and getCompSensitivity. As inputs to the linearization commands, analysis points can specify any open- or closed-loop transfer function in a model. You can also use analysis points to specify design requirements when tuning control systems using commands such as systune (requires a Robust Control Toolbox™ license).

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 analysis point.

You can add analysis points to an slLinearizer or slTuner interface, s, when you create the interface. For example:

s = slLinearizer('scdcascade',{'u1','y1'});

Alternatively, you can use the addPoint command.

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

For more information about how you can use analysis points, see Managing Signals in Control System Analysis and Design.

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.

Was this topic helpful?