Pavel Demin SDR receiver tuning

Applications, development tools, FPGA, C, WEB
Post Reply
kpjamro
Posts: 6
Joined: Fri Dec 03, 2021 2:59 am

Pavel Demin SDR receiver tuning

Post by kpjamro » Sat Dec 11, 2021 4:29 am

I have a question about using the SDR receiver with RP 122-16.
What is the smallest tuning step (resolution of tuning) when using Power SDR, for example.

Step size should be the clock frequency divided by the size of the frequency tuning word sent to the NCO (size is 2^N where N is the number of bits in the tuning word).

For example with a 32-bit tuning word and a 122.88 MHz clock the tuning steps would be 0.028591... Hz

Normally there is some offset between the tuned frequency and the received frequency.

These two things (offset and the nearest integer value of the tuning word) can be used to calculate what the *actual* (precise) frequency is for any frequency displayed in PowerSDR.

Hopefully someone knows what I am talking about and can help with this.

Thanks
Ken

kpjamro
Posts: 6
Joined: Fri Dec 03, 2021 2:59 am

Re: Pavel Demin SDR receiver tuning

Post by kpjamro » Sun Dec 12, 2021 6:48 pm

ok here I am answering my own question (again)

Looking in the C code for the receiver I found:
*rx_freq = (uint32_t)floor(600000 / 122.88e6 * (1 << 30) + 0.5);

so it's a 32-bit tuning word - I don't see anything that looks like an offset though.

If I do the calc indicated for desired frequencies of 7 050 000 Hz and 7 050 001 Hz (for example) I get tuning words of 61 603 840 and 61 603 849 respectively, so a shift of 9 "counts".

(9/61603840)*7050000 = 1.029968... (Hz)
so this tuning step is about 30 milli-Hertz bigger than needed. Other "1 Hz" steps will be smaller or larger than 1 Hertz, so on average it comes out right.

If there is no offset involved, this can be turned into a formula to get the exact frequency from the "dial frequency" - the frequency in the SDR GUI.

Ken

PS: as it happens, 7 050 000 is one of the "magic frequencies" that you can his square-on with the numeric scheme used.

pavel
Posts: 798
Joined: Sat May 23, 2015 5:22 pm

Re: Pavel Demin SDR receiver tuning

Post by pavel » Sun Dec 12, 2021 9:03 pm

As far as I know, PowerSDR mRX PS has built-in frequency calibration. So, frequency calibration and frequency correction both occur in PowerSDR mRX PS, and not in the code running on the Red Pitaya board.

kpjamro
Posts: 6
Joined: Fri Dec 03, 2021 2:59 am

Re: Pavel Demin SDR receiver tuning

Post by kpjamro » Sun Dec 12, 2021 11:08 pm

In my application, no calibration should be needed - nor is it wanted. I am using an external clock with the RP and (when I get it working) the clock should be well within 1E-10. So that should put the receive frequency within 0.7 milli-Hertz at 7 MHz, for example.

The issue is that the tuning steps are NOT exact multiples of 1 Hz and only rarely will land on the exact value. The amount of difference between the displayed frequency and the actual frequency varies pseudo-randomly, as you tune up and down, by as much as 30 milli-Hertz. This is a bigger error than my time base so I want to correct for it. No "calibration" can fix this. You need a formula, or a look-up table.

The part I am missing is the offset - if there is one. I know that - with the old TAPR HPSDR - the receiver board was actually tuned to 11 kHz above the desired frequency and the IF in PowerSDR was offset 11 kHz too. This was done to avoid using sidebands close to the clock frequency where you would find a high noise level. It may not be needed with all types of SDR schemes - outside my knowledge level ;-)

From the C-code it looks like you take whatever Power SDR is telling you and tune the receiver to the closest frequency tuning word. I guess the question then is: does power SDR send you the same frequency that is displayed on the GUI? Or do they offset it?

So - even though you did not understand my question, you have pointed me in the right direction: the answer about the offset is inside the Power SDR program. I need to find someone who knows about that.

Many thanks for all your work on the RP software!

Thanks
Ken

pavel
Posts: 798
Joined: Sat May 23, 2015 5:22 pm

Re: Pavel Demin SDR receiver tuning

Post by pavel » Mon Dec 13, 2021 12:03 am

I guess the question then is: does power SDR send you the same frequency that is displayed on the GUI? Or do they offset it?
By default, PowerSDR mRX PS sends the same frequency as displayed.

kpjamro
Posts: 6
Joined: Fri Dec 03, 2021 2:59 am

Re: Pavel Demin SDR receiver tuning

Post by kpjamro » Mon Dec 13, 2021 3:44 pm

OK - that simplifies things a bit. I note that this was not the case when working with TAPR HPSDR and that is why I asked.

I hope to verify this with actual tests over the upcoming holidays.

Thanks again

Ken

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 13 guests