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]"}}]