Simscape's Slider-crank doesn't move between a min/max, instead diverges.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gianluca Mammone
am 15 Mär. 2023
Bearbeitet: Alexandre
am 5 Mär. 2024
Hello, I am having problems to understand why the simscape's slider-crank mechanism drifts like in the following picture
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1324840/image.png)
Before the slider-crank there is only a Ideal Angular Velocity Source and an inertia.
Slider-crank's parameters are:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1324845/image.png)
the translational sensor is working in absolute measurement reference.
Why is it drifiting up? How do i Constraint it to work between a min and a maximum?
Thank you for your time.
GM
0 Kommentare
Akzeptierte Antwort
Steve Miller
am 16 Mär. 2023
Can you share the model or let us see your solver settings?
I believe your model is drifting because the solver choice or solver tolerances are not appropriate for the frequency at which your system is oscillating. Try manually setting to ode23t or daessc and limit the maximum step size to make sure there are enough steps per oscillation to capture the movement.
--Steve
3 Kommentare
Steve Miller
am 16 Mär. 2023
ode45 is normally not recommended for Simscape models - it is an explicit solver, not great for systems of implicit equations. I am guessing the main reason it is working better than ode23t is because ode45 tends to choose a very small step size, and small steps always help when there is a numerical issue.
I am guessing there is something else in your model outside of Simscape that is causing this behavior. I am glad you have a way forward for the moment, but I would normally not recommend using ode45 with Simscape models.
--Steve
Alexandre
am 5 Mär. 2024
Bearbeitet: Alexandre
am 5 Mär. 2024
Hi Steve, I encounter the same issue that Gianluca mentionned, for a simple slider-crank model, and in a more complex multi-physic model.
I tried to reduce the max step size of the solver, to change the solver, but my slider-crank doesn't behave as expected. The oscillations representing the stroke of the slider are moving upward, reaching the maximum absolute stroke I specified (200 mm in my case) :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1635556/image.png)
Is there any other solution than modifying the solver configurations ?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Troubleshooting finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!