Automatic eddy current correction
This is a continuation-in-part of U.S. application Ser. No. 118,865, filed on Nov. 9, 1987, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to the art of electromagnetic field correction and modification. It finds particular application in conjunction with establishing temporal dependence of magnetic field gradients in magnetic resonance imaging and will be described with particular reference thereto. It is to be appreciated, however, that the invention will also find application in conjunction with magnetic resonance spectroscopy and other applications in which eddy currents degrade electromagnetic field temporal dependence. 
     In magnetic resonance imaging and spectroscopy, a uniform magnetic field is created through an examination region in which a subject to be examined is disposed. The magnetization vector of dipoles in the examined subject preferentially aligns with the uniform field. Radio frequency excitation pulses are supplied to cause the magnetization vectors to precess about the uniform field. After the radio frequency excitation, the precessing magnetization vectors generate radio frequency magnetic resonance signals as the precession decays back toward alignment with the uniform magnetic field. The frequency of the radio frequency resonance signals is proportional to the strength of the magnetic field. Various combinations of radio frequency pulses and magnetic field gradient pulses are applied to manipulate the precessing magnetization vector to create magnetic resonance signals, such as echo signals. 
     In magnetic resonance imaging, gradient magnetic fields are applied to select and encode the magnetic resonance signals. The magnetic field gradients are applied to select one or more slices or planes to be imaged. Further gradient fields are applied for selectively modifying the uniform magnetic field to encode frequency and phase into the magnetization vectors, hence, the resonance signals, which identify spatial location within the selected plane. 
     The gradient fields are conventionally applied as a series of gradient pulses. Specifically, electrical current pulses are applied to gradient field magnets adjacent the image region. A profile, or particular temporal dependence, is selected for the current pulse in accordance with the profile of the gradient magnetic field to be applied, commonly a square wave or step function, a trapezoid, or other ideal wave shapes. 
     One of the inherent problems is that the profile of the gradient magnetic field pulse does not match the profile of the electrical current pulse. A changing magnetic field induces eddy currents in adjacent electrically conductive structures. Each eddy current causes a corresponding eddy magnetic field. Thus, the resultant gradient pulse causes eddy currents that add unwanted eddy components to the induced gradient pulse. The effect of the eddy current varies with the amount and conductivity of the material in which the eddy current is induced, the proximity of the material to the gradient coil, and the magnitude of the pulsed gradient magnetic field. The metallic structures might include supporting structures of the magnet, a room temperature bore tube, a liquid nitrogen dewar for superconducting magnets, other gradient field coils, and the like. Construction tolerances cause the eddy current response to vary from unit to unit. 
     In order to improve image quality, the shape of the electric current pulses is altered such that the magnetic field produced by the sum of the current pulse and the corresponding eddy currents approximates the desired gradient magnetic field profile. Commonly, the current pulse correction circuit includes a plurality of filters whose characteristic frequency is adjustable. An amplifier with an adjustable gain is associated with each filter. Typically, a large array of potentiometers is provided for adjusting the characteristic filter frequencies and the gain corresponding to each. In this manner, selected frequency components of the current pulse are enhanced or suppressed as may be necessary such that the gradient magnetic field produced by the sum of the current pulse and the induced eddy currents has a substantially preselected profile. 
     Manual calibration, which is very difficult and time consuming, is commonly achieved by trial and error. The time for performing the calibration may vary widely with the skill and luck of the calibrating technician. Although some guidance might be obtained from units of the same model, manufacturing tolerances provide a sufficiently wide variation in resultant eddy currents that a unique calibration is required for every unit. 
     Another drawback to manually adjusted systems is that the calibration is frequently not optimized. The eddy current compensation components are frequently interrelated. Adjusting the frequency of one of the filters or its corresponding gain commonly alters the response of the other eddy currents as well. Thus, a small change to improve the response at one frequency may cause significant error at others. The calibration process is often terminated when the magnetic field response is brought within predefined specifications, rather than when the calibration is optimized. 
     The present invention provides a new and improved automatic calibration method and apparatus which overcomes the above referenced drawbacks and others. 
     SUMMARY OF THE INVENTION 
     In accordance with one aspect of the present invention, a method of automatic calibration is provided. After a magnetic field is created through an examination region, a current pulse is applied to a gradient field coil to create a gradient of a preselected profile across the magnetic field. However, due to the induced eddy currents, the resultant gradient does not have the preselected profile. The created gradient is monitored and analyzed to determine the time constant of a first degrading eddy current contribution and the amplitude thereof. Correction factors for correcting the current pulse for the first eddy current are determined. Another current pulse altered in accordance with the determined correction factors is applied to the gradient field coil and the resultant magnetic field gradient is monitored. The monitored gradient is analyzed to determine a time constant and amplitude of a second eddy current. New correction factors are determined for the current pulse in accordance with the first and second time constants and amplitudes. 
     In accordance with a further aspect of the present invention, a third current pulse with the second determined correction factors is applied to the gradient field coil. The resultant magnetic field gradient is monitored and its profile compared to the preselected profile. If the two profiles do not match to within selected tolerances, the monitored gradient is analyzed to determine a third time constant and amplitude corresponding to a third eddy current. The correction factors for the current pulse are recalculated. 
     This current correction factor recalibration process is conducted starting with the longest time constant eddy current and stepping through progressively shorter time constant eddy currents until the profile of the resultant magnetic field gradient substantially matches the preselected profile. 
     In accordance with another aspect of the present invention, an apparatus for performing the above referenced calibration method is provided. 
     One advantage of the present invention is that it reduces the labor intensity of gradient magnetic field profile calibration. 
     Another advantage of the present invention is that it is amenable to automatic, machine implemented calibration of gradient magnetic field profiles. 
     Still another advantage of the present invention is that it improves the precision and accuracy of gradient magnetic field profile calibration. 
     Still further advantages of the present invention will become apparent to those of ordinary skill in the art upon reading and understanding the following detailed description of the preferred embodiment. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention may take form in various steps and arrangements of steps or in various components and arrangements of components. The drawings are only for purposes of illustrating a preferred embodiment and are not to be construed as limiting the invention. 
     FIG. 1A and 1B are two parts of a diagrammatic illustration of a magnetic resonance imaging apparatus in accordance with the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     With reference to the FIGS. 1A and 1B, a magnetic resonance imaging apparatus includes a main magnetic field means A for generating a substantially uniform magnetic field longitudinally through an examination or image region 10. The main magnetic field means includes a plurality of main field magnets 12 which are operated under the control of a main magnetic field control means and power supply 14. Various electrical and mechanical shimming techniques are provided for rendering the resultant main magnetic field linear and uniform through the image region after correction for any distortion caused by surrounding imager hardware. 
     A resonance excitation means C includes a radio frequency transmitter 20 for generating a magnetic resonance excitation pulse and other magnetic resonance manipulation pulses. A radio frequency antenna 22 is disposed adjacent the image region for transmitting radio frequency pulses into a patient or other subject in the image region. 
     A gradient field means B selectively creates gradient magnetic fields across the main magnetic field in the image region 10. A gradient energization profile generating means 30 selectively generates gradient field energizing current pulses with preselected profiles including timing and duration relative to the radio frequency pulses. Commonly, the gradient profiles include slice select gradient profile for selecting a slice or planar region to be imaged. A read gradient pulse or profile provides frequency encoding along a preselected read axis lying within the selected slice. With each repetition of the sequence, a phase encode gradient pulse or profile of a different amplitude provides a phase encoding along a phase encode axis, generally perpendicular to the read axis. 
     A gradient power amplifier 32 amplifies the current pulse profiles from the gradient field controller 30 to an appropriate driving amplitude. The gradient energizing profiles, commonly current pulses, are applied to a gradient coil means 34 which includes a plurality of gradient coils for causing gradients along each of three mutually perpendicular axes. Preferably, the coils are symmetric about three mutually perpendicular planes. The gradient coils convert the current pulses or profiles into corresponding gradient magnetic field pulses with corresponding profiles. However, changing magnetic fields induce eddy currents in the surrounding metal structures including the gradient coils themselves. These eddy currents generate magnetic field components that oppose the gradient magnetic field profiles but decay with time causing a distortion in the gradient magnetic field profiles. In this manner, the eddy currents cause the gradient magnetic field profile to differ from a preselected profile. 
     A gradient profile compensation or adjustment means 40 alters the gradient energization current profiles to compensate for eddy currents. A plurality of parallel connected filter or compensation circuits 42 are connected with each gradient power amplifier 32. The altered gradient energizing current pulse or profile and the induced eddy currents together create a resultant magnetic field having the preselected profile. More specifically, the gradient profile generating means 30 generates a current pulse having substantially the preselected profile, e.g. a step function profile. The eddy current compensation means 40 produces an altered current pulse profile which compensates for the eddy currents and the like. In this manner, the preselected profile and the resultant gradient magnetic field profile are substantially the same. 
     The like compensation circuits 42 each include an adjustable filter 44 whose characteristic frequency is digitally adjustable and an amplifier 46 whose gain is digitally adjustable. The plurality of parallel interconnected compensation circuits enable a like plurality of frequency components to be selected and emphasized. The selected frequency is related to an inverse of the time constant of a corresponding degrading eddy current and the gain is simply related to the amplitude of that eddy current. With a plurality of calibration circuits, compensation can be made for a plurality of eddy currents. However, as explained below, the eddy current time constants and amplitudes are interrelated. The compensation circuit filter frequency and gain are not directly proportional to the inverse of the time constant and amplitude for one of the eddy currents. A suitable digital calibration circuit is illustrated in co-pending U.S. Pat. application Ser. No. 033,532, filed Apr. 3, 1987, now U.S. Pat. No. 4,761,612, which issued Aug. 2, 1988, the disclosure of which is incorporated herein by reference. 
     A gradient field sensing means, such as a search coil 50 and an integrating means 52 are used to monitor the resultant magnetic field gradients. An analog to digital converter 54 digitizes the monitored gradient magnetic field profile and stores it in a first polarity profile memory means 56. A base line correction means corrects the resultant gradient profile for any baseline errors. In the preferred embodiment, the baseline correction means causes a like magnetic field gradient with the opposite polarity to be applied. The resultant magnetic field profile is digitized, and stored in a second or opposite polarity profile memory means 58. The equal but opposite polarity gradient magnetic fields are subtracted by a subtraction means 60 and divided by two by a dividing means 62 to produce a baseline corrected profile. The resultant baseline corrected resultant gradient profile is stored in a resultant gradient profile memory means 64. By generating two opposite polarity but otherwise equal gradient magnetic field profiles and taking their difference, the affects of any DC bias are removed. A comparing means 66 compares the resultant gradient profile to determine conformity therebetween. 
     A sampling means 70 samples the profile at selectable, discrete intervals. The sampling means samples the profile at a selectable time from its commencement, e.g. 180 ms. Samples are taken at regular intervals, e.g. 60 ms, thereafter. The commencement interval and intersampling intervals are selected in accordance with the time constant of a monitored eddy current. For higher frequency, shorter time constant eddy currents, the intervals may be shortened to emphasize the response at the beginning of the gradient. For low frequency, long time constant eddy currents, the intervals may be extended. Sampling only near the end of the gradient reduces high frequency, short time constant eddy contribution to the samples. An analysis means 72, such as a least squares analysis program, analyses the sampled profile data to determine a time constant and amplitude of a degrading eddy magnetic field component. A time constant and amplitude memory means 74 stores the time constant and amplitude for a plurality of analyzed eddy currents. A filter frequency means 76 determines the filter frequencies for each of the compensation circuits from the stored time constants and amplitudes. In the preferred embodiment, the filter frequencies are determined by calculating the roots of a polynomial equation, whose coefficients are calculated from the time constants and amplitudes is retrieved from the time constant and amplitude memory means 74. The number of filter frequencies roots determined coincides with the number of stored time constants. A gain calculating means 78 calculates the gain for each compensation circuit from the amplitudes and at least one of the time constants and the filter frequencies. In the preferred embodiment, the gain calculating means inverts a matrix whose elements are calculated from the data from the time constants or frequencies and the amplitudes. 
     In operation, a pair of like gradient pulses with opposite polarity are applied, digitized, baseline corrected, and stored in the resultant gradient profile memory means 64. The eddy component with the longest detectable time constant is identified and its time constant and amplitude determined by the least squares analysis means 72. The filter frequency means 76 converts the determined time constant and amplitude to a first filter frequency setting or correction factor for one of the compensation circuits. The gain calculating means converts the first amplitude into a first gain setting or correction factor. Like gradient pulses with the first determined compensation factors are applied, digitized, baseline corrected, and stored in the resultant gradient profile memory means 64. The analyzing means 72 identifies the eddy component with the next longest time constant and identifies its time constant and amplitude. The filter frequency means 76 recalculates the first filter frequency and a second filter frequency. The gain calculating means recalculates the first and second gain settings or correction factors. 
     The routine is repeated with the current pulse modified by the second correction factors and a third resultant gradient profile is determined and stored in the profile memory means 64. If the comparing means 66 determines whether the resultant gradient profile is sufficiently close to the preselected profile, the comparing means may compare the profile of the resultant gradient magnetic field with the profile of the current pulse. When the gradient magnetic field profiles are step functions, i.e. have a flat surface, the comparing means may determine the degree of flatness of the resultant profile. If the resultant gradient magnetic field profile is not a sufficiently close match to the preselected profile, the analysis means 72 identifies the eddy component with the third to longest time constant and determines its time constant and amplitude. The filter frequency and gain calculation means calculate three frequency settings and three gains from the three time constants and amplitudes stored in the memory 74. This process is repeated each time with the next longest eddy current component until the resultant gradient magnetic field profile and the preselected profile match to within acceptable limits or tolerances. 
     Looking now to polynomial equation and matrix of the preferred embodiment, the total field gradient response to a step current pulse can be represented or modeled as a linear sum of exponentially decaying components: ##EQU1## where g o  (t) is the normalized step response, N is the number of eddy current components, β i  is the amplitude of the ith eddy current component, and τ i  is the time constant of the ith eddy current component, and u(t) is the usual Heaviside step function. An eddy current transfer function H e  (s) can be determined based on the fact that g o  (t) results from a step input, ##EQU2## where ω i  =1/τ i  in the frequency domain. Exact compensation for the eddy current effect is achieved by filtering the applied input with a filter function transfer function H f  (s) which is the inverse of the eddy current transfer function. That is, ##EQU3## where α i  and ω i  &#39; are the sought after fractional gains and characteristic angular frequencies of the compensating filter network 42. When the filter and inverse eddy current transfer functions are equal, then the sought after condition of the input and output being the same has been achieved. 
     For a single term correction, i.e. for N=1, Equation (3) is readily solved for α i  and ω i  &#39;, i.e. ##EQU4## where 0≦β i  &lt;1 and the resultant frequencies are well separated, e.g. separated by a decade or more 
     For higher orders of N, a relatively simple pattern occurs which results in 2N equations. Although the results can be extended to most any value of N, in practice solvinq Equation (3) for N=4 normally produces satisfactory, correspondence between the resultant gradient profile and the preselected profile. For N=4, Equation (3) can be written as: ##EQU5## which can be solved by equating coefficients, i.e. 
     
         α.sub.o =ω.sub.1 ω.sub.2 ω.sub.3 ω.sub.4(6a) 
    
     
         α.sub.1 =ω.sub.1 ω.sub.2 ω.sub.3 +ω.sub.1 ω.sub.3 ω.sub.4 +ω.sub.1 ω.sub.2 ω.sub.4 +ω.sub.2 ω.sub.3 ω.sub.4                (6b) 
    
     
         α.sub.2 =ω.sub.1 ω.sub.2 +ω.sub.1 ω.sub.3 +ω.sub.1 ω.sub.4 +ω.sub.2 ω.sub.3 +ω.sub.2 ω.sub.4 +ω.sub.3 ω.sub.4                (6c) 
    
     
         α.sub.3 =ω.sub.1 +ω.sub.2 +ω.sub.3 ω.sub.4(6d) 
    
     
         α.sub.4 =1                                           (6e) 
    
     
         b.sub.0 =α.sub.0 =ω.sub.1 ω.sub.2 ω.sub.3 ω.sub.4                                             (6f) 
    
     
         b.sub.1 =(1-β.sub.1)ω.sub.2 ω.sub.3 ω.sub.4 +(1-α.sub.2)ω.sub.1 ω.sub.3 ω.sub.4 +(1-α.sub.3)ω.sub.1 ω.sub.2 ω.sub.4 +(1-β.sub.4)ω.sub.1 ω.sub.2 ω.sub.3(6g) 
    
     
         b.sub.2 =(1-β.sub.1 -β.sub.2)ω.sub.3 ω.sub.4 +(1-β.sub.1 -β.sub.3)ω.sub.2 ω.sub.4 +(1-β.sub.1 -β.sub.4)ω.sub.2 ω.sub.3 +(1-β.sub.2 -β.sub.3)ω.sub.1 ω.sub.4 +(1-β.sub.2 -β.sub.4)ω.sub.1 ω.sub.3 +(1-β.sub.3 -β.sub.4)ω.sub.1 ω.sub.2(6h) 
    
     
         b.sub.3 =(1-β.sub.1 -β.sub.2 -β.sub.3)ω.sub.4 +(1-β.sub.1 -β.sub.2 -β.sub.4)ω.sub.3 +(1-β.sub.1 -β.sub.3 β.sub.4)ω.sub.2 +(1-β.sub.2 -β.sub.3 -β.sub.4)ω.sub.1                 (6i) 
    
     
         b.sub.4 =1-β.sub.1 -β.sub.2 -β.sub.3 -β.sub.4(6j) 
    
     The a&#39; k  components can be retrieved from b k  components by replacing ω i  with ω i  &#39; and β i  with -α i . The b&#39; k  components can be retrieved from the a k  components by replacing ω i  with ω i  &#39; and by replacing β i  with -α i . The ω i  &#39; are the N roots of the polynomial equation 
     
         b.sub.4 ω.sup.14 -b.sub.3 ω.sup.13 +b.sub.2 ω.sup.12 -b.sub.1 ω.sup.1 +b.sub.0 =0                        (7) 
    
     The fractional gains α i  satisfy the linear system: ##EQU6## Solving for the generalized condition, the polynomial coefficients b k  (k=0, 1, . . . N) and the column vector [c] are calculated from the measured input parameters β i  and τ i . The polynomial of Equation (8) is solved for the roots ω i  &#39; and the matrix [ω] is inverted to obtain the α i . There are convenient algebraic and physical properties which simplify the numerical procedure for arbitrary orders of N. 
     The formulae for the a l  (l=0, 1, . . . N=1) and b k  (k=0, 1, . . . N) can be written out explicitly for the largest anticipated order of N. The same formulae may be utilized when there are lower orders of N by setting β i  =0 and ω i  =0 for the additional unused terms. The roots of the polynomial and matrix equation solution are found by standard conventional prior art techniques. 
     The filter frequency determining means 76 solves for the roots of Equation (7) or an equivalent precalculated equation for the number of terms previously selected to be accommodated. The gain determining means 78 solves Equation (8) or an equivalent equation for a different order of correction, to determine the α i  values. The settings of the digital calibration circuits 42 are set with the α i  and ω i  &#39; values. 
     Once the calibration has been completed, the probe or search coil may be removed from the examination region and a patient or subject inserted therein. A central timing computer 80 controls the gradient field controller 30 and the radio frequency transmitter 20 to transmit conventional radio frequency and gradient field current pulse sequences to the transmission coil 22 and gradient field coils 34, respectively. Induced magnetic resonance signals are received by a radio frequency receiver 82. A Fourier transform means 84 transforms the received resonance signals into an image representation for storage in an image memory means 86. A display means 88 provides a manreadable display of the resultant image. 
     The invention has been described with reference to the preferred embodiment. Obviously, modifications and alterations will occur to others upon reading and understanding the preceding detailed description of the preferred embodiment. It is intended that the invention be construed as including all such alterations and modifications insofar as they come within the scope of the appended claims or the equivalents thereof.