I'm trying to put a nonlinear system of two 2nd order ODEs given by:
eqs =
{2 (k1 + k2) q1[t] - 2 k2 q2[t] + 2 c1 Derivative[1][q1][t] +
2 c2 (Derivative[1][q1][t] - Derivative[1][q2][t]) +
l1 (g m2 Sin[q1[t]] + g m3 Sin[q1[t]] +
l2 m3 Sin[q1[t] - q2[t]] Derivative[1][q2][t]^2 +
l1 (m2 + m3) (q1^\[Prime]\[Prime])[t] +
l2 m3 Cos[q1[t] - q2[t]] (q2^\[Prime]\[Prime])[t]) ==
l1 f[t] Sin[q1[t] - q2[t]],
2 k2 q2[t] + 2 c2 (-Derivative[1][q1][t] + Derivative[1][q2][t]) +
l2 m3 (g Sin[q2[t]] -
l1 Sin[q1[t] - q2[t]] Derivative[1][q1][t]^2 +
l1 Cos[q1[t] - q2[t]] (q1^\[Prime]\[Prime])[t] +
l2 (q2^\[Prime]\[Prime])[t]) == 2 k2 q1[t]}
Into a nonlinear state space formulation, which I know can be done without linearization of 2nd order terms since
Solve[eqs, {q1''[t], q2''[t]}]
returns how to isolate these double slashed variables. However, when I try to
sys = NonlinearStateSpaceModel[
eqs, {q1[t], q2[t], q1'[t], q2'[t]}, {}, {q1[t], q2[t], q1'[t],
q2'[t]}, t]
to obtain $\mathbf{\dot{x}} = f(\mathbf{x})$ (that is, to make it a 4-row system of 1st order ODEs), it won't express it in terms of undefined $m_{i},l_{i},k_{i},c_{i},g$. If I end up defining these as numerical values, I can get the desired column vector ((4,1) matrix) even if the $f(t)$ in the first equation remains an undefined function of t.
I can't see why couldn't Mathematica handle the symbolic constants, since I suppose it would do almost the same algebraic manipulations.
Is it possible? Thanks in advance.