You are on page 1of 5

E

Instrument Corrections by Time-Domain


Deconvolution
by J. F. Anderson and J. M. Lees
Online Material: Script and input files illustrating the TDD
package.
INTRODUCTION
Many types of seismic analysis require ground-motion data in
physical units of displacement, velocity, or acceleration. Because
seismometers do not respond uniformly to all frequencies,
scientists must deconvolve the instrument response from re-
corded data. However, popular deconvolution methods violate
causality and introduce acausal artifacts to deconvolved traces,
which are unacceptable in some applications. In this paper, we
discuss a new method using recursive filters that we consider
superior for many purposes.
One simple and common method of instrument response
deconvolution is spectral division by the analog instrument
response
Rs SK
Q
M1
j0
s Z
j

Q
L1
i0
s P
i

; 1
in which S is the instruments sensitivity, K is the normaliza-
tion constant, and P and Z are the poles and zeros. This
method should be avoided because it fails to consider effects
of digitization on the instrument response. Failing to consider
these effects results in inaccurate phase and amplitude spectra,
and can introduce acausal precursory oscillations to the signal.
Another common method is that of the TRANSFER
command in the widely used software package SAC (University
of California, 2012). This command uses a zero-phase high-
pass or band-pass filter (through the freqlimits option) to
ensure the stability of the result. This filter is acausal and,
therefore, problematic as well.
Acausal artifacts can cause serious analytic problems.
One obvious case is picking wave-arrival times and polarities.
If causality is not preserved in deconvolution, phases may
appear to arrive earlier in deconvolved data than in raw data,
causing picks to be inaccurate and biased. Additionally, some
applications analyze small signals that are partially overwritten
by later-arriving, higher-amplitude (even clipped) phases; we
show an example of this in the Deconvolution of Partially
Clipped Data section. Acausal precursory oscillations of the
stronger signal can contaminate the weaker signal, reducing
the quality of the results.
One new alternative involves calculating an approximate
discrete instrument response with the bilinear transform and
spectrally dividing the response from the data. Discretization
effects make the spectrum of the discrete signal diverge from
that of an analog signal at higher frequencies; however, this
effect can be mitigated by oversampling before deconvolving
(in practice, nearest-neighbor interpolation works well) fol-
lowed by decimation. Oversampling is necessary when the
upper limit of the frequency band of interest exceeds about
one fifth of the Nyquist frequency (Haney et al., 2012).
This method is a major improvement over ordinary spec-
tral division because it accurately deconvolves instrument
responses while maintaining causality. However, frequency-
domain methods are inefficient and cumbersome in real-time
applications in which data must be deconvolved as they arrive.
Automated, real-time analysis of incoming data is becoming
increasingly feasible and important; in some applications like
Earthquake Early Warning systems, lives may depend on rapid
and accurate data analysis.
We propose recursive filters as an alternative to deconvo-
lution by spectral division. These are appealing because they are
necessarily causal, run quickly with little memory required, and
can be performed as data arrive in real-time applications like
Earthquake Early Warning.
For each sample, recursive filters define the current output
value y
n
as a linear combination of the current input value x
n
and past input and output values:
X
L1
i0
a
i
y
ni

X
M1
j0
b
j
x
nj
: 2
Because y
n
is calculated without consideration of later
terms in x, the filter is causal. The sequences a (autoregressive
coefficients) and b (moving-average coefficients) control the
response of the filter. Suitable selection of a small number
of filter coefficients can produce filters with arbitrary, causal
responses (Karl, 1989).
Recursive filters have previously been used for real-time
analysis of earthquake data. They have proven useful for gen-
erating WoodAnderson seismograms (Kanamori et al., 1999),
and removing instrument responses from ultra-long-period W
phases (Kanamori and Rivera, 2008). The approach used in
these studies was to approximate seismometer responses using
doi: 10.1785/0220130062 Seismological Research Letters Volume 85, Number 1 January/February 2014 197
a gain, damping coefficient, and natural frequency, and to
construct a second-order recursive filter using these coeffi-
cients. This approach is suitable for some simple short-period
seismometers such as the WoodAnderson. It can work for
broadband instruments as well when the frequency band of
interest is low enough that it excludes high-frequency corners
and other structures, but it cannot accurately process the full
response spectrum.
We have generalized this approach to calculate recursive fil-
ters corresponding to instrument responses over any frequency
band, and have created the R package TDD (Anderson, 2013)
to facilitate time-domain deconvolution. TDD includes docu-
mented functions for performing time-domain deconvolution
and calculating filter coefficients for arbitrary instruments, along
with precalculated recursive filters for common seismometers
(see electronic supplement for demonstration). R provides
a powerful open-source environment for data processing, and
we encourage its use in seismology with this and other relevant
packages such as RSEIS (Lees, 2012). TDD uses the command
filter from the signal package (Signal developers, 2013) to per-
form recursive filtering; similar functions are available in Python
(http://www.python.org/, last accessed November 2013) and
MATLAB (http://www.mathworks.com/products/matlab/,
last accessed November 2013) (lfilter and filter in their signal
toolboxes), so users of those languages will not find the routines
difficult to translate.
In this paper, we describe the methods involved in imple-
menting recursive filters, and apply them to relevant data. In
addition to the applications presented in this paper, we believe
that these methods would also be suitable for real-time seismic-
data processing.
METHODS
We discuss two methods of calculating recursive filter coeffi-
cients. The first method uses a finite-difference approximation
to derivatives to convert the differential equation describing
the instrument response into a recursive filter, and then uses
a nonlinear inversion to adjust the coefficients to optimize fit
to the analog spectrum. The second is an adaptation of the
bilinear transform method of Haney et al. (2012). For each
seismometer and sample rate considered here, we calculated
discrete responses using each method.
To determine the best method for each seismometer-sample
rate pair, we found the highest frequency for which the discrete
and analog spectra match within 1%. By this measure, the finite-
difference approximation method outperformed the bilinear
transform method in most of the responses studied here
(72 out of 84). Each precalculated discrete instrument response
given in the TDD package was calculated using the best method
for that seismometer and sample rate.
Finite-Difference Approximation
Converting Sensor Poles and Zeros to Filter Coefficients
In the first discretization method, we calculate the coefficients
of the recursive filter that corresponds to the seismometers
response. Instrument responses are normally given in terms
of poles (P), zeros (Z), normalization constant (K), and
sensitivity (S), such that the seismometer response Y to an
input ground-motion velocity X is defined as
Ys SK
Q
M1
j0
s Z
j

Q
L1
i0
s P
i

Xs; 3
with Y2if
0
SX2if
0
for some normalization fre-
quency f
0
. This can be rewritten as the differential equation:
X
L1
i0

i
y
i
t
X
M1
j0

j
x
j
t; 4
in which the coefficients and are calculated as the poly-
nomial expansion of the numerator and denominator of
equation (3).
We use a finite-difference approximation for the ith
derivative:
y
i
nt t
i
X
i
k0
1
k
i
k

y
nk
y
i
n
; 5
in which
i
k

is the binomial coefficient. So, equation (4) can
be rewritten as
X
L1
i0

i
y
i
n

X
M1
j0

j
x
j
n: 6
Then, autoregressive (a) and moving-average (b) coeffi-
cients of a recursive filter in the form of equation (2) can
be calculated:
a
i

X
L1
ki
k
i

k
t
k
; 7
b
j

X
M1
kj
k
j

k
t
k
: 8
However, some additional adjustment is required to ob-
tain an accurate filter (described in the following section) be-
cause of effects of discretization.
Improving Filter Fit
When t is not infinitesimal, the response of the filter gen-
erated by this method does not exactly match that of the instru-
ment. Small adjustments to input values can reduce this
inaccuracy. Using a Markov Chain Monte Carlo (MCMC)
routine (Aster et al., 2012), we tried adjusting each of the fol-
lowing: filter coefficients (a and b) of equation (2), differential
equation coefficients ( and ) of equation (4), and poles and
zeros (P and Z) of equation (3). We determined that varying
the poles and zeros found an accurate solution most quickly
and reliably.
198 Seismological Research Letters Volume 85, Number 1 January/February 2014
The MCMC model consists of the poles and zeros of the
instrument response. For paired poles or zeros of the form
a bi, a and b are varied independently so that the product
of the paired parameters remains real. In each iteration, a
model parameter is selected at random, and a random pertur-
bation is added to it. The perturbation is drawn from a normal
distribution centered at zero with standard deviation equal to
some factor times the starting value of that parameter; we
found that setting that factor between 0.1 and 1 generally
works well, although trying multiple factors is occasionally nec-
essary to find a good fit.
This MCMC implementation minimizes the misfit
between the analog amplitude spectrum of the instrument
response and the amplitude spectrum of the filters response.
(Explicit consideration of the phase spectrum here is unneces-
sary because the phase spectrum of these responses is strictly
dependent on the amplitude spectrum; therefore, once the
amplitude spectra match, so do the phase spectra.) In each iter-
ation, the perturbed poles and zeros are converted into differ-
ential equation coefficients, which are in turn converted to
recursive filter coefficients. The filter is then applied to an im-
pulse, and the sum-of-squares misfit is calculated between the
amplitude spectrum of the filtered impulse and the true instru-
ment amplitude spectrum. Each perturbation to the model is
accepted or rejected with a probability dependent on its effect
on this misfit. Because of the effects of discretization, matching
frequencies higher than about half the Nyquist frequency is
sometimes impossible; therefore, we ignore misfit at frequen-
cies above that.
For each sensor, we matched frequencies down to 0.1
times its low-corner frequency. This means that in each iter-
ation of the MCMC, we must calculate the FFT of a filtered
impulse whose duration is the inverse of that low frequency. As
a result, calculating recursive filters can be a time-consuming
process, especially at high sample rates for instruments with
very low corner frequencies. Consequently, we precalculated
recursive filters for the following common seismometers:
Streckeisen STS-1 360s and 20s, and STS-2 (generations 13);
Nanometrics Trillium 40, 120, and 240 (generations 1 and 2);
and Guralp CMG-3T, CMG-3ESP, and CMG-40T 30 and
1 s. Coefficients for recursive filters are particular to a sample
interval; for each instrument, we calculated filter coefficients
corresponding to 1, 0.1, 0.05, 0.025, 0.02, and 0.01 s. We did
not calculate coefficients for customizable short-period sensors;
however, coefficients for short-period sensors can be calculated
fairly quickly given the damping constant, natural frequency,
and sensitivity.
Calculating Filter Coefficients with the Bilinear
Transform
In the second discretization method, we use the bilinear trans-
form to convert the analog poles and zeros of the Laplace trans-
form from equation (3) to K digital poles and zeros of the
Z-transform. This is essentially a time-domain implementation
of the method of Haney et al. (2012). It is noteworthy that,
unlike the finite-difference approximation, the number of dig-
ital poles and zeros returned by the bilinear transform is gen-
erally different from the number of poles and zeros in the
analog instrument response.
The discrete response can then be written:
Yz
Q
K1
j0
z Z
j

Q
K1
i0
z P
i

Xz: 9
Filter coefficients may then be calculated by multiplying
both sides by the denominator of the fraction, expanding the
polynomials, and performing the inverse Z-transform.
Implementation of Recursive Filter
Once filter coefficients are calculated, they may be applied to
data. They can be used directly for convolution (for obtaining
WoodAnderson responses, for example). However, the autor-
egressive and moving-average coefficients must be swapped for
deconvolution. Additionally, high-pass filtering is required to
make the response stable. Our deconvolution routine imple-
ments a customizable Butterworth band-pass filter by concat-
enating its digital poles and zeros to those of the deconvolution
filter. Deconvolution and band-pass filtering are both imple-
mented using a recursive filter, so the output of this process
remains causal. For most seismometers, both the finite differ-
ence and bilinear approximations become unreliable at high
frequencies (Fig. 1). Oversampling can improve deconvolution
accuracy in cases for which the frequency band of interest ex-
tends above the maximum frequency that can be reliably de-
convolved, but it also increases runtimes.
Efficiency of Recursive Filters
Time-domain deconvolution is the fastest means of removing
instrument responses from long time series. Recursive filters
run by iterating through the terms in the input data sequence
and calculating an output term for each. Every iteration
Figure 1. The finite difference and bilinear transform approx-
imations fit the true analog spectrum of the instrument response
at low frequencies, but diverge from it at high frequencies. For the
CMG-40T (shown here) and most other seismometers tested, the
finite-difference approximation is valid for a wider frequency band
than the bilinear transform approximation. When necessary, over-
sampling can be used to accurately deconvolve high frequencies.
Seismological Research Letters Volume 85, Number 1 January/February 2014 199
requires the same number of operations, so the filter theoreti-
cally runs in linear time ON. Only a small number of terms
(equal to the total number of poles and zeros) need to be con-
sidered in each iteration, so the memory required is only
slightly more than that needed to store the input and output
traces. Additionally, seismic data are typically real, so no expen-
sive complex number operations are required.
In contrast, traditional frequency-domain methods, such
as the one used in SAC, are of slightly higher complexity
ON log N (Cooley and Tukey, 1965) and require complex
operations, making them more expensive in terms of time and
memory for longer data traces. Additionally, in frequency-
domain methods, doubling the length of time series by zero-
padding is necessary to prevent wrap-around effects; this
increases the expense as well.
We compared runtimes of deconvolution performed in
the frequency and time domains. We calculated the median run-
time of 100 trials of each method for several time-series lengths;
results for the CMG-3Tare shown in Figure 2. To ensure that
these tests measured the speed of the deconvolution method and
nothing else, we precalculated instrument responses and timed
only the deconvolution, using minimal R code, without sub-
sequent filtering. For time series greater than about 10
4
samples,
the recursive filter was faster than spectral division.
APPLICATIONS AND DISCUSSION
Demonstration on Data from Distinct Collocated Sensors
We compare data from collocated sensors of different types to
demonstrate the effectiveness of these recursive filters (Fig. 3).
These data are from a Guralp CMG-3T and CMG-40T-1s,
which were deployed in the same vault and digitized at 100
samples per second and 24-bit resolution by a Reftek
RT-130 data logger. Instrument responses were deconvolved
from recorded data using precalculated recursive filters and
were high-pass filtered above 0.1 Hz. These instruments have
very different low-corner periods (120 s for the 3T, 1 s for the
40T), and raw data from the two sensors reflect this difference.
However, the two traces are almost indistinguishable after
deconvolution.
The 10-s cutoff period of the high-pass filter is well within
the passband of the CMG-3T, but a factor of 10 below the low
corner of the CMG-40T-1s. Despite a 40-dB drop in sensitiv-
ity at this low frequency compared to its passband, its decon-
volved records agree very well with those from the CMG-3T.
This excellent match between data from such different seis-
mometers demonstrates the accuracy of these recursive filters.
Deconvolution of Partially Clipped Data
One exciting application of causal instrument corrections is the
opportunity to use data that have been partially clipped. Seis-
mic signals commonly arrive in distinct phases that arrive close
to each other in time, but sometimes with different amplitudes;
later-arriving phases, like S waves, airwaves, and surface waves,
are often of higher amplitude than earlier phases. Sometimes,
these later phases clip whereas earlier data are completely in-
tact. In these cases, causal deconvolution can be used to convert
data to physical units of ground motion; unlike acausal decon-
volution, artifacts of deconvolving off-scale data will not affect
any part of the signal occurring before the first instance of
clipping.
It is likely that a wealth of such data exists that has not
been fully exploited because of potential artifacts from acausal
deconvolution. We show one example from Tungurahua
Figure 2. Recursive filtering is the fastest means of deconvo-
lution for long time series (greater than about 10
4
samples).
Results for the Guralp CMG-3T are shown; these are typical for
the seismometers tested.
Figure 3. Comparison of recordings from collocated (a) Guralp
CMG-3T and (b) CMG-40T-1s. The two instruments have very dif-
ferent corner periods (120 and 1 s), and the signals energy is con-
centrated between 0.15 and 0.75, Hz well below the low-corner
frequency of the CMG-40T-1s. Despite this, the deconvolved sig-
nals are nearly identical down to 10 s after deconvolution using
recursive filters (c).
200 Seismological Research Letters Volume 85, Number 1 January/February 2014
volcano, Ecuador, whose explosions produce intense infrasonic
signals with amplitudes up to 180 Pa as far as 3.5 km from the
vent (Ruiz et al., 2006). In many explosions, these powerful
airwaves overprint seismic signals, and some stations use short-
period sensors and recording systems that can clip upon their
arrival. We show one such explosion in which a long-period
signal arriving before the airwave is visible in deconvolved
traces, but not in raw data (Fig. 4); these long-period signals
can be used to understand seismic-source processes.
CONCLUSIONS
Recursive filters can be used for time-domain instrument cor-
rections that preserve causality. Common methods of decon-
volution, including that of the popular SAC package, introduce
acausal artifacts, which are unacceptable in many seismic-
analysis methods. For long time series, recursive filters are faster
than spectral division. Additionally, they are much better suited
for real time use than frequency-domain methods.
One important application of causal deconvolution is
extracting useful information from seismograms that have been
partially clipped by late-arriving phases. Acausal deconvolution
of instrument responses causes artifacts related to clipping to
appear in the nonclipped part of the signal; therefore, instru-
ment corrections of partially clipped data have traditionally
been avoided. This is not a problem for causal methods of
deconvolution, in which artifacts related to off-scale recordings
cannot occur prior to the onset of clipping. As a result, seis-
mologists should consider using causal deconvolution methods
to correct partially clipped traces up to the first clipped arrival.
We have released an R package (TDD) for time-domain
deconvolution and generation of instrument responses. This
package includes precalculated discrete instrument responses
for 14 common seismometers, calculated at six common sam-
ple rates. TDD integrates well with the general-purpose seis-
mology package RSEIS to provide a powerful, open-source
environment in which many routine seismic-data processing
tasks, including deconvolution, can be accomplished.
ACKNOWLEDGMENTS
We thank H. Ortiz and the Instituto GeofisicoEscuela
Politecnica Nacional (Ecuador) for providing seismic data and
deployment information for the RETU station, and R. Aster,
S. Ingate, and PASSCAL for providing data from the collo-
cated CMG-3Tand CMG-40T-1s. We gratefully acknowledge
a thorough and helpful review by M. Haney. This work was
funded by NSF Grant EAR-0838562.
REFERENCES
Anderson, J. (2013). TDD: Time-Domain Deconvolution of Seismometer
Response, R package version 0.1.
Aster, R. C., B. Borchers, and C. H. Thurber (2012). Parameter
Estimation and Inverse Problems, Elsevier Academic Press,
Amsterdam.
Cooley, J. W., and J. W. Tukey (1965). An algorithm for the machine
calculation of complex Fourier series, Math. Comput. 19, 297301.
Haney, M. M., J. Power, M. West, and P. Michaels (2012). Causal instru-
ment corrections for short-period and broadband seismometers,
Seismol. Res. Lett. 83, no. 5, 834845.
Kanamori, H., and L. Rivera (2008). Source inversion of W phase:
Speeding up seismic tsunami warning, Geophys. J. Int. 175,
222238.
Kanamori, H., P. Maechling, and E. Hauksson (1999). Continuous mon-
itoring of ground-motion parameters, Bull. Seismol. Soc. Am. 89,
no. 1, 311316.
Karl, J. H. (1989). An Introduction to Digital Signal Processing, Academic
Press, Inc., Amsterdam.
Lees, J. M. (2012). RSEIS: Seismic Time Series Analysis Tools, R package
version 3.0-9.
Ruiz, M. C., J. M. Lees, and J. B. Johnson (2006). Source constraints of
Tungurahua volcano explosion events, Bull. Volcanol. 68, no. 5,
480490.
Signal Developers (2013). Signal: Signal processing, http://rforge
.rproject.org/projects/signal/ (last accessed November 2013).
University of California (2012). SAC: Seismic Acquisition Code, SAC
version 101.5c.
J. F. Anderson
1
J. M. Lees
Department of Geological Sciences
University of North Carolina at Chapel Hill
104 South Road, Mitchell Hall
Campus Box 3315
Chapel Hill, North Carolina 27599-3315 U.S.A.
1
Present address: Department of Geosciences, Boise State University,
Boise, Idaho 83725 U.S.A.
Figure 4. Seismogram from an explosion recorded on the L-4C
at the RETU seismic station, Tungurahua volcano, Ecuador, shown
raw (a) and with instrument response deconvolved (bthe telem-
etry response is missing in this case, so we cannot show physical
units of velocity). The signal is clipped by a late-arriving airwave at
65 s (the onset of clipping being marked with a thick dashed line),
but signals arriving prior to that point are still useful. Long-period
signals are visible in the deconvolved trace that cannot be seen in
the raw data; these components can be used to constrain the
seismic source.
Seismological Research Letters Volume 85, Number 1 January/February 2014 201

You might also like