Specify Models of Linear, Time-Invariant Systems in Natural Form
The linearized state-space model of an inverted pendulum is generated from the underlying equations of motion and typeset in a natural traditional form.
Wolfram Language code: StateSpaceModel[{(M + m) x''[t] - m l Sin[θ[t]] θ'[t] ^ 2 + m l Cos[θ[t]] θ''[t] == F[t], m x''[t] Cos[θ[t]] + m l θ''[t] == m g Sin[θ[t]]}, {{θ[t], 0}, {θ'[t], 0}, {x[t], 0}, {x'[t], 0}}, {{F[t], 0}}, {θ[t], x[t]}, t, SystemsModelLabels -> {"F[t]", {"θ[t]", "x[t]"}, {"θ[t]", "θ'[t]", "x[t]", "x'[t]"}}]