The impact of gradient non-linearity on Maxwell compensation when using asymmetric gradient waveforms for tensor-valued diffusion encoding
Filip Szczepankiewicz1,2,3, Cornelius Eichner4, Alfred Anwander4, Carl-Fredrik Westin1,2, and Michael Paquette4
1Harvard Medical School, Boston, MA, United States, 2Radiology, Brigham and Women's Hospital, Boston, MA, United States, 3Clinical Sciences Lund, Lund University, Lund, Sweden, 4Neuropsychology, Max Planck Institute for Human Cognitive and Brain Sciences, Leipzig, Germany


Gradient non-linearity distorts the shape of the gradient waveform used for diffuison encoding. This distortion also compromises Maxwell compensation in asymmetric gradient waveforms. We show that one of two strategies for Maxwell compensation fails under non-linear gradiets (K-nulling) whereas M-nulling is immune to this effect.


Field gradients for imaging and diffusion encoding exhibit non-linearity (GNL). This non-linearity affects both the strength and direction of diffusion encoding, i.e., it perturbs the B-matrix a.k.a. the B-tensor (1). This error can be corrected by mapping the actual B-tensor field as a function of position, and accounting for it in subsequent analysis. However, when asymmetric gradient waveforms are used, for example for efficient tensor-valued diffusion encoding, GNLs may also affect the delicate compensation for concomitant gradients, or the so called 'Maxwell compensation' (2). In that case, the concomitant gradients cause a residual dephasing vector at the end of the encoding which may corrupt the measured signal and confound the analysis (2,3).
$$$~~~~~$$$The aim of this study was to investigate how GNLs affects Maxwell-compensated asymmetric gradient waveforms. We demonstrate the effects at the Connectom system, where ultra-high gradient amplitudes and severe non-linearities exacerbate the concomitant gradients and their impact on signal accuracy.


The field gradient produced by each coil is specific to its geometry and can be measured or obtained from the vendor. The departure from ideal linear gradients can be described by spatially-varying "gradient coil tensors" $$$(\mathbf{L})$$$ which are calculated from the spatial partial derivative of the effective fields (1). In general, GNLs become more severe as the size of the coil is reduced, inflating the problem for, for example, insert gradient coils.
$$$~~~~~$$$Gradient waveforms for tensor-valued diffusion encoding can be optimized using two different types of Maxwell compensation, namely socalled M- and K-nulling (2). Briefly, $$$\mathbf{M}$$$ and $$$\mathbf{K}$$$ are matrices that capture the magnitude of the concomitant gradients, calculated from the desired gradient waveform $$$(\mathbf{g}_\mathrm{d}(t)=[g_x(t)~g_y(t)~g_z(t)]^T)$$$, according to (2)
where integration is over the duration of the diffusion encoding, $$$t$$$ is time, and $$$h(t)$$$ is a function that shows the direction of spin dephasing. We note that both matrices are proportional to the square of the gradient waveform, showing that the problem increases with increasing gradient amplitude. If $$$\mathbf{M}$$$ and $$$\mathbf{K}$$$ are zero, the effect of concomitant gradients is negligible. Nulling $$$\mathbf{M}$$$ during waveform optimization ensures negligible effects from concomitant gradients (Maxwell compensation) for arbitrary rotations of the waveform, whereas nulling $$$\mathbf{K}$$$ is more efficient, but does not allow for arbitrary rotation. Since spherical encoding does not require rotations, this restriction is circumvented, facilitating the highest efficiency for K-nulling.
$$$~~~~~$$$We estimate the impact of GNL on the Maxwell compensation by simulating imperfect gradient waveforms using gradient coil tensors from the Connectom system (4). After optimizing the desired gradient waveform $$$(\mathbf{g}_\mathrm{d})$$$ tailored to the system (2,5), the actual gradient waveform $$$(\mathbf{g}_\mathrm{a})$$$ is calculated as $$$\mathbf{g}_\mathrm{a}(\mathbf{r},t)=\mathbf{L}(\mathbf{r})\mathbf{g}_\mathrm{d}(t)$$$ at position $$$\mathbf{r}$$$ (1). The signal error is estimated in the 'concomitant gradient analysis toolbox' (2,6,7) assuming a spin-echo with EPI readout using the parameters detailed in Table 1.


Figure 1 shows gradient waveforms optimized using M- and K-nulling; both are Maxwell-compensated in the absence of GNLs because the desired concomitant gradient waveform has a residual k-vector with negligible magnitude at the end of the encoding. However, when non-linearity is introduced, the Maxwell compensation is preserved for M-nulling, but not for K-nulling. Figure 2 shows the expected signal error caused by concomitant gradients in a brain-shaped volume centered on the iso-center. The error increases further away from the iso-center, and reaches 30% signal loss approximately 9 and 6 cm from the iso-center for a slice thickness of 2 and 5 mm, respectively. Figure 3 shows that K-nulling is likely to suffer marked errors throughout the FOV, especially for thicker slices, whereas M-nulling is immune to concomitant field effects caused by GNLs.

Discussion and conclusions

We demonstrate that gradient non-linearity compromises Maxwell compensation when K-nulling is used, whereas M-nulling is immune to the perturbation. Therefore, we recommend M-nulling for any MRI system that suffers prominent gradient non-linearity and/or uses high gradient amplitudes. Since the signal error depends on a wide range of system, imaging, waveform and object parameters we suggest that the impact of GNLs be predicted in simulations; this investigation is enabled by methodology and tools found in refs. (2,4,7). We expect that this effect is smaller at conventional MRI systems, however, it will remain especially relevant as the dMRI field pushes toward ever higher gradient amplitudes and compact coil designs.


We acknowledge the following research grants NIH P41EB015902, NIH R01MH074794. This study was supported by grants from Swedish Research Council (2016-03443). MP is supported by a NSERC scholarship (PDF-502732-2017) from Canada. CE and MP are supported by the SPP2041 program "Computational Connectomics" of the German Research Foundation (DFG).


[1] R. Bammer, M. Markl, A. Barnett, B. Acar, M. Alley, N. Pelc, G. Glover,and M. Moseley, “Analysis and generalized correction of the effect of spatial gradient field distortions in diffusion-weighted imaging.” MRM, 2003.

[2] F. Szczepankiewicz, C.-F. Westin, and M. Nilsson, “Maxwell-compensated design of asymmetric gradient waveforms for tensor-valued diffusion encoding.” MRM, 2019.

[3] C. A. Baron, R. M. Lebel, A. H. Wilman, and C. Beaulieu, “The effect of concomitant gradient fields on diffusion tensor imaging.” MRM, 2012.

[4] M. Paquette and C. M. W. Tax, “https://github.com/mpaquette/gnlcwaveform” GitHub code repository, 2019.

[5] J. Sjölund, F. Szczepankiewicz, M. Nilsson, D. Topgaard, C.-F. Westin, and H. Knutsson, “Constrained optimization of gradient waveforms for generalized diffusion encoding.” JMR, 2015.

[6] M. Nilsson, F. Szczepankiewicz, B. Lampinen, A. Ahlgren, J. D. A. Martins, S. Lasic, C.-F. Westin, and D. Topgaard, “An open-source framework for analysis of multidimensional diffusion MRI data implemented in Matlab.” Proc. Int. Soc. Magn. Reson. Med., 2019.

[7] F. Szczepankiewicz and M. Nilsson, “https://github.com/markus-nilsson/md-dmri/tree/master/tools/cfa” GitHub code repository, 2019.


Figure 1 - Examples of gradient waveforms that yield spherical tensor encoding (top row) with M- and K-nulling optimized for the Siemens Connectom scanner. The bottom row shows the perturbed gradient waveforms, the concomitant gradient waveform, and the k-trajectories of the concomitant gradient waveform (caused by non-linear gradients). In this example, T(r) is evaluated at position r = [0.1, 0.1, 0.1] m). M-nulling yields waveforms that are robust to GNL, whereas K-nulling does not (inset plots show non-zero k-vector at end of the encoding).

Table 1 - Parameters used in the simulation of the signal bias caused by GNLs and concomitant gradients. The sequence is assumed to be a spin-echo with a rectangular slice selection profile and echo-planar imaging readout. More information on how the error is simulated can be found in reference (2).

Figure 2 - When the waveforms are Maxwell-compensated by K-nulling, using a slice thickness of 2 mm, the relative signal errors within the brain mask reach approximately 40%. For M-nulling, the errors were negligible throughout the volume (data not shown). Top to bottom rows show sagittal, coronal and transversal slices, respectively.

Figure 3 - Boxplots show the distribution of relative signal error for M- and K-nulling at slice thicknesses between .1 and 10 mm in a cubic FOV that is 25 cm on each side. The top row shows that M-nulling is expected to exhibit negligible signal loss (worst error is below 0.006%). By contrast, K-nulling shows gross signal errors, reaching complete signal loss at a slice thickness above 1 mm, and as expected from theory (2,3), thicker slices increase the magnitude of the error.

Proc. Intl. Soc. Mag. Reson. Med. 28 (2020)