discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Display frequency from transient plot.


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:
Thank you for the suggestions.  I do in fact come from a very analog background, I have implemented many frequency counters in micro's, so I am thinking in this way.  I will try the suggestions on FFT/frequency sinks. 

On Thu, May 12, 2016 at 4:58 PM, Marcus Müller <address@hidden> wrote:
By the way, I can barely decipher your screenshot. I strongly recommend using the screenshot functionality of your operating system instead of using a camera to digitize the analog lightwaves that were generated from a screen that converted the digital picture to light...
that being said, I don't really understand your question
The time between rise and fall is known since it is plotting it on the time axis,
So: What is the very definition of "frequency"? Right, it's the rate at which a periodic thing happens.
so you measure the time distance between two rising edges, and do 1/that, and instantly have the frequency.
That's a very "analog measurement device" or "cycle counting" way of doing this.
oscilloscope calculates and displays a frequency number.
Hm. What do *you* think the oscilloscope does?
Dan's recommendation was absolutely on-spot. Use a spectrum/fft sink. If you don't understand what "spectrum" is, read a bit wikipedia :) That's really the easiest way I could think of.
Other than that, read up on autocorrelation, and how to calculate it in a DSP system.

Best regards,
Marcus

On 12.05.2016 22:38, Rob Croce wrote:
OK thanks.  I just need to display a number for the frequency of the pulses.  The time between rise and fall is known since it is plotting it on the time axis, so I am wondering if there is anyway I can extract frequency that way.  Similar to frequency counting on a micro, or how an oscilloscope calculates and displays a frequency number.

On Thu, May 12, 2016 at 4:30 PM, Dan CaJacob <address@hidden> wrote:
I would need more details about what you're trying to accomplish, but my first reaction would be to attach an FFT GUI sink.

On Thu, May 12, 2016 at 4:26 PM Rob Croce <address@hidden> wrote:
Hi all.  I have transient pulses that I am displaying using the transient plot, and I am wondering how I can display the frequency of the pulses.  The duty cycle is similar for all pulses, just the frequency is varying.  Is there a simple way to do this?  




_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
Very Respectfully,

Dan CaJacob



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



Attachment: test_frequency_counter.grc
Description: application/gnuradio-grc


reply via email to

[Prev in Thread] Current Thread [Next in Thread]