| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Signal Processing Blockset |
| Contents | Index |
| Learn more about Signal Processing Blockset |
| On this page… |
|---|
Sample Rate and Frame Rate Concepts Inspecting Sample-Based Signals Using the Probe Block Inspecting Frame-Based Signals Using the Probe Block |
Sample rates and frame rates are important issues in most signal processing models. This is especially true with systems that incorporate rate conversions. Fortunately, in most cases when you build a Simulink model, you only need to set sample rates for the source blocks. Simulink automatically computes the appropriate sample rates for the blocks that are connected to the source blocks. Nevertheless, it is important to become familiar with the sample rate and frame rate concepts as they apply to Simulink models.
The input frame period (Tfi) of a frame-based signal is the time interval between consecutive vector or matrix inputs to a block. Similarly, the output frame period (Tfo) is the time interval at which the block updates the frame-based vector or matrix value at the output port.
In contrast, the sample period, Ts, is the time interval between individual samples in a frame, this value is shorter than the frame period when the frame size is greater than 1. The sample period of a frame-based signal is the quotient of the frame period and the frame size, M:
![]()
More specifically, the sample periods of inputs (Tsi) and outputs (Tso) are related to their respective frame periods by
![]()
![]()
where Mi and Mo are the input and output frame sizes, respectively.
The illustration below shows a single-channel, frame-based signal with a frame size (Mi) of 4 and a frame period (Tfi) of 1. The sample period, Tsi, is therefore 1/4, or 0.25 second.

The frame rate of a signal is the reciprocal of the frame period.
For instance, the input frame rate would be
. Similarly, the
output frame rate would be
.
The sample rate of a signal is the reciprocal of the sample
period. For instance, the sample rate would be
.
In most cases, the sequence sample period Tsi is most important, while the frame rate is simply a consequence of the frame size that you choose for the signal. For a sequence with a given sample period, a larger frame size corresponds to a slower frame rate, and vice versa.
You can use the Probe block to display the sample period of a sample-based signal. For sample-based signals, the Probe block displays the label Ts, the sample period of the sequence, followed by a two-element vector. The left element is the period of the signal being measured. The right element is the signal's sample time offset, which is usually 0.
In this example, you use the Probe block to display the sample period of a sample-based signal:
At the MATLAB command prompt, type doc_probe_tut1.
The Probe Example 1 model opens.

The figure below illustrates how the Probe blocks display the sample period of the signal before and after each upsample operation.

As displayed by the Probe blocks, the output from the Signal From Workspace block is a sample-based signal with a sample period of 1 second. The output from the first Upsample block has a sample period of 0.5 second, and the output from the second Upsample block has a sample period of 0.25 second.
You can use the Probe block to display the frame period of a frame-based signal. For frame-based signals, the block displays the label Tf, the frame period of the sequence, followed by a two-element vector. The left element is the period of the signal being measured. The right element is the signal's sample time offset, which is usually 0.
Note Simulink offers the ability to shift a signal's sample times by an arbitrary value, which is equivalent to shifting the signal's phase by a fractional sample period. However, sample-time offsets are rarely used in signal processing systems, and Signal Processing Blockset blocks do not support them. |
In this example, you use the Probe block to display the frame period of a frame-based signal:
At the MATLAB command prompt, type doc_probe_tut2.
The Probe Example 2 model opens.

The figure below illustrates how the Probe blocks display the frame period of the signal before and after each upsample operation.

As displayed by the Probe blocks, the output from the Signal From Workspace block is a frame-based signal with a frame period of 16 seconds. The output from the first Upsample block has a frame period of 8 seconds, and the output from the second Upsample block has a sample period of 4 seconds.
Note that the sample rate conversion is implemented through a change in the frame period rather than the frame size. This is because the Frame-based mode parameter in the Upsample blocks is set to Maintain input frame size rather than Maintain input frame rate.
In the following example, you use sample time color coding to view the sample rate of a sample-based signal:
At the MATLAB command prompt, type doc_color_tut1.
The Sample Time Color Example 1 model opens.

From the Format menu, point to Sample Time Display, and select Colors.
This selection turns on sample time color coding. Simulink now assigns each sample rate a different color.
The model should now look similar to the following figure:

Every sample-based signal in this model has a different sample rate. Therefore, each signal is assigned a different color.
For more information about sample time color coding, see How to View Sample Time Information in the Simulink documentation.
In this example, you use sample time color coding to view the frame rate of a frame-based signal:
At the MATLAB command prompt, type doc_color_tut2.
The Sample Time Color Example 2 model opens.

To turn on sample time color coding, from the Format menu, point to Sample Time Display, and select Colors.
Simulink now assigns each frame rate a different color.
The model should now look similar to the following figure:

Because the Frame-based mode parameter in the Upsample blocks is set to Maintain input frame size rather than Maintain input frame rate, each Upsample block changes the frame rate. Therefore, each frame-based signal in the model is assigned a different color.
Double-click on each Upsample block and change the Frame-based mode parameter to Maintain input frame rate.
Every signal is coded with the same color. Therefore, every signal in the model now has the same frame rate.

For more information about sample time color coding, see Displaying Sample Time Colors in the Simulink documentation.
![]() | Advanced Signal Concepts | Converting Sample and Frame Rates | ![]() |

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 |