amplitude of FFT output high compared to input
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm generating a unipolar PWM of 50Hz for triggering the MOSFETs in a single phase inverter. The output voltage of the inverter is given to a magnitude FFT and its output is given to SpectrumScope. But the amplitude of the output FFT is very high compared to input. For eg: if input = 50V FFT output at 50Hz = 6*10^5 in magnitude squared mode.
Sampling freq given 9.76*10^-6 ,FFT length = 2^11, buffer size = 2^11 and simlation time = 0.02s, buffer overlap =0.
Please help with this problem
0 Kommentare
Antworten (2)
Arturo Moncada-Torres
am 8 Aug. 2011
Remember that you must scale the output of the FFT, for example:
fs = 250; % Sampling frequency [Hz].
Ts = 1/fs; % Sampling period [s].
t = 0:Ts:(10-Ts); % Time axis.
x1 = sin(2.*pi.*t.*10); % Sinusoidal with f = 10 Hz.
x2 = 5*sin(2.*pi.*t.*50); % Sinusoidad with f = 50 Hz.
x = x1 + x2;
N = length(x); % Number of samples.
% Plots
figure();
subplot(3,1,1);
plot(t, x);
title('Original signal');
xlabel('Time [s]');
ylabel('Amplitude');
subplot(3,1,2);
plot(abs(fft(x)));
title('Magnitude spectrum with unscaled FFT');
ylabel('Amplitude');
subplot(3,1,3);
plot(abs(fft(x)/N)); % Scaling is done here.
title('Magnitude spectrum with scaled FFT');
xlabel('Frequency [Hz]');
ylabel('Amplitude');
In your case, the difference is bigger because you are using the square magnitude.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!