Filter löschen
Filter löschen

FFT of vibration data, please help

11 Ansichten (letzte 30 Tage)
Monte Ceisto
Monte Ceisto am 28 Sep. 2019
Kommentiert: karim Bouaouiche am 11 Jan. 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 Kommentar
karim Bouaouiche
karim Bouaouiche am 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.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Star Strider
Star Strider am 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 Kommentar
Star Strider
Star Strider am 21 Jul. 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')
.

Melden Sie sich an, um zu kommentieren.


ndiaye bara
ndiaye bara am 21 Jul. 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

Kategorien

Mehr zu Vibration Analysis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by