I am not very experienced in signal processing, and it seems like this should be a simple problem. I have two computers, one plays a tone a 19 kHz at a sampling rate of 44.1 kHz, and the other listens with a sampling rate of 44.1 kHz and tries to find if the 19kHz tone is present. The transmission of the signal is in a noisy environment, and I have tried to find the amplitude of the 19 kHz wave using an FFT as well as Goertzel, but neither has given me a conclusive value (the amplitudes are very small).
For the FFT, I am using JTransform, running the forwardFFT, then finding the bin in which 19 kHz lies and getting the amplitude by (imaginary * imaginary + real * real) for the components of that frequency bin.
For Goertzel, I followed the pseudo-code on this site: http://www.mstarlabs.com/dsp/goertzel/goertzel.html. I feel like both the FFT and Goertzel should give the same amplitude if the sample size is the same, but they give different values for that frequency bin.
I expect the amplitude to be greater than 10, but I do not believe this is working. I believe I need to at least filter out the noise below 19 kHz as a first step, but am unsure. Maybe some highpass filtering should be done first? Any suggestions on how to detect the 19 kHz sine wave? Thank you. Updated:
Here is a plot of the raw data I am getting from the microphone:
I feel like this is just noise, but I am unsure.