0
votes

As we know, a level 2 Matlab S Function has a command to accquire the next hit time for its block like:

block.NextTimeHit = block.CurrentTime + deltaT;

What's the relationship between the time step size of an individuell block and that of the system. I mean what would happen, if the system has a larger sample time step than what the block has? In my opinion, the solver would never let it happen, because the solver probably detect the block.NextTimeHit from every block for every iteration and make sure that the current system.NextTimeHit is smaller than every block.NextTimeHit. So there is no sample from blocks missed.

1

1 Answers

1
votes

You won't miss any required sample times. When using a fixed step solver, Simulink checks that all blocks allow the fixed-step size to be used, and if not will throw an error. When using a variable step solver (required in the situation you specifically ask about) then Simulink guarantees that it will take a time step at the required time.