精准石油论坛: Fast Fourier Transform在地球气候变化和旋回地层学中应用 - 精准石油论坛

跳转到内容

第一页
  • 您无法发起一个新主题
  • 您无法回复此主题

Fast Fourier Transform在地球气候变化和旋回地层学中应用 主题评价: -----

#1 已离线   zhangxuewei 

  • 无为大侠
  • 图像
  • 群组: 版主
  • 主题数: 341
  • 注册日期: 10-27-2006

zhangxuewei 发表于 11-02-2011 - 08:31
精准.石油.论坛 forum.petro-china.com

这学期上Methods in Geosciences的课,课程使用MatLab作为工具讲授地质学的一些定量方法。
课程部分内容涉及地质记录的时间序列(time series)和频谱分析,主要应用快速傅立叶变化(FFT),很简单也很实用的工具。也许有人现在或者以后会涉及到时间序列分析相关内容,所以把这门课有关时间序列部分的作业(附件time series computing lab)发上来,使用的数据为俄罗斯Vostok station 的Ice Core中氘同位素相对丰度(附件VostokIceCore1999.dat)数据。我写的答案贴在下面,还有一些相关的图在附件中(图顺序乱了,鼠标放在图上可以显示编号)。

时间序列可以应用在地学的很多方面. Matlab recipes for earth sciences by Martin H. Trauth是本非常不错的参考书,完全可以自学的。

有关时间序列部分的lecture notes也贴在附件中,感兴趣的可以看下。

希望会有所帮助


_________________________________________________________________
% Time Series and Power Spectral Analysis of Vostok Ice Core
function [dRMS] = VostokIceCore(M)
icecore=M.data;
% Resampling of ice core age data
Age=linspace(0,420000,2048);
% Interpolation for deuterium
H2=interp1(icecore(:,2),icecore(:,3),Age);
% Calculate sampling frequency and Nyquist frequency
Fs=1/(Age(2)-Age(1));
Fnyq=1/2*Fs;
% Remove DC component
Deu=H2-mean(H2);
% Detrending
polyf=polyfit(Age,Deu,1);
Deu_new=Deu-polyval(polyf,Age);
% Perform FFT
Deu_fft=fft(Deu_new);
F=Fnyq*linspace(0,1,2048/2+1);
p=(abs(Deu_fft/2048)).^2;
P=[p(1) 2*p(2:2048/2) p(2048/2+1)];
figure;
subplot(211),plot(Age,Deu_new);
xlabel('Age (year)');ylabel('Delta D (‰)');
subplot(212),plot(F,P);
xlabel('Frequecy (1/year)');ylabel('Power');
% Plot Period vs Power using semi-logarithmic scale
figure
semilogx(ones(1,length(F)-1)./F(2:end),P(2:end),'linewidth',2);
xlabel('Period (year)');ylabel('power');
% Calculte Welch's periodogram using two overlapping segments length of 1536
Deu_1=Deu_new(1:1536);
Deu_2=Deu_new(2048-1536+1:end);
% Apply a Hann widow to each of the segments
Hann=1/2*(1-cos(2*pi*(0:1536-1)'/1536));
Hann_1=Deu_1'.*Hann;
Hann_2=Deu_2'.*Hann;
Hann_fft_1=fft(Hann_1);
Hann_fft_2=fft(Hann_2);
p_1=(abs(Hann_fft_1/1536)).^2;
p_2=(abs(Hann_fft_2/1536)).^2;
p_avg=(p_1+p_2)/2;
p_HW=[p_avg(1);2*p_avg(2:1536/2);p_avg(1536/2+1)];
% Compute the frequency
F_HW=Fnyq*linspace(0,1,1536/2+1);
figure
semilogx(ones(1,length(F_HW)-1)./F_HW(2:end),p_HW(2:end),'k','linewidth',2);
xlabel('Period (year)');ylabel('power');
% Filtering out frequencies greater than 1.25e-5
k1=find(F>1.25E-5);K1=k1(1);
X1=Deu_fft;
X1(K1:end-K1)=0;
x1=ifft(X1);
dRMS1=1-sum((Deu_new-real(x1)).^2)/sum((Deu_new-mean(Deu_new)).^2);
figure;
subplot(211),plot(Age,Deu_new);
xlabel('Age (year)');ylabel('Delta D (‰)');
subplot(212),plot(Age,real(x1),'linewidth',2);
xlabel('Age (year)');ylabel('Delta D after filter (F>1.25E-5) applied (‰)')
% Filtering out frequencies greater than 3.125e-5
k2=find(F>3.125E-5);K2=k2(1);
X2=Deu_fft;
X2(K2:end-K2)=0;
x2=ifft(X2);
dRMS2=1-sum((Deu_new-real(x2)).^2)/sum((Deu_new-mean(Deu_new)).^2);
figure;
subplot(211),plot(Age,Deu_new);
xlabel('Age (year)');ylabel('Delta D (‰)');
subplot(212),plot(Age,real(x2),'linewidth',2);
xlabel('Age (year)');ylabel('Delta D after filter (F>3.125E-5) applied (‰)')
% Filtering out frequencies greater than 5.5e-5
k3=find(F>5.5E-5);K3=k3(1);
X3=Deu_fft;
X3(K3:end-K3)=0;
x3=ifft(X3);
dRMS3=1-sum((Deu_new-real(x3)).^2)/sum((Deu_new-mean(Deu_new)).^2);
figure;
subplot(211),plot(Age,Deu_new);
xlabel('Age (year)');ylabel('Delta D (‰)');
subplot(212),plot(Age,real(x3),'linewidth',2);
xlabel('Age (year)');ylabel('Delta D after filter (F>5.5E-5) applied (‰)')
dRMS=[dRMS1;dRMS2;dRMS3];
end
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> M=importdata('VostokIceCore1999.dat',' ',60);
>> dRMS=VostokIceCore(M)

dRMS =

0.506207640217901
0.774088779676613
0.903638085831479
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1)The sampling frequency is 0.004876(2400/420000) year-1; the Nyquist frequency is 0.002438 year-1.
2)See Figure 1.
3)The three largest peaks on the periodogram (105.1 Kyr, 38.2 Kyr and 28.0 Kyr,) represent eccentricity (~100Kyr), obliquity (~40 Kyr) and procession (~ 26 and 23 Kyr) orbital cycle respectively. (Figure 2);
4)After apply the Hann window and Welch’s method, the periodoram in Figure 3 is improved compared to that in Figure 2, because side lobes on the periodogram have been reduced. The three largest peaks on the periodogram are 105.1, 39.4 and 28.7 Kyr respectively. They are indicative of eccentricity, obliquity and procession forcing.
5)In the first case, frequencies that are greater than 1.25e-5 are filtered out from the original Fourier vector. After applying the inverse FFT to the filtered Fourier vector, the resulting time series (Figure 4) only contains periods greater than 80 Kyr (1/1.25e-5), which approximately represents the eccentricity component of the original delta D time series from the Vostok ice core. About 50.6% variation of the original data is accounted for by this synthetic (or by eccentricity forcing). Afterwards, frequencies that are greater than 3.125e-5 are filtered out from the original Fourier vector. Therefore, the resulting time series (Figure 5) only contains periods greater than 32 Kyr (1/3.125e-5), which approximately represents the eccentricity plus obliquity components of the raw delta D time series. About 77.4% variation of the original data is accounted for by eccentricity and obliquity. Finally, frequencies that are greater than 5.5e-5 are filtered out from the original Fourier vector. The resulting time series (Figure 6) only contains periods greater than 18 Kyr (1/5.5e-5), which approximately represents the eccentricity plus obliquity plus procession components of the raw delta D time series. About 90.4% variation of the raw delta D data from the Vostok ice core is accounted.

附加文件


精准.石油.论坛 forum.petro-china.com






----
来源: 精准石油论坛 - 推进信息共享,提升科技水平
0

#2 已离线   akabc47 

  • 无为大侠
  • 图像
  • 群组: 版主
  • 主题数: 402
  • 注册日期: 03-18-2009

akabc47 发表于 11-02-2011 - 08:49
精准.石油.论坛 forum.petro-china.com

Good work!
精准.石油.论坛 forum.petro-china.com






----
来源: 精准石油论坛 - 推进信息共享,提升科技水平
0

#3 已离线   wzgme 

  • 职业侠客
  • 图像
  • 群组: 认证会员
  • 主题数: 282
  • 注册日期: 12-19-2006

wzgme 发表于 11-02-2011 - 21:55
精准.石油.论坛 forum.petro-china.com

FFT作为一种稳态信号的时频分析工具,可能对大尺度的周期比较适合。而千百年尺度上的快速气候变换,是不是要用时变系统的非稳态的时频分析工具更好,比如Wavelet or S Transform。

PS: 我只上个10天海洋地质学培训,从信号分析方面的一点愚见。
精准.石油.论坛 forum.petro-china.com






----
来源: 精准石油论坛 - 推进信息共享,提升科技水平
0

#4 已离线   zhangxuewei 

  • 无为大侠
  • 图像
  • 群组: 版主
  • 主题数: 341
  • 注册日期: 10-27-2006

zhangxuewei 发表于 11-02-2011 - 23:16
精准.石油.论坛 forum.petro-china.com

查看主题引用框(wzgme @ 11-02-2011 - 09:55)

FFT作为一种稳态信号的时频分析工具,可能对大尺度的周期比较适合。而千百年尺度上的快速气候变换,是不是要用时变系统的非稳态的时频分析工具更好,比如Wavelet or S Transform。

PS: 我只上个10天海洋地质学培训,从信号分析方面的一点愚见。


eccentricity,obliquity,precession的周期分别是100,000&400,000, 40,000 和23,000年。从实际的应用看,目前看对vostok ice core,FFT做出的结果还不错。
S transform是什么?我知道有很多软件可以做时间序列和频谱分析,但我觉得使用软件简单,但需要明白其中原理。

时间序列和频谱分系我还处于初探阶段,你有什么好的方法/软件可以推荐吗?
精准.石油.论坛 forum.petro-china.com






----
来源: 精准石油论坛 - 推进信息共享,提升科技水平
0

#5 已离线   wzgme 

  • 职业侠客
  • 图像
  • 群组: 认证会员
  • 主题数: 282
  • 注册日期: 12-19-2006

wzgme 发表于 11-03-2011 - 16:44
精准.石油.论坛 forum.petro-china.com

查看主题引用框(zhangxuewei @ 11-02-2011 - 23:16)

查看主题引用框(wzgme @ 11-02-2011 - 09:55)

FFT作为一种稳态信号的时频分析工具,可能对大尺度的周期比较适合。而千百年尺度上的快速气候变换,是不是要用时变系统的非稳态的时频分析工具更好,比如Wavelet or S Transform。

PS: 我只上个10天海洋地质学培训,从信号分析方面的一点愚见。


eccentricity,obliquity,precession的周期分别是100,000&400,000, 40,000 和23,000年。从实际的应用看,目前看对vostok ice core和一个陨石湖浊流沉积数据,FFT做出的结果还不错。
S transform是什么?我知道有很多软件可以做时间序列和频谱分析,但我觉得使用软件简单那,但需要明白其中原理。

时间序列和频谱分系我还处于初探阶段,你有什么好的方法/软件可以推荐吗?

Matlab就很好。S变换其实就是变窗的短时傅立叶。我没有具体做过地质数据的时间序列分析,我是在上次听UCSC的Christina Ravelo教授的课时,觉得是不是除了傅立叶变换外,还可以利用更多的时频工具。主要是地震数据时频分析做多了后,一些条件反射的想法。
精准.石油.论坛 forum.petro-china.com






----
来源: 精准石油论坛 - 推进信息共享,提升科技水平
0

第一页
  • 您无法发起一个新主题
  • 您无法回复此主题