Electronics > Projects, Designs, and Technical Stuff
Signal processing - getting exact frequency from short ADC sample
<< < (11/18) > >>
ogden:

--- Quote from: Marco on December 17, 2019, 03:03:04 pm ---He isn't suggesting just downmixing it, he's suggesting downmixing it by sines in quadrature.

I think after low pass filtering, the phase of the quadrature results treated as a complex vector will give you the frequency shift (side effect of the PM/FM equivalence).

--- End quote ---
Downmixing, then measuring phase do not make any sense - if you can use same (phase) math on carrier directly. To avoid gigantic phase numbers that multiple times exceeds 2*PI you do not need to use downmixing. Just use your head.
Marco:
You can, but at least for low SNR signals you can't get near the error bound with a weighted linear predictor. I'm not sure the quadrature mixer method can of course.

I'm also not sure how relevant using near optimal algorithms is at high SNR.
ogden:

--- Quote from: Marco on December 17, 2019, 04:22:53 pm ---You can, but at least for low SNR signals you can't get near the error bound with a weighted linear predictor. I'm not sure the quadrature mixer method can of course.

--- End quote ---
If you signal is noisy - apply filter.
Berni:

--- Quote from: ogden on December 17, 2019, 02:31:21 pm ---
--- Quote from: Berni on December 16, 2019, 06:42:36 am ---But still i think OP is looking at the problem from the wrong direction. If you use a quadrature mixer to convert the 100.1KHz signal down to a pair of 100Hz signals things get a lot easier (Its essentially a software defined radio at this point). Not only is this computationally cheap to do, but unlike his method of taking 1 second long 1MSPS recordings of the signal and processing them later, this downconversion method can also operate continuously on a signal, giving you a result on every sample rather than just one sample per second.

--- End quote ---
I am afraid that you drive OP into wrong direction as well. Estimating precise frequency of downmixed 100Hz do not seem to be simpler than just counting zero crossings of "carrier".

--- End quote ---

I am not saying it is simpler than counting zero crossings. Im saying that doing it using downconversion offers a lot of advantages like being computationally cheap, resilient to noise, offering a lot of measurements per second, able to work on very short captures of the signal (few ms rather than needing a full second of data), able to continuously pipeline data trough it rather than process it as one by one 1 second long recordings. All of that while providing well under 1 Hz resolution and involving only high school level math. Im sure there plenty more advanced ways to do this that might perform even better, but this one has quite a lot of pros versus cons.


--- Quote from: ogden on December 17, 2019, 03:22:00 pm ---Downmixing, then measuring phase do not make any sense - if you can use same (phase) math on carrier directly. To avoid gigantic phase numbers that multiple times exceeds 2*PI you do not need to use downmixing. Just use your head.

--- End quote ---

The point of down-mixing here is as Marco said is to easily convert the real input signal into a pair of quadrature I/Q signals. Advantage of these quadrature signals being that its possible to compute the phase by looking at just 1 sample. No need to see a zero crossing, pick any random point on the sinewave and just look at that  one sample and you will know the exact phase of it by using trigonometry. Its not the only way to get a I/Q signal from it but its a pretty attractive one because choosing a carrier frequency that is close lets you downsample the signal afterwards, as a result reducing your computational requirements while retaining the accuracy and noise resilience. Since phase and frequency are bound together by time means if you know the phase in two spots you also know the frequency. You can chose these two points anywhere along the data, the farther apart you place them the more area you will average between them and the more resolution and noise resilience you have (Tho you do have to phase unwrap the signal since it jumps back around at 360 deg)

What method do you propose as being better or simpler than this?
Kleinstein:
The down-mixing with a quadrature mixer is mathematical similar to the Hilbert transformation. It can be a relative fast (less computational effort) way and can still be close to the optimum, at least for longer data sets. The reduced data volume is only second to getting the phase information. However there no need to get the phase information for really every point of the original data set. The phase data are smoothed anyway. So one could as well use the reduced number of points without loosing much information.
A nice point about the down mixing is that this part can be done while the data are coming in and there is no need to store to whole data set. This is not so relevant here with a short data set, but it can be with 1 second or more at 1MSPS.

The down conversion method is also quite simple, especially with a background from EE.
The full nonlinear fit gets a better result, but with more effort. The math behind it is still not that complicated. Finding an efficient algorithm can be some extra effort.

Filtering can remove out of band noise, but many of the methods discussed here (least square fit, Hilber transformation / down mixing and FFT and interpolation) are not sensitive to out of band noise anyway. So with these method an extra filtering run does not help or change a thing.

Even with relatively good data the SNR can be relevant, as noise in the input data translates to noise in the frequency reading. From the Fit data it takes at least some 80 dB SNR to get 1 ppm frequency resolution or 60 dB to get the 0.1 Hz target. There is a point at rather low SNR that some of the methods may fail and could produce biased or totally off values. This tends to happen when the noise is no longer a small distortion in the linear range. So one might miss whole periods or see ambiguities in  2 pi steps in the phase.
From the linked paper about FFT interpolation methods it looks like not so good method add a more or less constant factor to the noise, e.g. giving 2 or 3 times the frequency noise of the near optimum ML estimate.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod