필터 지우기
필터 지우기

FFT from measured data - Scaling y-axis

조회 수: 41 (최근 30일)
Mepe
Mepe 2018년 5월 28일
편집: David Goodmanson 2018년 6월 19일
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

채택된 답변

Star Strider
Star Strider 2018년 5월 28일
편집: Star Strider 2018년 5월 28일
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
Star Strider
Star Strider 2018년 5월 30일
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 2018년 6월 19일
편집: David Goodmanson 2018년 6월 19일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy 2018년 5월 28일
편집: Yuvaraj Venkataswamy 2018년 5월 28일
1.If you are directly use the voltage output as input, then your FFT amplitude must be in mV.

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by