How to get the nonsquare mimo system inverse using Matlab?

时间:2016-03-04 18:17:49

标签: matlab

Here I've nonsqaure mimo system 'G' with 3 inputs and 7 outputs:

A = [-6.932e-2,17.41,-36.75,0,0,0,-6.0660,-31.54,0;
    -1.435e-4,2.719e-2,-1.411e-3,3.467e-1,0,-9.380e-1,7.139e-2,-1.691e-2,0;
    -4.537e-4,1.870e-3,-2.025e-1,0,1,0,-4.688e-2,7.563e-3,0;
    -1.304e-4,-7.179,-4.916e-1,-6.172e-1,-3.689e-2,7.631e-1,0,0,0;
    2.297e-5,0,-8.667e-1,4.393e-2,-1.947e-1,-2.026e-2,0,0,0;
    1.964e-5,4.263e-2,-1.329e-2,1.233e-3,1.579e-2,-1.600e-1,0,0,0;
    0,0,0,1,1.941e-1,2.771e-1,0,6.258e-2,0;
    0,0,0,0,8.192e-1,-5.736e-1,-5.612e-2,0,0;
    0,0,0,0,6.055e-1,8.648e-1,0,2.006e-2,0]


B = [0,0,-7.560,9.067e-4;
     -6.952e-3,1.293e-2,0,0;
     0,0,-3.425e-2,-9.577e-7;
     4.249,5.989e-1,0,0;
     0,0,-1.796,0;
     -7.287e-2,-2.877e-1,0,0;
     0,0,0,0;
     0,0,0,0;
     0,0,0,0]


C = [0,-5.758e-1,0,0,0,0,0,0,0;
     0,0,0,1,0,0,0,0,0;
     0,0,0,0,0,1,0,0,0;
     0,0,1,0,0,0,0,0,0;
     0,1,0,0,0,0,0,0,0;
     0,0,0,0,1,0,0,0,0;
     0,2.719e-2,-1.411e-3,3.467e-1,0,-9.380e-1,7.139e-2,0,0]


D = [-1.298e-1,-1.610e-1,0,0;
     0,0,0,0;
     0,0,0,0;
     0,0,0,0;
     0,0,0,0;
     0,0,0,0;
     -6.952e-3,1.293e-2,0,0]

 Gss = ss(A,B,C,D)
 G = tf(Gss)

I've tried to get the inverse of G using pinv(G) but I've got this error:

Undefined function 'svd' for input arguments of type 'tf'.

Error in pinv (line 18)
[U,S,V] = svd(A,'econ');

Also I've tried to G'*inv(G*G') but the result was:

    *GT*invGGT
    ans =

      From input 1 to output...
       1:  NaN

       2:  NaN

       3:  NaN

       4:  NaN

      From input 2 to output...

...
Static gain.*

How can I get inv(G)?

1 个答案:

答案 0 :(得分:0)

您确定要使用伪逆系统吗?是系统识别吗? pinv命令仅适用于矩阵,不适用于传递函数。

我认为很明显,inv(G)完全不可能。如果输入数量不等于输出数量,您希望如何获得反函数?

现在你的问题:显然,你有7个输出,并希望找到最适合它的最小二乘解决方案。我认为它在数学上非常困难,因为没有给出状态空间系统的可观测性。 (尝试减少状态数,但即使这样,D矩阵也会引起问题。)命令

rank(obsv(Gss))

提供8,系统有9个状态。基本上,这意味着您无法观察所有状态,因此您无法推断出状态的输入。

备注:如果要证明可观察性(使用科学研究),请使用语法。 Obsv有时会出现一些数字问题。