×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Fourier Amplitude Spectrum from seismic time history

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

RE: Fourier Amplitude Spectrum from seismic time history

Both Mathcad and Matlab have FFT capability, as does Excel, which is a bit more limited in capability.

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

It isn't impossible by hand, if push comes to shove.

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

If you are using Matlab, here are some tips.

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

(OP)
Hey,

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

You need to scale the amplitudes because there is no single way of assigning the relativity between the time and frequency domains.

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources