|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] Display frequency from transient plot. |
Date: | Fri, 13 May 2016 16:26:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Hi Rob, hope I didn't come on too cross yesterday; of course, the frequency counting method works just as well, if you know your edges are sharp and you can pinpoint a certain threshold. I come from a very SDR-y background myself, and so I always presume your signal quality will need significant rework until you can just measure the distance between two rising edges. And instead of doing that, I'd just look for the peak in the FFT (or do a parametric frequency estimation, or something else – more often than not, the optimum way either depends heavily on the model of your signal, or it's not even easy to find one optimal method, because many methods work). That being said: You could implement your own frequency counter. In fact, doing so can be extremely simple: You could simply count the number of edges during e.g. one moving average period. The idea would then be to convert your edges to single-sample impulses; to do that, I'd high-pass your input signal; in fact, a filter that just subtracts the last sample from the current one (taps=1,-1) will do just fine for sharp edges (use an optimized (=bandpass?) filter and/or a schmitt trigger (the Threshold block acts like on) before that filter if your signal doesn't work like that ). Since we only care about rising edges, let's cut off all the negative edges by using a Threshold block, and then sum everything up using the "moving average" block (which I think we should rename to "running sum"): Best regards, Marcus On 13.05.2016 14:37, Rob Croce wrote:
|
test_frequency_counter.grc
Description: application/gnuradio-grc
[Prev in Thread] | Current Thread | [Next in Thread] |