主要内容

addOpening

将信号添加到开口列表中Sllinearizer或者slTunerinterface

描述

example

addOpening(s,pt)adds the specified point (signal) to the list of永久性开放为了Sllinearizer或者slTunerinterface,s.

使用烫anent 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.

example

addOpening(s,BLK,port_num)在指定块的指定输出端口处添加信号作为永久性开放s.

example

addOpening(s,BLK,port_num,bus_elem_name)adds the specified bus element as a permanent opening.

例子

全部收缩

Suppose you want to analyze only the inner-loop dynamics of thescdcascademodel. Add the outer-loop feedback signal,y1m, as a permanent opening of anSllinearizerinterface.

Open thescdcascademodel.

mdl ='scdcascade';Open_System(MDL)

Create anSllinearizerinterface for the model.

sllin = slLinearizer(mdl);

Add they1m信号是永久开放的sllin.

addOpening(sllin,'y1m');

View the currently defined analysis points withinsllin.

sllin
“ SCDCASCADE”的Sllinearizer线性化接口:无分析点。使用addpoint命令添加新点。1 Permanent openings: -------------------------- Opening 1: - Block: scdcascade/Sum - Port: 1 - Signal Name: y1m Properties with点符号get/set访问:参数:[]操作点:[](将使用模型初始条件。)blockSubStitutions:[]选项:[1x1 linearize.linearizeOptions]

Suppose you want to analyze only the inner-loop dynamics of thescdcascademodel. Add the outer-loop feedback signal,y1m, as a permanent opening of anSllinearizerinterface.

Open thescdcascademodel.

mdl ='scdcascade';Open_System(MDL)

Create anSllinearizerinterface for the model.

sllin = slLinearizer(mdl);

Add they1m信号是永久开放的sllin.

addOpening(sllin,'scdcascade/Sum',1);

They1msignal originates at the first (and only) port of thescdcascade/Sumblock.

Open thescdbusselectionmodel.

mdl ='scdbusselection';Open_System(MDL);

Create anSllinearizerinterface for the model.

sllin = slLinearizer(mdl);

TheCOUNTERBUS信号scdbusselectioncontains multiple bus elements. Add theupper_saturation_limit数据bus elements as openings tosllin. When adding elements within a nested bus structure, use dot notation to access the elements of the nested bus, for examplelimits.upper_saturation_limit.

BLK= {'scdbusselection/contrabcreator','scdbusselection/contrabcreator'};port_num = [1 1];BUS_ELEM_NAME = {'limits.upper_saturation_limit','数据'};

这两个总线元素均起源于第一个(和唯一)的端口scdbusselection/COUNTERBUSCreatorblock. Therefore,BLKport_numrepeat the same element twice.

Input Arguments

全部收缩

Interface to a Simulink model, specified as either anSllinearizerinterface or anslTunerinterface.

开放以添加到列表中永久性开放fors, specified as:

  • Character vector or string — Signal identifier that can be any of the following:

    • 例如,信号名称'torque'

    • 例如,具有单个输出端口的块的块路径,例如'电动机/PID'

    • Path to block and port originating the signal, for example'Engine Model/1'或者“发动机型号/扭矩”

  • 字符矢量或字符串数​​组的单元格数字 - 指定多个信号标识符。例如,pt= {'Motor/PID','Engine Model/1'}.

  • Vector of linearization I/O objects — UseLinio去创造pt. 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.

块路径识别开口起源的块,指定为字符矢量的字符矢量或单元格数组。

Dimensions ofBLK:

  • For a single opening, specifyBLKas a character vector or string.

    例如,blk ='scdcascade/c1'.

  • 对于多个开口,指定BLK作为字符向量或字符串数​​组的单元格数组。BLK,port_num, 和bus_elem_name(if specified) must have the same size.

    例如,BLK= {'scdcascade/C1','scdcascade/Sum'}.

开口起源的端口,指定为正整数或正整数的向量。

Dimensions ofport_num:

  • For a single opening, specifyport_num作为一个积极的整数。

    例如,port_num= 1.

  • 对于多个开口,指定port_num作为积极整数的向量。BLK,port_num, 和bus_elem_name(if specified) must have the same size.

    例如,port_num= [1 1].

Bus element name, specified as a character vector or cell array of character vectors.

Dimensions ofbus_elem_name:

  • For a single opening, specifybus_elem_nameas a character vector or string.

    例如,BUS_ELEM_NAME ='数据'.

  • 对于多个开口,指定bus_elem_name作为字符向量或字符串数​​组的单元格数组。BLK,port_num, 和bus_elem_name(if specified) must have the same size.

    例如,BUS_ELEM_NAME = {'limits.upper_saturation_limit','data'}.

More About

全部收缩

永久性开放

Permanent openings, used by theSllinearizerslTuner接口,确定软件破坏信号流的模型中的位置。该软件强制执行这些开口进行线性化和调整。使用永久性开口隔离特定的模型组件。假设您有一个大规模捕获飞机动力学的大型型号,并且只想在机身上进行线性分析。您可以使用永久性开口来排除模型的所有其他组件。另一个例子是,当您在模型中级联循环并要分析特定的循环时。

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

您可以将永久性开口添加到Sllinearizer或者slTunerinterface,s, when you create the interface or by using theaddOpeningcommand. To remove a location from the list of permanent openings, use the删除command.

To view all the openings ofs, 类型s在命令提示符显示接口内容。对于每个永久性开放s,该显示包括块名和端口号以及源自此位置的信号的名称。您还可以使用编程方式获取所有永久循环开口的列表getOpenings.

在R2013B中引入