FFT shows different frequency

Hello,
I have a question regarding my FFT result.
I have 3 audio files from a welding process with 120A, 130A and 140A with a audio length of about 0,085s.
You can see the audio file in the first row from the plot.
After that i've created a FFT from every audio file which are located in the second row. The maximum peak from every audio file is at about 200Hz.
120A-140A_085sec.jpg
When i calculate the period between the welding pulse i have a period of about 0,00871s at a welding current of 140A.
This is exakt the first peak in the FFT plot.
140A_v20.jpg
My question is, why is the maximum peak exactly at twice the frequency at about 200Hz and not like i calculated at about 100 Hz?
I hope someone could explain this to me
Many thanks in advance!
BR

Answers (1)

Star Strider
Star Strider on 4 Jul 2019
We would have to see your code (and preferably also at least one of your data files) to determine what the problem is.
Most likely, you did not calculate your frequency axis vector correctly. If you normalilsed it to your sampling frequency rather than the Nyquist frequency (the correct scaling), that could account for the frequencies being off by a factor of 2.

4 Comments

Hello Star Rider,
Thanks for your fast reply.
here is a code section how i calculate the FFT.
% 120A
[data,Fs]=audioread('Mono_120A_v20_08sec.wav');
[nSamples,nChannels]=size(data);
waveFileLength=nSamples/Fs;
t=[0:length(data)-1] / Fs;
subplot(2,1,1);
plot(t,data)
grid minor
xlim([0 0.09])
title('120A 0.085sec')
xlabel('Zeit')
ylabel('X(t)')
y_fft = abs(fft(data)); %Retain Magnitude
y_fft = y_fft(1:nSamples/2); %Discard Half of Points
f = Fs*(0:nSamples/2-1)/nSamples; %Prepare freq data for plot
subplot(2,1,2);
plot(f, y_fft)
grid on
xlim([0 400])
ylim([0 10])
xlabel('Frequency (Hz)')
ylabel('Amplitude')
title('Freqenzbereich 120A')
I've also attached the audiofile with i used in this example.
That mean i have do double my sampling frequency?
Many thanks in advance!
I do not see any problems with your time vector or frequency vector. When I analysed our data using code I am more vamiliar with, I got the same result.
I also checked the inter-peak intervals with findpeaks:
[pks,locs] = findpeaks(data, 'MinPeakDistance',400);
figure
plot(data)
hold on
plot(locs, pks, '^r')
hold off
grid
loctimes = locs/Fs;
dloctimes = diff(loctimes);
freqloctimes = 1./dloctimes;
meanfreqloctimes = mean(freqloctimes);
and confirmed that the inter-peak intervals correspond to about 97.7 Hz.
It is unusual that the second harmonic of the fundamental frequency has more energy that the fundamental frequency itself, however that appears to be the situation with your data.
Hello Star Strider,
thanks for checking my code.
Yeah i also don't know why the second peak is higher than the first one.
And from where the peak at about 200Hz is.
I have nothing more to add.
Since I did not solve your problem, I will delete my Answer.

Sign in to comment.

Categories

Find more on Fourier Analysis and Filtering in Help Center and File Exchange

Asked:

on 4 Jul 2019

Commented:

on 5 Jul 2019

Community Treasure Hunt

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

Start Hunting!