I don't know if it's related but I also noticed some strange behavior of the CIC filter with programmable decimation rate when the rate is set to the maximum value. Setting the MAXIMUM_RATE parameter to twice the maximum rate required for my application solved the problem. For example, here is a commit where I applied this kind of workaround:
https://github.com/pavel-demin/red-pita ... 37dc4c1a09
May I have a look at your version of block_design.tcl?
Acquire long signal with DMA on triggered input?
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
-
- Posts: 8
- Joined: Thu Oct 15, 2015 9:59 am
Re: Acquire long signal with DMA on triggered input?
I haven't even thought of that. The plot from before is from a block_design with fixed decimation rate as I figured that it would be better to first get reasonable results for that before adding user configurable options. You can find my block_design.tcl on https://github.com/ritterasdf/red-pitay ... design.tcl, however, it is mostly an exact copy of your adc_recorder_trigger except for an increased decimation in the fir filter. And even when leaving the fir decimation at a factor of 2 and increasing the cic to 64, the result looks the same (or even a little worse).pavel wrote:I don't know if it's related but I also noticed some strange behavior of the CIC filter with programmable decimation rate when the rate is set to the maximum value. Setting the MAXIMUM_RATE parameter to twice the maximum rate required for my application solved the problem. For example, here is a commit where I applied this kind of workaround:
https://github.com/pavel-demin/red-pita ... 37dc4c1a09
May I have a look at your version of block_design.tcl?
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: Acquire long signal with DMA on triggered input?
Then it would be interesting to make a recording without any filtering and check if the overshoots are still there.
When you check the signal with the Red Pitaya oscilloscope application, do you switch off "Averaging".
When you check the signal with the Red Pitaya oscilloscope application, do you switch off "Averaging".
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: Acquire long signal with DMA on triggered input?
I've just added a possibility to set the decimation factor in adc-recorder-trigger. The resulting sample rate can vary from 20 kSPS to 12.5 MSPS.
By default, the max. number of recorded samples is 8M.
To be able to record more samples, the boot.bin and devicetree.dtb files should be modified with the following commands:
By default, the max. number of recorded samples is 8M.
To be able to record more samples, the boot.bin and devicetree.dtb files should be modified with the following commands:
Code: Select all
for file in `grep -l 1E000000 patches/*` ; do echo $file ; sed -i 's/1E000000/08000000/g' $file ; done
sed -i 's/480/128/g' patches/zynq_red_pitaya.h
rm -rf tmp/u-boot-xlnx-xilinx-v2015.3 tmp/red_pitaya_0_92.tree
make NAME=red_pitaya_0_92 boot.bin devicetree.dtb
-
- Posts: 8
- Joined: Thu Oct 15, 2015 9:59 am
Re: Acquire long signal with DMA on triggered input?
Thanks for that, pavel. Most of this functionality I have previously implemented already but not used so far. When looking at the fir.r that you supplied, I think I know where the oscillations come from. The FIR filter seems to amplify high frequencies quite dramatically leading to an overshoot at fast rising and falling edges. Can you tell me what the FIR filter is even used for? I know that it downsamples by a factor of 2 but is this necessary because of the way the CIC is implemented?pavel wrote:I've just added a possibility to set the decimation factor in adc-recorder-trigger. The resulting sample rate can vary from 20 kSPS to 12.5 MSPS.
By default, the max. number of recorded samples is 8M.
To be able to record more samples, the boot.bin and devicetree.dtb files should be modified with the following commands:Code: Select all
for file in `grep -l 1E000000 patches/*` ; do echo $file ; sed -i 's/1E000000/08000000/g' $file ; done sed -i 's/480/128/g' patches/zynq_red_pitaya.h rm -rf tmp/u-boot-xlnx-xilinx-v2015.3 tmp/red_pitaya_0_92.tree make NAME=red_pitaya_0_92 boot.bin devicetree.dtb
I used the example as is as well as with a higher decimation factor and the edges of the signal still look identical to before.
-
- Posts: 799
- Joined: Sat May 23, 2015 5:22 pm
Re: Acquire long signal with DMA on triggered input?
The FIR filter compensates for the drop in the CIC filter frequency response, filters out high frequencies and downsamples by a factor of two.
The code that I use to calculate the FIR filter coefficient is based on the MATLAB examples that can be found on the web and in the Altera's filter design scripts and notes:
https://www.altera.com/literature/an/an455.pdf
http://www.dsprelated.com/showcode/8.php
The combined (CIC and FIR) filter frequency response is flat. There is a figure on the SDR receiver page showing the combined frequency response:
If the flat frequency response is not required in your application, just remove the FIR filter.
The code that I use to calculate the FIR filter coefficient is based on the MATLAB examples that can be found on the web and in the Altera's filter design scripts and notes:
https://www.altera.com/literature/an/an455.pdf
http://www.dsprelated.com/showcode/8.php
The combined (CIC and FIR) filter frequency response is flat. There is a figure on the SDR receiver page showing the combined frequency response:
If the flat frequency response is not required in your application, just remove the FIR filter.
-
- Posts: 8
- Joined: Thu Oct 15, 2015 9:59 am
Re: Acquire long signal with DMA on triggered input?
Thanks for the references, I was blatantly unaware of the transmission characteristics of the CIC filters. Having well-matched FIR coefficients makes it even stranger that I am seeing huge overshoots on fast rises as these should be thoroughly filtered out.pavel wrote:The FIR filter compensates for the drop in the CIC filter frequency response, filters out high frequencies and downsamples by a factor of two.
The code that I use to calculate the FIR filter coefficient is based on the MATLAB examples that can be found on the web and in the Altera's filter design scripts and notes:
https://www.altera.com/literature/an/an455.pdf
http://www.dsprelated.com/showcode/8.php
The combined (CIC and FIR) filter frequency response is flat. There is a figure on the SDR receiver page showing the combined frequency response:
If the flat frequency response is not required in your application, just remove the FIR filter.
Sadly, my application needs a very flat frequency response as I am using your code to remotely acquire long signals on a trigger in an oscilloscope application.
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 85 guests