Simultaneous feedback control for joint field and motion correction in brain MRI

T2*-weighted gradient-echo sequences count among the most widely used techniques in neuroimaging and offer rich magnitude and phase contrast. The susceptibility effects underlying this contrast scale with B0, making T2*-weighted imaging particularly interesting at high field. High field also benefits baseline sensitivity and thus facilitates high-resolution studies. However, enhanced susceptibility effects and high target resolution come with inherent challenges. Relying on long echo times, T2*-weighted imaging not only benefits from enhanced local susceptibility effects but also suffers from increased field fluctuations due to moving body parts and breathing. High resolution, in turn, renders neuroimaging particularly vulnerable to motion of the head. This work reports the implementation and characterization of a system that aims to jointly address these issues. It is based on the simultaneous operation of two control loops, one for field stabilization and one for motion correction. The key challenge with this approach is that the two loops both operate on the magnetic field in the imaging volume and are thus prone to mutual interference and potential instability. This issue is addressed at the levels of sensing, timing, and control parameters. Performance assessment shows the resulting system to be stable and exhibit adequate loop decoupling, precision, and bandwidth. Simultaneous field and motion control in then demonstrated in examples of T2*-weighted in vivo imaging at 7T.

Contrast related to susceptibility effects scales with B 0 and is rich in structural detail. Therefore, T2 * -weighted imaging is particularly promising at high field, which both boosts T2 * contrast and enhances baseline sensitivity in favor of spatial resolution. However, boosting sensitivity to susceptibility effects and pushing resolution come with inherent challenges. In combination with motion, susceptibility effects cause field fluctuations and related artefacts when unaddressed ( Van de Moortele et al., May 2002, van Gelderen et al., Feb. 2007, Versluis et al., Jul. 2010. In brain imaging, this problem arises particularly from breathing motion, movement of shoulders and arms, and motion of the head itself. Besides moving body parts, field fluctuation and drift can also arise from hardware imperfections and thermal effects ( Jehenson et al., 1969, Boesch et al., 1991, Liu et al., Jan. 1994, Hu and Kim, May 1994, Wu et al., 2000, Clayton et al., Dec. 2001, Foerster et al., 2005, Lange et al., Jun. 2012 . Increasing resolution, on the other hand, generally increases vulnerability to motion of the imaged anatomy. The long scan times involved increase the range of motion that occurs while small voxel size exacerbates its impact in terms of artefacts and resolution loss. The first challenge, field fluctuation, is often addressed by retrospective data correction based on signal phase ( Wowk et al., Dec. 1997 ) or dedicated navigator acquisition ( Versluis et al., Jul. 2010 ), ( Noll et al., Oct. 1998, Liu et al., 2001, Durand et al., 2001, detecting only global field changes or also first-order terms ( Versluis et al., Jul. 2010 ), ( Glover and Lai, Mar. 1998, Jorge et al., Jan. 2018, van der Kouwe et al., 2006. The navigator approach has the advantage that it does not require additional hardware. However, it tends to increase the overall scan time and requires added care in sequence design to prevent detrimental spin-history effects. Retrospective correction of field fluctuation has also been demonstrated based on field sensing with NMR probes ( De Zanche et al., Jul. 2008 ). This approach permits higher-order correction ( Vannesjo et al., May 2015 ), ( Wilm et al., Jun. 2011 ) and avoids sequence overhead, albeit at the expense of added instrumentation. The main limitation of retrospective approaches is that they can recover image information only as far as it is still encoded in the perturbed data. For instance, they cannot undo through-plane dephasing or k-space undersampling upon bias in linear field terms.
These problems are overcome by prospective field correction. Online correction for global field changes is a long-standing practice in laboratory NMR and known as frequency locking ( Hofer et al., Aug. 29, 1978 ), ( Hoult et al., 1969 ). In MRI, prospective correction of zeroth-order field fluctuation was first based on navigator echoes ( Hu and Kim, May 1994 ). Later, real-time correction of breathing effects up to second order in space was accomplished with readings from a breathing belt and preceding calibration ( van Gelderen et al., Feb. 2007 ). Prospective correction has also been based on NMR probes for field detection, enabling runtime B 0 update ( Boer et al., Feb. 2012 ) as well as spatiotemporal control using dynamic actuation of gradient and shim fields ( Duerst et al., May 2012 ). Unlike navigators, this approach does not accurately cap-ture field perturbations that originate from the head itself. It is attractive, however, in that it yields real-time field tracking of high spatial order without scan time overhead. NMR field tracking has been found to be effective countering field perturbations in T2 * -weighted imaging, T2 * mapping and QSM at high field , ( Wyss et al., Oct. 2017 ), ( Özbay et al., Feb. 2018 ).
The second challenge, head motion, can also be addressed retrospectively as well as prospectively. Retrospective approaches counter motion effects by data correction and means of image reconstruction once data acquisition is completed ( Atkinson et al., Dec. 1997 ), ( Loktyushin et al., 2014 ). Similar to the case of field fluctuation, this strategy is limited by motion effects that cannot be reversed at the data level, including misalignment of excited volumes and local undersampling of k-space. In contrast, prospective motion correction performs continuous updates of the sequence geometry based on motion tracking during the scan. Tracking strategies fall broadly into three categories: navigators, optical means, and NMR markers. Navigators collect spatially encoded MR signal from the head itself, typically in the form of low resolution images ( White et al., Jan. 2010 ), ( Gallichan et al., 2015 ) or selected parts of k-space ( van der Kouwe et al., 2006 ), ( Welch et al., 2002 ). As a consequence, they generally require a certain degree of sequence alteration and scan time overhead. Optical methods use cameras to track headmounted markers ( Zaitsev et al., Jul. 2006, Maclaren et al., Nov. 2012, Spangler-Bickell et al., Jul. 2019, DiGiacomo et al., 2020 or the head itself ( Frost et al., 2019 ), ( Kyme et al., 2020 ). They come at no expense in terms of scan time but require a robust line of sight, which can be a challenge, especially through dense receiver arrays. Head-mounted NMR markers, finally, capture motion by observation of gradient fields and therefore do not require a line of sight ( Derbyshire et al., 1998, 101 , Dumoulin et al., 1993, ( De Zanche et al., Jul. 2008 ), ( Ooi et al., 2009, Ooi et al., 2011, Haeberlin et al., 2014, Sengupta et al., 2013. Localization of NMR markers has been achieved with dedicated sequence modules interleaved with imaging ( Ooi et al., 2009 ), superimposed highfrequency gradient tones ( Haeberlin et al., 2014 ), and also with unaltered imaging sequences ( Aranovitch et al., Apr. 2018 ).
As argued initially, certain imaging scenarios call for combined field and motion correction. This goal has been pursued in only a few contributions so far, relying mostly on navigator strategies. Retrospective correction of global B 0 change and head motion was reported in Ref. ( Jorge et al., Jan. 2018 ), combining navigators with passive NMR markers. The joint retrospective approach has recently been expanded to firstorder field correction , using fat navigators. A combined prospective and retrospective approach was presented in Ref. ( Lange et al., Jun. 2012 ) using an optical tracker and interleaved reference scans. Dual prospective correction with first-order field actuation has been achieved with cloverleaf navigators ( van der Kouwe et al., 2006 ), reaching a high tracking rate at relatively large expense of scan time (30 %) for navigation. More recently, similar functionality has been reported based on 3D EPI navigators ( Alhamud et al., Feb. 2016 ). In this implementation, sparser tracking at intervals of about 10 s is accomplished with less scan time overhead of approximately 10%.
The goal of the present work is to advance joint field and motion correction with a view to the demanding scenario discussed initially, i.e., high-resolution T2 * -weighted imaging at high field. For this case, dual correction should be prospective and deploy high-sensitivity, high-rate field and motion detection without adding to already long scan times. For use at high field it should also address higher-order field perturbation and be compatible with dense receiver arrays. To this end, we propose to combine higher-order field control based on NMR sensing ( Duerst et al., Feb. 2015 ) with motion correction equally based on NMR markers ( Haeberlin et al., 2014 ).
In combining the two correction techniques, it is important to consider that both are based on repeated sensing and adjustment of magnetic fields in the same volume of interest. They effectively form two simultaneous control loops operating on partly shared physical quantities and thus bear potential for mutual interference and instability. Field and motion control rely on two sets of NMR sensors. The field sensors (blue) are mounted around the head receive array, fixed in the laboratory frame of reference. For motion correction, NMR sensors are used as markers (green), mounted on a headset worn by the subject. Sensor data is acquired with a custom-made radiofrequency receiver. In each control cycle, derived motion parameters are forwarded to update sequence geometry (green path). For field correction, a proportionalintegral controller updates shim settings up to 3 rd order (blue path).
To address this aspect, the proposed strategy is described and analyzed from a control perspective with particular attention to pathways and effects of interference.
We report an implementation for head imaging at 7T. Along with technical performance assessment, dual control is demonstrated by T2 * imaging in vivo, including scenarios with instructed motion and increased field perturbation.

Methods
The proposed system combines two control loops, one for field stabilization and one for motion correction ( Fig. 1 ).

Field control
The task of the field control loop is to suppress changes in magnitude and spatial variation of the background magnetic field within the imaging volume. In this work, it is implemented in the fashion previously described in Ref. ( Duerst et al., Feb. 2015 ). A set of 16 field sensors around the volume of interest ( Fig. 1 ) measures the background magnetic field at regular intervals. Deviations from the target field distribution are translated into field corrections by a proportional-integral (PI) controller. The corresponding field actuation is performed by real-time 3 rd -order shim adjustment.

Prospective motion correction
Motion correction is performed prospectively, i.e., by continuous realignment of the sequence geometry with the head. Motion detection for this purpose is performed by tracking NMR sensors, acting as markers, mounted on a headset worn by the subject ( Aranovitch et al., Apr. 2018 ). Marker positions are derived from the phase time courses of marker FIDs acquired during short intervals of high-frequency gradient oscillations as detailed in Ref. ( Haeberlin et al., 2014 ). Joint processing of the marker positions yields rigid-body motion parameters that describe translation and rotation of the head relative to the initial pose. The motion parameters are forwarded to the console for corresponding update of gradient orientations as well as RF pulse and signal demodulation frequencies.

Control perspective
Automatic control generally seeks to keep certain process variables stable at given set points. To this end, each process variable is continuously measured and compared with its set point, yielding the which is then countered by changes to system inputs.
In the field control loop, the process variables are the values of the background magnetic field at the sensor positions. The set points are the field strengths observed in an initial reference state. The proportionalintegral controller translates observed field errors at t k into field corrections according to with proportional gain K p < 1 and integration time T i . Compared to mere proportional feedback, PI control offers better blocking of measurement noise at the expense of control bandwidth and removes bias of the stationary solution. This is the approach of choice here because noise in field measurements is significant, perturbations of the background field are relatively slow, and the overall control bandwidth is limited irrespectively by eddy currents induced by higher-order shim switching.
In the prospective motion correction (PMC) loop, the process variables are the parameters describing rotation and translation of the imaging volume relative to the head. The set points reflect the scan geometry chosen in the initial head pose. Unlike field correction, realignment of the imaging volume is done fully in each cycle and based only on the latest motion detection data, i.e., for each of the rotation and translation parameters. In control terms, this amounts to pure proportional control with full gain ( = 1 ), which achieves fast correction at the expense of susceptibility to measurement noise. This is adequate because head motion can be relatively fast and sequence geometry update is effectively instantaneous while detection noise in motion parameters is less prominent than in field measurements.

Potential interference
When operated simultaneously, the two loops are subject to mutual interference and thus potential instability because both sense and manipulate magnetic field in a shared volume of interest. They also overlap in terms of the targeted frequency bands, which range from DC to 2 Hz for the background field and to approximately 10 Hz for motion.
The first kind of interference is any change in detected motion caused by field actuation. This pathway is inhibited by exploiting the fact that the gradient dynamics used for motion detection do not need to be in the same spectral range as the motion itself. Instead, motion detection is based on high-frequency field dynamics, using short gradient tones in the kHz range and high-pass filtering of marker observations. In addition, motion detection and field updates are well separated in time to prevent the high-frequency content of shim switching from contaminating motion readouts. For most sequences, separation by at least several ms is straightforward. This alone may not suffice, however, in the presence of mechanical resonances of gradient coils, which may have lifetimes in the same order of magnitude or longer . Mechanical resonances are also subject to change in amplitude and lifetime upon heating of gradient coils. Therefore, as an additional precaution, the tone frequencies are chosen well clear of the mechanical resonances of the gradient system.
Interference in the reverse direction, i.e., influence of geometry update on the measurement of background field, must equally be avoided. Geometry updates slightly alter the relative contributions of the three physical gradient chains to each gradient object in a sequence. Therefore, they also cause subtle differences in eddy currents and mechanical resonance behavior after gradient switching. To limit cross-talk of these effects into the field control loop, the field measurement should not be performed immediately after the switching of gradients that are subject to update. For similar reasons, it should not closely follow phase encoding gradients, whose amplitude and thus eddy current effects change from repetition to repetition. In steady-state and balanced sequences, the same holds for spoilers and rephasers, respectively, in the phaseencoding direction. In principle, these considerations can be circumvented by performing the field measurement at the echo time during the readout gradient. In this case, capturing eddy current and resonance effects is actually welcome because they affect image acquisition in the same way, so countering them by field control will be beneficial. However, in the presence of geometry updates, the field control loop would need to be informed of the current gradient demand on every axis, relying on known and perfectly reproducible latency of the PMC loop, which can be challenging due to small jitter in the time interval until a requested geometry update is executed.

MRI system
Experiments were performed on a 7T Achieva system (Philips Healthcare, Best, The Netherlands), equipped with a third-order shim system including a zeroth-order, five second-order, and seven third-order shim coils, of which the Z0 and Z2 coils are actively shielded. First-order shimming was performed via the gradient system by analog addition of shim demand to gradient amplifier inputs. All shimming was performed without eddy current compensation. Radiofrequency excitation and detection were performed with a volume transmitter and a 32-channel head receive array (Nova Medical, Wilmington, Massachusetts, USA).

Imaging
For imaging, a T2 * -weighted gradient-recalled echo sequence was set up with flow compensation and the following parameters: resolution = 0.4 × 0.4 × 1.5 mm, TE = 25 ms, TR = 50 ms, pixel bandwidth = 144 Hz, duration = 8:23 min. A trigger (TTL pulse) was added in a time window between the readout gradient and the crusher gradient, 0.33 ms after the end of the readout gradient, triggering excitation and signal acquisition of the field sensors ( Gross et al., Dec. 2016 ). Balanced sinusoidal gradients with an amplitude of 7 mT/m and of frequencies 2 kHz, 3 kHz, and 4 kHz were inserted 0.53 ms after the readout gradient ( Fig. 2 ) and not rotated by PMC, reflecting the goal to minimize interference between the two loops.
Images were reconstructed using standard Fast Fourier Transform.

Field control
Sixteen long-lived 19 F-based field sensors (T1 = 86 ms, T2 * = 24 ms) were mounted on a frame inserted between the transmit and receive arrays as described in ( Engel, 2018 ). Signal acquisition was performed upon every other TTL trigger. Data were acquired over 4.51 ms. The signal from 1.5 ms to 4.5 ms was used to compute field values. The gain of the proportional-integral controller was K p = 0.27 and the integration time was T i = 0.07 s.
The static field responses to unit input demand were successively calibrated for each shim coil and stored in a matrix C with C ij being the static field response at the position of the i -th field sensor under actuation of the shim j with unit voltage. During loop operation, observed field error was translated into shim input errors and shim updates were computed by the controller. The measurement and correction rate was 10 Hz. The latency of the field control loop, i.e., the time between reception of field values and shim actuation, was between 3 and 9 ms.
The target field values were determined during a 10-second calibration run of the sequence, thus including the influence of shimming, eddy currents, and mechanical resonance of gradient coils.

Prospective motion correction
For PMC, the positions of four short-lived 19 F-based NMR markers (T1 = 2.1 ms, T2 * = 1.2 ms) were tracked based on initial calibration as described in ( Haeberlin et al., 2014 ). For characterization experiments and phantom imaging, the markers were mounted on a phantom in approximately tetrahedral arrangement. For in vivo imaging, they were mounted on a 3D-printed headset. Signal excitation and acquisition was performed upon each trigger received from the scanner. The first 1.2 ms of the signal were used to compute the sensor positions. The associated rigid-body transformation relative to the set points was obtained using the algorithm described in ( Umeyama, Apr. 1991 ). The set points were fixed at the beginning of the first scan and used for all successive scans. Geometry updates were sent to the scanner host via a TCP connection using an external data interface ( Smink et al., May 2011 ). The measurement and correction rate was 20 Hz with a latency of 50 to 100 ms.

System characterization
As a metric of field stability, the root-mean-square deviation (RMSD) of field readouts from the respective target value was computed and averaged across the sixteen sensors. This metric assesses field control at the probe positions and reflects the success of field control inside the head to the degree that dynamic fields present there can be expanded in terms of the 3 rd -order spherical harmonics spanned by the shim system. Residua due to higher-order fields, including dynamic fields due to head motion, will show as image artefacts. Image quality thus forms the ultimate metric of the success of field control. Variation of motion parameters is reported in terms of standard deviation (STD). The effectiveness of PMC was assessed at the level of resulting images, specifically by inspection of difference images.

Loop interference
To assess the effect of field actuation on the PMC loop, the field controller output was replaced by a sequence of stepped boxcar inputs to the gradients and shims. The strength of gradients and shims is reported in terms of related maximum excursion of the Larmor frequency in a sphere of 20 cm diameter at the isocenter, indicated as [HzMax20]. The amplitude of the boxcar inputs ranged from few HzMax20, reflecting typical physiological perturbations, to dozens of HzMax20 to assess the system's behavior under strong field actuation. All shim terms were actuated successively over a duration of 6 seconds per input, interleaved by phases of zero input equally lasting for 6 s. Zeroth and first-order shims were actuated with input steps of 2, 6, and 20 HzMax20. Second and third-order shims were actuated with decreased input steps of 1, 3, and 10 HzMax20 because physiological effects are smaller in higher-order terms. To accommodate the full range of respective characterization experiments within a single run of the sequence, its duration was doubled by increasing the number of slices. These experiments were performed without and with geometry updates in the PMC loop.
Input steps corresponding to rotations about the three axes were used to inspect the robustness of the field control loop in the presence of geometry updates. Each geometry update was applied for 6 seconds, before returning to the default geometry for another 6 s. The imaging volume was rotated about the X, Y and Z axis separately with amplitudes of ± 1°, ± 3°, ± 10°, and ± 30°. Field values and motion parameters were tracked without and with field control.

Fig. 2.
Gradient-recalled echo sequence with flow compensation. Marker localization for motion correction was performed with sinusoidal gradients of three different frequencies, followed by 3 rd -order measurement of the background field for field control.

Characterization of simultaneous control loop operation
Upon simultaneous operation of the two loops, coupling could potentially lead to instability and divergent behavior. To test stability under inputs of any frequency, the two control loops were operated simultaneously under the influence of the broadband detection noise naturally present in their sensor inputs.
All four possible modes of control were carried out, i.e., with both loops inactive, with either one of the loops active at a time, and with both loops active simultaneously. Field and motion parameters were recorded throughout.

Phantom imaging
Phantom imaging was performed to assess whether simultaneous control is detrimental to image quality in any way. Data were acquired in four conditions: without correction, with either correction at a time, and with both corrections. For comparison, data without correction was acquired a second time as a basis for difference images.

In vivo imaging
In vivo imaging was performed according to the applicable ethics regulations with healthy volunteers who gave written informed consent. Field traces and motion parameters were recorded throughout. Experiments were performed in a normal breathing scenario as well as with increased perturbations.

Normal breathing
A healthy volunteer (BMI = 21) was scanned and instructed to avoid intentional motion during the scans. Image data was acquired for the different combinations of PMC and field control, i.e., without correction, with either correction at a time, and with both corrections.

Increased field perturbation
A second dataset was acquired in a healthy volunteer with higher BMI = 28, which is known to entail stronger field perturbations by breathing. The volunteer was again instructed to lie still during the scans. Imaging was performed without any correction and with both corrections.

Instructed motion
To mimic conditions of a subject with difficulties lying still, in a third set of scans the first volunteer was instructed to repeatedly switch between crossed and parallel position of the legs. Instruction to change position was given by an acoustic signal every 1:15 min. Again, scans were performed without any correction and with both corrections.

Code and data availability
The applicable ethics approval requires that all data be strictly anonymized. Therefore, we opt not to make the entire data sets available due to the possibility of identifying volunteers by advanced image processing. All analyses were performed using standard Matlab functions. Fig. 3 shows field sensor traces and time series of motion parameters acquired in the presence of boxcar inputs of varying amplitude to the shim channels. The field traces reflect the shim switching with varying excursion depending on the sensor position. For certain shim terms, the field response closely follows the boxcar demand while others show transient overshoots and delayed settling. This expected behavior reflects cryostat eddy currents induced by the unshielded higher-order shim coils as detailed in ( Vannesjo et al., Oct. 2017 ). The important finding from this data is that changes in shim fields did not affect the concurrently acquired series of motion parameters ( Fig. 3 c), which fluctuated only stochastically with standard deviations in the order of 10 m and 0.01° ( Fig. 3 f). Robustness of motion detection against shim switching is confirmed by the same behavior after closing the motion control loop, i.e., with continuous geometry updates ( Fig. 3 (e, g)). (k-o) axes. The geometry changes cause slight bias in motion parameters, up to about 50 m of translation, which occur upon large FH rotations. The biases occur only with one sign of rotation, which may relate to a slight polarity dependence of gradient amplifier behavior.

Effects of motion updates
Geometry updates also perturb the background magnetic field ( Fig. 4  c, h, m). These effects are small for rotations in the typical range of patient head motion ( ± 1°and ± 3°) but reach more significant field offsets upon large rotations ( ± 10°and ± 30°). They are likely caused by alteration of eddy current patterns upon rotation of the imaging sequence, as discussed in the Methods section. The field perturbations are automatically countered when closing the field control loop ( Fig. 4 e,j,o). Brief residual field excursions are still caused by large, sudden rotations ( Fig. 4 o), reflecting finite control bandwidth. Fig. 5 shows measured field and motion parameter traces obtained without any actuation, with field control only, with motion control only, and with simultaneous control. The RMSD of the field, averaged over the sensors, and the STD of recorded motion parameters are given in the adjacent tables ( Fig. 5 (e, f, k, l)). They were taken only over the second half of the experiment to exclude the initial transition of longlived eddy currents into steady-state, which is visible in the field traces (a) and (g).

Simultaneous field and motion control
The observed motion parameters show the same range of fluctuation in all four cases. At STD of 10-17 um for translation and 0.008-0.015°f or rotation they exhibit the same levels of stability as previously with field actuation only. However, the field behavior differs between the different control modes. Prospective motion correction increases field fluctuation as may be expected based on the results shown in Fig. 4 . This effect is most prominent without field control where it roughly doubles the field STD. Field control, by itself, increases the noise level slightly ( Fig. 5 (a,c)), reflecting amplification of noise outside the control bandwidth, which is common in PI control systems ( Duerst et al., Feb. 2015 ). In combination with motion correction, the effect of field control is dominated by its ability to reduce field perturbation caused by geometry updates ( Fig. 5 (g,i)), achieving a net reduction of the field RMSD.
Besides these details, Fig. 5 shows the key result that simultaneous operation of the two control loops is stable at virtually no expense in terms of either field or motion sensitivity. This indicates that the residual coupling between them is sufficiently small to prevent feedback from escalating detection noise and direct mutual perturbation in a detrimental fashion. Fig. 6 shows a slice of the phantom imaging results, which serve to verify that joint control does not have detrimental side effects at the imaging level. To highlight subtle features, zoomed details are provided as well as differences from a reference image acquired without any control. The difference images are scaled to + /-30% of the maximum intensity of the reference dataset. With all modes of control, resulting images match the reference very closely.

Phantom imaging
The difference between the two no-control results ( Fig. 6 , third column, first row) reflects the general reproducibility of the imaging procedure. It shows subtle discrepancies of uncertain origin, which may include slight changes in background and shim fields as well as the common stability limits of RF chains and clocking. The images obtained with different modes of control differ more, albeit very slightly. With prospective motion correction only, edges of the phantom and enclosed bubbles are slightly pronounced in the difference image, which is to be expected due to finite precision of motion detection in the order of 10-20 um ( Aranovitch et al., Apr. 2018 ). Measurement noise involved in initial-

Fig. 4.
Motion parameters (b,d,g,i,l,n) and field traces (c,e,h,j,m,o) recorded in the presence of forced rotations of sequence geometry between 1°and 30°(a,f,k). Large rotations cause slight bias in translation parameters. By altering eddy currents they also introduce field excursions (c,h,m), which are largely eliminated by field control (e,j,o). (p) average root-mean-square deviation (RMSD) and standard deviation (STD) of field readouts and motion parameters, respectively.

Fig. 5. Field traces and motion parameters acquired without correction (a-b), with field control only (c-d), with prospective motion correction only (g-h)
, and with joint prospective motion correction and field control (i-j). (e,f,k,l) average root-mean-square deviation (RMSD) and standard deviation (STD) of field readouts and motion parameters, respectively.

Fig. 6.
High-resolution T2 * -weighted imaging of a gel phantom with small air inclusions for structural contrast. Imaging was performed in four ways: without any control, with prospective motion correction only, with field control only, and with joint control. Subtraction from a second image without control emphasizes subtle differences (right). Frequency-encoding direction: vertical. Phase-encoding direction: horizontal. izing motion control could be an additional cause. With field control only, somewhat more pronounced internal features and subtle ghosting in the difference image likely relate to the slight elevation in field noise observed earlier. The result obtained with joint control arguably combines these effects, albeit still at so subtle a level that they are hard to attribute. Overall, these results confirm that simultaneous control was stable and its finite sensitivity did not impair imaging in the absence of motion and significant field perturbation. Fig. 7 shows the field and motion parameters recorded during the phantom imaging experiments. The data illustrates that field control removed long-term field drift, which was most likely of thermal origin. The motion parameters exhibit a transition at half the scan time, which does not reflect actual motion but is an artefact related to the phaseencoding gradient changing polarity as it transitions through zero. It is likely of the same nature as the similar effect observed in Fig. 4 , which was equally on the order of 50 um. The fluctuation ranges of the field and motion recordings are reported in Table 1 and Table 2 . Fig. 8 shows two slices of a set of brain images acquired without deliberate subject motion, again obtained without correction, with prospective motion correction only, with field control only, and with joint control. Differences from the fully corrected case are scaled to ± 30 % of maximum intensity. Without field control (1 st and 3 rd rows), the images suffer from intensity modulations mostly in the right posterior re-gion and the anterior part of the lower slice. Without motion correction (1 st column), motion artefacts are visible in the anterior parts of both slices. Blurring and ringing due to motion are visible at the interhemispheric fissure. Field control (2 nd and 4 th row) removed the intensity modulations whereas motion correction (2 nd and 6 th column) removed blurring and ringing. Both types of artefacts are eliminated by simultaneous correction. For example, small vessels near ventricle in the lower slice are sharply depicted only with dual control.

In vivo imaging
Tissue motion and related artefacts are greatest in the anterior part of the brain because it is the farthest from the occipital pivot point. Conversely, field perturbations are strongest in the posterior inferior part of the brain due its greater proximity to the chest, shoulders, and arms . Fig. 9 shows the tracked field and the motion parameters corresponding to Fig. 8 . Without field control, the field traces exhibit regular breathing patterns up to 6 Hz peak-to-peak and a slow drift similar to that observed in the phantom experiment ( Fig. 7 (a, e)). In Fig. 9 e, at about 140 s a sudden field change occurs that is likely due to limb motion. With field control, the background field is kept stable throughout. The motion parameters are of comparable range across the four experiments. Breathing-related motion is conspicuous as regular translation along FH and rotation around RL. Fig. 9 b and Fig. 9 f include sudden motion events, after which the head returns approximately to its previous position within a few seconds. These dynamics are likely associated with swallowing. The statistics of the recordings and derived shim inputs are reported in Table 1 and Table 2 , respectively.  . 8. In vivo brain imaging performed without correction, with prospective motion correction only, with field control only, and with joint control, including differences relative to the fully corrected case. Fig. 10 shows imaging results obtained in the presence of increased field perturbations related to higher BMI. Without either correction, this more challenging scenario led to significantly impaired image quality, with blurring, regional shading effects, and motion artefacts. With simultaneous control, these problems are strongly mitigated, recovering features such as vessels and gray-white-matter boundaries. Fig. 11 shows field traces and motion parameters of the in vivo experiments with increased field perturbations. Field traces in Fig. 11 a shows that peak-to-peak breathing amplitude varied over time and is about 10 Hz at max, larger than in the normal breathing case ( Fig. 9 (a,  e)). Field drift during the acquisition is, as in Fig. 7 and Fig. 9 (a, e), present. In the corrected case, the field is stabilized to baseline. One event occurred at about 410 s for which the controller needs one second to stabilize the field. Such behavior is expected for field perturbations with frequency content beyond the controller bandwidth. Motion was moderate in both experiments within expected amplitudes for a cooperative subject. As in Fig. 9 , translation in FH and rotation around RL follow breathing dynamics. The corresponding field RMSD and motion  Table 1 , and the RMSD of the field translated in shim terms are reported in Table 2 . Fig. 12 shows three slices of in vivo experiments with instructed motion. The subject was instructed to change leg position every 75 s and lie still the rest of the time. The instructions were designed to mimic an uncooperative subject. Without correction and control, the homogeneity in white matter is corrupted and anatomical features such as gray-white matter boundaries are not distinguishable, e.g. in the regions shown in the close-ups. Inhomogeneity in white matter and motion blurring are particularly pronounced in these data and the overall image quality is strongly deteriorated. Image quality is recovered when both prospective motion correction and field control are employed. The difference images to the corrected case highlights the differences. In all slices, intensity modulation, principally along RL, and motion artefacts, mainly at the anterior of the slices, are visible. The close-ups make the improvement of the image quality clear: gray-white matter boundaries are distinct and vessels near the ventricles are well depicted (slice 4). Fig. 13 shows the field traces and motion parameters corresponding to Fig. 12 . In the field traces ( Fig. 13 a), breathing dynamics are visible. Shifts in the field coincide with leg movements and large field excursions of up to two dozen Hz occur. The field excursions are mostly brought back to baseline in the experiment with joint corrections ( Fig. 13 c). Some imperfections in the field traces remain at times when legs were repositioned. Such changes yielded field changes covering a large bandwidth. As for Fig. 4 , field traces are not perfectly stabilized because of the finite bandwidth of the field control loop's controller. These imperfections did not lead to appreciable image quality deterioration (cf. Fig. 12 ). Motion parameters were comparable in the two experiments ( Fig. 13 (b, d)) with clearly visible head motion at times of leg movement. The corresponding field RMSD and motion parameters STD of the two experiments are reported in Table 1 , and the RMSD of the field translated in shim terms are reported in Table 2 . Table 1 presents the statistics of field fluctuation and motion parameters for all imaging experiments. On average, field control reduces the field RMSD from 1.952 Hz to 0.739 Hz. Feedback control achieved similar field stability in the phantom, the regular in-vivo scan, and the in-vivo scan with instructed leg motion. Residual field fluctuation was somewhat higher in the high-BMI case with greater perturbation by breathing. This reflects the fact that field changes due to breathing are relatively fast and a small fraction of them remains upon feedback compensation with finite bandwidth. The STD of recorded motion parameters was highly consistent in the phantom, at the level given by the precision of motion detection. In-vivo, the extent of motion naturally differed between different directions and perturbation regimes. It also varied among the scan repetitions for each of the three perturbation scenarios. However, motion was either of similar extent or more pronounced in the scans with PMC so that observed improvements in image quality can safely be attributed to motion correction. Table 2 presents the field RMSD translated in shim terms. A few observations can be made: the different shim terms are not used in the Fig. 10. In vivo imaging with increased field perturbation due to increased body mass index. same way. The terms which are most strongly used are the 0 th and 1 st order shim terms. The 2 nd and 3 rd order shim terms were used in the in vivo experiments but not much in the phantom experiments. The higher order spatial complexity of the in vivo perturbations were not equally represented by all 2 nd and 3 rd order shim terms. ZY, Z2, ZX, Z2Y, Z3, and Z3X are more represented than ZS2 for example. These shim terms were particularly solicited in the instructed motion experiments.

Discussion
According to these results, the proposed strategy of simultaneous field and motion control is feasible and effective. In particular, simultaneous control has been found to be stable although the two feedback loops operate on the same physical quantities. This indicates that the measures taken to decouple the loops have been successful.
Notably, robust operation has been accomplished without compromising the sensing precision in either loop. At ≤ 0.017 mm and ≤ 0.015°t he precision of translation and rotation sensing is competitive with ( Haeberlin et al., 2014 ), ( Aranovitch et al., Apr. 2018 ), which report current NMR-based implementations of motion tracking alone. Likewise, with a field sensing precision of ≤ 0.472 Hz, our results are very similar to those reported in ( Duerst et al., Feb. 2015 ). At these levels of precision, propagation of residual measurement noise translates into hardly noticeable degradation according to the high-resolution phantom results. With sensing bandwidths of 20 Hz for PMC and 10 Hz for field control, adequate correction bandwidths of 20 Hz and about 2 Hz, respectively, have been reached.
Simultaneous control has been shown to be effective in T2 * imaging in vivo under normal and challenging conditions with increased field perturbation and unrest emulated by leg motion. Notably, in all circumstances dual correction yielded clearly superior image quality compared to either single correction. This implies that, for T2 * imaging and related purposes such as SWI and QSM, advancing either type of correction alone faces diminishing returns. The benefit from addressing both problems in concert will be most pronounced at high field, at high resolution, and in patients with difficulty to cooperate. One prominent realm of application will thus be high-field T2 * scanning in studies of neurodegeneration.
While simultaneous control did prove to be stable, this study also illustrates that cross-talk does still occur. Specifically, geometry updates had slight effects on field control, indicating that rotation of gradients altered eddy-current and vibration effects that persist for some time after gradient switching. However, the PMC loop was not sensitive to shim operation by virtue of relying on high-frequency field dynamics. Therefore, field disturbances induced by geometry updates did not propagate back into the motion loop, preventing potential instability. For common head movements, the cross-talk effects were weak and in the noise range. Only for very large sequence rotations of + /-30°, the cross-talk effect became substantial. Still, even in this case field control brought the field back to baseline within one cycle of 100 ms.
Eddy-current and vibration effects vary even without geometry updates, e.g., after variable phase-encoding and spoiler gradients. To avoid related confound, field measurement was performed between the readout and spoiler gradients. As stated in the methods section, the arguably best option would be to perform the field measurement at the echo time of the imaging sequence. This is conceptually straightforward but will require additional real-time communication to adjust the target values of field control along with the scan geometry.
Motion sensing, on the other hand, while not affected by field control, was found to be subject to a minor source of error evident from the motion parameters obtained in the phantom experiment. Small sudden shifts occurred when the phase encoding gradient changed sign. This suggests slightly different behavior of the gradient amplifiers depending on polarity, which however remains to be verified. At about Fig. 11. Field traces and motion parameters of in vivo imaging with increased field perturbation. 0.05 mm, the related error was small compared to the resolution and did not visibly affect imaging results. To prevent this type of error and for even higher precision, motion tracking could be enhanced by realtime field tracking in the laboratory frame ( Aranovitch, 2020 ), which permits accounting for subtle changes in gradient output.
Settling behavior and correction bandwidth of a proportionalintegral controller are governed by the choice of proportional gain and integration time, the sensing bandwidth, the plant's transfer function, and the latency of the control loop. Outside the control bandwidth, per-turbations are not rejected and, just above the band limit, even amplified. Tuning of the field controller is hence a compromise between correction bandwidth and noise level. In our setup, sufficient bandwidth for suppressing effects of breathing and limb motion is achieved at only slight noise amplification (from 0.471 Hz to 0.713 Hz). To increase control bandwidth, the most limiting factors should be improved. To reduce latency, computation and digital communication must be accelerated while higher-rate sensing can be achieved with field probes with faster recovery (   Feb. 2018 ). Generic ways of enhancing the shim bandwidth are active shielding ( Mansfield and Chapman, Jul. 1986, Mansfield and Chapman, 1969, Turner, Jan. 1993 and matrix pre-emphasis as described in ( Vannesjo et al., Oct. 2017 ).
The motion correction loop used in this work is a simpler control system in that it relies on purely proportional feedback. At unit proportional gain, it is not affected by constant offset and thus does not require an integral term and associated tuning. Proportional-integral control as used for field stabilization would reduce sensitivity to detection noise at the expense of control bandwidth and thus be adequate only at higher rates of motion detection and update.
Unlike previous work tackling both motion and physiological field perturbation, the reported implementation deploys dynamic shimming up to 3 rd order. Our results confirm the relevance of 2 nd -and 3 rd -order shimming for in vivo measurements as discussed in ( van Gelderen et al., Feb. 2007 ), ( Versluis et al., Jul. 2010 ), ( van Rooden et al., May 2012 ), ( Vannesjo et al., May 2015 ),  (cf. Table 2 ). For field control with yet more spatial accuracy, both field sensing and field actuation will need to be advanced.
To advance field sensing, one option is to use more accurate models of how field readouts at the probe positions relate to actual field patterns in the head. For perturbation due to breathing, this has been achieved with a learning approach based on dynamic B0 mapping along the respiratory cycle ( van Gelderen et al., Feb. 2007 ), ( Andersen et al., May 2016, Gross et al., May 2016, Vannesjo et al., Sep. 2018 ). On the actuation side, spherical harmonic shimming up to 3 rd order has been found to be adequate in this work. More spatial diversity can be required in low regions of the brain that are closer to sources of perturbation such as the chest, shoulders, and arms . To this end, the shim hardware should be optimized for related field patterns, demanding designs that deviate from traditional sets of spherical harmonics. The shim coils could be brought closer to the subject, increased in number, and tailored in terms of geometry. Promising advances in this direction have recently been reported in ( Juchem et al., Oct. 2011 , Harris et  Field control as performed in this work chiefly targets perturbations that originate from sources outside the head, using external means of field sensing and actuation. This approach is justified by fundamental magnetostatics, which state that the field in a source-free volume can be fully known and canceled by measurement and currents, respectively, on the surface. In this case, the relationship between sensing results and best shim settings is straightforward. With internal sources, external measurement and correction are intrinsically incomplete and best shim settings are harder to determine. Internal sources can be of concern. For instance, due to its susceptibility the head itself is a source of magnetic field and thus causes field perturbation when it moves ( Jezzard and Clare, 1999, Sulikowska et al., May 2014, Bischoff et al., Apr. 2017. A prominent example is change in the orientation of the frontal sinuses, which alters the field in the prefrontal cortex. At 7T, this effect has been found to reach the order of 1.3 Hz per degree of rotation ( Tong et al., 2011 ). Movement of parts of the head such as swallowing likewise cause field variation ( Birn et al., Jul. 1998 ). When the head moves as a whole, related change in field that emanates from it will be picked up by external sensors. However, compensation of such field by shims and thus by external sources is inevitably incomplete and subject to systematic error when calibrated based on shim fields alone.
In the present work, these mechanisms were not found to impede field control. The observed improvements in image quality indicate that field correction bias due to internal sources, if present, was not detrimental. This is consistent with a study that performed field control in 10 subjects of wide-ranging BMI, involving normal and deep breathing . Greater perturbation from internal sources, e.g., at field strengths yet higher than 7T or upon extensive motion, could be addressed by dynamic B0 mapping, which effectively performs internal field sensing via NMR in the tissue. Such mapping could be performed in a navigator approach during actual imaging ( Versluis et al., Jul. 2010 ), ( Alhamud et al., Feb. 2016 ), ( van Rooden et al., May 2012 ), ( Ward et al., Nov. 2002 ), ( Yarach et al., Jun. 2016 ) or beforehand, in a learning phase that relates dynamic B0 maps to run-time readouts such as motion parameters ( Bischoff et al., Apr. 2017 ) or readings from a breathing belt Table 2 Root-mean-square deviation (RMSD) of the field translated in shim terms for all imaging experiments in [HzMax20] notation.  ( van Gelderen et al., Feb. 2007 ) or external field probes ( Gross et al., May 2016 ), ( Wezel et al., Oct. 2017 ). Alternatively, field bias by head motion could be estimated by calculating the field emanating from the head using a susceptibility model ( Marques and Bowtell, 2005 ). In this work, combined field and motion correction has been demonstrated for generic T2 * -weighted spin-warp imaging but is not limited to this type of sequence. It should generally benefit all modes of head imaging and spectroscopy that are sensitive to off-resonance, especially those using gradient echoes with long echo time and/or long readouts. For implementation of the dual control loop the only requirement is suitable timing of the sensing intervals as detailed in the Methods section. The field should be measured outside of sequence gradients and away from switching gradients, i.e., in a silent part of the sequence. This is often possible. Separation from preceding gradients that change between repetitions, such as phase encoders, should ensure that related eddy current effects are sufficiently small. Sequences that are too densely populated with gradient elements such as, e.g., steady-state techniques with minimal repetition time, will require field measurement to overlap with gradient operation. In this case, dual control will require perfect knowledge of the gradient behavior and, similarly to the case of field measurement at the echo time, adjustment of target values along with geometry update.
Simultaneous motion and field control could be based on sensing methods other than those used in this work. For effective control, sensing should (i) support sufficient loop bandwidth by being itself suitably high-rate, (ii) be of sufficient precision, and, in the case of field sensing, (iii) capture the spatial structure of field perturbation adequately.
The chief alternative to external field sensors is the use of navigators as surveyed in the Introduction, also including double-echo implementations ( Reber et al., 1998 ), ( Hutton et al., May 2002 ). Field control can also be based on auxiliary readouts and initial learning of their relationship with field patterns as proposed in the early control work by Van Gelderen and colleagues ( van Gelderen et al., Feb. 2007 ). Motion tracking could equally be performed with optical methods ( White et al., Jan. 2010 ), ( Zaitsev et al., Jul. 2006 ), ( Maclaren et al., Nov. 2012 ), ( Benjaminsen et al., May 2016, Maclaren et al., May 2016, Schulz et al., Dec. 2012, Qin et al., 2009, Aksoy et al., 2011, which are more widely available and reach ample precision and bandwidth given a suitable line of sight. Motion navigators ( Welch et al., 2002 ), ( van der Kouwe et al., 2006 ), ( Tisdall et al., 2011 ), ( Gallichan et al., 2015 ), ( Hoinkiss and Porter, Dec. 2017 ), ( Jorge et al., Jan. 2018 ), come with trade-offs between precision, bandwidth, and scan time overhead. However, they avoid the notorious issue of reliable marker fixation, which continues to be a key challenge with marker-based techniques, including the NMR approach and most optical implementations. For NMR-based tracking, alternatives to the implementation used here include the use of dedicated tracking modules ( Ooi et al., 2009 ), ( Qin et al., 2012 ) or just native sequence elements ( Aranovitch et al., Apr. 2018 ), real-time field tracking in the laboratory frame ( Haeberlin et al., 2014 ), ( Aranovitch, 2020 ), and other detection concepts such as inductive transmission of marker signals into the head coil ( Sengupta et al., 2013 ), ( Schildknecht et al., May 2019 ).
Dual control could hence be accomplished with a variety of implementations and has the potential to enhance high-field neuroimaging in a range of research and clinical contexts.

Author credits
Vionnet, Laetitia: concept, field control system, experimental design, experiments, data analysis, manuscript Aranovitch, Alexander: concept, motion correction system, experimental design, experiments, data analysis, manuscript Duerst, Yolanda: shim interface and software, field control methods and software Haeberlin, Maximilian: motion detection methods and software, real-time interface to MRI system Dietrich, Benjamin Emmanuel: field probe receiver electronics and software Gross, Simon: field probes Pruessmann, Klaas Paul: concept, experimental design, data analysis, manuscript

Declaration of Competing Interest
KP holds a research agreement with and receives research support from Philips Healthcare. He is a shareholder of Gyrotools LLC. BD, SG, and YD are currently employees of Skope Magnetic Resonance Technologies AG