필터 지우기
필터 지우기

How to create a Referenced Model Block with variable inport dimensions?

조회 수: 2 (최근 30일)
Pascal Deppe
Pascal Deppe 2022년 5월 12일
답변: Githin George 2024년 2월 7일
I am having some severe trouble ith Simulink right now. I basically use parameterized Referenced Models for easy reusing of Model Blocks inside a larger model. However I have run into a problem:
  • Model Arguments can't be used on non-tunable parameters (like inport dimensions)
  • Variable-Sizdes signals cannot simply be created by MUXing signals together. (So using variable-sized inports is also difficult.)
  • The required dimensional information sadly gets lost at the model boundary.
A few pictures to showcase my problem:
It is easy enough to define the port dimensions inside this model. But I want this model to be reusable various dimensionalities (Maybe I want to Mux together 3 instead of 2 signals)
The math inside should be fine with any dimension and in a subsystem this should work just fine, but the model boundary makes it hard for me to create this in an easy to re-use way... . This is a problem if it comes to re-useability and modularization. This is also a topic that I would have not expected to be so difficult to implement coming from other programming languages where things like would be as easy as using a variable-length list as input.
Any tips would be appreciated.

답변 (1개)

Githin George
Githin George 2024년 2월 7일
Hello Pascal,
I understand that you would like to reuse your referenced model with different settings but is not able to because of non-tunable parameters like “Inport dimension”.
This behaviour is expected and can be seen in the model-architecture-guidelines documentation link provided below.
You can see that referenced models are context-independent with a defined boundary, so they do not inherit most signal properties.
In your case, the “Subsystem Reference” block may prove to be more helpful as it can inherit the signal properties as mentioned in the documentation below.
To know more about the “Subsystem Reference” block you can go through the below documentation link.
I hope this helps.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by