0% found this document useful (0 votes)
54 views188 pages

DSP System Toolbox™ Release Notes

The DSP System Toolbox™ Release Notes provide an overview of new features, improvements, and changes in the software, including enhancements in digital filter design, scopes, visualization, and AI for DSP. Key updates include new objects for modeling MIMO systems, improved spectrum analysis capabilities, and support for variable-size input signals. The document also outlines functionality that is being removed or changed, as well as contact information for MathWorks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views188 pages

DSP System Toolbox™ Release Notes

The DSP System Toolbox™ Release Notes provide an overview of new features, improvements, and changes in the software, including enhancements in digital filter design, scopes, visualization, and AI for DSP. Key updates include new objects for modeling MIMO systems, improved spectrum analysis capabilities, and support for variable-size input signals. The document also outlines functionality that is being removed or changed, as well as contact information for MathWorks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 188

DSP System Toolbox™ Release Notes

How to Contact MathWorks

Latest news: www.mathworks.com

Sales and services: www.mathworks.com/sales_and_services

User community: www.mathworks.com/matlabcentral

Technical support: www.mathworks.com/support/contact_us

Phone: 508-647-7000

The MathWorks, Inc.


1 Apple Hill Drive
Natick, MA 01760-2098
DSP System Toolbox™ Release Notes
© COPYRIGHT 2012–2024 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualifies as commercial computer software or commercial computer
software documentation as such terms are used or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specified in this Agreement, shall pertain
to and govern the use, modification, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conflicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
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.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Contents

R2024b

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Multirate Filter Design Improvements: New design function and design


options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
New dsp.MIMOFIRFilter: Model MIMO systems and specify multiple paths
between signal pairs in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
New dsp.VariableFIRDecimator and dsp.VariableFIRInterpolator objects
with tunable rate conversion factors . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Support for filter analysis in dsp.DCBlocker and
dsp.ComplexBandpassDecimator objects . . . . . . . . . . . . . . . . . . . . . . . 1-4
Specify normalized frequencies in digital down-converter and digital up-
converter objects and blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
Specify normalized frequencies in complex bandpass decimator object and
block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Specify data type of filter coefficients explicitly in design functions . . . . . . 1-5
designMultistageInterpolator function: Change in upper limit for transition
width argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8

Spectrum analyzer now supports adaptive RBW and window invariant


samples per update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8
New color and styling properties in MATLAB scope objects . . . . . . . . . . . . 1-9
Array Plot: Support for bar plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Array Plot: Support for multiple displays . . . . . . . . . . . . . . . . . . . . . . . . . . 1-9
Array Plot: Specify active display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Array Plot: Magnitude Phase Plot property is now available in array plot
settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Array Plot: Show Legend property is now also available in array plot
settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Higher display precision in scope UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
timescope object supports up to 100 displays . . . . . . . . . . . . . . . . . . . . . 1-10
Logic Analyzer: Save and restore views . . . . . . . . . . . . . . . . . . . . . . . . . 1-10
Logic Analyzer: Configure axes theme . . . . . . . . . . . . . . . . . . . . . . . . . . 1-11
Spectrum Analyzer: Support for 64 ACPR offset pairs . . . . . . . . . . . . . . . 1-11
Preserve Colors is now available in scope toolstrip . . . . . . . . . . . . . . . . . 1-12
Enhancements to Filter Visualization: New visualize function and changes
to existing visualize functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 1-13

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-16

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 1-16

iii
Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-17

Specify normalized frequencies in Zoom FFT object and block . . . . . . . . 1-17

AI for DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18

Deep Signal Anomaly Detector block supports LSTM forecaster model . . 1-18
New AI deployment example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-18

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19

Generate SIMD code for Apple platforms by using configuration parameters


..................................................... 1-19
Generate SIMD code for ARM Cortex-A hardware boards by using
configuration parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-19
New code generation application examples . . . . . . . . . . . . . . . . . . . . . . . 1-19

R2024a

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

freqzmr Function: Compute impulse response DTFT of single-rate or


multirate filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Design Filter Live Editor Task: Design bandpass and bandstop digital filters
interactively . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Channel Synthesizer Object and Block: Design an oversampled channel
synthesizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Channelizer Block: Output each narrowband signal at a separate port . . . 2-4
Channelizer Object and Block: Set decimation factor to equal to number of
frequency bands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
dsp.FrequencyDomainFIRFilter Object: Partition numerator into segments
when you specify multiple filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Frequency-Domain FIR Filter Block: Model MIMO systems and specify
multiple paths between signal pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Tunable Filter Design Blocks: Renaming of blocks . . . . . . . . . . . . . . . . . . 2-5
Tunable Filter Design Blocks: Smooth tunable filter parameters . . . . . . . . 2-5
designHalfbandIIR Function: Design filter using quasi-linear phase design
method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Support for strict single precision arithmetic in design functions . . . . . . . 2-6
designFracDelayFIR Function: New 'SystemObject' argument . . . . . . . . . 2-6
designMultirateFIR Function: Replace half-polyphase length with polyphase
length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
designMultirateFIR and designFracDelayFIR Functions: Support for
Name=Value syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
dsp.AllpassFilter Object and Allpass Filter Block: Support for fourth-order
filter sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
dsp.IIRFilter object: Support for variable-size input signals . . . . . . . . . . . . 2-7
Specify normalized frequencies in certain filtering blocks and System
objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
realizeModel Function: Create Simulink block equivalents for
dsp.CICDecimator and dsp.CICInterpolator objects . . . . . . . . . . . . . . . 2-7
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

iv Contents
Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

Filter Analyzer App: View, analyze, and compare filters . . . . . . . . . . . . . . 2-11


Enhancements to Spectrum Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 2-12

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

Random Source block has been updated . . . . . . . . . . . . . . . . . . . . . . . . . 2-13


Parameter Smoother Object and Block: Smooth parameter values gradually
..................................................... 2-13
dsp.AudioFileWriter Object and To Multimedia File Block: Specify audio
quality and bit rate for select signal file formats . . . . . . . . . . . . . . . . . 2-14
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 2-14

AI for DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15

Deep Signal Anomaly Detector Block: Detect anomalies in signals in real


time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

designMultirateFIR and designFracDelayFIR Functions: Support for code


generation when 'SystemObject' argument is true . . . . . . . . . . . . . . . 2-16
rebuffer_delay Function: Support for code generation . . . . . . . . . . . . . . . 2-16
Generate SIMD code for ARM Cortex-A by using configuration parameters
..................................................... 2-16
Generate SIMD code by using configuration parameters with balanced
optimization priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Maximize multicore performance by specifying dataflow domain at root
model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17

R2023b

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

Design Filter Live Editor Task: Design digital filters interactively . . . . . . . 3-2
New Simulink model templates in DSP System Toolbox . . . . . . . . . . . . . . . 3-2
Second-Order Section Filter Block: Implement a cascade of second-order
section filters in Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
New FIR filter design blocks with tunable filter specifications . . . . . . . . . . 3-3
New lowpass and highpass IIR filter design blocks with tunable filter
specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
New design functions optimized for run-time design when generating code
...................................................... 3-4
New dsp.ParallelFilter System object . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Tunable Bandpass IIR Filter and Tunable Bandstop IIR Filter blocks
generate coefficients in second-order section form . . . . . . . . . . . . . . . . 3-5
Variable FIR Decimation and Variable FIR Interpolation blocks can generate
fixed-size output signals for variable-size input signals . . . . . . . . . . . . . 3-5

v
Frequency-Domain FIR Filter supports multiple-input multiple-output
(MIMO) systems and multiple paths between input and output pairs in
MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Normalized frequencies in certain filtering blocks and System objects . . . 3-5
Support for arbitrary input frame length in DSP System Toolbox objects
...................................................... 3-6
Support for arbitrary input frame length in DSP System Toolbox blocks . . 3-6
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

New printToFigure function prints scope window to MATLAB figure . . . . . 3-8


Spectrum Analyzer supports dBuV units . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

Enhancements to dsp.AudioFileReader object . . . . . . . . . . . . . . . . . . . . . . 3-9


Support for writing MP3 files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 3-9

Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 3-10

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11

Generate SIMD code from LMS Filter block by leveraging target hardware
instruction set extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11

R2023a

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2

New IIR filter design blocks with tunable filter specifications . . . . . . . . . . 4-2
New Variable FIR Decimation and Variable FIR Interpolation blocks with
tunable rate conversion factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
Normalized frequency in certain filtering blocks and System objects . . . . . 4-2
Support for arbitrary input frame length in DSP System Toolbox blocks . . 4-2
Support for arbitrary input frame length in DSP System Toolbox objects
...................................................... 4-3
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 4-3

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

Spectrum Analyzer with new toolstrip interface in Simulink . . . . . . . . . . . 4-5


Filter Visualizer Block: Visualize magnitude and phase responses of time-
varying digital filters in Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7
Normalized frequency in dsp.DynamicFilterVisualizer . . . . . . . . . . . . . . . . 4-9
Enhancements to spectrumAnalyzer object . . . . . . . . . . . . . . . . . . . . . . . . 4-9

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10

vi Contents
Enhancements to Upsample, Downsample, and Repeat blocks . . . . . . . . 4-10
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 4-10

Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-11

Support for arbitrary input frame length in Zoom FFT block . . . . . . . . . . 4-11
Support for arbitrary input frame length in dsp.ZoomFFT object . . . . . . . 4-11
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 4-11

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13

Generate SIMD code for FIR Interpolation and FIR Decimation blocks on all
Intel platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Dataflow subsystems support variable-size signals . . . . . . . . . . . . . . . . . 4-13

Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14

Certain System objects have been removed . . . . . . . . . . . . . . . . . . . . . . 4-14

R2022b

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2

Enhancements to Fourth-Order Section Filter block . . . . . . . . . . . . . . . . . 5-2


Support for arbitrary input frame length in DSP System Toolbox blocks . . 5-2
Support for arbitrary input frame length in DSP System Toolbox objects
...................................................... 5-3
IIR design methods design dsp.SOSFilter object instead of dsp.BiquadFilter
object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 5-4

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7

Enhancements to the spectrumAnalyzer object . . . . . . . . . . . . . . . . . . . . . 5-7


Enhancements to Data Cursor Measurements . . . . . . . . . . . . . . . . . . . . . . 5-8
Enhancements to the dsp.DynamicFilterVisualizer object and the Dynamic
Filter Visualizer UI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Configure dsp.DynamicFilterVisualizer measurements programmatically
...................................................... 5-9
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 5-9

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10

Support for arbitrary input frame length in Downsample block . . . . . . . . 5-10


Support for variable-size input signals in Upsample and Repeat blocks . . 5-10
Variable-sized output frames in dsp.ColoredNoise object . . . . . . . . . . . . . 5-10
Support for OPUS audio files in DSP System Toolbox . . . . . . . . . . . . . . . 5-10

Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11

New CCDF measurement mode in Power Meter block . . . . . . . . . . . . . . . 5-11


New Overlap length parameter in certain moving statistics blocks . . . . . 5-11

vii
Support for arbitrary input frame length in DSP System Toolbox blocks . 5-11
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 5-11

AI for DSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13

New Wavelet Scattering block: Model wavelet scattering network in


Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14

Improved speed performance in certain DSP System Toolbox features . . 5-14


Optimized C code generation for dsp.SOSFilter object on ARM Cortex-M
processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Generate SIMD code for Discrete FIR Filter block on all Intel platforms
..................................................... 5-15

R2022a

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2

Fourth-Order Section Filter Block: Implement a cascade of fourth-order


section filters in Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
New outputDelay Function: Determine delay in multirate filter System
objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Enhancements to LMS Update block: Multifilter and adaptive linear
combiner support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Kaiser-window-based design method for FIR halfband decimator and
interpolator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Certain IIR frequency transformation functions now support higher-order
section filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
Farrow Rate Converter block supports variable-size input signal and
arbitrary input frame size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 6-5

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7

Spectrum Analyzer with better responsiveness and toolstrip interface for


analysis, estimation, and measurement parameters . . . . . . . . . . . . . . . 6-7
Improved filter response visualization in certain DSP System Toolbox blocks
...................................................... 6-9
Time Scope MATLAB object and Array Plot now support additional signal
statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Configure timescope measurements programmatically . . . . . . . . . . . . . . 6-10
Configure dsp.ArrayPlot measurements programmatically . . . . . . . . . . . 6-11
Array Plot block supports multiple frame sizes . . . . . . . . . . . . . . . . . . . . 6-11
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 6-11

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-14

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 6-14

Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15

viii Contents
New CCDF measurement mode in powermeter System object . . . . . . . . . 6-15
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 6-15

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16

iirnotch, iirpeak, iircomb, and designMultirateFIR functions now support


nonconstant inputs during code generation . . . . . . . . . . . . . . . . . . . . 6-16
Improved speed performance in certain DSP System Toolbox features . . 6-16
Dataflow simulation analysis using the Multicore tab . . . . . . . . . . . . . . . 6-18
Buffer and Unbuffer blocks now support code generation for Simulink Real-
Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Nonrecursive code generation in DCT and IDCT blocks . . . . . . . . . . . . . 6-18
To Workspace block inside a Dataflow Subsystem block supports
multithreaded execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 6-19

Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 6-26

R2021b

Digital Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2

New default filter design for FIR rate conversion objects . . . . . . . . . . . . . 7-2
New automatic design for FIR rate conversion objects . . . . . . . . . . . . . . . 7-3
Complex support for SOS filter coefficients . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Arbitrary frame size support for dsp.FarrowRateConverter . . . . . . . . . . . . 7-4
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 7-4

Scopes and Visualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5

Spectrum Analyzer CCDF measurement reference line changed . . . . . . . . 7-5


dsp.ArrayPlot supports multiple frame sizes . . . . . . . . . . . . . . . . . . . . . . . 7-5

Discrete-Time Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6

Tunable Filename property for dsp.AudioFileWriter and


dsp.AudioFileReader objects in generated code . . . . . . . . . . . . . . . . . . 7-6
Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 7-6

Transforms, Estimation, and Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8

Specify overlap length in moving statistics objects . . . . . . . . . . . . . . . . . . 7-8


Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 7-8

Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10

Improved speed performance for certain DSP System Toolbox features . . 7-10
SIMD Code Generation: New code replacement library (CRL) customized
for DSP System Toolbox features . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11

ix
POSIX threads (Pthreads) and OpenMP threading support for multicore
custom targets using dataflow domain . . . . . . . . . . . . . . . . . . . . . . . . 7-12
Enhancements for Multicore tab analysis results . . . . . . . . . . . . . . . . . . 7-12
dspunfold does not support Xcode 12.0 or later . . . . . . . . . . . . . . . . . . . 7-12

Linear Algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . 7-13

R2021a

Multicore tab for Dataflow: Analyze and configure multicore execution for
Simulink models using Dataflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

Rationally oversampled channelizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

In-Place Memory Optimization: Optimize the memory usage in the


generated code for certain DSP System Toolbox features . . . . . . . . . . . 8-2

Fractional delay FIR filter design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2

Power Meter: Measure power of voltage signal in MATLAB and Simulink


.......................................................... 8-3

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox features . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3

Improved filter response visualization for certain DSP System Toolbox


blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

Improved Speed Performance in Accelerator Mode for specific blocks in


DSP System Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

Improved display for Array Plot block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-8

Variable-sized input support for timescope object . . . . . . . . . . . . . . . . . . 8-10

One-Based index support for Peak Finder block . . . . . . . . . . . . . . . . . . . . 8-10

Removal of the oversampling ratio functionality . . . . . . . . . . . . . . . . . . . 8-10

Digital down-converter (DDC) and digital up-converter (DUC) examples


for FPGA (requires HDL Coder license for code generation) . . . . . . . . 8-10

Objects being removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11


Certain System objects will be removed . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Certain System objects have been removed . . . . . . . . . . . . . . . . . . . . . . 8-12
dsp.TimeScope will be removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13

Blocks being removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13


Certain blocks will be removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13

x Contents
Blocks that have been removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13

R2020b

New time scope object: Visualize signals in the time domain . . . . . . . . . . 9-2
Scopes Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
Measurements Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox features . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3

One-sided short-time Fourier transform in dsp.STFT and dsp.ISTFT


objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4

In-place Memory Optimization: Optimize the memory usage in the


generated code for certain DSP System Toolbox blocks . . . . . . . . . . . . . 9-5

Improved Speed Performance in Accelerator Mode for specific blocks in


DSP System Toolbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7

Visualize logged Stateflow states in the Logic Analyzer . . . . . . . . . . . . . . . 9-7

HDL-optimized FIR Decimation block and System object: Downsample


signals using a FIR decimation filter with a hardware-friendly interface
and architecture (requires HDL Coder for code generation) . . . . . . . . . 9-7

Gigasample-per-second (GSPS) CIC Decimation and CORDIC Algorithm:


Increase throughput of HDL-optimized CIC decimation and complex-to-
magnitude-angle conversion by using frame-based input (requires HDL
Coder for code generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7

Dataflow domain analysis integrated with Performance Advisor . . . . . . . 9-8

MATLAB Compiler support for dsp.ArrayPlot . . . . . . . . . . . . . . . . . . . . . . . 9-8

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8


dsp.TimeScope will be removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Spectrum Analyzer block defaults changed . . . . . . . . . . . . . . . . . . . . . . . . 9-8
HDL Minimum Resource FFT and HDL Streaming FFT blocks have been
removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Matrix Viewer and Waterfall blocks will be removed . . . . . . . . . . . . . . . . . 9-9

R2020a

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2
FIR Interpolation and FIR Decimation blocks . . . . . . . . . . . . . . . . . . . . . 10-2

xi
LMS Filter block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2

Automatically leverage SIMD for multicore dataflow simulations . . . . . 10-2

New Biquadratic SOS Filter Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-2

Multirate processing in FIR Rate Conversion block . . . . . . . . . . . . . . . . . 10-2

Non-Maximally Decimated Channelizers . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3

Complex Support for Channelizer and Channel Synthesizer Prototype


Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3

Enhancements to designMultirateFIR function . . . . . . . . . . . . . . . . . . . . 10-3

UDP Sender supports large message sizes . . . . . . . . . . . . . . . . . . . . . . . . 10-3

Variable CIC Decimation Factor: Specify decimation factor as an input to


the CIC Decimation HDL Optimized block (requires HDL Coder for
code generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-3

Gigasample-per-second (GSPS) NCO: Generate frame-based output from


HDL-optimized NCO for high speed applications (requires HDL Coder
for code generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4

Suggestions for optimal model settings in Dataflow Simulation Assistant


......................................................... 10-4

Dataflow subsystems supported in model reference simulation targets


......................................................... 10-4

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 10-4


Removal of DirectFeedthrough property in dsp.VariableIntegerDelay System
object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
dsp.AudioPlayer and dsp.AudioRecorder objects removed . . . . . . . . . . . . 10-4
HDL-optimized NCO requires valid input port . . . . . . . . . . . . . . . . . . . . . 10-5
HDL-optimized NCO with floating-point inputs applies phase quantization
..................................................... 10-5
NCO HDL Optimized block now ignores LUTRegisterResetType parameter
..................................................... 10-6
Signal data no longer streams to the Logic Analyzer when signal logging is
disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6

R2019b

SIMD code from Discrete FIR Filter Block: Generate optimized code
using Intel AVX2 for FIR Filters in Simulink . . . . . . . . . . . . . . . . . . . . 11-2

HDL-optimized CIC Decimation block and System object: Downsample


signals using a cascade integrator-comb (CIC) filter (requires HDL
Coder for code generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-2

xii Contents
Discrete FIR Filter HDL Optimized block: Filter using complex coefficient
values (requires HDL Coder for code generation) . . . . . . . . . . . . . . . . 11-2

Improved display for dsp.DynamicFilterVisualizer . . . . . . . . . . . . . . . . . . 11-2

Improved display for dsp.ArrayPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3

dsp.MatrixViewer support for multiple cursor measurements . . . . . . . . 11-4

Playback control behavior changed for scopes in referenced models . . 11-5

Output of colored noise generator can be bounded . . . . . . . . . . . . . . . . . 11-5

Blocks with finite states supported for unfolding in Dataflow subsystems


......................................................... 11-5

Simulate Dataflow subsystems using multiple threads in Rapid


Accelerator mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5

Virtual bus support at Dataflow subsystem boundaries for heterogeneous


signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 11-6


Certain System objects will be removed . . . . . . . . . . . . . . . . . . . . . . . . . 11-6

R2019a

Direct and Inverse Short-Time Fourier Transform: Analyze and process


streaming signals in the frequency domain and synthesize them with
perfect reconstruction using overlap and add . . . . . . . . . . . . . . . . . . . 12-2

Fourth-Order Section Filter: Model and simulate cascaded fourth-order


section IIR filters in MATLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-2

Spectrum Analyzer improvements for exponential averaging, mixed-


complexity inputs, and MATLAB script generation . . . . . . . . . . . . . . . 12-2
Smooth data with exponential averaging . . . . . . . . . . . . . . . . . . . . . . . . . 12-2
Display block inputs with different complexity . . . . . . . . . . . . . . . . . . . . 12-2
Generate MATLAB script from dsp.SpectrumAnalyzer . . . . . . . . . . . . . . . 12-2

Exponential Spectrum Averaging: Smooth spectrum estimation and


analysis efficiently over time using exponential averaging . . . . . . . . . 12-3

Complex Data over UDP: Send and receive complex data directly over
UDP in MATLAB and Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3

Stream signals only from a defined interval within audio files when using
the From Multimedia File block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4

xiii
New targets supported for multicore code generation from a dataflow
subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4

Blocks with constant sample times supported in dataflow subsystems


......................................................... 12-4

Improve simulation performance of dataflow subsystems using the


Dataflow Simulation Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-4

Identify scopes unsupported for multithreading in dataflow subsystems at


edit-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-5

Use the Timing Legend to highlight blocks in a dataflow domain . . . . . 12-6

Discrete FIR Filter HDL Optimized block: Use programmable coefficients


with a fully parallel systolic architecture (requires HDL Coder for code
generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7

Discrete FIR Filter HDL Optimized block: Optimize symmetric and


antisymmetric coefficients and optional reset port for a partly serial
systolic architecture (requires HDL Coder for code generation) . . . . 12-7

HDL code generation support for programmable coefficients with frame-


based Discrete FIR Filter block (requires HDL Coder for code
generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7

dsp.MatrixViewer System object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7

DSP System Toolbox Support Packages for ARM Cortex -A and ARM
Cortex -M Processors will be removed . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 12-8


Certain System objects will be removed . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
Parametric EQ Filter block has been removed . . . . . . . . . . . . . . . . . . . . . 12-8
Changes to Discrete FIR Filter HDL Optimized serial filter parameters
..................................................... 12-9

R2018b

Dataflow: Accelerate your model using multi-threading and derive frame


sizes automatically for multirate signal processing in Simulink . . . . 13-2

Programmatic Interface for Spectrum Analyzer Measurements: Configure


measurements programmatically and obtain numerical results for
further processing or analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2

Dynamic Filter Visualization: Visualize the magnitude response of time-


varying digital filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2

xiv Contents
Optimized Multistage Multirate Filters: Design multistage decimation
and interpolation FIR filters based on requirements for response and
implementation cost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3

Sample Range for Audio File Reader: Stream signals only from a defined
interval within audio files when using the dsp.AudioFileReader System
object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3

Faster Channelizer and Channel Synthesizer: Simulate polyphase FFT


filters faster by leveraging additional parallel optimizations . . . . . . . 13-3

Peek Functionality in dsp.AsyncBuffer System object . . . . . . . . . . . . . . . 13-3

dsp.AudioFileReader System object supports http streams . . . . . . . . . . . 13-4

Improved Logic Analyzer performance for multichannel signals . . . . . . 13-4

HDL code generation support for complex input signals or complex


coefficients of frame-based Discrete FIR Filter and FIR Decimation
blocks (requires HDL Coder for code generation) . . . . . . . . . . . . . . . . 13-4

Discrete FIR Filter HDL Optimized: Select transposed architecture,


optimize symmetric and antisymmetric coefficients, and enable reset
port (requires HDL Coder for code generation) . . . . . . . . . . . . . . . . . . 13-4

Functionality being removed or changed . . . . . . . . . . . . . . . . . . . . . . . . . 13-5


Vector Scope block has been removed . . . . . . . . . . . . . . . . . . . . . . . . . . 13-5
Certain linear prediction System objects will be removed . . . . . . . . . . . . 13-5
Cell array support removed for dsp.AllpassFilter coefficients . . . . . . . . . 13-6

xv
1

R2024b

Version: 24.2

New Features

Bug Fixes

Compatibility Considerations
R2024b

Digital Filters

Multirate Filter Design Improvements: New design function and


design options
New designRateConverter: Design a multistage bandlimited sample rate converter System
object

Design a multistage bandlimited sample rate converter using the new designRateConverter
function in MATLAB®.

You can design the rate converter by specifying a rate conversion ratio or input and output
frequencies. In addition, you can specify the bandwidth of interest, maximum number of stages, and
tolerance for conversion ratio.

designHalfbandFIR function: Support for minimum and maximum phase designs

The designHalfbandFIR function now supports minimum and maximum phase response types for
the equiripple design method.

designMultirateFIR function: Support for equiripple design method and non-overlapping


transition bands

The designMultirateFIR function now supports the equiripple design method and non-overlapping
transition bands using the new DesignMethod and OverlapTransition properties.

1-2
Digital Filters

New dsp.MIMOFIRFilter: Model MIMO systems and specify multiple


paths between signal pairs in MATLAB
The new dsp.MIMOFIRFilter object models multiple-input multiple-output (MIMO) systems by
supporting multiple FIR filters in the time domain. You can also specify multiple paths between each
input and output pair.

New dsp.VariableFIRDecimator and dsp.VariableFIRInterpolator


objects with tunable rate conversion factors
Using the new dsp.VariableFIRDecimator and dsp.VariableFIRInterpolator objects in
MATLAB, you can implement an efficient polyphase FIR decimator and interpolator with a tunable
rate conversion factor. You can update the rate conversion factor and the filter coefficients during
simulation.

When you specify the rate conversion factor, if the input frame length changes (variable-size signal)
during simulation, the output frame length also changes in order to keep the rate conversion factor
constant. When you specify the output frame length instead of the rate conversion factor, and if the
input frame length changes (variable-size signal) during simulation, the rate conversion factor also
changes in order to keep the output frame length constant.

1-3
R2024b

Support for filter analysis in dsp.DCBlocker and


dsp.ComplexBandpassDecimator objects
Starting in R2024b:

• The dsp.DCBlocker object supports certain filter analysis functions listed in “Analysis Functions
for Filter System Objects” when you set its Algorithm property to 'FIR', 'IIR', or 'CIC'. For
more information, see the Version History section in the individual analysis function reference
pages.
• The dsp.ComplexBandpassDecimator object supports the filterAnalyzer object and the
Filter Analyzer app.

Specify normalized frequencies in digital down-converter and digital


up-converter objects and blocks
Starting in R2024b, you can specify the bandwidth, stopband frequency, and center frequency in
normalized frequency units (0 to 1) for these objects and blocks.

• dsp.DigitalDownConverter object and Digital Down-Converter block


• dsp.DigitalUpConverter object and Digital Up-Converter block

To enable this behavior in the objects, set the NormalizedFrequency property to true. To enable
this behavior in the blocks, set the Sample rate mode parameter to Use normalized frequency
(0 to 1):

For more details, see the Version History section in the reference pages.

1-4
Digital Filters

Specify normalized frequencies in complex bandpass decimator object


and block
Starting in R2024b, you can specify the center frequency, bandwidth, and the transition width in
normalized frequency units (0 to 1) for the dsp.ComplexBandpassDecimator object and the
Complex Bandpass Decimator block.

To enable this behavior in the object, set the NormalizedFrequency property to true. To enable
this behavior in the block, set the Sample rate mode parameter to Use normalized frequency
(0 to 1).

For more details, see the Version History section in the reference pages.

Specify data type of filter coefficients explicitly in design functions


In these design functions, you can now specify the data type of filter coefficients explicitly using the
Datatype and like arguments.

• designMultirateFIR
• designFracDelayFIR
• designLowpassFIR
• designHighpassFIR
• designBandpassFIR
• designBandstopFIR
• designLowpassIIR
• designHighpassIIR
• designBandpassIIR
• designBandstopIIR
• designHalfbandFIR

designMultistageInterpolator function: Change in upper limit for


transition width argument
Starting in R2024b, the transition width (TW) argument in designMultistageInterpolator
function must be less than the input sample rate Fs. The default value of TW has changed to 0.2×Fs
instead of 0.2×Fs/L, where L is the overall interpolation factor. For more information on how to
replace your existing code, see the Version History section in the function reference page.

Functionality being removed or changed


Certain mfilt objects have been removed
Errors

These mfilt objects have been removed in R2024b. Use these System objects instead.

Function Recommended Replacement


mfilt.firsrc dsp.FIRRateConverter

1-5
R2024b

Function Recommended Replacement


mfilt.cascade dsp.FilterCascade

dsp.BiquadFilter object will be removed


Warns

The dsp.BiquadFilter object issues a warning and will be removed in a future release. Use the
dsp.SOSFilter object instead. The dsp.SOSFilter object has these advantages:

• Supports filter coefficients in the form of Numerator and Denominator coefficient matrices. This
format is better suited with the existing filter design, implementation, and visualization tools in
DSP System Toolbox.
• Supports tunable coefficients and scale values properties whose values can change during filter
design and analysis.
• Allows you to not specify scale values for each section through the HasScaleValues property.

For a replacement IIR filter that supports HDL code generation, use the dsphdl.BiquadFilter
object. For an example, see “Generate HDL Code for IIR Filter” (DSP HDL Toolbox).

For more information on how to replace your existing code, see the Version History section in the
dsp.BiquadFilter reference page.

Filter Realization Wizard block will be removed


Still runs

The Filter Realization Wizard block will be removed in a future release. Currently, there is no
replacement.

Certain filtering blocks have been removed

These blocks have been removed and moved to the obsolete library. Existing instances of the blocks
continue to run. For new models, use the replacement blocks instead.

Block Recommended Replacement


Bandpass Filter To design the filter, use the Bandpass FIR Filter
Design or the Bandpass IIR Filter Design blocks.

To filter the signal using this design, use the


Discrete FIR Filter, Second-Order Section Filter,
or the Fourth-Order Section Filter blocks.
Bandstop Filter To design the filter, use the Bandstop FIR Filter
Design or the Bandstop IIR Filter Design blocks.

To filter the signal using this design, use the


Discrete FIR Filter, Second-Order Section Filter,
or the Fourth-Order Section Filter blocks.
Hilbert Filter Discrete FIR Filter, Second-Order Section Filter
Arbitrary Response Filter Discrete FIR Filter, Second-Order Section Filter
Comb Filter Discrete FIR Filter, Second-Order Section Filter

1-6
Digital Filters

Block Recommended Replacement


Nyquist Filter Discrete FIR Filter, Second-Order Section Filter
CIC Filter CIC Decimation, CIC Interpolation
Inverse Sinc Filter Discrete FIR Filter, Second-Order Section Filter
Audio Weighting Filter Weighting Filter
Octave Filter Octave Filter

These blocks have been completely removed. Existing instances of the blocks are automatically
replaced with the replacement blocks. For new models, use the replacement blocks.

Block Recommended Replacement


Overlap-Save FFT Filter Frequency-Domain FIR Filter
Overlap-Add FFT Filter Frequency-Domain FIR Filter
Parametric EQ Filter Single-Band Parametric EQ

1-7
R2024b

Scopes and Visualization

Spectrum analyzer now supports adaptive RBW and window


invariant samples per update
In R2024b, the spectrumAnalyzer object and the Spectrum Analyzer block support adaptable
resolution bandwidth (RBW) and window invariant samples per update.

Adaptive RBW: Display spectral data for any number of input samples and adjust RBW
accordingly

Previously, spectrum analyzer required a minimum number of samples to update the display for a
given RBW value. Starting in R2024b, this limitation is removed. The scope now updates its display
for any number of input samples and adjusts the RBW value accordingly.

Window Invariant Samples Per Update: Adjust RBW value to always require 1024 samples
per spectral update

The spectrum analyzer can now automatically adjust the resolution bandwidth (RBW) such that it
always requires 1024 samples per spectral update (Nsamples = 1024) irrespective of the window you
specify.

1-8
Scopes and Visualization

New color and styling properties in MATLAB scope objects


You can now customize the plot line, axes, and background color and style settings of the following
scope objects through the MATLAB command line.

• timescope
• spectrumAnalyzer
• dsp.ArrayPlot
• dsp.DynamicFilterVisualizer

Array Plot: Support for bar plots


The array plot now supports bar plots. To view the data in a bar plot:

• In the dsp.ArrayPlot object, set PlotType to "Bar". You can set the base value of the bar plot
and the relative width of the individual bars using the PlotBaseValue and BarWidth properties.
• In the Array Plot block, set Plot Type to Bar in Array Plot settings > Color and Styling. To adjust
the relative width of the individual bars, set Width in the Array Plot settings.

Array Plot: Support for multiple displays


Using the new LayoutDimensions property, you can now specify the dsp.ArrayPlot object to
have multiple displays. When you specify [2 2] for example, the scope shows four displays arranged in
a 2-by-2 matrix. The display grid can have a maximum of 10 rows and 10 columns.

In the Array Plot block, click the new Display Grid property in the Scope tab and select a layout. You
can select up to a maximum of five rows and five columns.

1-9
R2024b

Array Plot: Specify active display


Active display refers to the scope display, which you can modify through the Array Plot settings.
Settings include y-axis limits, axis labels, title, grid, legend, and magnitude and phase plots.

You can now specify the active display using the ActiveDisplay property in the dsp.ArrayPlot
object and the Active Display property in the Array Plot block UI.

Array Plot: Magnitude Phase Plot property is now available in array


plot settings
The Magnitude Phase property has been renamed to Magnitude Phase Plot and is now available
in the Array Plot settings > Display and Labels. The Magnitude Phase property is no longer
available in the array plot toolstrip.

Array Plot: Show Legend property is now also available in array plot
settings
The Show Legend property is now also available in the Array Plot settings > Display and Labels. To
control the legend display, you can select Legend in the Scope tab of the array plot toolstrip or
select the Show Legend property in the array plot settings.

Higher display precision in scope UI


You can now increase the display precision of the following scopes to 15 digits using the Display
Precision property in the scope settings. This precision affects all the measurements data and the
data the scope displays in its status bar.

• timescope object
• spectrumAnalyzer object and Spectrum Analyzer block
• dsp.ArrayPlot object and Array Plot block
• dsp.DynamicFilterVisualizer object and Filter Visualizer block

timescope object supports up to 100 displays


You can now set the LayoutDimensions property of the timescope object to [10 10], that is, the
display grid can have up to 10 rows and 10 columns making it a total of 100 displays.

Logic Analyzer: Save and restore views


You can now save the current Logic Analyzer view as MLDATX file and open it later. A Logic Analyzer
view saves the signal layout and appearance characteristics without saving the data. Specifically, a
view saves the signal names, signal groups, dividers, and their respective settings, including their
order.

Note Saving of Stateflow® signals is not supported.

1-10
Scopes and Visualization

To save the current view, in the Logic Analyzer app, on the Logic Analyzer tab, click Save View or
press Ctrl+S. To open a saved view file, click Open View or press Ctrl+O.

To save a Logic Analyzer view, use only the Logic Analyzer app. This feature is not supported in the
dsp.LogicAnalyzer System object™.

For more information, see “Save and Restore Views”.

Logic Analyzer: Configure axes theme


You can now configure the axes theme in the Logic Analyzer app. To configure the axes theme, in the
app, select Settings from the toolstrip. A global settings dialog box opens. Set Axes Theme to one of
these options:

• Black (default) — Set the background color of the Logic Analyzer display to black (dark).
• White — Set the background color of the Logic Analyzer display to white (light).
• Auto — Match the background color of the Logic Analyzer display with the MATLAB theme.

Spectrum Analyzer: Support for 64 ACPR offset pairs


Starting in R2024b, the number of ACPR offset pairs that the spectrum analyzer supports has
increased from 12 to 64. You can now set the NumOffsets property in the
ChannelMeasurementsConfiguration object to 64. On the UI, you can now specify Num Pairs in
the Channel Measurements tab to 64.

1-11
R2024b

Preserve Colors is now available in scope toolstrip


The Preserve colors for copy to clipboard property has been renamed to Preserve Colors and is
now available in the toolstrip under Copy Display for these scopes.

• timescope object
• spectrumAnalyzer object and Spectrum Analyzer block
• dsp.ArrayPlot object and Array Plot block
• dsp.DynamicFilterVisualizer object and Filter Visualizer block

Enhancements to Filter Visualization: New visualize function and


changes to existing visualize functions
visualizeFilterStages function has been renamed to visualize

The visualizeFilterStages function has been renamed to visualize.

• dsp.DigitalDownConverter and dsp.DigitalUpConverter objects support this visualize


function.
• dsp.ComplexBandpassDecimator and dsp.SampleRateConverter objects support this
visualize function.

Existing instances of the visualizeFilterStages function continue to run. For new instances, use
the appropriate visualize function.

visualize launches MATLAB figure

The visualize function supported by the dsp.DigitalDownConverter,


dsp.DigitalUpConverter, dsp.ComplexBandpassDecimator, and
dsp.SampleRateConverter objects now launches a MATLAB figure instead of FVTool to display the
magnitude response of the filters.

New visualize function for dsp.FrequencyDomainFIRFilter and dsp.MIMOFilter objects

The dsp.FrequencyDomainFIRFilter and the dsp.MIMOFilter objects model multiple filter


paths between each input and output pair in frequency and time domains. Using the new visualize
function, you can view the frequency response of these filters individually or the effective frequency
response between each of the input and output pairs.

1-12
Scopes and Visualization

Functionality being removed or changed


FVTool will be removed
Still runs

FVTool will be removed in a future release. Use Filter Analyzer instead. There are differences that
require updates to your code.

Consider these filters:

[b,a] = ellip(5,5,60,[0.2 0.45]);


dFd = dsp.FIRFilter;
fdfir = dsp.FrequencyDomainFIRFilter;
channelizer = dsp.Channelizer;
caf = dsp.CoupledAllpassFilter;
ddc = dsp.DigitalDownConverter;
duc = dsp.DigitalUpConverter;

These tables show how to update your existing code.

Original Code in R2024a or Earlier Updated Code in R2024b


fvtool(b,a,dFd) filterAnalyzer(b,a,dFd)
fvtool(b,a,dFd,Analysis="freq") filterAnalyzer(b,a,dFd, ...
Analysis="magnitude",Overlay="phase")
fvtool(b,a,Fs=1000) filterAnalyzer(b,a,SampleRates=1000)

1-13
R2024b

Original Code in R2024a or Earlier Updated Code in R2024b


fvtool(b,a,dFd,NumberofPoints=512, ... filterAnalyzer(b,a,dFd,NFFT=512, ...
FrequencyRange="[0, 2pi)", ... FrequencyRange="twosided", ...
FrequencyScale="Log") FrequencyScale="log")
hfvt = fvtool(dFd); fa = filterAnalyzer(dFd);
addfilter(hfvt,dfilt.df1(b,a)) addFilters(fa,b,a)
hfvt = fvtool(dFd); fa = filterAnalyzer(dFd,FilterNames="df");
setfilter(hfvt,dfilt.df1(b,a)) replaceFilters(fa,b,a,FilterNames="df")
hfvt = fvtool(b,a,dFd); fa = filterAnalyzer(b,a,dFd, ...
deletefilter(hfvt,2) FilterNames=["ba" "dFd"]);
deleteFilters(fa,FilterNames="dFd")
hfvt = fvtool(b,a,dFd); filterAnalyzer(b,a,dFd, ...
legend(hfvt,"ba","dFd") FilterNames=["ba" "dFd"])
hfvt = fvtool(b,a,dFd); fa = filterAnalyzer(b,a,dFd);
zoom(hfvt,[0.4 0.7 -30 0]) zoom(fa,"xy",[0.4 0.7 -30 0])
fvtool(b,a,dFd,Analysis="noisepower") filterAnalyzer(b,a,dFd,Analysis="noisepsd")

Original Code in R2024a or Earlier Updated Code in R2024b


fvtool(fdfir) visualize(fdfir)
fvtool(channelizer) freqz(channelizer)
fvtool(channelizer,(1:4)) freqz(channelizer,(1:4))
fvtool(channelizer,(1:4),... freqz(channelizer,(1:4),...
Fs=44100,NFFT=1024) Fs=44100,NFFT=1024)
fvtool(channelizer,(1:4),... freqz(channelizer,(1:4),...
Fs=44100,NFFT=1024,overall=true) Fs=44100,NFFT=1024,overall=true)
fvtool(caf) freqz(caf)
fvtool(ddc,Arithmetic="fixed-point") visualize(ddc,Arithmetic="fixed-point")
fvtool(duc,Arithmetic="fixed-point") visualize(duc,Arithmetic="fixed-point")

The second order sections (SOS) format is not supported in Filter Analyzer. Use the “Cascaded
Transfer Functions” format instead. Given a filter specified as an SOS matrix sos, you must make the
following updates to your code.

Original Code in R2024a or Earlier Updated Code in R2024b


fvtool(sos) filterAnalyzer(sos(:,1:3),sos(:,4:6))

or

[ctfNum,ctfDen] = sos2ctf(sos);
filterAnalyzer(ctfNum,ctfDen)
hfvt = fvtool(sos); [ctfNum,ctfDen] = sos2ctf(sos);
set(hfvt.SOSViewSettings, ... fa = filterAnalyzer(ctfNum,ctfDen, ...
View="cumulative") CTFAnalysisMode="cumulative");
hfvt = fvtool(sos); [ctfNum,ctfDen] = sos2ctf(sos);
set(hfvt.SOSViewSettings, ... fa = filterAnalyzer(ctfNum,ctfDen, ...
View="userdefined", ... CTFAnalysisMode="specify", ...
UserDefined={3,1}) CTFAnalysisSections={3,1});

1-14
Scopes and Visualization

Calling design() with no output arguments no longer launches Filter Visualization Tool
Behavior change in future release

Starting in R2024b, when you call design(Systemobject=true) with these fdesign.response


objects but do not specify any output arguments, the design function creates a filter System object
and no longer uses the Filter Visualization Tool.

Waterfall has been removed

The Waterfall block has been completely removed. Existing instances of the block no longer work.
There is no direct replacement for this block.

1-15
R2024b

Discrete-Time Signals

Functionality being removed or changed


dsp_links will be removed
Warns

The dsp_links function warns in R2024b and will be removed in a future release.

MIDI Controls block now requires Audio Toolbox

The MIDI Controls block now requires Audio Toolbox™.

Certain blocks have been removed

These blocks have been completely removed. Existing instances of the blocks are automatically
replaced with the replacement blocks. For new models, use the replacement blocks.

Block Recommended Replacement


From Audio Device Audio Device Reader
To Audio Device Audio Device Writer

These blocks have been completely removed. Existing instances of the blocks no longer work. There
is no direct replacement for these blocks.

• Scalar Quantizer Design –– Consider using Scalar Quantizer Encoder and Scalar Quantizer
Decoder blocks.
• Vector Quantizer Design –– Consider using Vector Quantizer Encoder and Vector Quantizer
Decoder blocks.

1-16
Transforms, Estimation, and Statistics

Transforms, Estimation, and Statistics

Specify normalized frequencies in Zoom FFT object and block


Starting in R2024b, you can specify the center frequency in normalized units (−1 to 1) for the
dsp.ZoomFFT object and the Zoom FFT block.

To enable this behavior in the object, set the NormalizedFrequency property to true. To enable
this behavior in the block, set the Sample rate mode parameter to Use normalized frequency
(0 to 1).

For more details, see the Version History section in the reference pages.

1-17
R2024b

AI for DSP

Deep Signal Anomaly Detector block supports LSTM forecaster model


The Deep Signal Anomaly Detector block now supports the LSTM forecaster model. To generate this
model, set ModelType to "lstmforecaster" in the deepSignalAnomalyDetector function when
creating the signal anomaly detector. You can then export the trained network and detector
parameters to a MAT file using the saveModel function, and load the MAT file into the Deep Signal
Anomaly Detector block.

New AI deployment example


“Real-Time Noise Detection on Raspberry Pi Using Deep Signal Anomaly Detector” –– Detect the
presence of noise in sinusoidal signals on a Raspberry Pi device using Simulink® Support Package for
Raspberry Pi® Hardware and Deep Signal Anomaly Detector block from DSP System Toolbox.

1-18
Code Generation

Code Generation

Generate SIMD code for Apple platforms by using configuration


parameters
In R2024b, if you have Embedded Coder®, you can generate SIMD code for Apple platforms by using
the model configuration parameter Leverage target hardware instruction set extensions. The
parameter supports SIMD code generation for maca64 host computers and hardware targets with
Device vendor set to Apple and Device type set to ARM64. Before R2024b, to generate SIMD
instructions for these targets, you had to use a GCC ARM® Cortex®-A code replacement library.

To generate SIMD code for these hardware targets, set Leverage target hardware instruction set
extensions to Neon v7. For more information, see “Use Target Hardware Instruction Set Extensions
to Generate SIMD Code from Simulink Blocks for Apple silicon”.

Generate SIMD code for ARM Cortex-A hardware boards by using


configuration parameters
In R2024b, if you have Embedded Coder, you can generate SIMD code for Hardware board targets
that have Device type set to ARM Cortex-A (32-bit) or ARM Cortex-A (64-bit) by using the
model configuration parameter Leverage target hardware instruction set extensions. Before
R2024b, to generate SIMD instructions for these targets, you had to use a GCC ARM Cortex-A code
replacement library.

To generate SIMD code for these hardware targets, set Leverage target hardware instruction set
extensions to Neon v7. For more information, see “Use Target Hardware Instruction Set Extensions
to Generate SIMD Code from Simulink Blocks for ARM Cortex-A Processors”.

New code generation application examples


This release introduces these new examples:

• “Code Generation for Interpolated FIR Filter” –– Design and implement a high-order FIR filter
efficiently using a cascade of multirate multistage filters. Generate C code from these filters.
• “Generate and Deploy SIMD Optimized Code for Interpolated FIR Filter on Intel Desktops” ––
Generate and deploy SIMD optimized code for a high-order FIR filter on Intel® desktops.
• “Deploy Parametric Audio Equalizer on ARM Cortex-M Processors” (Embedded Coder) –– Deploy
three-band parametric audio equalizer on ARM Cortex-M STM32F746G-Discoveryboard. You can
deploy this parametric equalizer on any supported ARM Cortex-M hardware.
• “Code Generation for Interpolated FIR Filter on ARM Cortex-M Target using CMSIS” (Embedded
Coder) –– Generate and run the optimized code using ARM Cortex-M CRL for a high order FIR
filter on the STM32F746G-Discovery hardware.

1-19
2

R2024a

Version: 24.1

New Features

Bug Fixes

Compatibility Considerations
R2024a

Digital Filters

freqzmr Function: Compute impulse response DTFT of single-rate or


multirate filters
Use the new freqzmr function to compute the Discrete-Time Fourier Transform (DTFT)
approximation of the impulse response of a multirate or a single-rate filter.

Use this function to perform frequency analysis in multirate filters, particularly in sample rate
converter designs where the freqz function is not supported

When you call the function with no output arguments, the function plots the magnitude and phase of
the impulse response DTFT and gives visual indication of multirate signal distortion.

Design Filter Live Editor Task: Design bandpass and bandstop digital
filters interactively
Starting in R2024a, if you have a DSP System Toolbox license, you can design and analyze these
digital filters interactively using the Design Filter Live Editor task.

• Bandpass FIR filter with Equiripple design method.


• Bandpass IIR filter with IIR least p-norm design method.
• Bandstop FIR filter with Equiripple design method.
• Bandstop IIR filter with IIR least p-norm design method.

The Live editor task automatically generates MATLAB code for your filter design. If you select the
Use a System object to implement filter parameter in the Design Filter Live Editor task UI, the
designfilt function generates a dsp.FIRFilter object for the bandpass and bandstop FIR filter
responses, and a dsp.SOSFilter object for the bandpass and bandstop IIR filter responses.

2-2
Digital Filters

2-3
R2024a

Channel Synthesizer Object and Block: Design an oversampled


channel synthesizer
Design an oversampled channel synthesizer by specifying the interpolation factor L such that it is an
integer multiple of the number of frequency bands M. The oversampling ratio is M/L.

You can now directly specify the interpolation factor in the dsp.ChannelSynthesizer object and
the Channel Synthesizer block.

Existing MATLAB scripts and Simulink models using the channel synthesizer continue to work in
R2024a.

If you export a model from R2024a to a previous release, and if you have set the Interpolation
factor parameter to a custom value, then an empty subsystem replaces the block in the previous
release. To fix this, set the Interpolation factor parameter to Number of frequency bands
before exporting.

Channelizer Block: Output each narrowband signal at a separate port


When you select the Bands as separate output ports (Max. of 16 bands) parameter in the
Channelizer block, the block outputs each narrowband signal at a separate port. The block can output
a maximum of 16 narrowband signals separately. When you clear this parameter, the block
concatenates all the narrowband signals to form a single output array.

2-4
Digital Filters

Channelizer Object and Block: Set decimation factor to equal to


number of frequency bands
You can now set the decimation factor in the dsp.Channelizer object and the Channelizer block to
equal the number of frequency bands. When you change the number of frequency bands, the
decimation factor changes automatically.

Existing MATLAB scripts and Simulink models using the dsp.Channelizer object and the
Channelizer block continue to run in R2024a.

dsp.FrequencyDomainFIRFilter Object: Partition numerator into


segments when you specify multiple filters
When you specify multiple filters in dsp.FrequencyDomainFIRFilter object, you can enable
partitioning on those filters to reduce latency.

Frequency-Domain FIR Filter Block: Model MIMO systems and specify


multiple paths between signal pairs
Starting in R2024a, the Frequency-Domain FIR Filter block can model multiple-input multiple-output
(MIMO) systems by supporting multiple filters in time and frequency domains. You can also specify
multiple paths between each input and output pair.

Tunable Filter Design Blocks: Renaming of blocks


In R2024a, these tunable FIR and IIR filter design blocks have been renamed.

Block Renamed to
Tunable Lowpass FIR Filter Lowpass FIR Filter Design
Tunable Lowpass IIR Filter Lowpass IIR Filter Design
Tunable Highpass FIR Filter Highpass FIR Filter Design
Tunable Highpass IIR Filter Highpass IIR Filter Design
Tunable Bandpass FIR Filter Bandpass FIR Filter Design
Tunable Bandpass IIR Filter Bandpass IIR Filter Design
Tunable Bandstop FIR Filter Bandstop FIR Filter Design
Tunable Bandstop IIR Filter Bandstop IIR Filter Design

Tunable Filter Design Blocks: Smooth tunable filter parameters


When tunable filter parameters change during simulation, the following blocks can smooth these
parameters until the desired value is reached. For more information on smoothing, see Parameter
Smoothing.

• Lowpass FIR Filter Design


• Lowpass IIR Filter Design

2-5
R2024a

• Highpass FIR Filter Design


• Highpass IIR Filter Design
• Bandpass FIR Filter Design
• Bandpass IIR Filter Design
• Bandstop FIR Filter Design
• Bandstop IIR Filter Design

designHalfbandIIR Function: Design filter using quasi-linear phase


design method
The designHalfbandIIR function now supports the quasi-linear phase design method.

Support for strict single precision arithmetic in design functions


When you specify any input argument as a single-precision value in the following functions, the
functions design single-precision filter coefficients and the code you generate from the functions uses
strict single-precision arithmetic.

• designMultirateFIR
• designFracDelayFIR (length-based design mode)
• designLowpassFIR
• designHighpassFIR
• designBandpassFIR
• designBandstopFIR
• designLowpassIIR
• designHighpassIIR
• designBandpassIIR
• designBandstopIIR
• designHalfbandFIR

designFracDelayFIR Function: New 'SystemObject' argument


You can now generate a dsp.FIRFilter object from the designFracDelayFIR function by setting
the 'SystemObject' argument to true.

designMultirateFIR Function: Replace half-polyphase length with


polyphase length
The half-polyphase length P input argument is discouraged in the designMultirateFIR function.
Use the new PolyphaseLength argument instead to specify the polyphase length 2P.

Existing instances of your code using the half-polyphase length continue to run, but it is
recommended that you replace this code to use the PolyphaseLength argument. For more
information on how to replace your code, see the Version History section in the
designMultirateFIR page.

2-6
Digital Filters

designMultirateFIR and designFracDelayFIR Functions: Support for


Name=Value syntax
Starting in R2024a, the designMultirateFIR and the designFracDelayFIR functions support
specifying the input arguments using the Name=Value syntax.

For more information on how to replace your code, see the Version History section in the function
reference pages.

dsp.AllpassFilter Object and Allpass Filter Block: Support for fourth-


order filter sections
When you set the filter structure to minimum multiplier, the dsp.AllpassFilter object and the
Allpass Filter block support fourth-order filter sections. You can specify the allpass polynomial
coefficients in the form of an N-by-4 matrix, where N is the number of filter sections.

dsp.IIRFilter object: Support for variable-size input signals


Starting in R2024a, the dsp.IIRFilter object supports variable-size input signals.

When the input is a variable-size signal, you can change the frame size (number of rows) of the signal
during simulation but the number of channels (columns) must remain constant.

Specify normalized frequencies in certain filtering blocks and System


objects
Starting in R2024a, you can specify normalized frequencies in frequency-based filter design
specifications for certain objects and blocks.

To enable this behavior, set the NormalizedFrequency property in these objects to true:

• dsp.NotchPeakFilter
• dsp.CICCompensationDecimator
• dsp.CICCompensationInterpolator

To enable this behavior, set the Sample rate mode parameter in these blocks to Use normalized
frequency (0 to 1):

• Notch-Peak Filter
• CIC Compensation Interpolator
• CIC Compensation Decimator

For more details, see the Version History section in the reference pages.

realizeModel Function: Create Simulink block equivalents for


dsp.CICDecimator and dsp.CICInterpolator objects
Using the new realizeModel function, you can generate a Simulink system equivalent for the
dsp.CICDecimator and dsp.CICInterpolator objects.

2-7
R2024a

Functionality being removed or changed


Value only syntax is discouraged in designMultirateFIR and designFracDelayFIR functions
Still runs

Starting in R2024a, specifying the arguments using the Value only syntax is discouraged in the
designMultirateFIR and designFracDelayFIR functions.

Existing instances of the functions using the Value only arguments continue to run but are
discouraged. Instead, specify the arguments using the Name=Value syntax. For more information on
how to replace your existing code, see the Version History section of the designMultirateFIR
and designFracDelayFIR functions.

cumsec function with no output arguments returns cell array of cumulative sections
Behavior change in future release

When you call the cumsec function with no output arguments, the function returns a cell array which
contains cumulative sections of the biquadratic filter. In previous releases, cumsec function with no
output arguments launched the Filter Visualization Tool to plot the magnitude response of the
cumulative sections.

You do not need to make any changes to your code. However, to plot the magnitude response of the
cumulative sections, use the fvtool function on the biquadratic filter object.

polyphase function with no output arguments returns polyphase matrix


Behavior change in future release

When you call the polyphase function with no output arguments, the function returns the polyphase
matrix of the multirate filter. In previous releases, polyphase function with no output arguments
launched Filter Visualization Tool with all the polyphase subfilters to allow you to analyze each
component subfilter individually.

You do not need to make any changes to your code. However, to analyze the individual subfilters, use
one of the functions in the Filter Analysis category on the individual polyphase component vectors.

For more information, see the Version History section in the polyphase function reference page.

Filter analysis functions no longer use Filter Visualization Tool


Behavior change in future release

The following filter analysis functions no longer use Filter Visualization Tool to plot the filter
responses. Starting in R2024a, when you call these functions with no output arguments, the functions
use the MATLAB plot instead.

• freqz
• phasez
• grpdelay
• phasedelay
• zerophase
• zplane
• impz

2-8
Digital Filters

• stepz
• freqrespest
• noisepsd

You do not need to make any changes to your code.

Certain functions will be removed


Still runs

These functions will be removed in a future release. For more information on how to replace your
existing code, see the Version History section in the corresponding reference pages.

Function Use This Instead


iirnotch designNotchPeakIIR
iirpeak designNotchPeakIIR
firhalfband designHalfbandFIR
dsp_links No replacement

Certain mfilt objects have been removed


Errors

These mfilt objects have been removed in R2024a. Use the replacement System objects instead.

Function Use This Instead


mfilt.firdecim dsp.FIRDecimator
mfilt.firtdecim dsp.FIRDecimator
mfilt.cicdecim dsp.CICDecimator

Certain blocks will be removed


Still runs

These blocks will be removed in a future release. Use the replacement blocks instead.

Block Use This Instead


Bandpass Filter • To design the filter, use the Bandpass FIR
Filter Design or the Bandpass IIR Filter
Design blocks.

To filter the signal using this design, use the


Discrete FIR Filter (Simulink), Second-Order
Section Filter, or the Fourth-Order Section
Filter blocks.

2-9
R2024a

Block Use This Instead


Bandstop Filter • To design the filter, use the Bandstop FIR
Filter Design or the Bandstop IIR Filter
Design blocks.

To filter the signal using this design, use the


Discrete FIR Filter (Simulink), Second-Order
Section Filter, or the Fourth-Order Section
Filter blocks.
Hilbert Filter Discrete FIR Filter (Simulink), Second-Order
Section Filter
Arbitrary Response Filter Discrete FIR Filter (Simulink), Second-Order
Section Filter
Comb Filter Discrete FIR Filter (Simulink), Second-Order
Section Filter
Nyquist Filter Discrete FIR Filter (Simulink), Second-Order
Section Filter
CIC Filter CIC Decimation, CIC Interpolation
Inverse Sinc Filter Discrete FIR Filter (Simulink), Second-Order
Section Filter

2-10
Scopes and Visualization

Scopes and Visualization

Filter Analyzer App: View, analyze, and compare filters


The new Filter Analyzer app enables you to:

• Import filter objects or filter coefficients.


• View, analyze, and compare responses of multiple digital filters.
• View a list of filters in the Filters table and the details for each filter in the Filter Information
table.
• Plot a new filter analysis plot in a separate display window.
• Update filter analysis options and analyze filter responses.
• Specify filter sample rate and analysis sample rate separately.
• Save the state of the current session. When you reload the session, the app restores the filters,
displays, plotted filters, analysis options, and all other settings.

You can use the command line interface to add, remove, and update filters, displays, and analysis
options. For more information, see filterAnalyzer.

This app provides you with greater interactivity and flexibility while you visualize and analyze your
digital filters.

Enhancements to Spectrum Analyzer


Renaming of first tab

The Analyzer tab has been renamed to Scope.

RBW (Hz) parameter has moved to Estimation tab

The RBW (Hz) parameter in the Spectrum Analyzer toolstrip has moved from the Scope tab to the
Estimation tab.

Specify window length and FFT length

You can now specify the window length and FFT length in the spectrum analyzer under certain
conditions.

These properties are now available in the spectrumAnalyzer object:

• FrequencyResolutionMethod
• WindowLength
• FFTLengthSource
• FFTLength

These parameters are now available in the Spectrum Analyzer block:

• Resolution Method

2-11
R2024a

• Window Length
• FFT Length

Customize status bar enhancements

To customize the spectrum analyzer status bar, you can now click the Customize status bar icon ( )
on the right side of the status bar.

In R2024a, the scope selects the Samples/Update and Time Resolution options by default in the
customize status bar window. With this change, these two properties now appear by default on the
spectrum analyzer status bar.

Functionality being removed or changed


dsp.SpectrumAnalyzer object warns
Warns

Starting in R2024a, the dsp.SpectrumAnalyzer object warns. Use the spectrumAnalyzer object
instead.

For more details on how to update your existing code, see the Version History section on the
dsp.SpectrumAnalyzer object page.

2-12
Discrete-Time Signals

Discrete-Time Signals

Random Source block has been updated


The Random Source block has been updated with the following changes:

• Support for Mersenne Twister random number generator.


• The Gaussian distribution always uses the Zigguart method. The Sum of uniform values
method is no longer supported.
• Repeatable option is removed. To generate a repeatable output, set Repeatability to Specify
seed.
• When you specify an initial seed, the seed is no longer tunable, that is, you cannot change the
value of the seed during simulation.
• The initial seed must be a scalar. You can no longer specify a vector of seed values.
• Sample mode parameter is removed. The sample mode of the block is now always discrete.

If you open a model saved in R2023b or a previous version of MATLAB, the model continues to use
the older version of the block in R2024a. To use the updated version, obtain the Random Source block
from the DSP System Toolbox/Sources library.

Parameter Smoother Object and Block: Smooth parameter values


gradually
When there is a change in the parameter value during simulation, using the new Parameter Smoother
block and the dsp.ParameterSmoother System object, you can smooth the parameter values
gradually until the desired value is reached. If there is no smoothing, the parameter values change
abruptly. In certain applications, abrupt changes in parameter values is not ideal.

For more information, see Parameter Smoothing.

2-13
R2024a

dsp.AudioFileWriter Object and To Multimedia File Block: Specify


audio quality and bit rate for select signal file formats
You can now specify signal quality and signal bit rate in dsp.AudioFileWriter object (audio only)
and To Multimedia File block (audio and video) for these file extensions:

• OGG, OPUS, MP3 –– Signal quality


• MPEG4 –– Signal bit rate

Functionality being removed or changed


Convert 1-D to 2-D and Convert 2-D to 1-D blocks have been removed

The Convert 1-D to 2-D and Convert 2-D to 1-D blocks have been removed. Existing instances of the
blocks are automatically replaced with the Reshape (Simulink) block.

2-14
AI for DSP

AI for DSP

Deep Signal Anomaly Detector Block: Detect anomalies in signals in


real time
This release introduces the Deep Signal Anomaly Detector block, which detects real-time signal
anomalies in Simulink using a trained long short-term memory (LSTM) autoencoder deep learning
network model.

You must first train the detector model in MATLAB and configure the block to use this model in
Simulink.

To use this block, you must have a Deep Learning Toolbox™ license.

2-15
R2024a

Code Generation

designMultirateFIR and designFracDelayFIR Functions: Support for


code generation when 'SystemObject' argument is true
The designMultirateFIR and designFracDelayFIR functions support code generation when you
set the 'SystemObject' argument to true.

rebuffer_delay Function: Support for code generation


Starting in R2024a, if you have a MATLAB Coder™ license, you can generate a MEX file and C/C++
code from the rebuffer_delay function.

Generate SIMD code for ARM Cortex-A by using configuration


parameters
In R2024a, if you have Embedded Coder, you can generate SIMD code for ARM Cortex-A targets by
using the model configuration parameter Leverage target hardware instruction set extensions.
Before R2024a, you had to use a code replacement library to generate SIMD instructions for ARM
Cortex-A targets. For more information, see Use Target Hardware Instruction Set Extensions to
Generate SIMD Code from Simulink Blocks for ARM Cortex -A Processors.

Generate SIMD code by using configuration parameters with balanced


optimization priority
In R2024a, if you have Embedded Coder, you can generate SIMD code by using the model
configuration parameter Leverage target hardware instruction set extensions when
Optimization levels > Priority is set to Balance RAM and speed or Maximize execution
speed. Before R2024a, to generate SIMD code, you had to set Optimization levels > Priority to
Maximize execution speed. For more information, see Use Target Hardware Instruction Set
Extensions to Generate SIMD Code from Simulink Blocks for Intel Platforms.

2-16
Code Generation

Maximize multicore performance by specifying dataflow domain at


root model
To maximize multicore performance, you can specify execution domain as dataflow at the root model.
Specifying the dataflow domain at the root model enables multicore analysis, simulation, and code
generation for the entire model.

2-17
3

R2023b

Version: 23.2

New Features

Bug Fixes

Compatibility Considerations
R2023b

Digital Filters
Design Filter Live Editor Task: Design digital filters interactively
Starting in R2023b, if you have a DSP System Toolbox license, you can design and analyze these
digital filters interactively using the Design Filter Live Editor task.

• Lowpass FIR filter with Equiripple design method.


• Lowpass IIR filter with IIR least p-norm design method.
• Highpass FIR filter with Equiripple design method.
• Highpass IIR filter with IIR least p-norm design method.

The Live editor task automatically generates MATLAB code for your filter design. If you select the
Use a System object to implement filter parameter in the Design Filter Live Editor task UI, the
designfilt function generates a dsp.FIRFilter object for the lowpass and highpass FIR filter
responses, and a dsp.SOSFilter object for the lowpass and highpass IIR filter responses.

New Simulink model templates in DSP System Toolbox


In R2023b, DSP System Toolbox introduces these two Simulink model templates:

3-2
Digital Filters

• Tunable FIR and IIR Filters –– Design and implement FIR and IIR filters with tunable filter
specifications.
• Interpolated FIR Filter –– Design an efficient alternative to a high-order FIR filter. This
implementation contains an FIR decimator followed by a set of FIR filters and an FIR interpolator
that process the input signal in multiple stages. This implementation is efficient because you filter
the signal at a lower sampling rate.

These templates automatically configure the Simulink environment with the recommended settings.
Instead of using the default new model canvas, select one of these template models to get started. For
more information, see Configure Simulink Environment for Signal Processing Models.

Second-Order Section Filter Block: Implement a cascade of second-


order section filters in Simulink
Using the Second-Order Section Filter block, you can model a cascade of second-order section filters
in the Simulink environment. You can pass the numerator and denominator coefficients through the
input ports or specify them in the block dialog box. The coefficients are tunable, that is, you can
change their values while the simulation is running.

New FIR filter design blocks with tunable filter specifications


Use these new blocks to design FIR filters with tunable filter specifications.

• Tunable Lowpass FIR Filter


• Tunable Highpass FIR Filter
• Tunable Bandpass FIR Filter
• Tunable Bandstop FIR Filter

Tunable filters enable you to change the filter specifications while the simulation is running. The
blocks redesign the filters based on the updated specifications. The tunable filter specifications
include filter order, cutoff frequency, center frequency, bandwidth, and sidelobe attenuation. The
blocks output the numerator coefficients in the vector form.

When you generate code from these blocks, you can tune the filter design in the generated code.

New lowpass and highpass IIR filter design blocks with tunable filter
specifications
Use the new Tunable Lowpass IIR Filter and Tunable Highpass IIR Filter blocks to design lowpass
and highpass IIR filters with tunable filter specifications.

Tunable filters enable you to change the filter specifications while the simulation is running. The
blocks redesign the filters based on the updated specifications. The tunable filter specifications
include filter order, 3-dB cutoff frequency, passband ripple, and stopband attenuation. The blocks
output the coefficients in the second-order section (SOS) form.

When you generate code from these blocks, you can tune the filter design in the generated code.

3-3
R2023b

New design functions optimized for run-time design when generating


code
You can now design and implement certain FIR and IIR filters with tunable specifications using these
new functions in MATLAB.

• designLowpassFIR
• designHighpassFIR
• designBandpassFIR
• designBandstopFIR
• designLowpassIIR
• designHighpassIIR
• designBandpassIIR
• designBandstopIIR
• designNotchPeakIIR
• designHalfbandFIR
• designHalfbandIIR

These functions can return filter coefficients (design only) or a filter System object (design and
implementation).

When you generate code from these functions, you can tune the filter specifications and update the
filter design while running the generated code.

New dsp.ParallelFilter System object


Use the dsp.ParallelFilter object to implement a parallel sum filter structure in MATLAB. This
object filters streaming signals using the filters on each parallel branch and sums the individual
outputs.

3-4
Digital Filters

You can determine the number of branches in the parallel structure, add or remove branches, release
the filters on all branches, and even generate MATLAB code to filter signals using this parallel
structure. For more details, see the Object Functions section in the dsp.ParallelFilter object
page.

For a list of filter objects that you can add as branches, run this command in the MATLAB command
prompt.

dsp.ParallelFilter.helpSupportedSystemObjects

Using the parallel function creates a dsp.ParallelFilter object.

Tunable Bandpass IIR Filter and Tunable Bandstop IIR Filter blocks
generate coefficients in second-order section form
Starting in R2023b, the Tunable Bandpass IIR Filter and Tunable Bandstop IIR Filter blocks can
generate second-order section (SOS) coefficient matrices and the corresponding scale values.

Variable FIR Decimation and Variable FIR Interpolation blocks can


generate fixed-size output signals for variable-size input signals
When you specify the new Output frame length parameter, the Variable FIR Decimation and the
Variable FIR Interpolation blocks generate output signals of the specified frame length. The frame
length of the output signal does not change during simulation (fixed size). To output a fixed-size
signal at the output even when the input frame size changes during simulation (variable-size), the
blocks vary their rate conversion factors.

If you specify the rate conversion factor directly in the block dialog box instead of the output frame
length, the blocks generate variable-size output signals for variable-size input signals. In this mode,
the rate conversion factor of the blocks remains constant.

Frequency-Domain FIR Filter supports multiple-input multiple-output


(MIMO) systems and multiple paths between input and output pairs in
MATLAB
Starting R2023b, the dsp.FrequencyDomainFIRFilter object can model MIMO systems by
supporting multiple filters in time and frequency domains. You can also specify multiple paths
between each input and output pair.

Normalized frequencies in certain filtering blocks and System objects


Starting in R2023b, you can specify normalized frequencies in frequency-based filter design
specifications for certain objects and blocks.

To enable this behavior, set the NormalizedFrequency property in these objects to true:

• dsp.FIRHalfbandDecimator
• dsp.FIRHalfbandInterpolator
• dsp.IIRHalfbandDecimator

3-5
R2023b

• dsp.IIRHalfbandInterpolator

To enable this behavior, set the Sample rate mode parameter in these blocks to Use normalized
frequency (0 to 1):

• FIR Halfband Decimator


• FIR Halfband Interpolator
• IIR Halfband Decimator
• IIR Halfband Interpolator

For more details, see the Version History section in the reference pages.

Support for arbitrary input frame length in DSP System Toolbox


objects
The following DSP System Toolbox objects support input signals with arbitrary frame lengths in
R2023b, that is, the input frame length does not have to be a multiple of the decimation factor of 2.

• dsp.FIRHalfbandDecimator
• dsp.IIRHalfbandDecimator

Support for arbitrary input frame length in DSP System Toolbox blocks
Starting in R2023b, these blocks in DSP System Toolbox support input signals with arbitrary frame
lengths when the following conditions are met.

Block Conditions
• FIR Halfband Decimator • Input signal is a fixed-size signal (frame length
• IIR Halfband Decimator does not change during simulation) and you
select the Allow arbitrary frame length for
fixed-size input signals parameter.
• Input signal is a variable-size signal (frame
length changes during simulation).

When these blocks support an input signal with


an arbitrary frame length, the input frame length
does not have to be a multiple of the decimation
factor of 2. For more details, see the reference
pages for these blocks.

Functionality being removed or changed


DSP System Simulink model template has been removed

The DSP System Simulink model template has been removed in R2023b. Use one of these templates
instead:

• Basic Filter

3-6
Digital Filters

• Tunable FIR and IIR Filters


• Interpolated FIR Filter
• Mixed-Signal System

For more information on these templates, see Configure Simulink Environment for Signal Processing
Models.

dsp.BiquadFilter object will be removed


Still runs

The dsp.BiquadFilter will be removed in a future release. Use the dsp.SOSFilter object
instead. The dsp.SOSFilter object has these advantages:

• Supports filter coefficients in the form of Numerator and Denominator coefficient matrices. This
format is better suited with the existing filter design, implementation, and visualization tools in
DSP System Toolbox.
• Supports tunable coefficients and scale values properties whose values can change during filter
design and analysis.
• Allows you to not specify scale values for each section through the HasScaleValues property.

For more information on how to replace your existing code, see the Version History section in the
dsp.BiquadFilter reference page.

Certain fdesign filter specification objects now error


Errors

Starting in R2023b, these fdesign filter specification objects will error. Use the equivalent
replacements instead.

For details on how to replace your existing code, see the Version History section in the reference
page of the corresponding object page.

fdesign Object Recommended Replacement


fdesign.audioweighting weightingFilter (Audio Toolbox)
fdesign.octave octaveFilter (Audio Toolbox)
fdesign.parameq designParamEQ (Audio Toolbox)
fdesign.pulseshaping rcosdesign, gaussdesign

iirparameq has been removed


Errors

The iirparameq function errors in R2023b. Use designParamEQ (Audio Toolbox) instead. For
details on how to replace your existing code, see the Version History section in the iirparameq
page.

'Raised Cosine' and 'Square Root Raised Cosine' response methods have been removed

The 'Raised Cosine' and 'Square Root Raised Cosine' response methods in
fdesign.decimator and fdesign.interpolator objects have been removed. Use rcosdesign,
comm.RaisedCosineTransmitFilter, and comm.RaisedCosineReceiveFilter instead.

3-7
R2023b

Scopes and Visualization

New printToFigure function prints scope window to MATLAB figure


Using the new printToFigure function, you can print the display window of the following scopes to
a MATLAB figure.

• spectrumAnalyzer
• dsp.ArrayPlot
• timescope
• dsp.DynamicFilterVisualizer

Spectrum Analyzer supports dBuV units


The spectrumAnalyzer object and the Spectrum Analyzer block can now display the spectrum in
dBuV units. If you input a signal in the frequency domain, you can specify the units of the frequency
input in dBuV units.

3-8
Discrete-Time Signals

Discrete-Time Signals

Enhancements to dsp.AudioFileReader object


You can now determine the total number of samples in the audio file and the total duration of the
audio file (in seconds) using these new properties of the dsp.AudioFileReader object.

• NumChannels –– Number of audio channels in the file


• TotalSamples –– Total number of samples per channel in the audio file
• Duration –– Total duration of the audio file (in seconds)

These properties are read-only.

Support for writing MP3 files


This release introduces support for writing MP3 files in the following features:

• dsp.AudioFileWriter System object


• To Multimedia File Simulink block

Functionality being removed or changed


Convert 1-D to 2-D and Convert 2-D to 1-D blocks will be removed
Still runs

The Convert 1-D to 2-D and Convert 2-D to 1-D blocks will be removed in a future release. Use the
Reshape (Simulink) block instead. When these blocks are removed, existing instances of the blocks
will be automatically replaced with the Reshape block.

dsp.PeakFinder object has been removed

Starting in R2023b, the dsp.PeakFinder object has been completely removed. Use findpeaks or
islocalmin instead.

3-9
R2023b

Transforms, Estimation, and Statistics

Functionality being removed or changed


dsp.LPCToLSF object has been removed

Starting in R2023b, the dsp.LPCToLSF object has been completely removed. Use poly2lsf instead.

3-10
Code Generation

Code Generation

Generate SIMD code from LMS Filter block by leveraging target


hardware instruction set extensions
In R2023b, if you have an Embedded Coder license or a Simulink Coder license, you can generate
SIMD code for the LMS Filter block by using the model configuration parameter Leverage target
hardware instruction set extensions.

You can generate SIMD code using the Leverage target hardware instruction set extensions
parameter under these conditions:

• You set Algorithm to Sign-Error LMS, Sign-Data LMS, Sign-Sign LMS, LMS or
Normalized LMS.
• Data type of the input signal is single or double.

In addition, configure your model appropriately. In the Modeling tab of the Simulink model window,
click Model Settings and configure these parameters under Code Generation.

• In the Optimization pane:

• Provide a specific instruction set in the Leverage target hardware instruction set
extensions parameter.
• Select the Optimize reductions parameter.
• Under Optimization levels, set Level to Maximum and Priority to Maximize execution
speed.
• In the Interface pane, under Software environment, clear non-finite numbers.

For more details, see Optimize Code for Reduction Operations by Using SIMD (Simulink Coder). For
more information on SIMD code generation in DSP System Toolbox, see SIMD Code Generation.

3-11
4

R2023a

Version: 9.16

New Features

Bug Fixes

Compatibility Considerations
R2023a

Digital Filters

New IIR filter design blocks with tunable filter specifications


Use the Tunable Bandpass IIR Filter and Tunable Bandstop IIR Filter blocks to design IIR filters with
tunable filter specifications. Tunable filters enable you to change the filter specifications while the
simulation is running. The blocks redesign the filters based on the updated specifications. The
tunable filter specifications include filter order, 3-dB cutoff frequency, passband ripple, and stopband
attenuation. The blocks output the coefficients in the fourth-order section (FOS) form.

When you generate code from these blocks, the generated code allows tuning of the filter design.

New Variable FIR Decimation and Variable FIR Interpolation blocks


with tunable rate conversion factors
Use the new Variable FIR Decimation and Variable FIR Interpolation blocks in Simulink for efficient
polyphase FIR decimation and FIR interpolation with tunable rate conversion factors. You can update
the rate conversion factors in the block dialog box or through an input port while the simulation is
running.

Normalized frequency in certain filtering blocks and System objects


Starting in R2023a, you can specify normalized frequencies in frequency-based filter design
specifications for certain objects and blocks.

To enable this behavior, set the NormalizedFrequency property in these objects to true:

• dsp.LowpassFilter
• dsp.HighpassFilter
• dsp.VariableBandwidthFIRFilter
• dsp.VariableBandwidthIIRFilter

To enable this behavior, set the Sample rate mode parameter in these blocks to Use normalized
frequency (0 to 1):

• Lowpass Filter
• Highpass Filter
• Variable Bandwidth FIR Filter
• Variable Bandwidth IIR Filter

For more details, see the Version History sections in the reference pages.

Support for arbitrary input frame length in DSP System Toolbox blocks
Starting in R2023a, these blocks in DSP System Toolbox support input signals with arbitrary frame
lengths when these conditions are met.

4-2
Digital Filters

Block Conditions
Two-Channel Analysis Subband Filter • Input signal is a fixed-size signal (frame length
does not change during simulation) and the
block allows for multirate processing.
• Input signal is a fixed-size signal, block
enforces single-rate processing, and you
select the Allow arbitrary frame length for
fixed-size input signals parameter.
• Input signal is a variable-size signal (frame
length changes during simulation).

When this block supports an input signal with an


arbitrary frame length, the input frame length
does not have to be even. For more details, see
the reference page for this block.
• Complex Bandpass Decimator • Input signal is a fixed-size signal (frame length
• Sample-Rate Converter does not change during simulation) and you
select the Allow arbitrary frame length for
• CIC Compensation Decimator fixed-size input signals parameter.
• Input signal is a variable-size signal (frame
length changes during simulation).

When these blocks support an input signal with


an arbitrary frame length, the input frame length
does not have to be a multiple of the decimation
factor. For more details, see the reference pages
for these blocks.

Support for arbitrary input frame length in DSP System Toolbox


objects
The following DSP System Toolbox objects support input signals with arbitrary frame lengths in
R2023a, that is, the input frame length does not have to be a multiple of the decimation factor. In the
dsp.SubbandAnalysisFilter object, the input frame length does not have to be even.

• dsp.ComplexBandpassDecimator
• dsp.CICCompensationDecimator
• dsp.SampleRateConverter
• dsp.SubbandAnalysisFilter

Functionality being removed or changed


dsp.KalmanFilter has been removed
Errors

Starting in R2023a, the dsp.KalmanFilter object will error. Use Kalman filter functionality in
Sensor Fusion and Tracking Toolbox™ instead.

4-3
R2023a

mfilt.farrowsrc has been removed


Errors

The mfilt.farrowsrc object errors in R2023a. Use dsp.FarrowRateConverter instead. For


details on how to replace your existing code, see the Version History section in the
mfilt.farrowsrc page.

4-4
Scopes and Visualization

Scopes and Visualization

Spectrum Analyzer with new toolstrip interface in Simulink


Use the improved Spectrum Analyzer block in Simulink to visualize the spectra of time-domain
signals. The block is more responsive and has a new toolstrip interface that allows you easy access to
spectral analysis, estimation, and measurement settings. You can configure and display Spectrum
Analyzer settings from the command line with the SpectrumAnalyzerConfiguration object.

The new Spectrum Analyzer toolstrip has these tabs:

Analyzer Tab

On the Analyzer tab, you can control the display, spectral-bandwidth, and configuration settings of
the Spectrum Analyzer when analyzing a spectrum or a spectrogram.

Estimation Tab

On the Estimation tab, you can specify the input domain, frequency resolution method, frequency
span options, and the averaging method for estimating the power spectrum. If you set the frequency
resolution method to Welch, you can also specify the window options for the filter for spectral
estimation.

4-5
R2023a

Measurements Tab

On the Measurements tab, you can specify the spectral measurements that you want the block to
display.

• Data Cursors — Display the waveform cursors


• Peak Finder — Display peak values for the selected signal
• Distortion — Display harmonic and intermodulation distortion measurements

All measurements available on this tab are related to a specific channel only.

Spectrum Tab

On the Spectrum tab, you can specify the trace and scale options of the Spectrum Analyzer. You can
select the options on this tab for the Spectrum Analyzer to display a two-sided or one-sided spectrum
and a maximum-hold, minimum-hold, or normal trace. You can also specify the reference load and
spectral units.

Spectrogram Tab

To enable the Spectrogram tab, click the Spectrogram view in the Analyzer tab.

On the Spectrogram tab, you can specify the channel over which block computes the spectrogram
and the time resolution and time span of the spectrogram and choose to display a two-sided or one-
sided spectrum. You can also specify the reference load and spectral units in this tab.

4-6
Scopes and Visualization

Spectral Mask Tab

On the Spectral Mask tab, you can add upper and lower masks to the Spectrum Analyzer to visualize
spectrum limits and compare spectrum values to specification values.

Channel Measurements Tab

On the Channel Measurements tab, you can control the channel measurement settings.

• Channel Measurements — Select the options in this section to display occupied bandwidth or
adjacent channel power ratio (ACPR) measurements.
• Frequency Options — Select the options in this section to display frequency span, center
frequency, and start and stop frequencies.
• Adjacent Channels — Select the options in this section to display ACPR measurements.

All measurements available on this tab are related to a specific channel only.

Filter Visualizer Block: Visualize magnitude and phase responses of


time-varying digital filters in Simulink
The new Filter Visualizer block plots the magnitude and phase responses of FIR and IIR filters,
including the second-order section and fourth-order section filter cascades. You can overlay multiple
filters on the same plot. Specify filter coefficients as a transfer function, second-order section matrix,
or a fourth-order section matrix. The block uses the filter coefficients to plot the responses.

4-7
R2023a

The Filter Visualizer can also compute the cursor and the peak finder measurements of the frequency
response that you choose. Specify the frequency response in the Channel section on Measurements
tab. In this image, the Filter Visualizer shows the measurements for the magnitude response of the
filter.

4-8
Scopes and Visualization

Normalized frequency in dsp.DynamicFilterVisualizer


The dsp.DynamicFilterVisualizer object now supports displaying filter frequency responses in
normalized frequency units (0 to 1). To enable this behavior, set the NormalizedFrequency
property in the dsp.DynamicFilterVisualizer object to true.

Enhancements to spectrumAnalyzer object


Starting in R2023a, the SampleRate and PlotAsTwoSidedSpectrum properties in the
spectrumAnalyzer object are tunable, so you can change the values of these properties even when
the object is locked.

4-9
R2023a

Discrete-Time Signals

Enhancements to Upsample, Downsample, and Repeat blocks


You can now specify a rate conversion factor for these blocks through an input port when the blocks
operate in the single-rate frame-based processing mode. You can also change the rate conversion
factor during simulation.

• Downsample
• Upsample
• Repeat

Functionality being removed or changed


Certain System objects have been removed
Errors

Starting in R2023a, these System objects will error. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Version History section in the reference
page of the corresponding System object.

System object Use This Instead


dsp.Interpolator dsp.FIRInterpolator, interp1
dsp.Convolver conv
dsp.UniformDecoder udecode
dsp.UniformEncoder uencode
dsp.Counter Create a variable in MATLAB and increment the
variable by 1
dsp.DelayLine No direct replacement.

You can use the dsp.AsyncBuffer object to


achieve a delay line
dsp.Window window
dsp.ScalarQuantizerDecoder No replacement
dsp.ScalarQuantizerEncoder No replacement
dsp.VectorQuantizerDecoder No replacement
dsp.VectorQuantizerEncoder No replacement

4-10
Transforms, Estimation, and Statistics

Transforms, Estimation, and Statistics

Support for arbitrary input frame length in Zoom FFT block


Starting in R2023a, the Zoom FFT block supports input signals with arbitrary frame lengths when
these conditions are met.

Block Conditions
• Zoom FFT • Input signal is a fixed-size signal (frame length
does not change during simulation) and you
select the Allow arbitrary frame length for
fixed-size input signals parameter.
• Input signal is a variable-size signal (frame
length changes during simulation).

When these blocks support an input signal with


an arbitrary frame length, the input frame length
does not have to be a multiple of the decimation
factor. For more details, see the reference pages
for these blocks.

Support for arbitrary input frame length in dsp.ZoomFFT object


The dsp.ZoomFFT object supports input signals with arbitrary frame lengths in R2023a, that is, the
input frame length does not have to be a multiple of the decimation factor.

Functionality being removed or changed


Certain System objects have been removed
Errors

Starting in R2023a, these System objects will error. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Version History section in the reference
page of the corresponding System object.

System object Use This Instead


dsp.Autocorrelator xcorr
dsp.Crosscorrelator xcorr
dsp.PeakToPeak peak2peak
dsp.PulseMetrics Use the Pulse and Transition Metrics functions,
such as the dutycycle, midcross,
pulseperiod, pulsesep, and pulsewidth
functions among others
dsp.StateLevels statelevels

4-11
R2023a

System object Use This Instead


dsp.TransitionMetrics Use the Pulse and Transition Metrics functions,
such as the falltime, overshoot, risetime,
settlingtime, slewrate, and undershoot
functions among others

4-12
Code Generation

Code Generation

Generate SIMD code for FIR Interpolation and FIR Decimation blocks
on all Intel platforms
In R2023a, if you have an Embedded Coder license, you can generate SIMD code for the FIR
Interpolation and FIR Decimation blocks on all Intel platforms by using the model configuration
parameter Leverage target hardware instruction set extensions. Previously, you had to use a
code replacement library to generate SIMD code.

You can generate SIMD code using the Leverage target hardware instruction set extensions
parameter under these conditions:

• You set Filter structure to Direct form for the FIR Decimation block
• You set Input processing to Columns as channels (frame based)
• Input signal is real-valued with real filter coefficients
• Data type of the input signal is single or double

In addition, configure your model appropriately. In the Modeling tab of the Simulink model window,
click Model Settings and configure these parameters under Code Generation.

• In the Optimization pane:

• Provide a specific instruction set in the Leverage target hardware instruction set
extensions parameter.
• Select the Optimize reductions parameter.
• Under Optimization levels, set Level to Maximum and Priority to Maximize execution
speed.
• In the Interface pane, under Software environment, clear non-finite numbers.

For computationally intensive operations on supported blocks, SIMD intrinsics can significantly
improve the performance of the generated code on Intel platforms. For more details, see Optimize
Code for Reduction Operations by Using SIMD (Simulink Coder).

Dataflow subsystems support variable-size signals


In R2023a, dataflow subsystems support variable-size signals. For more information, see the Dataflow
Subsystem block.

4-13
R2023a

Linear Algebra

Certain System objects have been removed


Errors

Starting in R2023a, these System objects will error. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Version History section in the reference
page of the corresponding System object.

System object Use This Instead


dsp.ArrayVectorAdder Use + with array expansion
dsp.ArrayVectorSubtractor Use – with array expansion
dsp.ArrayVectorMultiplier Use .* with array expansion
dsp.ArrayVectorDivider Use ./ with array expansion
dsp.CumulativeProduct cumprod
dsp.CumulativeSum cumsum
dsp.LDLFactor ldl
dsp.LUFactor lu
dsp.LevinsonSolver levinson
dsp.LowerTriangularSolver mldivide, \ operator
dsp.UpperTriangularSolver mldivide, \ operator

4-14
5

R2022b

Version: 9.15

New Features

Bug Fixes

Compatibility Considerations
R2022b

Digital Filters

Enhancements to Fourth-Order Section Filter block


Starting in R2022b, when you pass numerator and denominator coefficients through the input ports
of the Fourth-Order Section Filter block, you can change the number of sections (rows) in the filter
coefficients while the simulation is running.

You can also specify the coefficients in the block dialog box using a
dsp.FourthOrderSectionFilter object. Set Coefficient source to Filter object and specify
a dsp.FourthOrderSectionFilter object directly in the Filter parameter. Alternatively, you can
create this object in the MATLAB workspace or model workspace and specify the filter variable in the
Filter parameter.

Support for arbitrary input frame length in DSP System Toolbox blocks
Starting in R2022b, certain blocks in DSP System Toolbox support input signals with arbitrary frame
lengths when these conditions are met.

Block Conditions
FIR Decimation • Input signal is a fixed-size signal (frame length
FIR Rate Conversion does not change during simulation) and the
block allows for multirate processing
• Input signal is a fixed-size signal, block
enforces single-rate processing, and you
select the Allow arbitrary frame length for
fixed-size input signals parameter (if
enabled)
• Input signal is a variable-size signal (frame
length changes during simulation)

When these blocks support arbitrary frame length


input signals, the input frame length does not
have to be a multiple of the decimation factor. For
more details, see the reference pages for these
blocks.
Channelizer • Input signal is a fixed-size signal (frame length
Farrow Rate Converter does not change during simulation) and you
select the Allow arbitrary frame length for
fixed-size input signals parameter
• Input signal is a variable-size signal (frame
length changes during simulation)

When these blocks support arbitrary frame length


input signals, the input frame length does not
have to be a multiple of the decimation factor. For
more details, see the reference pages for these
blocks.

5-2
Digital Filters

Support for arbitrary input frame length in DSP System Toolbox


objects
Starting in R2022b, these objects in DSP System Toolbox support input signals with arbitrary frame
lengths. That is, the input frame length does not have to be a multiple of the decimation factor. In the
case of the dsp.Channelizer object, the input frame length does not have to be a multiple of the
number of frequency bands.

• dsp.FIRDecimator
• dsp.FIRRateConverter
• dsp.Channelizer

When you generate code, to support arbitrary frame length for fixed-size signals, you must set the
AllowArbitraryInputLength property to true while generating code.

For more details, see the reference pages for these objects.

IIR design methods design dsp.SOSFilter object instead of


dsp.BiquadFilter object
Behavior change

Starting in R2022b, these IIR design methods when used with fdesign objects design a
dsp.SOSFilter object instead of the dsp.BiquadFilter object.

• butter
• cheby1
• cheby2
• ellip
• iirlpnorm

For example, calling the design function on an fdesign.lowpass object using the butter design
method outputs a dsp.SOSFilter object.

designSpecs = fdesign.lowpass;
filtObj = design(designSpecs,'butter',SystemObject=true)

filtObj =

dsp.SOSFilter with properties:

Structure: 'Direct form II'


CoefficientSource: 'Property'
Numerator: [13×3 double]
Denominator: [13×3 double]
HasScaleValues: true
ScaleValues: [0.4151 0.3718 0.3374 0.3099 0.2878 … ]

Show all properties

For a list of the IIR design methods that the fdesign.response object supports, use the
designmethods function with the 'iir' flag and set the 'Systemobject' flag to true.

5-3
R2022b

designSpecs = fdesign.lowpass;
IIRmethods = designmethods(designSpecs,'iir',SystemObject=true)

IIRmethods =

4×1 cell array

{'butter'}
{'cheby1'}
{'cheby2'}
{'ellip' }

To design a dsp.BiquadFilter object instead of the dsp.SOSFilter object, set the


UseLegacyBiquadFilter flag to true.

filtObj = design(designSpecs,'butter',SystemObject=true,...
UseLegacyBiquadFilter=true)

filtObj =

dsp.BiquadFilter with properties:

Structure: 'Direct form II'


SOSMatrixSource: 'Property'
SOSMatrix: [13×6 double]
ScaleValues: [14×1 double]
InitialConditions: 0
OptimizeUnityScaleValues: true

Show all properties

Functionality being removed or changed


Support for multistage design using fdesign.interpolator and fdesign.decimator objects will
be removed
Warns

Support for multistage filter design using the fdesign.interpolator and fdesign.decimator
objects will be removed in a future release.

To design a multistage interpolator, use the designMultistageInterpolator function. To design a


multistage decimator, use the designMultistageDecimator function. For more details on how to
update your existing code, see the Version History sections in the fdesign.interpolator,
fdesign.decimator, and multistage object reference pages.

Support for designing mfilt.cascade object using the fdesign.lowpass object has been
removed
Errors

Multistage filter design using the fdesign.lowpass object and the design function now requires
the SystemObject flag to be set to true, unless the resulting design is a single stage filter and not a
cascade. This setting generates a dsp.FilterCascade object instead of the mfilt.cascade
object.

For more details on how to update your existing code, see the Version History section in the
fdesign.lowpass and multistage reference pages.

5-4
Digital Filters

Support for designing mfilt.firinterp has been removed


Errors

You can no longer design an mfilt.firinterp object using the fdesign.interpolator and the
design functions.

To design an FIR interpolator using the fdesign.interpolator filter specification object, set the
Systemobject flag in the design function to true. Setting this flag to true ensures that the
function outputs a filter System object instead of an mfilt.firinterp object.
fdesignObj = fdesign.interpolator;
FIRInterpObj = design(fdesignObj,SystemObject=true)

FIRInterpObj =

dsp.FIRInterpolator with properties:

InterpolationFactor: 2
NumeratorSource: 'Property'
Numerator: [-3.0325e-05 0 8.3413e-05 0 … ]

Show all properties

For details on how to replace your existing code, see the Version History section on the
fdesign.interpolator function reference page.

Support for designing mfilt.firdecim will be removed


Warns

Support for designing an mfilt.firdecim object using the fdesign.decimator and the design
functions will be removed in a future release.

To design an FIR decimator using the fdesign.decimator filter specification object, set the
Systemobject flag in the design function to true. Setting this flag to true ensures that the
function outputs a filter System object instead of an mfilt.firdecim object.
fdesignObj = fdesign.decimator;
FIRDecimObj = design(fdesignObj,SystemObject=true)

FIRDecimObj =

dsp.FIRDecimator with properties:

DecimationFactor: 2
NumeratorSource: 'Property'
Numerator: [-1.5162e-05 0 4.1707e-05 0 … ]
Structure: 'Direct form'

Show all properties

For details on how to replace your existing code, see the Version History section on the
fdesign.decimator function reference page.

Support for designing mfilt.firsrc will be removed


Warns

Support for designing an mfilt.firsrc object using the fdesign.rsrc and the design functions
will be removed in a future release.

5-5
R2022b

To design an FIR rate converter using the fdesign.rsrc filter specification object, set the
Systemobject flag in the design function to true. Setting this flag to true ensures that the
function outputs a filter System object instead of an mfilt.firsrc object.

fdesignObj = fdesign.rsrc;
FIRRCObj = design(fdesignObj,SystemObject=true)

FIRRCObj =

dsp.FIRRateConverter with properties:

InterpolationFactor: 3
DecimationFactor: 2
NumeratorSource: 'Property'
Numerator: [-3.2490e-05 0 9.1277e-05 1.3523e-04 … ]

Show all properties

For details on how to replace your existing code, see the Version History section on the
fdesign.rsrc function reference page.

5-6
Scopes and Visualization

Scopes and Visualization

Enhancements to the spectrumAnalyzer object


New FilterSharpness property

When the object uses the filter bank spectral estimation method, you can now increase the sharpness
of the filter bank in the spectrumAnalyzer object. Increasing the filter sharpness decreases the
spectral leakage and gives a more accurate power reading.

New fields on Spectrum Analyzer status bar

Starting in R2022b, the Spectrum Analyzer displays these fields on the status bar:

• Updates –– This field shows when you select Spectrum updates processed in the Customize
Status Bar window.
• Channel number –– This field shows when you select Spectrogram channel in the Customize
Status Bar window.

The Spectrogram channel field is enabled only when the display shows spectrogram.

To enable these fields, right-click the status bar and select the properties in the Customize Status Bar
window.

5-7
R2022b

Support for waveform cursors in spectrogram mode

Starting in R2022b, the Spectrum Analyzer supports data cursors even when the scope shows only
the spectrogram display.

In the command line, you can edit the CursorMeasurementsConfiguration object when you set
the ViewType property of the spectrumAnalyzer object to "spectrogram".

Enhancements to Data Cursor Measurements


Starting in R2022b, the CursorMeasurementsConfiguration object has the new LockSpacing
property. Using this property, you can lock the spacing between waveform cursors in the scope
window.

In the Measurements tab of the scope UI window, these data cursor settings are new:

• Lock cursor spacing –– This setting corresponds to the LockSpacing property in the
CursorMesaurementsConfiguration object.
• X location –– These fields are enabled and correspond to the XLocation property in the
CursorMesaurementsConfiguration object.

5-8
Scopes and Visualization

Enhancements to the dsp.DynamicFilterVisualizer object and the


Dynamic Filter Visualizer UI
The dsp.DynamicFilterVisualizer object has the following new properties starting R2022b:

• PlotAsMagnitudePhase –– Plot the magnitude and phase response of the filter on two separate
axes within the same window
• PlotType –– Plot type
• AxesScaling –– Axes scaling mode
• AxesScalingNumUpdates –– Number of updates before scaling
• MaximizeAxes –– Maximize axes control
• ShowGrid –– Grid visibility

The Dynamic Filter Visualizer app that you launch using the object has these enhancements in
R2022b:

• Magnitude Phase button –– This button corresponds to the PlotAsMagnitudePhase property


in the object.
• Generate Script button –– Generate a script to re-create your dynamic filter visualizer plot with
the same settings. When you click this button, an editor window opens with the code that you can
use to re-create your dsp.DynamicFilterVisualizer object.

Configure dsp.DynamicFilterVisualizer measurements


programmatically
You can now configure the cursor and the peak finder measurements in the
dsp.DynamicFilterVisualizer object programmatically using these properties:

• MeasurementChannel
• CursorMeasurements
• PeakFinder

Functionality being removed or changed


Removal of Signal Statistics from Dynamic Filter Visualizer UI

The Dynamic Filter Visualizer UI no longer provides the Signal Statistics measurements. You can
launch the visualizer using the dsp.DynamicFilterVisualizer object and by clicking the View
Filter Response button in these blocks.

• Complex Bandpass Decimator


• Fourth-Order Section Filter
• Frequency-Domain FIR Filter
• Notch-Peak Filter
• Variable Bandwidth FIR Filter
• Variable Bandwidth IIR Filter

5-9
R2022b

Discrete-Time Signals

Support for arbitrary input frame length in Downsample block


Starting in R2022b, the Downsample block supports input signals with arbitrary frame lengths when
these conditions are met. The input frame length does not have to be a multiple of the decimation
factor.

• Input signal is a fixed-size signal (frame length does not change during simulation) and the block
allows for multirate processing
• Input signal is a fixed-size signal, block enforces single-rate processing, and you select the Allow
arbitrary frame length for fixed-size input signals parameter (if enabled)
• Input signal is a variable-size signal (frame length changes during simulation)

Support for variable-size input signals in Upsample and Repeat blocks


Starting in R2022b, the Upsample and Repeat blocks support variable-size input signals under these
conditions:

• Input processing is set to Columns as channels (frame based)


• Rate options is set to Enforce single-rate processing

When the input is a variable-size signal, you can change the frame size (number of rows) and the
number of channels (columns) of the signal during simulation. The output is also a variable-size
signal.

Variable-sized output frames in dsp.ColoredNoise object


Starting in R2022b, dsp.ColoredNoise object can generate colored noise signals of variable-sized
output frames.

You can specify the frame size of the output colored noise signal as a nonnegative scalar value that is
less than or equal to the MaxSamplesPerFrame property.

Support for OPUS audio files in DSP System Toolbox


You can read and write audio files in the OPUS file format (.opus) using these System objects and
blocks in DSP System Toolbox:

• dsp.AudioFileReader
• dsp.AudioFileWriter
• From Multimedia File
• To Multimedia File

5-10
Transforms, Estimation, and Statistics

Transforms, Estimation, and Statistics

New CCDF measurement mode in Power Meter block


Starting in R2022b, use the Power Meter block to compute and output the complementary cumulative
distribution function (CCDF) measurements of the power of voltage signals. The CCDF measurements
that the block outputs are relative power and probability (in percentage). Relative power is the
amount of power in dB by which the instantaneous signal power is above the average signal power.
Probability in percentage refers to the probability that the instantaneous signal power is above the
average signal power by the relative power in dB.

To compute these measurements, select the Compute CCDF parameter in the block dialog box and
set the CCDF output.

New Overlap length parameter in certain moving statistics blocks


Using the new Overlap length parameter, you can specify the length of overlap between consecutive
windows of data in these blocks:

• Moving Average
• Moving RMS
• Moving Standard Deviation
• Moving Variance
• Power Meter

Support for arbitrary input frame length in DSP System Toolbox blocks
Starting in R2022b, certain blocks in DSP System Toolbox support input signals with arbitrary frame
lengths when these conditions are met.

Block Conditions
Moving Average • Input signal is a fixed-size signal (frame length
Moving RMS does not change during simulation) and you
select the Allow arbitrary frame length for
Moving Standard Deviation fixed-size input signals parameter (if
Moving Variance enabled)
Power Meter • Input signal is a variable-size signal (frame
length changes during simulation).

When these blocks support arbitrary frame length


input signals, the input frame length does not
have to be a multiple of the hop size. For more
details, see the reference pages for these blocks.

Functionality being removed or changed


dsp.LPCToLSF object has been removed
Errors

5-11
R2022b

The dsp.LPCToLSF object has been removed. Use poly2lsf instead. For details on how to replace
your existing code, see the Version History section in the dsp.LPCToLSF object reference page.

5-12
AI for DSP

AI for DSP

New Wavelet Scattering block: Model wavelet scattering network in


Simulink
This release introduces the first Simulink block in DSP System Toolbox that supports designing
machine learning systems for signal processing applications.

The new Wavelet Scattering block creates a framework for wavelet time scattering in the Simulink
environment. Use this block to derive low-variance features from real-valued data and then use those
features in machine learning and deep learning applications. The block uses predefined wavelet
filters to compute the scalogram and applies an averaging filter to the scalogram for feature
extraction. For more information, see Wavelet Scattering (Wavelet Toolbox).

The Wavelet Scattering block requires Wavelet Toolbox™.

5-13
R2022b

Code Generation

Improved speed performance in certain DSP System Toolbox features


In R2022b, the speed performance of these features is now improved under the specified conditions.

Feature Conditions Improved Speed


Performance
dsp.FrequencyDomainFIRFi • Input signal has a data type Improved speed performance
lter of single or double when you:
• Input signal can be real or • Simulate the object
complex algorithm in MATLAB
• Run the MEX file that you
generate using the codegen
(MATLAB Coder) function
• Run the MEX file that you
generate using the
dspunfold function
Frequency-Domain FIR Filter • Input signal has a data type Improved speed performance
of single or double when you:
• Input signal can be real or • Simulates in Normal mode
complex
• Simulates in Accelerator
mode
• Simulates in Rapid
Accelerator mode
• Belongs to a model reference
(Simulink) and operates in
Normal mode
• Belongs to a model reference
(Simulink) and operates in
Accelerator mode
• Belongs to a Dataflow
Subsystem block

For more details on these


modes, see Choosing a
Simulation Mode (Simulink) and
Choose Simulation Modes for
Model Hierarchies (Simulink).
Highpass Filter • Input signal has a data type Improved speed performance
of single or double when you:
• Input signal can be real or
• Simulates in Normal mode
complex
• Simulates in Accelerator
• When you set Filter type to
mode
FIR

5-14
Code Generation

Feature Conditions Improved Speed


Performance
Lowpass Filter • When you set Simulate • Simulates in Rapid
using to code generation Accelerator mode
Differentiator Filter • Input signal has a data type • Belongs to a model reference
Variable Bandwidth FIR Filter of single or double (Simulink) and operates in
• Input signal can be real or Accelerator mode
complex • Belongs to a Dataflow
• When you set Simulate Subsystem block
using to code generation
For more details on these
FIR Halfband Interpolator • Input signal has a data type modes, see Choosing a
FIR Halfband Decimator of single or double Simulation Mode (Simulink) and
• Input signal can be real or Choose Simulation Modes for
Complex Bandpass Decimator Model Hierarchies (Simulink).
complex
CIC Compensation Decimator
CIC Compensation Interpolator
Digital Down-Converter
Digital Up-Converter
Sample-Rate Converter
Zoom FFT

Optimized C code generation for dsp.SOSFilter object on ARM Cortex-


M processors
In R2022b, you can generate optimized C code for the dsp.SOSFilter object on ARM Cortex-M
processors under these conditions:

• Input is a single-channel real-valued signal.


• When you set CoefficientSource to 'Property' or 'Input port'.
• Data type of the input is single.
• When you set Structure to 'Direct form I' or 'Direct form II transposed'.
• When you set HasScaleValues to false after setting CoefficientSource to 'Input port'.

For a full list of features that support optimized C code generation on ARM Cortex-M processors, see
Supported DSP System Toolbox Blocks and MATLAB System Objects for CMSIS Library (Embedded
Coder Support Package for ARM Cortex-M Processors). For more information on generating code
optimized for ARM Cortex-M processors, see Embedded Coder Support Package for ARM Cortex -M
Processors.

Generate SIMD code for Discrete FIR Filter block on all Intel platforms
In R2022b, if you have Embedded Coder, you can generate SIMD code for the Discrete FIR Filter
block on all Intel platforms by using the model configuration parameter Leverage target hardware
instruction set extensions. Previously, you had to use a code replacement library to generate SIMD
code. You can generate SIMD code using the Leverage target hardware instruction set
extensions parameter under these conditions:

5-15
R2022b

• You set Filter structure to Direct form


• You set Input processing to Columns as channels (frame based)
• Input signal is real-valued with real filter coefficients
• Data type of the input signal is single or double

In addition, configure your model appropriately.

In the Modeling tab of the Simulink model window, click Model Settings and configure these
parameters under Code Generation.

• In the Optimization pane:

• Provide a specific instruction set in the Leverage target hardware instruction set
extensions parameter.
• Select the Optimize reductions parameter.
• Under Optimization levels, set Level to Maximum and Priority to Maximize execution
speed.
• In the Interface pane, under Software environment, clear non-finite numbers.

For computationally intensive operations on supported blocks, SIMD intrinsics can significantly
improve the performance of the generated code on Intel platforms. For more details, see Optimize
Code for Reduction Operations by Using SIMD (Simulink Coder).

5-16
6

R2022a

Version: 9.14

New Features

Bug Fixes

Compatibility Considerations
R2022a

Digital Filters
Fourth-Order Section Filter Block: Implement a cascade of fourth-
order section filters in Simulink
Starting in R2022a, using the Fourth-Order Section Filter block, you can model a cascade of fourth-
order section filters in the Simulink environment. This block accepts the numerator and the
denominator coefficients of the filter in the form of fourth-order section matrices.

New outputDelay Function: Determine delay in multirate filter System


objects
Starting in R2022a, the new outputDelay function computes the delay introduced by a multirate
filter. This delay is caused by the group delay of the convolution operations within the filter.
filterObj = dsp.FIRRateConverter(13,17)
D = outputDelay(filterObj)

Due to this delay and the potential time scaling that occurs as a result of rate conversion within the
filter, the input and output signals do not appear synchronized on the time domain if plotted against
the same sample time.

To plot the input and output signals on the same plot, you must account for the delay and the time
scaling.

6-2
Digital Filters

The ouputDelay function also returns the output sample rate FsOut. You can optionally specify the
input sample rate to the function FsIn.
[D,FsOut] = outputDelay(filterObj,FsIn=44.1e3)

Filters with Nonlinear Phase Convolution

Note that the outputDelay function also supports multirate filters which have a nonlinear phase
convolution (varying group delay) assuming their inputs are narrow-banded. In this case, you can
specify the center frequency Fc of the input signal. The function can also return an interval of input
frequencies B for which the delay value is valid for up to a specified tolerance.
nonlinearObj = cascade(dsp.FIRFilter(designFracDelayFIR(0.25,200)),...
dsp.FIRDecimator)
[D,FsOut,B] = outputDelay(nonlinearObj,FsIn=44.1e3,Fc=100,Tol=0.1)

Enhancements to LMS Update block: Multifilter and adaptive linear


combiner support
Starting in R2022a, you can update the weights of multiple adaptive filters using the same LMS
Update block. To enable this support, specify the Number of adaptive filters to be a value N
greater than 1. Each filter can be chosen to adapt independently during run time by providing the
Adapt input as a logical vector of length N. All filters are assumed to run on the same input and have
a common step size, leakage factor, and reset input.

You can also use the LMS Update block as an adaptive linear combiner where the input to the block is
not necessarily obtained from a tapped-delay line. You can enable this mode by setting the Adaptive

6-3
R2022a

filter mode parameter to Adaptive linear combiner. In the Adaptive linear combiner
mode, the input samples are not buffered internally inside the block, and the input provided to the
block must be a column vector of size equal to the Filter length parameter.

Kaiser-window-based design method for FIR halfband decimator and


interpolator
You can now specify the Kaiser-window-based filter design method in the following FIR halfband
decimators and interpolators:

• dsp.FIRHalfbandDecimator
• dsp.FIRHalfbandInterpolator
• FIR Halfband Decimator
• FIR Halfband Interpolator

The Kaiser window method is optimal to design filters with very tight specifications such as very high
orders and very narrow transition widths. For a given set of design specifications, if the existing
Equiripple design method is not able to optimally meet the design constraints, then use the
Kaiser window design method.

If you are not sure of which method to use, set the design method to its default value Auto. The Auto
mode automatically chooses a design method from the two methods that optimally meets the filter
constraints specified in the block parameters.

Certain IIR frequency transformation functions now support higher-


order section filters
Starting in R2022a, the following IIR frequency transformation functions in DSP System Toolbox
support higher-order section input prototype filters. You can specify the input filter coefficients as
second-order or higher-order section matrices. For more details, see these function reference pages.

• iirftransf
• iirlp2bp
• iirlp2bpc
• iirlp2bs
• iirlp2bsc
• iirlp2hp
• iirlp2lp
• iirlp2mb
• iirlp2mbc
• iirlp2xc
• iirlp2xn

6-4
Digital Filters

Farrow Rate Converter block supports variable-size input signal and


arbitrary input frame size
Starting in R2022a, the Farrow Rate Converter block supports variable-size input signal and arbitrary
input frame size.

To enable this behavior, clear the Force fixed size input and output frames parameter in the block
dialog box. In this mode, the frame size (number of rows) of the input signal can change during
simulation while the number of channels (number of columns) must remain constant.

Also, the frame size of the signal no longer needs to be a multiple of the decimation factor. To
determine the decimation factor of the rate converter, click the View Info button in the block dialog
box.

When you select the Force fixed size input and output frames parameter, the block expects a
fixed-size input signal with a frame size that is a multiple of the decimation factor.

Functionality being removed or changed


'Raised Cosine' and 'Square Root Raised Cosine' response methods will be removed
Warns

The 'Raised Cosine' and 'Square Root Raised Cosine' response methods in the
fdesign.decimator and fdesign.interpolator objects will be removed in a future release. Use
rcosdesign, comm.RaisedCosineTransmitFilter (Communications Toolbox), and
comm.RaisedCosineReceiveFilter (Communications Toolbox) instead.

dsp.AllpassFilter System object no longer supports cell array coefficients

Cell array support for AllpassCoefficients, WDFCoefficients, and LatticeCoefficients


properties in the dsp.AllpassFilter object has been removed. Use an N-by-1 or N-by-2 numeric
array instead.

iirparameq will be removed


Warns

Starting in R2022a, the iirparameq function will warn. Use designParamEQ (Audio Toolbox)
instead. For details on how to replace your existing code, see the Version History section on the
iirparameq function reference page.

Certain fdesign objects will be removed


Warns

Starting in R2022a, these fdesign objects will warn. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Version History section on the respective
fdesign filter specification object reference page.

Object Use This Instead


fdesign.parameq designParamEQ (Audio Toolbox)
fdesign.octave octaveFilter (Audio Toolbox)

6-5
R2022a

Object Use This Instead


fdesign.audioweighting weightingFilter (Audio Toolbox)
fdesign.pulseshaping rcosdesign, gaussdesign

Certain mfilt objects have been removed


Errors

Starting in R2022a, these mfilt objects will error. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Version History section on the respective
mfilt object reference page.

Object Use This Instead


mfilt.linearinterp dsp.FIRInterpolator(L,'Linear')
mfilt.cicinterp dsp.CICInterpolator
mfilt.fftfirinterp dsp.FIRInterpolator
mfilt.firinterp dsp.FIRInterpolator
mfilt.holdinterp dsp.FIRInterpolator(L,'ZOH')
mfilt.iirinterp dsp.IIRHalfbandInterpolator

dsp.ParametricEQFilter has been removed

The dsp.ParametricEQFilter object has been fully removed in R2022a. You will no longer be able
to use this object in your code. Use designParamEQ or multibandParametricEQ instead.

6-6
Scopes and Visualization

Scopes and Visualization

Spectrum Analyzer with better responsiveness and toolstrip interface


for analysis, estimation, and measurement parameters
Use the new spectrumAnalyzer MATLAB object to visualize the frequency spectrum of the time-
domain signals. The new object comes with better responsiveness and a toolstrip interface that gives
easy access to spectral analysis, estimation, and measurements.

The new Spectrum Analyzer window has the following toolstrip tabs:

Analyzer Tab

On the Analyzer tab, you can control the spectrum and spectrogram display settings, spectral-
bandwidth-related settings, and configuration settings of the Spectrum Analyzer. You can also
generate script to recreate your spectrum analyzer with the same settings. When doing so, an editor
window opens with the code required to recreate your spectrumAnalyzer object.

Estimation Tab

On the Estimation tab, you can specify the input domain, frequency resolution method, frequency
span options, and the averaging method that is used to estimate the power spectrum. If you specify
the frequency resolution method as Welch, you can also choose the options of the filter window that
is used for spectral estimation.

6-7
R2022a

Measurements Tab

In the Measurements tab, all measurements are for a specific channel.

• Data Cursors — Display the screen cursors.


• Peak Finder — Display peak values for the selected signal.
• Distortion — Display harmonic and intermodulation distortion measurements.

Spectrum Tab

On the Spectrum tab, you can specify the trace and scale options of the Spectrum Analyzer. You can
choose to show a two-sided spectrum or a one-sided spectrum, and select to show maximum-hold
trace, minimum-hold trace, or normal trace. You can also specify the reference load and spectral
units.

Spectrogram Tab

To display the Spectrogram tab, click on the Spectrogram view in the Analyzer tab.

On the Spectrogram tab, you can specify the channel over which the spectrogram is computed, time
resolution and time span of the spectrogram, and choose to show a two-sided spectrum or a one-sided
spectrum. You can also specify the reference load and spectral units.

Spectral Mask Tab

Add upper and lower masks to the Spectrum Analyzer to visualize spectrum limits and compare
spectrum values to specification values.

6-8
Scopes and Visualization

Channel Measurements Tab

In the Channel Measurements tab, all measurements are for a specific channel.

• Channel Measurements — Select to display occupied bandwidth or adjacent channel power


ratio (ACPR) measurements.
• Frequency Options — Display frequency span, center frequency, and start and stop frequencies.
• Adjacent Channels — Display adjacent channel power ratio (ACPR) measurements.

Improved filter response visualization in certain DSP System Toolbox


blocks
When you click the View Filter Response button in the dialog box of the Frequency-Domain FIR
Filter and Complex Bandpass Decimator blocks, the dynamic filter visualizer launches and shows the
magnitude response of the designed filter. The response is based on the block parameters. To update
the magnitude response while the dynamic filter visualizer is running, modify the parameters in the
block dialog box and click Apply.

Using the dynamic filter visualizer, you can configure the plot settings, measure signal statistics, find
peak values, place data cursors, and so on from the interface of the visualizer. For more details on the
dynamic filter visualizer interface and the available tools, see dsp.DynamicFilterVisualizer.

6-9
R2022a

Time Scope MATLAB object and Array Plot now support additional
signal statistics
The timescope object, dsp.ArrayPlot object, and the Array Plot block now support the following
additional signal statistics:

• Standard deviation
• Variance
• Mean square

For more details, see Configure Time Scope MATLAB Object and Configure Array Plot.

Configure timescope measurements programmatically


The following properties configure measurement data programmatically for the timescope object:

• MeasurementChannel
• BilevelMeasurements
• CursorMeasurements
• PeakFinder
• SignalStatistics
• Trigger

Using these properties, you can now interact with the scope from the command line. Any changes
that you make to the properties in the command line change the corresponding values in the UI. Any
changes that you make in the UI change the corresponding property values in the command line.

6-10
Scopes and Visualization

Configure dsp.ArrayPlot measurements programmatically


The following properties configure measurement data programmatically for the dsp.ArrayPlot
object:

• MeasurementChannel
• CursorMeasurements
• PeakFinder
• SignalStatistics

Using these properties, you can now interact with the scope from the command line. Any changes
that you make to the properties in the command line change the corresponding values in the UI. Any
changes that you make in the UI change the corresponding property values in the command line.

Array Plot block supports multiple frame sizes


The Array Plot block now supports inputs with different frame lengths.

Functionality being removed or changed


CCDF measurements will be removed from the dsp.SpectrumAnalyzer object
Warns

The CCDFMeasurements property will be removed from the dsp.SpectrumAnalyzer object. If you
try to edit these measurements from the command line or from the user interface (UI), the object
throws a warning message.

6-11
R2022a

Use the powermeter object instead to plot and visualize CCDF measurements.

Access to Time Scope through Handle Graphics API will be removed


Still runs

The underlying graphics of the Time Scope block will change in a future release. Once that happens,
you will not be able to access or modify the Time Scope block through the handle graphics API.

Update any undocumented use of handle graphics APIs that access the Scope window.

SampleInput parameter will be removed


Still runs

The SampleInput parameter of the Time Scope block (currently accessed through the command line
API) will be removed in a future release.

dsp.SpectrumAnalyzer object will be removed


Still runs

The dsp.SpectrumAnalyzer object will be removed in a future release. Use the new
spectrumAnalyzer MATLAB object instead. The spectrumAnalyzer object has the same
properties as the dsp.SpectrumAnalyzer object. However, the default value of the Method
property has changed to 'filter-bank', and the default value of the AveragingMethod property
has changed to 'vbw', video bandwidth.

No updates to your code are required except for:

• Replacing instances of dsp.SpectrumAnalyzer with spectrumAnalyzer.


• Updating the values of Method and AveragingMethod properties, if required.

For more details on how to update your existing code, see the Version History section on the
dsp.SpectrumAnalyzer object page.

Support for dsp.SpectrumAnalyzer object will be removed from certain object functions
Still runs

The support for dsp.SpectrumAnalyzer object will be removed from the following object functions
in a future release. Use the new spectrumAnalyzer MATLAB object instead in the place of the
dsp.SpectrumAnalyzer object.

• show
• hide
• isVisible
• generateScript
• getMeasurementsData
• getSpectralMaskStatus
• getSpectrumData
• isNewDataReady

No updates to your code are required except for replacing instances of dsp.SpectrumAnalyzer
with spectrumAnalyzer.

6-12
Scopes and Visualization

For more details on how to update your existing code, see the Version History section on the
individual object function pages.

6-13
R2022a

Discrete-Time Signals

Functionality being removed or changed


DirectFeedthrough property has been removed from dsp.VariableFractionalDelay System
object

The DirectFeedthrough property has been removed from the dsp.VariableFractionalDelay


System object. The object now operates in direct feedthrough mode by default.

Functionality removed in dsp.Delay System object

Starting in R2022a, you can no longer specify the units of input delay through the Units property in
the dsp.Delay System object. The object now delays the input in samples.

The InitialConditions property in the dsp.Delay object no longer supports a cell array format.
Use a Length-by-numChans matrix instead, where numChans is the number of input channels and
Length is the value you specify in the Length property.

midi functions require Audio Toolbox

Starting in R2022a, to use the following midi functions, you must have the Audio Toolbox installed.

• midicallback (Audio Toolbox)


• midicontrols (Audio Toolbox)
• midiid (Audio Toolbox)
• midiread (Audio Toolbox)
• midisync (Audio Toolbox)

Certain System objects have been removed

These System objects have been fully removed in R2022a. You will no longer be able to use these
objects in your code. Use the equivalent replacements instead.

System object Use This Instead


dsp.Normalizer normalize, vecnorm
dsp.Buffer dsp.AsyncBuffer
dsp.AudioRecorder audioDeviceReader (Audio Toolbox)
dsp.AudioPlayer audioDeviceWriter (Audio Toolbox)

6-14
Transforms, Estimation, and Statistics

Transforms, Estimation, and Statistics

New CCDF measurement mode in powermeter System object


Starting in R2022a, you can compute and output the CCDF measurements using the powermeter
System object.

Functionality being removed or changed


Certain System objects have been removed

These System objects have been fully removed in R2022a. You will no longer be able to use these
objects in your code. Use the equivalent replacements instead.

System object Use This Instead


dsp.Histogram histcounts
dsp.Maximum max, dsp.MovingMaximum
dsp.Minimum min, dsp.MovingMinimum
dsp.Mean mean, dsp.MovingAverage
dsp.Median median, dsp.MedianFilter
dsp.RMS rms, dsp.MovingRMS
dsp.StandardDeviation std, dsp.MovingStandardDeviation
dsp.Variance var, dsp.MovingVariance
dsp.DCT dct
dsp.IDCT idct
dsp.LPCToAutocorrelation poly2ac
dsp.LPCToLSP cos(poly2lsf)
dsp.LPCToRC poly2rc
dsp.LSFToLPC lsf2poly
dsp.RCToAutocorrelation rc2ac
dsp.RCToLPC rc2poly
dsp.BurgAREstimator arburg
dsp.BurgSpectrumEstimator pburg
dsp.CepstralToLPC No replacement
dsp.LPCToCepstral No replacement
dsp.LSPToLPC No replacement

6-15
R2022a

Code Generation

iirnotch, iirpeak, iircomb, and designMultirateFIR functions now


support nonconstant inputs during code generation
While generating code from the iirnotch, iirpeak, iircomb, and designMultirateFIR
functions, you no longer need to specify the function inputs as constants.

codegen iircomb -args {10,0.7}


iircomb_mex(10,0.0057)

For more details on constant inputs, see the coder.Constant (MATLAB Coder) object.

In the case of the designMultirateFIR function, the inputs to the function must be constants when
generating code for transition-width-based filter design. In this design, the polyphase length (and
therefore the filter length) is not specified and the function determines this value iteratively. For more
details, see the Code Generation section in the designMultirateFIR page.

Improved speed performance in certain DSP System Toolbox features


In R2022a, these features have an improved speed performance under the specified conditions.

Feature Conditions Improved Speed


Performance
dsp.Channelizer • Input signal has a data type Notice improved speed
dsp.ChannelSynthesizer of single or double performance when you:
• Input signal can be real or
dsp.FIRDecimator • Simulate the object
complex
dsp.FIRRateConverter algorithm in MATLAB

dsp.SpectrumEstimator • Run the MEX file that you


generate using the codegen
dsp.SubbandAnalysisFilte (MATLAB Coder) function
r
• Run the MEX file that you
dsp.SampleRateConverter generate using the
dsp.ZoomFFT dspunfold function

6-16
Code Generation

Feature Conditions Improved Speed


Performance
Spectrum Estimator • Input signal has a data type Notice improved speed
of single or double performance when the block:
• Input signal can be real or • Simulates in Normal mode
complex
• Simulates in Accelerator
mode
• Simulates in Rapid
Accelerator mode
• Belongs to a model reference
(Simulink) and operates in
Normal mode
• Belongs to a model reference
(Simulink) and operates in
Accelerator mode

For more details on these


modes, see Choosing a
Simulation Mode (Simulink) and
Choose Simulation Modes for
Model Hierarchies (Simulink).
FIR Decimation • Input signal has a data type Notice improved speed
FIR Rate Conversion of single or double performance when the block:
• Input signal can be real or
Two-Channel Analysis Subband • Simulates in Normal mode
complex
Filter • Simulates in Accelerator
• Rate options set to
mode
Enforce single-rate
processing or Allow • Simulates in Rapid
multirate processing Accelerator mode
• When Rate options is set to • Belongs to a model reference
Allow multirate (Simulink) and operates in
processing, the input Normal mode
frame length (number of • Belongs to a model reference
rows) can be of any size and (Simulink) and operates in
does not have to be a Accelerator mode
multiple of the decimation
factor • Belongs to a Dataflow
Subsystem block
Channelizer • Input signal has a data type
Channel Synthesizer of single or double. For more details on these
• Input signal can be real or modes, see Choosing a
complex. Simulation Mode (Simulink) and
Choose Simulation Modes for
• Simulate using is set to
Model Hierarchies (Simulink).
Interpreted execution
or Code generation.

6-17
R2022a

Dataflow simulation analysis using the Multicore tab


A new Simulation Profiling option is available in the Multicore tab for simulation profiling. By
default, Simulation Profiling is the default cost method of the Multicore tab. You can use
simulation profiling to measure average execution times (cost) of blocks inside the dataflow
subsystem for automatic partitioning of the subsystem for multithreaded simulation. For more
information, see Perform Multicore Analysis for Dataflow.

Buffer and Unbuffer blocks now support code generation for Simulink
Real-Time
Starting in R2022a, the Buffer and Unbuffer blocks support code generation for Simulink Real-
Time™. The code generated for this target is executed concurrently.

To generate this code, the system target file of the model should be set to slrealtime.tlc and the
blocks must satisfy certain conditions. For more details on these conditions, see the Extended
Capabilities > C/C++ Code Generation sections on the Buffer and Unbuffer block reference pages.

Nonrecursive code generation in DCT and IDCT blocks


The DCT and IDCT blocks generate code that is nonrecursive. This is to ensure that the generated
code complies with the embedded systems coding standards.

To Workspace block inside a Dataflow Subsystem block supports


multithreaded execution
Starting in R2022a, the To Workspace (Simulink) block inside a Dataflow Subsystem block supports
multithreaded simulation.

Compatibility Considerations
Before R2022a, using a To Workspace block inside a Dataflow Subsystem block forced dataflow
domain to single-threaded execution. Starting in R2022a, the To Workspace block supports multi-

6-18
Code Generation

threaded execution inside a Dataflow Subsystem block. However, during multi-threaded execution,
the output of the To Workspace block may be different than the output during the single-threaded
execution. The output may differ due to the distribution of the pipeline delays inside the Dataflow
Subsystem block for multithreading. These delays impact the output of the To Workspace block due to
the latencies in the model. You can visualize these delays and the relationship between the output of
the To Workspace block and the delays. For more information, see Dataflow Domain.

Functionality being removed or changed


HDL Optimized System objects moved to DSP HDL Toolbox

Starting in R2022a, these objects have moved to a new product, DSP HDL Toolbox™. These objects
are no longer available with the DSP System Toolbox product. The objects forward to the new name
and existing code continues to work.

Old name New name Notes


dsp.HDLFFT dsphdl.FFT The new object supports FFT
length of 4.
dsp.HDLIFFT dsphdl.IFFT The new object supports FFT
length of 4.
dsp.HDLNCO dsphdl.NCO When you set the Waveform
property to 'Complex
exponential' or 'Sine and
cosine', the new object
implements a 1/8 sine wave
lookup table for each of the sine
and cosine parts of the
waveform, and uses control
logic to select and invert the
values to generate both sine and
cosine waveforms. This
optimization means that dual
output mode uses similar
hardware resources compared
to single output mode.
dsp.HDLComplexToMagnitud dsphdl.ComplexToMagnitud The new object provides the
eAngle eAngle ScalingMethod property to
configure the hardware
implementation of the CORDIC
gain. To use a multiplier, set this
property to 'Multipliers'. To
use shift-and-add logic, set this
property to 'CSD'.

6-19
R2022a

Old name New name Notes


dsp.HDLFIRFilter dsphdl.FIRFilter • The new object supports
high-throughput data. You
can apply input data as a N-
by-1 vector, where N can be
up to 64 values.
• The NumberOfCycles
property is now named
NumCycles.
• When you use programmable
coefficients with the new
object, you must supply the
coefficients as a row vector.
The old object accepted
either a row or a column
vector of coefficients.

6-20
Code Generation

Old name New name Notes


dsp.HDLCICDecimator dsphdl.CICDecimator • A decimation factor of 1 was
invalid on the old object. You
can set the decimation factor
to 1 on the new object.
• Config Before After
uratio R2022 2022a
n a
Variabl Set the Set the
e Varia Decim
decima bleDe ation
tion cimat Sourc
factor ion e
propert propert
y to y to
true, 'Inpu
and the t
Decim port',
ation and set
Facto the
r MaxDe
propert cimat
y to the ionFa
maxim ctor
um propert
expect y to the
ed maxim
decima um
tion expect
factor. ed
decima
tion
factor
Fixed Set the Set the
decima Varia Decim
tion bleDe ation
factor cimat Sourc
ion e
propert propert
y to y to
false, false,
and the and the
Decim Decim
ation ation
Facto Facto
r r
propert propert
y to the y to the
desired desired
decima decima

6-21
R2022a

Old name New name Notes


Config Before After
uratio R2022 2022a
n a
tion tion
factor. factor.
• The ResetIn property is
renamed to
ResetInputPort.
dsp.HDLFIRDecimator dsphdl.FIRDecimator The new object supports vector
sizes greater than decimation
factor and a partly serial
architecture.
dsp.HDLFIRRateConverter dsphdl.FIRRateConverter The
dsp.HDLFIRRateConverter
System object provided an
optional request argument.
This argument is not available
on the
dsphdl.FIRRateConverter
System object.
dsp.HDLChannelizer dsphdl.Channelizer The new object supports FFT
length of 4.

HDL Optimized blocks moved to DSP HDL Toolbox

Starting in R2022a, these blocks have moved from the DSP System Toolbox HDL Support library
to the new DSP HDL Toolbox library. The blocks forward to the new name and library location and
existing models continue to work.

Old name New name Notes


FFT HDL Optimized FFT The new block supports FFT
length of 4.
IFFT HDL Optimized IFFT The new block supports FFT
length of 4.

6-22
Code Generation

Old name New name Notes


NCO HDL Optimized NCO When you set the Type of
output signal parameter to
Complex exponential or
Sine and cosine, the new
block implements a 1/8 sine
wave lookup table for each of
the sine and cosine parts of the
waveform, and uses control
logic to select and invert the
values to generate both sine and
cosine waveforms. This
optimization means that dual
output mode uses similar
hardware resources compared
to single output mode.
Complex To Magnitude-Angle Complex To Magnitude-Angle The new block provides the
HDL Optimized Scaling method parameter to
configure the hardware
implementation of the CORDIC
gain. To use a multiplier, set this
parameter to Multipliers. To
use shift-and-add logic, set this
property to CSD.
Discrete FIR Filter HDL Discrete FIR Filter • The new block supports
Optimized high-throughput data. You
can apply input data as a N-
by-1 vector, where N can be
up to 64 values.
• When you use programmable
coefficients with the new
block, you must supply the
coefficients as a row vector.
The old block accepted
either a row or a column
vector of coefficients.

6-23
R2022a

Old name New name Notes


CIC Decimation HDL Optimized CIC Decimator • A decimation factor of 1 was
invalid on the old block. You
can set the decimation factor
to 1 on the new block.
• Config Before After
uratio R2022 2022a
n a
Variabl Select Set the
e the Decim
decima Variab ation
tion le factor
factor decim source
ation parame
parame ter to
ter and Input
set the port
Decim and set
ation the
factor Decim
(R) ation
parame factor
ter to (Rmax
the )
maxim parame
um ter to
expect the
ed maxim
decima um
tion expect
factor. ed
decima
tion
factor.
The
decim
Factor
port is
rename
d to R.
Fixed Clear Set the
decima the Decim
tion Variab ation
factor le factor
decim source
ation parame
parame ter to
ter and Prope
set the rty
Decim and set

6-24
Code Generation

Old name New name Notes


Config Before After
uratio R2022 2022a
n a
ation the
factor Decim
(R) ation
parame factor
ter to (R)to
the the
desired desired
decima decima
tion tion
factor. factor.
FIR Decimation HDL Optimized FIR Decimator The new block supports vector
sizes greater than decimation
factor and partly serial
architecture.
FIR Sample Rate Conversion FIR Sample Rate Converter The FIR Sample Rate
HDL Optimized Conversion HDL Optimized
block provided an optional
request port. This port is not
available on the FIR Sample
Rate Converter block. For an
alternate way to control the
data rate in your model, see
Control Data Rate Using Ready
Signal (DSP HDL Toolbox)
Channelizer HDL Optimized Channelizer The new block supports FFT
length of 4.

6-25
R2022a

Linear Algebra

Functionality being removed or changed


Certain blocks moved to Simulink

Starting in R2022a, these blocks have moved from the DSP System Toolbox > Math Functions >
Matrices and Linear > Matrix Operations to Simulink > Matrix Operations. These blocks are
no longer available in the DSP System Toolbox library.

• Create Diagonal Matrix


• Extract Diagonal Matrix
• Permute Matrix
• Submatrix

All existing models continue to work.

In addition, starting in R2022a, the Identity Matrix block is no longer available in DSP System
Toolbox > Math Functions > Matrices and Linear > Matrix Operations. Instead, use the
Identity Matrix (Simulink) block in Simulink > Matrix Operations.

All existing models continue to work.

6-26
7

R2021b

Version: 9.13

New Features

Bug Fixes

Compatibility Considerations
R2021b

Digital Filters

New default filter design for FIR rate conversion objects


Starting in R2021b, when you create a dsp.FIRDecimator, dsp.FIRInterpolator, and
dsp.FIRRateConverter object, the object designs its filter coefficients based on the rate
conversion factor that you specify while creating the object. The objects design the filter using the
designMultirateFIR function.

As an example, create a dsp.FIRDecimator object and specify the decimation factor to be 3. The
object designs the filter using designMultirateFIR(1,3). You can access the designed filter
through the Numerator property.

firD3 = dsp.FIRDecimator(3)

firD3 =

dsp.FIRDecimator with properties:

DecimationFactor: 3
NumeratorSource: 'Property'
Numerator: [1×72 double]
Structure: 'Direct form'

Now create another dsp.FIRDecimator object with a decimation factor of 5. The object now
designs the filter using designMultirateFIR(1,5).

firD5 = dsp.FIRDecimator(5)

firD5 =

dsp.FIRDecimator with properties:

DecimationFactor: 5
NumeratorSource: 'Property'
Numerator: [1×120 double]
Structure: 'Direct form'

If you want to revert the object to the design mode where the filter is not designed based on the rate
conversion factor, pass the keyword 'legacy' as an input while creating the object.

firD5L = dsp.FIRDecimator(5,'legacy')

firD5L =

dsp.FIRDecimator with properties:

DecimationFactor: 5
NumeratorSource: 'Property'
Numerator: [1×36 double]
Structure: 'Direct form'

7-2
Digital Filters

New automatic design for FIR rate conversion objects


When you create a dsp.FIRDecimator, dsp.FIRInterpolator, and dsp.FIRRateConverter
object, the object designs its filter coefficients based on the rate conversion factor that you specify
while creating the object.

After this initial design, if you want to change the rate conversion factor to a different value and have
the filter redesigned automatically based on this new value, set the filter object to operate in the
automatic design mode. This mode enables the object to redesign the filter every time there is an
update in the rate conversion factor. To set the filter object to operate in the automatic design mode,
you can either pass the keyword 'auto' as an input while creating the object, or you can set the
'NumeratorSource' property of the object to 'Auto' explicitly.
firI = dsp.FIRInterpolator(3,'auto')

firI =

dsp.FIRInterpolator with properties:

InterpolationFactor: 3
NumeratorSource: 'Auto'
DesignMethod: 'Kaiser'

When dsp.FIRInterpolator and dsp.FIRRateConverter objects are in the automatic design


mode, you can also specify the underlying D/A signal interpolation model through the DesignMethod
property. The values of the DesignMethod property can be either 'Kaiser', 'Linear', or 'ZOH'.
firI.DesignMethod = 'linear'

firI =

dsp.FIRInterpolator with properties:

InterpolationFactor: 3
NumeratorSource: 'Auto'
DesignMethod: 'Linear'

To access the filter coefficients in the automatic design mode, type filterobject.Numerator in
the MATLAB command prompt.
firI.Numerator

ans =

0.3333 0.6667 1.0000 0.6667 0.3333

Now change the interpolation factor to 2 and display the filter coefficients. The automatic design
mode redesigns the filter based on the new interpolation factor.
firI.InterpolationFactor = 2

firI =

dsp.FIRInterpolator with properties:

InterpolationFactor: 2
NumeratorSource: 'Auto'
DesignMethod: 'Linear'

7-3
R2021b

firI.Numerator

ans =

0.5000 1.0000 0.5000

Complex support for SOS filter coefficients


The numerator and denominator coefficients of the dsp.SOSFilter object now accept complex
values. The numerator coefficients are specified through the Numerator property and the
denominator coefficients are specified through the Denominator property.

Arbitrary frame size support for dsp.FarrowRateConverter


The dsp.FarrowRateConverter object can now accept inputs of any frame size. You can specify
any frame size and are no longer limited to specify frame sizes that are multiples of the decimation
factor.

Functionality being removed or changed


'Raised Cosine' and 'Square Root Raised Cosine' response methods will be removed
Still runs

The 'Raised Cosine' and 'Square Root Raised Cosine' response methods in
fdesign.decimator and fdesign.interpolator objects will be removed in a future release. Use
rcosdesign, comm.RaisedCosineTransmitFilter (Communications Toolbox), and
comm.RaisedCosineReceiveFilter (Communications Toolbox) instead.

dsp.KalmanFilter will be removed


Warns

Starting in R2021b, the dsp.KalmanFilter object will warn. Use Kalman filter functionality in
Sensor Fusion and Tracking Toolbox instead.

7-4
Scopes and Visualization

Scopes and Visualization

Spectrum Analyzer CCDF measurement reference line changed


In the Spectrum Analyzer block and dsp.SpectrumAnalyzer object, the Gaussian reference line for
the complimentary cumulative distribution function (CCDF) measurement has changed. Previously,
the reference line represented the CCDF of the power of a real white Gaussian noise. Starting in
R2021b, the reference line represents the CCDF of the power of a complex white Gaussian noise,
calculated using a chi-squared distribution.

dsp.ArrayPlot supports multiple frame sizes


The dsp.ArrayPlot now supports inputs with different frame lengths.

7-5
R2021b

Discrete-Time Signals

Tunable Filename property for dsp.AudioFileWriter and


dsp.AudioFileReader objects in generated code
Starting in R2021b, the Filename property of the dsp.AudioFileReader and
dsp.AudioFileWriter objects is tunable. With this change, you can pass the name of the audio file
as an input parameter while running the code generated from these objects.

To enable the file name tunability in the dsp.AudioFileReader object, set the
FilenameIsTunableInCodegen property to true. File attributes such as the audio format, the
number of audio channels, the sample rate, and the bit rate are not tunable, and must match the
attributes of the prototype audio file specified through the CodegenPrototypeFile property. The
specified prototype audio file determines the attributes and the type of audio files that can be read by
the generated code.

For an example, see Tunable Audio File Name in Generated Code.

Functionality being removed or changed


Certain System objects will be removed
Warns

Starting in R2021b, these objects will warn. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Compatibility Considerations section on
the respective System object reference page.

System object Use This Instead


dsp.Interpolator dsp.FIRInterpolator, interp1
dsp.Convolver conv
dsp.UniformDecoder udecode
dsp.UniformEncoder uencode
dsp.Counter Create a variable in MATLAB and increment the
variable by 1
dsp.DelayLine No direct replacement.

dsp.AsyncBuffer object can be used to achieve


a delay line
dsp.Window window
dsp.ScalarQuantizerDecoder No replacement
dsp.ScalarQuantizerEncoder No replacement
dsp.VectorQuantizerDecoder No replacement
dsp.VectorQuantizerEncoder No replacement

dsp.PeakFinder object has been removed


Errors

7-6
Discrete-Time Signals

The dsp.PeakFinder object has been removed in R2021b. To determine the local maxima, use the
findpeaks function. To determine the local minima, use the islocalmin function and find the
signal values corresponding to the local minima indices that the function determines. For more
details, see the Compatibility Considerations section on the object reference page.

Blocks being removed

These blocks have been removed in R2021b.

• Scalar Quantizer Design


• Vector Quantizer Design

Compatibility Considerations
Existing models using these blocks continue to run in R2021b. For new models created in R2021b,
there is no replacement.

7-7
R2021b

Transforms, Estimation, and Statistics

Specify overlap length in moving statistics objects


You can now specify the length of overlap between sliding windows in the following objects:

• dsp.MovingAverage
• dsp.MovingRMS
• dsp.MovingVariance
• dsp.MovingStandardDeviation
• powermeter

To specify the overlap length, you can either pass the scalar value of the overlap length as a second
value argument while creating the object or explicitly set the OverlapLength property in the object.
In order to specify the overlap length, the objects must compute the statistic using the sliding window
method.

mvgAvg = dsp.MovingAverage(4,1)

mvgAvg =

dsp.MovingAverage with properties:

Method: 'Sliding window'


SpecifyWindowLength: true
WindowLength: 4
OverlapLength: 1

Functionality being removed or changed


Certain System objects will be removed
Warns

Starting in R2021b, these objects will warn. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Compatibility Considerations section on
the respective System object reference page.

System object Use This Instead


dsp.Autocorrelator xcorr
dsp.Crosscorrelator xcorr
dsp.PeakToPeak peak2peak
dsp.PulseMetrics Use the Pulse and Transition Metrics functions.
You can use functions like dutycycle,
midcross, pulseperiod, pulsesep, and
pulsewidth among others
dsp.StateLevels statelevels

7-8
Transforms, Estimation, and Statistics

System object Use This Instead


dsp.TransitionMetrics Use the Pulse and Transition Metrics functions.
You can use functions like falltime,
overshoot, risetime, settlingtime,
slewrate, and undershoot among others

7-9
R2021b

Code Generation

Improved speed performance for certain DSP System Toolbox features


In R2021b, these features have an improved speed performance under specified conditions.

Feature Conditions Speedup mode


dsp.FIRFilter Structure is set to 'Direct You can notice a speedup when
form' you:

Input signal has a data type of • Simulate the object


single or double algorithm in MATLAB
dsp.FIRInterpolator Input signal has a data type of • Run the MEX file that you
single or double generate using the codegen
dsp.Differentiator
(MATLAB Coder) function
dsp.VariableBandwidthFIR
• Run the MEX file that you
Filter
generate using the
dsp.SubbandSynthesisFilt dspunfold function
er
dsp.HighpassFilter FilterType is set to 'FIR'
dsp.LowpassFilter
Input signal has a data type of
single or double
Discrete FIR Filter (Simulink) Filter structure is set to You can notice a speedup when
Direct form the block:

Input processing parameter is • Simulates in Normal mode


set to Columns as channels • Simulates in Accelerator
(frame based) mode
Input signal has a data type of • Simulates in Rapid
single or double Accelerator mode
FIR Interpolation Input processing parameter is • Belongs to a model reference
(Simulink) and operates in
Two-Channel Synthesis Subband set to Columns as channels Normal mode
Filter (frame based)
• Belongs to a model reference
Input signal has a data type of (Simulink) and operates in
single or double Accelerator mode
Bandpass Filter Impulse response is set to FIR • Belongs to a Dataflow
Bandstop Filter Subsystem block
Filter type is set to Single-
Arbitrary Response Filter rate or Interpolator
Hilbert Filter Structure is set to Direct-
form FIR when Filter type is
set to Single-rate

Input processing is set to


Columns as channels
(frame based)

7-10
Code Generation

Feature Conditions Speedup mode


Nyquist Filter Input signal has a data type of
single or double
Inverse Sinc Filter Filter type is set to Single-
rate or Interpolator

Structure is set to Direct-


form FIR when Filter type is
set to Single-rate

Input processing is set to


Columns as channels
(frame based)

Input signal has a data type of


single or double
Digital Filter Design Design Method in Design
filter panel panel is set to FIR

Filter Structure in Import


Filter from Workspace panel
is set to Direct-Form FIR

Input processing is set to


Columns as channels
(frame based)

Input signal has a data type of


single or double
Highpass Filter Filter type is set to FIR You can notice a speedup when
Lowpass Filter the block:
Simulate using is set to
Interpreted execution • Simulates in Normal mode
Differentiator Filter Simulate using is set to • Simulates in Accelerator
Interpreted execution mode
Variable Bandwidth FIR Filter
• Belongs to a model reference
(Simulink) and operates in
Normal mode

SIMD Code Generation: New code replacement library (CRL)


customized for DSP System Toolbox features
You can now further customize the SIMD code that you generate from DSP System Toolbox
algorithms by using the new DSP Intel AVX2-FMA (Windows), DSP Intel AVX2-FMA (Linux),
DSP Intel AVX2-FMA (Mac) code replacement libraries. These libraries are available if you have
the DSP System Toolbox, MATLAB Coder, Simulink Coder (for Simulink models), and Embedded
Coder installed.

For more details on the process of using these libraries, and the features that support SIMD code
generation, see SIMD Code Generation.

7-11
R2021b

POSIX threads (Pthreads) and OpenMP threading support for


multicore custom targets using dataflow domain
Starting in R2021b, the new DataflowThreadingImplementation parameter allows you to select
POSIX threads (Pthreads) or OpenMP threading implementation for multicore custom targets using
dataflow domain.

Change the setting using this command, which takes the values off, OpenMP, or Pthreads.

set_param(myModel, 'DataflowThreadingImplementation','off')

Enhancements for Multicore tab analysis results


There are three enhancements for Multicore tab analysis results:

• The visualizations for relative weight and speed up are improved.


• The analysis report displays total cost and number of threads values for each Dataflow Subsystem
block.
• When you perform SIL/PIL profiling, the results show the units of the profiled cost values.

For more information, see Perform Multicore Analysis for Dataflow and Multicore Analysis Using a
Dataflow Domain.

dspunfold does not support Xcode 12.0 or later


Starting in R2021b, if you have a macOS with an Xcode version 12.0 or later, you cannot use the
dspunfold function on that machine to generate multi-threaded MEX files from your MATLAB
algorithms.

7-12
Linear Algebra

Linear Algebra

Functionality being removed or changed


Certain System objects will be removed
Warns

Starting in R2021b, these objects will warn. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Compatibility Considerations section on
the respective System object reference page.

System object Use This Instead


dsp.ArrayVectorAdder Use + with array expansion
dsp.ArrayVectorSubtractor Use – with array expansion
dsp.ArrayVectorMultiplier Use .* with array expansion
dsp.ArrayVectorDivider Use ./ with array expansion
dsp.CumulativeProduct cumprod
dsp.CumulativeSum cumsum
dsp.LDLFactor ldl
dsp.LUFactor lu
dsp.LevinsonSolver levinson
dsp.LowerTriangularSolver mldivide, \ operator
dsp.UpperTriangularSolver mldivide, \ operator

7-13
8

R2021a

Version: 9.12

New Features

Bug Fixes

Compatibility Considerations
R2021a

Multicore tab for Dataflow: Analyze and configure multicore execution


for Simulink models using Dataflow
When a subsystem in a model is configured to use a dataflow execution domain, the Multicore tab is
activated on the Simulink toolstrip. The Multicore tab consolidates multicore analysis techniques
leveraged in dataflow into a incremental and iterative workflow. For more information, see Perform
Multicore Analysis for Dataflow.

Controls on the Multicore tab allow you to:

• Estimate the relative cost of blocks using internal Simulink heuristics.


• Measure average execution times (cost) of blocks inside the dataflow subsystems by simulating
the model with SIL/PIL. This functionality requires an Embedded Coder license.
• Manually override the block cost values.
• Provide analysis constraints, such as maximum number of threads and threading threshold.
• Run analysis to generate block-to-threads allocation and visualize analysis results.

For an example, see Multicore Analysis Using a Dataflow Domain.

Rationally oversampled channelizers


Design a rationally oversampled channelizer by specifying the decimation factor D such that it is not
an integer multiple of the number of frequency bands M. The oversampling ratio M/D in this case is a
rational number.

You can now directly specify the decimation factor in the dsp.Channelizer object and the
Channelizer block using the DecimationFactor property and the Decimation Factor parameter,
respectively. The number of frequency bands is specified using the NumFrequencyBands property in
the object and the Number of frequency bands parameter in the block.

In-Place Memory Optimization: Optimize the memory usage in the


generated code for certain DSP System Toolbox features
The Discrete FIR Filter (Simulink) block and the dsp.FIRFilter object support in-place memory
optimization. Due to in-place optimization, the generated code uses a single buffer to store the input
and output data values. Every time there is a new intermediary output, this output buffer is
overwritten to store that value. For more details, see In-Place Memory Optimization.

Fractional delay FIR filter design


Design a fractional delay FIR filter using the designFracDelayFIR function. The function provides
a Kaiser-based FIR approximation of a bandlimited ideal shift filter with a fractional (noninteger)
delay value between [0,1].

8-2
Linear Algebra

Power Meter: Measure power of voltage signal in MATLAB and


Simulink
Compute the average power, peak power, and peak-to-average power ratio of a voltage signal in
MATLAB and Simulink using the powermeter System object and the Power Meter block, respectively.
While calculating the power, the object and the block account for the reference load.

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox features
In R2021a, these objects support SIMD code generation using Intel AVX2 technology under the
specified conditions.

MATLAB System objects Conditions


dsp.AnalyticSignal • Input signal is real valued.
• Input signal has a data type of single or
double.
dsp.ComplexBandpassDecimator • Input signal is complex valued.
• Input signal has a data type of single or
double.
dsp.DCBlocker • Input signal has a data type of single or
double.
dsp.Differentiator • Input signal has a data type of single or
double.
dsp.DigitalDownConverter • Input signal has a data type of single or
double.
dsp.DigitalUpConverter • Input signal has a data type of single or
double.
dsp.FIRFilter • Input signal is complex valued.
• Structure is set to 'Direct form
transposed'.
• Coefficients can be real or complex valued

For all other conditions under which the


dsp.FIRFilter object generates SIMD code,
see the Extended Capabilities > C/C++ Code
Generation section on the dsp.FIRFilter
reference page.
dsp.FIRHalfbandInterpolator • Input signal has a data type of single or
double.
dsp.HighpassFilter • FilterType is set to 'FIR'.
• Input signal has a data type of single or
double.

8-3
R2021a

MATLAB System objects Conditions


dsp.LowpassFilter • FilterType is set to 'FIR'.
• Input signal has a data type of single or
double.
dsp.SampleRateConverter • For upsampling, the ratio of output sample
rate to input sample rate must be an integer.
• For downsampling, the ratio of input sample
rate to output sample rate must be an integer.
• Input signal has a data type of single or
double.
dsp.VariableBandwidthFIRFilter • Input signal has a data type of single or
double.

For a full list, see System objects in DSP System Toolbox that Support SIMD Code Generation.

These blocks support SIMD code generation using Intel AVX2 technology under the specified
conditions.

Simulink blocks Conditions


Arbitrary Response Filter • Filter type is set to Single-rate,
Decimator, or Interpolator.
• For Filter type set to Single-rate,
Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• For Filter type set to Decimator, Structure
is set to Direct-form FIR polyphase
decimator and Rate options is set to
Enforce single-rate processing.
• For Filter type set to Interpolator, Rate
options is set to Enforce single-rate
processing.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
Analytic Signal • Input processing is set to Columns as
channels (frame based).
• Input signal has to be real valued.
• Input signal has a data type of single or
double.

8-4
Linear Algebra

Simulink blocks Conditions


Bandpass Filter • Impulse response is set to FIR.
• Filter type is set to Single-rate.
• Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• Use basic elements to enable filter
customization parameter is not selected.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
Bandstop Filter • Impulse response is set to FIR.
• Filter type is set to Single-rate.
• Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• Use basic elements to enable filter
customization parameter is not selected.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
Complex Bandpass Decimator • Input signal is complex valued.
• Input signal has a data type of single or
double.
DC Blocker • Input signal has a data type of single or
double.
Differentiator Filter • Input signal has a data type of single or
double.
Digital Filter Design • Input processing is set to Columns as
channels (frame based).
• Filter Structure (in Import Filter from
Workspace pane) is set to Direct-Form
FIR. You can generate SIMD code even when
the filter is a Direct-Form FIR
Transposed filter. To create a Direct-Form
FIR Transposed filter, select Edit >
Convert Structure, and click Direct-Form
FIR Transposed.
• Input signal has a data type of single or
double.

8-5
R2021a

Simulink blocks Conditions


Discrete FIR Filter (Simulink) • Input signal is complex valued.
• Filter structure is set to Direct form
transposed.
• Coefficients can be real or complex valued

For all other conditions under which the Discrete


FIR Filter block generates SIMD code, see the
Extended Capabilities > C/C++ Code
Generation section on the Discrete FIR Filter
(Simulink) block reference page.
FIR Halfband Interpolator • Input signal has a data type of single or
double.
Highpass Filter • Filter type is set to FIR.
• Input signal has a data type of single or
double.
Hilbert Filter • Filter type is set to Single-rate,
Decimator, or Interpolator.
• For Filter type set to Single-rate,
Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• For Filter type set to Decimator, Structure
is set to Direct-form FIR polyphase
decimator and Rate options is set to
Enforce single-rate processing.
• For Filter type set to Interpolator:

• Interpolation Factor cannot be equal to


1.
• Rate options is set to Enforce single-
rate processing.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
• Input port dimensions cannot be equal to [1
1].

8-6
Linear Algebra

Simulink blocks Conditions


Inverse Sinc Filter • Filter type is set to Single-rate,
Decimator, or Interpolator.
• For Filter type set to Single-rate,
Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• For Filter type set to Decimator, Structure
is set to Direct-form FIR polyphase
decimator and Rate options is set to
Enforce single-rate processing.
• For Filter type set to Interpolator, Rate
options is set to Enforce single-rate
processing.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
Lowpass Filter • Filter type is set to FIR.
• Input signal has a data type of single or
double.
Nyquist Filter • Filter type is set to Single-rate,
Decimator, or Interpolator.
• For Filter type set to Single-rate,
Structure is set to Direct-form FIR or
Direct-form FIR transposed.
• For Filter type set to Decimator, Structure
is set to Direct-form FIR polyphase
decimator and Rate options is set to
Enforce single-rate processing.
• For Filter type set to Interpolator:

• Interpolation Factor cannot be equal to


1.
• Rate options is set to Enforce single-
rate processing.
• Input processing is set to Columns as
channels (frame based).
• Input signal has a data type of single or
double.
• Input port dimensions cannot be equal to [1
1].

8-7
R2021a

Simulink blocks Conditions


Sample-Rate Converter • For upsampling, the ratio of output sample
rate to input sample rate must be an integer.
• For downsampling, the ratio of input sample
rate to output sample rate must be an integer.
• Input signal has a data type of single or
double.
Variable Bandwidth FIR Filter • Input signal has a data type of single or
double.

For a full list, see Simulink Blocks in DSP System Toolbox that Support SIMD Code Generation.

The SIMD technology significantly improves the performance of the generated code.

Improved filter response visualization for certain DSP System Toolbox


blocks
When you click the View Filter Response button in the dialog box of the Variable Bandwidth FIR
Filter, Variable Bandwidth IIR Filter, and the Notch-Peak Filter blocks, the dynamic filter visualizer
launches and shows the magnitude response of the designed filter. The response is based on the block
dialog box parameters. To update the magnitude response while the dynamic filter visualizer is
running, modify the dialog box parameters and click Apply.

Using the dynamic filter visualizer, you can configure the plot settings, measure signal statistics, find
peak values, place data cursors, and so on from the interface of the visualizer. For more details on the
dynamic filter visualizer interface and the tools that are available, see
dsp.DynamicFilterVisualizer.

Improved Speed Performance in Accelerator Mode for specific blocks


in DSP System Toolbox
When you run these blocks in the accelerator mode, the blocks now run faster.

• FIR Decimation
• FIR Interpolation
• LMS Filter

To run the model containing these blocks in the accelerator mode, on the Simulation tab of the
model, in the Simulate section, select Accelerator from the drop-down list. Build an executable for
the model by clicking Run. The acceleration (Simulink) mode uses this executable in simulations as
long as the model remains structurally unchanged. For more details, see Perform Acceleration
(Simulink).

Improved display for Array Plot block


In Simulink, the Array Plot block has a new and improved interface with two toolstrip tabs.

8-8
Linear Algebra

From the toolstrip, you can run the model, modify the settings, turn on measurements, and share an
image of the plot.

For more information, see Configure Array Plot.

8-9
R2021a

Variable-sized input support for timescope object


The timescope object allows you to visualize scalar or variable-sized input signals. If the signal is
variable sized, the number of channels (columns) cannot change.

One-Based index support for Peak Finder block


The Peak Finder block can now output one-based index values for input peaks when you set the
Index base parameter to One. With this setting, if the input vector is [-1.5, 0.5, 0], the peak value is
0.5 and the index of the peak value is 2. The default value for the Index base parameter is Zero. In
this setting, for an input vector of [-1.5, 0.5, 0], the peak value is 0.5 and the index of the peak value
is 1.

Compatibility Considerations
The default index base for the block continues to be zero-based. Existing models created in a previous
release continue to work as expected. If a model created in R2021a has Index base set to One, and
you export the model to a previous release, then the Index base parameter changes to Zero in the
exported model.

Removal of the oversampling ratio functionality


The Oversampling ratio parameter in the Channelizer block has been removed. The
OversamplingRatio property in the dsp.Channelizer object will be removed in a future release.
You can now set the oversampling ratio M/D by specifying the number of frequency bands M and the
decimation factor D.

Compatibility Considerations
Existing code using the OversamplingRatio property and existing models using the Oversampling
ratio parameter continue to work.

If you create a new model containing the Channelizer block in R2021a, and if the Decimation factor
parameter value in the block equals the value of the Number of frequency bands parameter, then
the model containing the block can be exported to a release prior to R2021a. The exported model will
have the Oversampling ratio parameter set to 1.

If the Decimation factor parameter value is less than and is a divisor of the value of the Number of
frequency bands parameter, and the model is exported to a prior release that is not older than
R2020a, the Channelizer will continue to work and the decimation factor will be replaced with the
appropriate oversampling ratio. For a release older than R2020a, the block will be replaced with any
empty subsystem.

If the specified Decimation factor parameter is not equal to and not a divisor of the Number of
frequency bands parameter, the block will be replaced with an empty subsystem.

Digital down-converter (DDC) and digital up-converter (DUC)


examples for FPGA (requires HDL Coder license for code generation)
The HDL Implementation of a Digital Down-Converter for LTE and HDL Implementation of a Digital
Up-Converter for LTE examples show how to design filter chains for communications systems. The

8-10
Linear Algebra

examples show how to model the behavioral algorithm in MATLAB MATLAB and then compare that
reference result against a Simulink Simulink model that uses HDL-optimized blocks to implement the
algorithm for HDL code generation.

Objects being removed


Certain System objects will be removed
Still runs

These objects will be removed in a future release. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Compatibility Considerations section in
the respective System object reference page.

System object Use This Instead


dsp.ArrayVectorAdder Use + with array expansion.
dsp.ArrayVectorSubtractor Use – with array expansion.
dsp.ArrayVectorMultiplier Use .* with array expansion.
dsp.ArrayVectorDivider Use ./ with array expansion.
dsp.CumulativeProduct cumprod
dsp.CumulativeSum cumsum
dsp.Interpolator dsp.FIRInterpolator, interp1
dsp.Convolver conv
dsp.Autocorrelator xcorr
dsp.Crosscorrelator xcorr
dsp.UniformDecoder udecode
dsp.UniformEncoder uencode
dsp.LDLFactor ldl
dsp.LUFactor lu
dsp.LevinsonSolver levinson
dsp.LowerTriangularSolver mldivide, \ operator
dsp.UpperTriangularSolver mldivide, \ operator
dsp.Counter Create a variable in MATLAB and increment the
variable by 1.
dsp.DelayLine No direct replacement.

dsp.AsyncBuffer object can be used to achieve


a delay line.
dsp.Window window
dsp.KalmanFilter Use Kalman filter functionality in Sensor Fusion
and Tracking Toolbox.
dsp.PeakToPeak peak2peak

8-11
R2021a

System object Use This Instead


dsp.PulseMetrics Use the Pulse and Transition Metrics functions.
You can use functions like dutycycle,
midcross, pulseperiod, pulsesep, and
pulsewidth among others.
dsp.StateLevels statelevels
dsp.TransitionMetrics Use the Pulse and Transition Metrics functions.
You can use functions like falltime,
overshoot, risetime, settlingtime,
slewrate, and undershoot among others.
dsp.ScalarQuantizerDecoder No replacement
dsp.ScalarQuantizerEncoder No replacement
dsp.VectorQuantizerDecoder No replacement
dsp.VectorQuantizerEncoder No replacement

Certain System objects have been removed


Errors

These objects have been removed in R2021a. Use the equivalent replacements instead.

For details on how to replace your existing code, see the Compatibility Considerations section in
the respective System object reference page.

System object Use This Instead


dsp.Histogram histcounts
dsp.Maximum max, dsp.MovingMaximum
dsp.Minimum min, dsp.MovingMinimum
dsp.Mean mean, dsp.MovingAverage
dsp.Median median, dsp.MedianFilter
dsp.RMS rms, dsp.MovingRMS
dsp.StandardDeviation std, dsp.MovingStandardDeviation
dsp.Variance var, dsp.MovingVariance
dsp.DCT dct
dsp.IDCT idct
dsp.Normalizer normalize, vecnorm
dsp.ParametricEQFilter designParamEQ function,
MultibandParametricEQ object from Audio
Toolbox
dsp.Buffer dsp.AsyncBuffer
dsp.LPCToAutocorrelation poly2ac
dsp.LPCToLSP cos(poly2lsf)
dsp.LPCToRC poly2rc
dsp.LSFToLPC lsf2poly

8-12
Linear Algebra

System object Use This Instead


dsp.RCToAutocorrelation rc2ac
dsp.RCToLPC rc2poly
dsp.BurgAREstimator arburg
dsp.BurgSpectrumEstimator pburg
dsp.CepstralToLPC No replacement
dsp.LPCToCepstral No replacement
dsp.LSPToLPC No replacement

dsp.TimeScope will be removed


Warns

dsp.TimeScope will be removed in a future release. Use timescope instead. The timescope object
has the same properties as the dsp.TimeScope System object. In your code, replace instances of
dsp.TimeScope with timescope.

Starting in R2021a, dsp.TimeScope uses the new timescope interface.

Blocks being removed


Certain blocks will be removed
Still runs

These blocks will be removed in a future release.

• Scalar Quantizer Design


• Vector Quantizer Design

Blocks that have been removed

These blocks have been removed in R2021a. Use the equivalent replacements instead.

Simulink Blocks Use This Instead


Wavelet Analysis DWT
Wavelet Synthesis IDWT

8-13
9

R2020b

Version: 9.11

New Features

Bug Fixes

Compatibility Considerations
R2020b

New time scope object: Visualize signals in the time domain


Use the timescope object to visualize real- and complex-valued floating-point and fixed-point signals
in the time domain.

The Time Scope window has two toolstrip tabs:

Scopes Tab

On the Scopes tab, you can control the layout and configuration settings, and set the display settings
of the Time Scope. You can also generate script to recreate your time scope with the same settings.
When doing so, an editor window opens with the code required to recreate your timescope object.

Measurements Tab

In the Measurements tab, all measurements are made for a specified channel.

• Data Cursors — Display the screen cursors.


• Signal Statistics — Display various statistics of the selected signal, such as maximum or
minimum values, peak-to-peak values, mean, median, and RMS.
• Peak Finder — Display peak values for the selected signal.
• Bilevel — Measure transitions, overshoots, undershoots, and cycles.
• Triggers — Set triggers to sync repeating signals and pause the display when events occur.

9-2
Linear Algebra

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox features
The following features support SIMD code generation using Intel AVX2 technology under these
conditions:

dsp.FIRFilter System object

• Filter structure is set to 'Direct form' or 'Direct form transposed'.


• Input signal is real-valued with real filter coefficients.
• When filter structure is set to 'Direct form', the input signal can also be complex-valued with
real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see dsp.FIRFilter System object.

dsp.FIRDecimator System object

• Filter structure is set to 'Direct form'.


• Input signal is real-valued with real filter coefficients.
• Input signal is complex-valued with real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see dsp.FIRDecimator System object.

dsp.FIRInterpolator System object

• Input signal is real-valued with real filter coefficients.


• Input signal is complex-valued with real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see dsp.FIRInterpolator System object.

dsp.LMSFilter System object

• Method is set to 'LMS' or 'Normalized LMS'.

9-3
R2020b

• WeightsOutput is set to 'None' or 'Last'.


• Input signal is real-valued.
• Input signal has a data type of single or double.

For more details, see dsp.LMSFilter System object.

FIR Interpolation block

• Input processing is set to Columns as channels (frame based).


• Rate options is set to Enforce single-rate processing.
• Input signal is real-valued with real filter coefficients.
• Input signal is complex-valued with real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see FIR Interpolation block.

FIR Decimation block

• Filter structure is set to Direct form.


• Input processing is set to Columns as channels (frame based).
• Rate options is set to Enforce single-rate processing.
• Input signal is real-valued with real filter coefficients.
• Input signal is complex-valued with real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see FIR Decimation block.

Discrete FIR Filter block

• Filter structure is set to Direct form or Direct form transposed.


• Input processing is set to Columns as channels (frame based).
• Input signal is real-valued with real filter coefficients.
• When Filter structure is set to Direct form, the input signal can also be complex-valued with
real or complex filter coefficients.
• Input signal has a data type of single or double.

For more details, see Discrete FIR Filter block.

The SIMD technology significantly improves the performance of the generated code.

One-sided short-time Fourier transform in dsp.STFT and dsp.ISTFT


objects
When you set the FrequencyRange property to 'onesided', the dsp.STFT object computes the
one-sided short-time Fourier transform of the real input signal. Correspondingly, the one-sided
inverse short-time FFT is computed when the FrequencyRange property of the dsp.ISTFT object is
set to 'onesided'. To compute the two-sided short-time FFT and inverse short-time FFT, set the
FrequencyRange property to 'twosided'.

9-4
Linear Algebra

Using the getFrequencyVector function, you can obtain the vector of frequencies at which the
short-time FFT is computed.

In-place Memory Optimization: Optimize the memory usage in the


generated code for certain DSP System Toolbox blocks
The Array-Vector Add, Array-Vector Subtract, Array-Vector Multiply, and the Array-Vector Divide
blocks in DSP System Toolbox support in-place memory optimization when the input to the block is
real.

Due to in-place optimization, the generated code uses a single buffer for storing the output data
values. Every time there is a new intermediary output in the model, this output buffer is overwritten
to store that value.

For example, in this model, there is a sequence of Array-Vector Add blocks connected to each other.

Each block adds a vector to its input data and generates an output that is of the same size as the
input.

This image shows a sequence of three s-functions generated in the in-place optimized generated
code. Each block of s-function corresponds to the respective Array-Vector Add block in the Simulink
model. In each s-function, the output buffer rtb_ArrayVectorAdd2[] rewrites its value every time the
Array-Vector Add block has an updated output.

9-5
R2020b

9-6
Linear Algebra

The generated code is efficient and uses less memory.

Improved Speed Performance in Accelerator Mode for specific blocks


in DSP System Toolbox
When you run the following blocks in the accelerator mode, the blocks now run faster.

• Discrete FIR Filter


• FIR Rate Conversion –– To see the speedup in the FIR Rate Conversion block, set Rate options to
Allow multirate processing.
• Arbitrary Response Filter
• Bandpass Filter
• Bandstop Filter
• Hilbert Filter
• Inverse Sinc Filter
• Nyquist Filter
• Digital Filter Design
• Analytic Signal

To run the model containing these blocks in the accelerator mode, on the Simulation tab of the
model, in the Simulate section, select Accelerator from the drop-down list. Build an executable for
the model by clicking Run. The acceleration (Simulink) mode uses this executable in simulations as
long as the model remains structurally unchanged. For more details, see Perform Acceleration
(Simulink).

Visualize logged Stateflow states in the Logic Analyzer


When you log signals in Stateflow charts, you can use the Logic Analyzer to visualize the state
changes. To log Stateflow states, in the Simulation tab, under Prepare, select a state logging option.
In the Logic Analyzer, you'll see your states marked for logging in the left column.

For more details about how to log Stateflow signals, see Log Simulation Output for States and Data
(Stateflow).

HDL-optimized FIR Decimation block and System object: Downsample


signals using a FIR decimation filter with a hardware-friendly
interface and architecture (requires HDL Coder for code generation)
The FIR Decimation HDL Optimized block downsamples signals using a transposed or systolic filter
architecture. The block provides an efficient hardware implementation and uses hardware-friendly
control signals. The block supports HDL code generation with HDL Coder™.

This algorithm is also available with the dsp.HDLFIRDecimation System object.

Gigasample-per-second (GSPS) CIC Decimation and CORDIC Algorithm:


Increase throughput of HDL-optimized CIC decimation and complex-to-

9-7
R2020b

magnitude-angle conversion by using frame-based input (requires


HDL Coder for code generation)
You can now generate frame-based waveforms from the CIC Decimation HDL Optimized and Complex
to Magnitude-Angle HDL Optimized blocks. Each block accepts and returns a column vector of
elements that represent samples in time. The input vector can contain up to 64 samples. When you
use frame-based input with the CIC Decimation HDL Optimized block, you must use a fixed
decimation factor.

This capability increases throughput in hardware designs. For a list of all blocks that support frame-
based input and output for HDL code generation, see High Throughput HDL Algorithms.

This feature is also available with the dsp.HDLCICDecimation and


dsp.HDLComplexToMagnitudeAngle System objects.

To generate HDL code, you must have the HDL Coder product.

Dataflow domain analysis integrated with Performance Advisor


You can now use the Performance Advisor to find the optimal latency settings for all Dataflow
subsystems in your model in a single step.

To find the optimal latency settings for the Dataflow subsystems in your model, open the Performance
Advisor. In the Performance Advisor > Simulation > Checks that Require Simulation to Run
folder, run the Check Dataflow Domain Settings check.

MATLAB Compiler support for dsp.ArrayPlot


You can use the mcc function to compile MATLAB code containing a dsp.ArrayPlot.

Functionality being removed or changed


dsp.TimeScope will be removed
Still runs

dsp.TimeScope will be removed in a future release. Use timescope instead. The timescope object
has the same properties as the dsp.TimeScope, therefore, no updates to your code are required
except replacing instances of dsp.TimeScope with timescope.

Spectrum Analyzer block defaults changed


Behavior change

Starting in R2020b, by default, the Spectrum Analyzer block uses the filter bank algorithm as the
spectrum estimation method and exponential averaging as the averaging method:

• The default value of the Method parameter is now Filter Bank.


• The default value of the Averaging method parameter is now Exponential.

Compatibility Considerations
For existing models with a Spectrum Analyzer, the default values are not changed. For new
visualizations with the Spectrum Analyzer block, you may see some changes in the output because of

9-8
Linear Algebra

the spectrum estimation method and averaging method. If you want to use the previous default
values, set:

• Method to Welch
• Averaging method to Running

HDL Minimum Resource FFT and HDL Streaming FFT blocks have been removed
Errors

The HDL Minimum Resource FFT and HDL Streaming FFT blocks have been removed. Use the FFT
HDL Optimized block instead.

• When replacing the HDL Minimum Resource FFT block, set the Architecture parameter of the
FFT HDL Optimized block to Burst Radix 2.
• When replacing the HDL Streaming FFT block, set the Architecture parameter of the FFT HDL
Optimized block to Streaming Radix 2^2.

For more information, see Implement FFT for FPGA Using FFT HDL Optimized Block.

Matrix Viewer and Waterfall blocks will be removed


Still runs

The Matrix Viewer and Waterfall blocks will be removed in a future release.

9-9
10

R2020a

Version: 9.10

New Features

Bug Fixes

Compatibility Considerations
R2020a

SIMD Code Generation: Use Intel AVX2 to generate optimized code for
certain DSP System Toolbox blocks
FIR Interpolation and FIR Decimation blocks

The FIR Interpolation and FIR Decimation blocks now support SIMD code generation using Intel
AVX2 technology when Input processing is set to Columns as channels (frame based), Rate
options is set to Enforce single-rate processing, and the signal is real-valued with a data
type of single or double. The SIMD technology significantly improves the performance of the
generated code.

LMS Filter block

The LMS Filter block supports SIMD code generation using Intel AVX2 technology when the block's
Algorithm parameter is set to LMS or Normalized LMS and the signal is real-valued with a data
type of single or double.

Automatically leverage SIMD for multicore dataflow simulations


When your host CPU supports AVX2 technology, and you are using a supported mex compiler,
multithreaded simulations of supported Dataflow subsystems automatically leverage SIMD. This can
significantly improve the performance of multithreaded simulations of dataflow subsystems.

Supported compilers include

• Windows®: Microsoft® Visual C++ compilers.


• Linux®: gcc compilers

New Biquadratic SOS Filter Object


The dsp.SOSFilter System object implements a biquadratic second-order section IIR filter in
MATLAB. The numerator and denominator coefficients and the filter section scale values are tunable
which means their values can change even after the System object is locked. These values are
specified using the Numerator, Denominator, and ScaleValues properties, respectively.

Multirate processing in FIR Rate Conversion block


The Rate options parameter now allows the block to operate in either a single-rate or a multirate
processing mode.

• Enforce single-rate processing –– The output frame size is L/K times the input frame size,
where L is the interpolation factor and K is the decimation factor.

The output signal rate in Simulink equals the input signal rate in Simulink.
• Allow multirate processing –– The output frame size equals the input frame size.

The output signal rate in Simulink is L/K times the input signal rate.

All blocks connected to the output operate at the output signal rate and all blocks connected to
the input operate at the input signal rate.

10-2
Linear Algebra

Non-Maximally Decimated Channelizers


You can now specify the oversampling ratio in the dsp.Channelizer System object and the
Channelizer block. Oversampling ratio O is a positive divisor of the number of frequency bands M.

The decimation factor D of the channelizer is determined using the ratio D = M/O.

When the oversampling ratio is an integer greater than 1, the channelizer is known as the non-
maximally decimated channelizer or oversampled channelizer. Non-maximally decimated channelizers
offer increased design freedom, but at the expense of increased computational cost.

Complex Support for Channelizer and Channel Synthesizer Prototype


Coefficients
The lowpass prototype coefficients of the channelizer and the channel synthesizer objects and blocks
can be complex.

If you specify complex coefficients, the channelizer and channel synthesizer design a prototype filter
that is centered at a nonzero frequency, also known as a bandpass filter. The modulated versions of
the prototype bandpass filter appear with respect to the prototype filter, and are wrapped around the
frequency range [−Fs Fs]. For an example, see Channelizer with Complex Coefficients.

Enhancements to designMultirateFIR function


You can now specify the transition width (TW) as a design parameter to the function as an alternative
to the half polyphase length (P) parameter.

The function also supports a 'SystemObject' flag, which when set to true returns one of the
following multirate System objects:

• dsp.FIRInterpolator –– When L > 1 and M = 1, where L is the interpolation factor and M is


the decimation factor.
• dsp.FIRDecimator –– When L = 1 and M > 1.
• dsp.FIRRateConverter –– When L > 1 and M > 1.

When the 'SystemObject' flag is set to false, the function returns a vector of filter coefficients.

For an example, see Design a dsp.FIRInterpolator System object.

UDP Sender supports large message sizes


The UDP Sender object and block now support message sizes up to 67108864 bytes. The size can be
specified through the SendBufferSize property in the object, and the Send buffer size (bytes)
parameter in the UDP Send block dialog box.

Variable CIC Decimation Factor: Specify decimation factor as an input


to the CIC Decimation HDL Optimized block (requires HDL Coder for
code generation)
You can specify the decimation factor for the CIC Decimation HDL Optimized block as an input port.
You can also now optionally enable automatic gain correction.

10-3
R2020a

These features are also available when using the dsp.HDLCICDecimation System object.

Gigasample-per-second (GSPS) NCO: Generate frame-based output


from HDL-optimized NCO for high speed applications (requires HDL
Coder for code generation)
You can now generate frame-based waveforms from the NCO HDL Optimized block. The block returns
a vector where each element represents a sample in time. Set the Samples per frame parameter to
the desired output vector size.

This capability increases throughput in hardware designs. For a list of all blocks that support frame-
based input and output for HDL code generation, see High Throughput HDL Algorithms.

This feature is also available when using the dsp.HDLNCO System object. Set the SamplesPerFrame
property to the desired output vector size.

To generate HDL code, you must have the HDL Coder product.

Suggestions for optimal model settings in Dataflow Simulation


Assistant
The Dataflow Simulation Assistant now recommends optimal model settings to improve simulation
performance of your model. To open the Dataflow Simulation Assistant, in the Execution tab of the
Property Editor, click Dataflow assistant.

To improve simulation performance, in the Dataflow Simulation Assistant, next to Change model
settings for simulation performance click Accept all. For more information on the optimal model
settings, see Simulation of Dataflow Domains.

Dataflow subsystems supported in model reference simulation targets


A Dataflow Subsystem inside a referenced model that executes in accelerator mode (uses a
simulation target) can now simulate using multiple threads.

Functionality being removed or changed


Removal of DirectFeedthrough property in dsp.VariableIntegerDelay System object

The DirectFeedthrough property in the dsp.VariableIntegerDelay System object has been


removed.

Compatibility Considerations
Make sure you remove all references to this property from your MATLAB code. The System object
will operate in direct feedthrough mode only.

dsp.AudioPlayer and dsp.AudioRecorder objects removed


Errors

10-4
Linear Algebra

Starting in R2020a, using the following System objects throws an error message. Use the equivalent
replacements instead.

System object Use This Instead


dsp.AudioRecorder audioDeviceReader object in Audio Toolbox.

Note The ability to select or change the audio


driver through the DSP System Toolbox
preferences dialog box has been removed. You
can specify the driver in the
audioDeviceReader object by using the
Driver property.
dsp.AudioPlayer audioDeviceWriter object.

Note The ability to select or change the audio


driver through the DSP System Toolbox
preferences dialog box is removed. You can
specify the driver in the audioDeviceWriter
object by using the Driver property. This
property is enabled only if you have the Audio
Toolbox.

For more details, see the Compatibility Considerations sections in the System object reference
pages.

HDL-optimized NCO requires valid input port


Behavior change

In previous releases, the input validIn port of the NCO HDL Optimized block was optional. It is now
required, and renamed valid. If you are using no other input ports, the block uses the valid signal as
an enable signal.

When you use the dsp.HDLNCO System object, you must specify an input validIn argument. If you
are using no other input arguments, the object uses the validIn argument as an enable signal.

HDL-optimized NCO with floating-point inputs applies phase quantization


Behavior change

The output waveform returned from floating-point input values has changed. The output waveform
now matches that returned from the same input values specified in fixed-point types.

In previous releases, when using floating-point input types, the NCO HDL Optimized block did not
quantize the phase internally. The block expected floating-point phase increment and phase offset
inputs specified in radians. Now, the block quantizes the phase internally, and you must specify the
input phase increment and offset in terms of the quantized size, for both floating-point and fixed-point
input types.

This change also applies to the dsp.HDLNCO System object.

For example, in previous releases, for a floating-point HDL NCO to generate output samples with a
desired output frequency of F0 and sample frequency of Fs, you had to specify the phase increment as
2π(F0/Fs) and phase offset as π/2.

10-5
R2020a

Now, you must specify the phase increment and phase offset in terms of the quantized size, N. These
input values are the same as the input values you use with fixed-point types. Specify the phase
increment as (F0×2N)/Fs, and the phase offset as (π/2)2N/2π, or 2N/4.

NCO HDL Optimized block now ignores LUTRegisterResetType parameter


Behavior change

In previous releases, you could choose from two options for the LUTRegisterResetType parameter
on the HDL Block Properties dialog of the NCO HDL Optimized block. The two options were
default, and none. Starting in R2020a, the block ignores the parameter setting and uses none for
this parameter value. This option does not connect a reset signal to the LUT registers. This
configuration enables the synthesis tool to determine whether to implement the lookup tables with
LUTs or BRAM.

Signal data no longer streams to the Logic Analyzer when signal logging is disabled
Behavior change

Previously, signals marked for logging have streamed to the Logic Analyzer, regardless of the setting
for Signal logging in the model configuration parameters. Starting in R2020a, signals marked for
logging stream to the Logic Analyzer only when signal logging is enabled for a model.

To view data in the Logic Analyzer, you must enable signal logging for the model. (Logging is on by
default.) To enable signal logging, open Model Settings from the toolstrip, navigate to the Data
Import/Export pane, and select Signal logging.

10-6
11

R2019b

Version: 9.9

New Features

Bug Fixes

Compatibility Considerations
R2019b

SIMD code from Discrete FIR Filter Block: Generate optimized code
using Intel AVX2 for FIR Filters in Simulink
When Filter structure is set to Direct form, and the signal is real-valued with a data type of single
or double, the Discrete FIR Filter block supports SIMD code generation using Intel AVX2 technology.
The SIMD technology significantly improves the performance of the generated code, in most cases
meeting or exceeding the simulation performance.

HDL-optimized CIC Decimation block and System object: Downsample


signals using a cascade integrator-comb (CIC) filter (requires HDL
Coder for code generation)
The CIC Decimation HDL Optimized block downsamples signals using a CIC filter. The block provides
an efficient hardware implementation and uses hardware-friendly control signals. The block supports
HDL code generation with HDL Coder.

This algorithm is also available as a System object, dsp.HDLCICDecimation.

Discrete FIR Filter HDL Optimized block: Filter using complex


coefficient values (requires HDL Coder for code generation)
The Discrete FIR Filter HDL Optimized block now supports complex-valued coefficients. If both
coefficients and input data are complex, the block implements each filter tap with three multipliers. If
either data or coefficients are complex but not both, the block uses two multipliers for each filter tap.
You can use complex coefficients with all architectures and with programmable coefficients.

This feature is also available with the dsp.HDLFIRFilter System object.

Improved display for dsp.DynamicFilterVisualizer


In MATLAB, the dynamic filter visualizer object, dsp.DynamicFilterVisualizer, has a new and
improved interface:

11-2
Linear Algebra

You can visualize dynamic filters with improved graphics, more responsiveness, and better
interactivity. You can access settings and measurements via tabs and toolstrips.

For more information, see Configure Array Plot MATLAB Object.

Improved display for dsp.ArrayPlot


In MATLAB, the Array Plot object dsp.ArrayPlot has a new and improved interface with two
toolstrip tabs:

11-3
R2019b

By clicking different buttons in the toolstrip, you can configure settings, turn on measurements, and
share an image of the plot.

For more information, see Configure Array Plot MATLAB Object.

Compatibility Considerations
• The dsp.ArrayPlot no longer supports mcc compilation.
• The ReduceUpdates property is no longer applicable. The new Array Plot interface continually
tries to improve performance with update reduction as needed.

dsp.MatrixViewer support for multiple cursor measurements


When you activate cursors in the dsp.MatrixViewer, two horizontal and two vertical cursors
appear. As you move the cursors around, the dsp.MatrixViewer shows the values at the cursor line

11-4
Linear Algebra

intersections and the difference between two intersection points. For more information, see Cursor
Measurements.

Playback control behavior changed for scopes in referenced models


When you use a scope in a referenced model, the playback controls in the scope now match the
playback controls of the last model you interacted with that contains the scope. For example, if you
opened your scope from a model referenced by another model with the Model block, the run button

in the scope runs the top level model. If the referenced model is opened as a root model, the run
button runs the referenced model in isolation.

This change affects the Time Scope, Spectrum Analyzer, and Array Plot blocks, as well as the Logic
Analyzer app.

For more information, see Scopes in Referenced Models (Simulink).

Output of colored noise generator can be bounded


The output generated from the dsp.ColoredNoise object can be bounded between +1 and −1 when
you set the BoundedOutput property to true. Similarly in Simulink, the output of the Colored Noise
block can be bounded between +1 and −1 by selecting the Guarantee the output is bounded
(+/-1) parameter.

Blocks with finite states supported for unfolding in Dataflow


subsystems
When cost analysis identifies a single block in a Dataflow subsystem that is computationally
dominant, the system uses unfolding technology to improve the throughput through parallelization. In
past releases, only stateless blocks were supported for unfolding. In 19b, blocks with finite states,
such as the FIR Filter block, are also supported for unfolding.

For more information, see Types of Parallelism.

Simulate Dataflow subsystems using multiple threads in Rapid


Accelerator mode
Dataflow subsystems now support multithreaded simulation in Rapid Accelerator mode. For more
information, see Multicore Simulation and Code Generation of Dataflow Domains.

Virtual bus support at Dataflow subsystem boundaries for


heterogeneous signals
You can now use virtual buses with mixed signal dimensions and data types at the boundaries of
Dataflow subsystems for single-threaded simulation. For multithreaded simulation of Dataflow
subsystems, replace virtual buses at the boundaries with non-virtual buses.

11-5
R2019b

Functionality being removed or changed


Certain System objects will be removed
Warns

Starting in R2019b, using the following System objects throw a warning message. These objects will
be removed in a future release. Use the equivalent replacements instead.

System object Use This Instead


dsp.Buffer dsp.AsyncBuffer
dsp.Histogram histcounts
dsp.PeakFinder findpeaks, islocalmin
dsp.Maximum max, dsp.MovingMaximum
dsp.Minimum min, dsp.MovingMinimum
dsp.Mean mean, dsp.MovingAverage
dsp.Median median, dsp.MedianFilter
dsp.RMS rms, dsp.MovingRMS
dsp.StandardDeviation std, dsp.MovingStandardDeviation
dsp.Variance var, dsp.MovingVariance

For more details, see the Compatibility Considerations sections in the System object reference
pages.

11-6
12

R2019a

Version: 9.8

New Features

Bug Fixes

Compatibility Considerations
R2019a

Direct and Inverse Short-Time Fourier Transform: Analyze and process


streaming signals in the frequency domain and synthesize them with
perfect reconstruction using overlap and add
The dsp.STFT and dsp.ISTFT objects compute the short-time Fourier transform (STFT) and inverse
short-time Fourier transform (ISTFT) of streaming data with time-varying spectral characteristics.
Examples of such signals include audio, seismic data, and ECG. To analyze the frequency content of
these signals, the dsp.STFT object windows the data into shorter segments with relatively
nonvarying spectral characteristics and applies FFT on the segmented data. To reconstruct the
original time-domain signal, the dsp.ISTFT object performs an ISTFT on the individual transformed
subbands followed by overlap-add operations.

Fourth-Order Section Filter: Model and simulate cascaded fourth-


order section IIR filters in MATLAB
The dsp.FourthOrderSectionFilter object creates a cascade of fourth-order IIR filter sections in
MATLAB.

Spectrum Analyzer improvements for exponential averaging, mixed-


complexity inputs, and MATLAB script generation
The Spectrum Analyzer block and System object now allow mixed-complexity inputs, exponential
averaging, and generation of MATLAB scripts.

Smooth data with exponential averaging

The Spectrum Analyzer block and dsp.SpectrumAnalyzer System object now have two averaging
modes for smoothing input samples: running averages (existing) and exponential averages (new). To
specify the smoothing options for your input data, use these properties:

• Averaging method (AveragingMethod) — Choose Running or Exponential.


• Averages (SpectralAverages) — For running averages, choose the number of spectrum
estimates to include in the running average.
• Forgetting factor (ForgettingFactor) — For exponential averaging, weigh previous spectrum
estimates with a forgetting factor in the range (0,1].

For more details about the averaging methods, see Spectrum Analyzer Algorithms.

Display block inputs with different complexity

In the Spectrum Analyzer block, you can now visualize frequencies of inputs with different
complexities. The signals must have the same sample rate and frame size, but can have both real and
complex values.

Mixed-complexity inputs are already supported by the dsp.SpectrumAnalyzer System object.

Generate MATLAB script from dsp.SpectrumAnalyzer

After you modify the dsp.SpectrumAnalyzer from the UI, you can generate a MATLAB script to
automatically set up the Spectrum Analyzer with your modified properties. To generate the script, use
one of these methods:

12-2
Linear Algebra

• In the Spectrum Analyzer window, select File > Generate MATLAB Script or the Generate

MATLAB script button .


• From the command line, run the generateScript object function. For example:

sa = dsp.SpectrumAnalyzer
show(sa)
% change settings
generateScript(sa)

Note The script only generates commands for settings that are available from the command line,
applicable to the current visualization, and changed from the default value.

Exponential Spectrum Averaging: Smooth spectrum estimation and


analysis efficiently over time using exponential averaging
You can now smooth the power spectral density (PSD) data computed by the following System objects
and blocks:

• dsp.SpectrumEstimator
• dsp.CrossSpectrumEstimator
• dsp.TransferFunctionEstimator
• Spectrum Estimator
• Cross-Spectrum Estimator
• Discrete Transfer Function Estimator

These objects and blocks now offer two averaging modes to smooth the PSD data: running mode and
exponential weighting mode. In the running mode, the PSD data is averaged over the last N spectral
data vectors. In the exponential weighting mode, the algorithm computes the average over the
current and the previous PSD vector weighted by an exponentially decaying forgetting factor.

These settings control the smoothing options:

• Averaging method (AveragingMethod) — Choose Running or Exponential.


• Number of spectral averages (SpectralAverages) — For running averages, choose the
number of spectrum estimates to include in the running average.
• Forgetting factor (ForgettingFactor) — For exponential averaging, weigh previous spectrum
estimates with a forgetting factor in the range (0,1].

For more details about the averaging methods, see the Algorithms section in
dsp.CrossSpectrumEstimator.

Complex Data over UDP: Send and receive complex data directly over
UDP in MATLAB and Simulink
You can now transmit complex data over a UDP network using the following UDP sender and receiver
objects and blocks:

• dsp.UDPSender

12-3
R2019a

• dsp.UDPReceiver
• UDP Send
• UDP Receive

Receive data coming from a UDP network as complex data by setting the IsMessageComplex
property to true in the dsp.UDPReceiver object or by selecting the Message is complex
parameter in the UDP Receive block.

Stream signals only from a defined interval within audio files when
using the From Multimedia File block
You can specify a range of samples to stream from an audio file using the Read range parameter in
the From Multimedia File block. When you run a model that contains this block, the From Multimedia
File block streams data only from the interval defined by the Read range parameter.

New targets supported for multicore code generation from a dataflow


subsystem
The following targets are now supported for multicore code generation from dataflow subsystems. In
past releases, code generated from a dataflow subsystem for these targets was single-threaded.

• macOS desktop targets– Code generated for a macOS desktop target is now multithreaded
using OpenMP.
• Embedded Coder targets using Linux and VxWorks® operating systems – Code generated
for these Embedded Coder targets is now multithreaded using POSIX threads.

For more information on multicore code generation from dataflow subsystems, see Multicore
Simulation and Code Generation of Dataflow Domains.

Code generation for these targets requires a Simulink Coder or an Embedded Coder license.

Blocks with constant sample times supported in dataflow subsystems


Blocks using constant (inf) sample times area now supported in dataflow subsystems. In previous
releases, only blocks specifying inherited sample times were supported.

Improve simulation performance of dataflow subsystems using the


Dataflow Simulation Assistant
To improve simulation performance of a system, it can be advantageous to increase the latency of the
system. To find the optimal latency value for a dataflow subsystem, use the Dataflow Simulation
Assistant. Starting in 19a, the Dataflow Simulation Assistant notifies you when a simulation with
profiling or model compilation is required for the dataflow analysis. It also displays the progress of
the dataflow analysis.

When the analysis completes, click Accept to apply the suggested latency to the subsystem.

12-4
Linear Algebra

For more information, see Dataflow Domain

Identify scopes unsupported for multithreading in dataflow


subsystems at edit-time
When you add one of the scope blocks inside a dataflow subsystem, the software highlights the block
and displays a warning that the Scope block does not support multithreaded execution. Place the
Scope outside the dataflow subsystem to simulate the subsystem using multiple threads.

12-5
R2019a

Use the Timing Legend to highlight blocks in a dataflow domain


You can now highlight blocks in a dataflow domain using the Timing Legend. To view the highlighting,

1 In the Simulink menu, select Display > Sample Time > Colors.
2 Update the model diagram by selecting Simulation > Update Diagram.
3 To open the Timing Legend, select Display > Sample Time > Timing Legend.
4 In the Timing Legend, set Highlight to All or Origin.
5 In the legend, select Data Driven to highlight blocks in the dataflow domain.

12-6
Linear Algebra

Discrete FIR Filter HDL Optimized block: Use programmable


coefficients with a fully parallel systolic architecture (requires HDL
Coder for code generation)
The Discrete FIR Filter HDL Optimized block now provides the option to specify coefficients using an
input port when you select the Direct form systolic architecture. You cannot use programmable
coefficients with transposed or party serial systolic architectures.

This feature is also available with the dsp.HDLFIRFilter System object.

Discrete FIR Filter HDL Optimized block: Optimize symmetric and


antisymmetric coefficients and optional reset port for a partly serial
systolic architecture (requires HDL Coder for code generation)
The Discrete FIR Filter HDL Optimized block now provides optimization of symmetric and
antisymmetric coefficients and an optional reset port for any architecture, including a serial systolic
architecture with resource sharing. This optimization reduces the number of multipliers and makes
efficient use of FPGA DSP resources. The reset port provides a local synchronous reset of the data
path registers.

These features are also available with the dsp.HDLFIRFilter System object.

The options for configuring a serial filter architecture have changed. For details, see “Changes to
Discrete FIR Filter HDL Optimized serial filter parameters” on page 12-9.

HDL code generation support for programmable coefficients with


frame-based Discrete FIR Filter block (requires HDL Coder for code
generation)
The Discrete FIR Filter block now supports specifying coefficients from an input port when you use
frame-based input.

dsp.MatrixViewer System object


The new dsp.MatrixViewer System object visualizes matrices by mapping matrix values to a color
spectrum. You can customize the axes, labels, color scheme, and scope appearance by setting
Name,Value pairs.

In the scope, zooming and panning buttons appear when you hover over the image:


Cursor measurements – Drag the cursor to see the x, y, and matrix value of individual data
points. To customize the label of the cursor data, use the setCursorDataLabels object function.
• Fit to view – After zooming or panning, select the fit to view button to see the full matrix image.

Zooming – Zoom in or out by selecting the magnifying glass button or by scrolling with your
mouse.

12-7
R2019a


Panning – Pan around the image by selecting the hand button or by clicking and dragging the
matrix image.

DSP System Toolbox Support Packages for ARM Cortex -A and ARM
Cortex -M Processors will be removed
Starting in R2019a, the DSP System Toolbox Support Package for ARM Cortex-A Processors and DSP
System Toolbox Support Package for ARM Cortex-M Processors will no longer be available for
download. This functionality has been moved to Embedded Coder Support Package for ARM Cortex-A
Processors and Embedded Coder Support Package for ARM Cortex-M Processors, respectively. For
more details on installing and getting started with these support packages, see Setup and
Configuration (Embedded Coder Support Package for ARM Cortex-A Processors) and Setup and
Configuration (Embedded Coder Support Package for ARM Cortex-M Processors).

Functionality being removed or changed


Certain System objects will be removed
Warns

Starting in R2019a, using the following System objects throws a warning message. These objects will
be removed in a future release. Use the equivalent replacements instead.

System object Use This Instead


dsp.CepstralToLPC No replacement
dsp.LPCToAutocorrelation poly2ac
dsp.LPCToCepstral No replacement
dsp.LPCToLSF poly2lsf
dsp.LPCToLSP cos(poly2lsf)
dsp.LPCToRC poly2rc
dsp.LSFToLPC lsf2poly
dsp.LSPToLPC No replacement
dsp.RCToAutocorrelation rc2ac
dsp.RCToLPC rc2poly
dsp.BurgAREstimator arburg
dsp.BurgSpectrumEstimator pburg
dsp.DCT dct
dsp.IDCT idct
dsp.Normalizer normalize, vecnorm
dsp.ParametricEQFilter designParamEQ from Audio Toolbox

For more details, see the Compatibility Considerations sections in the System object reference
pages.

Parametric EQ Filter block has been removed

12-8
Linear Algebra

The Parametric EQ Filter block has been removed. For new models, use the Parametric EQ Filter
block from Audio Toolbox instead.

Compatibility Considerations
Existing models using this block continue to run.

Changes to Discrete FIR Filter HDL Optimized serial filter parameters


Behavior change

Prior to R2019a, you specified the serial implementation by setting a requirement for input timing.
Now, you can specify the serialization requirement based on either input timing or resource usage.

For a filter with L coefficients, the block implements a serial filter with not more than M multipliers
and requires input samples that are at least N cycles apart, such that L = N×M.

Serial Filter Requirement Configuration Prior to Configuration in R2019a


R2019a
Specify a serialization rule • Set Filter structure to • Set the Filter structure to
based on input timing, that is, N Direct form systolic. Partly serial
cycles. • Select Share DSP systolic.
resources. • Set Specify serialization
• Set Sharing factor to N. factor as to Minimum
number of cycles
between valid input
samples.
• Set Number of cycles to N.
Specify a serialization rule Serialization by resource usage • Set the Filter structure to
based on resource usage, that is not supported prior to Partly serial
is, M multipliers. R2019a. However, you can systolic.
calculate N based on your • Set Specify serialization
multiplier requirement. factor as to Maximum
number of multipliers.
• Set Filter structure to
Direct form systolic. • Set Number of multipliers
to M.
• Select Share DSP
resources.
• Set Sharing factor to
ceil(NumCoeffs/M).

12-9
13

R2018b

Version: 9.7

New Features

Bug Fixes

Compatibility Considerations
R2018b

Dataflow: Accelerate your model using multi-threading and derive


frame sizes automatically for multirate signal processing in Simulink
Using a dataflow domain, you can model and simulate a computationally intensive signal processing
or multirate signal processing system. Dataflow domains simulate using computation synchronous
dataflow, which is data-driven and statically scheduled. Simulation of dataflow domains in Normal and
Accelerator modes leverages the multicore CPU architecture of the host computer. It automatically
partitions your model and simulates the subsystem using multiple threads. The software can also
automatically calculate the frame sizes needed for each block in a frame-based signal processing
system, and insert buffers where needed.

For more information, see Dataflow Domain.

Programmatic Interface for Spectrum Analyzer Measurements:


Configure measurements programmatically and obtain numerical
results for further processing or analysis
The following properties configure measurement data programmatically for the
dsp.SpectrumAnalyzer System object and the Spectrum Analyzer block:

• MeasurementChannel
• PeakFinder
• CursorMeasurements
• ChannelMeasurements
• DistortionMeasurements
• CCDFMeasurements

For the Spectrum Analyzer block, these properties belong to the Spectrum Analyzer
Configuration object. To configure measurements for the block, select the Spectrum Analyzer
block in the Simulink model, create a Spectrum Analyzer Configuration object for the selected
block in the MATLAB command prompt, and edit the measurement properties.

% Select the Spectrum Analyzer block in your Simulink model


% and run the following:
cfg = get_param(gcb,'ScopeConfiguration');
cfg.ChannelMeasurements.Enable = true;
cfg.ChannelMeasurements.PercentOccupiedBW = 95;
cfg.Visible = true;

Using the getMeasurementData function, you can obtain the measurement data programmatically
for the dsp.SpectrumAnalyzer System object and the Spectrum Analyzer block.

Dynamic Filter Visualization: Visualize the magnitude response of


time-varying digital filters
Using the dsp.DynamicFilterVisualizer object, you can now visualize the magnitude response
of time-varying digital filters or time-varying filter coefficients. Consider an example where the
CenterFrequency property of the dsp.VariableBandwidthFIRFilter System object changes
with time, there by changing the magnitude response of the filter. You can view this time-varying
magnitude response using the dsp.DynamicFilterVisualizer object.

13-2
Linear Algebra

% Create a dsp.DynamicFilterVisualizer object.


dfv = dsp.DynamicFilterVisualizer('YLimits', [-120 10]);

% Define a bandpass variable bandwidth FIR filter.


Fs = 44100;
vbw = dsp.VariableBandwidthFIRFilter('FilterType','Bandpass',...
'FilterOrder',100,...
'SampleRate',Fs,...
'CenterFrequency',5e3,...
'Bandwidth',4e3);

% Visualize the filter response as the CenterFrequency property


% changes.
for idx = 1:100
dfv(vbw);
vbw.CenterFrequency = vbw.CenterFrequency + 20;
end

Optimized Multistage Multirate Filters: Design multistage decimation


and interpolation FIR filters based on requirements for response and
implementation cost
Design optimal multistage decimation and interpolation FIR filters using the
designMultistageDecimator and designMultistageInterpolator functions, respectively.
You can design a filter with the lowest possible number of filter coefficients and multiplications per
input sample by setting the 'MinTotalCoeffs', 'NumStages', and 'CostMethod' arguments.

Sample Range for Audio File Reader: Stream signals only from a
defined interval within audio files when using the
dsp.AudioFileReader System object
You can specify a range of samples to stream from an audio file using the ReadRange property in
dsp.AudioFileReader System object. When you run this object, the audio file reader streams data
only from the interval defined by ReadRange.

Faster Channelizer and Channel Synthesizer: Simulate polyphase FFT


filters faster by leveraging additional parallel optimizations
Simulation speed has improved for the following System objects and blocks:

• dsp.Channelizer and dsp.ChannelSynthesizer System objects.


• Channelizer and Channel Synthesizer blocks.

The simulation speed improves for the blocks only when the Simulate using parameter in each
block is set to Interpreted execution.

Peek Functionality in dsp.AsyncBuffer System object


The peek function outputs unread samples in the async buffer without changing the number of
unread samples in the buffer.

13-3
R2018b

Consider an async buffer that contains a column vector of 100 samples, [1:100]'. Peek at the first
three samples using the peek function. The output is [1;2;3]. After peeking, read the first 50
samples using the read function. The output is [1:50]'. This shows that the peek function has not
changed the number of unread samples. Now peek again at the first three samples. Now, the output
is [51;52;53]. Read 50 samples again. The output now contains the sequence [51:100], and the
NumUnreadSamples is set to 0.

Q = dsp.AsyncBuffer;
signal = (1:100).';
write(Q,signal);
out1 = peek(Q,3); % out1 = [1; 2; 3];
out2 = read(Q,50); % out2 = (1:50).';
out3 = peek(Q,3); % out3 = [51; 52; 53];
out4 = read(Q); % out4 = (51:100).';

dsp.AudioFileReader System object supports http streams


The dsp.AudioFileReader System object can now read data from an http web address, such as
'http://audio.wgbh.org:8000/'.

Improved Logic Analyzer performance for multichannel signals


When you use the Logic Analyzer to visualize signals with over 100 channels, the Logic Analyzer is
now up to 80% faster. If you expand the signal to view individual channels, you may experience a
short loading time as you scroll through the channels.

HDL code generation support for complex input signals or complex


coefficients of frame-based Discrete FIR Filter and FIR Decimation
blocks (requires HDL Coder for code generation)
You can generate HDL code from a frame-based filter that uses either complex input signals and real
coefficients or complex coefficients and real input signals. See the "Frame-Based Input Support"
sections of Discrete FIR Filter and FIR Decimation.

Discrete FIR Filter HDL Optimized: Select transposed architecture,


optimize symmetric and antisymmetric coefficients, and enable reset
port (requires HDL Coder for code generation)
The Discrete FIR Filter HDL Optimized block now provides:

• Option to select a direct form transposed architecture.


• Optimization of symmetric and antisymmetric coefficients when you select Direct form
systolic (without Share DSP resources enabled) or select Direct form transposed. This
optimization reduces the number of multipliers and makes efficient use of FPGA DSP resources.
• Optional reset input port to provide a local synchronous reset of the data path registers. By
default the block connects the global HDL reset to only the control path registers. The reset
parameters are not supported when you select Share DSP resources.

These features are also available on the dsp.HDLFIRFilter System object.

13-4
Linear Algebra

Compatibility Considerations
Starting in R2018b:

• The validIn port is mandatory. The Enable valid input port parameter is no longer available.
• The ready port is enabled when you select Share DSP resources and disabled when you clear
Share DSP resources. The Enable ready output port parameter is no longer available.
• When you select Direct form systolic without Share DSP resources enabled, the block
implements an improved fully-parallel architecture compared to previous releases. This
architecture may have different latency than previous versions. Use the validOut signal to align
with parallel delay paths. When using this architecture, the default global HDL reset now clears
only the control path registers. Previous releases connected the global HDL reset to the data path
registers and the control path registers. This change improves hardware performance and lowers
the resources used. To implement the same fully parallel architecture as previous releases, select
Share DSP resources and set Sharing factor to 1.
• When you select Direct form systolic, select Share DSP resources, and use any Sharing
factor, the implemented filter has the same latency and uses the same hardware resources as in
previous releases. The reset behavior for this architecture is also the same as previous releases.

Functionality being removed or changed


Vector Scope block has been removed

The Vector Scope block has been removed. When you open a model in R2018b or later, any Vector
Scope blocks are automatically replaced with one of these blocks:

• Time Scope — Visualize time domain signals


• Spectrum Analyzer — Visualize frequency domain signals
• Array Plot — Visualize other input domain signals.

Compatibility Considerations
For visualizing frequency data, you may need to add a MATLAB Function block to perform a
fftshift. For an example, see Transform Time-Domain Data into Frequency Domain.

Certain linear prediction System objects will be removed


Still runs

The following System objects will be removed in a future release. Use the equivalent functions from
Signal Processing Toolbox™ instead.

System object Equivalent function


dsp.CepstralToLPC No replacement
dsp.LPCToAutocorrelation poly2ac
dsp.LPCToCepstral No replacement
dsp.LPCToLSF poly2lsf
dsp.LPCToLSP cos(poly2lsf)

13-5
R2018b

System object Equivalent function


dsp.LPCToRC poly2rc
dsp.LSFToLPC lsf2poly
dsp.LSPToLPC No replacement
dsp.RCToAutocorrelation rc2ac
dsp.RCToLPC rc2poly

For more details, see the Compatibility Considerations sections in the System object reference
pages.

Cell array support removed for dsp.AllpassFilter coefficients


Errors

The following properties of the dsp.AllpassFilter System object have been removed in R2018b:

• LatticeCoefficients
• AllpassCoefficients
• WDFCoefficients

Use an N-by-1 or N-by-2 numeric array instead. For details, see the Compatibility Considerations
section of the dsp.AllpassFilter System object.

13-6

You might also like