DSP System Toolbox 8.0
Design and simulate signal processing systems
DSP System Toolbox™ provides algorithms and tools for the design and simulation of signal processing systems.
These capabilities are provided as MATLAB® functions, MATLAB System objects, and Simulink® blocks.
The system toolbox includes design methods for specialized FIR and IIR filters, FFTs, multirate processing, and
DSP techniques for processing streaming data and creating real-time prototypes. You can design adaptive and
multirate filters, implement filters using computationally efficient architectures, and simulate floating-point digital
filters. Tools for signal I/O from files and devices, signal generation, spectral analysis, and interactive visualization
enable you to analyze system behavior and performance. For rapid prototyping and embedded system design, the
system toolbox supports fixed-point arithmetic and C-code generation.
Key Features
▪ Algorithms available as MATLAB functions, MATLAB System objects, and Simulink blocks
▪ Simulation of streaming, frame-based, and multirate systems
▪ Signal generators and I/O support for multimedia files and devices, including multichannel audio
▪ Design methods for specialized filters, including parametric equalizers and adaptive, multirate, octave, and
acoustic weighting filters
▪ Filter realization architectures, including second-order sections and lattice wave digital filters
▪ Algorithms for FFT, spectral estimation, windowing, signal statistics, and linear algebra
▪ Algorithm support for floating-point, integer, and fixed-point data types
▪ Automatic C-code generation (with MATLAB Coder™ or Simulink Coder™)
1
Acoustic noise cancellation algorithm using System objects in MATLAB (above left). Filter coefficients can be plotted to
display their values before adaptation (top right) and after adaptation (bottom right).
DSP Algorithms for System Design and Prototyping
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.
Algorithm Libraries for DSP
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 Toolbox™ or Simulink Fixed Point™).
Algorithm categories in the system toolbox include:
▪ Signal operations such as convolution, windowing, padding, modeling delays, peak finding, and zero-crossing
▪ Signal transforms such as fast Fourier transform (FFT), discrete cosine transform (DCT), short-time Fourier
transform, and discrete wavelet transform (DWT)
▪ Filter design and implementation methods for digital FIR and IIR filters
▪ Statistical signal processing tools for signal analysis and spectral estimation
2
▪ Signal management methods such as buffering, indexing, switching, stacking, and queuing
▪ Linear algebra routines, including linear system solvers, matrix factorizations, and matrix inverses
▪ Scalar and vector quantizer encoding and decoding
Partial list of System objects available in MATLAB (top) and category view of blocks available in Simulink (middle),
with expanded views of the Signal Processing Sources and Transforms block libraries (bottom).
Modeling Multirate Systems
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.
3
Sigma-delta A/D converter model in Simulink showing signals operating at multiple sample rates.
Variable-Size Signals
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.
Adaptive, Multirate, and Specialized Filter Design Methods
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.
You can design filters in several ways: at the MATLAB command line, interactively using FDA Tool or
Filterbuilder, or in Simulink using the filter design block library.
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
4
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
Specialized filter designs in MATLAB showing LMS adaptive filter applied to a noisy music signal (top left), arbitrary
magnitude filter design (top right), direct-form FIR filter responses for fixed-point data types (bottom left), and octave
filter design (bottom right).
Adaptive Filters
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.
Multirate Filters
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.
5
Interactive design of a lowpass filter in the Filterbuilder tool (left) and visualization of magnitude response (right).
Specialized Filters for DSP Applications
DSP System Toolbox lets you design and implement specialized digital filters, including:
▪ Audio weighting filters, octave filters, and parametric equalizer filters for audio, speech, and acoustic
applications
▪ Pulse shaping, peak or notch, and multirate filters for communications systems
▪ Kalman filters for aerospace and navigation systems
Using Filters in Simulink System Models
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 Signal Processing
DSP System Toolbox enables the efficient simulation of real-time signal processing systems by supporting
streaming signal processing and frame-based processing in MATLAB and 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
6
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.
Envelope detection algorithm illustrating stream processing in MATLAB with System objects. Simulation results are
shown for both the Hilbert transform and amplitude modulation methods of envelope detection.
Signal Generation, I/O, and Visualization
Generating and Importing Signals
The signals that you work with can be acquired from a variety of sources. You can:
▪ Import audio signals from multimedia files
▪ Record audio data from soundcards
▪ Acquire multichannel audio data in real time
▪ Receive UDP packets from an IP network port
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.
7
Visualizing Signals in Time and Frequency Domains
DSP System Toolbox provides several tools for time-domain and frequency-domain visualization: Time Scope,
Spectrum Scope, Vector Scope, and Waterfall Scope.
Visualizing time-domain signals in the Time Scope tool. Simulation controls enable starting, pausing and stopping
simulations from within the Time 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.
Fixed-Point Implementation and Code Generation for DSP System Models
You can use DSP System Toolbox with Fixed-Point Toolbox or Simulink Fixed Point to model fixed-point signal
processing algorithms and analyze the effects of quantization on system behavior and performance.
8
Fixed-point support in the system toolbox includes:
▪ Word sizes from 1 to 128 bits
▪ Overflow handing and rounding methods
▪ Logging overflows, maxima, and minima of internal variables
▪ Manual or automatic scaling
▪ Data type override options to control system-level data type settings
Fixed-Point Modeling and Simulation
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:
▪ FFT, DCT, IFFT, IDCT, and other signal transforms
▪ Digital Filter, Biquad Filter, LMS Filter, and other filter implementations
▪ Mean, Variance, Autocorrelation, Histogram, and other statistics
▪ Levinson-Durbin, Forward Substitution, Backward Substitution, and other linear system solvers
▪ Matrix Multiply, Matrix Product, Matrix Sum, Matrix 1-Norm, and other matrix operations
▪ Cumulative Product, Cumulative Sum, Difference, Normalization, and other math operations
In Simulink, DSP System Toolbox automates the configuration of blocks for fixed-point operation. For example:
▪ Accumulator and multiplier sizes are specified to ensure compatibility for specific hardware targets.
▪ Binary point of a filter’s coefficient is automatically located based on user-defined word length, precision, and
actual values.
▪ Product output retains all bits in the products between filter coefficients and input values.
▪ Accumulator is configured to avoid overflows.
9
Block dialog for FFT block in DSP System Toolbox. The dialog provides options for fixed-point data type specification
of accumulator, product, and output signals (requires Simulink Fixed-Point).
Fixed-Point Filter Design
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.
Generating C and HDL Code
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
Simulink HDL Coder™.
10
Product Details, Demos, and System Requirements
www.mathworks.com/products/dsp-system
Trial Software
www.mathworks.com/trialrequest
Sales
www.mathworks.com/contactsales
Technical Support
www.mathworks.com/support
Resources
Online User Community
www.mathworks.com/matlabcentral
Training Services
www.mathworks.com/training
Third-Party Products and Services
www.mathworks.com/connections
Worldwide Contacts
www.mathworks.com/contact
© 2011 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks
for a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders. 11
DSP System Toolbox 8.0
Design and simulate signal processing systems
Key Features
DSP Algorithms for System Design and Prototyping
Algorithm Libraries for DSP
Modeling Multirate Systems
Variable-Size Signals
Adaptive, Multirate, and Specialized Filter Design Methods
Adaptive Filters
Multirate Filters
Specialized Filters for DSP Applications
Using Filters in Simulink System Models
Streaming and Frame-Based Signal Processing
Signal Generation, I/O, and Visualization
Generating and Importing Signals
Visualizing Signals in Time and Frequency Domains
Fixed-Point Implementation and Code Generation for DSP System Models
Fixed-Point Modeling and Simulation
Fixed-Point Filter Design
Generating C and HDL Code
Resources