I am modeling a mechanical system using Lagrangian dynamics. The system is nonlinear and coupled.
I am trying to find the numerical solution to the equations of motion of such system.
My approach is as follows:
- Write the N nonlinear coupled equations of motion as symbolic expressions. These are functions of the N generalized coordinates and their first and second time derivatives.
- Solve for the N second derivatives using the solve command to obtain N second order ODE’s.
- Transform the system to obtain 2N first order ODE’s.
- Use ode45 to integrate the equations and obtain the solution to initial conditions.
This approach does work very well when dealing with “small and simple” systems. Still, as the order of the system and its complexity in terms of coupling and nonlinearity increases, the step involving using the built-in solve function becomes impracticable; Matlab keeps busy indefinitely and does not give an output.
Does anyone have any suggestions concerning modeling and simulating large nonlinear coupled mechanical systems?
I appreciate any help you can provide.