A method has been presented (PIMMS) to model the phase changes in EPI time series using a GLM and to use the estimated maps of model parameters (i.e., rate of change of phase maps) to correct for motion-related distortions and the corresponding variance in EPI magnitude time series. The method uses the phase information which is available with every EPI volume acquired.

#### Validity of PIMMS Model

The PIMMS approach presented here assumes that phase changes in EPI time series occur as a result of shim heating and change in head position. Furthermore, it is assumed that the phase changes are relatively small, can be modeled as linear functions of time or head rotation and that the different effects are independent. The validity of the PIMMS model and hence these assumptions were assessed by examining how well the model explained the change of phase data and the spatial structure of the resulting model fit parameters and modeled variance.

In studies presented here, the PIMMS model was able to explain a significant amount of variance in measured phase changes (*p* < 0.001) in more than 84% of voxels in the brain for the experiment with excessive head movements and more than 94% of voxels for the more typical fMRI experiments. Visual inspection of the average change of phase and modeled effects, as a function of image volume number (i.e., Fig. 2c,f,i), illustrate the fit of the PIMMS model to the change of phase averaged over the whole brain.

In the first experiment, subjects made purposeful head movements of about ± 2–3° which are quite large for a typical fMRI study. These movements lead to mean distortion-related voxel displacements of up to 0.5 voxels which supports the assumption that the phase changes are usually small (Fig. 3b,d,f), as shown in previous studies [Hutton et al., 2002]. Regions where the PIMMS model explained less than 50% of the total phase variance were located close to the axis of the head rotation (Fig. 3a,c,e). In these regions the impact of the head rotation on the field was much lower than at the brain periphery due to the higher field homogeneity. As a consequence, the estimated model fit parameters in these regions were closer to a value of zero and possibly of the same order as the noise in the phase change data. A similar effect was apparent for the estimation of the rate of change of phase with respect to rotation about the *y*-axis because the estimated head rotations about the *y*-axis were very small. The different spatial structure between the rate of change of phase maps suggested that the effects modeled by each term were relatively independent. However, some effects of the head rotations about the *x*-axis are also visible in the other parameter maps. Furthermore, some spatial noise is apparent in the maps of rate of change of phase with respect to head rotation about the *y*-axis and with respect to time. In particular some noise is apparent in regions of high vasculature. The negative impact of these effects on the PIMMS correction was minimized by using a spatially smoothed linear combination of the scaled parameter maps to perform the dynamic distortion correction. The source of the noise in the parameter maps and its effect on the PIMMS correction are addressed in the following section.

#### Impact of PIMMS Correction

The data from Experiment 1 showed that motion-related variance in the EPI magnitude time series was significantly reduced in peripheral regions and at some tissue boundaries after the PIMMS correction compared with standard realignment (Fig. 4). In corresponding regions the tSNR was also greater after the PIMMS correction. These results suggest that the PIMMS procedure was able to correct for the dynamic distortion effects which lead to stretching and compression of the brain in the EPI volumes.

The PIMMS correction will introduce some spatial smoothing as a result of the nonlinear resampling of each image into the space of the first image and this may reduce overall variance in the images compared to standard realignment. The impact of the correction was therefore assessed using preprocessed data after spatial smoothing using a Gaussian kernel with FWHM = 6 mm to equalize any smoothing effect between the PIMMS correction and standard realignment. Furthermore, since the comparisons between the tSNR maps (in Fig. 4c,f,i) show localized differences, it is unlikely that the reduction in variance in the PIMMS corrected data can be attributed to the minimal smoothing introduced by nonlinear resampling.

The PIMMS correction also increased motion-related variance in a small number of small regions in the brain relative to the standard realignment (e.g., in Fig. 4b,e,h). There are a couple of possible reasons for this. First of all, it is possible that the PIMMS model fits the phase change data less well in these regions, or that overfitting occurs, leading to noise in the estimated parameter maps. This may be a result of the change of phase being very small and therefore of a similar scale to the noise in the phase data, perhaps due to susceptibility-related signal loss or uncorrected phase discontinuities. Regularization of the model fitting could prevent this. Second, the relative displacement of tissue boundaries between the PIMMS corrected and the realigned data could result in a shift of small residual motion effects in the PIMMS corrected data to a region where the realigned data are artifact free. Overall the results in Figure 4 show that the PIMMS correction performed well in most of the brain without an obvious decrease in performance in regions where the PIMMS model described less than 50% of the variance of the phase change (i.e., compare with Fig. 3).

When PIMMS was applied to data from a typical fMRI study with and without small stimulus-correlated head movements (i.e., Experiment 3), there were no significant differences between the magnitude of the parameters explaining the visual response for the PIMMS correction compared with standard realignment. This data demonstrate that the PIMMS approach could lead to a reduction in false negatives of more than 25% compared with the widely accepted approach which uses standard realignment and includes the motion parameters in the statistical model. For one of the three subjects, motion parameters also reduced the number of significantly activated voxels in the fMRI run without head movement. On inspection, the motion parameters estimated for this subject indicated that the subject moved less than 0.2° but the correlation coefficient between the motion and the visual task was 0.33. This may have been caused by signal changes from the visual activity introducing a bias into the image realignment algorithm as described by Freire and Mangin (2001). In general, the PIMMS approach may be a particularly valuable alternative method because the correction is based on motion-related signal changes in the phase rather than the magnitude data. Although not studied here, one may assume that sensitivity to small BOLD activations would be improved in regions where the PIMMS correction reduced motion-related variance and improved tSNR.

#### Methodological Considerations

In general, retrospective dynamic distortion correction methods attempt to correct for a relatively small effect. Approaches such as those proposed in [Hahn et al., 2009; Hutton et al., 2002; Lamberton et al., 2007; Marques and Bowtell, 2005] which use a more direct measure of the phase acquired at each time point may introduce noise at the correction step. In contrast, modeling the phase changes in a GLM framework and hence parameterizing the effects, results in a correction at each time point that is constrained by the linear process and is therefore less likely to introduce noise. However, it should also be noted that the PIMMS method requires additional and accurate information in order to model the changes in the phase data, such as reliable motion estimates.

A measure of the static distortion present in the whole fMRI time series due to the B_{0} field inhomogeneities is not provided by the PIMMS model. However, the model for the change in distortion over time can be combined with other methods to correct for both the static and dynamic effects of distortion. For example, the parameter map resulting from fitting the constant term included in the PIMMS model could be combined with a phase image acquired at a different echo time to calculate a correction for static distortion effects which could be combined with the dynamic distortion effects.

The PIMMS approach as it is implemented here assumes that the initial estimation of motion parameters is negligibly affected by the changes in distortion from one time point to another. However, to account for possible inaccuracies in the initial estimation, the PIMMS corrected data were realigned and resliced in the final step of the PIMMS procedure. The standard deviation of the initial motion parameters averaged over all EPI time series acquired in Experiment 1, was reduced by 91.2% as a result of the PIMMS correction and 99% after the final realignment step following the PIMMS procedure (data not shown). In comparison, the standard deviation of the initial motion parameters was reduced by 98.6% as result of the standard realignment alone. The results suggest that the initial estimation of the motion parameters may be affected by differential distortions throughout the time series when there are large head movements. The final realignment step was therefore included in the PIMMS correction. In general, performing the whole PIMMS processing procedure (as outlined in Fig. 1) in an iterative fashion would relax this requirement.

In general it is difficult to demonstrate the impact of dynamic distortion correction in standard fMRI studies, since every effort is made to keep head movements to an absolute minimum. To demonstrate the effect of the PIMMS procedure, it was applied in an experiment where subjects were instructed to make relatively large head movements and acquisition parameters were untypical for an fMRI experiment. For example, in this experiment, the volume TR included a delay so that subjects could move their heads in the time between image acquisitions. In the absence of the delay between EPI volume acquisitions, large intra-scan head movements will be less accurately estimated using rigid body realignment and since the PIMMS procedure considers each phase image volume as a single point in time, the goodness of fit of the PIMMS model may be reduced. Nevertheless, the linear modeling process employed by PIMMS is unlikely to introduce additional noise compared with standard realignment, as demonstrated by the data acquired in Experiment 3 where subjects made small stimulus-correlated head movements.

Another motion-related effect which gives rise to signal changes in EPI time series is due to the excitation history of the spin system (spin history effect [Friston et al., 1996]). This effect occurs because for a given image volume, the current magnetic state of the system depends on the previous magnetic states if the spin system has no time to return to equilibrium before the next excitation pulse occurs. Therefore a change of the object position in one image will have an impact on the intensity in subsequent image volumes. As a consequence of the long TR used in Experiment 1 with large head movements, spin history effects could be assumed to be minimal or nonexistent. However, in more typical fMRI studies, spin history effects will remain a source of variance [Muresan et al., 2005] even if motion and susceptibility-related variance is reduced by the PIMMS method.

The size of the distortion effects caused by head motion studied here were quite small. In general these effects will be larger and more likely to introduce signal variance at higher field strengths [Hutton et al., 2011], unless accelerated imaging techniques are used which reduce the distortion effects. Accelerated imaging techniques such as SENSE-EPI [Pruessmann et al., 1999], which allow for reduced EPI readout times, result in reduced susceptibility-related image distortions compared with conventional EPI techniques. This has been demonstrated in fMRI studies using parallel imaging techniques [Preibisch et al., 2003; Schmidt et al., 2005].

In this study, raw data were acquired using a head transmit-receive RF coil. It is possible that the change in phase of the RF field resulting from head motion may also affect the phase of the EPI signal. Although this dynamic RF phase change was not obvious in the data acquired here and to our knowledge has not been reported in the literature, it may become more significant at higher field strengths and could be investigated using B1 phase maps (e.g., [Metzger et al., 2008]). It is also important to note that for this study, phase and magnitude images were reconstructed from the raw data using a customized image reconstruction method. This method combines k-space trajectory measurement, algebraic reconstruction and navigator echo correction to yield images with minimized Nyquist ghosts and without line artefacts [Josephs et al., 2000]. Using a customized image reconstruction has the advantage that all reconstruction steps are known and well controlled. In contrast, when phase images are reconstructed using manufacturer-provided algorithms, hidden correction steps such as B_{0} drift correction, may affect the phase maps and therefore the estimation and interpretation of the PIMMS model. Furthermore, if PIMMS is applied to data acquired using multichannel receiver coils, particular attention to the combination of phase information from the different channels is required, especially at higher field strengths because each coil has its own intrinsic phase variation, e.g., see [Chen et al., 2010; Hammond et al., 2008; Lu et al., 2008; Robinson et al., 2011; Robinson and Jovicich, 2011; Roemer et al., 1990].

#### Possible Extensions to the PIMMS Framework

A strength of the PIMMS framework is the flexibility that allows for other terms to be included in the model. The implementation presented here assumed that changes in phase were mainly caused by rotations about the x and y axes and the model therefore included these terms as well as the linear function of time to model the passive shim heating effect. Although head translations and rotations about the z axis should have a minor effect on the field, significant movement away from the initial position where the head was optimally shimmed could also lead to changes in the field. This was tested for the data presented here by including all six head motion parameters in the PIMMS model. The results showed that including the additional movement parameters did not improve the PIMMS model fit. In general, the six degrees of freedom for movement correction is a theoretical construct and moving the head independently along these degrees of freedom is very difficult. A singular value decomposition of movement parameters invariably yields one or two modes that account almost perfectly for all the movement. The remaining four movement parameters are therefore often highly correlated to the two first, and will contribute little or nothing to reducing the residual error and poorly condition the inversion step used to estimate the GLM. It should also be mentioned at this point that the relevant motions may be site and experiment specific.

Higher order frequency drifts could be modeled for the sensitive detection and characterization of phase deviations which could be useful in quality assurance procedures. This may be of particular importance when using other equipment during an fMRI study such as EEG [Hinterberger et al., 2004], TMS or electrical stimulus equipment (e.g., leakage currents occurring in TMS, [Weiskopf et al., 2009]). Furthermore, other explanatory variables that impact on phase data such as physiological effects [Hutton et al., 2011; Van De Moortele et al., 2002] can also be included in the PIMMS model [Hutton et al., 2008]. The framework could also be extended to allow for slice-specific models and hence the inclusion of effects with a higher temporal resolution. For example, information from the monitoring of jaw or body movement, e.g., [Keliris et al., 2007], and also MR image independent high temporal resolution estimates of head motion from optical tracking systems [Zaitsev et al., 2006] could be included in the PIMMS model.

Another possible extension of the presented PIMMS approach is an implementation to perform distortion correction in real time. This would require that the GLM is solved for each volume as it is acquired rather than being calculated for a whole time series retrospectively. This would be possible by exploiting data processing and model fitting methods employed for calculating functional activation maps in real time, e.g., [Cox et al., 1995; Pollock, 1999; Weiskopf et al., 2003;Weiskopf et al., 2007].