MATLAB: Statespace vs ode45

ode45statespace

When is it best to model a dynamic system using just the differential equations and ode45 solver, versus decomposing the differential equations into a statespace form (with A, B, C, D matricies). It seems as though the statespace form is significantly more powerful interms of understanding controllablity and still can give you the same information that ode45 would provide.

Best Answer

Use the differential integration solvers if you have a nonlinear system, and particularly a nonlinear system that you cannot successfully linearize. If you have a linear system, use ‘ABCD’ matrices. Also, for a linear system, you can use the expm function to integrate the ‘A’ matrix. See any book on linear control systems for guidance on that.
Related Question