cgsl_0205: Signal handling for multirate models

ID: Titlecgsl_0205: Signal handling for multirate models
DescriptionFor multirate models, handle the change in operation rate in one of two ways:
AAt the destination block, Insert a Rate Transition.
BSet configuration parameter Automatically handle rate transition for data transfer to Always or Whenever possible.
RationaleA,BFollowing this guideline supports the handling of data operating at different rates.
Note

Setting Automatically handle rate transition for data transfer to Whenever possible requires you to insert a Rate Transition block in locations indicated by Simulink®.

Setting Automatically handle rate transition for data transfer to Always allows Simulink to automatically handle rate transitions by inserting a Rate Transition block. The following exceptions apply:

  • The insertion of a Rate Transition block requires rewiring the block diagram.

  • Multiple Rate Transition blocks are required:

    • The blocks' sample times are not integer multiples of each other

    • The blocks use different sample time offsets

    • One of the rates is asynchronous

  • An inserted Rate Transition block can have multiple valid configurations.

For these cases, manually insert a Rate Transition block or blocks.

MathWorks® does not recommend using Unit Delay and Zero Order Hold blocks for handling rate transitions.

Last ChangedR2011a
Examples

Not Recommended:

In this example, the Rate Transition block is inserted at the source, not at the destination of the signal. The model fails to update because the two destination blocks (Gain and Sum) run at different rates. To fix this error, insert Rate Transition blocks at the signal destinations and remove Rate Transition blocks from the signal sources. Failure to remove the Rate Transition blocks is a common modeling pattern that might result in errors and inefficient code.

Recommended:

In this example, the rate transition is inserted at the destination of the signal.