ArticlePDF Available

Abstract

DC blocking filters
IEEE
Proof
[dsp TIPS&TRICKS]
Randy Yates
and Richard Lyons
DC Blocker Algorithms
1053-5888/08/$25.00©2008IEEE
The removal of a dc bias (a
constant-amplitude compo-
nent) from a signal is a com-
mon requirement in signal
processing systems. Thus, a
good dc blocking algorithm is a desirable
tool to have in one’s bag of signal pro-
cessing tricks. In this article we present
both a nonlinear phase fixed-point dc
blocker (using a noise-shaping trick that
eliminates a signal’s dc bias using fixed-
point arithmetic) and a general linear-
phase dc blocker network that may prove
useful in various DSP applications.
FIXED-POINT DC BLOCKER
Simple fixed-point implementations of a
dc blocker algorithm have a vexing quan-
tization problem that can create more dc
bias than they block. In this section we
present a “leaky integrator” and a noise-
shaping trick called “fraction-saving” to
eliminate the quantization problem
when using fixed-point arithmetic.
The simplest filter that blocks dc is
the digital differentiator, whose transfer
function is given by
R(z)=1–z–1.(1)
Having a z-plane zero at z=1, the differ-
entiator has infinite attenuation at 0 Hz
and perfectly blocks dc. However, the dif-
ferentiator also attenuates spectral com-
ponents close to dc as shown by the
dashed curve in Figure 1.
The standard method of shoring up
that drooping frequency response of a
differentiator is to place a pole just inside
the z-plane zero at z=1using a single-
pole filter whose transfer function is
S(z)=1
1–pz–1 ,(2)
where pis a real pole and 0<p<1.
Equation (2) describes a leaky integrator,
a nonideal integrator that leaks some
energy away rather than perfectly inte-
grating dc. The integrator’s response to a
dc input will not be an ever-increasing
output, but rather an output that
increases for a time and then levels off.
The term “leaky” is carried over from
analog design in which the capacitor
used to implement an integrator was
imperfect due to the flow of leakage cur-
rent. The cascaded differentiator/integra-
tor transfer function is given by
H(z)=R(z)S(z)=1–z–1
1–pz–1 .(3)
The location of the pole z=pof this
nonlinear-phase filter presents a tradeoff
between the filter’s bandwidth and time-
domain transient response. The magni-
tude responses of H(z)for various values
of pare shown in Figure 1.
Cascaded filters implementing (3)
work fine in a floating-point number sys-
tem and have been described in the liter-
ature [1]–[2]. Next we discuss a potential
problem in fixed-point implementations
of (3).
FIXED-POINT IMPLEMENTATION
To understand the effects of fixed-point
arithmetic on the dc blocker algorithm in
(3), let’s consider the differentiator and
leaky integrator sections independently
using the network in Figure 2(a). Assume
we are using 16-b input and output bina-
ry words as indicated in the figure.
The differentiator’s difference equa-
tion is
w[n]=x[n]–x[n–1].(4)
Note that, at most, the computation in
(4) will require one more bit than the
input (17 b total) to avoid possible over-
flow, which happens when the input
[FIG1] Cascaded differentiator/integrator frequency response.
Magnitude (dB)
0 0.1 0.2 0.3 0.5
20
15
10
5
0
0.4
Freq, x
F
s
p
= 0.7
p
= 0.8
p
= 0.9
p
= 0 (Pure Differentiator)
“DSP Tips and Tricks” introduces
practical design and implementa-
tion signal processing algorithms
that you may wish to incorporate
into your designs. We welcome
readers to submit their contribu-
tions to the Associate Editors Rick
Lyons (r.lyons@ieee.org) or Britt
Rorabaugh (dspboss@aol.com).
Digital Object Identifier 10.1109/MSP.2007.914713
IEEE SIGNAL PROCESSING MAGAZINE [132]MARCH 2008
IEEE
Proof
changes sign and the magnitude of the
difference is greater than 32,768.
However, barring that case, we can
implement the differentiator without
requiring extra precision in the interme-
diate computation and thus avoid the
associated requantization to 16 b at the
output. Also note that the differentiator
is nonrecursive, so quantization effects,
if they do occur, are not circulated back
through the differentiator.
The leaky integrator has a difference
equation of
y[n]=p·y[n–1]+w[n].(5)
Because the goal is to implement (5) on
a fixed-point (integer) processor, its
terms must each be represented as an
integer and the operations must be per-
formed using integer arithmetic. If we
want the x[n]input and y[n]output to
be scaled identically, then we must quan-
tize (truncate) the 32-b product result in
(5) to 16 b. It is precisely this quantiza-
tion that introduces a potentially signifi-
cant dc offset error into the y[n]output,
and the closer the pole is to the unit cir-
cle the larger the potential dc error.
Like any quantizer, the quantiza-
tion’s dc error can be shaped by placing
feedback around the quantizer. In order
to implement our noise-shaping trick,
all that is required is to save the fraction
of the quantizer input and feed it back
in the next update. Hence the term
“fraction-saving.’’ This process is shown
in Figure 2(b). Note that sequence
f[n]=u[n]–s[n]is the fractional part
of u[n]in two’s complement arithmetic
after quantization by truncation. This
can be illustrated as follows: let ube
represented bit-wise as shown in Figure
2(c). Notice that s is uwith the 15 least
significant bits truncated. So f=usis
the fractional part of u.
Using the fraction-saving scheme in
Figure 2(b) guarantees that the 16-b
y[n]output will have a dc bias of zero
[4]. (Detailed descriptions of noise-shap-
ing can be found in [5] and [6].) In the
next section we describe a computation-
ally efficient linear-phase dc blocking
network.
LINEAR-PHASE DC BLOCKER
Another approach to eliminate the dc
bias of a signal is to compute the moving
average of a signal and subtract that
average value from the signal as shown
in Figure 3(a). The delay element in the
figure is a simple delay line, having a
length equal to the averager’s group
delay, enabling us to time-synchronize
the averager’s v[n]output with the x[n]
input in preparation for the subtraction
operation.
The most computationally efficient
form of a D-point moving averager (MA)
[FIG2] Fixed-point dc blocking filter: (a) simple structure, (b) optimized integrator
structure, and (c) bit-wise representation of u, s, and f.
(a)
(b)
...
f
= ...
00 000
u
31
u
30
u
29
u
16
u
15
u
14
u
13
u
12
u
02
u
01
u
00
...
u
= ...
...
s
=
y
[
n
]
p
Q
w
[
n
]
Truncation
x
[
n
]
z
1
+
Differentiator Leaky Integrator
with Truncation
16-b Data
32-b Data
y
[
n
]
p
Q
w
[
n
]
u
[
n
]
s
[
n
]
f
[
n
]
Noise Shaper
(c)
+
+
+
+
z
1
z
1
z
1
u
31
u
30
u
29
u
16
u
15
u
14
u
13
u
12
u
02
u
01
u
00
[FIG3] Linear-phase dc blocker: (a) moving average subtraction method and (b) dual-MA
implementation.
x
[
n
]
y
[
n
]
v
[
n
]
(a)
(b)
x
[
n
]
z
D
+1
z
1
y
[
n
]
MA
MA
Delay
Moving Average
+
++ +
z
11/
D
IEEE SIGNAL PROCESSING MAGAZINE [133]MARCH 2008
IEEE
Proof
[dsp TIPS&TRICKS]
continued
is the network whose transfer function is
defined by
HMA(z)=1
D·1–zD
1–z–1 .(6)
The second ratio in (6) is merely a recur-
sive running sum comprising a D-length
comb filter followed by a digital integra-
tor. If Dis an integer power of two, the
1/Dscaling in (6) can be performed using
a binary right shift by log2(D)bits.
However, if Dis an integer power of
two, then the MA’s group delay is not an
integer number of samples, making the
synchronization of the delayed x[n]and
v[n]difficult. To solve that problem we
use two cascaded D-point MAs as shown
in Figure 3(b). Because the dual-MA has
an integer group delay of D–1 samples,
our trick is to tap off the first averager’s
delay line, eliminating the bottom-path
“Delay” element in Figure 3(a).
The magnitude response of our dual-
MA dc blocker, for D=32, is shown in
Figure 4(a). In the figure we show the
details of this dc blocker’s passband with
its peak-peak ripple of 0.42 dB. The fre-
quency axis value of 0.5 corresponds to a
cyclic frequency of half the input signal’s
Fssample rate. This dc blocker has the
desired infinite attenuation at 0 Hz.
What we’ve created then is a linear-
phase, multiplierless, dc blocking net-
work having a narrow transition region
near 0 Hz. It’s worth noting that stan-
dard tapped delay-line, linear-phase
finite-impulse response (FIR) filter
designs using least-squares error mini-
mization, or the Parks-McClellan
method, require more than 100 taps to
approximate our D=32 dc blocking fil-
ter’s performance.
On a practical note, the MAs in
Figure 3(b) contain integrators that can
experience data overflow. (An integra-
tor’s gain is infinite at dc!) Using two’s
complement fixed-point arithmetic
avoids integrator overflow errors if we
ensure that the number of integrator
(accumulator) bits are at least
accumulator bits
=number of bits in q[n]
+log2(D),(7)
where q[n]is the input sequence to
an accumulator and kmeans as fol-
lows: if kis not an integer, round it up to
the next larger integer.
For a narrower transition region
width, in the vicinity of 0 Hz, than that
shown in Figure 4(a), we can set Dto a
larger integer power of two. However,
this will not reduce the dc blocker’s
passband ripple.
At the expense of three additional
delay lines, and four new addition oper-
ations per output sample, we can
implement the dc blocker shown in
Figure 4(b). That quad-MA implemen-
tation, having a group delay of 2D–2
samples, yields an improved passband
peak-peak ripple of only 0.02 dB as well
as a reduced-width transition region
relative to the dual-MA implementa-
tion. The dc blocker in Figure 4(b) con-
tains four 1/Dscaling operations
which, of course, can be combined and
implemented as a single binary right
shift by 4log2(D)bits.
CONCLUSIONS
We presented a nonlinear-phase, but
computationally efficient, dc blocking fil-
ter that achieves ideal operation when
output data quantization is used. In addi-
tion, we described an alternate dc block-
ing filter that, at the expense of larger
data memory, exhibits a linear-phase fre-
quency response.
AUTHORS
Randy Yates (yates@ieee.org) is a con-
sultant in audio, communications, and
signal processing systems at Digital
Signal Labs, Inc. He is currently pursu-
ing an M.S. degree in electrical engineer-
ing at North Carolina State University,
Raleigh, North Carolina.
Richard Lyons (R.Lyons@ieee.org) is
a consulting systems engineer and lec-
turer with Besser Associates in Mountain
View, California. He is the author of
Understanding Digital Signal Processing
2/E (Prentice-Hall, 2004), and editor of,
and contributor to, Streamlining Digital
Signal Processing, A Tricks of the Trade
Guidebook (IEEE Press/Wiley, 2007).
REFERENCES
[1] C. Dick and F. Harris, “FPGA signal processing
using sigma-delta modulation,” IEEE Signal Proc.
Mag., vol. 17, no. 1, pp. 200–35, Jan. 2000.
[2] K. Shenoi, Digital Signal Processing in
Communications Systems. New York: Chapman &
Hall, 1994, p. 275.
[3] A. Bateman, “Implementing a digital ac coupling
filter,” GlobalDSP Mag., Feb. 2003 [Online].
Available: http://www.globaldsp.com/index.asp
[4] R. Bristow-Johnson, “DSP trick: Fixed-point dc
blocking filter with noise-shaping” [Online].
Available: http://www.dspguru.com/comp.dsp/
tricks/alg/dc block.htm
[5] P. Aziz, H. Sorensen, and J. Van Der Spiegel, “An
overview of sigma-delta converters,” IEEE Signal
Proc. Mag., vol. 13, no. 1, pp. 61–84, Jan. 1996.
[6] G. Bourdopoulos, A. Pnevmatikakis, V.
Anastassopoulos, and T.L. Deliyannis, Delta-Sigma
Modulators: Modeling, Design and Applications.
London: Imperial College Press, 2003, pp. 36–40.
[FIG4] DC blocker: (a) D=32 dual-MA passband performance and (b) quad-MA
implementation.
x
[
n
]
z
D
+1
z
1
y
[
n
]
1
D
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
4
2
0
–0.42 dB
D
= 32
(a)
(b)
MA MA MA
dB
Freq, x
F
s
++
z
1
z
D
+1
+
[SP]
IEEE SIGNAL PROCESSING MAGAZINE [134]MARCH 2008
... With such ADC, it is required to add DC offset in the output of the AC voltage or current sensor before processing with on-chip singleended ADC of digital controller. If this converted AC signal with DC offset is processed with conventional SOGI scheme, then it gets unstable [20,21]. To avert this problem, modified SOGI, which is performed by cascading DC blocker and conventional SOGI, is presented here as shown in Fig. 4b, c. ...
... The location of the pole z = p dc of this nonlinear phase filter presents a trade-off between bandwidth of the filter and the time domain transient response. Therefore, the value of p dc shroud be selected between 0.95 and 0.998 to achieve optimum performance [21]. In the presented work, value of p dc is selected as 0.998 to get better DC filtering and minimum magnitude attenuation of applied 50 Hz signal. ...
... I dC * and I qC * value from Eqs. (19) to (21), are utilized to control I dC and I qC with two current regulators. These two current regulators are realized by the following equations: ...
Article
Full-text available
This article presents upgradation of existing grid-connected direct online-start water pumping system by integration of multifunction photovoltaic inverter. The multifunction photovoltaic inverter is operated using a voltage-oriented control such that it delivers the reactive power in addition to the real solar photovoltaic power to deal with practical issues like steady-state grid voltage variation and poor power factor on irrigation feeder. In the implemented voltage-oriented control, the adaptive modified second-order generalized integrator-based estimators are used to derive the grid voltage angle and the reactive component of the load current, which considerably reduces the requirement of the sensors. The methods to derive the different control system tuning parameters, i.e., second-order generalized integrator gains and proportional integral controller gains, are also described. A prototype is developed to investigate the performance of designed system. In the prototype, the control algorithm is implemented using a generic ARM Cortex-M4 microcontroller. Extensive experiments are performed, and the test results are presented to validate the system operations.
... As shown in this method is not suitable for real-time applications since it requires batch data for computing the average, and also fails since the DC component changes over time. Alternatively, in this study, a recursive DC blocking filter [66], [67] which can operate in real-time is preferred. The transfer function of the system in the Z-domain is written as, ...
... Instead of applying some complex methods in [49]- [51] to overcome this problem, the measurements can be processed by recursive DC blocking filter. So besides getting rid of DC component, unwanted noise components are also eliminated due to the cascaded differentiator/integrator structure [66]. In our case, this filtering improves signal-to-noise ratio (SNR) of the measurements and it also decreases the model and measurement errors of UKF and preventing stochastic stability and divergence problems. ...
Article
Full-text available
It can be life-saving to monitor the respiratory rate (RR) even for healthy people in real-time. It is reported that the infected people with coronavirus disease 2019 (COVID-19), generally develop mild respiratory symptoms in the early stage. It will be more important to continuously monitor the RR of people in nursing homes and houses with a non-contact method. Conventional, contact-based, methods are not suitable for long-term health monitoring especially in-home care services. The potentials of wireless radio signals for health care applications, such as fall detection, etc., are examined in literature. In this paper, we focus on a device-free real-time RR monitoring system using wireless signals. In our recent study, we proposed a non-contact RR monitoring system with a batch processing (delayed) estimation method. In this paper, for real-time monitoring, we modify the standard joint unscented Kalman filter (JUKF) method for this new and time-critical problem. Due to the nonlinear structure of the RR estimation problem with respect to the measurements, a novel modification is proposed to transform measurement errors into parameter errors by using the hyperbolic tangent function. It is shown in the experiments conducted with the real measurements taken using healthy volunteers that the proposed modified joint unscented Kalman filter (ModJUKF) method achieves the highest accuracy according to the windowing-based methods in the time-varying RR scenario. It is also shown that the ModJUKF not only reduces the computational complexity approximately 8.54% but also improves the accuracy 36.7% with respect to the standard JUKF method.
... 1) DC-Block: Filtering is an important step to remove unnecessary information from raw signals. In this paper, the fixed point DC blocker [57] is applied to remove the DC shifts. The DC component in EEG signals varies between different recording runs, even for a specific subject. ...
... Based on this fact and to achieve stability during all recording runs, the DC component should be omitted by means of a DC filter. An effective solution from the hardware implementation point of view is the DC-Blocker, which performs the DC filtering by means of minimum hardware resources based on the following equation [57]: ...
Article
Full-text available
Brain Computer Interface (BCI) systems, which are based on motor imagery, enable human to command artificial peripherals by merely thinking to the task. There is a tremendous interest in implementing BCIs on portable platforms, such as Field Programmable Gate Arrays (FPGAs) due to their low-cost, low-power and portability characteristics. This article presents the design and implementation of a Brain Computer Interface (BCI) system based on motor imagery on a Virtex-6 FPGA. In order to design an accurate algorithm, the proposed method avails statistical learning methods such as Mutual Information (MI), Linear Discriminant Analysis (LDA) and Support Vector Machine (SVM). It also uses Separable Common Spatio Spectral Pattern (SCSSP) method in order to extract features. Simulation results prove achieved performances of 73.54% for BCI Competition III-dataset V, 67.2% for BCI Competition IV-dataset 2a with all four classes, 80.55% for BCI Competition IV-dataset 2a with the first two classes, and 81.9% for captured signals. Moreover, the final reported hardware resources determine its efficiency as a result of using retiming and folding techniques from the VLSI architecture perspective. The complete proposed BCI system not only achieves excellent recognition accuracy but also remarkable implementation efficiency in terms of portability, power, time, and cost.
... This DC blocker removes frequencies below 100 Hz. Due to the nonlinear group delay of the DC blockers [15], also x ext needs to be processed. A single allpass filter is designed to compensate for the group delay of the DC blocker. ...
Conference Paper
Headphones are commonly used in noisy environments. Insert headphones attenuate and color the spectra of ambient sounds and thus alter the auditory perception. When the ambient sounds are desirable, a hear-through function can be used to reproduce them naturally while wearing headphones, i.e. to make the headphones acoustically transparent. A novel adaptive hear-through algorithm is proposed, which estimates the isolation and fine-tunes the hear-though equalization for optimal acoustic transparency. Measurements on a prototype headset and simulations show that the proposed algorithm produces acoustic transparency with default settings when the fit is good, and that the adaptation improves the transparency by up to 6 dB when the headset is poorly fitted. Volume control with additional shelving filter adjustments reduces the comb-filtering effect at frequencies below 1 kHz. The proposed algorithm is a suitable premise for augmented reality audio applications and offers improved behavior when compared to fixed hear-through systems.
... This DC blocker affects frequencies below 100 Hz. Due to the nonlinear group delay of the DC blocker [11], also x play needs to be processed. An allpass filter is designed to compensate for the group delay of the DC blocker. ...
Conference Paper
The experienced sound quality produced by headphones varies between individuals. Especially with insert headphones a constant equalization may not work properly, when a specific perceived frequency response is desired. Instead, adaptive individualized equalization can be used. Previously this required multiple sensors in a headphone earpiece. This paper proposes a signal processing algorithm for continuous on-line equalization of a headset with a single microphone. The magnitude response of the headphones is estimated using arbitrary reproduced sounds. Then, the headphone response is equalized to a user-selected target response with a graphical equalizer. Measurements show that the proposed algorithm produces accurate estimates with different sound materials and the equalization produces results that closely match the target response. The algorithm can be implemented for multiple applications to obtain accurate and quick personalization, since the target response can be set arbitrarily.
... A DC removal filter can also be realized by an applied form of RMA filter. We employed a method [25] in which a pass through signal of two cascaded RMA filters is subtracted ...
Preprint
Full-text available
ABSTRACT Galileo is currently in full operational capability (FOC) phase with 18 FOC satellites. The purpose of this paper is to investigate the multipath performance of Galileo FOC signals E1, E5a, E5b and E5. With the advent of FOC satellites, assessing the multipath behaviour of Galileo FOC signals is becoming of the greatest interest for the users community. In fact the reduction of multipath has been one of the main criteria on which the Galileo signals have been designed. We analyzed data over three different days from five IGS stations located at different latitudes, for all visible Galileo satellites. This is one of the first studies to present experimental results for the multipath of Galileo signals transmitted by FOC satellites since they started to operate in 2015. Code multipath was estimated using code-minus-carrier (CMC) and pseudorange multipath (MP) methods. The study involves a comparison with the GPS signals, showing results of multipath performance as function of satellite elevation. A time-frequency representation, based on the use of continuous wavelet transform (CWT), was performed to rigorously account for the presence of multipath. The expectations of FOC satellites to lead to a multipath reduction have been verified: the E5 signal shows the highest suppression of multipath as compared to the other Galileo and GPS signals and it is almost independent from the satellite elevation. An assigned FOC satellite showed a lower frequency multipath compared to a GPS satellite at the same azimuth and elevation, which is in line with a lower Galileo satellite elevation rate.
Article
In this paper, a baseband ASIC which supports receive diversity and soft-output Viterbi equalization for enhanced 2G networks is presented. It includes a transmitter and receiver with a symbol detector and a decoder with a dedicated incremental redundancy implementation, as well as the necessary control capability to autonomously communicate with the RF-IC. The ASIC is connected to an RF-IC to build a complete Evolved EDGE transceiver system. The transceiver system reaches a measured sensitivity close to 112 dBm for single-antenna GSM voice channels and achieves the reference interference performance for adjacent channels 11.4 dB above 3GPP requirements. It is the first reported solution which fulfills the most demanding 3GPP Downlink Advanced Receive Performance Phase 2 testcases specified for Rx-diversity. The ASIC occupies 6 mm in 130 nm CMOS with a power consumption between 3.9 and 14 mW.
Article
Full-text available
FPGA devices maintain the flexibility of software-based solutions, while providing levels of performance that match, and often exceed ASIC solutions. There is a rich and expanding body of literature devoted to the efficient and effective implementation of digital signal processors using FPGA-based hardware. More often than not, the most successful of these techniques involves a paradigm shift away from the methods that provide good solutions in software programmable DSP systems. This article reports on the rich set of design opportunities that are available to the signal processing system designer through innovative combinations of ΣΔ modulation techniques and FPGA signal processing hardware. The applications considered include narrow-band filters, both single-rate and multi-rate; DC canceller; and ΣΔ modulation hybrid digital-analog control loops for simplifying carrier recovery, timing recovery, automatic gain control (AGC) loops in a digital communication receiver
Article
Using sigma-delta A/D methods, high resolution can be obtained for only low to medium signal bandwidths. This article describes conventional A/D conversion, as well as its performance modeling. We then look at the technique of oversampling, which can be used to improve the resolution of classical A/D methods. We discuss how sigma-delta converters use the technique of noise shaping in addition to oversampling to allow high resolution conversion of relatively low bandwidth signals. We examine the use of sigma-delta converters to convert narrowband bandpass signals with high resolution. Several parallel sigma-delta converters, which offer the potential of extending high resolution conversion to signals with higher bandwidths, are also described
DSP trick: Fixed-point dc blocking filter with noise-shaping
  • R Bristow-Johnson
R. Bristow-Johnson, "DSP trick: Fixed-point dc blocking filter with noise-shaping" [Online].
Implementing a digital ac coupling filter
  • A Bateman
A. Bateman, "Implementing a digital ac coupling filter," GlobalDSP Mag., Feb. 2003 [Online].