UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
86 Views
Registered: ‎02-10-2019

frequency measurement using XADC IP

How to measure frequency using XADC IP and print on the COM PORT . Please help me and guide me.

0 Kudos
2 Replies
Scholar drjohnsmith
Scholar
75 Views
Registered: ‎07-09-2009

Re: frequency measurement using XADC IP

thats a very wide questoin,

   basicaly you learn to program, you learn to code, you learn how to use the board, ( assuming you dont have to make a board first )

Give us a clue, what can yo udo , what have you doen, what do yo have , what support do you have ?

 

 

0 Kudos
Explorer
Explorer
63 Views
Registered: ‎05-21-2015

Re: frequency measurement using XADC IP

uday84666@gmail.com,

Measuring frequency ... seems pretty easy, doesn't it?

If x(t) = e^j2pi ft, then x(t)x*(t-d) = e^j2pi df, for any constant delay.  All you then need to do is simply do an arctangent of the result and scale it to get the frequency.  This sounds pretty easy, but the devil is in the details.  What happens, for example, if x(t) also contains noise within it?  Squaring noise only makes the noise worse, not better.  Sure, you can filter the signal first to get rid of the noise, but that only works if you know roughly where the frequency of interest is first.

When you find such operations unsatisfactory, you might wish to turn to statistics.  The "maximum likelihood frequency estimator" is basically an FFT (with no windowing, but lots of zero padding) followed by magnitude squaring all of the results, finding the peak, and then applying some kind of interpolation to find the center of the peak. Quadratic interpolation works quite well for this task.

Again, if life were only that easy.

The problem with both of the above approaches is reality: It's rare that you will ever find a single sine wave in a field of additive white Gaussian noise.  In voice applications or music applications, for example, the incoming signal is not a single tone, but rather a fundamental with many harmonics on top of it.  (Assuming you have one tone in the first place, trying to tune an instrument in the middle of an ensemble is a challenge.)  In RF signal applications, the signal of interest may be surrounded by other signals you don't care about--such as the returns from the next satellite already coming over the horizon.  In carrier recovery applications, the frequency of interest is often only created by a squaring operation, which increases the noise of things around it.  Each of these situations requires a different frequency estimation method.

For example, when working with music, I've often found it useful to first calculate an autocorrelation, and then look for the peak of the autocorrelation as an indication of which frequency among many was the fundamental.

Filtering also plays a key role in separating the other incoming data from the single frequency of interest.  Filtering, however, only really works when/if you know what frequency range you might be interested in.  Filtering also suffers from latency, so you might find a filtered solution unacceptable for low latency control operations.

Sometimes when demodulating an incoming signal, it can help to use an FFT based method to get an initial carrier phase and frequency estimate which you then follow by some form of tracking method such as a PLL.  Since the FFT tends to have a lot of latency, you may have to place the whole signal signal into a delay line of sorts, until the frequency of the carrier and the presence of the signal have first been determined--just to make certain that the determined frequency and phase still match the signal when you are done with your calculation.  While I've done this before, the design is tricky to get right.  The delay might have to be very carefully measured, with other things depending upon it.  Similarly, the bandwidth of the PLL plays a large role in accurately matching the frequency of the incoming tone as well.

My whole point is that the answer to your question is really an "it depends."  There is no one-size fits all solution for all applications.  Tell us your application, and what you want to accomplish, and I'm sure we can have a longer discussion about how to go about it.

Dan

0 Kudos