I'm trying to get the transfer function of a system from the State Space representation. It is given by $h(s)=C(sI-A)^{-1}B$ with I the identity matrix. Then I want to find the poles, so the idea is to take the denominator of the above expression and equal that to zero and solve for s. But, when I try to get the denominator, Mathematica just returns 1 when obviously the denominator is way more complicated. Then, I can't solve the equation.
AA = {{-64.383, 0, -22.35, -18.0965, 18096.5}, {0, 0, 27.65, -68.0965,
18096.5}, {1788, -2212, 0, 149, -149999}, {0, 4000, 0, -333.333,
0}, {0, 0, 0, -0.1, 0}};
BB = {{180.965}, {180.965}, {-1490}, {0}, {1}};
Ce = {{0, 0, 0, 1, 0}};
SI = s IdentityMatrix[5];
NSolve[Denominator[FullSimplify[Ce.Inverse[(SI - AA)].BB]] == 0, s]
Denominator[Ce.Inverse[(SI - AA)].BB]
Denominator
will only find a syntactically explicit denominator in a product expression containing factors to negative powers. So could doDenominator[Together[Ce.Inverse[(SI - AA)].BB]]
. $\endgroup$ – Daniel Lichtblau Oct 15 '17 at 20:16Together
with approximate coefficient expressions is dicey. Much more reliable, sually, is to rationalize first. There are exceptional cases where this is a bad idea e.g. due to speed loss. $\endgroup$ – Daniel Lichtblau Oct 15 '17 at 20:17In[15]:= Denominator[ Together[Ce.Inverse[Rationalize[SI - AA]].Rationalize[BB]]] Out[15]= {{2701600775379900000 + 67611605554033051 s + 229709204831000 s^2 + 1974852892695 s^3 + 1988580000 s^4 + 5000000 s^5}}
. $\endgroup$ – Daniel Lichtblau Oct 15 '17 at 20:20