Different results for Simulink's External and Normal mode!

1 回表示 (過去 30 日間)
John
John 2014 年 8 月 21 日
コメント済み: John 2014 年 8 月 22 日
In Real-Time Windows Target (Simulink), a simple DC motor model works fine in Normal mode (unit step input), but becomes unstable and blows up (10^301) in External mode. I've noticed that a time step size of 1e-3 causes blowup while 1e-4 does not. Why? They should behave the same.

回答 (1 件)

Jan Houska
Jan Houska 2014 年 8 月 22 日
The behavior you describe is most likely not because of External or Normal mode. It looks like the cause is a different ODE solver used in each of the modes. Namely, you can use a variable-step solver in Normal Mode, but it is necessary to use fixed-step solver in External Mode. And it looks like the fixed-step solver is not able to solve your system at your selected fixed time step of 1e-3. The fact that reducing the time step to 1e-4 helps only supports this theory.
To verify, please try to simulate your model in Normal Mode with exactly the same solver settings - fixed step, 1e-3. I would expect you to see the same unstable behavior too.
  1 件のコメント
John
John 2014 年 8 月 22 日
Interesting idea, could be. I tried running both Normal/Ext modes, and looked at the Config Params, and both are set to Fixed Step.

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

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by