DSP System Toolbox
DSP System Toolbox provides a uniform framework for processing streaming signals in MATLAB. The system toolbox includes a library of signal processing algorithms optimized for processing streaming signals such as single-rate and multirate filters, adaptive filtering, and FFTs. The system toolbox is ideal for designing, simulating, and deploying signal processing solutions for applications including audio, biomedical, communications, control, seismic, sensors, and speech.
Streaming signal processing techniques enable processing of continuingly flowing data streams, which can often accelerate simulations by dividing input data into frames and processing each frame as it is acquired. For example, streaming signal processing in MATLAB enables real-time processing of multichannel audio.
Streaming signal processing is enabled using a library of DSP algorithm components called System objects to represent data-driven algorithms, sources, and sinks. System objects make it easy to create streaming applications by automating tasks such as data indexing, buffering, and algorithm state management. You can mix MATLAB System objects with standard MATLAB functions and operators.
You can apply single-rate, multirate, and adaptive filters to streaming data using algorithms optimized for streaming signals and data.
DSP System Toolbox provides more than 350 algorithms optimized for design, implementation, and validation of streaming systems—whether implemented as MATLAB functions or as MATLAB System objects. The algorithms support double-precision and single-precision floating-point data types. Most of the algorithms also support integer data types, as well as fixed-point data types that require Fixed-Point Designer™.
In MATLAB, the system toolbox algorithm categories include:
In MATLAB, DSP System Toolbox supports multirate processing for sample-rate conversion and the modeling of systems in which different sample rates or clock rates need to be interfaced. Multirate functionality includes multistage and multirate filters such as FIR and IIR halfband, Polyphase filters, CIC filters, and Farrow filters. It also includes signal operations such as interpolation, decimation, and arbitrary sample-rate conversion.
In Simulink, DSP System Toolbox offers a library of signal processing algorithm blocks for filters, transforms, and linear algebra. These blocks process streaming input signals as individual samples or as collections of samples called frames. Sample-based processing enables low-latency processes and applications that require scalar processing. Frame-based processing enables higher throughput in exchange for latency. Many blocks support both sample-based and frame-based processing modes.
MATLAB programs that use System objects can be incorporated into Simulink models through either the MATLAB Function block or the MATLAB System block. Most of the System objects have corresponding Simulink blocks with the same capabilities.
Simulink blocks for signal processing support double-precision and single-precision floating-point data types and integer data types. They also support fixed-point data types that require Fixed-Point Designer.
The signal processing blocks in DSP System Toolbox include:
In Simulink, DSP System Toolbox supports multirate processing for sample-rate conversion and the modeling of systems in which different sample rates or clock rates need to be interfaced. Multirate filter blocks include multistage and multirate filter blocks such as CIC, FIR rate conversion, FIR interpolator and decimator, and Dyadic Analysis Filter Bank.
DSP System Toolbox provides extensive filter design and implementation algorithms for FIR, IIR, multistage, multirate, and adaptive filters. You can design filters with lowpass, highpass, bandpass, bandstop, and other response types. You can realize them using filter structures such as direct-form FIR, overlap-add FIR, IIR second-order sections (Biquad), cascade allpass, and lattice structures.
You can design filters using the Filterbuilder app, MATLAB code, or Simulink blocks. Also, you can analyze fixed-point quantization effects for FIR and IIR filters and determine the optimal word length for the filter coefficients.
You can also design tunable filters where you can tune key filter parameters, such as bandwidth and gain, at run time.
The digital filters you design with DSP System Toolbox in MATLAB can also be used in system-level models in Simulink. There is a ready-to-use library of filter blocks in the system toolbox for designing, simulating, and implementing lowpass, highpass, and other filters directly in Simulink.
In addition to conventional FIR and IIR filter design algorithms, DSP System Toolbox supports specialized filters and design methods such as:
DSP System Toolbox provides several techniques for adaptive filtering in MATLAB and Simulink. These techniques are widely used for applications such as system identification, spectral estimation, equalization, and noise suppression. Such adaptive filters include LMS-based, RLS-based, affine projection, fast transversal, frequency-domain, lattice-based, and Kalman. The system toolbox includes algorithms for the analysis of these adaptive filters, including tracking of coefficients, learning curves, and convergence.
DSP System Toolbox provides design and implementation of multirate filters, including Polyphase interpolators, decimators, sample-rate converters, FIR halfband and IIR halfband, Farrow filters, 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 and multistage filters.
DSP System Toolbox provides multichannel audio capture and processing in real time using a variety of file formats, sound device I/O, and support for low latency. You can tune parameters of your audio filters at run time via the UI using UDP or MIDI. The system toolbox offers audio support from MATLAB or Simulink using microphone arrays and speaker arrays. Pro-audio sound cards and audio interfaces can be used with multiple sample rates. Low latency can be achieved through ASIO and Core Audio driver support.
The signals that you work with can be acquired in real time from a variety of sources. Simulation results can be exported to audio files, played on audio devices, or transmitted as UDP packets over an IP network. You can perform the following on the audio signal you are working with:
You can generate random signals and colored noise as well as common waveforms such as sine waves and chirp signals. You can also analyze audio signals using visualization and measurement tools.
DSP System Toolbox provides scopes and data logging for time-domain or frequency-domain visualization, measurements, and analysis of streaming signals in MATLAB and Simulink. The scopes come with measurements and statistics familiar to users of industry-standard oscilloscopes and spectrum analyzers.
The system toolbox also provides the Logic Analyzer for displaying the transitions in time-domain signals, which is helpful in debugging models targeted towards HDL implementation.
You can also create an arbitrary plot for visualizing data vectors, such as the evolution of filter coefficients over time.
Time Scope displays signals in the time domain and supports a variety of signals—continuous, discrete, fixed-size, variable-size, floating-point data, fixed-point data, and N-dimensional signals for multichannel I/O system. Time Scope lets you display multiple signals either on the same axis where each input signal has different dimensions, sample rates, and data types, or on multiple channels of data on different displays in the scope window. Time Scope performs analysis, measurement, and statistics including root-mean-square (RMS), peak-to-peak, mean, and median.
Spectrum Analyzer computes the frequency spectrum of a variety of input signals and displays its frequency spectrum on either a linear scale or a log scale. Spectrum Analyzer performs measurements and analysis such as harmonic distortion measurements (THD, SNR, SINAD, SFDR), third-order intermodulation distortion measurements (TOI), adjacent channel power ratio measurements (ACPR), complementary cumulative distribution function (CCDF), and peak-to-average power ratio (PAPR). The spectrogram mode view of Spectrum Analyzer shows how to view time-varying spectra and allows automatic peak detection.
DSP System Toolbox provides an additional family of visualization tools that you can use to display and measure a variety of signals or data, including real-valued or complex-valued data, vectors, arrays, and frames of any data type including fixed-point, double-precision, or user-defined data input sequence. Some of the visualization tools can show a 3D display of your streaming data or signals so that you can analyze your data over time until your simulation stops.
Using DSP System Toolbox with MATLAB Coder™ and Simulink Coder™, you can generate C and C++ source code or an MEX function tuned for performance from your signal processing algorithms and system models in MATLAB and Simulink, respectively.
The generated code can be used for acceleration, rapid prototyping, implementation and deployment, or integration of your system during the product development process.
You can generate efficient and compact executable code, an MEX function, tuned for performance for speedup of computation-intensive algorithms in your simulation. You can accelerate your floating-point and fixed-point algorithms including filters, FFTs, statistics, and linear algebra in MATLAB and Simulink.
You can also tune your algorithm parameters directly from MATLAB or Simulink in real time via the UI while your generated C code is executed on the desktop. DSP System Toolbox provides support for C code generation from Audio I/O so that you can tune and listen to your audio processing in real time.
With DSP System Toolbox, you can also use the generated C code from your MATLAB code or Simulink model for deployment and prototyping on the desktop by generating a standalone executable of your algorithm. This standalone executable can still be tuned directly from within MATLAB or Simulink in real time by using the UDP components. Because this standalone executable runs on a different thread than the MATLAB code or Simulink model, it improves the real-time performance of your algorithm.
The generated C code of your signal processing algorithms can be integrated as a compiled library component into other software, such as a custom simulator, or standard modeling software such as SystemC.
You can use DSP System Toolbox with Fixed-Point Designer to model fixed-point signal processing algorithms, as well as to analyze the effects of quantization on system behavior and performance. You can also generate fixed-point C code from your MATLAB code or Simulink model.
You can configure MATLAB System objects and Simulink blocks in the system toolbox for fixed-point modes of operation, enabling you to perform design tradeoff analyses and optimization 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 many DSP algorithms, including FFT, filters, statistics, and linear algebra. DSP System Toolbox automates the configuration of System objects and blocks for fixed-point operation.
In DSP System Toolbox, filter design functions, or Filterbuilder interactive apps, enable you to design floating-point filters that can be easily converted to fixed-point data types with Fixed-Point Designer. This design flow simplifies the design and optimization of fixed-point filters and lets you easily analyze quantization effects.
Using DSP System Toolbox with Filter Design HDL Coder™ in MATLAB, you can design digital filters and generate efficient, synthesizable, and portable VHDL® and Verilog® code for implementation in FPGAs or ASICs. You can also automatically create VHDL and Verilog test benches for quickly simulating, testing, and verifying generated code.
DSP System Toolbox with HDL Coder™ in Simulink provides synthesizable and readable VHDL and Verilog code generation for your system design. This support includes algorithms optimized for resource and performance, such as filters, FFT, IFFT, and NCO.
Using DSP System Toolbox with the hardware support add-on for ARM Cortex-A or ARM Cortex-M and Embedded Coder®, you can generate optimized C code from MATLAB System objects or Simulink blocks for key DSP algorithms, such as FFT, FIR, and Biquad filters. The generated code provides calls to optimized routines for either the ARM Cortex-A Ne10 library or the ARM Cortex-M CMSIS library. A key benefit is an immediate increase in performance when compared to standard C code. You can also perform code verification, profiling, and validation using processor-in-the-loop (PIL).