Increasing simulation speed in heavy presence of ideal switches
4 ビュー (過去 30 日間)
古いコメントを表示
I have a very stiff low voltage network model with over 150 ideal switches. I have noticed that the more switches I add the more it slows down the simulation. It is impossible to run it as continuous as it makes Simulink freeze in step without any error reported so I have to do it as discrete. I use ode23tb (stiff TR-BDF2) which has proven to be the best solver and I run at 50e-5 sample time. I have tried to optimize by following advice given in Simulink online archive (changing simulation parameters and removing excess blocks in the model) but no significant improvement. I run on i7 3.0 Ghz processor and 5min simulation takes 1 hour to compute. I just wonder if there is anything else I can do or I must accept this as reality? Does this time sound normal to you given the stiffness of simulation?
Thanks.
0 件のコメント
回答 (1 件)
Joel Van Sickel
2020 年 12 月 11 日
This is being answered as part of a Matlab Answers cleanup effort:
It is not weird for a simulationg with 150 ideal switches to take a long time. This is to be expected as they increase the computational load on the system. Simulink is "freezing" Ie, because the network is so stiff, it is having to take extremely small time steps to capture accurate dynamics of the system. Your best bet would be to look at ways to replace switches with behavioral or average models where possible. Also make sure there are no algebraic loops, and look into powergui for settings to make the simulation run faster (there are optimzation options available such as ignoring snubbers)
Regards,
Joel
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Electrical Sensors についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!