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:
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 topic on discrete time systems in the Simulink documentation. |
![]() | Using Sample Time Color Coding to Inspect Sample Rates | Direct Rate Conversion | ![]() |