Translate digital signal from Intermediate Frequency (IF) band to baseband and decimate it
The DigitalDownConverter
object translates
digital signal from Intermediate Frequency (IF) band to baseband,
and decimates it.
To digitally downconvert the input signal:
Define and set up your digital down converter. See Construction.
Call step
to downconvert the input
according to the properties of dsp.DigitalDownConverter
.
The behavior of step
is specific to each object in
the toolbox.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
dwnConv = dsp.DigitalDownConverter
returns
a digital downconverter (DDC) System
object, dwnConv
.
The object downconverts the input signal by multiplying it with a
complex exponential with center frequency equal to the value in the CenterFrequency
property.
The object downsamples the frequency downconverted signal using a
cascade of three decimation filters. In this case, the filter cascade
consists of a CIC decimator, a CIC compensator, and a third FIR decimation
stage. The following block diagram shows the architecture of the digital
down converter.
The scaling section normalizes the CIC gain and the oscillator
power. It may also contain a correction factor to achieve the desired
ripple specification. When you set the Oscillator property
to InputPort
, the normalization factor does not
include the oscillator power factor. Depending on the setting of the DecimationFactor property,
you may be able to bypass the third filter stage. When the input data
type is double or single, the object implements an Nsection
CIC decimation filter as an FIR filter with a response that corresponds
to a cascade of N boxcar filters. A true CIC filter
with actual comb and integrator sections is implemented when the input
data is of a fixedpoint type. The CIC filter is emulated with an
FIR filter so that you can run simulations with floatingpoint data.
The following block diagram represents the DDC arithmetic with single or doubleprecision, floatingpoint inputs.
The following block diagram represents the DDC arithmetic with signed fixedpoint inputs.
WL
is the word length of the input,
and FL
is the fraction length of the input.
The input of each filter is cast to the data type specified in the FiltersInputDataType and CustomFiltersInputDataType properties.
The oscillator output is cast to a word length equal to the input word length plus one. The fraction length is equal to the input word length minus one.
The scaling at the output of the CIC decimator consists
of coarse and finegain adjustments. The coarse gain is achieved
using the reinterpretcast
function
on the CIC decimator output. The fine gain is achieved using fullprecision
multiplication.
The following figure depicts the coarse and finegain operations.
If the normalization gain is G (where 0<G≦1), then:
WLcic
is the word length of the
CIC decimator output and FLcic
is the fraction
length of the CIC decimator output
F1 = abs(nextpow2(G))
, indicating
the part of G achieved using bit shifts (coarse gain)
F2
= fraction length specified
by the FiltersInputDataType and CustomFiltersInputDataType properties
fg = fi((2^F1)*G, true, 16)
, indicating
that the remaining gain cannot be achieved with a bit shift (fine
gain)
dwnConv = dsp.DigitalDownConverter(Name,Value)
returns
a DDC object, dwnConv
, with the specified property Name
set
to the specified Value
. You can specify additional
namevalue pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).

Sample rate of input signal Set this property to a positive scalar value, greater than or
equal to twice the value of the 

Decimation factor Set this property to a positive integer scalar, or to a 1by2 or 1by3 vector of positive integers. When you set this property to a scalar, the object automatically chooses the decimation factors for each of the three filtering stages. When you set this property to a 1by2 vector, the object bypasses
the third filter stage and sets the decimation factor of the first
and second filtering stages to the values in the first and second
vector elements respectively. Both elements of the When you set this property to a 1by3 vector, the i th
element of the vector specifies the decimation factor for the ith
filtering stage. The first and second elements of the 

Minimum order filter design When you set this property to When you set this property to 

Number of sections of CIC decimator Set this property to a positive integer scalar. This property
applies when you set the 

Order of CIC compensation filter stage Set this property to a positive integer scalar. This property
applies when you set the 

Order of third filter stage Set this property to an even positive integer scalar. When you
set the 

Twosided bandwidth of input signal in Hz Set this property to a positive integer scalar. The object sets
the passband frequency of the cascade of filters to onehalf of the
value that you specify in the 

Source of stopband frequency Specify the source of the stopband frequency as one of 

Stopband frequency in Hz Set this property to a doubleprecision positive scalar. This
property applies when you set the 

Passband ripple of cascade response in dB. Set this property to a doubleprecision positive scalar. When
you set the 

Stopband attenuation of cascade response in dB Set this property to a doubleprecision positive scalar. When
you set the 

Type of oscillator Specify the oscillator as one of 

Center frequency of input signal in Hz Specify this property as a doubleprecision positive scalar
that is less than or equal to half the value of the 

Number of NCO accumulator bits Specify this property as an integer scalar in the range 

Number of NCO quantized accumulator bits Specify this property as an integer scalar in the range 

Dither control for NCO When you set this property to 

Number of NCO dither bits Specify this property as an integer scalar smaller than the
number of accumulator bits that you specify in the 
fvtool  Visualize response of filter cascade 
getDecimationFactors  Get decimation factors of each filter stage 
getFilterOrders  Get orders of decimation filters 
getFilters  Get handles to decimation filter objects 
groupDelay  Group delay of filter cascade 
step  Digitally down convert input signal 
visualizeFilterStages  Display response of filter stages 
Common to All System Objects  

clone  Create System object with same property values 
getNumInputs  Expected number of inputs to a System object 
getNumOutputs  Expected number of outputs of a System object 
isLocked  Check locked states of a System object (logical) 
release  Allow System object property value changes 