Main Content

Configure the Simulink Environment for Signal Processing Models

About DSP Simulink Model Templates

The DSP Simulink® model templates let you automatically configure the Simulink environment with the recommended settings for digital signal processing modeling. DSP Simulink model templates enable reuse of settings, including configuration parameters. You can create models from templates that use best practices and take advantage of previous solutions to common problems. Instead of the default canvas of a new model, select a template model to help you get started.

For more information on Simulink model templates, see Create Template from Model (Simulink).

Create Model Using the DSP System Toolbox Simulink Model Template

To create a new blank model and open the library browser:

  1. On the MATLAB® Home tab, click Simulink.

  2. Click on DSP System to create an empty model with settings suitable for use with DSP System Toolbox™. The new model opens. To access the library browser, click Library Browser on the model toolstrip.

    Snapshot of the three Simulink model templates in the Simulink Start page, under DSP System Toolbox. First comes DSP System template, followed by the Basic File template and the Mixed-Signal System template.

The new model using the template settings and contents appears in the Simulink Editor. The model is only in memory until you save it.

DSP Simulink Model Templates

When you create a model by choosing one of the DSP Simulink model templates, the model is configured to use the settings recommended for DSP System Toolbox. Some of these settings are:

Configuration ParameterSetting
SingleTaskRateTransMsgerror
multiTaskRateTransMsgerror
Solverfixedstepdiscrete
EnableMultiTaskingOff
StartTime0.0
StopTimeinf
FixedStepauto
SaveTimeoff
SaveOutputoff
AlgebraicLoopMsgerror
SignalLoggingoff
FrameProcessingCompatibilityMsgerror

The DSP Simulink model templates are:

DSP System Template

Click on DSP System to create a blank model configured with settings recommended for DSP System Toolbox.

Snapshot of a blank model template. The model is empty with no blocks. The Simulation pane is shown by default in the model toolstrip. In the Simulation pane, Stop time is set to inf and the simulation mode is set to Normal.

Basic Filter Template

Click on Basic Filter to create a basic filtering model configured with settings recommended for DSP System Toolbox.

This model implements a low pass filter and enables you to compare the filtered signal with the original signal. The model acts as a starting point for modeling filtering algorithms in Simulink using DSP System Toolbox.

Snapshot of a basic filter model template. The model has two Sine Wave blocks and a Gaussian Noise block in the input. The outputs of these three blocks are added by an adder. The noisy Sinusoidal signal at the output of the adder is pass into a Lowpass FIR Filter block. The noisy signal and the filtered signal are fed into the Spectrum Analyzer as two inputs. The Spectrum Analyzer compares the spectra of these two signals. The Simulation pane is shown by default in the model toolstrip. In the Simulation pane, Stop time is set to inf and the simulation mode is set to Normal.

Mixed-Signal System Template

Click the Mixed-Signal System template to create a basic A/D converter model configured with settings recommended for DSP System Toolbox and mixed-signal systems. This model performs A/D conversion by implementing an analog anti aliasing filter followed by a zero-order hold circuit. The model acts as a starting point for modeling mixed-signal systems in Simulink using DSP System Toolbox. All discrete-time signals are colored in red to indicate the fastest sample rate. Continuous-time signals are colored in black. For additional sample time options, in the Debug tab, select Information Overlays > Colors.

Snapshot of a mixed-signal model template. The Signal Generator block on left generates a continuous-time sinusoidal signal. On one branch of the model, the signal is delayed using a Transport Delay block. On the other branch of the model, the signal is filtered using an Analog Filter Design block. The output of the Analog Filter Design block is continuous-time and is fed into a Zero-Order hold block. The Zero-Order hold block makes the signal a discrete-time signal. The continuous-time signal and the discrete-time counterpart are fed into a scope. The discrete-time signal is also fed into a Spectrum Analyzer. Discrete sample time signals and blocks can be color-annotated to help visual inspection of diagrams. All discrete-time signals are colored, with red identifying the fastest sample rate. Continuous-time signals are black.

See Also