Undersampling with the Red Pitaya

Just about everything about Red Pitaya
Post Reply
Dazza101
Posts: 6
Joined: Fri Feb 05, 2016 9:57 am
Location: Cape Town, South Africa

Undersampling with the Red Pitaya

Post by Dazza101 » Wed Aug 02, 2017 8:53 am

Hi All,

I'm working on an FMCW radar that uses the Red Pitaya for control and as the ADC. I'm using the provided C API and a decimation factor of 8, to perform undersampling in the second Nyquist band.
As my signal increases past Fs/2 my signal amplitude begins to drop drastically. For example: a 10 MHz 2 Vpp signal appears as 0.8 Vpp once sampled. All my development work takes place in C and I have yet to fiddle with the FPGA. I'm wondering if the Red Pitaya applies some sort of digital frequency compensation based on the set decimation factor? And If I could disable or correct this?

Kind Regards
Darryn

jeanminet
Posts: 33
Joined: Tue Aug 25, 2015 12:17 pm
Contact:

Re: Undersampling with the Red Pitaya

Post by jeanminet » Wed Aug 02, 2017 5:39 pm

Hi,

Maybe the decimation includes the averaging of the 8 consecutive samples in the FPGA.
The frequency response of the averaging is sin(x)/x where x = pi * 8 * f / 125 MHz.
That gives 0.9 Vpp for a 10 MHz, 2 Vpp signal.

Looking at the corresponding Verilog module (https://github.com/RedPitaya/RedPitaya/ ... dec_avg.sv), it looks like you can disable averaging.

Jean

Dazza101
Posts: 6
Joined: Fri Feb 05, 2016 9:57 am
Location: Cape Town, South Africa

Re: Undersampling with the Red Pitaya

Post by Dazza101 » Wed Aug 02, 2017 9:34 pm

Hi Jean!

Thank you for your reply! I think you are exactly right - I hadn't considered the effect of averaging.
I've attached the theoretical frequency response of an 8-point moving average, which appears to correspond to my recordings.
I'll test with other frequencies when I have access to my RP tomorrow.

Kind Regards
Darryn
You do not have the required permissions to view the files attached to this post.

smwright
Posts: 4
Joined: Tue Jun 23, 2015 8:26 pm

Re: Undersampling with the Red Pitaya

Post by smwright » Thu Aug 05, 2021 6:05 am

This was helpful, I am also trying to undersample, but using python. It there a way to turn OFF the averaging? Other posts explained that the SCPI commands for AVG are not supported. There is a post from 2015 that refers to an FPGA register that shuts it off using the monitor utility, but this did not work. Please, is there anyway to disable averaging when using remote control (python w/ scpi commands) when decimating, otherwise it is impossible to undersample.

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