Simulink file run in hours

조회 수: 17 (최근 30일)
Dr. Siva Malla
Dr. Siva Malla 2012년 11월 15일
댓글: Khadim Ullah Jan 2020년 7월 24일
Dear Sir,
I implemented a model in simulink, and it is in discrete (Ts= 20e-6). My model is running very slowly, I kept run time as 5, I think this is in sec. and its normal. but this is taking more than 30 minuts to complete to run. Now I want to run my model in Hours (for 24 Hours =86400 sec). Because in my model PV system is there, so I have to test this system for 24 hours base, because my input is solar irradiance. but if I kept my run time as 86400, then may be it will take couple of months to complete simulation. So please give me a suggestion or any alternate method to run my system in hours. Or please tell me is any alternate option available to run model in basis of hours?
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2012년 11월 15일
what represent you sample time

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2012년 11월 15일
편집: Jan 2012년 11월 15일
Please read your question again and imagine, that you do not have any further information. Then it gets obvious, that any answer must be based opn guessing what you are doing.
Here are some of these guesses:
  • Run the model in steps of 20e-5 will reduce the runtime by a factor of 10.
  • Can parts of the model be vectorized or parallelized?
  • Are you running Matlab/Simulink on an old Pentium4 which is low on memory? Then buy a modern i7 with Gig's of RAM and try it again.
  • Does your program write logfiles to disk and 3 installed virus scanner collide with eachother such that the disk access is the bottleneck? Then uninstall two of the scanners.
  • The bottleneck of the simulation could be much faster if you replace the most used code sections by faster C-Mex functions. When you show us the code, perhaps we find improvements.
  • When I understand correctly, you simulate 5 seconds of realtime with a fixed stepsize of 20e-6. Do you really need a fixed stepsize? An automatic stepsize control will lead to a more accurate result in most likely less processing time. Currently you accumulate the rounding errors of 1e8 steps!
I suggest to post the most time consuming part of the model and ask for accelerations (guessed speedup: factor 1 to 100). In addition try to run the code on a faster computer (guessed speedup: factor 1 to 4).
  댓글 수: 3
Jan
Jan 2012년 11월 16일
Any solution to what? We have only a rough description of you you have programmed. Therefore a specific suggestion is impossible. And there are no magic, general, but secret switches for Matalb and Simulink, which let them run with quadrupel speed.
Khadim Ullah Jan
Khadim Ullah Jan 2020년 7월 24일
I didn't understand the replies. The question is so clear though.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by