# Spiking filter

Other languages:
English • ‎español
Series Geophysical References Series Digital Imaging and Deconvolution: The ABCs of Seismic Exploration and Processing Enders A. Robinson and Sven Treitel 9 http://dx.doi.org/10.1190/1.9781560801610 9781560801481 SEG Online Store

What is a spiking filter, and how is it computed? A spiking filter is a shaping filter whose desired output is a spike. In such a case, all the coefficients ${\displaystyle z_{k}}$ of the desired output are zero, except the coefficient ${\displaystyle z_{0}=1}$ at time zero. For a causal spiking filter with causal input (so that ${\displaystyle x_{-1}=0,x_{-2}=0,\dots }$), the crosscorrelation coefficients for the normal equations are

 {\displaystyle {\begin{aligned}g_{m}=\sum _{k}{z_{k}}x_{k-m}=x_{-m}=\left\{{\begin{array}{lc}x_{0}{\rm {\ for\ }}m=0&\\{\rm {0\ \ for\ }}m{=1,\ 2,\ }...N.\end{array}}\right.\end{aligned}}} (12)

The normal equations become

 {\displaystyle {\begin{aligned}\sum _{n=0}^{N}{f_{n}}r_{m-n}=\left\{{\begin{array}{lc}x_{0}{\rm {\ for\ }}m=0&\\{\rm {0\ for\ }}m{=1,\ 2,\ }&...N.\end{array}}\right.\end{aligned}}} (13)

How is the prediction-error filter computed? Let h be a causal prediction filter for prediction distance one. Let the input be ${\displaystyle x_{k}}$ where ${\displaystyle x_{0}}$ occurs at time zero. The desired output is the input advanced by one time unit; that is, the desired output is ${\displaystyle z_{k}=x_{k+1}}$, where ${\displaystyle z_{0}=x_{1}}$ occurs at time zero. Thus, the crosscorrelation is

 {\displaystyle {\begin{aligned}g_{m}=\sum _{k}{z_{k}}x_{k-m}=\sum _{k}{x_{k+1}}x_{k-m}=r_{m+1}.\end{aligned}}} (14)

The solution of the normal equations

 {\displaystyle {\begin{aligned}\sum _{n=0}^{N-1}{h_{n}}r_{m-n}=r_{m+1}\end{aligned}}} (15)

gives the coefficients ${\displaystyle \left(h_{0},h_{1},{\rm {\ }}\dots {\rm {\ ,\ }}h_{N-{1}}\right)}$ of the prediction operator. The predicted value is

 {\displaystyle {\begin{aligned}y_{k}={\hat {x}}_{k+1}=\sum _{n=0}^{N-1}{h_{n}}x_{k-n}.\end{aligned}}} (16)

The prediction error is

 {\displaystyle {\begin{aligned}x_{k}-{\hat {x}}=x_{k}-\sum _{n=0}^{N-{l}}{h_{n}}x_{k-1-n}.\end{aligned}}} (17)

The coefficients of the prediction-error operator f for prediction distance one thus are found with the equation

 {\displaystyle {\begin{aligned}(f_{0},\;f_{1},\;f_{2},\;...,\;f_{N})\;=\;(1,\;-h&_{0},\;h_{1},...,-h_{N-1}).\end{aligned}}} (18)

This filter is necessarily a minimum-delay filter (Robinson and Treitel, 2000[1]). The prediction-error filter for prediction distance one is the spiking filter normalized so that its leading coefficient is one.

Let us give some numerical examples. Suppose that the input signal is the two-length wavelet ${\displaystyle \left(b_{0},b_{1}\right)}$, that the filter has two coefficients ${\displaystyle \left(f_{0},f_{1}\right)}$, and that the desired output signal is the three-length wavelet ${\displaystyle \left(d_{0},d_{1}{\rm {\ ,\ }}d_{2}\right)}$. The actual output is obtained by carrying out the convolution

 {\displaystyle {\begin{aligned}\left(b_{0}{\rm {\ ,\ }}b_{1}\right)*\left(f_{0}{\rm {\ ,\ }}f_{1}\right)=\left(f_{0}b_{0}{\rm {\ ,\ }}f_{0}b_{l}+f_{l}b_{0}{\rm {\ ,\ }}f_{1}b_{l}\right)\approx \left(d_{0}{\rm {\ ,\ }}d_{1}{\rm {\ ,\ }}d_{2}\right).\end{aligned}}} (19)

The normal equations are

 {\displaystyle {\begin{aligned}\left(b_{0}^{2}+b_{1}^{2}\right)f_{0}+\left(b_{0}b_{1}\right)f_{1}=d_{0}b_{0}+d_{1}b_{1}\\\left(b_{0}b_{1}\right)f_{0}+\left(b_{0}^{2}+b_{1}^{2}\right)f_{1}=d_{1}b_{0}+d_{2}b_{1}.\end{aligned}}} (20)

As the first example, suppose that we let the input be the minimum-phase wavelet b = (2, 1) and the desired output be the spike d = (1, 0, 0), where the 1 occurs at time index 0. In other words, we seek to find the two-length filter that will convert the input wavelet into a unit spike. If we substitute the numerical values, the normal equations become

 {\displaystyle {\begin{aligned}{\rm {5}}f_{0}+2f_{1}{=2}\\{\rm {2\ }}f_{0}{+5}f_{1}{=0.}\end{aligned}}} (21)

We find that the least-squares spiking filter is given by

 {\displaystyle {\begin{aligned}\left(f_{0},f_{1}\right)=\left({\frac {10}{21}},-{\frac {\rm {4}}{21}}\right).\end{aligned}}} (22)

It is customary to normalize the spiking filter so that its leading coefficient is one. A spiking filter normalized in this way is a prediction-error filter. Thus, the normalized spiking filter, or the prediction-error filter, is (1, –0.4).

As the second example, suppose that we let the input be the corresponding maximum-phase wavelet b = (1, 2) and the desired output be the same spike. In other words, we seek to find the two-length filter that will convert the input wavelet (1, 2) into the same unit spike d = (1, 0, 0). We note that the maximum-phase input wavelet b = (1, 2) has the same autocorrelation as does the minimum-phase input wavelet b = (2, 1) that we used in the first example. The normal equations now are

 {\displaystyle {\begin{aligned}{\rm {5\ }}f_{0}+2\ f_{1}{=1}\\{\rm {2\ }}f_{0}{+5\ }f_{1}=0.\end{aligned}}} (23)

We find that now the least-squares filter is given by

 {\displaystyle {\begin{aligned}\left(f_{0},f_{1}\right)=\left({\frac {\rm {5}}{21}},{\frac {-2}{21}}\right).\end{aligned}}} (24)

Again, the prediction-error filter is (1, –0.4), just as before. The reason for this sameness is that the two input wavelets ${\displaystyle b=\left({\rm {2,1}}\right)}$ and ${\displaystyle b{=(1},2{\rm {)}}}$ have the same autocorrelation. Each wavelet with the same autocorrelation (regardless of whether the wavelet is minimum phase, mixed phase, or maximum phase) is associated with the same prediction-error filter.

Let us use the input wavelet ${\displaystyle \left(b_{0},b_{1}\right)}$, as before. Let the prediction filter (for one time unit ahead) be ${\displaystyle \left(h_{0}\right)}$ and the desired output signal be the two-length wavelet ${\displaystyle \left(d_{0},d_{1}\right)=\left(b_{1}{\rm {,\ 0}}\right)}$. Then the actual output is obtained by carrying out the convolution

 {\displaystyle {\begin{aligned}\left(b_{0}{\rm {,\ }}b_{1}\right)*\left(h_{0}\right)=\left(h_{0}b_{0}{\rm {,\ }}h_{0}b_{1}\right)\approx \left(d_{0}{\rm {,\ }}d_{1}\right).\end{aligned}}} (25)

The set of normal equations reduces to the single equation

 {\displaystyle {\begin{aligned}\left(b_{0}^{2}+b_{1}^{2}\right)h_{0}=d_{0}b_{0}+d_{1}b_{1}.\end{aligned}}} (26)

As the third example, let the input be the minimum-phase wavelet b = (2,1). Then the desired output is d = (1, 0). The normal equation 26 becomes ${\displaystyle {\rm {5}}h_{0}{=2}}$. The prediction-error filter is given by

 {\displaystyle {\begin{aligned}\left(f_{0},f_{1}\right)=\left({\rm {1,\ }}-h_{0}\right)=\left({1,\ }-{\rm {0.4}}\right).\end{aligned}}} (27)

As the fourth example, let the input be the maximum-phase wavelet b = (1, 2). Then the desired output is d = (2, 0). The normal equation 26 becomes ${\displaystyle {\rm {5}}h_{0}{=2}}$, as before, and we obtain the same prediction-error filter, ${\displaystyle \left(f_{0},f_{1}\right)=\left({\rm {1\ ,\ }}-{\rm {0.4}}\right)}$.

## References

1. Robinson, E. A., and S. Treitel, 2000, Geophysical signal analysis: SEG.