フィルターのクリア

Simulink does messes up step sizes (and doesn't do what I tell it)

1 回表示 (過去 30 日間)
Daniel H
Daniel H 2014 年 11 月 19 日
編集済み: Joachim Kahr 2019 年 4 月 5 日
Hi all,
I want to simulate a variable-step size system. The model includes a coupler to a circuit simulator and hence transmits the current step size to the other simulator on each step.
When I run the simulation, I get errors like these on the other side:
ERROR (SIMLNK-57): [Internal] An invalid message was received from the AMS simulator: NextTimeHit must be in future, NextTimeHit=3.875e-07, lastTime=3.875e-07, now=3.875e-07
It seems that simulink makes too small time steps, probably below numerical precision so they arrive as identical numbers on the other side. Alright, so I set:
Min step size: 1000e-12
This should prevent Simulink from making too small steps. But the problem persists!
Now I just remove the coupler and observe the difference in time steps (I export "Clock" to workspace):
plot(diff(simout_time));
This is the result:
Clearly, there are steps which are below the numerical precision (3.388e-21) although I told Simulink that the minimum step should be 1e-9 !!
How can this be fixed?
PS: Taking a fixed-step solvers works as expected but this is not what I want.
  1 件のコメント
Joachim Kahr
Joachim Kahr 2019 年 4 月 5 日
編集済み: Joachim Kahr 2019 年 4 月 5 日
Has anyone found a solution to this problem?
I face the same problem and are not sure if this problem is only simulink related or if the communication over the socket leads to this problems.
KR,
Joachim
edit: setting the sample time of the coupler to a fixed step size is kind of a workaround as the min step size of the simulator does not affect the step size inherited from the coupler. anyway, this is a tradeoff between simulation time and accuracy....

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeConfigure Simulation Conditions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by