控件工具箱:函数minreal如何在Matlab中工作?

时间:2015-12-05 17:14:32

标签: matlab controls

我对Matlab中的“minreal”函数有疑问。在Matlab的帮助下,我假设输出是系统的最小实现。据我所知,它意味着输出函数是可观察和可控的。

示例:

num = [ 6.40756397363316, -4511.90326777420, 7084807.91317081, -3549645853.18273, 2307781024837.00, -761727788683491, 2.26760542619190e+17, -1.54992537527829e+19, 5.58719150155001e+21 ];
den = [ 1, 824.614362937241, 1036273.19811846, 592905955.793358, 319582996989.696, 106244022544031, 2.87990542333047e+16, 2.36284104437760e+18, 3.50241006466156e+20, 0];
G = tf(num,den);
G_min = minreal(ss(G));

但这不是最低限度的实现:

>> size(G_min)
State-space model with 1 outputs, 1 inputs, and 9 states.
>> rank(obsv(G_min))
ans =     6
>> rank(ctrb(G_min))
ans =     5

很明显:rank(obsv(G_min))!= rank(ctrb(G_min))!= 9(状态数)。

我的错误在哪里? 非常感谢你。

1 个答案:

答案 0 :(得分:2)

从概念上讲,你是正确的,因为最小的实现是可控的和可观察的。但是,minreal并不能保证这一点。按照文档:

Pole-zero cancellation is a straightforward search through the poles
and zeros looking for matches that are within tolerance. Transfer functions
are first converted to zero-pole-gain form.

也就是说,minreal只是稍微无意识地搜索极点和极点 零相互关闭,并且不保证结果 满足任何其他条件。请注意,在您的情况下,您可以指定一个 更大的容忍度和更多的状态将被消除,

>> G_red = minreal(G,10)

G_red =

      6.408 s + 74.87
  ------------------------
  s^2 + 625.7 s + 1.703e05

Continuous-time transfer function.

你会得到更接近你期望的东西。

或者,你很可能最好转变为平衡的实现并决定消除自己的状态。请参阅balreal的文档,了解如何与modred一起使用它来实现此目的。

您可能还会注意obsv的文档,其中明确指出您不应相信其结果以外的其他任何问题:

obsv is here for educational purposes and is not recommended for serious control design.
Computing the rank of the observability matrix is not recommended for observability testing.
Ob will be numerically singular for most systems with more than a handful of states.
This fact is well documented in the control literature. For example, see section III in
http://lawww.epfl.ch/webdav/site/la/users/105941/public/NumCompCtrl.pdf