jamesliu 发表于 2010-11-7 10:10:46

快速傅立叶变换数据点问题及噪声

一个地震波记录,一共有2000个数据点,要对它进行快速傅立叶变换(FFT),需要的数据点必须是2^n,比如1024或2048个。
问题:是舍弃一部分数据,还是添加一部分为0的数据?或者从这2000个数据中随机选取1024个数据,如果这样做,该怎么选?用什么命令?
如果数据中含有噪声,如何过滤噪声,是产生随机数吗,如何做?

谢谢!

zpz77777 发表于 2010-11-7 18:48:39

这似乎涉及到地震监测的具体要求,只有根据具体要求才能做正确的数学变换。mathcad 仅仅是一个辅助计算的数学软件,取点原则应该由地震学科来确定才对。

iomega 发表于 2010-11-8 11:29:48

Adding more padded 0s to avoid the frequency aliasing.

To reduce the noise, you can apply the low-pass filter in frequency-domain or in time-domain.

jamesliu 发表于 2010-11-12 13:42:07

谢谢iomega
按我的理解,应该用2048个数据点,但只有2000个数据点,所以后48个补0,以凑够数目。
我后来找到别人用matlab做的例子,但我没学过matlab,有些命令看不懂。请会matlab的人帮忙解释一下。

%FFT_example
%From MATLAB Help re FFT

clear all;close all

% A common use of Fourier transforms is to find the frequency components of a signal buried in a noisy time domain signal.
% Consider data sampled at 1000 Hz. Form a signal containing 50 Hz and 120 Hz and corrupt it with some zero-mean random noise:

figure
t = 0:0.001:0.6;
x = sin(2*pi*50*t)+sin(2*pi*120*t);
y = x + 2*randn(size(t));
plot(1000*t(1:50),y(1:50))
title('Signal Corrupted with Zero-Mean Random Noise')
xlabel('time (milliseconds)')
pause


% Converting to the frequency domain, the discrete Fourier transform of the noisy signal y is found by taking
% the 512-point fast Fourier transform (FFT):

Y = fft(y,512);%The second number is an exponential of two; the original signal (<512 points) will be padded with zeroes to satisfy the requirements of the fft algorithm

%Let's see what this looks like.
figure
plot (Y)
title('"Plot(Y)"')
pause
%Let's try the power spectrum.

%The power spectrum, a measurement of the power at various frequencies, is
Pyy = Y.* conj(Y) / 512;

%Graph the first 257 points (the other 255 points are redundant) on a meaningful frequency axis:
f = 1000*(0:256)/512;
figure
plot(f,Pyy(1:257))
title('Frequency content of y')
xlabel('frequency (Hz)')

下面是我的问题
y = x + 2*randn(size(t));是什么意思
Pyy = Y.* conj(Y) / 512;是什么意思,conj(Y函数什么作用
如果我看懂这段matlab程序然后怎么在mathcad做?
我没有学过FFT理论,只知道一点概念,请指点一下。谢谢!

iomega 发表于 2010-11-13 09:25:39

Question:
y = x + 2*randn(size(t));是什么意思:
Answer:
title('Signal Corrupted with Zero-Mean Random Noise')

Question:
Pyy = Y.* conj(Y) / 512;是什么意思,conj(Y函数什么作用
Answer:
%The power spectrum, a measurement of the power at various frequencies, is
Just to get the amplitude of the complex number,if Y= a+b*i, then conj(Y) = a-b*i.


If you understand the above matlab code, then the corresponding mathcad code will be only four lines long.
页: [1]
查看完整版本: 快速傅立叶变换数据点问题及噪声