Hello, I would like to simulate a switching system in simulink, i.e. a time continuous system with feedback where the output is a two level signal. The rise and fall edges time positions of the outputs are quite important for my simulations, so I'm obliged to force a maximum time step very small to get good results, but in this case the simulations become very slow (I'm using ode45 Variable step) One possibility for me could be to force small time step in particular simulation times, while relaxing it in other moments, but I don't know exactly how I can do that. Do someone have some suggestion?
BR Luca

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 12월 13일

0 개 추천

Good question! My advice is to try increasing the maximum time step limit and enable zero crossing detection at all applied blocks.

추가 답변 (1개)

Luca
Luca 2011년 12월 15일

0 개 추천

Thank you Fangjun. In fact the option was already enabled, but the signal threshold option was set to "auto", settling it to 1e-8 (but maybe I could relax this value) it's working fine. I just got few min step violations (i.e. the computed time step is too low), but the results seems good. For the moment I have let max timestep as "auto".
BR Luca

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

태그

질문:

2011년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by