필터 지우기
필터 지우기

Translation of a time signal in space by FFT and IFFT

조회 수: 7 (최근 30일)
Twevers
Twevers 2018년 4월 18일
Dear all,
Currently i am looking to translate my time signal, which has been taken at point 'X' to point 'X+1.875'. The way i am doing this is as follows:
  • Applying a FFT to get each individual wave
  • For each individual wave, determine the wave number 'k'
  • Determine the phase per fase
  • determine the phase shift (length x k)
  • determine the new waves at the new point
  • inverse fft of new waves
But by doing this, the amplitude decreases significantly of my wave crests and increases in my wave through. Can anyone spot a mistake?
if true
S=fft(wle);
T=length(wle)/Fs;
f=[0:1/T:1/2*Fs 1/2*Fs-(1/T):-1/T:1/T];
figure, plot(f,sqrt(S.*conj(S)));
hold on; plot(f,abs(S));
kd = 0:0.001:10000;
w2d=g*kd.*tanh(kd*h);
w=2*pi*f;
k=interp1(w2d,kd,w.^2);
figure, plot(k,sqrt(S.*conj(S)))
hold on; plot(k, abs(S))
Z = angle(S);
L = -1.875 ;% (somehow it translated 1.875m forward when L is set negative....)
da = L.*k';
amp2 = abs(S);
S_sh2 = amp2.*cos(Z+da) + i*amp2.*sin(Z+da);
S_sh2 = [S_sh2(1:561);conj(S_sh2(560:-1:2))];
wle_sh2 = ifft(S_sh2,'symmetric');
plot(t,wle,'r',t,wle_sh2,'k')
end
Blue is the original signal, black the newly translated signal to 1.875 meter forward

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by