I want to run two simulink model in parallel in such a way that they have same simulation time at any instant. Both model have same fixed step size (Fundamental sample time). Both models have different configuration parameter. Is there any way to do it?
2 Answers
I would put both models in a top-level model as referenced models, e.g.:
This will ensure that both models have the exact same simulation time at any instant. More on model referencing in the Simulink documentation.
8 Comments
Ranjan
When you are putting two models in top level model as refrenced models, their configuration parameter should be same. But My requirement says that models have diff configuration parameter e.g Hardware Implementation parameter is different.
am304
@Ranjan That's not true. You need to use
configsets and attach the relevant configset to each referenced model. See Simulink Model Referencing Requirements in the doc for more details.Ranjan
Hi @am304 I attached corresponding configsets to the model then tried ruuning them But I am getting below error of Hardware parameter mismatch (I used TI hardware for one model and Generic for others). Error in Model block 'Ranjan_Test/Subsystem': the hardware settings must match between the parent model 'Ranjan_Test' and the referenced model 'Subsystem'. These values can be changed on the 'Hardware Implementation' page of the Configuration Parameters dialog.
am304
@Ranjan Yes, one of the requirements in the doc I mentioned in my previous comments says "Values must be the same for top and referenced models" for Hardware Implementation. Have you read the doc?
Ranjan
Yes I read it, that means I can't implement what I wrote above in my query in your suggested way?
|
If you need to run two paraller simulations you can check this Matlab site: http://www.mathworks.com/help/simulink/ug/running-parallel-simulations.html. Matlab have many guides for their users.
