Fourier Amplitude Spectrum from seismic time history
Fourier Amplitude Spectrum from seismic time history
(OP)
Hi
I have a time history of a seismic event which i want to create a fourier amplitude spectrum from.
I understand that this would be near impossible by hand so i was wondering if there is any automated computer software, scripts or sheets which can do such a task?
I have the following programs available;
Excel
Mathcad
Matlab
Any help would be appreciated!
Thanks
I have a time history of a seismic event which i want to create a fourier amplitude spectrum from.
I understand that this would be near impossible by hand so i was wondering if there is any automated computer software, scripts or sheets which can do such a task?
I have the following programs available;
Excel
Mathcad
Matlab
Any help would be appreciated!
Thanks






RE: Fourier Amplitude Spectrum from seismic time history
All you need to do is to read the help files.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Fourier Amplitude Spectrum from seismic time history
Use whichever of the three programs you know best.
Calibrate it by generating a unit sinewave at an appropriate frequency, the vertical scaling of fft algorithms is sometimes rather curious. For instance, Mathcad does what it says for amplitude scaling, but it isn't immediately obvious why they chose that scheme.
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Fourier Amplitude Spectrum from seismic time history
x=..... % Your signal
fx=abs(ff(x));
To scale for amplitude, divide your fx by length(x)/2. However, the DC and Nyquist components only need be divided by length(x). Now realise that the positive frequencies are held in fx(1:length(fx)/2).
To get a frequency axis, I normally derive it from first principles rather than try to remember some formula. Your sample length dictates the frequency resolution (resolution = 1 / sample length). This means that fx(1) is DC, fx(2) is your resolution; fx(3) is twice your resolution, etc.
- Steve
RE: Fourier Amplitude Spectrum from seismic time history
Thanks for the replies so far. I have been trying this with matlab and run into a few issues.
This process seems relatively simple but I'm not too familiar with fourier transforms - in fact this is the first one i have ever done. I have only ever done simple hand calculations on square electronic waves.
This is what i have done so far,
x= signal
fx= abs(fft(x))
Fs= 100 %sampling frequency
f=Fs*linspace(0,1,length(fx))
plot((1./f),abs(fx)) %I want period on the horizontal axis
I'm not sure why we need to scale the amplitudes? I'm after an amplitude spectrum so wouldn't this be detrimental?
I've been following the matlab documentation of the 'fft' function but there are a few procedures which i don't quite understand.
This is an extract from the help file;
Fs = 1000; % Sampling frequency
T = 1/Fs; % Sample time
L = 1000; % Length of signal
x= arbitrary sin function
y = x + 2*randn(size(t)); % Sinusoids plus noise
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2);
% Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:NFFT/2)))
I'm not sure reason for creating the NFFT and what the deal is with the 'next power of 2'?
and then creating a frequency vector which is just 1/2 the sampling frequency repeated NFFT/2 times?
Any help would be appreciated !
RE: Fourier Amplitude Spectrum from seismic time history
In typical signal analysis that I do I would make the total energy of the spectrum the same as the total energy of the time history.
However someone who was concerned with tonal noises might prefer that their fft was calibrated so that the peak reading of a tone was the same as the amplitude of the sine wave producing it.
etc.
In my opinion the questions you are asking would involve too much typing for a forum such as this, can I suggest that you learn more about Fourier (start with wolfram or wiki), or pick up a matlab program that someone else has written, and hope that they have taken everything into account?
Alternatively mathcad will give you what you need in two commands, as it has an fft that doesn't care about 2^n.
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.