FFT of vibration data, please help

11 次查看(过去 30 天)
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 个评论
karim Bouaouiche
karim Bouaouiche 2023-1-11
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.

请先登录,再进行评论。

回答(2 个)

Star Strider
Star Strider 2019-9-28
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 个评论
Star Strider
Star Strider 2021-7-21
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')
.

请先登录,再进行评论。


ndiaye bara
ndiaye bara 2021-7-21
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

类别

Help CenterFile Exchange 中查找有关 Vibration Analysis 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by