analogdevicesinc / ad936x-filter-wizard

MATLAB-based FIR filter design
Other
50 stars 40 forks source link

How to setup a Matlab comm.SDRTxAD936x with an .ftr file ? #46

Closed cyber-g closed 10 months ago

cyber-g commented 10 months ago

Hi, some pre-computed filters are available as .ftr files at: iio-oscilloscope/filters at master · analogdevicesinc/iio-oscilloscope.

My main question is about how to setup the comm.SDRTxAD936x or the comm.SDRRxAD936x instance object to load those .ftr files.

The sdrtx()and sdrrx() do not provide any function to load it.

As a workaround, I also started to investigate this from starting from scratch with the filter design specs (like Apass, Astop, etc...). I figured out how to use the design_filter() to get the filter structure and I also successfully implemented the export as .ftr based on what is done in the GUI wizard. Based on this, I wanted to reuse what is done in save2target_Callback but the core part is based on handles.libiio_ctrl_dev which I cannot get from my comm.SDRTxAD936x object.

I also considered using the Wizard with input arguments like:

AD9361_Filter_Wizard( 'remote',TX_IPADDRESS,...
                        'PathConfig','either',...
                        'DefaultRxVals',fdp,...
                        'DefaultTxVals',fdp);

where fdp is obtained with cook_input(). But it only opens the GUI, I still have to click on the buttons to either design the filter and upload to target.

So, how should I configure the comm.SDRTxAD936x to use a pre-computed filter programmatically ?

tfcollins commented 10 months ago

You can't use ftr files with the MathWorks authored system objects. They ignored that standard. You would need to use the ADI alternative adi.AD936X.Rx and Tx

cyber-g commented 10 months ago

Thank you for the clarification. You have my warmest thanks; I was totally stuck on the issue.