I am trying to develop some code to find a transient signal in a data set I have. Before I get there however I am trying to write code using simulated data.
I first am creating a signal with a specified frequency and then adding white noise to it.
I then iterate through a loop where I create a reference signal at an incremental frequency. I take the FFT of both signals and the I xcorr the results.
With this methodology I get descent results when I use a SnR ratio of greater than -15 dB, but after that my results are no good. Is there anyway I can optimize this to find signals that are hidden deeper than -15 dB SnR?
t = linspace(0,16*pi,1000); y = cos(2*t); z = awgn(y,-10); fftz = fft(z); subplot(2,1,1); plot(t,z) subplot(2,1,2); plot(t,y) freq = linspace(0.1,10,500); for i=1:500 reference_signal = cos(freq(i)*t); fftr = fft(reference_signal); Q(i) = max(abs(xcorr(fftz,fftr))); end subplot(3,1,1); plot(t,y) subplot(3,1,2); plot(t,z) subplot(3,1,3); plot(freq,Q)