Abstract:
A device and method for rapidly performing automatic magnet shimming using algebraic techniques, based on field maps computed by phase measurement within Carr-Purcell echo sequences. The correction computation for determining shim currents is carried out by a linear programming algorithm which compensates field inhomogeneities within the sample by a linear combination of all the shims. The procedure is non-iterative, thus avoiding instability problems and improving speed performance.

Description:
BACKGROUND OF THE INVENTION 
     The present invention is directed to means and methods for automatically adjusting currents in shim coils for improving homogeneity of the main magnet field for nuclear magnetic resonance (NMR) instruments. The term &#34;shimming&#34; in this art denotes the process of compensating inhomogeneities in the main magnet field. The name can be traced back to the time when large resistive electromagnets were used for NMR. Coarse adjustments were done by placing thin brass pieces between the magnet and the poles in order to align the pole faces. The metal pieces employed were shim stock, and thus the prooedure was called &#34;shimming&#34;. Today a shim set is a combination of electromagnets within the magnet&#39;s bore, each of which is designed to produce a specific magnetic field profile. In principle, the maximum achievable field homogeneity is limited only by the number of these shims, whereas in practice the winding tolerances are the limiting factor. 
     The homogeneity requirements span a wide range. Several tens of parts per million (ppm) deviation are acceptable for clinical imaging if it can be maintained over the cross-section of a body, while a few parts per billion (pph) in some milliliters are required in high-resolution spectroscopy. 
     Coarse, permanent field errors due to shielding in the magnet&#39;s environment and due to manufacturing imperfections should be countered by superconducting shim coils. They are adjusted after the magnet has been brought up to field and do not consume power afterwards. Changes in the environment and susceptibility variations of the sample itself must be compensated by room-temperature shim coils. Adjusting the currents in these coils can be a time-consuming procedure when done by hand, since it traditionally involves repetitive observation of the free induction decay FID signal and/or its lineshape. The shim currents can be iteratively adjusted following a fixed protocol, until the apparently &#34;best&#34; line shape is found. 
     Ideally, automatic shimming by a computer should yield a specific homogeneity over a desired region in a fraction of the time required for a human operator to achieve the same homogeneity. The hardware requirements are computer-controllable shim power supplies. Conventional autoshim software emulates to some extent the way a human operator would proceed. A start-up sequence follows a fixed protocol to bring up the field such as from a totally unadjusted state. Then a search algorithm is invoked which changes the settings one at a time by different step values. A measure of field quality is computed from the incoming FID signal, from which the program determines whether or not to proceed in that direction or to try another change. It is hoped in the prior art that such a &#34;blind search&#34; will converge after a number of iterations to an acceptable field optimum. NMR studies benefit greatly from on-line field adjustment, for instance the &#34;ppm vs. volume&#34; figure could be optimized differently in the course of an experiment. The possibility of selecting a region of interest within the sample by &#34;focussing&#34; a homogeneous field onto this area would provide much better spectral resolution and signal-to-noise ratio. 
     A first problem with the prior art approach is that, since the FID signal is the volume integral over the entire sample, it is not known what parts of the field need to be adjusted. Secondly, it is difficult to define a &#34;figure-of-merit&#34; which describes the quality of the signal. A popular measure is the total area under the FID signal, but other optimization criteria may be preferable, depending on the application. Thirdly, all search algorithms are inherently slow since they must wait after every change for the coil currents to settle before the next scan can be started. Fourthly, if the set of applicable shim-sets is not orthogonal over the volume of the sample, then it is necessary to perform a large number of iterations. Finally, there is no guarantee that the search will find the globally best result. Experience shows that iterative searches fail on complex, second-order interactions between the shim components, as discussed further below. 
     This disclosure is with reference to the following publications as background within which the present invention arises. 
     1. A. A. MAUDSLEY, S. K. HILAL, W. H. PERMAN and S. E. SIMON, J. Magn. Reson. 51, 147 (1983). 
     2. J. HASELGROVE, K. GILBERT and J. S. LEIGH, J. Magn. Reson. Med. 2, 195 (1985). 
     3. W. A. ANDERSON, Rev. Sci. Instrum. 32, 241 (1961). 
     4. W. A. ANDERSON and J. T. ARNOLD, Phys. Rev. 9, 497 (1954). 
     5. M. D. SAUZADE and S. K. KAN, Adv. Electronics Electron. Phys. 34, 1 (1973). 
     6. F. ROMEO and D. I. HOULT, J. Magn. Reson. Med. 1, 44 (1984). 
     7. A. A. MAUDSLEY, A. OPPELT and A. GANSSEN, Siemens For. u. Entw.-Ber. 8, 326 (1979) 
     8. A. A. MAUDSLEY, H. E. SIMON and S. K. HILAL, J. Phys. E: Sci. Instrum. 17, 216 (1984). 
     9. A. A. MAUDSLEY and S. K. HILAL, J. Magn. Reson. Med. 2, 218 (1985). 
     10. K. SEHIKHARA, S. MATSUI AND H. KOHNO, J. Phys. E: Sci. Instrum. 18, 224 (1985). 
     11. K. SEKIHARA, S. MATSUI and H. KOHNO, Soc. Magn. Reson. Med., Abstr. 2, 1052 (1985). 
     12. H. S. DEWHURST, H. N. YEUNG and D. W. KORMOS, Soc. Magn. Reson. Med., Absr. 1, 199 (1985). 
     13. K. STEIGLITZ, &#34;Digital Signal Processing&#34;, in &#34;Fundamentals Handbook of Electrical &amp; Computer Engineering I&#34; (S.S.L. CHANG, Ed.), pg. 255, John Wiley, 1982. 
     14. R. ESCH, &#34;Functional Approximation&#34;, in &#34;Hardbook of Applied Mathematics&#34; (C. E. PEARSON, Ed.), p. 928, Van Nostrand Reinhold Company, 1983. 
     15. G. B. DANTZIG, &#34;Linear Programming and Extensions&#34;, Princeton University Press, Princeton, 1963. 
     16. K. G. MURTY, &#34;Linear Programming&#34;, John Wiley, New York, 1983. 
     17. D. SOLOW: &#34;Linear Programming&#34;, North-Holland, New York, 1984. 
     18. S. I. GASS, &#34;Linear Programming&#34;, McGraw-Hill, New York, 1985. 
     Romeo and Hoult (6) have discussed the general framework with which any field may be analyzed in terms of spherical harmonic components, and they describe the theoretical advantages to be gained by considering zonal and tesseral components separately. In practice it is desired to analyze as rapidly as possible a particular field in terms of a given set of shimming gradients, each of which may deviate from the single, respective component it was designed to ideally simulate. 
     SUMMARY OF THE INVENTION 
     The present invention is directed to an alternative shimming method and device, based on imaging techniques, which can provide the advantage that a shim can be completed within a few minutes, the region for which the field is to be optimized can be easily definable, and the finding of a global optimum can be ensured. 
     The data acquisition according to the present invention is based on field imaging, in other words on a field plot or map, rather than on the FID signal or observed line shape. The present invention involves an algebraic procedure for analyzing such a field plot in terms of a set of gradient functions, and which then computes all correction settings simultaneously without further change of the shim currents. The current implementation can be provided in for instance 3 minutes, and reductions are to be expected with faster algorithms and processors. 
     According to the present invention, the object of rapidly analyzing a field in terms of the shims is done by measuring the field and the effects of shims directly, without resolving them into spherical harmonic components. An imaging technique is used to record a field plot over the sample, and then the coefficient, that is, the current, for each shim which gives an optimal approximation to a uniform field is computed. 
     The present invention is also directed to use of a 3-echo Carr-Purcell sequence for obtaining field maps, to obtaining field maps therewith for determination of field contributions of shimming coils, and to determining optimal combinations of shimming coils for main field compensation. 
     The present invention is further directed to a method of modifying a field plot to correct for the intrinsic distortions caused by the nonuniformity in the field. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows waveforms for field imaging using two separate scans. In Scan 2 the timing of the observed gradient is delayed by the time delay ε. 
     FIG. 2 shows waveforms for field imaging using a modified Carr-Purcell echo sequence according to the present invention. The third 180°-pulse is delayed by the time ε. The phase difference between the first and third echoes depends on the local value of the magnetic field. 
    
    
     DESCRIPTION OF PREFERRED EMBODIMENTS 
     The magnetic field of a main magnet is generally a vector field B(x, y, z), each component of which depends on position x,y,z. (Bold type is used herein to indicate vector and matrix quantities.) This field can be represented by a constant field strength B o  generally assumed to be along the z-axis and a small, unwanted, additive error δB(x, y, z). Because of the relative magnitudes generally prevailing, it is the component of error along the main magnet field which becomes of principal concern, namely the z-axis component of the error vector field, which is denoted in the following by δB(x, y, z). The correction system must be capable of approximately compensating for δB(x, y, z) in the desired homogeneous region. Historically, only linear combinations of orthogonal eigenfunctions have been used to provide sufficient independence of the coefficients as to be manageable by manual shimming. Of these, spherical harmonics lead to relative simple coil configuration designs and have been used almost exclusively (3-6). 
     Such prior art shim controls currently are designed to simulate respective spherical harmonic components, which can be expressed in cartesian components. Some of these components are listed in Table 1, the middle column showing the function, the left column the common name for the function, and the right column the interaction order. An interaction of order zero denotes a (theoretically) non-interacting function that may be optimized independently of all the others. Function of order 1 are dependent on each other, but can be adjusted in a fixed, repetitive sequence. Order 2 interactions can be resolved only by stepping through each one of them while recording the maximum signal available by optimizing all other shims. The shim interactions become much more complicated when the sample&#39;s center does not coincide with the center of the shim set, and are further complicated by the sample&#39;s size and its local susceptibility distribution. 
     
                       TABLE 1______________________________________Names and functions of the room-temperature shims.                           Inter-                           actionName     Function               order______________________________________Z0       1                      0Z1       z                      0Z2       2z.sup.2 - (x.sup.2 + y.sup.2)                           1Z3       z[2z.sup.2 - 3(x.sup.2 + y.sup.2)]                           2Z4       8z.sup.2 [z.sup.2 - 3(x.sup.2 + y.sup.2)] + 3(x.sup.2    + y.sup.2).sup.2       2Z5       48z.sup.3 [z.sup.2 - 5(x.sup.2 + y.sup.2)] + 90z(x.sup.2 +    y.sup.2).sup.2         2X        x                      0Y        y                      0XY       xy                     1X.sup.2 - Y.sup.2    x.sup.2 - y.sup.2      1ZX       zx                     2ZY       zy                     2Z.sup.2 X    x[4z.sup.2 - x.sup.2 + y.sup.2)]                           2Z.sup.2 Y    y[4z.sup.2 - (x.sup.2 + y.sup.2)]                           2ZXY      zxy                    2Z(X.sup.2  - Y.sup.2)    z(x.sup.2 - y.sup.2)   2X.sup.3  x(x.sup.2 - 3y).sup.2  1Y.sup.3  y(3x.sup.2 - y.sup.2)  1______________________________________ 
    
     The approach of the present invention can be completely free of limitations inherent in such prior art approaches to shimming as discussed above. 
     Field Imaging 
     As outlined first by Maudsley and co-authors (7-9), any chemical shift imaging method may be used to map the inhomogeneities of the main magnet field. However, such techniques are inherently slow, because it is intrinsically inefficient to collect a spectrum at each spatial point in order to derive a single scalar value, i.e. the magnitude of the local field. The modified Fourier imaging method proposed by Sekihara et al. (10,11) has been adapted and extended according to a feature of the present invention, in order to obtain fields plots rapidly. Proceeding from Dewhurst et al (12), it was found that utilization of the phase difference between a field map and a reference image greatly improves the accuracy of the teohnique, since field non-uniformity of first order and gradient-induced eddy currents are compensated. FIG. 1 outlines the pulse and acquisition sequences which were used to test the Dewhurst technique. The figure shows the protocol pertinent to collecting a field plot of a single plane, where the gradient G z  of the magnet field along the z-axis is used to select a slice. A three-dimensional plot is derived by stacking consecutive slices, or y phase encoding the z direction as well as the y direction with a non-selective hard 90°-pulse. A pulse sequence in which the timing of the gradients is varied, rather than the timing of the pulses, would give similar information. 
     According to a further feature of the present invention, where a protocol is used in which TR (the conventional symbol for the time between successive scan sequences) is much longer than TE (the time between the 90° pulse and the center of the spin echo), it is possible to speed up the data acquisition process by a factor of 2 by generating a Carr-Purcell echo sequence adapted to collect data for both images in one TR period. The principle is demonstrated in FIG. 2. A pulse sequence 
     
         90°-τ-180°-(2τ)-180°-(2τ+ε)-180.degree.                                                      [1] 
    
     generates 3 spin-echoes and yields the same information as the Dewhurst technique in only half as many scans. As long as the time period 2τ is short enough to provide a signal amplitude sufficient to retrieve the phase, no relaxation-induced effects are encountered. The bottom traces in FIGS. 1 and 2 show the phase defined for the spin vector at a point x,y,z where the field error of interest as noted above is δB(x,y,z). It is easy to show that the phase at time t following the 180° pulse preceding each of the three individual echoes shown in FIG. 2 is given by 
     
         Echo 1: φ1 (t,x,y,z)=γδB(x,y,z) (t-τ)+G.sub.x x (t-t&#39;-T.sub.x 
    
     
         Echo 2: φ2(t,x,y,z)=γδB(x,y,z)(t-τ)+G.sub.x x (t-t&#39;-T.sub.x -δT)+G.sub.y y T.sub.y                [ 2b] 
    
     
         Echo 3: φ3(t,x,y,z)=γδB(x,y,z) (t-τ-ε)+G.sub.x x (t-t&#39;-T.sub.x)-G.sub.y y T.sub.y                        [ 2C] 
    
     where γ is the gyromagnetic ratio, and T x  and T y  represent the effective times for which the gradients G x  and G y  are applied between the 90° and 180° pulses. 
     Since in practice gradients do not switch instantaneously, an effective delay δT arises in the switching times. From these equations it is evident that odd-numbered echos are not affected by such timing skews within the gradient switching, while the even-numbered echoes are affected. The phase difference δφ(x,y,z) between echo 1 and echo 3 depends only on the magnitude of the field error δB(x,y,z) and the parameter ε. 
     
         δφ(x,y,z)=φ1(t,x,y,z)-φ3(t,x,y,z)=γεδB(x,y,z).                                                  [3] 
    
     The field deviation δB(x,y,z) is therefore glven by 
     
         δB(x,y,z)=(1/ε) arctan [Im(S.sub.1 /S.sub.3)/Re(S.sub.1 /S.sub.3)                                                 [4] 
    
     where S 1  and S 3  are the complex signals of that part in the image generated from echo 1 and echo 3, respectively, and Im(w) and Re(w) indicate the imaginary and real parts of an argument w. Because the arctangent function is multi-valued for the value of its argument between +π and -π, there are many values of δB(x,y,z) which are a solution to Eq. [4]. Ambiguity can be avoided by choosing a value of ε such that the phase angle δφ(x,y,z) for the largest expected field error is limited to the range between -π to +π. Thus, the range of γδB(x,y,z) which can be studied unambiguously is inversely proportional to the time delay ε. Given a magnet field of 2T and a maximum expected error of 20 ppm, γδB(x,y,z) is about 1.7 kHz and ε must be set to less than 0.28 msec. 
     In order to correlate different field plot images, each must be corrected for the spatial distortion in the direction of the read-out gradient due to the inhomogeneity of the field (10,12). Any volume element with a local field error δB(x,y,z) will be imaged with a positional error δx (in cm) of 
     
         δx=δB(x,y,z)/G.sub.x                           [ 5] 
    
     The correction can be written in terms of pixels as 
     
         δx (in units of pixel)=δB(x,y,z) N/SW=(N/SW)(δφ(x,y,z))/ε                8 6] 
    
     where N is the number of pixels across the whole image and SW is the frequency width of the whole image. Thus, knowing N pixels, SW and ε from the acquisition, and the phase differenoe from the field plot or image, a spatially corrected field plot can be generated. 
     In principle it is necessary to generate a complete three-dimensional field map by direct measurement. However, the number of picture slices to be collected can be significantly reduced in cases where control over shim terms with x, y and z simultaneously non-zero is not required. Then it is sufficient to aoquire data only from the three orthogonal planes x=0, y=0 and z=0. All examples shown below were done with this technique. The method itself is not limited by the number of dimensions. 
     Base Function Sets 
     For non-iterative control algorithms (i.e. without feedback), it is necessary to have a precise characterization of the system. In this context a field map image is needed showing the effect of each of the shim coils. These maps constitute the &#34;base functions&#34; for the computational algorithms. By mapping a complete set (one image per shim coefficient), all coil errors and interdependencies can be made known to the autoshim algorithm. The use of a phantom is sufficient because sample susceptibility affects the applied gradients only as second-order perturbation and can be safely neglected. Therefore, the lengthy procedure of collecting a complete base function set needs to be done only after major changes in the magnet environment. 
     Starting with the unshimed field, that is, the &#34;null image&#34;, one control at a time is set for instance to 100% of the maximum adjustment range and a field map is generated. The base functions are constructed by subtracting the null image from these maps. 
     The Linear Programming Problem: Generation of Coefficients 
     Since a field as flat as possible is desired, the measured field deviation δB(x,y,z) can be associated with an error vector E(x,y,z) in a multidimensional space, namely whose dimension corresponds to the number of points or pixels in the image plots. The best field error compensation is modelled by a linear combination of the z-axis component B i  (x,y,z) of a base function set. Thus the negative of the error vector E(x,y,z) can be approximated by a similar vector H(x,y,z) given by ##EQU1## and with the number of components equal to the number of pixels. The set of a i  are the unknown shim coefficients or currents that are to be determined. 
     In general, it is not desired to shim over the whole region for which the base functions B i  (x,y,z) were recorded. Rather it is desired to optimize the shim over a specific region defined by a window function W(x,y,z) corresponding to the region of interest in the sample. At present, there is no single, universal approximation which is recognized as being optimal in all circumstances. Two different criteria which meet currently accepted goals for imaging instruments and spectrometers are: the Chebyshev norm 
     
         max|E(x,y,z)+H(x,y,z)|W(x,y,z)≦μ[8] 
    
     where max denotes the maximum value over the field and the pair of vertical lines denotes the absolute value of the quantity therebetween; and the least squares norm ##EQU2## The shim produced by the Chebyshev criterion assures that the worst-case field error within the picture is quaranteed not to exceed a preselected value μ, while the least squares approach produces a &#34;spectroscopic shim&#34; with a narrow lineshape, but having more pronounced sidelobes around the peak. 
     The implementation of both norms is described in the following, using approaches which do not depend on specific characteristics of the approximation error to be minimized. Thus a two- or three-dimensional data set can be mapped into one large-dimension field error vector, in order to utilize a generalized algorithm to solve the problem of determining the proper shim coefficients for optimizing field uniformity. A regularly- or equally-spaced data grid is not required. Data points corresponding to sample areas without sufficient signal can be left out, both in the input data set of the error vector E(x,y,z) as well as in all base functions B i  (x,y,z). The window W(x,y,z) is set to 1 within the data range. An enormous advantage of the algorithms is that the shims need not be orthogonal over the specimen, it being sufficient that they are not linearly dependent. 
     Chebychev Norm 
     Several methods are known (13,14) for solving the problem stated in Eq. [8]. What is known as the linear programming (LP) approach offers significant advantages as the most general problem solver (15-18). 
     By setting the window W(x,y,z) to 1 within the data range, the procedure in (14) can be followed and the problem can be rephrased in standard LP format, namely to: ##EQU3## The last two lines represent 2 m inequalities. In matrix notation this problem becomes to: ##EQU4## and E(j) is the value of E(x,y,z) at the jth pixel, Bi(j) is the value at the jth pixel of the z-axis component of the ith base function, etc. The vector u is the unknown solution vector with mu as the first element and the shim coefficients a i  as subsequent elements, and n is the number of adjustable controls and base functions. b becomes a right-side vector, c is called the cost vector, and P is what is known as the problem matrix. (The usual matrix/vector multiplication is indicated by the juxtaposed quantities in bold.) 
     To find a unique solution, it is necessary to solve a system of 2m equations with n+1 coefficients simultaneously. Since the number of data point m is much larger than the number of coefficients n, it is more efficient to transform the LP problem of Eq. [11]into its the corresponding primal problem, namely to: ##EQU5## w, being a new solution veotor for which the LP duality theorem (15) states that 
     
         max c w=min u b.                                           [13] 
    
     Once the primal problem is solved, the calculation of the desired solution vector u is straightforward. 
     Revised Simplex Algorithm 
     The simplex algorithm was devised by G. B. Dantzig in the late 1940&#39;s (15-18), and is the most popular algorithm to solve a LP problem. The name relates to a special geometric interpretation of Eq. [11]. The inequality constraints may be understood as 2m planes in a n+1 dimensional hyperspace. They enolose a convex shaped hyperbody, called the Simplex. Every point within the Simplex corresponds to a solution, but only one of its vertices corresponds to an optimum, where mu is extreme. The Simplex algorithm starts out at an arbitrary point in the interior, proceeds to the surface and moves along the edges to the optimum point. Although theoretically the necessary number of calculation steps may grow exponentially with the number of dimensions, experience shows very good behavior of the algorithm for &#34;real-world&#34; problems. 
     The so-called revised version of this algorithm can be implemented according to the present invention, which offers advantages of accuracy and efficacy in solving the transformed problem of Eq. [12]. The starting point is chosen on a best-guess basis, with the first coordinates chosen randomly and the following ones adjusted to fall within the Simplex. It was determined that the number of iterations required falls into the range from (n+1) to 2(n+1). This corresponds very accurately to performance numbers reported for different applications (18). 
     Other Norms 
     The Chebychev norm is only one method of defining an &#34;optimum&#34; field. Any other approximation for which the coefficients a i  can be deduced by a suitable algorithm may also be used. For example, the least squares norm may be solved iteratively or by any appropriate direct method. 
     Algorithm Verification 
     The performance of the autoshim algorithm was demonstrated using a bottle of water as a phantom sample. A totally unshimmed field showed an initial error of more than 10 ppm field across a region of 5 cm diameter in a 2 T main magnet field. With 64 gradient encoding steps and a 1 sec. repetition time, the 3-plane imaging sequence took about 3 minutes. Most of the calculations were done in parallel with the acquisition, so that the additional computation overhead was only a few seconds (all tests were performed on a MicroVAX II system). A control map taken after application of the computed field correction values showed the center areas to be uniform to better than 0.1 ppm, within a 4 cm diameter 0.3 ppm was achieved, and 0.6 ppm within 5 cm. Due to the possibility that size, shape and position of the region of interest may be freely defined, virtually any homogeneity requirement realizable by the given gradient set can be met. 
     Chemical Shift 
     In-vivo application of the autoshimming must accommodate the fact that field differences are inherently indistingushable from frequency changes due to chemioal shift. Without precautions for eliminating data points where lipid signal dominates over the water peak, no valid results can be expected. Such an elimination can be done interactively or by means of a decision procedure based upon a T2 picture generated from the magnitudes of echoes 1 through 3 rather than their phases. 
     It will be obvious to those skilled in the art that various changes may be made without departing from the scope of the invention and the invention is not to be considered limited to what is shown in the drawings and described in the specification.