主要内容

参数化增益时间表

通常,Simulink中的增益制定控制系统金宝app®使用查找表或MATLAB功能blocks to specify gain values as a function of the scheduling variables. For tuning, you replace these blocks by parametric gain surfaces. A参数增益表面是一个基础功能扩展,其系数可调节。例如,您可以建模时间变化的增益k(t)作为立方多项式t:

k(t)=k0+k1t+k2t2+k3t3

这里,k0,...,,k3are tunable coefficients. When you parameterize scheduled gains in this way,systunecan tune the gain-surface coefficients to meet your control objectives at a representative set of operating conditions. For applications where gains vary smoothly with the scheduling variables, this approach provides explicit formulas for the gains, which the software can write directly toMATLAB功能blocks. When you use lookup tables, this approach lets you tune a few coefficients rather than many individual lookup-table entries, drastically reducing the number of parameters and ensuring smooth transitions between operating points.

Basis Function Parameterization

在增益制定的控制器中,预定的收益是调度变量的函数,σ。例如,增益套件的PI控制器具有以下形式:

C ( s , σ ) = K p ( σ ) + K i ( σ ) s

调整此控制器需要确定功能形式Kp(σ) 和Ki(σ)在操作范围内产生最佳系统性能σvalues. However, tuning arbitrary functions is difficult. Therefore, it is necessary either to consider the function values at only a finite set of points, or restrict the generality of the functions themselves.

在第一种方法中,您选择了设计点的集合,σ并调整收益KpKiindependently at each design point. The resulting set of gain values is stored in a lookup table driven by the scheduling variables,σ。这种方法的缺点是,调整可能会给相邻的设计点产生大幅不同的值,从而在从一个操作点过渡到另一个操作点时会导致不良跳跃。

另外,您可以将收益作为平滑功能建模σ,但通过使用特定的基础功能扩展来限制此类功能的一般性。例如,假设σis a scalar variable. You can modelKp(σ)作为二次函数σ:

K p ( σ ) = k 0 + k 1 σ + k 2 σ 2

After tuning, this parametric gain might have a profile such as the following (the specific shape of the curve depends on the tuned coefficient values and range ofσ):

Or, suppose thatσ由两个调度变量组成,αV。然后,您可以建模Kp(σ)作为双线性函数αV:

K p ( α , V ) = k 0 + k 1 α + k 2 V + k 3 α V

调整后,此参数增益可能具有以下内容。在这里,曲线的特定形状取决于调谐系数值和范围σ值:

用于调整增益时间表systune, you use a参数增益表面that is a particular expansion of the gain in basis functions ofσ:

K ( σ ) = K 0 + K 1 F 1 ( n ( σ ) ) + + K M F M ( n ( σ ) )

基础功能F1,...,,FM是用户选择并修复的。这些功能在n(σ), wheren是一个函数,将调度变量缩放并归一化为间隔[–1,1](或您指定的间隔)。扩展的系数,K0,...,,KM,是增益表面的可调参数。K0,...,,KM可以是标量或矩阵值,具体取决于增益的I/O大小K(σ)。基本函数的选择是依赖问题的,但通常,首先尝试低阶多项式扩展。

Tunable Gain Surfaces

Use thetunableSurface命令构建在设计点网格上采样增益表面的可调模型(σ值)。例如,考虑双线性依赖性对两个调度变量的增益,αV:

K p ( α , V ) = K 0 + K 1 α + K 2 V + K 3 α V

Suppose thatα是一个入射角,范围为0°至15°,并且V是300 m/s至700 m/s的速度。创建一个跨越这些范围的设计点网格。这些设计点必须与您采样不同或非线性植物的参数值相匹配。(看增益制定控制器调整的植物模型

[alpha,v] = ndgrid(0:5:15,300:100:700);域= struct('α',α,'V',V);

指定该表面参数化的基础函数,α,V, 和αV。这tunableSurface命令期望将基本函数作为两个输入变量函数的向量进行安排。您可以使用匿名函数来表达基础函数。

shapefcn = @(alpha,v)[alpha,v,alpha*v];

Alternatively, usepolyBasis,Fourierbasis, 或者ndbasisto generate basis functions of as many scheduling variables as you need.

Create the tunable surface using the design points and basis functions.

kp = tunablesurface('KP',1,domain,shapefcn);

KP是增益表面的可调模型。tunableSurface将表面参数化为:

K p ( α , V ) = K ¯ 0 + K ¯ 1 α ¯ + K ¯ 2 V ¯ + K ¯ 3 α ¯ V ¯ ,

在哪里

α ¯ = α - 7.5 7.5 , V ¯ = V - 500 200

这surface is expressed in terms of the normalized variables, α ¯ , V ¯ [ - 1 , 1 ] 2 而不是在αV。这个归一化,这是tunableSurface默认情况下执行,改善了由systune。If needed, you can change the default scaling and normalization. (SeetunableSurface)。

第二个输入参数tunableSurfacespecifies the initial value of the constant coefficient,K0。By default,K0当所有调度变量都位于其范围的中心时,是收益。tunableSurface从中获取增益表面的I/O尺寸K0。因此,您可以通过为该输入提供数组来创建数组值可调的收益。

卡尔= tunableSurface('Karr',ones(2),domain,shapefcn);

卡尔is a 2-by-2 matrix in which each entry is a bilinear function of the scheduling variables with independent coefficients.

可调增益与两个独立的调度变量

This example shows how to model a scalar gainK双线性依赖于两个调度变量。您可以通过创建代表两个变量独立依赖性的设计点网格来做到这一点。

假设第一个变量α是一个范围为0到15度的发射率,第二个变量V是300至600 m/s的速度。默认情况下,归一化变量为:

x = α - 7 5 7 5 , y = V - 4 5 0 1 5 0

这gain surface is modeled as:

K ( α , V ) = K 0 + K 1 x + K 2 y + K 3 x y ,

在哪里 K 0 , , K 3 是可调参数。

Create a grid of design points, (α,V),线性间隔αV。这些设计点是用于调整增益表面系数的调度变量值。它们必须对应于您对植物进行采样的参数值。

[alpha,v] = ndgrid(0:3:15,300:50:600);

这se arrays,alphaV,代表两个调度变量的独立变化,每个变量在其完整范围内。将它们放入一个结构中,以定义可调表面的设计点。

域= struct('α',α,'V',V);

Create the basis functions that describe the bilinear expansion.

shapefcn = @(x,y)[x,y,x*y];%或使用polybasis('canonical',1,2)

在返回的阵列中shapefcn,基础函数是:

F 1 ( x , y ) = x F 2 ( x , y ) = y F 3 ( x , y ) = x y

Create the tunable gain surface.

k = tunablesurface('K',1,domain,shapefcn);

您可以将可调表面用作查找表块的参数化或Simulink模型中的MATLAB功能块。金宝app或者,使用模型互连命令将其合并为MATLAB模型的控制系统中的可调元素。调整系数后,您可以使用该系数检查产生的增益表面Viewsurf命令。对于此示例,而不是调整,而是手动将系数设置为非零值并查看所得增益。

ktuned = setData(k,[100,28,40,10]);Viewsurf(ktuned)

图包含一个轴对象。带有标题增益k(alpha,v)的轴对象包含一个类型表面对象。

Viewsurfdisplays the gain surface as a function of the scheduling variables, for the ranges of values specified bydomain并存储在采样格里德增益表面的特性。

可调表面金宝app

In your Simulink model, you model gain schedules using lookup table blocks,MATLAB功能块,或Matrix Interpolationblocks, as described inSimulink中的模型增益制定控制系统金宝app。为了调整这些增益表面,请使用tunableSurfaceto create a gain surface for each block. In theslTuner与模型的接口,将每个增益时间表指定为调整的块,并将其参数化设置为相应的增益表面。例如,rct_cstr模型包括增益安排的PI控制器,浓度控制器子系统,其中收益KPki随着调度变量而变化Cr

To tune the lookup tablesKPki, create a tunable surface for each one. Suppose that克雷克is the vector of design points, and that you expect the gains to vary quadratically withCr

tuninggrid = struct('Cr',CrEQ); ShapeFcn = @(Cr) [Cr , Cr^2]; Kp = tunableSurface('KP',0,TuningGrid,ShapeFcn); Ki = tunableSurface('Ki',-2,tuninggrid,shapefcn);

假设你有一个数组Gd植物子系统的线性化,CSTR,在每个设计点克雷克。(看增益制定控制器调整的植物模型)。Create anslTuner将此阵列代替植物子系统的接口,并指定了两个查找台式块以进行调整。

BlockSubs = struct('Name','rct_cstr/cstr','Value',GD);st0 = sltuner('rct_cstr',{'KP','Ki'},blocksubs);

Finally, use the tunable surfaces to parameterize the lookup tables.

st0.setblockparam('KP',KP);st0.setblockparam('Ki',ki);

当你调音时斯托,systune调谐可调表面的系数KPki,使每个可调表面表示Cr和the gain. When you write the tuned values back to the block for validation,setBlockParam通过评估相应块中指定的断点上的可调表面来自动生成调谐桌数据。

有关此示例的更多详细信息,请参阅化学反应器的增益安排控制

可调表面MATLAB

For a control system modeled in MATLAB®, use tunable surfaces to construct more complex gain-scheduled control elements, such as gain-scheduled PID controllers, filters, or state-space controllers. For example, suppose that you create two gain surfacesKPki使用tunableSurface。以下命令构造了可调增益式的PI控制器。

C0 = pid(Kp,Ki);

Similarly, suppose that you create four matrix-valued gain surfacesA,B,C,D。这following command constructs a tunable gain-scheduled state-space controller.

c1 = ss(a,b,c,d);

然后,您将增益制定的控制器合并到整个控制系统的广义模型中。例如,假设G是在指定的设计点采样的一系列植物模型KPki。这n, the following command builds a tunable model of a gain-scheduled single-loop PID control system.

T0 =反馈(G*C0,1);

当您与其他LTI模型互连可调表面时,结果模型是一系列可调的广义genss楷模。可调表面中的设计点确定阵列的尺寸。因此,数组中的每个条目都表示系统在相应的调度变量值处。这采样格里德阵列的属性存储这些设计点。

t0 =反馈(g*kp,1)
T0 = 4x5广义连续时空空间模型阵列。每个模型都有1个输出,1个输入,3个状态和以下块:KP:参数1x4矩阵,1个出现。键入“ ss(t0)”以查看当前值,“ get(t0)”以查看所有属性和“ t0.blocks”以与块相互作用。

所得的广义模型具有与用于创建模型的增益表面相对应的可调块。在此示例中,系统具有一个增益表面,KP,具有四个可调系数对应于K0,K1,K2, 和K3。因此,可调块是矢量值realpparameter with four entries.

当你调整控制系统systune, the software tunes the coefficients for each of the design points specified in the tunable surface.

有关说明MATLAB中整个工作流程的示例,请参见“ MATLAB中的控制器调谐”部分化学反应器的增益安排控制

See Also

相关话题