Real-Time Workshop User's Guide | ![]() ![]() |
Sample Rate Transitions
There are two possible sample rate transitions that can exist within a model:
In singletasking systems, there are no issues involved with multiple sample rates. In multitasking and pseudomultitasking systems, however, differing sample rates can cause problems. To prevent possible errors in calculated data, you must control model execution at these transitions. In transitioning from faster to slower blocks, you must add Zero-Order Hold blocks between fast to slow transitions and set the sample rate of the Zero-Order Hold block to that of the slower block.
Figure 7-6: Transitioning from Faster to Slower Blocks (T = sample period)
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 block 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.
![]() | Executing Models in Real Time | Faster to Slower Transitions in Simulink | ![]() |