Main Content

tunableSS

可调的固定顺序空间模型

Syntax

blk = tunableSS(name,Nx,Ny,Nu)
blk = tunableSS(name,Nx,Ny,Nu,Ts)
blk = tunabless(name,sys)
blk = tunableSS(...,Astruct)

Description

Model object for creating tunable fixed-order state-space models.tunableSS让您可以参数为参数研究的给定订单的状态空间模型或使用调谐命令进行自动调整(例如系统tune或者looptune

tunableSSControl Design Block参数模型家族。其他控制设计块包括tunablePID,tunableGain, 和tunableTF

建造

blk= tunabless(姓名,nx,纽约,nu)creates the continuous-time parametric state-space model named姓名。这state-space modelblknxstates,纽约outputs, andnu输入。可调参数是A,B,C, 和D状态空间模型的矩阵。

blk= tunabless(姓名,nx,纽约,nu,TS)creates a discrete-time parametric state-space model with sample timeTS

blk= tunabless(姓名,系统)uses the dynamic system系统to dimension the parametric state-space model, set its sample time, and initialize the tunable parameters.

blk= tunabless(。。。,astruct)creates a parametric state-space model whoseAmatrix is restricted to the structure specified inastruct

Input Arguments

姓名

Parametric state-space model姓名,指定为角色向量,例如'C0'。(See特性

nx

非负整数指定参数状态空间模型的状态数(顺序)blk

纽约

Nonnegative integer specifying the number of outputs of the parametric state-space modelblk

nu

Nonnegative integer specifying the number of inputs of the parametric state-space modelblk

TS

Scalar sample time.

astruct

对形式的约束Amatrix of the parametric state-space modelblk, specified as one of the following values:

价值forastruct Structure ofAmatrix
'tridiag' A是tridiagonal。以三角形形式,A有free elements only in the main diagonal, the first diagonal below the main diagonal, and the first diagonal above the main diagonal. The remaining elements ofA固定为零。
'full' A已满(每个条目Ais a free parameter).
'伴侣' A以伴侣形式。在伴随形式中,系统的特征多项式在A矩阵的最右列中明确出现。看canonfor more information.

If you do not specifyastruct,blkdefaults to'tridiag'形式。

系统

动态系统模型提供状态数,输入和输出的数量,样本时间以及参数的初始值blk。为了获得尺寸和初始参数值,tunableSSconverts系统到具有指定结构的状态空间模型astruct。如果您省略astruct,tunableSSconverts系统into tridiagonal state-space form.

特性

A, B, C, D

Parametrization of the state-space matricesA,B,C, 和Dof the tunable state-space modelblk

blk.A,blk.B,blk.C, 和blk.D参数对象。有关这些属性的一般信息参数objects, see the参数(Simulink Design Optimization)object reference page.

这following fields ofblk.A,blk.B,blk.C, 和blk.D是used when you tuneblk使用hinfstruct:

Field Description
价值

Current values of the entries in the parametrized state-space matrix. For example,blk.a.valuecontains the values of theAmatrix ofblk

hinfstruct(强大的控制工具箱)tunes all entries inblk.a.value,blk.B.Value,blk.C.Value, 和blk.d.value除了其值是由blk.gain.free

自由的

2-D array of logical values determining whether the corresponding state-space matrix parameters are fixed or free parameters. For example:

  • Ifblk.a.free(i,j) = 1, thenblk.a.value(i,j)is a tunable parameter.

  • Ifblk.a.free(i,j) = 0, thenblk.a.value(i,j)是固定的。

Defaults: By default, all entries inB,C, 和D是tunable. The default free entries inAdepend upon the value ofastruct:

  • 'tridiag'- 三个对角线的条目blk.a.free1;the rest are0

  • 'full'- 所有条目blk.a.free0

  • '伴侣'blk.a.free(1,:) = 1blk.a.free(j,j-1)= 1;所有其他条目是0

Minimum

参数的最小值。该属性在参数的调谐值上放置一个下限。例如,设置blk.a.minmim(1,1)= 0ensures that the first entry in theA矩阵保持积极。

Default:-Inf

Maximum

Maximum value of the parameter. This property places an upper bound on the tuned value of the parameter. For example, settingblk.A.Maximum(1,1) = 0ensures that the first entry in theA矩阵仍然为负。

Default:Inf

Statename

State names, specified as one of the following:

  • 字符向量 - 例如,对于一阶模型'velocity'

  • Cell array of character vectors — For models with two or more states

  • ''- 对于不愿透露姓名的国家。

Default:''for all states

国有

State units, specified as one of the following:

  • 字符向量 - 例如,对于一阶模型'velocity'

  • Cell array of character vectors — For models with two or more states

  • ''— For states without specified units

利用国有to keep track of the units each state is expressed in.国有有no effect on system behavior.

Default:''for all states

TS

Sample time. For continuous-time models,TS = 0。For discrete-time models,TSis a positive scalar representing the sampling period. This value is expressed in the unit specified by theTimeUnit模型的属性。要表示具有未指定样本时间的离散时间模型,请设置TS= -1

Changing this property does not discretize or resample the model.

Default:0(连续时间)

TimeUnit

Units for the time variable, the sample timeTS, 和any time delays in the model, specified as one of the following values:

  • '纳秒'

  • 'microseconds'

  • “毫秒”

  • “秒”

  • '分钟'

  • 'hours'

  • '天'

  • 'weeks'

  • 'months'

  • '年'

更改此属性对其他属性没有影响,因此改变了整体系统行为。利用chgTimeUnitto convert between time units without modifying system behavior.

Default:“秒”

InputName

Input channel names, specified as one of the following:

  • 字符向量 - 例如,单输入模型,例如'controls'

  • 字符向量的单元格数 - 用于多输入模型。

Alternatively, use automatic vector expansion to assign input names for multi-input models. For example, if系统is a two-input model, enter:

sys.inputName ='controls';

这input names automatically expand to{'controls(1)';'controls(2)'}

You can use the shorthand notationuto refer to theInputNameproperty. For example,系统。u相当于系统。InputName

Input channel names have several uses, including:

  • Identifying channels on model display and plots

  • 提取MIMO系统的子系统

  • 互连模型时指定连接点

Default:''for all input channels

InputUnit

Input channel units, specified as one of the following:

  • 字符向量 - 例如,单输入模型,例如“秒”

  • 字符向量的单元格数 - 用于多输入模型。

利用InputUnit跟踪输入信号单元。InputUnit有no effect on system behavior.

Default:''for all input channels

InputGroup

输入通道组。这InputGroup属性使您可以将MIMO系统的输入通道分为组,并通过名称参考每个组。将输入组指定为结构。在此结构中,字段名称是组名称,字段值是属于每个组的输入通道。例如:

系统。InputGroup.controls = [1 2]; sys.InputGroup.noise = [3 5];

创建名称的输入组controlsnoisethat include input channels 1, 2 and 3, 5, respectively. You can then extract the subsystem from thecontrols使用以下输出的输入:

系统(:,'controls')

Default:Struct with no fields

输出名称

Output channel names, specified as one of the following:

  • Character vector — For single-output models. For example,'measurements'

  • Cell array of character vectors — For multi-output models.

Alternatively, use automatic vector expansion to assign output names for multi-output models. For example, if系统是一个两输出模型,Enter:

sys.outputname= 'measurements';

这output names automatically expand to{'测量(1)';'测量(2)'}

You can use the shorthand notationyto refer to the输出名称property. For example,系统。y相当于sys.outputname

输出频道名称有多种用途,包括:

  • Identifying channels on model display and plots

  • 提取MIMO系统的子系统

  • 互连模型时指定连接点

Default:''for all output channels

OutputUnit

Output channel units, specified as one of the following:

  • Character vector — For single-output models. For example,“秒”

  • Cell array of character vectors — For multi-output models.

利用OutputUnit跟踪输出信号单元。OutputUnit有no effect on system behavior.

Default:''for all output channels

OutputGroup

Output channel groups. TheOutputGroup属性使您可以将MIMO系统的输出通道分为组,并通过名称参考每个组。将输出组指定为结构。在此结构中,字段名称是组名称,字段值是属于每个组的输出通道。例如:

系统。OutputGroup.temperature = [1]; sys.InputGroup.measurement = [3 5];

创建命名的输出组温度measurementthat include output channels 1, and 3, 5, respectively. You can then extract the subsystem from all inputs to themeasurementoutputs using:

sys(“测量”,:)

Default:Struct with no fields

姓名

System name, specified as a character vector. For example,'system_1'

Default:''

笔记

您要与系统相关联的任何文本,以字符串或字符向量的单元格数组存储。属性存储您提供的任何数据类型。例如,如果系统1系统2是动态系统模型,您可以设置他们的笔记属性如下:

sys1.notes ="sys1 has a string.";sys2.notes =“ SYS2具有角色向量。”;系统1.Notes sys2.Notes
ans = "sys1 has a string." ans = 'sys2 has a character vector.'

Default:[0×1字符串]

用户数据

Any type of data you want to associate with system, specified as any MATLAB®data type.

Default:[]

Examples

创建一个零的参数化的5阶SISO模型D矩阵。

blk = tunabless('ssblock',5,1,1);blk.d.value = 0;%设置d = 0 blk.d.free = false;%修复D为零

默认情况下,A矩阵为三角形形式。要以伴侣形式参数化模型,请使用'伴侣'input argument:

blk = tunableSS('ssblock',5,1,1,'companion'); blk.D.Value = 0; % set D = 0 blk.D.Free = false; % fix D to zero

Create a parametric state-space model, and assign names to the inputs.

blk = tunableSS('ssblock',5,2,2) % 5 states, 2 outputs, 2 inputs blk.InputName = {'Xerror','Yerror'} % assign input names

Tips

  • 利用theastructinput argument to constrain the structure of theAmatrix of the parametric state-space model. To impose additional structure constrains on the state-space matrices, use the fieldsblk.a.free,blk.B.Free,blk.C.Free, 和blk.D.Free修复参数矩阵中特定条目的值。

    例如,修复blk.B(i,j), setblk.b.free(i,j)= 0。允许hinfstruct(强大的控制工具箱)blk.B(i,j), setblk.b.free(i,j)= 1

  • To convert atunableSSparametric model to a numeric (non-tunable) model object, use model commands such asSS,TF, 或者zpk

兼容性考虑

expand all

Behavior changed in R2016a

Introduced in R2016a