Please how can I solve this using StateSpaceModel.
eqns := {(lp \[Theta]''[t]) + m g Sin [\[Theta][t]] + c \[Theta]'[t] - Sin [\[Theta][t]] y0''[t] == 0}; Please how can I solve this using StateSpaceModel.
eqns := {(lp \[Theta]''[t]) + m g Sin [\[Theta][t]] + c \[Theta]'[t] - Sin [\[Theta][t]] y0''[t] == 0}; StateSpaceModel is a linear representation. It will throw away nonlinear terms.
eqns = {lp θ''[t] + m g Sin[θ[t]] + c θ'[t] - Sin[θ[t]] y0''[t] == 0}; StateSpaceModel[eqns, {θ[t], y0[t]}, {}, {θ[t], y0[t]}, t] NonlinearStateSpaceModel can handle nonlinear terms, but it doesn't support descriptor systems yet. For now, we have to use an internal function as shown here.
{{f, h, e}, x} = Control`DEqns`nonaffinestatespaceForm[eqns, {{θ[t], 0}, {y0[t], 0}}, {}, {θ[t], y0[t]}, t, #[[1 ;; 2]] &, DescriptorStateSpace -> True]; The state space equations are in the form $e.x'==f$.
x {e.D[x, t], Table["==", 4], f}//Transpose // TableForm