Azzera filtri
Azzera filtri

is there any problem in my FFT?

1 visualizzazione (ultimi 30 giorni)
SUNHAK KIM
SUNHAK KIM il 28 Ott 2021
Commentato: David Goodmanson il 28 Ott 2021
AB = C (time domain data)
A and C : known
B : unkown
length of A,B and C is 512
N1 = 512;
t = t1(1:N1-1);
A = A1(1:N1-1);
C =C1(1:N1-1);
T1 = tpp*N1;
fpp = 1/T1;
a1 = 0.3906;
nr = N1*a1;
fs = 1/tpp;
df1 = 0:fs/N1:(N1-1)*fs/N1;
dfp1 = df1(1:nr);
fft1 = fft(A);
fft_Mag_A(1) = (1/N1)*abs(fft1(1));
fft_Mag_A(2:nr) = (2/N1)*abs(fft1(2:nr));
fft_Phase_A = angle(fft1(1:nr));
fft2 = fft(C);
fft_Mag_C(1) = (1/N1)*abs(fft1(1));
fft_Mag_C(2:nr) = (2/N1)*abs(fft1(2:nr));
fft_Phase_C = angle(fft1(1:nr));
B = fft_Mag_C/fft_Mag_A*cos(w*t+fft_Phase_C - fft_Phase_A);
fft3 = fft(B);
fft_Mag_B(1) = (1/N1)*abs(fft3(1));
fft_Mag_B(2:nr) = (2/N1)*abs(fft3(2:nr));
fft_Phase_B(1:nr) = angle(fft3(1:nr));
C1 = fft_Mag_A*fft_Mag_B*cos(w*t+fft_Phase_A+fft_Phase_B)
here is a problem.
why C1 and C(data) doesn't match perfectly each other when i draw graph?
There's a slight error.
  1 Commento
David Goodmanson
David Goodmanson il 28 Ott 2021
Hi SK,
could you explain the purpose of doubling the magnitudes between 2 and nr, and also why the magnitude and phase of C are based on fft1 and not fft2?

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by