BladeRF astronomical interferometer

Working on something interesting? Share it with the community!

Moderator: robert.ghilduta

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

BladeRF astronomical interferometer

Post by dlonard » Sat Dec 26, 2015 10:47 am

Hello Everyone,

I thought I would post some of my work on using three BladeRFs as SDR interferometers for radio astronomy. If you follow the links provided below, you can see some of the data from work that I've done at 60 MHz and 140 MHz. I haven't tried out the various approaches that are emerging to synchronize the data streams from multiple BladeRF's yet, but I am very keen to use 1 PPS synchronization. To align data right now, I am using a FFT/IFFT process to synch data in post processing. The links provide some code that I've written to do this and for using a GPU to function as a FX correlator.

There are a few kinks in my set up that occasionally leads to dropped samples, but most of the time, I am able to record data at 15 MSPS simultaneously from three radios.

If anyone else is doing any work using BladeRFs for interferometry, I would be glad to hear about your experiences.

David



https://www.youtube.com/watch?v=ISEfbBJxiK0
https://www.youtube.com/watch?v=ZlmvZa6bcTs
https://sites.google.com/site/amateurra ... ferometry/
https://groups.google.com/forum/#!forum ... rferometry

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Sun Dec 27, 2015 11:34 am

Hi David,

Awesome work, thanks for sharing!

I know you're waiting for the synchronized RX functionality, which I'll be looking to merge soon. There's a branch and some associated documentation here that I'll look to finish reviewing and testing. One important detail that will change is that the Mini exp pin used will have to change -- we used pin 1 as the input for the 1PPS / 10 MHz input - just a heads up.

Cheers,
Jon

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Sun Dec 27, 2015 2:54 pm

Jon,

Thanks, I look forward to the 10 MHz/1 PPS synch functions going mainline. I'm still a ways off from being able to correlate signals in real-time, so I am content to process everything after recording right now. Without 1PPS synching, individual BladeRFs are about ~5000 to 10000 IQ sample pairs off when started off from Gnuradio at 15 MSPS on my machine.

David

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Sun Dec 27, 2015 6:44 pm

Hi David,

Sorry for the confusion. As I re-read this, I articulated things poorly. Just wanted to clarify things, as not to confuse other people as well.

The 1 PPS / 10 MHz input is something entirely different - this functionality, now in master, allows the on-board VCTCXO to be tamed by supplying 1.8V 1 PPS or 10 MHz input source to pin 1 on the mini expansion header. The purpose of this is to minimize frequency error and to allow people to re-calibrate their device. We'll be working on a blog post about how to do this with a COTS GPSDO.

The synchronized (or "triggered") capture functionality up in that development branch allows the mimo master to gate sample reception/transmission on all of the slave devices; this is the functionality I think you might find particularly useful. This is done using an I/O pin on the same mini expansion header. What I feebly tried to articulate was that this conflicts with the aforementioned pin assignment, since these two things were developed in parallel; we will change this pin when we merge this trigger-based.

What is currently not in the active "TO DO" list is having the bladeRF set a supplied timestamp value on the next PPS pulse. However, I will talk to the guys about what it would take to get this into the queue.

Hopefully that sheds a bit more light on what's to come. I'll try to touch base with you once it's all ready, and will be looking forward to future developments in your projects! :)

Cheers!
Jon

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Sun Dec 27, 2015 9:11 pm

Thanks for the clarification, yes I am more interested in the ability to synchronize devices, preferably on a 1 PPS pulse from a GPSDO. I assume that a master radio could send a pulse to slave radios as an alternative, then no extra hardware would be needed. I think it would be straightforward to characterize the delay and use that for synchronization for those of us that do not need higher levels of frequency accuracy.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Wed Dec 30, 2015 1:09 pm

Hi David,

You are correct about the "alternative" case -- with the pending changes we have up in the dev-synctrx branch, you would simply need to wire J71 (pin TBD) on the master to each of the slaves (on the same J71 pin); no extra hardware would be needed.

I'll be in touch once we have that merged!

- Jon

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Wed Jan 27, 2016 9:45 am

I've done some more work to get three BladeRFs to cross correlate data in 'real time' now for those who are interested. A grc flowgraph and a Python script communicate over a TCP socket now, so data doesn't need to be stacked up on big solid state drives and post-processed. See the link below.

Once the sample stream synchronization is incorporated into the BladeRF master code, I will ready to do sustained astronomical interferometry observing.

David



https://groups.google.com/forum/#!topic ... haMXMHdO4o

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Mon May 23, 2016 7:01 pm

Hi David,

I apologize for it taking so long, but the sample stream synchronization has been merged to master. I still need to work on porting the original writeup (by Jan) to a stand-alone document, but for the time being I've added a very simple example here.

I hope you're still up for working on your interferometer, as I know I'll be excited to see your results!

Best regards,
Jon

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Mon May 23, 2016 7:02 pm

P.S. I'll have FPGA v0.6.0 up for download tomorrow afternoon!

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Tue May 24, 2016 6:04 am

Jon,

I'm excited to try it out and thanks for the example. I've got three radios that need to be synchronized and I think I should be able to figure it out. Ultimately, I would like to be able to execute the triggering from within a GnuRadio flowgraph. I will keep everyone posted on my implementation.

Thanks,

David

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Wed May 25, 2016 8:49 am

Hi David,

Excellent - I know I definitely look forward to seeing your progress. Thank you for sharing your project with everyone here!

I need to think about how to expose this functionality in gr-osmosdr so that you could access it from within a flowgraph.

In the meantime, perhaps [this approach](https://github.com/Nuand/bladeRF/wiki/b ... of_Samples) will let you start processing samples in your flowgraph while configuring things with the CLI? Let me know if you have any questions!

- Jon

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Thu May 26, 2016 6:06 am

Jon,

Thanks, the FIFO approach looks like it might be the way to go. Should have some results soon.

David

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Sat May 28, 2016 12:52 pm

David,

No problem! Let me know if you have any questions or need clarification on anything.

Another up and coming item that may be of interest to you is the SoapyMultiSDR module for SoapySDR. I've chatted a bit with the author, Josh, about bladeRF support with this synchronization trigger, so ideally it'd be nice and seamless. If you're familiar with GNU Radio flowgraphs, I expect that you'd feel right at home in Pothos (which supports SoapySDR backends).

Cheers,
Jon

dlonard
Posts: 13
Joined: Sat Aug 31, 2013 1:48 pm

Re: BladeRF astronomical interferometer

Post by dlonard » Mon May 30, 2016 3:45 pm

Jon,

I've been able to get synchronized reception from my three BladeRFs with the latest FX3 firmware, FPGA images and bladeRF-cli, following the write-ups on how to get this going. The FIFO approach that you suggested works well, with the caveat that the temp files for each BladeRF grow very large, so sustained recording is still not possible yet. I expanded the GnuRadio FIFO flowgraph to read the three temp files and it worked fine.

Below, I've got an example for a configuration for my radios to trigger only as receivers and have attached the scripts used to control each radio. Each radio was activated in separate terminals using the commands listed below. (File paths and serial #'s will differ).

MASTER
bladeRF-cli -d '*:serial=33' -s ~/gnuflow/aipy/140mhz/synch/master.txt -i
trigger j71-4 rx fire ******when ready

SLAVE 1
bladeRF-cli -d '*:serial=be' -s ~/gnuflow/aipy/140mhz/synch/slave1.txt -i

SLAVE 2
bladeRF-cli -d '*:serial=69' -s ~/gnuflow/aipy/140mhz/synch/slave2.txt -i


I'm going to check out SoapySDR. Seamless multi-radio triggering would be very cool.

David
Attachments
slave2.txt
Set up 2nd slave BladeRF
(670 Bytes) Downloaded 1252 times
slave1.txt
Set up 1st slave BladeRF
(671 Bytes) Downloaded 1288 times
master.txt
Set up Master BladeRF
(662 Bytes) Downloaded 1217 times

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF astronomical interferometer

Post by jynik » Fri Jun 03, 2016 2:38 pm

dlonard wrote: The FIFO approach that you suggested works well, with the caveat that the temp files for each BladeRF grow very large, so sustained recording is still not possible yet. I expanded the GnuRadio FIFO flowgraph to read the three temp files and it worked fine.
If files are growing large, I think we may have some miscommunication or have something I have to do a better job clarifying here... let's figure that out.

The idea is that bladeRF-cli is writing to and GNU Radio is reading from a Unix Named Pipe (or "FIFO") --- not an actual file on disk or in a RAM-based filesystem.

This should be created with mkfifo.

Let me know if I've clarified anything or only added more confusion.

- Jon

Post Reply