# How to model and simulate large nonlinear coupled mechanical systems effectively?

조회 수: 2(최근 30일)
Dear community,
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:
1. 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.
2. Solve for the N second derivatives using the solve command to obtain N second order ODE’s.
3. Transform the system to obtain 2N first order ODE’s.
4. 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?

댓글을 달려면 로그인하십시오.

### 답변(1개)

Paul 2021년 7월 2일
편집: Paul 2021년 7월 2일
I think steps 2 and 3 can be replaced with:
doc odeToVectorField
If not, post a simple example to illustrate the problem.
##### 댓글 수: 1표시숨기기 없음
I agree, steps 2 and 3 can be addressed by odeToVectorField. But still, as the order of the system increases, when using odeToVectorField, Matlab also keeps busy indefinitely and does not give an output.
I'll post an illustration of the problem asap.

댓글을 달려면 로그인하십시오.

R2019a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by