Is there a simulation speed difference between subsystem and model block? and What's the best way to set and handle parameters?

1 次查看(过去 30 天)
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

采纳的回答

Nirmal Gunaseelan
Nirmal Gunaseelan 2012-1-25
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 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by