Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fast Fourier Transform of acceleration time history

Subject: Fast Fourier Transform of acceleration time history

From: Baha Kuzu

Date: 11 Jan, 2013 10:59:07

Message: 1 of 6

I have acceleration response time history of 8 story structure and I want to see the fundamental frequencies by taking FFT of this acceleration response. I have some question marks about how to get this:
 
* Since I have response of each story separately, should I consider them separately or I should manipulate it such as taking max response with respect to stories?
Please download data from: https://docs.google.com/file/d/0BzXmz2fuKv1obWxzMklqbU1ZWGM/edit

How I simply proceed is:
load 'Acc.txt';
time = Acc(:,1); % remaining 8 columns (columns 2-to-9) are corresponding to response of each story, from first to top story, respectively.
Dt = time(2)-time(1); % time step
Acc_max = transp(max(transp(Acc(:,2:end)))); % max Acc wrt stories

* Next, please check the rest of the code I don't get a precise peaks but some noisy frequency response. Is there any other way to get this seem better? (note this Acc.txt is filtered response).
Any suggestions appreciated... (I anticipate fundamental frequencies to be around [0.9 5 15 33 55 85].

Acc_max = detrend(Acc_max);
Acc_fft = fft(Acc_max);
N = length(ch1_f); % Length of the FFT
% Number of Time Steps in the Data Array
n=length(Acc_max);
Dt_f=1/n/Dt; % Frequency Increment of the FFT
nyq=1/Dt/2; % the Nyquist Frequency
f=0:Dt_f:nyq-Dt_f; % Build a Frequency Array
% Convert to a Single-Sided FFT - Ignore All Data from i = N/2+1 Through N in the FFT
mag_1 = abs(Acc_fft(1:N/2));
% Go From Complex Form, to Determine the Phase Angle of the FFT
angl_ch1 = angle(Acc_fft(1:N/2));

figure;
plot(f,mag_1); % linscale
xlabel('Frequency (Hz)')
ylabel('Fourier Amplitude'); grid on
title('FFT of Acceleration Data')

Subject: Fast Fourier Transform of acceleration time history

From: Greg Heath

Date: 12 Jan, 2013 01:47:05

Message: 2 of 6

"Baha Kuzu" <ibaha411@gmail.com> wrote in message <kcor9r$ij8$1@newscl01ah.mathworks.com>...
> I have acceleration response time history of 8 story structure and I want to see the fundamental frequencies by taking FFT of this acceleration response. I have some question marks about how to get this:
>
> * Since I have response of each story separately, should I consider them separately or I should manipulate it such as taking max response with respect to stories?

First look at the separate spectra before doing any thing else.

Hope this helps.

Greg

Subject: Fast Fourier Transform of acceleration time history

From: Godzilla

Date: 12 Jan, 2013 02:57:18

Message: 3 of 6

"Baha Kuzu" <ibaha411@gmail.com> wrote in message <kcor9r$ij8$1@newscl01ah.mathworks.com>...
> I have acceleration response time history of 8 story structure and I want to see the fundamental frequencies by taking FFT of this acceleration response. I have some question marks about how to get this:
>
> * Since I have response of each story separately, should I consider them separately or I should manipulate it such as taking max response with respect to stories?
> Please download data from: https://docs.google.com/file/d/0BzXmz2fuKv1obWxzMklqbU1ZWGM/edit
>
> How I simply proceed is:
> load 'Acc.txt';
> time = Acc(:,1); % remaining 8 columns (columns 2-to-9) are corresponding to response of each story, from first to top story, respectively.
> Dt = time(2)-time(1); % time step
> Acc_max = transp(max(transp(Acc(:,2:end)))); % max Acc wrt stories
>
> * Next, please check the rest of the code I don't get a precise peaks but some noisy frequency response. Is there any other way to get this seem better? (note this Acc.txt is filtered response).
> Any suggestions appreciated... (I anticipate fundamental frequencies to be around [0.9 5 15 33 55 85].
>
> Acc_max = detrend(Acc_max);
> Acc_fft = fft(Acc_max);
> N = length(ch1_f); % Length of the FFT
> % Number of Time Steps in the Data Array
> n=length(Acc_max);
> Dt_f=1/n/Dt; % Frequency Increment of the FFT
> nyq=1/Dt/2; % the Nyquist Frequency
> f=0:Dt_f:nyq-Dt_f; % Build a Frequency Array
> % Convert to a Single-Sided FFT - Ignore All Data from i = N/2+1 Through N in the FFT
> mag_1 = abs(Acc_fft(1:N/2));
> % Go From Complex Form, to Determine the Phase Angle of the FFT
> angl_ch1 = angle(Acc_fft(1:N/2));
>
> figure;
> plot(f,mag_1); % linscale
> xlabel('Frequency (Hz)')
> ylabel('Fourier Amplitude'); grid on
> title('FFT of Acceleration Data')


what is ch1_f?

Subject: Fast Fourier Transform of acceleration time history

From: Baha Kuzu

Date: 12 Jan, 2013 07:26:14

Message: 4 of 6

Thanks Greg, yeah you are right. I actually got the result this morning. Looking at individual response and playing with the order of fourier transform will make it look better.
Godzilla, it's a typo. It should be Acc_fft. I got frequencies as I expected and see the period shift due to the stiffness degradation.

Subject: Fast Fourier Transform of acceleration time history

From: Khanh

Date: 10 Jul, 2014 11:13:08

Message: 5 of 6

"Baha Kuzu" <ibaha411@gmail.com> wrote in message <kcor9r$ij8$1@newscl01ah.mathworks.com>...
> I have acceleration response time history of 8 story structure and I want to see the fundamental frequencies by taking FFT of this acceleration response. I have some question marks about how to get this:
>
> * Since I have response of each story separately, should I consider them separately or I should manipulate it such as taking max response with respect to stories?
> Please download data from: https://docs.google.com/file/d/0BzXmz2fuKv1obWxzMklqbU1ZWGM/edit
>
> How I simply proceed is:
> load 'Acc.txt';
> time = Acc(:,1); % remaining 8 columns (columns 2-to-9) are corresponding to response of each story, from first to top story, respectively.
> Dt = time(2)-time(1); % time step
> Acc_max = transp(max(transp(Acc(:,2:end)))); % max Acc wrt stories
>
> * Next, please check the rest of the code I don't get a precise peaks but some noisy frequency response. Is there any other way to get this seem better? (note this Acc.txt is filtered response).
> Any suggestions appreciated... (I anticipate fundamental frequencies to be around [0.9 5 15 33 55 85].
>
> Acc_max = detrend(Acc_max);
> Acc_fft = fft(Acc_max);
> N = length(ch1_f); % Length of the FFT
> % Number of Time Steps in the Data Array
> n=length(Acc_max);
> Dt_f=1/n/Dt; % Frequency Increment of the FFT
> nyq=1/Dt/2; % the Nyquist Frequency
> f=0:Dt_f:nyq-Dt_f; % Build a Frequency Array
> % Convert to a Single-Sided FFT - Ignore All Data from i = N/2+1 Through N in the FFT
> mag_1 = abs(Acc_fft(1:N/2));
> % Go From Complex Form, to Determine the Phase Angle of the FFT
> angl_ch1 = angle(Acc_fft(1:N/2));
>
> figure;
> plot(f,mag_1); % linscale
> xlabel('Frequency (Hz)')
> ylabel('Fourier Amplitude'); grid on
> title('FFT of Acceleration Data')



Thank you very much for your codes that I also want to know about using FFT.
However, what is the transp fuction?

Subject: Fast Fourier Transform of acceleration time history

From: Baha

Date: 11 Jul, 2014 02:30:11

Message: 6 of 6

It's transpose.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us