Main Content

简化高阶植物模型

此示例显示了如何通过更简单的低阶模型使用Robust Control Toolbox™近似高阶植物模型。

Introduction

强大的控制工具箱提供了处理大型模型的工具,例如:

  • 高阶植物:植物的详细第一原理或有限元模型往往具有高阶。通常,我们希望简化此类模型,以进行模拟或控制设计目的。

  • High-Order Controllers:Robust control techniques often yield high-order controllers. This is common, for example, when we use frequency-weighting functions for shaping the open-loop response. We will want to simplify such controllers for implementation.

出于控制目的,通常足以在交叉频率附近具有准确的模型。对于仿真,足以捕获激发信号频率范围内的基本动力学。这意味着通常可以找到高阶模型的低阶近似值。强大的控制工具箱提供了各种模型还原算法,以最适合您的需求和型号特性。

减少模型过程

A model reduction task typically involves the following steps:

  • 分析该模型从其时间或频域响应中获得的重要特征orbode,,,,for example.

  • determine an appropriate reduced order by plotting the Hankel singular values of the original model (Hankelsv)确定可以在不牺牲关键特征的情况下丢弃哪些模式(状态)。

  • 选择还原算法。工具箱中可用的一些还原方法是:balancmr,,,,BSTMR,,,,schurmr,,,,Hankelmr,,,,一个ndNCFMR

We can easily access these algorithms through the top-level interface减少。该方法在原始模型和还原模型之间采用了不同的“亲密”度量。选择取决于应用程序。让我们尝试每个人调查他们的相对优点。

  • 验证:我们通过将简化模型的动力学与原始模型的动力学进行比较来验证我们的结果。如果结果不满意,我们可能需要调整还原参数(模型顺序,算法,错误界限等)。

example: A Model for Rigid Body Motion of a Building

在此示例中,我们将简化方法应用于洛杉矶大学医院建造的模型。该模型取自Slicot Working Note 2002-2,“ Y. Chahlaoui和P.V.的基准示例集合,用于减少线性时间不变动力系统”。门。它有八层,每个楼层都有三个自由度 - 两个位移和一个旋转。我们使用48状态模型代表这些位移中任何一种的输入输出关系,其中每个状态代表位移或其变化速率(速度)。

让我们加载示例的数据:

加载buildingdata.mat

examining the Plant Dynamics

让我们首先分析模型的频率响应:

bode(G) gridon

图包含2个轴对象。轴对象1包含类型行的对象。该对象表示G。Axes对象2包含类型行的对象。该对象代表G。

图1:BODE图分析频率响应

从模型的频率响应中观察到,系统的基本动力学在于3至50弧度/秒的频率范围。幅度下降的低频和高频范围。我们的目标是找到一个低阶模型,该模型将信息内容保留在此频率范围内的准确性水平。

计算Hankel单数值

要了解可以安全丢弃模型的哪些状态,请查看模型的Hankel单数值:

hsv_add = hankelsv(G); bar(hsv_add) title(“模型的Hankel单数值(G)”);Xlabel(“状态数”)ylabel('单数值(\ sigma_i)')l一世ne([10.5 10.5],[0 1.5e-3],'Color',,,,'r',,,,'linestyle',,,,' - ',,,,'linewidth',1)文本(6,1.6e-3,'10个主要国家。”

图包含一个轴对象。带有标题hankel单数值的轴对象(g)包含3个类型bar,line,text的对象。

图2:Hankel singular values of the model (G).

Hankel单数值图表明该系统中有四个主要模式。但是,其余模式的贡献仍然很重要。我们将在10个状态下绘制这条线,然后丢弃其余的线以找到10阶还原模型gr最好近似原始系统G

Performing Model Reduction Using an Additive Error Bound

The function减少是工具箱中所有可用的模型还原例程的网关。我们将使用默认的Square-root Balance Truncation('BalancMr')选项减少一个s the first step. This method uses an "additive" error bound for reduction, meaning that it tries to keep the absolute approximation error uniformly small across frequencies.

%计算第10阶还原模型(默认情况下使用BalancMr方法)[gr_add,info_add] = redain(g,10);% Now compare the original model G to the reduced model Gr_addbode(G,'b',gr_add,'r')gridon标题('Comparing Original (G) to the Reduced model (Gr\_add)') 传奇('g -48州原始',,,,'Gr\_add - 10-state reduced',,,,'地点',,,,'东北'

图包含2个轴对象。轴对象1包含2个类型行的对象。这些对象表示G -48状态原始,gr \\ _添加-10态减少。轴对象2包含2个类型行的对象。这些对象表示G -48状态原始,gr \\ _添加-10态减少。

Figure 3:Comparing original (G) to the reduced model (Gr_add)

使用乘法误差绑定进行模型降低

从图3中的Bode图中可以看出,还原模型可以很好地捕获30 rad/s以下的共振,但是低频区域(<2 rad/s)的匹配很差。同样,还原模型不会在30-50 rad/s频率范围内完全捕获动力学。低频下大误差的可能解释是模型在这些频率下的增益相对较低。因此,即使在这些频率下的大错误也对总体错误几乎没有任何贡献。

To get around this problem, we can try a multiplicative-error method such asBSTMR。该算法强调相对错误,而不是绝对错误。因为相对比较在接近零时无效,所以我们需要添加最小增益阈值,例如,通过添加进料增益d到我们的原始模型。假设我们不担心-100 dB以下的收益的错误,我们可以将进料设置为1E -5。

gg = g;gg.d = 1e-5;

现在,让我们看一下乘法(相对)错误的单数值(使用的“使用”选项的“多”选项Hankelsv

hsv_mult = hankelsv(GG,'mult');bar(hsv_mult)标题('Multiplicative-Error Singular Values of the Model (G)');Xlabel(“状态数”)ylabel('单数值(\ sigma_i)'

图包含一个轴对象。The axes object with title Multiplicative-Error Singular Values of the Model (G) contains an object of type bar.

Figure 4:模型的乘法 - 错误奇异值(g)

26阶模型看起来很有希望,但是为了与先前的结果进行比较,让我们坚持减少第10阶。

% Use bstmr algorithm option for model reduction[Gr_mult,info_mult] = reduce(GG,10,'algorithm',,,,'bst');%现在将原始模型G与简化的模型GR_Mult进行比较bode(g,gr_add,gr_mult,{1e-2,1e4}),网格on标题(“将原始(g)与简化模型进行比较(gr \ _add和gr \ _mult)') 传奇('g -48州原始',,,,'Gr\_add (balancmr)',,,,'Gr\_mult (bstmr)',,,,'地点',,,,'东北'

图包含2个轴对象。轴对象1包含3个类型行的对象。这些对象表示G -48状态原始,gr \\ _ add(balancmr),gr \\ _ mult(bstmr)。轴对象2包含3个类型行的对象。这些对象表示G -48状态原始,gr \\ _ add(balancmr),gr \\ _ mult(bstmr)。

Figure 5:比较原始(G)与还原模型(GR_ADD和GR_MULT)

通过乘法方法,即使在低频下,原始模型和还原模型之间的拟合也要好得多。我们可以通过比较步骤响应来确认这一点:

步骤(g,gr_add,gr_mult,15)百分比的响应直到15秒传奇('G: 48-state original ',,,,'Gr\_add: 10-state (balancmr)',,,,'Gr\_mult: 10-state (bstmr)'

图包含一个轴对象。轴对象包含3个类型行的对象。这些对象表示G:48状态的原始,gr \\ _ add:10-state(balancmr),gr \\ _ mult:10-state(bstmr)。

Figure 6:三个模型的步骤响应

验证结果

All algorithms provide bounds on the approximation error. For additive-error methods likebalancmr,近似误差是通过误差模型的峰值(最大)增益来衡量的G粒一个cross all frequencies. This peak gain is also known as the H-infinity norm of the error model. The error bound for additive-error algorithms looks like:

G - G r 一个 d d 2 一世 = 1 1 4 8 σ 一世 = e r r o r b o n d

where the sum is over all discarded Hankel singular values ofG(条目11至48hsv_add)。We can verify that this bound is satisfied by comparing the two sides of this inequality:

norm((G-Gr_add,inf)% actual error
ANS = 6.0251E-04
%理论约束(存储在“信息”的“错误”字段中|降低|返回的%结构|)info_add.errorbound
一个ns = 0.0047

For multiplicative-error methods such asBSTMR,近似误差是通过相对误差模型频率跨频率的峰值增益来衡量的g \(g greduse)。错误绑定看起来像

G - 1 (( G - G r m l t 一世 = 1 1 4 8 (( 1 + 2 σ 一世 (( σ 一世 + 1 + σ 一世 2 - 1 = e r r o r b o n d

在废弃的位置m你lt一世plicative汉克尔单数值由Hankelsv((G,,,,'mult')。同样,我们可以将这些界限与简化模型进行比较gr_mult

norm((GG\(GG-Gr_mult),inf)% actual error
一个ns = 0.5949
% Theoretical bound一世nfo_mult.ErrorBound
一个ns = 546.1730

Plot the relative error for confirmation

bodemag(gg \(gg-gr_mult),{1e-2,1e3})网格on文本(0.1,-50,'峰值增益:-4.6 dB(59%)在17.2 rad/s')标题('Relative error between original model (G) and reduced model (Gr\_mult)'

图包含一个轴对象。轴对象包含2个类型行的对象,文本。该对象表示Untitled1。

Figure 7:Relative error between original model (G) and reduced model (Gr_mult)

从上面的相对误差图中,在17.2 rad/s时有多达59%的相对误差,这可能比我们愿意接受的要多。

选择兼容的最低订单和所需的精度水平

提高准确性gr_mult,,,,we'll need to increase the order. To achieve at least 5% relative accuracy, what is the lowest order we can get? The function减少can automatically select the lowest-order model compatible with our desired level of accuracy.

% Specify a maximum of 5% approximation error[Gred,info] = reduce(GG,“错误类型”,,,,'mult',,,,'Maxerror',,,,0.05); size(Gred)
具有1个输出,1个输入和35个状态的状态空间模型。

该算法选择了一个34州降低的模型gred。将实际误差与理论界限进行比较:

norm((GG\(GG-Gred),inf)
一个ns = 0.0068
一世nfo.ErrorBound
ANS = 0.0342

查看相对误差幅度作为频率的函数。以较大的模型顺序为代价(从10到34)实现了更高的精度。请注意,实际最大误差为0.6%,远低于5%目标。此差异是该功能的结果BSTMR你sing the error bound rather than the actual error to select the order.

bodemag(GG\(GG-Gred),{1,1e3}) gridon文本(5,-75,'峰值增益:-43.3 dB(0.6%)在73.8 rad/s'时)标题('Relative error between original model (G) and reduced model (Gred)'

图包含一个轴对象。轴对象包含2个类型行的对象,文本。该对象表示Untitled1。

Figure 8:Relative error between original model (G) and reduced model (Gred)

比较Bode响应

bode(G,Gred,{1e-2,1e4}) gridon传奇('G - 48-state original',,,,“gre - 34-state减少”

图包含2个轴对象。轴对象1包含2个类型行的对象。These objects represent G - 48-state original, Gred - 34-state reduced. Axes object 2 contains 2 objects of type line. These objects represent G - 48-state original, Gred - 34-state reduced.

Figure 9:48状态原始模型和34态还原模型的bode图

Finally, compare the step responses of the original and reduced models. They are virtually indistinguishable.

步((G,,,,'b',gred,'r-',15)百分比的响应直到15秒传奇('G: 48-state original ',,,,'Gred: 34-state (bstmr)')文本(5,-4e-4,'Maximum relative error <0.05'

图包含一个轴对象。The axes object contains 3 objects of type line, text. These objects represent G: 48-state original, Gred: 34-state (bstmr).

Figure 10:Step response plot of the 48-state original model and the 34-state reduced model

也可以看看

|

Related Topics