Phase shift in in FFT Harmonics results

조회 수: 5 (최근 30일)
Dom
Dom 2022년 2월 12일
편집: Dom 2022년 2월 12일
Hi Guys,
I am using the fft_powerscope function to evalute a simulink output signal. My problem is, that the recreated signal does not ressemble the original signal. There seems to be a phase shift somewhere. Can you help me find the error? I shared all the data that I used.
order= z_46.fft_iabc.freq./z_46.fft_iabc.fundamental;
phase= z_46.fft_iabc.phase;
for y=1:length(phase)
phase2(y,1)=phase(y)-phase(2)*(y-1);
end
fs = 1000;
Ts = 1/fs;
duration = 10;
t = 0 : Ts : duration-Ts;
mag= z_46.fft_iabc.mag./ z_46.fft_iabc.magFundamental;
x=mag(1);
M=[order,mag,phase2];
phase=phase*pi/180;
for q=2:length(M)
x=x+mag(q)*sin(2*pi* (q-1)*t+phase(q));
end
Would gladly appreciate your help. The fft start time from the orginal signal is in the data set.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by