Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlutoSDR plugin and FIR decimation #2308

Open
dm6tt opened this issue Nov 3, 2024 · 5 comments
Open

PlutoSDR plugin and FIR decimation #2308

dm6tt opened this issue Nov 3, 2024 · 5 comments

Comments

@dm6tt
Copy link

dm6tt commented Nov 3, 2024

Hi Edouard,
I'm playing around with the PlutoSDR plugin on 7.22.0 an have a question about the FIR decimation.
When enabling the FIR and setting the decimation to 4 I do not encounter a reduction of the ethernet bandwidth on that interface. It stays constant.

Referring to the RX Signal Path section in https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361 the FIR decimation factor can be querried on cli with:
pluto:/sys/bus/iio/devices/iio:device0]# cat rx_path_rates

Example:
Wit disabled FIR:
grafik

Leads to:
[pluto:/sys/bus/iio/devices/iio:device0]# cat rx_path_rates
BBPLL:953601026 ADC:29800032 R2:9933344 R1:4966672 RF:2483336 RXSAMP:2483336

With enabled FIR:
grafik

Leads to:[pluto:/sys/bus/iio/devices/iio:device0]# cat in_voltage_sampling_frequency
2483336

[pluto:/sys/bus/iio/devices/iio:device0]# cat rx_path_rates
BBPLL:1271468041 ADC:79466752 R2:39733376 R1:19866688 RF:9933344 RXSAMP:2483336

In both cases the sampling frequency shows the same value:
[pluto:/sys/bus/iio/devices/iio:device0]# cat in_voltage_sampling_frequency
2483336

I would have expected that the Baseband sampling rate would be decreased with the FIR decimation.

Thanks
Marcus, DM6TT

@f4exb
Copy link
Owner

f4exb commented Nov 4, 2024

That's the AD chip business not SDRangel's. In fact the baseband rate stays constant but the actual sampling frequency of the ADC is higher when decimation is engaged. It shows in the top left corner number below the start/stop button. This displays the actual ADC rate. See: https://github.com/f4exb/sdrangel/tree/master/plugins/samplesource/plutosdrinput#14-adc-sample-rate

This is also shown in the ADC value returned by the cat command.

Note that the actual decimation factor from the ADC value is 2.67 not 4. And relative to the baseband rate this is 12 and 32 respectively. For details please refer to the AD9363/9361 documentation. I suppose there are some limitations on the ADC rate and hence the actual decimation that can be achieved.

@f4exb
Copy link
Owner

f4exb commented Nov 4, 2024

This is actually explained in the link to the AD documentation you gave. In this table:
image
The HW decimation control only controls the decimation of the FIR filter so RF/ RXSAMP and effectively they are the same with a factor of 1: RF:2483336 RXSAMP:2483336 and RF is 4 times RXSAMP when HW decimation is 4: RF:9933344 RXSAMP:2483336 The rest of the chain is not controlled by the user.

This is the calculation for the full decimation chain:

1: BBPLL:953601026  ADC:29800032 R2:9933344  R1:4966672  RF:2483336 RXSAMP:2483336
                                 /3          /2          /2         /1      => /12
4: BBPLL:1271468041 ADC:79466752 R2:39733376 R1:19866688 RF:9933344 RXSAMP:2483336
                                 /2          /2          /2         /4      => /32  

@f4exb
Copy link
Owner

f4exb commented Nov 4, 2024

Note that if the ethernet bandwidth is your concern you may use software decimation.

@dm6tt
Copy link
Author

dm6tt commented Nov 5, 2024

Hi Edouard,
thanks for your answers.
I tested the software decimation, it is no decreasing the bandwidth.
In my opinion the SW decimation is done in SDR Angel plugin and not in the pluto itself, is that right?

I understand out of https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361#rx_signal_path

grafik

that the the FIR decimation is used for decreasing the bandwidth and the smallest one is 520.83 kSPS.
I will do some further tests and come back to you.

Marcus

@dm6tt
Copy link
Author

dm6tt commented Nov 5, 2024

I've done a test with SDR Console with two differnet bandwidth
The Erhernet bandwidth gets here significantly hiher when setting the higer RF Bandwidth:
576KHz:
pluto says:
[pluto:/sys/bus/iio/devices/iio:device0]# cat rx_path_rates
BBPLL:884736002 ADC:27648000 R2:9216000 R1:4608000 RF:2304000 RXSAMP:576000

2.688MHz
pluto says:
[pluto:/sys/bus/iio/devices/iio:device0]# cat rx_path_rates
BBPLL:1032191999 ADC:32255999 R2:10751999 R1:5375999 RF:2687999 RXSAMP:2687999

Since SDR-Conosle hides the internas to the user, I can't say what happens here in detail.
The curcial point in my eyes: The RXSAMP value reflects the choosen Bandwidth and the Ethernet payloads changes as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants