DSP System Toolbox
DSP System Toolbox lets you mathematically model the behavior of your system and then simulate the model to accurately predict and optimize system performance. Using the system toolbox, you can simulate digital systems in MATLAB and Simulink. When you use the system toolbox in Simulink, you can also model advanced systems such as mixed-signal and multidomain systems.
Algorithms in DSP System Toolbox serve as building blocks of signal processing systems in communications, audio, speech, RADAR, control systems, image and video processing, medical, and industrial applications.
All algorithms in the system toolbox—whether implemented as MATLAB functions, MATLAB System objects™ or Simulink blocks—support double-precision and single-precision floating-point data types. Most also support integer and fixed-point data types (requires Fixed-Point Designer™).
Algorithm categories in the system toolbox include:
DSP System Toolbox supports multirate processing for sample rate conversion and the modeling of systems in which different sample or clock rates need to be interfaced. Multirate functionality includes multirate filters and signal operations such as upsampling, downsampling, interpolation, decimation, and resampling.
DSP System Toolbox supports signal inputs that can change in size and value at run time. A subset of System objects and Simulink blocks provide support for variable-size signals that change size during the simulation or during distinct mode-switching events that occur in the initialization of conditionally executed subsystems. Support for variable-size signals enables you to model systems with varying resources, constraints, and environments.
DSP System Toolbox provides many methods for designing and implementing digital filters. You can design filters with lowpass, highpass, bandpass, bandstop, and other response types and realize them using filter structures such as direct-form FIR, overlap-add FIR, direct-form II with second-order sections, cascade allpass, and lattice structures.
The system toolbox supports a number of design methods, including:
Advanced equiripple FIR filters, including minimum-order, constrained-ripple, minimum-phase designs
Nyquist and halfband FIR and IIR filters, providing linear phase, minimum-phase, and quasi-linear phase (IIR) designs, as well as equiripple, sloped-stopband, and window methods
Optimized multistage designs, enabling you to optimize the number of cascaded stages to achieve the lowest computational complexity
Fractional-delay filters, including implementation using Farrow filter structures well-suited for tunable filtering applications
Allpass IIR filters with arbitrary group delay, enabling you to compensate for the group delays of other IIR filters to obtain an approximate linear phase passband response
Lattice wave digital IIR filters, for robust fixed-point implementation
Arbitrary magnitude and phase FIR and IIR filters, enabling design of any filter specification
DSP System Toolbox provides several techniques for the design of adaptive filters: LMS-based, RLS-based, affine projection, fast transversal, frequency-domain, and lattice-based. The system toolbox also includes algorithms for the analysis of these filters, including tracking of coefficients, learning curves, and convergence.
DSP System Toolbox provides functions for the design and implementation of multirate filters, including polyphase interpolators, decimators, sample-rate converters, and CIC filters and compensators, as well as support for multistage design methods. The system toolbox also provides specialized analysis functions to estimate the computational complexity of multirate filters.
DSP System Toolbox lets you design and implement specialized digital filters, including:
The digital filters you design in DSP System Toolbox can also be used in system-level models in Simulink. MATLAB functions and System objects™ enable you to generate bit-true Simulink models from MATLAB filter designs. You can also use filter design block libraries in DSP System Toolbox to design, simulate, and implement filters directly in Simulink.
Streaming and frame-based processing techniques accelerate simulations by buffering input data into frames and processing multiple samples of data at a time. Faster simulations are achieved due to the distribution of the fixed process overhead across many samples. Although these techniques introduce a certain amount of latency in the system, in many instances you can select frame sizes that improve throughput without creating unacceptable latencies.
In MATLAB, streaming signal processing is enabled by using System objects™ to represent data-driven algorithms, sources, and sinks. System objects implicitly manage many details of stream processing, such as data indexing, buffering, and algorithm state management. You can mix System objects with standard MATLAB functions and operators. MATLAB programs that use System objects can be incorporated into Simulink models via the MATLAB Function block. Most System objects have corresponding Simulink blocks with the same capabilities.
In Simulink, DSP System Toolbox blocks process input signals as frames when the specified input processing mode on the block dialog is set to frame-based processing. DSP System Toolbox supports sample-based processing for low latency processes and for applications that require scalar processing. Many blocks support both sample-based and frame-based processing modes.
The signals that you work with can be acquired from a variety of sources. You can:
Simulation results can be exported to audio files, audio devices, or transmitted as UDP packets over an IP network.
You can also generate binary signals, random signals, and common waveforms such as sine waves and chirp signals using functions in DSP System Toolbox.
DSP System Toolbox provides several tools for time-domain and frequency-domain visualization: Time Scope, Spectrum Scope, Vector Scope, and Waterfall Scope.
The Time Scope displays signals in the time-domain and supports a variety of signals—continuous and discrete, fixed-size and variable-size, floating and fixed-point data, and N-dimensional signals. You can also display multiple signals on the same axes, where each input signal has different dimensions, sample rates, and data types. Simulation controls on the Time Scope let you start, pause, continue, take a snapshot, or stop the simulation without having to switch windows.
The Spectrum Scope estimates the spectrum of a time-domain input signal and displays its frequency spectrum on a linear or log scale. Scope parameters enable you to specify FFT length, buffer size and overlap, and spectrum units.
The Vector Scope is a comprehensive display tool similar to a digital oscilloscope. You can use it to plot consecutive time samples from a vector or to plot vectors containing data such as filter coefficients or spectral magnitudes.
The Waterfall Scope displays multiple vectors of data at one time, where each vector represents the input data at consecutive sample times. This tool only displays real-valued, double-precision data.
You can use DSP System Toolbox with Fixed-Point Designer to model fixed-point signal processing algorithms and analyze the effects of quantization on system behavior and performance.
Fixed-point support in the system toolbox includes:
You can configure System objects™ and blocks in the system toolbox for fixed-Point modes of operation, enabling you to perform design tradeoff analyses by running simulations with different word lengths, scaling, overflow handling, and rounding method choices before you commit to hardware.
Fixed-point modes are supported for several DSP algorithms, including:
In Simulink, DSP System Toolbox automates the configuration of blocks for fixed-point operation. For example:
Filter design functions in DSP System Toolbox enable you to design floating-point filters that can be easily converted to fixed-point data types with Fixed-Point Toolbox. This design flow simplifies the design of fixed-point filters and lets you easily analyze quantization effects.
Using DSP System Toolbox with MATLAB Coder and Simulink Coder, you can generate C code from your algorithms and system models. The generated code can be used for verification, rapid prototyping, and implementation of your system during the product development process.
Using DSP System Toolbox with Filter Design HDL Coder™, you can generate HDL code from digital filter designs. In Simulink, DSP System Toolbox blocks provide support for HDL code generation when used with HDL Coder™.