User`s guide
7 Models with Multiple Sample Rates
7-12
In transitioning from slower to faster blocks, you must add Unit Delay blocks
between slow to fast transitions and set the sample rate of the Unit Delay to
that of the slower block:
Figure 7-7: Transitioning from Slower to Faster Blocks (T = Sample Period)
The next four sections describe the theory and reasons why Unit Delay and
Zero-Order Hold blocks are necessary for sample time transitions.
Faster to Slower Transitions in Simulink
In a model where a faster block drives a slower block having direct
feedthrough, the outputs of the faster block are always computed first. In
simulation intervals where the slower block does not execute, the simulation
progresses more rapidly because there are fewer blocks to execute. The
following diagram illustrates this situation:
becomes
FasterSlower
Block Block
T=1secT=2sec
Slower
Faster
Block
T=2sec
T=1sec
Unit Delay
Block
T=2sec
t0
t1
t2 t3
Time
Faster Slower
BlockBlock
T=1sec T=2sec
T=2s T=1s
T=2s
T=1sT=1s T=1s
T=2sT=1s