gr-MRI: GNU Radio extensions for MRI using software-defined radios
Christopher J Hasselwander1,2 and William A Grissom1,2

1Biomedical Engineering, Vanderbilt University, Nashville, TN, United States, 2Vanderbilt University Institute of Imaging Science, Nashville, TN, United States


Software defined radios have been shown to be a highly configurable, low cost alternative to traditional MRI spectrometers. They are well supported by the open-source GNU Radio software, however there are currently no GNURadio extensions to enable their use for MRI. In this work we describe a library of GNU Radio extensions for MRI, which implements all of the basic capabilities of an MR spectrometer in an SDR. The software will enable users to develop custom, low-cost MR spectrometer systems without requiring custom hardware design. We demonstrate its use via its built-in spin echo, gradient echo, and inversion recovery sequences.


Conventional commercial MR spectrometers are often limited in configurability, portability, scalability and cost. This has led to the development of alternative spectrometer architectures such as software-defined radios (SDRs) [1,2]. The basic principle of SDRs is to implement application-specific functions in software running on a PC, and connect that software to the outside world using general-purpose hardware that only performs A/D and D/A conversion and basic filtering. SDR’s are highly reconfigurable, low-cost, and well-supported by the open-source GNURadio software which is the most widely-used platform for SDR application development. While a wide range of GNURadio extensions exist for communications applications, there is currently no widely-available software that enables GNURadio to be used for MRI. In this work we describe a library of GNURadio extensions for MRI, which implements all the basic capabilities of an MR spectrometer including RF and gradient waveform generation and signal acquisition for multiple imaging pulse sequences, as well as system calibrations and image reconstructions. The software is implemented in Python, and is designed so that users can quickly get their own SDR-based spectrometer running, and then develop their own sequences using the provided library of sequence elements.


Software Architecture: The gr-MRI package comprises a library of Python scripts, GNURadio flowgraphs, and two C++-based GNURadio flowgraph elements for sampled waveform generation and gated data acquisition. The package has three levels of operation: At the top user level is a set of Python scripts that are invoked to perform system calibrations, imaging scans, and image reconstructions. An entire scan session including RF power and center frequency calibrations and image reconstructions can be executed from the Python command prompt. At the second level of operation are the user-invoked Python scripts, which load sequence parameters from user-editable configuration files, define RF and gradient waveform objects using those parameters, and execute flowgraphs that play out those objects for data collection. Scan parameters such as TE, TR and matrix sizes are defined in the configuration files. The sequence flowgraphs are at the third level, and are responsible for mapping and playing out the RF and gradient pulses through the different channels of the SDR hardware, recording incoming signals into data vectors that can be accessed at the script level once the scan has finished, and synchronizing the channels of the SDR. The software package also provides libraries of RF and gradient waveform elements and template pulse sequences for the user to create custom pulse sequences.

Imaging Experiments: To demonstrate the gr-MRI package, MR imaging experiments were performed using a 0.5 Tesla (20 MHz) Maran tabletop scanner (Oxford Instruments, Witney, UK). Two synchronized USRP1 SDRs (Ettus Research, Santa Clara, CA, USA), each comprising an Altera Cyclone FPGA, dual 64 MS/s, 12-bit ADC’s, and dual 128 MS/s, 14-bit DAC’s, were configured with two LFRX and two LFTX daughterboards comprising op-amps and SMA connectors to interface RF signals. The total cost for each SDR was roughly $1000. One SDR was used to transmit and receive RF signals (which were directly connected to the RF power amplifier and receive preamplifier, respectively), and the other was used to generate gradient waveforms, which were directly connected to the scanner’s gradient amplifiers, and TX enable pulses.


Figure 1 shows the center frequency and RF power calibration curves that are displayed when the power and center frequency calibration Python script is called. Figure 2 shows the GUI window that appears during an imaging sequence and dynamically displays the received signal. The user can interactively change any pulse parameter from the command line, and see its effect on the received signal. The user then tunes the pre-phasing gradients to center the signal, and runs the sequence. During acquisition, the window displays the current k-space line and signal that it acquires. After acquisition is complete the user invokes an image reconstruction based on a 2D IFFT, with or without RF chopping compensation. Figure 3 shows acquired gradient and spin echo images of a 3D printed phantom (Fig. 3A) immersed in a 15 mm-diameter tube of doped water. Figure 4 shows inversion recovery images in an oil phantom, which reflect the expected oil T1 of approximately 150 ms.


We have presented a software package that extends the GNURadio SDR software to enable MRI experiments. The software was validated in spin-echo, gradient-echo, and inversion recovery imaging experiments at 0.5T using a commercially-available software-defined radio (the USRP1). The software will enable users to develop custom, low-cost MR spectrometer systems without requiring custom hardware design. The software package can be downloaded at


This work was supported by NIH R21 EB018521.


[1] CJ Hasselwander et al, ISMRM 2015, p. 710. [2] W. Tang et al. Meas Sci Technol, 22:015902, 2011.


The GNU Radio GUI window displays the received signal each TR

Pop up windows from center-frequency calibration (left) and RF power calibration (right). The red vertical line on the signal-frequency plot indicates the detected center frequency, and the red dot on the signal-pulse amplitude plot indicates the detected 90-degree pulse amplitude.

A) 11mm by 8mm 3D printed Vanderbilt University logo shaped phantom was immersed in copper sulfate doped water. B) SDR Spin Echo acquisition. C) SDR Gradient Echo acquisition.

Images acquired using the gr-MRI Spin Echo Inversion Recovery sequence with TI values shown. The phantom was a 15mm nmr tube filled with sunflower seed oil.

Table of sequence parameters for each scan presented

Proc. Intl. Soc. Mag. Reson. Med. 24 (2016)