|ID: Title||cgsl_0205: Signal handling for multirate models|
|Description||For multirate models, handle the change in operation rate in one of two ways:|
|A||At the destination block, Insert a Rate Transition.|
|B||Set configuration parameter Automatically handle
rate transition for data transfer to
|Rationale||A,B||Following this guideline supports the handling of data operating at different rates.|
Setting Automatically handle rate
transition for data transfer to
Setting Automatically handle rate transition for data
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.
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.
In this example, the rate transition is inserted at the destination of the signal.