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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Author Block Masks 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!