sldiagnostics counts subsystems which are not visible

조회 수: 5 (최근 30일)
Philipp Wälchli
Philipp Wälchli 2019년 5월 16일
댓글: Philipp Wälchli 2019년 6월 3일
Hi there
I am modelling a PV system with 3 cells in series and 2 cells in parallel. I am interested in analysing the performance of my model, as I intend to go on large-scale for the purpose of my studies (i.e. 50x40). As such, I used "sldiagnostics" to see where my model spends most of its time. I have two particular question regarding the diagnostics of my model (can be downloaded from my dropbox here; I am sorry for the messy model, I have removed the subsystems in order to understand the diagnostics better, see question 2 below).
  • What is the compile process "Cstat 33 = Pre-compile post-eval notifies" doing? It seems that this is the bottleneck of the computation time of my model.
  • I can see there are are 51 Subsystems counted, but there are no subsystems added by me to the model. What kind of subsystems are those? Where can I find them?
Thank you all for your contribution and help!
  댓글 수: 3
Arvind Sathyanarayanan
Arvind Sathyanarayanan 2019년 5월 29일
편집: Arvind Sathyanarayanan 2019년 5월 29일
Philipp, I don't have 2018b hence, I'm not able to open your model.
The subsytems could be the built-in library blocks that you're using in your model, many of them are modelled as subystems with masks on top. I'm not sure about the compile process, that would be question for the Mathworks support team.
Have you tried using the performance advisor tool in simulink to improve your models performance?
Philipp Wälchli
Philipp Wälchli 2019년 6월 1일
Hi Arvind - thank you for sharing your thoughts. Actually, I have used the performance advisor tool quite intensively and was able to reduce the compilation time already. But still, it is not in an acceptable range, that's why I posted my question.

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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2019년 5월 29일
When Simulink compiles or updates the model, it went through many steps. I have a guess on what "Pre-compile post-eval notifies" means but there is no document for it. I would think it is related to "Cstat2: Pre_Compile" and "Cstat26: Evaluate block parameters and model args".
Run the following command to find all the subsystem blocks
find_system(ModelName,'FollowLinks','On','LookUnderMasks','all','blocktype','SubSystem')
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2019년 6월 3일
If you are using Simulink blocks which contain many masked subsystems, don't worry about it. The number of subsystem blocks is unlikely be the factor of slow down.
The a few seconds compilation time would not be a big factor if you run simulation for 50x40 cells for a period time. I would suggest you run a simulation and then use profiler to improve somewhere else.
The only thing I can think of that is related to compilation time for your case that you might consider is Model Reference. Search in document for Model Reference and pay attention to its benefit regarding compilation time.
Philipp Wälchli
Philipp Wälchli 2019년 6월 3일
That's great to know, thank you for pointing this out. I did already use Model Reference but was only able to create a model reference for the whole model as physical connections are not allowed to cross reference's borders. After I did so and run the simulation again, the compilation time took even longer (don't ask me why...). That's why I rejected the idea again - or did I miss an important aspect here?

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

카테고리

Help CenterFile Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by