The DCBlocker
object filters
or blocks the DC component of an incoming signal.
To filter the DC component of a signal:
Define and set up your DC blocker object. See Construction.
Call step
to filter the DC component
of a signal according to the properties of dsp.DCBlocker
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the 
H = dsp.DCBlocker
creates a DC blocker System object, H
,
that removes the DC component of each channel, i.e., column, of an
input signal.
H = dsp.DCBlocker(
creates
a DC blocker object, Name
,Value
)H
, with each specified property
set to the specified value. You can specify additional namevalue
pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).

DC offset algorithm type Specify the DC offset estimating algorithm as one of


Normalized bandwidth of the lowpass IIR elliptic filter or the lowpass CIC filter Specify the normalized bandwidth of the IIR or CIC filter used
to estimate the DC component of the input signal as a real scalar
greater than 0 and less than 1. This property applies when the 

Order of the lowpass IIR elliptic filter Specify the order of the IIR elliptic filter used to estimate
the DC level. This property applies when the 

Number of past input samples for the FIR algorithm Specify the number of past inputs used to estimate the running
mean. This property applies when the 
clone  Create DC blocker object with same property values 
fvtool  Show the frequency response of the filter used by the DCBlocker System object 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
reset  Reset states of the DCBlocker System object 
step  Blocks DC components of input signal 
The DCBlocker
System object subtracts the DC
component from the input signal. The DC component is estimated by
one of the following:
Passing the input signal through an IIR lowpass elliptical filter
Passing the input signal through an FIR filter that uses a nonrecursive, moving average from a finite number of past input samples
Passing the input signal through a CIC filter. Because the CIC filter amplifies the signal, the filter gain is estimated and subtracted from the DC estimate.
Computing the mean value of the input signal
The elliptical IIR filter has a passband ripple of 0.1 dB and a stopband attenuation of 60 dB. You specify the normalized bandwidth and filter order.
The FIR filter coefficients are given as ones(1,Length)/Length
,
where you specify the Length
parameter. The FIR
filter structure is a direct form 1 transposed.
The Cascaded IntegratorComb (CIC) filter consists of two integratorcomb pairs. This helps to ensure that the peak of the first sidelobe of the filter response is attenuated by at least 25 dB relative to the peak of the main lobe. The normalized 3dB bandwidth is used to calculate the differential delay. The delay is used to determine the gain of the CIC filter. The inverse of the filter gain is used as a multiplier which is applied to the output of the CIC filter. This ensures that the aggregate gain of the DC estimate is 0 dB.
The aggregate magnitude response of the filter and the multiplier is characterized by the following equation:
$$\leftH({e}^{j\omega})\right={\left\frac{\mathrm{sin}(M{\scriptscriptstyle \frac{\pi}{2}}{B}_{norm})}{M\mathrm{sin}({\scriptscriptstyle \frac{\pi}{2}}{B}_{norm})}\right}^{N}$$
B_{norm} is the normalized bandwidth such that 0 < B_{norm} < 1.
M is the differential delay in samples.
N is the number of sections, equal to 2.
The differential delay is found by setting M to the smallest integer such that H(e^{jω}) < 1/√2. Once M is known, the gain of the CIC filter is calculated as M^{N}. Therefore, to precisely compensate for the filter gain, the multiplier is set to (1/M)^{N}.
[1] Nezami, M., "Performance Assessment of Baseband Algorithms for Direct Conversion Tactical Software Defined Receivers: I/Q Imbalance Correction, Image Rejection, DC Removal, and Channelization", MILCOM, 2002.
DC Blocker  dsp.BiquadFilter
 dsp.CICDecimator
 dsp.FIRFilter