| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
Signal Attributes
The Rate Transition block transfers data from the output of a block operating at one rate to the input of a block operating at a different rate. Use the block parameters to trade data integrity and deterministic transfer for faster response or lower memory requirements. To learn about data integrity and deterministic data transfer, see Data Transfer Problems in the Real-Time Workshop User's Guide.
| Transition Handling Options | Block Parameter Settings |
|---|---|
| Select:
|
| Select:
Clear:
|
| Clear:
|
The behavior of the Rate Transition block depends on:
Sample times of the ports to which the block connects (see Effects of Synchronous Sample Times and Effects of Asynchronous Sample Times)
Priorities of the tasks for the source and destination sample times (see Sample time properties in the Simulink documentation)
Whether the model specifies a fixed- or variable-step solver (see Solvers in the Simulink documentation)
When you update your diagram, a label appears on the Rate Transition block to indicate simulation behavior.
| Label | Block Behavior |
|---|---|
| ZOH | Acts as a zero-order hold |
| 1/z | Acts as a unit delay |
| Buf | Copies input to output under semaphore control |
| Db_buf | Copies input to output using double buffers |
| Copy | Unprotected copy of input to output |
| NoOp | Does nothing |
The block behavior label shows the method that ensures safe transfer of data between tasks operating at different rates. You can use the sample-time colors feature (see Displaying Sample Time Colors in the Simulink User's Guide) to display the relative rates that the block bridges. Consider, for example, the following diagram.

Sample-time colors and the block behavior label show that the Rate Transition block at the top of the diagram acts as a zero-order hold in a fast-to-slow transition and the bottom Rate Transition block acts as a unit delay in a slow-to-fast transition.
See Handling Rate Transitions in the Real-Time Workshop User's Guide for more information.
The following table summarizes how each label appears if the sample times of the input and output ports (inTs and outTs) are periodic, or synchronous.
Block Settings | Block Label | |||
|---|---|---|---|---|
Rate Transition | Conditions for Rate Transition Block | With Data Integrity and Determinism | With Only Data Integrity | Without Data Integrity or Determinism |
inTs = outTs (Equal) | inTsOffset < outTsOffset | None (error) | Buf | Copy or NoOp (see note that follows the table) |
inTsOffset = outTsOffset | Copy or NoOp (see note that follows the table) | Copy or NoOp (see note that follows the table) | ||
inTsOffset > outTsOffset | None (error) | Db_buf | ||
inTs < outTs (Fast to slow) | inTs = outTs / N inTsOffset, outTsOffset = 0 | ZOH | Buf | |
inTs = outTs / N inTsOffset ≤ outTsOffset | None (error) | |||
inTs = outTs / N inTsOffset > outTsOffset | None (error) | Db_buf | ||
inTs ≠ outTs / N | None (error) | |||
inTs > outTs (Slow to fast) | inTs = outTs * N inTsOffset, outTsOffset = 0 | 1/z | Db_buf | |
inTs = outTs * N inTsOffset ≤ outTsOffset | None (error) | |||
inTs = outTs * N inTsOffset > outTsOffset | None (error) | |||
inTs ≠ outTs * N | None (error) | |||
KEY
| ||||
Note If you select Block reduction in the Optimization pane of the Configuration Parameters dialog box, Copy reduces to NoOp. No code generation occurs for a Rate Transition block with a NoOp label. To prevent a block from being reduced when block reduction is on, add a test point to the block output (see Working with Test Points in the Simulink documentation). |
The following table summarizes how each label appears if the sample time of the input or output port (inTs or outTs) is not periodic, or asynchronous.
Block Settings | Block Label | |||
|---|---|---|---|---|
| With Data Integrity and Determinism | With Only Data Integrity | Without Data Integrity or Determinism | ||
inTs = outTs | Copy | Copy | Copy | |
inTs ≠ outTs | None (error) | Db_buf | ||
KEY
| ||||
The Rate Transition block accepts signals of any data type supported by Simulink software, including fixed-point and enumerated data types.
For a discussion on the data types supported by Simulink software, see Data Types Supported by Simulink in the Simulink User's Guide.

Selecting this check box results in generated code that ensures data integrity when the block transfers data. If you select this check box and the transfer is nondeterministic (see Ensure deterministic data transfer below), the generated code uses double-buffering to prevent the fast block from interrupting the data transfer. Otherwise, the generated code uses a copy operation to effect the data transfer. The copy operation consumes less memory than double-buffering but is also interruptible, which can lead to loss of data during nondeterministic data transfers. Select this check box if you want the generated code to operate with maximum responsiveness (i.e., nondeterministically) and data integrity. See Rate Transition Block Options in the Real-Time Workshop User's Guide for more information.
Selecting this check box results in generated code that transfers data at the sample rate of the slower block, i.e., deterministically. If you do not select this check box, data transfers occur as soon as new data is available from the source block and the receiving block is ready to receive the data. You avoid transfer delays, thus ensuring that the system operates with maximum responsiveness. However, transfers can occur unpredictably, which is undesirable in some applications. See Rate Transition Block Options in the Real-Time Workshop User's Guide for more information.
This parameter applies only to slow-to-fast transitions. It specifies the initial output of the Rate Transition block at the beginning of a transition when there is no output from the slow block connected to the input of the Rate Transition block. Simulink software does not allow the initial output of this block to be inf or NaN.
Specifies a mode for setting the output port sample time. The options are:
Specify — Allows you to use the Output port sample time parameter to specify the output rate to which the Rate Transition block converts its input rate.
Inherit — Specifies that the Rate Transition block inherits an output rate from the block to which its output port is connected.
Multiple of input port sample time — Allows you to use the Sample time multiple (>0) parameter to specify the Rate Transition block's output rate as a multiple of its input rate.
This parameter is visible only if the Output port sample time options parameter is set to Specify. Enter a value that specifies the output rate to which the block converts its input rate. The default value (-1) specifies that the output rate is inherited from the block to which the Rate Transition block's output port is connected. See How to Specify the Sample Time in the Simulink User's Guide for information on how to specify the output rate.
This parameter is visible only if the Output port sample time options parameter specifies Multiple of input port sample time. Enter a positive value that specifies the output rate as a multiple of the input port sample time. The default value (1) specifies that the output rate is the same as the input rate. A value of 0.5 specifies that the output rate is half of the input rate, while a value of 2 specifies that the output rate is twice the input rate.
The Rate Transition block is a bus-capable block. The input can be a virtual or nonvirtual bus signal, with the restriction that Initial conditions must be zero or a nonzero scalar. All signals in a nonvirtual bus input to a Rate Transition block must have the same sample time, even if the elements of the associated bus object specify inherited sample times. You can use a Rate Transition block to change the sample time of an individual signal, or of all signals in a bus. See Using Composite Signals and Bus-Capable Blocks in the Simulink User's Guide for more information.
Bus-capable | Yes, with restrictions as noted above |
Direct Feedthrough | No, for slow-to-fast transitions that are protected, i.e., for which you select the Ensure data integrity during data transfer check box. Yes, otherwise. |
Sample Time | This block supports discrete-to-discrete transitions. |
Scalar Expansion | Yes, of input. |
Dimensionalized | Yes |
Multidimensionalized | Yes |
Zero Crossing | No |
![]() | Rate Limiter Dynamic | Real-Imag to Complex | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |