Geoscience Reference
In-Depth Information
important consequences when interpreting causality in earth sciences.
h ese i lters should therefore be avoided completely, even though they are
of ered as standards in spreadsheet programs. As an alternative, i lters with
a specii c frequency response should be used, such as a Butterworth lowpass
i lter (Section 6.9).
h e frequency response can be calculated for all kinds of i lters. It is a
valuable tool for predicting the ef ects of a i lter on signals in general. h e
phase response can also be calculated from the complex frequency response
h of the i lter (Fig. 6.4):
phase = 180*angle(h)/pi;
plot(f,phase)
xlabel('Frequency'), ylabel('Phase in degrees')
title('Phase')
h e phase angle phase is plotted in degrees. We observe frequent jumps in
this plot that are an artifact of the function arctangent within the function
angle . We can unwrap the phase response to eliminate those jumps that are
equal to or larger than 180°, with the help of the function unwrap .
plot(f,180*unwrap(angle(h))/pi)
xlabel('Frequency'), ylabel('Phase in degrees')
title('Phase')
In our example this has no ef ect since no jumps occur that are equal to or
larger than 180°. Since the i lter has a linear phase response phase , no shit s
occur in the frequency components of the signals relative to each other. We
would therefore not expect any distortions of the signal in the frequency
domain. h e phase shit of the i lter on a specii c period can be computed
using
interp1(f,180*unwrap(angle(h))/pi,1/20) * 20/360
ans =
-5.0000
and
interp1(f,180*unwrap(angle(h))/pi,1/15) * 15/360
ans =
-5.0000
for the sine waves with periods of 20 and 15, respectively. Since MATLAB
uses causal indexing for i lters, the phase needs to be corrected in a similar
way to the delayed output of the i lter. In our example we used a i lter with
Search WWH ::




Custom Search