Azzera filtri
Azzera filtri

FFT of vibration data, please help

11 visualizzazioni (ultimi 30 giorni)
Monte Ceisto
Monte Ceisto il 28 Set 2019
Commentato: karim Bouaouiche il 11 Gen 2023
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 Commento
karim Bouaouiche
karim Bouaouiche il 11 Gen 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.

Accedi per commentare.

Risposte (2)

Star Strider
Star Strider il 28 Set 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 Commento
Star Strider
Star Strider il 21 Lug 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')
.

Accedi per commentare.


ndiaye bara
ndiaye bara il 21 Lug 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

Categorie

Scopri di più su Vibration Analysis in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by