# FFT of bearing signal

8 views (last 30 days)

Show older comments

Hi everyone, i have a problem : when i do the fft of a signal i don't see the first harmonic , instead the fft show the first harmonic multiplied for 3. In fact my fundamental harmonic is 16,66 Hz e when i do the FFT it show 49,80 Hz. Is possible this? I insert the code and the signal on this. Also the sampling frequency is 10kHz.

S=size(N);

L2=S(1,1);

NFFT= 2^nextpow2(L2);

Y=fft(N,NFFT)/L2;

f1=f/2*linspace(0,1,NFFT/2+1);

f2=2*abs(Y(1:NFFT/2+1));

##### 4 Comments

### Accepted Answer

Jon
on 2 Aug 2023

In the attached code, I independently calculated the spectrum and compared to your calculation. It seems correct that your data has a very strong component at 50 Hz and higher harmonics of 50 Hz. Note also in the time domain plot, the 0.02 second period (50 Hz) oscillation is clearly visible. This gives added confidence that the scaling is correct. I also see a smaller peak at approx. 28 Hz. I agree that there is nothing significant at harmonics of the rotating frequency, which you report as 1000rev/min*1 min/60s = 16.667 Hz.

So either there is extremely little imbalance in the shaft, or perhaps the shaft frequency is not actually 1000 rpm. Regarding the 50Hz component, are you in a country where the electrical line frequency is 50 Hz. If so you are likely picking up "hum" from the power supply, or nearby power lines.

% % % S=size(N);

% % % L2=S(1,1);

% % % NFFT= 2^nextpow2(L2);

% % % Y=fft(N,NFFT)/L2;

% % % f1=f/2*linspace(0,1,NFFT/2+1);

% % % f2=2*abs(Y(1:NFFT/2+1));

% Assign parameters

fs = 10e3; % sampling frequency

% Load data from data file, data is in x11

load('vettore.mat')

% Find the length of the signal

L = numel(x11);

% Make sure that length of signal is even, if it isn't throw away last

% value to make it even

if rem(L,2)~=0

x11 = x11(1:end-1);

L = L-1;

end

% Compute the fft

Y = fft(x11);

% Compute the two sided spectrum P2

P2 = abs(Y/L);

% Compute the single sided spectrum P1

P1 = P2(1:L/2+1);

P1(2:end-1) = 2*P1(2:end-1);

% Define the frequency domain f and plot the single sided spectrum, P1

f = fs*(0:(L/2))/L;

% Plot results

% Plot the time domain signal

t = (0:L-1)*1/fs;

figure

plot(t,x11)

xlabel("time [s]")

ylabel("x11")

title("time domain signal x11")

xlim([0,0.1]); % zoom in

% Plot spectrum

figure

plot(f,P1)

title("Single-Sided Amplitude Spectrum of X(t)")

xlabel("f [Hz]")

ylabel("|P1(f)|")

xlim([0,300])

% Compare to OP's code

S=size(x11);

L2=S(1,1);

NFFT= 2^nextpow2(L2);

Y=fft(x11,NFFT)/L2;

f1=fs/2*linspace(0,1,NFFT/2+1);

f2=2*abs(Y(1:NFFT/2+1));

figure

plot(f1,f2)

title("OP's Spectrum")

xlabel("frequency [Hz]")

ylabel("Magnitude")

xlim([0,300])

##### 16 Comments

Jon
on 15 Aug 2023

### More Answers (1)

Eris Prifti
on 3 Aug 2023

##### 1 Comment

Jon
on 3 Aug 2023

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!