Geoscience Reference
In-Depth Information
f = 1*w/(2*pi);
plot(f,180*unwrap(angle(h))/pi)
xlabel('Frequency'), ylabel('Phase in degrees')
title('Magnitude Response')
interp1(f,180*unwrap(angle(h))/pi,1/8) * 8/360
ans =
-5.0557
must again be corrected for causal indexing. Since the sampling interval was
one and the i lter length is i ve, we have to add (5-1)/2=2 to the phase shit
of -5.0557. h is suggests a corrected phase shit of -3.0557, which is exactly
the delay seen on the plot.
plot(t,x11,t,y11), axis([30 40 -2 2])
h e next section gives an introduction to the design of i lters with a desired
frequency response. h ese i lters can be used to amplify or suppress dif erent
components of arbitrary signals.
6.9 Filter Design
We now aim to design i lters with a specii c frequency response. We i rst
generate a synthetic signal x12 with two periods, 50 and 5. h e power
spectrum of the signal shows the expected peaks at frequencies of 0.02 and
0.20.
clear
t = 0 : 1000;
x12 = 2*sin(2*pi*t/50) + sin(2*pi*t/5);
plot(t,x12), axis([0 200 -4 4])
[Pxx,f] = periodogram(x12,[],1024,1);
plot(f,Pxx)
xlabel('Frequency')
ylabel('Power')
h e Butterworth i lter design technique is widely used in order to create i lters
of any order with a lowpass, highpass, bandpass and bandstop coni guration
(Fig. 6.5). In our example we would like to design a i ve-order lowpass
i lter with a cutof frequency of 0.10. h e inputs of the function butter are
the order of the i lter and the cutof frequency normalized to the Nyquist
Search WWH ::




Custom Search