You're right that model reference boundaries don't work with physical model blocks. The reason your workaround makes the simulation crash is that you're introducing what is known as an algebraic loop in Simulink.
Essentially, by adding Simulink signals at the model boundary, you're "tricking" Simulink into thinking one network's inputs are directly dependent on its outputs. This, in turn, forces Simulink to "guess" the solution through an iterative solution. Generally not a good thing to have if you can avoid it.
A better workaround in my opinion would be to change the model references to libraries. With libraries, you can still split up your design into separate files, create single-sources reusable components, etc. However, physical connection ports can be at the interfaces of library blocks.
The downside of using libraries is that, by keeping all blocks in the same physical network, they all must have the same sample time. Were you trying to run different parts of your model at different rates? If so, I'd stick with your original approach and place a Transfer Fcn block in the loop as a low-pass filter to break the algebraic loop. This requires some manual tweaking that is highly dependent on your model dynamics.
- Sebastian
Best Answer