How to reduce number of solver resets with Simscape Multibody Contact Force Library?

조회 수: 12 (최근 30일)
I've been using the solver profiler tool to see how I can speed up my simulation, and it gives me warning that my simulation has a dense group of solver exceptions and zero crossings (which create solver resets and slow down my system). With the contact force library blocks, I have turned on damping and set the damping factor to be very high - the objects look like they stick upon contact, instead of bouncing. However, in the profiler it is clear that the objects are simply bouncing infinitesimally while in contact with each other. Is there another way to stop the bouncing from happening, or another block type/library I should be using instead to model contact?

답변 (1개)

Steve Miller
Steve Miller 2019년 4월 2일
Hi - it will take some trial and error to find settings that will result in fast simulation. You will need to adjust stiffness, damping, solver type, and solver tolerances. Guidelines are given in the documentation for the Simscape Multibody Contact Forces LibrarySimscape Multibody Contact Forces Library, but those are generic starting points and you will need to tailor it to your system.
Here are some suggestions:
  1. Try ode23t and see if it does better than ode15s. I do not recommend using ode45, and note that the "auto" setting for the solver will often select ode45.
  2. Try making the solver tolerances 10x smaller or 10x larger (start with Relative Tolerance 1e-4, Absolute tolerance 1e-5)
  3. Make your stiffness and damping really soft and within a factor of 10 of each other. Then, gradually increase the stiffness and damping together until you get good behavior.
  4. Make sure you are using the right number of contact forces. Generally, a plane is defined by 3 points - if you have many more, you will create lots of additional zero crossings.
  5. You can run the model until it settles, then save that state of the model to the workspace and restart from there. See https://www.mathworks.com/help/simulink/gui/initial-state.html
The solver profiler will help you, but for problems of this nature it is mainly useful to help you evaluate if your current settings are better or worse than the previous test you ran, rather than pointing to the solution.
--Steve
  댓글 수: 1
Atif Laiche
Atif Laiche 2021년 3월 31일
Dear sir Steve Miller,
i'm working now with your contibution wich is about Flexible Body from Finite Element Data, i changed your beam structure by simple exctuded wing strcuture, i extracted mass and stiffness matrices from ansys workbench FE Software and saved my structure as a STL format file. Now, i'm discontinued in your exemple beamFE_3fr10m.M or beamFE_3fr10m.K, i kow that this matrices were reduced by Craig-bamptom Method, plz explain me how did you get it because i repeat your model and extract [K] and [M] by i did not have the same values like yours. plz explain me about 18 static mode and 10 dynamic mode. Thanks in andvance

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

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by