designDUC
R2026bDescription
designs a 3-stage digital
upconverter filter cascade with default specifications and returns a
H = designDUCdsp.DUC
System object™. The default design uses interpolation factors of [2 2 25], a passband ripple of
0.1 dB, a stopband attenuation of 60 dB, and a bandwidth of 90% of the input Nyquist rate.
designs a DUC filter cascade with properties set using one or more name-value
arguments. For example,
H = designDUC(Name=Value)designDUC(InterpolationFactors=[3 512],Bandwidth=0.01,StopbandAttenuation=80)
designs a 2-stage DUC with a compensating FIR interpolation factor of 3 and a CIC
interpolation factor of 512, with 80 dB of stopband attenuation.
Unless you specify the FilterOrders argument, the function uses
minimum order design. Once you specify FilterOrders, the function
uses the specified order design.
Examples
Design a digital upconverter using default specifications. Display the resolved design parameters and visualize the filter response.
Design a 3-stage DUC with default specifications and display the resolved design parameters.
H = designDUC(Verbose=true)
designDUC(InterpolationFactors=[2 2 25], Bandwidth=1.8, PassbandRipple=0.1, StopbandAttenuation=60, InputSampleRate="normalized")
H =
dsp.DUC with properties:
NormalizedFrequency: true
Oscillator: "Sine wave"
CenterFrequency: 0
Filter: [1×1 dsp.FilterCascade]
MixerDataType: "Same as input"
Visualize the frequency response of the filter cascade.
filterAnalyzer(H.Filter)
Design a 2-stage dsp.DUC object with custom specifications. Use the resulting object to upconvert a baseband signal to 50 kHz.
Create a 1 kHz sine wave at a sample rate of 6 kHz.
Fs = 6e3; sine = dsp.SineWave(Frequency=1000, ... SampleRate=Fs, ... SamplesPerFrame=1024); x = sine();
Design a 2-stage DUC with a total interpolation factor of 1536. Set the signal bandwidth to 2 kHz and the stopband attenuation to 55 dB.
L = [3 512]; H = designDUC(InterpolationFactors=L, ... InputSampleRate=Fs, ... Bandwidth=2e3, ... StopbandAttenuation=55, ... Verbose=true);
designDUC(InterpolationFactors=[3 512], Bandwidth=2000, PassbandRipple=0.1, StopbandAttenuation=55, InputSampleRate=6000)
H.CenterFrequency = 50e3;
Upconvert the signal. Visualize the spectrum before and after upconversion.
xUp = H(x); FsOut = Fs*prod(L); window = hamming(floor(length(x)/10)); figure pwelch(x,window,[],[],Fs,"centered") title("Spectrum of Baseband Signal")

window = hamming(floor(length(xUp)/10)); figure pwelch(xUp,window,[],[],FsOut,"centered") title("Spectrum of Upconverted Signal")

Design a 3-stage dsp.DUC object at a specific input sample rate and inspect the filter cascade.
Design a 3-stage DUC at 10 kHz with interpolation factors [2 7 631].
L = [2 7 631]; H = designDUC(InterpolationFactors=L, InputSampleRate=10e3, Verbose=true);
designDUC(InterpolationFactors=[2 7 631], Bandwidth=9000, PassbandRipple=0.1, StopbandAttenuation=60, InputSampleRate=10000)
View the filter cascade information and frequency response.
info(H)
ans =
'Digital Up Converter
----------------------------
Input sample rate : 10 kHz
Oscillator type : Sine wave
Oscillator center frequency : 0 Hz
----------------------------------------------------
Filter type : dsp.FilterCascade
Rate conversion ratio : 8834:1
Discrete-Time Filter Cascade
----------------------------
Number of stages: 4
Stage cloning: enabled
----------------------------
Stage1: dsp.FIRInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Direct-Form FIR Polyphase Interpolator
Interpolation Factor : 2
Polyphase Length : 38
Filter Length : 75
Stable : Yes
Linear Phase : Yes (Type 1)
Stage2: dsp.FIRInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Direct-Form FIR Polyphase Interpolator
Interpolation Factor : 7
Polyphase Length : 7
Filter Length : 43
Stable : Yes
Linear Phase : Yes (Type 1)
Stage3: dsp.CICInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Cascaded Integrator-Comb Interpolator
Interpolation Factor : 631
Differential Delay : 1
Number of Sections : 3
Stable : Yes
Linear Phase : Yes (Type 1)
Stage4: double
-------
'
filterAnalyzer(H.Filter)

Design a dsp.DUC object by specifying the filter orders for each stage instead of using minimum order design.
Design a 3-stage DUC with an auxiliary FIR order of 20, a compensator FIR order of 30, and a CIC section count of 5.
H = designDUC(InterpolationFactors=[2 7 120], FilterOrders=[20 30 5], Verbose=true);
designDUC(InterpolationFactors=[2 7 120], Bandwidth=1.8, FilterOrders=[20 30 5], InputSampleRate="normalized")
Display the filter cascade information.
info(H)
ans =
'Digital Up Converter
----------------------------
Input sample rate : normalized
Oscillator type : Sine wave
Oscillator center frequency : 0 (normalized)
----------------------------------------------------
Filter type : dsp.FilterCascade
Rate conversion ratio : 1680:1
Discrete-Time Filter Cascade
----------------------------
Number of stages: 4
Stage cloning: enabled
----------------------------
Stage1: dsp.FIRInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Direct-Form FIR Polyphase Interpolator
Interpolation Factor : 2
Polyphase Length : 11
Filter Length : 21
Stable : Yes
Linear Phase : Yes (Type 1)
Stage2: dsp.FIRInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Direct-Form FIR Polyphase Interpolator
Interpolation Factor : 7
Polyphase Length : 5
Filter Length : 31
Stable : Yes
Linear Phase : Yes (Type 1)
Stage3: dsp.CICInterpolator
-------
Discrete-Time FIR Multirate Filter (real)
-----------------------------------------
Filter Structure : Cascaded Integrator-Comb Interpolator
Interpolation Factor : 120
Differential Delay : 1
Number of Sections : 5
Stable : Yes
Linear Phase : Yes (Type 2)
Stage4: double
-------
'
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example:
designDUC(InterpolationFactors=[2 2 25],Bandwidth=0.009,StopbandAttenuation=60)
Interpolation factors for each filter stage, specified as a 1-by-2 or 1-by-3 vector of positive integers. The last element is the CIC interpolation factor. The second-to-last element is the CIC compensator FIR interpolation factor. For a 3-stage design, the first element is the auxiliary FIR interpolation factor, which must be 1 or 2.
When you specify a 1-by-2 vector, the function designs a 2-stage cascade (where the stages are the CIC and the compensator). When you specify a 1-by-3 vector, the function designs a 3-stage cascade (where the stages are the CIC, compensator, and auxiliary).
The default depends on the number of stages: [2 2 25] for a 3-stage design,
or [2 50] for a 2-stage design when FilterOrders is
specified as a 1-by-2 vector.
Data Types: double
One-sided signal bandwidth, specified as a positive scalar. This value is the passband edge frequency of the equivalent single-stage lowpass filter.
The bandwidth must be less than the maximum bandwidth, which equals the input sample rate (1 in normalized frequency mode).
When you do not specify this argument, the function defaults to 90% of the maximum bandwidth.
Data Types: double
Stopband edge frequency of the equivalent single-stage lowpass filter, specified as a positive scalar. When you do not specify this argument, the stopband frequency defaults to the Nyquist rate of the input sample rate.
Data Types: double
Filter orders for each stage, specified as a 1-by-2 or 1-by-3 vector of positive integers. For a DUC, the last element specifies the number of CIC sections. The preceding elements specify the FIR filter orders for the auxiliary (if present) and compensator stages.
The length of FilterOrders must match the length of
InterpolationFactors.
Specifying this argument switches the design to specified order mode. You
cannot specify this argument if you specify
PassbandRipple or
StopbandAttenuation.
Data Types: double
Maximum allowable passband ripple in dB, specified as a positive scalar. This argument applies only in minimum order design mode.
You cannot specify this argument if you specify
FilterOrders.
Data Types: double
Minimum required stopband attenuation in dB, specified as a positive scalar. This argument applies only in minimum order design mode.
You cannot specify this argument if you specify
FilterOrders.
Data Types: double
Input sample rate, specified as one of these options:
"normalized"— Use normalized frequency. All frequency specifications are in normalized units in the range (0, 1).Positive scalar — Input sample rate in hertz. All frequency specifications are in hertz.
Data Types: double | char | string
Option to display the resolved design specifications, specified as one of these:
false— The function does not display the design specifications.true— The function prints the complete function call including the default values of all arguments that were not explicitly specified. Use this argument to see all the values used by the function to design the filter cascade.
Data Types: logical
Output Arguments
Digital upconverter, returned as a dsp.DUC
System object with these settings:
Filter— Adsp.FilterCascadecontaining the designed optional auxiliary FIR interpolator, CIC compensator FIR interpolator, CIC interpolator, and gain normalization scalar.CenterFrequency— Set to 0.InputSampleRate— Set to match the specified input sample rate.
Use the info object function or filterAnalyzer to inspect the designed filter cascade.
Algorithms
The designDUC function designs a multistage interpolation
filter cascade equivalent to a single-stage lowpass FIR filter preceded by a
rate-change element. The cascade consists of:
Auxiliary FIR Interpolator (3-stage only) — Provides additional filtering and interpolation by a factor of 1 or 2.
CIC Compensator FIR Interpolator — Compensates for the CIC passband droop and provides additional interpolation.
CIC Interpolator — Performs the bulk of the interpolation at a low computational cost.
Gain Normalization — A scalar that compensates for the CIC gain.
The following diagram shows the 3-stage filter cascade structure. For a 2-stage design, the auxiliary FIR interpolator is not present.

The auxiliary FIR interpolator, present only in 3-stage designs, provides additional
filtering and interpolates by a factor of L3 (1 or 2). The CIC compensator FIR
interpolator corrects the passband droop introduced by the CIC stage and interpolates by
a factor of L2. The CIC interpolator performs the bulk of the rate change with
interpolation factor L1. The elements of the InterpolationFactors
argument correspond to [L2 L1] for a 2-stage design or [L3 L2 L1] for a 3-stage
design.
The function supports two design modes:
Minimum order (default) — The function determines the filter orders to meet the specified
PassbandRippleandStopbandAttenuationtolerances.Specified order — You specify the filter orders for all stages using the
FilterOrdersargument. The function designs the filters with the given orders without regard to passband ripple or stopband attenuation constraints.
Version History
Introduced in R2026b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)