acquirefft command-line utility
-
- Posts: 34
- Joined: Wed Jun 25, 2014 11:38 pm
acquirefft command-line utility
More fun,
acquirefft is command-line utility for frequency domain analysis, here in the /Test/ directory:
https://github.com/edgo914/RedPitaya
This utility is a curious merge of acquire and the guts of the Spectrum Analyzer application's FFT routines
The output is sent to stdout as a single column of dBm values.
You may set the Channel, Decimation, and Binning values like so:
redpitaya> ./acquirefft
Usage: ./acquirefft CH DEC BIN
CH Channel [1,2]
DEC Decimation [1,8,64,1024,8192,65536]
BIN Binning [1,2,4,8,16,32,64,128,256]
Number of frequency domain values returned is 8192 / Binning
The Spectrum Analyzer app essentially has hard-coded binning value of 4, so it always returns 2048 values, good for a web display. acquirefft has more binning flexibility, for your entertainment.
I did not remove the waterfall code, it is there but commented out in various places. An industrious individual in need of this functionality might figure out how to use it.
To build:
$ make CROSS_COMPILE=arm-linux-gnueabi- clean all
cheers,
edgo
acquirefft is command-line utility for frequency domain analysis, here in the /Test/ directory:
https://github.com/edgo914/RedPitaya
This utility is a curious merge of acquire and the guts of the Spectrum Analyzer application's FFT routines
The output is sent to stdout as a single column of dBm values.
You may set the Channel, Decimation, and Binning values like so:
redpitaya> ./acquirefft
Usage: ./acquirefft CH DEC BIN
CH Channel [1,2]
DEC Decimation [1,8,64,1024,8192,65536]
BIN Binning [1,2,4,8,16,32,64,128,256]
Number of frequency domain values returned is 8192 / Binning
The Spectrum Analyzer app essentially has hard-coded binning value of 4, so it always returns 2048 values, good for a web display. acquirefft has more binning flexibility, for your entertainment.
I did not remove the waterfall code, it is there but commented out in various places. An industrious individual in need of this functionality might figure out how to use it.
To build:
$ make CROSS_COMPILE=arm-linux-gnueabi- clean all
cheers,
edgo
-
- Posts: 34
- Joined: Wed Jun 25, 2014 11:38 pm
Re: acquirefft command-line utility
I have just updated acquirefft to not use the default Equalization Filter Coefficients. This was causing a slight voltage offset to be reported incorrectly. Thanks to Nils for helping me dig this one out.
https://github.com/edgo914/RedPitaya/tr ... acquirefft
https://github.com/edgo914/RedPitaya/tr ... acquirefft
-
- Posts: 26
- Joined: Wed Jun 10, 2015 1:40 pm
- Location: United States
Re: acquirefft command-line utility
Can this be modified to write out the raw complex values?
Thanks,
-Gregg
Thanks,
-Gregg
-
- Posts: 34
- Joined: Wed Jun 25, 2014 11:38 pm
Re: acquirefft command-line utility
Take a look in worker.c at rp_spectr_worker_thread()
In the call to rp_spectr_fft() [found in dsp.c] the real/imag values are available
The calls after that to rp_spectr_decimate() and rp_spectr_cnv_to_dBm() you might NOT wish to call if you want complex vals
And finally, rp_spectr_set_signals() would need to know that you are interested in the complex vals only, and any code above this that would normally report the dBm values
In the call to rp_spectr_fft() [found in dsp.c] the real/imag values are available
The calls after that to rp_spectr_decimate() and rp_spectr_cnv_to_dBm() you might NOT wish to call if you want complex vals
And finally, rp_spectr_set_signals() would need to know that you are interested in the complex vals only, and any code above this that would normally report the dBm values
-
- Posts: 7
- Joined: Mon Jan 18, 2016 10:37 am
Re: acquirefft command-line utility
How do I install this on the Red Pitaya? Everytime I start make, acquirefft is gone from the folder and I cant use the utility.edgo wrote:More fun,
acquirefft is command-line utility for frequency domain analysis, here in the /Test/ directory:
https://github.com/edgo914/RedPitaya
This utility is a curious merge of acquire and the guts of the Spectrum Analyzer application's FFT routines
The output is sent to stdout as a single column of dBm values.
You may set the Channel, Decimation, and Binning values like so:
redpitaya> ./acquirefft
Usage: ./acquirefft CH DEC BIN
CH Channel [1,2]
DEC Decimation [1,8,64,1024,8192,65536]
BIN Binning [1,2,4,8,16,32,64,128,256]
Number of frequency domain values returned is 8192 / Binning
The Spectrum Analyzer app essentially has hard-coded binning value of 4, so it always returns 2048 values, good for a web display. acquirefft has more binning flexibility, for your entertainment.
I did not remove the waterfall code, it is there but commented out in various places. An industrious individual in need of this functionality might figure out how to use it.
To build:
$ make CROSS_COMPILE=arm-linux-gnueabi- clean all
cheers,
edgo
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: acquirefft command-line utility
First off, the build instructions are for the old ecosystem, the major difference being the soft-float vs hard-float architecture. Binaries for the old (<= v0.93) ecosystem will not run on the new (v0.94) one and vice-versa.
To analyze build problems, it is usually helpful to know a bit about the environment you are building in - did you follow the setup described in the github README, or from the wiki, or something else ? What OS is your host running ? etc.
To analyze build problems, it is usually helpful to know a bit about the environment you are building in - did you follow the setup described in the github README, or from the wiki, or something else ? What OS is your host running ? etc.
-
- Posts: 7
- Joined: Mon Jan 18, 2016 10:37 am
Re: acquirefft command-line utility
Sorry for the trouble, I solved the problem by doing another "make" after perform the cross compile. I overlooked this due to my inexperience on Linux.Nils Roos wrote:First off, the build instructions are for the old ecosystem, the major difference being the soft-float vs hard-float architecture. Binaries for the old (<= v0.93) ecosystem will not run on the new (v0.94) one and vice-versa.
To analyze build problems, it is usually helpful to know a bit about the environment you are building in - did you follow the setup described in the github README, or from the wiki, or something else ? What OS is your host running ? etc.
I would like to further ask the ff: How is the frequency range computed/known whenever I use the acquirefft?
-
- Posts: 34
- Joined: Wed Jun 25, 2014 11:38 pm
-
- Posts: 7
- Joined: Mon Jan 18, 2016 10:37 am
Re: acquirefft command-line utility
Thank you, I was able to solve my problems because of this. Nils Roos and you have been very helpful! Your help was much appreciated!edgo wrote:This may help:
http://stackoverflow.com/questions/4364 ... e-in-a-fft
http://stackoverflow.com/questions/1075 ... rification
-
- Posts: 27
- Joined: Thu Apr 14, 2016 3:14 pm
Re: acquirefft command-line utility
If I understand this correctly, sampling at a frequency of 125 MHz (decimation 1) and using a binning setting of 1 would give me a resolution of 125*10^6 / 8192=15,258 Hz, so roughly 15kHz. With decimation set to 8192, I'd have a resolution of 125*10^6 / (8192*8192) = 1.86 Hz (although I could only faithfully measure frequencies up to 7.5 kHz), right? Is it possible to increase the resolution for a given decimation by increasing the FFT length or is this prevented by memory size?
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 98 guests