The simulink simulation slows down when I use a switch, it does not give any error but it stays at .5 second indifinitely!

조회 수: 6 (최근 30일)
I am trying to select one output from two blocks depending on certain conditions, and then forward that signal as input to another block, but the simulation almost comes to a standstill and I also get no error. What could be the problem?

답변 (2개)

A Jenkins
A Jenkins 2015년 2월 10일
편집: A Jenkins 2015년 2월 10일
You have not chosen the correct solver for your application.
You will need to use Simulation->Model Configuration Parameters->Solver to adjust your solver types, tolerances, and/or step sizes to account for the stiffness of the switch.

Jesse
Jesse 2025년 11월 27일 17:09
편집: Jesse 2025년 11월 27일 17:09
The solution of changing the solver parameters didn't work for me, but I found a workaround :
instead of using the manual switch block, I use the signal compare switch connected to a constant controlled by a push button.
I think the manual switch block is simply broken so I will avoid it in the future.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by