• Welcome to the new Internet Infidels Discussion Board, formerly Talk Freethought.

The Fourier Trasform

Consider you are looking for a sonar signal return . One way to detect it is through an FFT. Convolution is two functions moving past each in time. Time domain convolution can be done in the frequency domain. As the pulse moves past you you do a running FFT and look for the line that matches the frequency.

This is auto correlation.

clear
chirp_len = 512
rec_len = 5000
_start = 1500
fc = 10 // chirp freq
w = window("hn",chirp_len)
for i = (1:chirp_len) chirp(i) = 10* w(i)* sin(2*%pi*fc*(i-1)/(chirp_len-1));end;
for i= (1:rec_len) _echo(i) = 0;end;
for i= (1:chirp_len) tfr(i) = 0;end;
// place freq chirp somewhere in the record
for i = (1:chirp_len) _echo(i + _start) = chirp(i);end;
// at each n in the record run FFT
// record the bin fir the signal freq
for i= 1: (rec_len - chirp_len)
for j = (chirp_len) tfr(j) = _echo(i + j);end;
tf = fft(tfr,1)
_corel(i)= abs(tf(11))
end

a = scf(1)
clf(a)
plot(_echo)

c = scf(3)
clf(c)
plot2d3(_corel)
 
Back
Top Bottom