Can referenced models use frame-based processing?
2 次查看(过去 30 天)
显示 更早的评论
I'd like to create one sub-system (filter) that is copied to several channels, and only need to edit one filter. The most straightforward way that I see to do this is create a model, then reference it using the model block. I'm doing signal processing with frame-based signals. When I don't reference a model (a digital filter) the block diagram works fine. When the model is referenced via a model block, however, I get an error indicating that a block is expecting a sample based signal.
Do model blocks support frame-based processing? Or do I need to use buffer/unbuffer stages? If so, does buffering/unbuffering slow down my simulation substantially? Any guidance would be appreciated!
0 个评论
回答(1 个)
Ryan G
2012-9-25
I tried this and had no issues, but I think the workflow is causing a hangup for you.
Try this:
1) Create the 'model' as a subsystem inside the main mdl file. Do not use the model block directly.
2) Make the subsystem atomic with -1 sample time. (do this in block parameters)
3) Right-click convert to model block.
This process will create a model block that carries over the parameters, sizes etc of the original model. It will keep thinks simpler, in my opinion. If you want to continue your workflow I believe you need to set the inports and outports of the model file that is being referenced to be frame-based instead of sample based.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Component-Based Modeling 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!