Simulation step size in simulink is very small and takes really long to run. Unable to solve it
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Suhas Raghavendra Kulkarni
el 20 de Sept. de 2023
Comentada: Sam Chak
el 21 de Sept. de 2023
Hello, I am trying to model the interaction between a robotic structure and a human hand. Here's a brief description of my system. All the blocks in yellow represent my robot and associated FK equations while the blocks in blue represent my human hand model and corresponding FK equations. I have a constraint in that I cannot model the dynamics directly and need to use only a second order model to approximate the behavior. Further, the robot and the Human are coupled by a large stiffness and the corresponding interaction force is recorded. It is a 1 dof robot coupled to a 1 dof human joint.
In the image below X=[f1(q),f2(q),f3(q)]^T; X_h=[f4(q_h),f5(q_h),f6(q_h)]^T; J_MM=[f7(q),f8(q),f9(q)]^T;J_h_t=[f10(q_h),f11(q_h),f12(q_h)]^T;
Now for the problem I'm having: The simulation step size is automatically chosen to be extremely small (order of e-5). all my FK and Jacobian equations are simple algebraic equations in a single variable and when i evaluate them in matlab, I am able to run 10000 evaluations (using a for loop) in 0.05s.
I am very new to simulink and do not have much experience. so any help regarding how I can solve this is very much appreciated!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1487997/image.png)
![HEBI Block](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1488002/HEBI%20Block.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1488007/image.png)
0 comentarios
Respuestas (1)
Sam Chak
el 20 de Sept. de 2023
It's not bad for a beginner in Simulink to create a rather sophisticated model using mostly user-defined MATLAB Function blocks and feedback loops. If the Simulink model takes a long time to run, open the Model Configuration Pane: Solver and select the ode15s solver.
2 comentarios
Sam Chak
el 21 de Sept. de 2023
Some sophisticated systems take longer to simulate. If you identify that your system is stiff, then change the solver to ode15s.
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!