Effacer les filtres
Effacer les filtres

FFT of vibration data, please help

11 vues (au cours des 30 derniers jours)
Monte Ceisto
Monte Ceisto le 28 Sep 2019
Dear friends
I have vibration data from the device, I need to convert it into Freq Domain (Magnitude vs Freq). I've tried several times and still stuck, I can't import that data into the formula/function. I've attached an excel file I got from the device. maybe you can download and see the excel files for complete information. Could you guys help me, what function/formula should I write? and how to find the max point in the plot?
  1 commentaire
karim Bouaouiche
karim Bouaouiche le 11 Jan 2023
Hello Monte
Please help me
I want the vibration signals of the bearing as MATLAB or csv files for complete a signal processing study.
Cordially.

Connectez-vous pour commenter.

Réponses (2)

Star Strider
Star Strider le 28 Sep 2019
Try this:
D = xlsread('TEK0000.csv');
t = D(:,3);
s = D(:,4);
figure
plot(t, s)
grid
xlabel('Time (s)')
ylabel('V')
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(t); % Signal Length
sm = s - mean(s); % Mean-Corrected Signal (Eliminates 0 Hz Offset)
FTs = fft(sm)/L; % Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
[MaxV,idx] = max(abs(FTs(Iv))*2); % Maximum V & Index
Freq = Fv(idx); % Frequency Of Maximum V
figure
plot(Fv, abs(FTs(Iv))*2)
grid
text(Freq, MaxV, sprintf('\\leftarrow %.4f V, %.0f Hz', MaxV, Freq), 'HorizontalAlignment','left')
See the documentation for the various functions for details.
  1 commentaire
Star Strider
Star Strider le 21 Juil 2021
The online Run feature provides with that code —
D = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/240300/TEK0000.CSV');
t = D(:,4);
s = D(:,5);
figure
plot(t, s)
grid
xlabel('Time (s)')
ylabel('V')
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
L = numel(t); % Signal Length
sm = s - mean(s); % Mean-Corrected Signal (Eliminates 0 Hz Offset)
FTs = fft(sm)/L; % Fourier Transform
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector
Iv = 1:numel(Fv); % Index Vector
[MaxV,idx] = max(abs(FTs(Iv))*2); % Maximum V & Index
Freq = Fv(idx); % Frequency Of Maximum V
figure
plot(Fv, abs(FTs(Iv))*2)
grid
text(Freq, MaxV, sprintf('\\leftarrow %.4f V, %.0f Hz', MaxV, Freq), 'HorizontalAlignment','left')
.

Connectez-vous pour commenter.


ndiaye bara
ndiaye bara le 21 Juil 2021
Hello ,
Try this code
%%
clear; close all; clc
data = readtable('TEK0000.csv') ;
t = data.Var4;
amp = data.Var5;
amp = amp-mean(amp);
figure, plot(t/1e-3,amp), grid on
xlabel('Time [ms]')
ylabel('Amp [V]')
nfft = 2^15;
dt = t(2) - t(1);
df = 1/dt/nfft;
f = (0:(nfft-1))*df;
spec = abs(fft(amp,nfft));
figure, plot(f,spec,'r'), grid on
xlabel('Frequency [Hz]')
ylabel('|FFT|')
set(gca,'xlim',[0 12500])
Regards

Catégories

En savoir plus sur Vibration Analysis dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by