You are on page 1of 3

GPHY 4874 LAB III – Fourier Transform

1. Copy Lab_3_data to your work directory and load it ( load('Lab_3_data.mat') or simply drag it
into the terminal).
a. The following data is loaded: dt=time sample rate, df=frequency sample rate,
freq_vector=vector of frequency values, nt=total number of time samples,
pulse=wavelet, reflectivity=reflectivity vector, time_vector=vector of time values.
b. What is the Nyquist frequency?
c. Examine the values in the reflectivity vector, what do they represent?
2. Convolve the wavelet with the reflectivity vector and compare.
a. pulse_reflec_conv=conv(pulse,reflectivity);
i. What is the length of the convolution and why?
b. Pad the wavelet and reflectivity with zeros on either end so their
lengths match the convolution.
pulse_pad=[zeros(64,1);pulse;zeros(63,1)];
reflectivity_pad=[zeros(64,1);reflectivity;zeros(63,1)];
c. Plot the wavelet, reflectivity and convolution
figure;
subplot(3,1,1);
plot(pulse_pad);
title('Wavelet ');
subplot(3,1,2);
plot(reflectivity_pad);
title('Reflectivity ');
subplot(3,1,3);
plot(pulse_reflec_conv);
title('Convolution ');
xlabel('Time ')
(please paste your plot here)

3. Find the Fourier representation of the wavelet, reflectivity and


convolution using the DFT (fft in MATLAB, the fftshift command is
because MATLAB by default puts the negative frequency components at the
end of the vector, but we would like to plot them on a standard number
line)
pulse_fft=fftshift(fft(pulse_pad));
reflectivity_fft=fftshift(fft(reflectivity_pad));
pulse_reflec_conv_fft=fftshift(fft(pulse_reflec_conv));
4. Plot the amplitude spectrum for the wavelet, reflectivity and
convolution
figure;
subplot(3,1,1);
plot(freq_vector,abs(pulse_fft));
title('Wavelet ');
subplot(3,1,2);
plot(freq_vector,abs(reflectivity_fft));
title('Reflectivity ');
subplot(3,1,3);
plot(freq_vector,abs(pulse_reflec_conv_fft));
title('Convolution ');
xlabel('Frequency Hz')
(please paste your plot here)

5. What is the amplitude of the ‘DC’ component? (amplitude at 0


frequency) for the wavelet and the convolution.

What is the amplitude and phase of the 50.78Hz component for


the wavelet and the convolution?
Hint to plot phase:
figure;
subplot(3,1,1);
plot(freq_vector,angle(pulse_fft)*(180/pi));
ylabel('Phase (degrees)')
title('Wavelet ');
subplot(3,1,2);
plot(freq_vector,angle(reflectivity_fft)*(180/pi));
ylabel('Phase (degrees)')
title('Reflectivity ');
subplot(3,1,3);
plot(freq_vector,angle(pulse_reflec_conv_fft)*(180/pi));
title('Convolution ');
ylabel('Phase (degrees)')
xlabel('Frequency Hz')
(please paste your plot here)

How does the code “angle” determine the phase(Hint highlight


“angle” in matlab and right click and select help on
selection)?
6. Generate a matrix of Cosines
a. cos_matrix=real(dftmtx(128));
i. dftmtx generates a DFT matrix ‘operator’ as
discussed in class. Why do we take the real part
to get a matrix of cosines?
ii. Tough question: What is the frequency of the
cosine represented by cos_matrix(1,:),
cos_matrix(2,:), cos_matrix(n,:) if dt=.002 and
nt=128 (ie what is df)?
7. Plot the sum of progressively higher frequency cosines.
figure;
counter=1;
for icount=1:2:9
cos_sum_low=sum(cos_matrix(1:icount*2,:));
subplot(5,1,counter);
plot(fftshift(cos_sum_low));
counter=counter+1;
end
(please paste your plot here)
a. These plots represent the sum of cosines for n=1, 1 to
3,1 to 5, 1 to 7 and 1 to 9.
8. Plot the sum of progressively lower frequency cosines
starting at n=9
counter=1;
figure;
for icount=9:-2:1
cos_sum_high=sum(cos_matrix(icount*2-1:18,:));
subplot(5,1,counter);
plot(fftshift(cos_sum_high));
counter=counter+1;
end
(please paste your plot here)
a. These plots represent the sum of cosines for n=9, 7
to 9,5 to 9, 3 to 9 and 1 to 9.
9. The corresponding rows in 7. And 8. Represent the same
bandwidth. With respect to these figures discuss the effect
of high frequency vs. low frequency vs. bandwidth in seismic
resolution. Feel free to play around with more frequencies
or get really creative and convolve your various pulses of
different wavelengths with my reflectivity or another to
compare the resolution effect!

You might also like