控制工具箱:函数 minreal 在 Matlab 中如何工作?
Control Toolbox: How does the function minreal work in Matlab?
我对 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(状态数)。
我的错误在哪里?
非常感谢。
从概念上讲你是对的,因为最小的实现是可控和可观察的。但是,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 for an example of how to use it with 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
我对 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(状态数)。
我的错误在哪里? 非常感谢。
从概念上讲你是对的,因为最小的实现是可控和可观察的。但是,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 for an example of how to use it with 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