필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Why do I get the wrong phase after I apply FFT to my sinusoidal?

조회 수: 1 (최근 30일)
Nina
Nina 2013년 2월 27일
I have a function x = A0*(1+sin(w*t + phi)); all the variable are known. The time vector is provided also. When I take a vector of the solution x do an fft on it, I get the wrong phi that I started with. For example, my phi = 45, I get back 180. Here is what i have so far:
x=[.....];
t=[.....];
m=ceil(log2(length(x)));
fft_A=fft(x,2^m);
fft_A = 2*fft_A/length(x);
%Find the phase angle
FT_power2 = abs(fft_A).^2;
FT_phase2= ((unwrap(angle(fft_A))))*(180/pi);
[c2,i2] = max(FT_power2);
phase = (FT_phase2(i2))
What am I doing wrong? thank you.
PS: I understand that I have a DC offset of A0 but I am not sure how to deal with it and what to expect.
  댓글 수: 2
Nina
Nina 2013년 2월 27일
I believe my issue is finding the correct bin where the amplitude and phase would fall into, is there a general way to do that if you supposidly do not know the information before hand ?(i.e frequency,amplitude...)

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by