Guptasarma 1997
Guptasarma 1997
Abstract
The numerical evaluation of certain integral transforms is required for the
interpretation of some geophysical exploration data. Digital linear filter operators
are widely used for carrying out such numerical integration.
It is known that the method of Wiener–Hopf minimization of the error can be used
to design very efficient, short digital linear filter operators for this purpose. We have
found that, with appropriate modifications, this method can also be used to design
longer filters. Two filters for the Hankel J0 transform (61-point and 120-point
operators), and two for the Hankel J1 transform (47-point and 140-point operators)
have been designed. For these transforms, the new filters give much lower errors
compared to all other known filters of comparable, or somewhat longer, size. The new
filter operators and some results of comparative performance tests with known
integral transforms are presented.
These filters would find widespread application in many numerical evaluation
problems in geophysics.
Introduction
The application of digital linear filters for computations needed for resistivity
sounding was introduced by Ghosh (1971). Improvements on the method were then
made by Koefoed (1972, 1976, 1979), Koefoed and Dirks (1979), Das and Ghosh
(1974), Das, Ghosh and Biewinga (1974), Kumar and Das (1977), Johansen and
Sorensen (1979), Anderson (1975, 1979, 1982, 1989), Guptasarma (1982a),
Christensen (1990), Mohsen and Hashish (1994), Sorensen and Christensen
(1994), and others.
Such a filter operator consists of a set of n abscissa values for sampling the input
function and n weights. The placement of this pattern of sampling points is
determined by the abscissa at which the output function is needed. The value of the
output function is computed as the sum of products of the n samples of the input
function with the corresponding filter weights.
It is convenient to have the input sampling points spaced evenly on the logarithmic
1
Received March 1996, revision accepted January 1997.
2
National Geophysical Research Institute, Uppal Road, Hyderabad 500 007, A.P., India.
scale. The advantage of even spacing is that after one set of n evenly spaced samples
has been computed, only one more sample at the same spacing needs to be computed
for getting another value of the output function at an adjacent point (Anderson 1982).
In all the work referred to above, the input samples are taken at an even spacing.
Guptasarma (1982a) gave a method of designing optimized linear filter operators in
which the placing of the set of the input abscissae, as well as the spacing between
them, is adjusted in order to obtain the best possible results with a given number of
filter weights. This method was demonstrated for the cases of 7-, 11- and 19-point
digital filters for the computation of the Schlumberger apparent resistivity from a known
resistivity transform. Guptasarma (1982b) used the same method to design an
optimum filter for the computation of the time-domain response of a polarizable
target with given Cole-Cole parameters of induced electrical polarization. Nissen and
Enmark (1986) used this method to design a 20-point filter for a Fourier sine
transform and Rijo (1993) used a 19-point filter for a Fourier cosine transform. In
principle, the method can be used for generating filters for any linear operation such
as an integral transform. However, due to the finite length n of the operators used in
practice, and the finite spacing between the samples, they work best when applied to
smooth functions similar to the functions used for designing them.
In general, the accuracy of the result of computation with digital linear filters
increases both with increasing length n, because the so-called truncation error (the
error due to the fact that a finite number of weights is used) is reduced, and with
increasing sampling density, because the sampling error is reduced (Mohsen and
Hashish 1994; Rijo 1996; Christensen 1991). But short filters designed by adjusting
both the placing and the spacing of the operator can give very much more accurate
results than filters of comparable length n designed by using a pre-assigned spacing, as
shown by Guptasarma (1982a). This makes it possible either to reduce substantially
the amount of computation needed for comparable accuracy or to increase the
accuracy for a comparable computation time.
It was believed (Guptasarma 1982a) that the advantage of this method of
optimization might be lost if the length of the filter is increased. However, the
improvement in accuracy continues to be dramatic for fairly long filters. We present
four new digital linear filters, two for the Hankel J0 transform and two for the Hankel
J1 transform.
where Ji is the Bessel function of the first kind and order i and K(l) is the function
being transformed, appear in many problems involving cylindrical symmetry,
specially in the area of electrical and electromagnetic induction prospecting. For a
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 747
given function K(l) and a given value of r, the numerical value of an integral of the
above form may be conveniently computed by using a digital filter, designed for use
with a specific kernel function, such as J0, or J1.
A digital filter specifies a set of filter weights, and two more constants: the shift a
and the sampling interval or spacing s. The shift a determines the placing of the
starting point for sampling the input function and the spacing s specifies the interval at
which the remaining samples are to be taken. The logarithm of the abscissa, log l, is
used as the abscissa, so that a is the logarithm of the factor by which the starting point
is to be shifted from 1/r, and s is the logarithm of the factor by which successive sample
points shift on the l-scale. (Throughout this paper we use logarithms to the base 10.)
Thus, one first computes a set of n abscissae given by
li ¼ ð1=rÞ × 10½aþði¹1Þsÿ ; i ¼ 1; 2; …n: ð2Þ
The function K is then evaluated for these values of l and the value of f(r)
computed from
X
n
r f ðrÞ ¼ K ðli ÞWi ; ð3Þ
i¼1
where W i are the n filter weights, by dividing the sum on the right-hand side of (3)
by r.
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
748 D. Guptasarma and B. Singh
∞ 1
r2
l expð¹cl2 ÞJ0 ðrlÞ dl ¼ exp ¹ ; ð5Þ
0 2c 4c
∞ c
l expð¹clÞJ0 ðrlÞ dl ¼ ; ð6Þ
0 ðc2 þ r 2 Þ3=2
∞h i r
2
re¹ðr =4cÞ
¹cl 2 ¹cl2
le þ al e J1 ðrlÞ dl ¼ 2 þ a ; ð7Þ
0 ðc þ r 2 Þ3=2 4c2
∞ r
l expð¹clÞJ1 ðrlÞ dl ¼ ; ð8Þ
0 ðc2 þ r 2 Þ3=2
∞ 2
re¹ðr =4cÞ
l2 expð¹cl2 ÞJ1 ðrlÞ dl ¼ ; ð9Þ
0 4c2
∞ p
ðr 2 þ c2 Þ ¹ c
expð¹clÞJ1 ðrlÞ dl ¼ p : ð10Þ
2 2
0 r ðr þ c Þ
The value of c was taken as 1 for the design process, but different values of c were
tried for checking the error. It may be noted that transform (7) is a linear combination
of the transforms (8) and (9), the relative proportion of the two transforms being
determined by the factor a . Such a linear mixing was carried out in order to improve
the performance of the filters for the functions similar to those in transforms (8) to
(10). The value of a was taken as 0.066 for designing the 47-point J1 filter and as 0.01
for the 140-point J1 filter. These values were arrived at after some trials, on the basis
of the performance of the resulting filters.
In some earlier publications, the absolute error, i.e. the absolute value of the
difference between the correct theoretical value and the value obtained using the
filter, was taken for the purpose of optimization, as well as for estimating
performance. However, most physical problems require the relative error, which
may be defined as the absolute error divided by the correct theoretical value. This
gives a measure of the number of significant digits of the result which can be relied
upon, regardless of the absolute value of the result. Thus, if the relative error is low,
the absolute error is not important in most physical problems. In contrast, a low
absolute error may be misleading because, if the correct value is very small, the
computed value could even have all its significant digits wrong while the error appears
to be small. It turns out, therefore, that examining the relative error is more
appropriate. This is what we have done.
As (2) shows, samples at large values of l are needed to compute the transforms for
small values of r. But the input functions in all the above transforms vanish for large
values of l. Consequently, for such small values of r for which all samples of the input
function are vanishingly small, any linear filter operator of the type we are considering
would produce a zero or near zero output, and a relative error close to unity. Similarly,
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 749
for large values of r, samples of the input function are needed for very small values of l
and, for some of the transforms, the relative error can be large for large values of r as
well. Thus, all such filters are useful only over a certain range of values of r, depending
on how the function behaves for large and small values of r. Longer filters are expected
to produce smaller errors and to be effective over a larger range of r.
We find that for any given filter length n, there exist very many sets of a, s and W
which produce closely similar error performances. It becomes necessary to make an
appropriate choice from among many such possible filters on the basis of the variation
of relative error with r for different transforms.
In this context, it is interesting to examine the manner of variation of error for a
given filter length n and given design and test functions, with the variation of a and s.
Figure 1 shows a typical plot of such errors as a mesh surface. This ‘error surface’ is
for 61-point filters for the Hankel J0 transform. The height of the surface above the
a–s plane is the logarithm of the root-mean-square relative error computed over a
chosen range of r. The design function is transform (6), and a large set of equations,
formed with log10(r) varying over the range ¹6 > log10 ðrÞ >+6, was solved to get the
filter weights. The test function for determining the error for each combination of a
and s was the same transform as the design function, but the error was computed for
201 equally spaced values of log10(r) over the smaller range ¹4 > log10 ðrÞ >+3. The
spacing of s for the mesh in this diagram is 0.0003 and the spacing for a is 0.1.
Figure 1. Typical variation of error with changes in shift a and spacing s, plotted as a surface on
the a–s plane. There is a region in the a–s plane where the error is generally low, but there are
some deep ‘grooves’ on the surface, and some very deep local minima on these grooves, which
are like spikes pointing downwards. (See text for details.)
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
750 D. Guptasarma and B. Singh
It may be seen that the error surface consists of the intersection of a number of
individual surfaces, each of which is convex upwards. Each of these surfaces consists
of many minor, intersecting surfaces which are also convex upwards. Consequently,
the lowest error in the vicinity of an intersection of two such surfaces lies on the
intersection itself. On the a–s plane, these intersections are broadly like ‘grooves’
which are approximately linear. As Fig. 1 shows, the error surface rises in all
directions around a region of low errors. The figure also shows many downward
‘spikes’ in the surface. Each of these is close to a local minimum in error, but perhaps
not exactly on it, because the mesh is too coarse to be able to show all the minima. A
few additional points, at which the error becomes very low, were added to the mesh to
show that there are many local minima. Our objective is to find the actual lowest point
among all these local minima, and choose the best among them.
Because the error surface is so complex in its details, none of the conventional
minimization approaches for finding the lowest point seem to work. The problem is
complicated by the fact that the slope of the error surface is discontinuous everywhere
on the intersections.
The complexity of the error surface was found to be similar to the surface in Fig. 1
for all the transforms we used. Our approach was first to make a coarse search to find
the approximate location of some of the grooves on the error surface, then to follow
these grooves to find the lowest error points on each of these grooves, and finally to
make a selection of the best among the low error filters found in this way.
We found that it was necessary to make very fine adjustments of a and s in order to
arrive at the very lowest point of a local minimum. We succeeded in setting up
computer algorithms for speeding up the process of search for the lowest point near a
given location by finding the nearest groove and moving along it until the lowest point
on the groove was found. Then we used the fact that an adjacent groove could be
captured by changing a by an amount equal to s, and proceeding to search for the
groove nearest to this new location. Changing a by an amount equal to s is equivalent
to omitting the sample location at one end of the filter and adding another one at the
other end.
In order to find the filter weights by solving the Wiener equations, it is necessary to
use high arithmetic accuracy in the computation. While setting up the equations it is
necessary to take care of underflow and overflow of the exponentials. We used a
computer program capable of handling from exp(¹730) to exp(þ710) without going
into under- or overflow. The coefficients that went into overflow or underflow were
forced to zero. In order to bypass the problem of rank deficiency in the set of
equations, we avoided those areas of the a–s plane where the set of equations became
rank deficient. When some row in the matrix of coefficients for the equations had too
many zeros, we stipulated that a minimum number of non-zero coefficients should be
present in each equation. This minimum number was different for different filters and
was set to obtain the largest possible number of useful equations for solving for the
filter coefficients.
If the function under transformation is a constant, the transformed value should be
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 751
equal to the same constant for both the Hankel transforms. This requires that the sum
of all the filter weights be equal to unity. However, the solution of the equations gives a
set of filter weights, the sum of which may be slightly different from unity. This was
corrected by adjusting the last filter weight so as to make the sum of all the weights
equal to unity.
The computations were carried out on an IBM-486 personal computer.
Figure 2. Relative errors of the new 61-point and 120-point J0 filters, compared with errors of
the 61-point J0 filter given by Koefoed et al. (1972), marked Koef 61, the 283-point, single-
precision J0 filter given by Anderson (1979), marked Ander 283, and the 801-point, double
precision J0 filter given by Anderson (1982), marked Ander 801, for the transform (4).
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
752 D. Guptasarma and B. Singh
Figure 3. Relative errors of the same filters as in Fig. 2, but for transform (5).
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 753
of Koefoed, Ghosh and Polman (1972). It can be seen that this filter produces an
error which is lower by more than an order of magnitude compared to that obtained
using the 283-point J0 filter given by Anderson (1979), over a large range of r. The
new 120-point J0 filter is seen to be superior even to the 801-point, double precision,
J0 filter given by Anderson (1982), over a similar range of r. Although this 120-point
filter has less than half the number of coefficients compared to Anderson’s (1979)
283-point filter , its errors are 3 to 4 orders of magnitude lower over the entire range
of r.
Figures 3 and 4 show similar comparisons of the performance of the same filters for
transforms (5) and (6) respectively. For transform (5), the new 61-point filter gives
much lower errors compared to the filter of Koefoed et al. (1972) and the new 120-
point filter gives lower errors than the filter of Anderson (1979). However, for this
transform, the 801-point, double precision filter of Anderson is superior to the new
120-point filter for most values of r.
Figure 4 shows that the improvements achieved by the new 61-point and 120-point
filters for transform (6) are similar to those for transform (4), as shown in Fig. 2. The
error performance of the new 61-point filter far exceeds that of the filter of
Koefoed et al. (1972), and the performance of the new 120-point filter exceeds the
performance of even the 801-point, double precision filter of Anderson (1982).
Figures 5–7 show the performance of the new 47-point and 140-point J1 filters,
compared with older filters.
Figures 5 and 7 show that the new 47-point J1 filter gives a better than 8-digit
accuracy with transforms (8) and (10) for r varying from 0.001 to 10. This is about 3
Figure 4. Relative errors of the same filters as in Fig. 2, but for transform (6).
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
754 D. Guptasarma and B. Singh
Figure 5. Relative errors of the new 47-point and 140-point J1 filters, compared with errors of
the 47-point J1 filter given by Koefoed et al. (1972), marked Koef 61, the 283-point, single-
precision J1 filter given by Anderson (1979), marked Ander 283, and the 801-point, double
precision J1 filter given by Anderson (1982), marked Ander 801, for the transform (8).
Figure 6. Relative errors of the same filters as in Fig. 5, but for transform (9).
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 755
Figure 7. Relative errors of the same filters as in Fig. 5, but for transform (10).
to 4 orders of magnitude better than the performance of Koefoed’s (1972) J1 filter for
these transforms over the same range, and about 2 or more orders of magnitude better
than Anderson’s (1979) 283-point J1 filter. This is in spite of the fact that the sampling
density of the new 47-point filter (s ¼ 0.1106) is much less than that of Anderson’s
(1979) 283-point filter (s ¼ 0.0868) for the J1 transform.
It may be seen from the plots of errors in Figs 5 and 7, with transforms (8) and (10)
using the new 140-point J1 filter, that 10-digit (or better, up to about 14-digit)
accuracies are achieved over a very wide range of r. For these transforms, the new 140-
point filter performs much better than Anderson’s (1982) 801-point, double
precision filter.
Figure 6 shows the performance of the filters for transform (9). The new 140-point
filter is seen to perform much better than Anderson’s (1979) 283-point filter,
although it is somewhat inferior to the 801-point, double precision filter of Anderson
(1982).
Mohsen and Hashish (1994) have published a modified-shift FFT method of filter
design, and 9-significant-digit results of computation with transforms (4), (8) and
(10), using J0 and J1 filters having 256 weights. From the plots of results presented
here, our 120-point J0 filter and 140-point J1 filter can be seen to give much better
than 9-digit accuracy for the range of r (0.01 to 100) used by them for these
transforms (Mohsen and Hashish 1994, p. 135).
Figure 8 is similar to Fig. 1 of Christensen’s (1991) reply to Anderson’s (1991)
comment on the paper by Christensen (1990). In this figure we have shown a
comparison between absolute errors of our 120-point optimized J0 filter and
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
756 D. Guptasarma and B. Singh
Figure 8. Comparison of the absolute errors of the new 120-point J0 filter with some older
∞ transform (6). G(v) ¼ r/[1 þ r ] , which is r times the theoretical value of the
2 3/2
filters, for
integral 0 l expð¹lÞJ0 ðrlÞ dl. G*(v) is the value of the same quantity as obtained by using one
of the filters. The plot of the errors obtained with Christensen’s (1990) method is obtained from
Christensen (1991). Ander 283 shows the errors with Anderson’s (1979) 283-point filter and
Ander 801 shows errors obtained with Anderson’s (1982) 801-point filter for the J0 transform,
using all the filter weights in each case.
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 757
Conclusions
It has been found that, with some modifications, the method given by Guptasarma
(1982a) for the design of optimized short digital linear filters is also useful for
designing some longer filter operators. The new filters for the Hankel transforms with
J0 and J1 kernels presented in this paper show a better error performance than all other
older filters available for these transforms, some of which are much longer, have a
higher sampling density, and use 16-digit weights compared to the 12-digit weights
used in our filters.
It could be an interesting exercise to see if any of the other existing methods of filter
design produces better Hankel filters of the same length. It would also be useful to
design more such filters for various other useful linear transforms.
Acknowledgements
The authors are grateful to the Director, NGRI, for his kind permission to publish
this paper. Thanks are due to Dr. C. P. Gupta and Mr. Y.M. Ramachandra for making
an IBM PC available for some time, and to Ms. M. Kousalya for assistance in the
preparation of the manuscript.
The work was carried out as part of the research programme of one of the authors,
(D.G.), as an Emeritus Scientist of the Council of Scientific and Industrial Research,
New Delhi.
Appendix
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
758 D. Guptasarma and B. Singh
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 759
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
760 D. Guptasarma and B. Singh
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
Digital linear filters 761
References
Anderson W.L. 1975. Improved digital filters for evaluating Fourier and Hankel transform
integrals. U.S.G.S. rep. USGS-GD-75-012; avail. as NTIS rep. PB-242-800/1WC, p 223.
Anderson W.L. 1979. Computer Program. Numerical integration of related Hankel transforms
of orders 0 and 1 by adaptive digital filtering. Geophysics 44, 1287–1305.
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762
762 D. Guptasarma and B. Singh
Anderson W.L. 1982. Fast Hankel transforms using related and lagged convolutions. ACM
Transactions on Mathematical Software 8, 344–368.
Anderson W.L. 1989. A hybrid fast Hankel transform algorithm for electromagnetic modeling.
Geophysics 54, 263–266.
Anderson W.L. 1991. Comment on ‘‘Optimized fast Hankel transform filters’’ by Niels Boie
Christensen. Geophysical Prospecting 39, 445–447.
Christensen N.B. 1990. Optimized fast Hankel transform filters. Geophysical Prospecting 38,
545–558.
Christensen N.B. 1991. Reply to comments by Walter L. Anderson. Geophysical Prospecting 39,
449–450.
Das U.C. and Ghosh D.P. 1974. The determination of filter coefficients for the computation of
standard curves for dipole resistivity sounding over layered earth by digital linear filtering.
Geophysical Prospecting 22, 765–780.
Das U.C., Ghosh D.P. and Biewinga D.T. 1974. Transformation of dipole resistivity sounding
measurements over layered earth by linear digital filtering. Geophysical Prospecting 22, 476–489.
Ghosh D.P. 1971. The application of linear filter theory to the direct interpretation of
geoelectrical resistivity sounding measurements. Geophysical Prospecting 19, 192–217.
Guptasarma D. 1982a. Optimization of short digital linear filters for increased accuracy.
Geophysical Prospecting 30, 501–514.
Guptasarma D. 1982b. Computation of the time-domain response of a polarizable ground.
Geophysics 47, 1574–1576.
Johansen H.K. and Sorensen K. 1979. Fast Hankel transforms. Geophysical Prospecting 27,
876–901.
Koefoed O. 1972. A note on the linear filter method of interpreting resistivity sounding data.
Geophysical Prospecting 20, 403–405.
Koefoed O. 1976. Error propagation and uncertainty in the interpretation of resistivity
sounding data. Geophysical Prospecting 24, 31–48.
Koefoed O. 1979. Geosounding principles. 1. Resistivity sounding measurements. In: Methods
in Geochemistry and Geophysics 14A. Elsevier Science Publishing Co.
Koefoed O. and Dirks F.J. 1979. Determination of resistivity sounding filters by the Wiener-
Hopf least-squares method. Geophysical Prospecting 27, 245–250.
Koefoed O., Ghosh D.P. and Polman G.J. 1972. Computation of type curves for
electromagnetic depth sounding with a horizontal transmitting coil by means of a digital
linear filter. Geophysical Prospecting 20, 406–420.
Kumar R. and Das U.C. 1977. Transformation of dipole to Schlumberger sounding curves by
means of digital linear filters. Geophysical Prospecting 25, 780–789.
Mohsen A.A. and Hashish E.A. 1994. The fast Hankel transform. Geophysical Prospecting 42,
131–139.
Nissen J. and Enmark T. 1986. An optimized digital filter for the Fourier transform. Geophysical
Prospecting 34, 897–903.
Rijo L. 1993. An optimized digital filter for the cosine transform. Revista Brasileira de Geofisica
(Brazilian Geophysical Journal) 10, 7–20.
Rijo L. 1996. Comment on ‘The fast Hankel transform’ by A.A. Mohsen and E.A. Hashish.
Geophysical Prospecting 44, 473–477.
Sorensen K.I. and Christensen N.B. 1994. The fields from a finite electrical dipole—A new
computational approach. Geophysics 59, 864–880.
q 1997 European Association of Geoscientists & Engineers, Geophysical Prospecting, 45, 745–762