GEPH316 Seismic Data Processing Field Data Workshop 2000 10 Frequency filter design
 Previous: Frequency spectra Up: Contents Next: Frequency filtering data

### Frequency filter design

• In this exercise we explore the effect of frequency filtering on the character of a seismic signal, using spike test data. If you feel uncomfortable with the ideas of Fourier analysis, it is useful to experiment with various forms of filters and discover by experiment what filtering does to various time series.
• Although the filters alter the frequency content of the signals, sometimes they are applied in the time-domain to the time series.
• In order to inspect the behaviour of a filter, it is necessary to have a Dirac delta spike data series to pass into the filter to determine its time-domain impulse response.
• The frequency transfer function behaviour of the filter may be observed by looking at the spectrum in the frequency-domain, by Fourier transforming the impulse response.

### Spike series

• In order to test the response of filters, it is useful to be able to produce a set of time series containing spikes at various points in the series.
• The seismic unix command to make spikes is suspike. It creates a full set of times series with a dummy value for a common offset and up to 4 spikes at specified trace numbers and time point numbers.
• Inspect the suspike command documentation.
```suspike
```
• Now produce and plot the default time series produced by suspike.
```suspike | suxwigb title="Default spikes" label1="Time (s)" label2="Trace numbers" &
```
• The following suspike command will produce a set of time series with parameters similar to the shots in our seismic data.
• There are 12 traces, the sampling interval is 2.5ms and 100 points gives a total time of 250ms.
• Spikes are place on traces ix=1, 4, 7 and 10 with the respective time point numbers 1, 20, 40 and 60 out of the time length of 100 points. Because 100 points are equivalent to 250ms, the spikes should appear at the time positions of 0.000s, 0.050s, 0.100s and 0.150s.
```suspike > spike ntr=12 dt=0.0025 nt=100 ix1=1 it1=1 ix2=4 it2=20 ix3=7 it3=40 ix4=10 it4=60
suxwigb < spike title="Spike series" label1="Time (s)" label2="Trace numbers" &
```
• If the spikes are correct delta functions, their spectra should be white. Check this with the following command. Note that the suwigb command may make the spectra of the spike traces look particularly black in this case! This is really showing a flat 'white' spectrum but the graphics fill in the area under the spectrum as black.
```suspecfx < spike | suxwigb title="Spike spectra" label1="Frequency (Hz)" label2="Trace numbers" &
```
• Use the following lines if you want a print of the spike traces and their spectra.
```supswigp < spike title="Spike traces" label1="Time (s)"  label2="Trace number" | lp -d mono
suspecfx < spike | supswigp title="Spike spectra" label1="Frequency (Hz)"  label2="Trace number" | lp -d mono
```
• Use the following line to remove the unwanted graphical windows.
```zap xwigb
```

### Normal filter

• The main command for frequency filtering data in the time-domain is the sufilter filtering command, which is sufficiently flexible to behave as a
• band-pass filter,
• band-stop filter,
• low-pass filter,
• high-pass filter or
• notch filter.
• This filter is defined in the frequency domain to have a flat pass-band with gently tapered ends. Each tapered end is defined by an upper and a lower frequency.
• Inspect the description of the sufilter command by typing:
```sufilter
```
• This is a zero-phase filter, so it should not alter the phase characteristics of the data at all. This is a very valuable property as seismic arrival times will be perfectly preserved.
• The frequency cut-offs are not vertical but are gently tapered, according to a bell-shaped sine-square function.
• The filter is defined by an array of frequencies in Hz, at which the filter characteristics change, and the matching array of amplitudes, which are required at those frequencies.
• Typically, the amplitudes are 1.0 in the pass band and 0.0 in the stop band. Try the following example of the application of the filter to pass a band of frequencies from 20Hz to 50Hz:
```sufilter < spike f=10,20,50,60 amps=0.,1.,1.,0. > spike.filter
suxwigb < spike.filter title="Filter bandpass 20Hz to 50Hz" label1="Time (s)" label2="Trace numbers" &
```
• Inspect the output from the band-pass filter. Measure the dominant period in the wavelets and thus determine the central dominant frequency of the pass band. Does it match the requested pass band?
• What is the phase character of the wavelets?
• This version of the filter will default to the desirable zero-phase behaviour, so it should produce a perfectly symmetrical wavelet, centred on the time positions of the original spikes at 0.000s, 0.050s, 0.100s and 0.150s. However, this produces data before time zero and is a non-physical filter.
• How many side-lobes can be seen on either side of the central peak of the wavelets?
• There may appear to be a lot of side-lobes but they decay a lot more quickly than those of an infinitely long sinc function.
• A sinc function would have side-lobe amplitudes +1, -1/3, +1/5, -1/7, +1/9, -1/11, etc. and would be produced if the filter had vertical frequency cut-offs.
• Why are there some side-lobes at the very end of the first trace?
• This tell-tale behaviour would not occur if the filter had been applied in the time domain, because the end of the trace would be quite separate from the start of the trace.
• This undesireable effect occurs if the trace has been
• Fourier transformed into the frequency domain,
• the filter shaping applied by multiplying by the filter spectrum, and then been
• inverse Fourier transformed back into the time domain.
• This process is actually more computationally efficient and accurate than performing an expensive and extended convolution operation in the time-domain.
• To make it even more efficient, the package artificially lengthened the time-series before applying the process and then removed the extension at the end. This is the reason why the tail of the trace does not perfectly match on the the start of the trace.

• Convert the filter output into amplitude spectra using the following command:
```suspecfx < spike.filter | suxwigb title="Filter spectra bandpass 20Hz to 50Hz" label1="Frequency (Hz)" label2="Trace numbers" &
```
• Why is the spectrum of the first trace so unpleasant?
• Only part of the first wavelet is present at the start of the trace and it is disrupted at time zero. The tail end of the trace does not match correctly onto the start of the trace.
• The step change between the start and the end will disrupt the spectrum.
• Inspect the bell-shaped taper on each end of the spectra. Note that the pass-band does not have vertical edges, like a boxcar function, which would have created a sinc function behaviour in the time-domain.
• Expand one of the spectra in the range 0 to 80 Hz and examine the frequency behaviour of the filter. The perfect passband seems to run from about 23Hz to about 47Hz.
• If the amplitude of the spectrum is 1.0 at 35Hz in the centre of the pass-band, what is the amplitude at 10Hz, 20Hz, 50Hz and 60Hz?
• Typically, the pass-band of a filter is defined by the frequencies at which the amplitude is 2-0.5 = 0.707 of the maximum. This is also 3 decibels, since decibels are a logarithmic scale and 6 decibels is a factor of 2 so 3 decibels is a factor of 2-0.5.
• Here the pass-band was requested to run from 20Hz to 50Hz, although the taper has started just before these points.
• Similarly, the end of the taper has a value a little greater than zero at the 10Hz and 60Hz points.
• Use the following lines if you want a print of the filter output and the spectra.
```supswigp < spike.filter title="Filter bandpass 10,20,50,60 Hz" label1="Time (s)"  label2="Trace number" | lp -d mono
suspecfx < spike.filter | supswigp title="Filter bandpass 10,20,50,60 Hz" label1="Frequency (Hz)"  label2="Trace number" | lp -d mono
```

### Butterworth filter

• The Butterworth filter is a long-established type of filter that is often used in electronics and geophysical data processing. It has the well known and satisfactory characteristics of a very flat pass-band and is often used as an anti-alias filter. Sometimes it is called a maximally flat filter.
• The seismic unix package has a Butterworth filter provided by the subfilter command. Check its properties and parameters using:
```subfilt
```
• It is as flexible as the sufilter command but requires its parameters to be specified in a different format.
• Apply the Butterworth filter to the spike series, using the same 20Hz to 50Hz pass-band and 10Hz tapers as used with the normal filter.
```subfilt < spike > spike.bfilt fstoplo=10 fpasslo=20 fpasshi=50 fstophi=60 verbose=1
suxwigb < spike.bfilt title="Butterworth bandpass 20Hz to 50Hz" label1="Time (s)" label2="Trace numbers" &
```
• Compare the Butterworth filter output to that of the normal filter, if the xwigb window is still available. Note that the outermost sidelobes appear to be a little larger.
• Inspect the Butterworth filter output on the first trace. Are there any side-lobes at the very end of the first trace with this filter? If not, why not?
• This tell-tale behaviour does not occur because the filter has been applied in the time domain.
• The end of the trace is quite separate and unaffected by the start of the trace, unlike the normal filter's behaviour.
• Convert the Butterworth filter output into amplitude spectra using the following command:
```suspecfx < spike.bfilt | suxwigb title="Butterworth spectra bandpass 20Hz to 50Hz" label1="Frequency (Hz)" label2="Trace numbers" &
```
• Why are the first two spectra disturbed?
• Neither the first or the second trace have complete wavelets in the time domain.
• How does the pass-band shape differ from that for the normal filter?
• The centre part of the pass band is not as flat and appears to have some 'ripples'.
• The taper parts at the edges of the pass band appear to be steeper and made up of short straight line segments, whereas the normal filter tapers appear to be broader and smoother.
• Both of these features will produce a worse behaviour in the time-domain.
• Use the following lines if you want a print of the Butterworth filter output and the spectra.
```supswigp < spike.bfilt title="Butterworth bandpass 10,20,50,60 Hz" label1="Time (s)"  label2="Trace number" | lp -d mono
suspecfx < spike.bfilt | supswigp title="Butterworth bandpass 10,20,50,60 Hz" label1="Frequency (Hz)"  label2="Trace number" | lp -d mono
```
• Use the following lines to remove the unwanted graphical windows and spike files.
```zap xwigb
rm spike.*
```

 Previous: Frequency spectra Up: Contents Next: Frequency filtering data
 Go to <--->

Comments on this information may be mailed to B.Robinson@lancaster.ac.uk
Copyright © Brian Robinson 2000. All rights reserved.
Last updated on 7/03/2000 by BR.