Pregunta

I am trying to generate a transfer function from the state space matrices that I have. The problem is that the matrices have variables and not numeric values so I have to use symbolic variables in Matlab.

So I started with:

A =

[  -a0,    0,    0,    0,    0,    0,   a1]
[    0,  -a2,    0,    0,    0,    0,   a3]
[    0,    0,  -a4,    0,    0,    0,   a5]
[    0,    0,    0,  -a6,    0,    0,   a7]
[    0,    0,    0,    0,  -a8,    0,   a9]
[    0,    0,    0,    0,    0, -a10,  a11]
[  a12,  a13,  a14,  a15,  a16,  a17, -a18]

B =

[ b0, b1]
[  0, b2]
[  0, b3]
[  0, b4]
[  0, b5]
[  0, b6]
[  0,  0]

C = 

[ 0, 0, 0, 0, 0, 0, 1]

D = 0

I then found a method online by using

Phi=inv(s*eye(7)-A)

Where Phi is a transfer matirx. Then using

H = C * Phi * B + D

H is supposed to be the result.

However MATLAB cant handle the 7 by 7 matrix and ends up truncating the results.

Is there a better way I can achieve the Transfer Function I require?

¿Fue útil?

Solución

Take a look at this Wikipedia article on matrix inversion. When considering matrix (Is-A), it has a very special shape and you can invert it using some of the identities given in that article. All you have to do is to split it into blocks, where A is your diagonal part, B is a vertical vector on the right, C is horizontal vector on the bottom and D is a single element in the lower right corner of your matrix. The only inversions you would have to do this way are inverting A, which is diagonal and very easily invertible, and (D-C*inv(A)*B) which is a single number because your C and B are row and column vectors respectively. This can very manageably be done by hand or with symbolic toolbox.

Otros consejos

In order to be compatible with the dimension of B, your D matrix should be

D = [0 0];

Maybe the truncation of H is due to this?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top