I have a pressure signal from a Fluent FFowcs-Williams Hawkings acoustics analysis.
I converted this pressure signal into the frequency domain in order to get SPL values, using Matlab. I used the amplitude of the FFT:
A = fft(s10); %Amplitude
B = abs(A); %Magnitude of amplitude (complex numbers to real)
C = B/L; %Normalize amplitude by dividing by number of samples
D = C(1:fix(L/2)+1); %Select one half of 2-sided spectrum
E = 2*D; %Compensate for loss of energy by taking only 1 half of spectrum
F = E/sqrt(2); %Rms of amplitude
SPL = 20*log10(F/Pref);
As far as I can see, Fluent uses the Power Spectral Density of the FFT to calculate SPL, instead of using the amplitude. The results of this calculation corresponds to what Fluent does in its FFT:
A = fft(s10); %Amplitude
G = A(1:fix(L/2)+1); %Select 1-sided spectrum
PSD = (2*(abs(G)).^2)/(Fs*L); %Compensate for loss of energy by multiplying by 2; scale by
%dividing by Fs and L; square
SPL2 = 10*log10(PSD/(2e-5)^2);
When plotting these two different sets of results, there is a constant difference between the SPL values of the two signals. In this case it's a 12.0377 dB shift.
My question is, which of these two methods is the correct one to use in order to calculate SPL, and why? Or have I made a mistake in my calculations?
Help would be much appreciated!!