What is the output frequency resolution?

Just about everything about Red Pitaya
Post Reply
mrmatthews
Posts: 15
Joined: Fri Jan 27, 2023 5:43 pm

What is the output frequency resolution?

Post by mrmatthews » Fri Jun 02, 2023 10:04 pm

Frequency resolution is the step size I can change the output frequency (not the 14 bit ADC or DAC amplitude resolution). What is this for the RP?
I'm estimating it is based on the change of 1 clock period over 1 period of oscillation, assuming the DDS module constructs a repeating cycle of 1 period. So one clock tc = 1/125MHz = 8 ns. If the generated frequency is f = 1/T, a change of T by tc means the frequency change will be about df = 1/T^2 * tc, or df = f^2 * tc.
For example, if I want to generate something near 1 MHz, the resolution of that is 8 kHz.
Is this correct?

Bulova
Posts: 111
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: What is the output frequency resolution?

Post by Bulova » Sat Jun 03, 2023 5:54 pm

Hello,

no, for instance for 1 MHz output you even can set the frequency in a resolution of 1 Hz. It is not limited by the basic clock frequency. You can try it by display two independent signals in a beat, displayed in a two channel scope. You even could do this by the RP itself.

Dieter

juretrn
Posts: 104
Joined: Tue Nov 16, 2021 11:38 am

Re: What is the output frequency resolution?

Post by juretrn » Sun Jun 04, 2023 9:34 pm

The original implementation had a 30 bit read pointer that was being used to read a 2^14 deep buffer, which contains one period of the signal. which I believe resulted in a resolution of 0.11 Hz at 125 MHz DAC clock. Recently, we have added an extra 32 bits to this logic, so let's say the new resolution is about 2.6*10^-11 Hz.

mrmatthews
Posts: 15
Joined: Fri Jan 27, 2023 5:43 pm

Re: What is the output frequency resolution?

Post by mrmatthews » Mon Jun 05, 2023 6:00 pm

Thanks for the info. Dieter, using the beat signal is indeed how I discovered the mismatch: Setting one output to 100kHz and the other to 50kHz shows a slow walk between them. Unfortunately most of the applications that come with the RP do not allow setting the frequency to a resolution below 1Hz (the oscilloscope and the spectrum analyzer). I'll try sending sending SCPI to find my desired frequencies.
Still, it would be useful if I had an analytic form for the exact available frequencies (relative to the 125 MHz clock or something else).

Bulova
Posts: 111
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: What is the output frequency resolution?

Post by Bulova » Tue Jun 06, 2023 9:07 am

Hello MRMATHEWS,

I did some experimentals:

Analog oscilloscope connected to the RP outputs and using the app Oscilloscope & Generator.

Setting CH1 output to 100 kHz and CH2 to 50 kHz (like you did), there is a slow beat of about 0,1 Hz. If you try to input decimals upon the 100 kHz, you will get discrete values in a sted grid of 7,812 mHz, 15,625 mHz etc. With these you will get absolute synchronized channels (phase stiff). As soon as you input 100000,125, the beat goes the other direction than before with exact 100000, that means -0,1 Hz. Every point in between generates phase stiffness.
Next experiment: CH1 1000 kHz, CH2 500 kHz. Then you have to trim both values to get phase stiffness: CH1 = 1000 000,125 and CH2 = 500 000,03125.

I am not sure how to get the right correlation for the "right" pairs of frequencies. But anyway, it seems that some input values are rounded even without any difference, and the real frequency defining register values (which certainly are modified from those which are put in) decide whether or not the signals can be phase stiff. That is for the moment all I found by experiments. It is interesting, and I certainly want to know the functional context for my own projects as well.

Good day,

Dieter

Bulova
Posts: 111
Joined: Fri Jan 09, 2015 6:07 pm
Location: Babenhausen/Germany

Re: What is the output frequency resolution?

Post by Bulova » Tue Jun 06, 2023 2:49 pm

Hello,

in the RP there must be an algorithm which performs a DDS.

If one frequency f1 is wished and another frequency f2 (phase stiffed) with an integer multiplicator n is wanted, then you can calculate it:

Res = 125*10^6/2^30 (in fact this is the frequency resolution)

R1 ≈ f1 / Res (R1 must be rounded to integer)

f2 = R1*n*Res

It's an optimal value, allowed narrow values are possible as well. Exact same values f1 and f2 are naturally possible too, as they produce identical register values.

I also have a small Excel sheet for this.

I tried it with some sample pairs of frequencies.

Dieter

juretrn
Posts: 104
Joined: Tue Nov 16, 2021 11:38 am

Re: What is the output frequency resolution?

Post by juretrn » Tue Jun 06, 2023 3:13 pm

Yes, the DAC module performs DDS signal generation.
I have described the general principle in my previous post.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 27 guests