As a supplementary to my question Calculate state-space model from dynamic equations, I have mixed linear and nonlinear dynamic equations, and want to linearize the nonlinear ones around an opperating given point, and keep the linear differential equations as it is, and finally calculate the state space model. For this, I use the NonlinearStateSpaceModel command first to establish the equations for each state separately and then use JacobianMatrix command to calculate the final linearized state space matrix around an opperating point which is 1 in this case. as a simple example:
JacobianMatrix[1, NonlinearStateSpaceModel[Equal @@@ Flatten[Solve[ Eliminate[{a[t] == b1 + c *x1''[t],
b2 == e *(x2[t] - y[t]) +
f *(x2'[t] - y'[t]) +
d *x2''[t],
g*y''[t] + e*(y[t] - x2[t]) + f*(y'[t] - x2'[t]) + m*L == 0,
n *z''[t] == m - R, a1 == b3 + c1*alfa1''[t],
b4 - d1*L1*sin (alfa2[t]) - n2*x3''[t]*L1*sin (alfa2[t]) ==
r1*alfa2''[t], d1 == M1*x4''[t], b1 == b2, y[t] == z[t]/L,
y'[t] ==
z'[t]/L, y''[t] == z''[t]/L, x2[t] == x1[t],
x2'[t] == x1'[t], x2''[t] == x1''[t], alfa1[t] == alfa2[t],
alfa1'[t] == alfa2'[t], alfa1''[t] == alfa2''[t],
x3[t] == z[t], x3'[t] == z'[t], x3''[t] == z''[t],
x4''[t] ==
x3''[t] + L1*alfa2''[t]*sin (alfa2[t]) +
L1*(alfa2'[t])^2*cos (alfa2[t]), b3 == b4}, {b1, b2, x2[t],
x2'[t], x2''[t], y[t],
y'[t], y''[t], m, x3[t], d1, b3,
b4, x3'[t], x3''[t], alfa2[t], alfa2'[t], alfa2''[t], x4[t],
x4'[t], x4''[t]}], {x1''[t], z''[t], alfa1''[t]}]],
{{x1'[t], 0}, {x1[t], 0}, {z'[t], 0}, {z[t], 0}, {alfa1'[t], 0},
{alfa1[t], 0}}, {{a[t], 0}}, z'[t], t]]
which gives an answer for NonlinearStateSpaceModel but the Jacobian part is not working. Other solutions for this kind of example are welcome. (all commands should be in one line code)
StateSpaceModel
is the function you are looking for. There are probably issues with the set of equations you are passing onto the first argument ofStateSpaceModel
. If that is correct, probably you will get the results you are expecting. $\endgroup$