My Interferometer Radio Telescope Setup

395 views
Skip to first unread message

Timothy Szymanski

unread,
Dec 21, 2020, 4:01:46 PM12/21/20
to Amateur radio interferometry
Hello all my name is Tim (KC9POS) I am super glad I found a group into this science. I have been working on a little setup using the kerberos SDR project and 4x2 polarity inverted v dipoles the setup isn't to bad to setup I need to add a new switch to flip polarizations. for software I was building my telescope off the PICTOR telescope in Greece which is a cool open source telescope. I am looking for a little assistance tho from a software point of view getting an image from my telescope and getting beam forming to work. I don't know where the best place to start is. The antennas have a baseline of 30ft and the coax is 125ft long. Kerberos SDR has delay lines inside it but should I use GNU radio to delay? I would be very grateful for any help and great job on your project.  I will link in all my sources and reference below.

Iban Cardona

unread,
Dec 21, 2020, 6:15:54 PM12/21/20
to amateur-radio-...@googlegroups.com
Woow, looks great! Congratulations

73! Iban
eb3frn

Missatge de Timothy Szymanski <ihear...@gmail.com> del dia dl., 21 de des. 2020 a les 22:01:
--
You received this message because you are subscribed to the Google Groups "Amateur radio interferometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amateur-radio-interf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/amateur-radio-interferometry/218e8f01-f5bf-4452-8093-c5c638b2c9f2n%40googlegroups.com.

David Lonard

unread,
Dec 21, 2020, 9:37:17 PM12/21/20
to Amateur radio interferometry
Hello Tim,

I looked over your pictures and I think I see a pair of dual polarization inverted V antennas, similar to that used by the LOFAR group?  I am not sure how coherent the channels are on the Kerberos SDR, but I've written some code that I've posted on this group that could be used to see how well aligned the channels are since I have not seen any real interferometry examples with this SDR. If you can get the Kerberos SDR to send IQ data through SoapySDR, you could cross correlate the streams from its four channels to see how well they align. Examples of this are in some of my earlier posts.  

In my experience, GPSDOs are quite a lot better than rubidium clocks, but you don't need a high accuracy clock for an interferometer that shares a common clock. I would try to focus on getting fringes before imaging of a strong source like the sun and even this might be hard to do in a suburban environment. 

David, N5OIQ

dohais...@gmail.com

unread,
Dec 22, 2020, 12:40:47 AM12/22/20
to Amateur radio interferometry
As i remember, kerberos has 4 rtl-sdr, and it has inside noise source and software to trigger between noise and RF.
It really good for sync 4 rtl-sdr, because i saw their project that compute DOA ( direction of arrival) with nice result (that need good sync)

So try use this method to sync ur keberos.
Vào lúc 04:01:46 UTC+7 ngày Thứ Ba, 22 tháng 12, 2020, ihear...@gmail.com đã viết:

David Lonard

unread,
Dec 22, 2020, 8:59:14 AM12/22/20
to Amateur radio interferometry
To check and see if the Kerberos SDR signal paths are synchronized, the code that I described before should do the trick.

I would use a 4 way signal splitter to feed a common noise source to all four channels. The interready1.py program will then plot the cross correlated spectra of two channels. By adding or subtracting coax cables (delay lines), the signals can be synched up.

David

Son Do Hai

unread,
Dec 22, 2020, 9:22:43 AM12/22/20
to Amateur radio interferometry
Yup, that's exactly what they did in this project:
https://www.rtl-sdr.com/ksdr/

Just modify python file in github project to his application instead of DOA.

Vào lúc 20:59:14 UTC+7 ngày Thứ Ba, 22 tháng 12, 2020, David Lonard đã viết:

David Lonard

unread,
Dec 22, 2020, 10:33:10 AM12/22/20
to Amateur radio interferometry
I looked at the link and agree that it will be very useful and similar to what I described. For direction finding and passive radar, their code is better suited than my code which is designed to heavily integrate signal over time for radio astronomy applications. 

In some of my earlier work, I did some interferometry of meteor scatter signals at 50 to 70 MHz and I think the Kerberos setup would be ideal for capturing these narrow band signals. Recently, I tried the same approach using MSK144 signals at 50.260 MHz and it worked well, but with only two receivers from a LimeSDR. With the Kerberos SDR and 4 antennas, it could produce some interesting data I think, especially if you combine the known location of the MSK144 transmitter using PSKreporter map information.

David

David Lonard

unread,
Dec 22, 2020, 10:40:12 AM12/22/20
to Amateur radio interferometry
Here is a relevant link to meteor echo interferometry.

Timothy Szymanski

unread,
Dec 22, 2020, 12:18:53 PM12/22/20
to amateur-radio-...@googlegroups.com
Thank you all for your help and input everyone. I did want to model my scope after the LOFAR array after I fell in love with it. I would like to have multiple beams going and try some FPGA experiments. Also my plans are to try and use neural networks to filter out rfi noise but more on that latter. Your videos David on youtube really help with seeing how the telescope all comes together. There are few videos online describing the details of interferometry from a software point of view and how to get a fridge pattern and correlate. I consider myself a novice at python but should be able to get something put together now I have some good input from the group. As of last night I used GNU radio to take the inputs from all 4 SDRs as a starting point and just look for meteors scattors. Today I will look at the code of kerberos and see how I can direct the synchronized output. I will also try and follow your technique using  gnu radio and record to a .bin files and import it into your script as a starting point just to get a fringe pattern. Thank you again I will keep you posted on any updates.

--
You received this message because you are subscribed to the Google Groups "Amateur radio interferometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amateur-radio-interf...@googlegroups.com.


--
~No trees were harmed in the posting of this message...however an extraordinarily large number of electrons were horribly inconvenienced.~

Timothy M. Szymanski
Amature Radio Call Sign: KC9POS - Extra
Cell Phone:708-691-6286


Timothy Szymanski

unread,
Dec 22, 2020, 2:00:55 PM12/22/20
to amateur-radio-...@googlegroups.com
Oh I had a question that came to mind about using the Kerberos software. Would I run into issues on the spacing of the antennas and position. For DOA the requirements were to have the antennas spaced equally in ULA or UCA circular or linear? I assume with correlation it doesn't matter much. I read a paper on the lofar array and spacing is random to provide different baselines.

David Lonard

unread,
Dec 22, 2020, 2:55:52 PM12/22/20
to Amateur radio interferometry
Different spacings are not a problem. For the meteor scatting work, I used a spacing of about 250 meters. I think it is a good idea to take the .bin files from GnuRadio at first. With the large baseline that I was using, I saw the phase wrap many times for individual pings. 

David Lonard

unread,
Dec 22, 2020, 2:59:25 PM12/22/20
to Amateur radio interferometry
And make sure the polarizations for each antenna are the same. I used a common linear polarization on my baseline. The LOFAR group does discuss cross polarization and the ability to get "full Stokes" data, but I have not explored that myself.

Timothy Szymanski

unread,
Dec 22, 2020, 6:27:51 PM12/22/20
to Amateur radio interferometry
I can always give you my username and password and setup a VNC session with realvnc and give you access to my setup running the kerberos if you wanted to play around with it I would be very curious to see its performance. I am currently running ubuntu 20.04 on a r710 but i found I was bumping into version issues with the python2.7.9 scripts you wrote. Today I did get the gnu radio writing to a .bin file. Tonight I will setup my workstation which is a better fit for this kind of work since its a thinkstation d20 with two Quadro fx4800 gpu(s) and running ubuntu 20 and I will install cuda and python2.7.9 using  venv and have a good working platform to build on that is my update for today. 

David Lonard

unread,
Dec 22, 2020, 7:53:22 PM12/22/20
to amateur-radio-...@googlegroups.com
I'm traveling now, but when I'm back home, I'll post updated code that will run on Python 3.x that uses CuPy and will be much easier to get the dependencies up and running.


Son Do Hai

unread,
Dec 22, 2020, 8:40:22 PM12/22/20
to Amateur radio interferometry
Don't worry, spacing in DOA is a fixed condition, but not need in other applications.
In kerberos, they have used inside noise source (that is not effected by antena spacing) to compute Cross-correlation for sync 4 rtl-sdr.


Vào lúc 02:00:55 UTC+7 ngày Thứ Tư, 23 tháng 12, 2020, ihear...@gmail.com đã viết:

Timothy Szymanski

unread,
Dec 26, 2020, 12:03:56 AM12/26/20
to amateur-radio-...@googlegroups.com
Well this could be the best christmas ever. I have a working gnuradio writing to a .bin file. I have the sdr tuned for a center frequency of 423Mhz, bandwidth 14M, sample rate  15M, gain 6, if gain 15, and BB gain 12, for a random pulsar B0329+54. Whether the pulsar is there or not we will see I have a .bin file about 4.9GB. I used your triplealignssd.py after getting it to work with python3 and got some results. Then I ran the tripleprecross.py and returned some results. I will keep you posted on my progress. I'm not very certain on how to generate the .fits for the fx correlator. Also I could not get fosphor to work on ubuntu 20.04 says that no opencl device found. I spent about a day trying to figure it out why but had to change focus. I have to tweak the numbers still to get everything aligned but I'm very happy thus far. To get a better understanding after I get a fringe pattern to create an image, I'm guessing you take the inverse fft of the fringe pattern. Also I'm sure there are more steps to follow to get an image of something like the VLBA puts out. Personally I would like to get an image of the sun and see some of the emissions from storms, or do some Ionospheric and space weather work since I really like the ionosondes or look at jupiters in radio but babysteps first here are today's results.



David Lonard

unread,
Dec 26, 2020, 9:56:34 AM12/26/20
to Amateur radio interferometry
The triplealign.py file is best for aligning .bin files from separate SDRs for VLBI, but it can also be a good check to see if two channels from a single SDR are aligned and it looks like your two .bin files are indeed aligned. The output of triplealign.py does not generate complex visibility fringe data.

With a coherent two channel SDR, you should be able to skip past using triplealign.py though and it should be easier to use the limeinter1.py program to directly produce a cross correlated data product for future use. This is where the 'real' fringes would be seen. If you look at some of my newer programs, you can see how I updated the astropy library that is used to store the cross correlated data, but it is something that you can worry about after you get fringes. I posted a recent update on my attempts to get fringes at 432 MHz and all I could get was the sun at a suburban location. With a pair of Outernet patch antennas with integrated LNAs, I was able to get fringes very easily, so you might want to give them a try in the beginning. 

The imaging step of converting complex visibilites (the real/imag complex numbers generated by limeinter1.py) into a real sky image is also complex and I would argue should not be the ultimate goal of a two element interferometer. Some of my earlier posts discuss the use of AIPY for imaging and this involves knowing the positions of your antennas, gridding and other steps needed prior to doing an IFFT to generate a real image of the sky. 

Timothy Szymanski

unread,
Dec 26, 2020, 10:06:50 PM12/26/20
to Amateur radio interferometry
As of tonight I have pretty much all the dependency setup for limeinter1.py but running into cuda issues  I have it installed and was able to run a helloworld but I get errors when i run python3 limeinter1.py Ill keep at it. I was wondering if you have the code available for cpu, my workstation has two xeon cpu sockets in it Im sure would speed up performance. But for the sake of trying to get a fringe pattern I would like to omit the complexity with the gpu. I also was given an Idea to try when I get this small 4 element interferometer to work and that is. I have a small bit of property in Dover Tennessee on a small little airstrip named short-creek. I my mind immediately went to making a large base line of    580km :) food for thought for experimenting. 

David Lonard

unread,
Dec 26, 2020, 10:40:59 PM12/26/20
to Amateur radio interferometry
Getting CUDA up and running can be tedious and I'm guessing that you need to get the path set in bashrc first before installing CuPy. For realtime work a higher end GPU will beat a CPU by a good margin, but for .bin files, it doesn't really matter much. I am using a GTX1080Ti and it can keep up with 20 MSPS. If you get rid of the ascupy and asnumpy lines and change instances of cp.xxxx to np.xxxx I think it should run on the CPU. 

Timothy Szymanski

unread,
Dec 28, 2020, 5:53:01 PM12/28/20
to amateur-radio-...@googlegroups.com
Good afternoon, well i've been pretty unlucky getting the code to work without dependency issues and I have been having fighting issues with soapysdr python cannot find the module even after installing soapysdr python modules and setting the correct python path. Is there a good way I can take this correlation approach to FPGA from the kerberos or bin files? and what does the correlation function look like in a fpga in logic or VHDL? or is there an analog way I can do correlation with vacuum tubes or analog? 

You received this message because you are subscribed to a topic in the Google Groups "Amateur radio interferometry" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/amateur-radio-interferometry/GwXYBhExEpA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to amateur-radio-interf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/amateur-radio-interferometry/e8004321-23ea-4c8e-b72a-f2183f5f31bcn%40googlegroups.com.

Timothy Szymanski

unread,
Dec 29, 2020, 5:52:23 PM12/29/20
to Amateur radio interferometry
I think I have my environment setup correctly  to run the FXGPUb.py script however I get the following error? If I change the value the number just doubles again. 

     78         wraw = win.read(64000000) # north IQ data stream

     79 

---> 80         ea = np.array(struct.unpack('16000000f',eraw))

     81         we = np.array(struct.unpack('16000000f',nraw))

     82         nr = np.array(struct.unpack('16000000f',wraw))


error: unpack requires a buffer of 64000000 bytes

I fixed the print statements which was easy to do but this is a little beyond me. I am running all up to date cuda and python 3 I don't know if that has something to do with it may I ask what your environment is ex (Ubuntu, CUDA, PIP, Python,...) to run the files correctly? 

David Lonard

unread,
Dec 29, 2020, 10:22:04 PM12/29/20
to Amateur radio interferometry
I think a problem with CuPy is that it wont work with CUDA 11.2, but I had good luck running it on CUDA11.1. You could try to get CUDA11.1 up and running and if you see it indicating CUDA 11.2 when you type "nvcc -V" then you can install CuPY with "pip3 install cupy-cuda111"

For the problem with struct unpack, maybe your numbers are 8 bit and it is expecting 16 bits?  The struct.unpack routine is pretty slow also. If you look at the code at this link, it uses a numpy routine to pull data from .bin files that is a lot faster. 

https://groups.google.com/g/amateur-radio-interferometry/c/LV8C1dzVLCE

I'm running on Ubuntu 20.04 with a GTX 1080Ti.
 
David

Timothy Szymanski

unread,
Jan 3, 2021, 10:29:27 AM1/3/21
to Amateur radio interferometry
So Great!! news after putting up a fight with cuda this whole week trying to install cuda on some older hardware. I used my gaming pc and it worked great installed within 30min and all the paths are set correct and I was able to run your FXGPUc.py up a different error you maybe able to shine light on
block # 6
Traceback (most recent call last):
  File "FXGPUc.py", line 84, in <module>
    ea = ea.reshape((8000,1000))
ValueError: cannot reshape array of size 936543 into shape (8000,1000)
I am still trying to use the .bin file approach I will have to look back at your gnu radio files and see if I missed something in the flow diagram. Screenshot from 2021-01-03 09-23-19.png

Timothy Szymanski

unread,
Jan 3, 2021, 10:32:28 AM1/3/21
to Amateur radio interferometry
What script and steps do you use to get he nice sun fringes I am personally interested in seeing what my results would look like?

David Lonard

unread,
Jan 3, 2021, 4:15:39 PM1/3/21
to amateur-radio-...@googlegroups.com
The code appears to be working, but you ran out to the end of your data file. To see the fringes,I use the following lines

phase:
plt.imshow(np.angle(x01[0:123456,:]),aspect='auto')       # where 123456 is the number of 'blocks' you have

power:
plt.imshow(np.angle(x01[0:123456,:]),aspect='auto',vmax=1e3)    # where the value of vmax needs to be adjusted

plt.show()    #visualize the data

Are you sampling at around 20 MSPS? If I recall correctly, 2 Tb worth of data (1 Tb per receiver) would get captured in about 100 minutes. 
With a 250 meter baseline, you could get 10 fringes I think at 140 MHz. The strength of doing this in real time becomes apparent with so much data.



David Lonard

unread,
Jan 3, 2021, 4:37:50 PM1/3/21
to amateur-radio-...@googlegroups.com
I made a typo in the last message. For power:

plt.imshow(np.abs(x01[0:123456,:]),aspect='auto',vmax=1e3)    # where the value of vmax needs to be adjusted  


Timothy Szymanski

unread,
Jan 3, 2021, 4:44:11 PM1/3/21
to amateur-radio-...@googlegroups.com
Ok I'll record longer then and try the different sample rate. I have 4 antennas with baselines of 40ft each between all 4 antennas so my baselines are small. Does your realtime fxcorrelator work with the gnu server?

David Lonard

unread,
Jan 3, 2021, 4:55:38 PM1/3/21
to amateur-radio-...@googlegroups.com
My real time correlator will work directly with a LimeSDR, XTRX or USRP B210 well with little additional fiddling (some SoapySDR changes to gain values).

If your SDR can be addressed through SoapySDR it should be easy to go down that route.


Timothy Szymanski

unread,
Jan 4, 2021, 5:42:20 PM1/4/21
to Amateur radio interferometry

I had great success viewing last night. I have about 1 hour of viewing on 3 antennas ruffly about 110min long I have been able to run the FXGPUc.py successfully. My 4 rtl_sdr are set to

  • Frequency 835e6

  • RF Gain 6

  • IF Gain 15

  • BB Gain 12

  • Bandwidth 14e6

I definitely see what you meant about doing this in real time which I will set up one I know all of my telescope is functional and I have fringe visibility for reference. I have been following your videos still on youtube. I personally need some guidance to get up and going and that video is the closest to a tutorial I could find. As far as plotting the fringe visibility is there a special script you run alongside plt.imshow(np.abs(x01[0:123456,:]),aspect='auto',vmax=1e3) or any special format?

Timothy Szymanski

unread,
Jan 4, 2021, 6:05:37 PM1/4/21
to Amateur radio interferometry
I still get the same error when I reach the end of the .bin file and the .fit fils is not being created or being written is there a step Im missing when I run the script? The script goes to block #59 now and takes about 30min to run lol whoa?

block # 6
Traceback (most recent call last):
  File "FXGPUc.py", line 93, in <module>
    ea = ea.reshape((1000,1000))
ValueError: cannot reshape array of size 936543 into shape (1000,1000)
-------------------------------------------------------------------------------------------------------------------------------------

# Break up real and complex parts of the data and save as FITs files
hdu = pyfits.PrimaryHDU(np.real(corrsum01))
hdw = pyfits.PrimaryHDU(np.imag(corrsum01))
hdu.writeto('a0/a1.fit')
hdw.writeto('a0/a1.fit')

hdu = pyfits.PrimaryHDU(np.real(corrsum02))
hdw = pyfits.PrimaryHDU(np.imag(corrsum02))
hdu.writeto('b0/b1.fit.fit')
hdw.writeto('b0/b1.fit.fit')

hdu = pyfits.PrimaryHDU(np.real(corrsum12))
hdw = pyfits.PrimaryHDU(np.imag(corrsum12))
hdu.writeto('c0/c1.fit.fit')
hdw.writeto('c0/c1.fit.fit')

David Lonard

unread,
Jan 5, 2021, 10:19:12 AM1/5/21
to amateur-radio-...@googlegroups.com
Can your 4-rtlsdr handle 14 MSPS per channel? I thought it can only go up to 2.4 MSPS per channel. 

My code is pretty clunky, so it basically crashes if it doesn't have enough data to work with, but the values that still sit in the numpy arrays are present and are probed with the plt.imshow... commands.

For SDRs with a slower maximum sample rate, the code is going to need some changes to get fringes. The trick will be to look at the amount of integration done within each "block". For a higher end SDR that does 20 or 50 MSPS, a lot more integration is appropriate, but for a slower sample rate, the amount of integration should be cut down to say 10% of what I have in my code. The dimensions of the numpy and cupy arrays should be changed from something like ((16000,4000)) to ((1600,4000)) with the goal of having each block contain about 1 to 2 seconds worth of samples from the SDR. The window function cupy array also needs to match dimensions. 

David Lonard

unread,
Jan 5, 2021, 10:23:52 AM1/5/21
to Amateur radio interferometry
Also, at 835 MHz, I think the sun is the only target you are likely to see at 2.4 MSPS, so some yagis that point toward the sun would be appropriate antennas. LNAs with some passband filters may be needed. For 835 MHz, I have used these SAW filters.

They have 25 MHz bandwidth, so they would be a good fit if you choose to move up to a higher performance SDR.

Timothy Szymanski

unread,
Jan 6, 2021, 11:05:06 AM1/6/21
to Amateur radio interferometry
Thank you for all your help with all this setup, I am a student still studding so the computer science is killing me a little lol my background is really in EE and of course ham radio :) I probably will put my focus with my interferometer on the sun since the RTL_SDR is sampling at 2.4MSPS  a quick question about how I could make Ionospheric measurements I was planning on constructing a ionosonde over winter to take radar measurements and with the design of the inverted v antennas of the array I should have directivity near NVIS. With the interferometer array can I view solar activities sudh as CMEs and Sunspots? Thank you again for your help.  

David Lonard

unread,
Jan 6, 2021, 12:49:50 PM1/6/21
to amateur-radio-...@googlegroups.com
I think that for ionospheric measurements, a bistatic configuration will be needed and the return signal will be weak that don't rely upon the usual E and F layer reflections familiar to amateur radio people such as Bragg Scattering) There are wind profiler radars working at 50, 400 and 900 MHz that could provide some examples. Transmitters of opportunity might be a good first step such as distant ATSC stations. I did try some NVIS analysis of FT8 signals over a 50 km baseline at 160, 80 and 40 meters, but need to put more effort into that.

CMEs and the like are very strong and produce very strong fringes across VHF frequencies. No extra spatial information would be gained, but they will follow the weaker ordinary fringes from solar continuum energy.


Timothy Szymanski

unread,
Jan 12, 2021, 2:05:24 PM1/12/21
to amateur-radio-...@googlegroups.com
I have a quick question regarding a side project of mine for filed day this year I want to communicate with the cubesate using a phased array beside using delay lines of cut lengths can I use gnu radio to add delays or use a python script to delay the Iq data just enough to track a satellite. For transmitting I was going to use a hack RF and amplifier on all the antennas and switch on the amps in sequence for a appropriate delay. Field day isn't untill june so I have time but I enjoy seeing the satellite in the fridge patterns you post.

David Lonard

unread,
Jan 12, 2021, 2:37:34 PM1/12/21
to Amateur radio interferometry
Here is a link describing how to do phase shifts using NumPy.

Gnuradio has a phase delay vector tool that is easy to use also and probably the best way to execute a beam steering transmitter. I think the HackRF SDR is a single channel radio. Synchronizing two HackRFs for MIMO is likely a difficult task, even if the two radios share a common clock reference. A LimeSDR or a USRP B210 can transmit coherent MIMO signals, so those might be good SDRs to consider for your project. For tracking a satellite, I would also keep the antennas close enough that the antenna pair produces a single main beam. Wider separations will produce many lobe 'fingers' that will reduce the effectiveness of the transmitter. 

I still like to use a time domain reflectometer to get my coax lengths cut to right lengths to avoid having my computer do a lot of extra math in my correlator and the LimeSDR has a phase synchronization algorithm in it that it executes at start up. 
Reply all
Reply to author
Forward
0 new messages