问题
I am running a simulation that contains among other things a subsystem (or referenced model) that is a simulation by itself and that needs to be run fully at certain times before resuming the main simulation.
Basically, at time t the main simulation needs the outputs of the subsystem. The subsystem is then triggered and runs a simulation for 6 seconds (the subsystem simulation is time dependent). Then the main simulation uses the outputs of the subsystem. The problem here is that when the main simulation resumes, it should resume at time t+ts (sampling time) and not t+6s... So the subsystem should run on a kind of virtual clock.
Is this somehow possible? If not, what are the alternatives?
Thanks in advance for your help!!!
Fabien
回答1:
I realize that I never gave feedback about my attempts. I'll do it now: the solution I found was to replace my simulation subsystem by a Matlab Function block that runs/calls the referenced model as a simulation independent of the main simulation. This works perfectly fine!
来源:https://stackoverflow.com/questions/23608436/simulink-how-to-run-a-simulation-in-a-simulation