Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between a Simulink library and a model reference

Tags:

simulink

What are (If there are) the differences between a Simulink library and a model reference. There's advantadges in using either of them in different situations?

like image 323
Alex Avatar asked Aug 16 '11 16:08

Alex


People also ask

What is model reference in Simulink?

A model reference is a reference to another model using a Model block. These references create model hierarchy. Each referenced model has a defined interface that specifies the properties of its inputs and outputs.

What is a Simulink library?

Simulink, also developed by MathWorks, is a data flow graphical programming language tool for modelling, simulating and analyzing multi-domain dynamic systems. It is basically a graphical block diagramming tool with customizable set of block libraries.

How do I access Simulink library?

Open the Library BrowserIn the Simulink Toolstrip, on the Simulation tab, click Library Browser. The Library Browser opens in docked mode. If you have multiple Simulink windows open, you can open a Library Browser in each one by clicking Library Browser in the toolstrip of the respective window.


1 Answers

The main purpose of libraries and model reference are the same: facilitate the reuse of simulink models. When you work with libraries, simulink "imports" the content of the referenced models in to the main model. Sometimes, this leads to the developer dealing with gigantic models (more than 50k blocks), which can be time consuming. When you are designing a library, the lib file cannot be run. You have to "instantiate" it in the main model. On the other side, model reference deals with separated models. They are put together when you press the simulate button, but during the design time, you deal with completely separated models. With model reference, you can also select acceleration methods (it basically compiles the model) and this can't be done with libraries.

like image 144
danielmsd Avatar answered Sep 22 '22 01:09

danielmsd