DSP Blockset | ![]() ![]() |
Converting Sample Rates and Frame Rates
In a DSP Blockset model, there are two types of periods that you will commonly be concerned with: sample periods and frame periods. The input and output sample periods of a block (Tsi and Tso, respectively) are related to the input and output frame periods (Tfi and Tfo, respectively) by
where Mi and Mo are the input and output frame sizes, respectively.
The buffering and rate-conversion capabilities of the DSP Blockset generally allow you to independently vary any two of the three parameters (Tso, Tfo, Mo). In most cases, the sample period and the frame size are the two parameters of primary interest; the frame period is simply a consequence of your choices for the other two.
There are two common types of operations that impact the frame and sample rates of a signal:
Direct rate conversions, such as upsampling and downsampling, are a feature of most DSP systems, and can be implemented by altering either the frame rate or the frame size of a signal.
The principal purpose of frame rebuffering is to alter the frame size of a signal, usually to improve simulation throughput. By redistributing the signal samples to frames of a new size, rebuffering usually changes either the sample rate or frame rate of the signal.
Both operations are discussed in the following sections, along with ways to avoid unintentional rate conversions:
You may also want to look at the Sample Rate Conversion demo, dspsrcnv.mdl
.
Note Technically, when a Simulink model contains signals with various frame rates, the model is called multirate. You can find a discussion of multirate models in Delay and Latency and in the "Discrete Time Systems" section of the Simulink documentation. |
![]() | Using Sample Time Color Coding to Inspect Sample Rates | Direct Rate Conversion | ![]() |