- 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!
Simulink file run in hours
20 visualizaciones (últimos 30 días)
Dr. Siva Malla el 15 de Nov. de 2012
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?
Jan el 15 de Nov. de 2012
Editada: Jan el 15 de Nov. de 2012
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:
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).