# Measuring amplitude of a pure sine wave of known frequency close to the noise floor

What I want to ask you comes from a place where I can play with all the parameters as much as I want (I can measure as long as I want and as fast as I want, as well as change sensor/ADC).

The signal of origin will be a pure sine wave of known frequency (I make it) and maximum amplitude. As it travels through space it will attenuate. Due to the environment (underwater) I use low band frequencies (10-80Hz.) When I get too far away from it I cannot distinguish signal from noise as the SNR becomes 1/1.

Right know I am measuring using a 20bit ADC, mainly I reconstruct the amplitude of the signal by doing an FFT of it. Here is what I have tried:

• Use windos (have tried flat-top,Hann and a couple more) - proved really useful.
• Filter the signal (FIR and biquad filter) - didn't help too much.
• Play with the sampling rate and sampling ammount (empirical tests, I use 200Hz sampling rate, and 512 samples for ARM built in functions for FFT.)

The easy answer when I get far away from the signal would be to increase the power at the origin or get a better sensor with lower floor noise, but I feel that I can do much better processing my signal before changing to better sensors and emitters. I plan to enhance my system in both ways.

My problem then, comes when I am far away from the signal (I can provide real data if needed), I cannot distinguish anymore the tone at the FFT from the noise. As far as my knowledge can go, this could be either

• Quantization noise of the ADC (20 bits)
• Floor noise of the sensor
• Dispersion from other noise signals. At the end, I think is more white noise like, I don't see other tones.

I have been reading other articles here, using autocorrelation, Goerthe as well as other solutions like precise measurement of sine wave using ADC that I will definitely try while you answer this question and compare to my actual solution.

For those of you interested to help, even though appreciated, I know having an easy answer that I can copy paste is almost impossible, but I am also really interested in learning about these kind of situations, so I will gladly accept any good book or article recomendations where I can learn more about it, enhance my solution and most of all learn and help other people in a situation close to mine.

EDIT Another things you have suggested me that i will search about:

1. Synchronization of signals.

Things i don't know if they could help:

• Oversampling
• Synchronous Waveform Averaging

I upload these photos to get an idea, not same experiment but you get the point, close to the sources i can get the signal.

But as i get further away, I find it harder to know if there is or not signal (assume i don't care about the intensity of the signal)

• Are you analogically filtering the signal before acquiring it with your ADC? i. e. using a low-pass filter? Don't know the exact noise composition of your arrangement, but you might be picking high frequency noise that you could easily remove. Commented Apr 11, 2023 at 19:43
• Assuming that your signal is of arbitrarily long duration, that the frequency is known exactly, and that neither the transmitter or the receiver's time bases vary at all, then you could just increase your collection interval to any arbitrary length. At some point the resultant coding gain would pick your signal out of the noise. So -- please edit your question to speak to reasons why the tone you receive might not be of long enough duration, or frequency stability etc., or why it might, indeed, be such. Commented Apr 11, 2023 at 22:05
• @TimWescott I will edit it now, thank you so much for the feedback! The signal indeed can be measured for as long as i want (i would rather for it to be less than 1 minute though, and rn i dont have memory for that many samples in the uC i am using). I "could easily" have the same time base. Or at least have a really small delay on it, not doing so rn. The thing here is. Shall i look for as many samples as possible (memory limit) for the FFT? I am creating the Signal, so I could actually do much more, i may be missing a lot of good practices (common knowledge) here i dont know about. Commented Apr 13, 2023 at 9:07
• @AxelMancino, Rn I have 2 systems. One of them i do have indeed a Low pass filter (after a Wheatstone bridge). But i completely forgot about it, so i will check it, I may be able to enhance it. The other, I am using a MEMS that is supposed to have one integrated. However, at the FFT i don't see other tones of noise. What i see is an almost Flat FFT. And to be honest. I know i can reach much further (I should) its not like i am 1Km away. I can guess a variation in the time signal when i have source or not Commented Apr 13, 2023 at 9:27

Assuming we have no synchronization with the source or knowledge of the actual channel over the time of acquisition: the ability to acquire the sinusoid, and the signal to noise ratio of that resulting acquisition, is completely limited by the frequency dispersion of the sinusoid as received (due to the relative phase noise and frequency stability at the transmitter and receiver), the power spectral density of the noise at the receiver, and the inevitable spurious (noise tones) that will exist in addition to the white thermal noise floor, within the bandwidth of that "spread" sinusoid as received.

For this a 20 bit ADC is not really helpful: the quantization noise of the ADC as a noise density in a good receiver with appropriate front-end gain, will be significantly below the receiver front-end noise floor. However it can facilitate shifting receiver functionality such as gain control from the analog to the digital (so consideration to high number of bits is driven by the dynamic range requirements- what is the ratio of strongest signal to minimum discernable signal and how much of that gain control (AGC) is done in the analog?), but that isn't the driver here for optimizing the minimum discernable signal. A target minimum SNR must be specified (this could be derived directly from the minimum acceptable RMS error on the estimate of the amplitude for example), and from that the minimum number of bits is derived with consideration to sampling rate and the averaging details further described below. Any additional bits can then be used in place of analog gain control for varying signal levels.

What is needed is good clocks (transmitter local oscillator, receiver local oscillator and sampling clocks) and an understanding of the temporal changes in the channel. Understanding clearly the relative frequency stability between transmitter and receiver if very helpful in optimizing reception when total observation time is not limited: for short term stability we use to phase noise, and for long term stability if the system / electronics allow sufficient stability, we use the Allan Deviation. Both factors (same underlying process which is the measure of stability of the transmitted sinusoid, as received) effect ultimately how long can we observe a sinusoid to improve the SNR by effectively filtering with a bandpass filter centered on the sinusoid's frequency - the FFT is one example of implementing such a band pass filter.

The signal as received, once effected by the transmitter's clock, receiver's clock and channel variations and dispersion will inevitably drift over time. Since the assumption is the signal is weak ("buried in the noise"), we have no way to actively track that drift in order to remove it (synchronization)- so this will ultimately limit the observation time for which the sinusoid will stay within our bandpass filter. The bandpass filter is necessary to remove the noise, everywhere except where the sinusoid occupies. Consider an extreme (and unfeasible) condition where we send a perfect sinusoid (no phase noise, frequency offsets or drift) over a stationary channel and receive with an equally perfect clock and our receiver noise is strictly amplified white thermal noise (no spurs). Under that condition we can observe as long as we want, and noting that filter bandwidth is the reciprocal of averaging time (averaging is a filter), we can reduce the total noise within the bandwidth that gets narrower and narrower as a trade with observation time. The reality is the system will not be stationary, ultimately phase noise (which becomes in the longer term frequency drift) and channel variations over time will limit the blind observation time. Spurious signals which can be very low will at some point compete with the detection of the sinusoid (but that can also be addressed with good frequency planning in the receiver and not using any signals where intermodulation products can create tones in receiver bands of interest).

That said, my approach would be to review the frequency stability of the transmitter and receiver (improving the sources used to the extent possible/ feasible) as well as the expected temporal variations of the channel. With those parameters understood the Allan Deviation can be used if stability allows for observation times exceeding 1 second and longer. If the system exists, then captures could be made of actual received sinusoids (in much higher SNR conditions, which means closer to the transmitter), and with that data the Allan Deviation can be computed. The floor in the Allan Deviation curve would indicate the maximum observation time for which the SNR can be optimized through effective filtering. This would thoroughly characterize the transmitter and receiver and some of the channel (as the distance between transmitter and receiver increases, the effects of the channel will inevitably increase and will decrease the maximum possible observation time).

The filtering done is correlation with the sine wave specifically, which is a band pass filter and optimum under white noise conditions - this is exactly what we get with an unwindowed FFT with the sine wave on a bin center. However given it is a sine wave, I recommend a simple product and integrate rather than FFT (this is essentially 1 bin of the FFT with fine tuning control). If the frequency is not known an FFT approach may be of interest for "rapid" acquisition (the FFT duration here is still that optimum observation time determined, so rapid in the sense that we can probe multiple possible frequency locations at the same time), and then once acquired (tracking mode) switch the the "one bin" approach with fine control to increase SNR if possible. The signal will inevitably occupy a bandwidth over the time observed, and the equivalent noise bandwidth of the filter when optimized will match this bandwidth and thus provide the maximum signal power compared to the noise power due to the noise density over that same bandwidth.

• First. Thank you! This really proves useful! I have no synchronization as you said, but is something I can implement as I can communicate source and receiver, haven't done so as I have not thought of any advantage. I as well think quantization is not a problem, as I can see a lot of noise in the signal as well as my signal. AGC... Well, I am going back at it, dropped it a bit because I was also amplifying noise, so It didn't bring great result first stage of implementation, now that i want to reach further I am seeing better results by doing it with an analog filter. Commented Apr 13, 2023 at 10:11
• Reconstructing the amplitude would be optimal, but i am fine by knowing if there is a signal at this stage of development, so i guess a low SNR is fine. As far as i know (using top quality lent sensors), there is almost no noise in 10-80Hz in the environment i will be working, so if i am able to synchronize, and may be enhance the way i create the signal, you say i can get a better signal by averaging. Like oscilloscopes do? Never ever thought of Spurious signals, ty so much for teaching me more things. I will search and calculate the Allan Deviation as well as all you suggested. Thank you Commented Apr 13, 2023 at 10:18
• @alexcp the analog filter in front of the ADC is critical to do the anti-alias function and nothing else- the rest you can do digitally and so much better. Multiply your quantized noise with a complex tone of the same frequency ($e^{j \omega t$) and then integrate (accumulate) the result and dump at the end of your observation cycle. Use a threshold detector to detect. Review “probability of false alarm vs probability of detection”. This is the optimum strategy in the presence of white noise. You can’t synchronize with your transmitter without detecting your signal so it’s a catch 22. Commented Apr 13, 2023 at 10:47