Is there a simulation speed difference between subsystem and model block? and What's the best way to set and handle parameters?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi all,
I am new to simulink desgin and have some question.
I am doing my first project and I want to optimize simulation speed because the model contains many components.
Right now, I have a model constructed with many other models because it seems easier that way to test seperately and make changes.
I am just wondering if having model blocks slow down simulation speed.
Second question I have is what's the best way to set parameters?
I like masking and setting parameters there because it's neat and easier to track for others who might use my model. But masking a model block has no effect on parameters inside of the block. For now, all the parameters are set in base workspace, but is there a better way to do this?
Thanks
0 comentarios
Respuesta aceptada
Nirmal Gunaseelan
el 25 de En. de 2012
Q1 - Model blocks are specifically designed to improve componentization of parent model and directly results in speed improvements. Simulink converts Model blocks to code that runs faster than normal simulation (subsystem). You're on the right track. Read up on more details here.
Q2. The mask variables you define should be present in the mask workspace. Inside the masked subsystem/block, parameters must be set to these mask variables. This is the right way to set parameters in a masked block and should resolve your issue.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!