Timeline for Most efficient way to find single dominant frequency (without amplitude) in analog signal
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 15, 2021 at 11:34 | comment | added | Marcus Müller | nothing wrong with doing e.g. a FFT in the background (I mean, you've spent these LUTs/slices anyway, why not use them) and continuously check whether the bin with the highest power is still the one that your PLL operates in :) | |
Feb 15, 2021 at 11:29 | comment | added | tobalt | thanks for the additional thoughts. My initial PLL didnt work well because there were no adaptive gains (and possibly another bug). To catch really far-off frequencies, even wide bandwidth PLL don't work well, as stated in my reply to Dan's answer. So either do I need to set stricter behavioral bounds for the reference or use a global search method like FFT or MUSIC to kickstart the PLL. | |
Feb 15, 2021 at 10:04 | comment | added | Marcus Müller | But: if the PLL works well for you, why not stick with it? You could run multiple PLLs in parallel, with different loop bandwidths, so that you notice when your "finest" low-bandwidth PLL locks to the wrong peak. | |
Feb 15, 2021 at 10:03 | comment | added | Marcus Müller | one thing I forgot to mention is that $\mathbf R$ is hermetian, so you only need the upper right triangle of its entries. Oh, and you only calculate it once every 3 samples, so that's an amortized 2 MUL/sample. Re: FPGA: I have thoughts! One of them being that you might want an algorithm that's well pipelinable, and if you do a zoom-in FFT operation, you'll need to replicate the FFT units, or you're blocking them for the duration of the recursive operation, right? That might lead to need for complex buffering on the input side, but my guess is that's solvable. | |
Feb 15, 2021 at 9:50 | comment | added | tobalt | for the "loop filter" part I can get away using only power-of-two coefficients to make a cheapo IIR, so I need only shifts and ADDs. This is for an FPGA, so saving actual MULs is a good. The same could be true for the calculations in MUSIC, but I didn't experiment with it. PLL and MUSIC sure have very different pros/cons. Why I considered the cheap 8 sample FFT, is to get me close to where the PLL can lock after doing it 2-3 times recursively to zoom in on the dominant bin. I will still study and understand MUSIC better, but for the present application, the PLL seems to serve me well. | |
Feb 15, 2021 at 9:39 | comment | added | Marcus Müller | @tobalt re: FFT vs MUSIC: no, the FFT will probably be lower in CPU consumption, but an N-Point FFT gives you Nyquist/N in frequency resolution. ROOT-MUSIC gives you the exact frequency (of course, estimator variance due to noisy signal still applies). | |
Feb 15, 2021 at 9:36 | comment | added | Marcus Müller | @tobalt First of all, your PLL needs more MULs per sample, unless you don't have a loop filter (and that would be bad). Aside from that, you're comparing the PLL, which doesn't look at the whole spectrum, but only at the "surroundings" of where it currently is in phase, to a method that can find an arbitrary dominant frequency, so I'm not sure this comparison is overly fair! But you've noticed that yourself. Often, in highly energy-optimized systems, this is the point where people just switch between different methods after detecting they might be in a situation where the current method fails. | |
Feb 15, 2021 at 8:02 | comment | added | tobalt | I tried to read up a bit on this topic, but from first glance it appears very computationally intense compared to adaptive PLL. Is that correct or did I misunderstand some part. E.g. for n=3 your step number (1.) would encompass already 9 MULs per sample just to compute R_XX. I realize some of these are just squares, but still. Compare this to two MULs (in-phase and quadrature) per sample for the PLL. Another story might be finding far-off reference frequencies. Is this MUSIC generally cheaper than say an 8 sample FFT ? | |
Feb 11, 2021 at 13:38 | comment | added | tobalt | Thanks for the unconventional method. I will need some time to think it through and implement it. I will get back eventually with results :) At the very least I will learn a lot. | |
Feb 11, 2021 at 13:36 | history | edited | Marcus Müller | CC BY-SA 4.0 |
added 4 characters in body
|
Feb 11, 2021 at 13:25 | history | answered | Marcus Müller | CC BY-SA 4.0 |