sldiagnostics counts subsystems which are not visible

1 vue (au cours des 30 derniers jours)
Philipp Wälchli
Philipp Wälchli le 16 Mai 2019
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 commentaires
Arvind Sathyanarayanan
Arvind Sathyanarayanan le 29 Mai 2019
Modifié(e) : Arvind Sathyanarayanan le 29 Mai 2019
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 le 1 Juin 2019
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.

Connectez-vous pour commenter.

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 29 Mai 2019
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 commentaires
Fangjun Jiang
Fangjun Jiang le 3 Juin 2019
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 le 3 Juin 2019
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?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Configure and View Diagnostics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by