DSP Blockset
  Go to block:
    Search    Help Desk 

Types of Sampling

Most signals in a DSP Simulink model are discrete-time signals, and all of the blocks in the DSP Blockset accept discrete-time inputs. However, many blocks can also operate on continuous-time signals, whose values vary continuously with time. Similarly, most blocks generate discrete-time outputs, but some generate continuous-time outputs.

The sampling behavior of a particular block determines which other blocks you can connect as an input or output. The following sections describe the behavior of both source and nonsource blocks in the DSP Blockset. See Chapter 4, "DSP Block Reference," for information about the particular sample characteristics of each block in the blockset.

Source Blocks

Source blocks are those blocks that generate or import data into a model. Many of these blocks have the term "from workspace" or "constant" in the block name (e.g., Signal From Workspace, Matrix Constant), and most appear in the DSP Sources library. See "Working with Sources and Sinks" in Chapter 3 to fully explore the features of these blocks.

Continuous-Time Source Blocks.    The sample period for continuous-time source blocks is set internally to zero (which indicates a continuous-time signal). Examples are Chirp and Constant. As shown below, when connecting such blocks to certain nonsource discrete-time blocks, you may need to interpose a Zero-Order Hold block to discretize the signal. Specify the desired sample period for the signal in the Sample time parameter of the Zero-Order Hold block.

The Triggered Signal From Workspace block is also considered to be a continuous-time block.

Discrete-Time Source Blocks.    Discrete-time source blocks, such as Matrix From Workspace, require a discrete (i.e., nonzero) sample period to specified in the block's Sample time parameter. Simulink generates an error if a zero value is specified for the Sample time parameter of a discrete-time source block.

Nonsource Blocks

All nonsource blocks in the DSP Blockset accept discrete signals, and inherit the sample period of the input. Others additionally accept continuous-time discrete signals.

Discrete-Time Nonsource Blocks.    Many blocks can accept only discrete-time inputs, and generate only discrete-time outputs. Examples are all of the resampling and delay blocks (e.g., Upsample, Integer Delay). These blocks inherit the sample period of the driving block (the block supplying the input). This means that the block automatically synchronizes its sampling rate with the driving block. For example, if the driving block's sample period is 0.5 seconds, then the inheriting block that it drives also executes at 0.5 second intervals. Simulink generates an error if a continuous input is connected to a discrete-only block.

Continuous/Discrete Non-Source Blocks.    In the continuous/discrete blocks, continuous-time inputs generate continuous-time outputs, and discrete-time inputs generate discrete-time outputs. Examples are all of the blocks in the Vector Functions library (in Math Functions). The nonsource triggered blocks (e.g. Triggered Shift Register) are also in this category.



[ Previous | Help Desk | Next ]