Scientific Computing

Quick-start Red Pitaya radar

The coffee-can radar systems have the advantage of operating at a 13 cm wavelength, so antennas are small and quite directional, relevant for clutter reduction and high spatial resolution. Without external hardware, Red Pitaya output/input resides in the 0-50 MHz range. Build a radar in this range with nothing more than two Red Pitayas and some dipole antennas.

The radar topology is using frequency translation via the second Red Pitaya acting as a bent-pipe transponder. This is a high-tech, long-range version of harmonic radar.

  1. build dipole antennas for each Red Pitaya
  2. Configure Red Pitaya 2 for GNU Radio
  3. Configure Red Pitaya 2 for transponder
  4. Configure Red Pitaya 1 as radar, with TX and RX frequencies corresponding to transponder.

Strong (high SNR) return signals from the transponder are limited by the transmit power of the radar.

Student/hobbyist-built radar projects

Particularly with software-defined-radio, it has become feasible for electronics enthusiasts and engineering students to build their own radar. Here are a few projects.

Radar videos:

Radar hardware, PCB and software

6 GHz singleboard FMCW radar, 100 meter range with Github

MIT OpenCourseware coffee can radar

8 GHz radar for UAV: PCBs and software with report

6 GHz radar Gerber files and Matlab

Raspberry Pi-based radar for measuring vehicle measurement: description, parts list, software

Schematics, PCB, software for another FMCW radar

HF imaging radar using Red Pitaya

University coffee can radar 2011

First coffee can radar from 2006

Radar applications

Breathing and heartbeat detection radar

Radar code

Python code for correcting FMCW non-linearity effects

Coffee can radar: forward model and estimation code (including SAR)

HF radar experimental license example

WH2XBH licensed to MIT Lincoln Laboratory has a transmitter location of 42.624N, 71.486W which is at MIT Haystack Observatory near Westford, MA. The licensed frequencies are useful for probing the ionosphere across a range of HF frequencies. HF experimental licenses are in general not contiguous across the HF bands because of protected radio services such as government, aircraft, public utilities, and the like.

WH2XBH is licensed at 1 Watt ERP with condition “the occupied bandwidth of the emission shall not extend beyond the band limits” for (approximately, see license for exact bounds):

Start freq [MHz] Stop Freq [MHz]
2.0 2.17
2.19 2.49
2.51 2.85
3.16 3.4
3.5 4.0
4.15 4.65
4.75 4.99
5.01 5.45
5.73 6.2
6.77 8.35
8.37 8.81
9.04 9.99
10.1 11.17
11.4 11.6
12.1 13.2
13.41 14.99
15.1 17.9
18.03 19.68
19.8 19.99
20.01 21.92
22.0 23.2
23.35 24.99
25.01 25.55
25.67 30.0

ITU/FCC Emissions designator: generally the emissions are of type 500KW0W except where narrower. The fifth letter refers to the modulation being sent.

fifth letter
modulation. Here, it’s W, which means any type of modulated or unmodulated transmission.
sixth letter
information content. Here, it’s 0, which means no inherently useful information is sent. Modulation is sent, but it’s modulation useful for radiolocation, not for sending messages as a sole end goal.
seventh letter
information type. Here, it’s W, which means any type of information may be transmitted. This might seem to conflict with the 6th letter, but what it actually means is any type of content, as long as information transmission is not the purpose of the transmission. I can send jumbled up pictures or random numbers, but not broadcast a TV or music program.

Ionospheric HF radar spectral regulations

This page is focused exclusively on United States of America Amateur Radio regulations.

Beacons in the Amateur Radio Service: for HF (sub-50 MHz) frequencies, 10-20 kHz bandwidth might be legally possible on these frequencies with up to 100 Watts conducted transmit power for one-way transmission under the Amateur Radio Service, § 97.305(c).

frequency range [MHz] notional wavelength [m]
1.8 - 2.0 160
3.6 - 4.0 75
7.125 - 7.30 40
14.15 - 14.35 20
18.110 - 18.168 17
21.20 - 21.45 15
24.93 - 24.99 12
28.3 - 29.7 10
50.1 - 54.0 6
144.1 - 148 2
222 - 225 1.35
902 - 928 0.33
420 - 450 0.70
1240 - 1300 0.23
2300-2310, 2390-2450 0.13

Along with numerous higher frequency bands.

Note: 7.075 - 7.10 MHz is NOT phone/image in the lower 48 states of USA

Beacons may be locally or remotely controlled. An easy method of legal remote beacon control may be accomplished via a simple website. The control operator sees the status of the beacons and can click a button to turn individual beacons on/off from their smartphone without need for an app. One control operator can control an unlimited number of stations remotely.

Legal Beacons under FCC Part 97 (Amateur Radio Service):

  • § 97.203(g) beacon may transmit one-way communications
  • § 97.203(c) beacon can transmit up to 100 Watts conducted power
  • § 97.203(b) beacons may transmit on multiple amateur bands simultaneously, one “channel” per amateur band.

Examples of practical usage of beacons under § 97.203 include worldwide networks of beacons using a variety of emission modes exist throughout every amateur HF band. The NCDXF network transmits 24/7/365 with 100 watts on several HF bands with stations worldwide since 1979.

Instantaneous bandwidth under FCC Part 97

§ 97.307(f)(2) No non-phone emission shall exceed the bandwidth of a communications quality phone emission of the same modulation type. DSB-AM voice transmissions may perhaps occupy up to 20 kHz instantaneous bandwidth or so, although 10 kHz bandwidth is perhaps more common. Perhaps we are transmitting an “image” or a digital “voice” transmission, in a manner that is convenient for ionospheric sensing with an HF radar beacon network.

Some people incorrectly latch onto § 97.203(d) which applies to automatic control beacons only. That is, beacons that no human needs to actively monitor or control. In contrast, we propose radar beacons that are remotely controllable over the internet via any web browser as has been well established.

Non-Beacon strategies relevant to VHF+ operations include:

  • Automatic control: No control operator, local or remote: § 97.113(d) Includes auxiliary, repeater, and space stations.
  • Test (> 51 MHz) Emissions containing no information: § 97.305(b) Test does not include pulse emissions with no information or modulation unless pulse emissions are also authorized in the frequency band. 1500 watts PEP conducted power limit, appears to be no bandwidth restriction.
  • Spread spectrum: § 97.313(j) Spread Spectrum (>222 MHz) May fill entire amateur band, 10 watts PEP transmit conducted power.

Matlab readtable text

Matlab’s readtable() function cannot be manually told the spreadsheet column data format. The 'Format' '%s %f' option ONLY applies to text files.

Fix the spreadsheet (.xls, .ods) where an all-numeric column is being read as text in cells:

  1. highlight that entire column
  2. select Format Cells, Number.

Microsoft Excel has a green alert triangle if a number is stored as text.

Note: it is permissible to have the first row of an all-numeric column be a text header.

Glumpy OpenGL for Python

Most PCs made in the past decade are compatible with OpenGL, enabling extremely fast 2D and 3D animation–including from Python. You DON’T have to learn OpenGL at all to make interesting 3-D plots from Numpy arrays. VisPy is a high-level easier to use OpenGL interface for Python, while Glumpy is a lower-level interface.

Glumpy prereqs:

apt install libglfw3-dev

pip install pyopengl packaging appdirs pyopengl triangle cython glfw

Glumpy install for Windows

pip install glumpy

Glumpy OpenGL Examples:

git clone https://github.com/glumpy/glumpy

cd glumpy/examples

python fireworks.py

OpenGL version is checked by

glxinfo | grep "OpenGL version string"

HF Radar spectrum sharing

Increasing number of broadband HF radars in operation as seen above–figure courtesy https://hfrnet.ucsd.edu/diagnostics/networkstats.php

  • baseband IQ data (not just speaker audio recording) for various HF radars.
  • baseband data from homodyne radars such as the many variants of tin-can radars out there.

The reason is that I find little if any such data publicly available. It can be useful to get a preview of real data before building a hardware version, or as I recommend, configuring a software defined radar.

Motivations for using DSSS on an HF radar include:

  • great range and Doppler resolution.
  • LPI
  • not bothering other spectrum users (narrowband or wideband)
  • low peak power
  • readily doable with < $200 SDR

I can make up hypothetical waveforms as you like. But some people will prefer to see real data a) not interfering with PiRadar b) PiRadar not being bothered by such data. So again, I’m looking for data you’re willing to publicly release say via Zenodo (I can upload for you) so that radar students and engineers can have these waveforms to test coexistence.

HF Radar

CW Radar using Red Pitaya and GNU Radio

Perhaps the simplest waveform a radar can use is a continuous unmodulated tone. You will get no direct range measurements from such a system, but you will inherently get Doppler beat frequency fbeat measurements proportional to radar transmit frequency ftx for target radial velocity v using speed of light c. From the program CW_doppler.py:

fbeat = 2 * v * ftx/(c-v)

A software defined radar implementation of a CW Doppler radar using GNU Radio might look like this diagram:

Red Pitaya & GNU Radio CW radar

CW Doppler Software Defined Radar using GNU Radio and Red Pitaya.

Avoid zero center frequency: IQ imbalance by the technique of moving the main transmit/receive frequency away from the center frequency of the complex baseband, to avoid interference from IQ imbalance.

Estimate radial velocity from CW software defined radar with unmodulated CW (pure everlasting sinewave emission, delta functional in frequency domain). The estimation problem is accurately determining fbeat by which v is estimated. Of course, the return signal is highly corrupted by noise, not least of which is the phase noise of the transmitter, particularly under 100 MHz where the Doppler shift is relatively small, compared to a 2.4 GHz radar.

A peak-finding algorithm on the frequency domain representation of the return signal obtained via FFT is typically not the best choice. If noise is a problem, and you want to find multiple targets, subspace frequency estimation methods are known to be highly precise for solvable problems. Subspace frequency estimation code for Python, Fortran, C and C++. Matlab’s implementation is very inefficient by comparison–Matlab takes far longer to solve and with poorer results.

Expected beat frequencies: the radar transmits at 47.010 MHz, and for vehicles on the highway, by the equation above, most return signals will be in the 47.0099 MHz to 47.0101 MHz range, that is, the beat frequencies will be less than 100 Hz magnitude and most less than 10 Hz magnitude. The exact beat frequency for a given trajectory and fixed radar parameters depends entirely on the radial velocity.

Target true velocity estimation can be obtained from radial velocity. This can be computed and used to invert measurements to get an estimate of true target velocity given oblique measurements. The usual non-uniqueness issues apply.

Target range estimation: CW radar

Attempting to estimate bounds on range using unmodulated CW radar from targets with known travel paths and speeds can be a thought exercise, but not necessarily a fruitful pursuit. It is more practical to apply frequency modulation, whether stepped or swept in frequency to enable traditional range measurements with fewer a priori constraints. An example of stepped frequency FSK CW radar paper.

Calibrating the PiRadar range and Doppler

We did a brief PiRadar transmission in the 80 meter ham band today and received on a second antenna. We don’t have the system calibrated yet so we don’t have a quantification on what we were measuring.

Every radar needs calibration to get usable range, Doppler and other measurements. Expanding upon section 3a of the PiRadar functionality test, we describe the materials needed to do an outdoor improvised radar range test. This test can be run independently of the tests from Sections (1) and (2) that are about the radar timing. The idea is to test the system in pieces so that it’s not too complicated testing everything at once.

Summary of materials needed for Red Pitaya radar calibration

Materials needed for one Red Pitaya monostatic radar:

  • wooden dowels to build 4 meter dipole (for 40 MHz, length ~ 3e8/40e6/2)
  • solid wire for dipole elements–something in the 12 to 18 gauge range is probably fine. Thinner wire or stranded wire that’s stiff enough is fine.
  • Type 43 snap-on ferrite core for balun (one per dipole)
  • 4-5 or so meters of coax cable, 50 ohms, RG-58.
  • SMA plugs for RG-58.
  • two SMA jumpers, a convenient length perhaps 0.5-1 meter or so between splitter and Red Pitaya In and Out.
  • ANNE-50+ SMA 50 ohm termination
  • ZFSC-3-13-S+ 3-port splitter
  • USB battery pack to power the Red Pitaya

Low-band VHF Dipole construction

The dipole antennas will be about 4 meters in length. Thus several meters of coax cable between the dipole feedpoint and the Red Pitaya is required to avoid breaking the Red Pitaya SMA connectors. The coax should come out perpendicular to the dipole for a few meters or else the radiation pattern gets goofed up. Solder a 10Kohm resistor across the dipole feedpoint to dissipate static electricity buildup that can zap the Red Pitaya input.

Home Depot has 1.2 meter long wooden dowels for $1, one could connect 3 of them together and then let several centimeters of the solid wire stick past the ends.

Radar duplexing: transmit & receive with one antenna

In order to use one antenna while simultaneously transmitting and receiving, a method of combining or duplexing into one antenna is needed. This can be provided by a splitter that combines and provides about 30 dB of port-port isolation such as Minicircuits ZFSC-3-13-S+. The third port needs a 50 ohm termination when not used–it might be handy to have a third port for certain tests and configurations.

Note

There are cheap cables and connectors on eBay, however double-check that they aren’t RP-SMA (doesn’t mate with SMA) or that they’re overseas and take 30 days to ship.

Use VNC to connect to supercomputers

VNC advantages over X-forwarding:

  • faster and responsive
  • stable and established means of graphical remote control.
  • consumes kB/sec instead of MB/sec.
  • deliberately or accidentally disconnect, and when you reconnect, your VNC desktop is still there as it was.
  • Wayland replaces X11, and Wayland does not forward over the network

How to use VNC to HPC:

  1. RealVNC Viewer is free of cost.
  2. Start VNC server on HPC
  3. Connect to VNC server using its IP address