amplitude of FFT output high compared to input

조회 수: 20 (최근 30일)
rekh
rekh 2011년 8월 8일
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

답변 (2개)

Arturo Moncada-Torres
Arturo Moncada-Torres 2011년 8월 8일
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.

Honglei Chen
Honglei Chen 2011년 8월 8일
Hi rekh,
You may find the following tech note useful:
HTH

카테고리

Help CenterFile Exchange에서 Pulse width modulation (PWM)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by