FFT from measured data - Scaling y-axis

30 Ansichten (letzte 30 Tage)
Mepe
Mepe am 28 Mai 2018
Bearbeitet: David Goodmanson am 19 Jun. 2018
Hi all,
As a data basis, I have measured data the volts were recorded. Matlab will now be used to perform an FFT. I have the following questions:
  • What unit do I have on the ordinate axis after the FFT? Also volts?
  • How is scaled correctly? By hiding the negative frequencies (Nyquist), I would actually have to double the amplitude, right?
  • Do I have to multiply all values of the FFT again with 20 * log10 (FFT) to represent the ordinate in db?
Here the basis Matlab Code:
load('TimeDomain.mat')%loading of the time domain signal
L=2500; %length of the signal
Fs=500000;%sampling frequency
N=2^nextpow2(L);%scale factor
t=(0:L-1)*10^-3;%time domain array
f=linspace(0,Fs/2,length(t));%frequency domain array
FFT=abs(fft(Timedomain,N));
figure(1)
plot(f,FFT(1:2500))
Thank you so much for your support!
Frank

Akzeptierte Antwort

Star Strider
Star Strider am 28 Mai 2018
Bearbeitet: Star Strider am 28 Mai 2018
Your code appears to be correct.
I would change two lines:
FFT=abs(fft(Timedomain,N)/L); % Divide By ‘L’ To Scale For Signal Vector Length
figure(1)
plot(f,FFT(1:2500)*2) % Your Second Point Is Correct: Multiply By ‘2’ Since You Are Plotting A One-Sided Fourier Transform
The units are the same as the original (here Volts) unless you square ‘FFT’ or use the equivalent ‘20*log10(FFT)’ transformation, since the units then become power (Watts).
EDIT Corrected typographical error, clarified explanation.
  7 Kommentare
Star Strider
Star Strider am 30 Mai 2018
I would just use 10*log10(FFT) if that is what you want to do.
However, I have only used dB with respect to power, so I defer to you to determine if ‘dBV’ is valid.
An easier solution would simply be to plot the amplitude on a logarithmic scale, and not do the conversion to dB at all.
David Goodmanson
David Goodmanson am 19 Jun. 2018
Bearbeitet: David Goodmanson am 19 Jun. 2018
I don't agree that 20*log10(fft) means that the expression refers to Watts. Systems like this one have linear quantities such as voltage, and squared quantities such as power ~~ V^2. The factor of 20 pertains to a linear quantity such as Volts, not Watts.
dB is always expressed in terms of the log of a ratio, and sometimes the denominator of that ratio is a specified reference level.
In terms of power, dB Watts is 10*log10(P_signal/1W).
In terms of voltage, dB Volts is 20*log10(V_signal/1V).
Suppose the voltage signal V1 is doubled to make voltage signal V2. Then the dB increase is 20*log10(V2/V1) = 6 dB. In terms of power, the dB increase is 10*log10(V2^2/V1^2) = 6 dB. It's always the same increase in dB, whether the calculation is done in terms of voltage or in terms of power.
To convert from voltage to power, you have to know something about the impedance of the system, which is most often 50 ohms. If V is expressed in rms volts, then P = Vrms^2/50.
1 Vrms (0 dBVrms) produces .02 W = 20 mW, and 10*(log10(20mW/1mW) = 13 dBmW.
So 0 dBVrms corresponds to 13 dBmW.
If it were a 1 ohm system then 0 dBVrms would correspond to 0 dBW but that assumption is uncommon.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy am 28 Mai 2018
Bearbeitet: Yuvaraj Venkataswamy am 28 Mai 2018
1.If you are directly use the voltage output as input, then your FFT amplitude must be in mV.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by