I am working on a large simulation model under Matlab/Simulink. I am investigating the ability to do the Simulink model parametrization via data dictionaries (DD). The main purpose of the Simulink model is Monte Carlo investigations of certain parameters.
In this context the following questions arose:
1. DD and base workspace:
a.) A Simulink model “a.slx“ is linked to a DD “a.sldd“. Does this Simulink model „search“ their model parameters/bus objects/configuration parameters ONLY in the DD or can parameters be defined in the base workspace in parallel? That means: is it mandatory that all model parameters/bus objects/configuration parameters are defined in “a.sldd”?
b.) I assume the simulink model takes ONLY the parameters from the corresponding DD (here “a.sldd”). In this case it should be possible to have the same parameters in the base workspace and in the DD without any influence or corruption. I did this but I got the error message:
The symbol 'cfg_1' has more than one Definition
- 'cfg_1' is defined in data dictionary 'aerodynamic.sldd'
- 'cfg_1' is defined in the base Workspace
So my question: it is apparently not possible to have a “hybrid” parameter concept, which means it is not possible parametrize the model via base workspace AND DD variables?
2. Simulink model “a.slx” is linked with DD “a.sldd”. Simulink model “b.slx” is linked with DD “b.sldd”. Both models are referenced (via model referencing) in a parent model on the upperst model hierarchy. The output of model “a.sldd” constitutes the input of model “b.sldd” and is a bus (“a_bus”) defined via a bus object “a_bus_obj” in “a.sldd”. Since the bus is entering model “b.sldd” is it mandatory to define the bus object also in the DD “b.sldd”?
3. We assume the same architecture as in 2. In both models “a.slx” and “b.slx” exists a parameter “mass“. In both models the variable “mass” has a different value. Since both models are on the same top level of the parent model, I would assume that this wouldn’t result in an error. But Simulink throws an error stating that it is not possible. So, my question: is it in general not possible to use the same variable in two DD with different values?
Please contact me if you have further questions. Thanks a lot for all your help.
Best Answer