필터 지우기
필터 지우기

FFT of vibration data, please help

조회 수: 11 (최근 30일)
Monte Ceisto
Monte Ceisto 2019년 9월 28일
댓글: karim Bouaouiche 2023년 1월 11일
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