 1.1 Introduction
 1.2 The Superconducting Magnet and Nuclear Polarization
 1.3 The Transmitter Coil to Generate Radiofrequency Pulses
 1.4 Precession
 1.4.1 Chemical Shift
 1.4.2 Scalar Coupling
 1.4.3 Relaxation Processes
 1.5 The Receiver Coil for Detecting the MR Signal
 1.6 The Receiver: Signal Demodulation, Digitization and Fourier Transformation
 1.6.1 Receiver Electronics
 1.6.2 Signal Processing
 1.7 Shim Coils
 1.8 Gradient Coils
 1.8.1 Crusher Gradients to Dephase Transverse Magnetization
 1.8.2 Gradients for Coherence Selection in HighResolution NMR
 1.8.3 Measurements of Apparent Diffusion Coefficients Using Gradients
 1.8.4 GradientBased Shimming
 1.8.5 Gradients in MRI
 1.9 The Deuterium Lock Channel and Field Monitoring
 1.10 Magic Angle Spinning SolidState NMR: Principles and Instrumental Requirements
 1.11 Magnetic Resonance Imaging: Principles and Instrumental Requirements
 Appendices
 Appendix A. Maxwell’s Equations and the Biot–Savart Law
 Example A1. Magnetic Field Produced by a Straight Wire
 Example A2. Magnetic Field Produced by a Circular Wire Loop
 Example A3. Design of a TwoLoop Coil Geometry to Produce a Linear zGradient
 Example A4. Design of a TwoLoop Coil Geometry to Produce a Homogeneous Magnetic Field
 Appendix B. Spherical Harmonic Representation of Magnetic Fields
 Visual Description
 Mathematical Description of Spherical Harmonics
 Example B1. Generation of a Homogeneous Magnetic Field
 Example B2. Generating a Linear Magnetic Field Gradient in z
 Example B3. Generating a Linear Magnetic Field Gradient in x or y
CHAPTER 1: The Principles of Magnetic Resonance, and Associated Hardware

Published:27 Apr 2016

Special Collection: 2016 ebook collectionSeries: New Developments in NMR
A. Webb, in Magnetic Resonance Technology: Hardware and System Component Design, ed. A. G. Webb, The Royal Society of Chemistry, 2016, pp. 147.
Download citation file:
This chapter links the basic principles of magnetic resonance with the relevant hardware components in a magnetic resonance system. These components include the magnet, radiofrequency coil(s), radiofrequency amplifier, shim coils, magnetic field gradient coils, gradient amplifiers, frequency locking circuitry, and receiver. The role of each component is explained in terms of its relationship to the associated magnetic resonance phenomenon, e.g. nuclear polarization, resonance frequency, precession, the effect of radiofrequency pulses, relaxation and spatial encoding. The requirements of each of the hardware components are quantified for experiments in three different “domains”: highresolution liquidstate nuclear magnetic resonance spectroscopy, magicangle spinning solidstate nuclear magnetic resonance spectroscopy, and magnetic resonance imaging. Finally, an Appendix is included, which contains details of two mathematical frameworks, namely spherical harmonics and the Biot–Savart law, used in the design of magnets, shim coils, magnetic field gradients and RF coils throughout the book.
1.1 Introduction
The diversity of magnetic resonance (MR) experiments is enormous, ranging from simple onedimensional proton nuclear magnetic resonance (NMR) spectroscopy through multidimensional multinuclear spectra to full threedimensional magnetic resonance imaging (MRI) of morphology and function in animals and humans. Some examples of the types of data produced from different MR experiments are shown in Figure 1.1.
Despite the widely different information content of these data, the fundamental hardware systems for NMR spectroscopy (in both the liquid and solid states) and MRI (human and animal) are very similar. The basic components include the following:
(i) The magnet, which polarizes the nuclei and produces a net magnetization within the sample.
(ii) The radiofrequency coil(s), which transmit pulses of electromagnetic (EM) energy into the sample and detect the precessing magnetization, which constitutes the MR signal.
(iii) Magnetic field gradient coils, which induce a spatial dependence of the nuclear precession frequency and can be used for coherence order selection, measurements of diffusion, and MRI.
(iv) Shim coils, which are used to produce as homogeneous a magnetic field as possible throughout the sample.
(v) The receiver electronics and circuitry, which amplify, filter and digitize the MR signal for data storage and postprocessing.
The physical arrangement of components (i) to (iv) is shown in Figure 1.2 for a vertical bore magnet.
In addition, there are a series of electronic components used to switch the gradients on and off, to produce high power RF pulses, and to amplify and digitize the signal. A simplified block diagram of a generalized MR system is shown in Figure 1.3.
Table 1.1 gives an idea of the characteristics and performance of components in typical commercial NMR and MRI systems. The system performances of each of the components in the table are explained in greater detail in the relevant sections throughout the book.
.  NMR .  MRI .  MRI . 

Human  Animal  
Static magnetic field  4.7–23.5 tesla  1.5–9.4 tesla  4.7–21.1 tesla 
Proton frequency  200 MHz–1 GHz  63.8–400 MHz  200–900 MHz 
Gradient strength  500a mT m^{−1}  40–80b mT m^{−1}  1 T m^{−1} (6 cm i.d.) 
750 mT m^{−1} (9 cm i.d.)  
450 mT m^{−1} (12 cm i.d.)  
RF coil diameter  1.3–20 mm  10–60 cm  10–60 mm 
RF amplifier power  1 kW  30 kW  4 kW 
Shortest pulse  ∼1 µs  ∼10–50 µs  5–10 µs 
.  NMR .  MRI .  MRI . 

Human  Animal  
Static magnetic field  4.7–23.5 tesla  1.5–9.4 tesla  4.7–21.1 tesla 
Proton frequency  200 MHz–1 GHz  63.8–400 MHz  200–900 MHz 
Gradient strength  500a mT m^{−1}  40–80b mT m^{−1}  1 T m^{−1} (6 cm i.d.) 
750 mT m^{−1} (9 cm i.d.)  
450 mT m^{−1} (12 cm i.d.)  
RF coil diameter  1.3–20 mm  10–60 cm  10–60 mm 
RF amplifier power  1 kW  30 kW  4 kW 
Shortest pulse  ∼1 µs  ∼10–50 µs  5–10 µs 
Single axis diffusion gradients can reach ∼25 T m^{−1}.
300 mT m^{−1} for specialized systems for the humanconnectome project.^{28,29 }
In the following sections in this chapter the basic phenomena involved in magnetic resonance are explained briefly, with links to the relevant system hardware. There are a large number of MR books dealing with the basic theory of highresolution liquidstate NMR,^{1–5 } solidstate NMR^{6–9 } and MRI,^{10–13 } and readers are advised to consult these tomes for much more indepth analyses of different aspects of basic MR theory.
1.2 The Superconducting Magnet and Nuclear Polarization
The role of the magnet is to polarize the nuclei to produce a net magnetization within the sample. For NMR spectroscopy and MRI, almost all magnets are superconducting. The magnetic field should be temporally stable and homogeneous to within partsperbillion (ppb) throughout the sample. Most magnets are actively shielded, i.e. the fringe field does not extend significantly outside the physical dimensions of the magnet itself. Magnet design is considered in detail in Chapter 2 of this book, as well as Appendix 1A at the end of this chapter.
All nuclei with an odd atomic weight and/or an odd atomic number possess a fundamental quantum mechanical property termed “spin” and are termed “spinactive” or “NMRactive”. The most important spinactive nuclei include ^{1}H, ^{13}C, ^{15}N, ^{23}Na, ^{17}O, ^{31}P and ^{2}H. Notably spininactive are nuclei such as ^{16}O and ^{12}C. Considering the proton as the simplest example, the property of spin can be viewed as the proton spinning around an internal axis of rotation giving it a certain value of angular momentum (P). Since the proton is a charged particle, this rotation results in a magnetic moment (µ). This magnetic moment produces an associated magnetic field, which has a configuration similar to that of a bar magnet. The magnitude of P is quantized in terms of the nuclear spin quantum number (I):
where h is Planck’s constant (6.63 × 10^{−34} Js). In the following analysis a spin 1/2 nucleus (I = 1/2) is considered, corresponding to ^{1}H, ^{13}C, ^{15}N, and ^{31}P in the previous list. In this case:
The magnitudes of the magnetic moment and the angular momentum of the proton are related by:
where γ is the nuclear gyromagnetic ratio, and has a specific value for different nuclei, with protons having the highest γ (with the exception of tritium). For protons therefore:
µ contains three components ( µ_{x}, µ_{y} and µ_{z}), each of which can have any value within the conditions governed by eqn (1.4): this situation is shown in Figure 1.4(a). However, in the presence of a strong magnetic field, B_{0}, µ_{z} is quantized with values given by:
where m_{I} is the nuclear magnetic quantum number, and can take values I, I − 1...−I. In the case of a proton, m_{I} = ±1/2 and so:
The orientation of µ with respect to B_{0} is shown in Figure 1.4(b). The interaction of the static magnetic (B_{0}) field with µ_{z} results in Zeeman splitting, producing two energy levels: one in which µ_{z} aligns parallel to B_{0} (the lower energy state) and the other antiparallel (the higher energy state).
The net magnetization, M_{0}, of a sample containing N_{s} protons is proportional to the difference in populations between the two energy levels, which is dictated by Boltzmann’s equation:
Eqn (1.7) shows that the net polarization of a sample is proportional to the strength of the main magnetic field. However, since the energy difference between the two levels is very small, so is the population difference. For example, at an operating magnetic field of 11.7 tesla for every one million protons, there is a population difference of only ∼40 protons between the parallel and antiparallel orientations.
1.3 The Transmitter Coil to Generate Radiofrequency Pulses
In order to detect an MR signal, energy must be applied to the nuclear spin system to stimulate transitions between the two energy levels. A pulse of EM energy is applied at the specific resonance frequency (f_{0}), which corresponds to the energy difference between the two levels via:
The resonance frequency in Hz, or resonance angular frequency (ω_{0}) in radians per second, is therefore given by:
The pulsed EM wave consists of both magnetic and electric field components, and it is the magnetic component that interacts with the nuclear magnetization. The EM energy, termed a radiofrequency (RF) pulse, is transmitted via an RF coil. As shown in Figure 1.5, the magnetic field component, B$1+$, of the EM wave from the RF coil must be created in a direction perpendicular to B_{0} in order to interact with the magnetization.
Using classical mechanics, the action of the RF pulse applied along one axis produces a torque perpendicular to that axis. As shown in Figure 1.5(b), the angle α by which the magnetization is rotated is proportional to the product of the strength of the applied RF field and the time, τ_{B1}, for which it is applied.
After application of an RF pulse with tip angle α about the xaxis, the net magnetization can be expressed as three different vectors.
The geometric design of the RF coil is determined by the requirement that the B$1+$ field produced by the coil must be perpendicular to B_{0}. There are a large number of different geometries, which are discussed in detail in Chapter 3. One example, widely used in highresolution liquidstate NMR, is the “saddle” coil, shown in Figure 1.6. The long axis of the coil is coincident with B_{0}, and current flowing through the copper conductor produces a B$1+$ field with the required orientation. The RF coil is tuned and impedance matched to 50 Ω at the Larmor frequency for high efficiency. The RF coil may be tuned to more than one frequency, as also discussed in Chapter 3.
Power to the RF coil is supplied by an RF amplifier, the general specifications of which include:
(i) Amplifiers for liquidstate and solidstate NMR experiments must be able to produce pulses as short as 1 µs, with accurate and reproducible shape, at frequencies up to ∼1 GHz. In solidstate NMR applications, very high power pulses with a very high duty cycle may be used for proton decoupling.
(ii) In the case of MRI, up to 30–60 kW of power must be available without the performance varying over time owing to any component heating, as well as the amplifiers being capable of high duty cycles for RFintensive sequences, such as turbo spinechoes.
The design of RF amplifiers is described in detail in Chapter 6.
1.4 Precession
When the RF pulse is turned off, the component of magnetization in the transverse plane precesses around B_{0}, as shown in Figure 1.7(a). The precession frequency, ω_{precession}, is exactly the same as the frequency of irradiation:
The concept of a rotating reference frame is very useful in analyzing the behaviour of the net magnetization, and is shown in Figure 1.7(b). The rotating reference frame (x′y′) is defined as rotating around B_{0} at an angular frequency ω_{0}.
In fact, the exact precession frequencies of different nuclei within a molecule are determined by two other factors, chemical shift and scalar coupling, which are outlined in the following sections.
1.4.1 Chemical Shift
The term “chemical shift” refers to the fact that protons in different chemical environments within a molecule resonate at slightly different frequencies: their precession frequencies are shifted (with respect to a reference, discussed below) with the magnitude of the shift depending on their particular chemical environment. The cause of this shift is that the exact magnetic field experienced by each proton in the molecule is slightly lower than B_{0} owing to the shielding effects of the electron cloud surrounding each proton. Electrons have a magnetic moment, which is opposite in sign to that of the proton, and so the effective magnetic field experienced by the proton is reduced. As an example, consider the lactic acid molecule shown in Figure 1.8. There are four different proton groups (CH_{3}, CH, OH, COOH) in this molecule: each of these proton groups has a slightly different precession frequency since they experience a slightly different magnetic field. The effective magnetic field, B_{eff}, experienced by a proton is given by:
where σ is called the shielding constant, and is related to the electronic environment surrounding the nucleus. The resonant frequency of the proton is given by:
One of the main factors that determines the value of σ is the electronegativity of the atoms connected to the protons: the proton in an –OH group has a lower shielding constant than those in a –CH_{2}– group since oxygen is more electronegative than carbon and pulls electrons away from the proton, thus reducing the shielding. The resonant frequency of the proton of an –OH group is therefore higher than that of the protons in a –CH_{2}– group. The chemical shift (δ), in units of partspermillion (ppm), is defined as:
where f_{ref} is the resonant frequency of the protons in tetramethylsilane (TMS), which acts as a reference for proton NMR spectra. Figure 1.9 shows approximate chemical shift ranges for protons in different chemical environments. For the lactic acid molecule, the order of resonance frequencies is: CH_{3} < CH < OH < COOH.
1.4.2 Scalar Coupling
Consider the protons in the molecule shown in Figure 1.10. There are three chemically distinct protons (H_{A}, H_{B}, and H_{C}), which have three different chemical shifts and corresponding resonant frequencies. However, there is also an interaction between the two protons H_{A} and H_{B}, which are separated by three chemical bonds (H_{A}toCtoCtoH_{B}). The magnetic field experienced by H_{A} depends upon whether H_{B} is in the α (parallel) or β (antiparallel) state, and vice versa: this phenomenon is termed scalar coupling. Therefore, there are four different energy levels for this coupled twoproton system: αα, αβ, βα, and ββ, as shown in Figure 1.10(b). The exact value of the scalar coupling constant J depends upon a number of different factors, including the particular type of chemical bond (single, double or triple bond), as well as the angle subtended between the C–H bonds (the Karplus angle), but in general the values are between 1 and 7 Hz. The greater the number of bonds between the protons the weaker the coupling, and so for the molecule in Figure 1.10(a) there is effectively no coupling between H_{A} and H_{C} since there are five chemical bonds between the protons.
For the coupled H_{A}–H_{B} system, the four different transition energies corresponding to the energy level diagram in Figure 1.10(b) are given by:
Figure 1.11 shows the evolution of the precessing magnetization for the three different protons. From Figure 1.9 the chemical shift of H_{C} has the lowest value, followed by H_{A} and the highest value for H_{B}. H_{C} precesses at a single frequency, whereas protons H_{A} and H_{B} are “split” into two frequencies by the scalar coupling.
1.4.3 Relaxation Processes
The final effect that must be considered in terms of the precession of the net magnetization is relaxation. After the RF pulse has been turned off, each of the magnetization components M_{z}, M_{x} and M_{y} returns to their thermal equilibrium values, with the timeevolution determined by specific timeconstants. The timeevolutions of M_{z}, M_{x} and M_{y} are characterized by differential equations known as the Bloch equations:^{14 }
The return of M_{z} to its equilibrium value of M_{0} is governed by the spinlattice (T_{1}) relaxation time, and the return of M_{x} and M_{y} to their thermal equilibrium value of zero by the spin–spin (T_{2}) relaxation time. It should be noted that the relative values of T_{1} and T_{2} can be very different for different types of sample, but T_{1} is always greater or equal to T_{2}. For nonviscous liquids used in highresolution NMR, the values of T_{1} and T_{2} are very similar. In contrast, in solid samples T_{2} can be up to six orders shorter than T_{1}, and for human MRI the T_{2} of many soft tissues is between one and two orders of magnitude smaller than T_{1}.
Solving the Bloch equations for the M_{x} and M_{y} components of magnetization gives:
Therefore, the precessing magnetization vectors shown in Figure 1.11 decay exponentially as a function of time. In practice, there is an addition term that gives rise to the decay of transverse magnetization, which is termed “inhomogeneous linebroadening” and has a timeconstant of T$2+$. This term arises from spatial inhomogeneities in the magnetic field within the sample asawhole, and can arise from the magnet itself or more commonly with an inhomogeneous sample. The overall relaxation time for transverse magnetization is termed T$2*$, which is given by:
The return of M_{z} to its thermal equilibrium value of M_{0} is governed by the T_{1} relaxation time:
1.5 The Receiver Coil for Detecting the MR Signal
In highresolution NMR experiments, the same RF coil used to transmit the RF pulses is also used to detect the MR signal. In contrast, in MRI experiments a large number of small coils are typically used to receive the signal, with (usually) a single large coil used to transmit the RF pulses. For simplicity, and without losing generality, Figure 1.12(a) shows the case relevant to highresolution NMR in which the saddle coil shown in Figure 1.6 is used as the receiver coil. The timevarying magnetic field produced by the precession of the magnetization vectors results in a voltage being induced in this receiver coil. The induced voltage, V, is given by Faraday’s law and is proportional to the rateofchange of magnetic flux:
where the coil sensitivity is defined as B_{1}/I, i.e. the B_{1} field produced per unit applied current. At higher strengths of the B_{0} field, the protons precess at a higher frequency, the value of dϕ/dt increases, and so the detected MR signal is higher.
The timedomain signal is shown in Figure 1.12(b). Based on the previous sections the signal contains a number of different frequencies owing to chemical shift and the effects of scalar coupling, and decays exponentially as a function of time. The timedomain signal is usually referred to as the free induction decay (FID).
1.6 The Receiver: Signal Demodulation, Digitization and Fourier Transformation
The analogue timedomain signal shown in Figure 1.12(b) must be converted into a digital signal so that it can be stored and processed. Typically, the magnitude of the signal is on the order of millivolts or even lower, which means that it cannot be digitized directly with a high dynamic range by a commercial analoguetodigital converter (ADC). It must first pass through the MR receiver, which is covered in detail in Chapter 7 and so only a brief overview is given here.
1.6.1 Receiver Electronics
A block diagram of the electronic circuits in the receiver is shown in Figure 1.13. The signal first passes through a lownoise preamplifier, with a typical gain factor of 20–30 dB and noise figure ∼0.5 dB. Commercial ADCs used in MR have a maximum input voltage of 5 volts, with resolution of 16 bits, and so the voltage should be amplified to close to 5 volts before being digitized, otherwise the full dynamic range of the ADC is not utilized.
Highresolution ADCs cannot sample at the very high frequencies associated with MR, and so it is necessary to demodulate the signal to reduce the sampling rate in order to take advantage of the high dynamic range. The first demodulation step uses two phase sensitive detectors (PSDs), with the inputs to the two PSDs phase shifted by 90° to produce real and imaginary outputs centred at a lower intermediate frequency, ω_{IF}. Each PSD contains a mixer and low pass filter, with the mixer effectively acting as a signal multiplier. The output of the mixer has frequency components at (ω_{0} + ω_{IF}) and (ω_{0} − ω_{IF}): the low pass filter removes the higher frequency components. The real, s_{R}(t), and imaginary, s_{I}(t), components of the signal pass through a second amplification stage and are digitized using separate ADCs. In practice, digital sampling is now common in both NMR and MRI,^{15 } and is discussed further in Chapter 7.
1.6.2 Signal Processing
In NMR experiments, after the signal has been digitized and stored, it is Fourier transformed into the frequency domain (for imaging experiments, covered later in this chapter, the transformation is a multidimensional inverse Fourier transform). The frequencydomain signal has both real, S_{R}(f), and imaginary, S_{I}(f), components given by:
The real part of the frequencydomain signal, S_{R}(f), is termed the absorptionmode spectrum, as shown in Figure 1.14. Each line in the spectrum is described by a Lorentz function with a fullwidthhalfmaximum (FWHM) given by (πT$2*$)^{−1}. The imaginary component of the frequencydomain signal is termed the dispersionmode spectrum, as also shown in Figure 1.14. The real part of the spectrum is displayed after the phase of the spectra is adjusted to account for the finite delay between the RF pulse being switched off and the start of data acquisition. Frequency independent (zeroorder) and frequencydependent (firstorder) phasing are applied so that the real part of the spectrum is completely absorptive.
1.7 Shim Coils
Despite every effort to construct a magnet that produces a completely homogeneous static field throughout the entire sample, this is impossible to achieve in practice. Finite mechanical tolerances in winding and placement of the superconducting wires, and material imperfections within the superconducting wire itself result in a small degree of spatial variation of the B_{0} field. Indeed, it is theoretically only possible to produce a completely homogeneous field with an infinitely long magnet, as covered in Chapter 2. Furthermore, unless the sample is a pure liquid, the different magnetic susceptibilities of components within the sample, and in particular the boundaries between these components, produce distortions in the magnetic field: this is the case particularly for MRI experiments in animals or humans, as described in Chapter 4.
In order to counteract this sampledependent inhomogeneity in the static magnetic field, it is necessary to introduce “shim coils”, which are discussed in more detail in Chapter 4. These are “correction” coils, through which current can be passed to produce a spatiallyvarying compensatory magnetic field for the particular sample being studied. There are two different types of shim coils: (i) superconducting shim coils, which are situated in the cryostat of the magnet, as shown in Figure 1.2, and which are adjusted only during magnet installation, and (ii) roomtemperature shims, which are normally placed on the inside of the magnet bore. In highresolution NMR there may be up to thirty different shim coils through which current can be passed. The reason for such a high number is that it is essential to obtain narrow linewidths in highresolution NMR spectroscopy in order to separate the resonances from protons in similar chemical environments. In MRI there are far fewer shim coils since: (i) imaging is inherently less sensitive than spectroscopy to B_{0} field inhomogeneities, (ii) the effect of the shims is less since they are situated a much greater distance away from the sample than in highresolution NMR, and (iii) the intrinsic inhomogeneities produced by the sample are much greater.
The geometry of the shim coils is designed to produce different spatial variations in the magnetic field. Figure 1.15(a) shows examples of three sets of shim coils used to produce different spatial compensations to the magnetic field, Figure 1.15(b), as a function of location in the zdirection. The effects of missetting the shim currents are also shown in Figure 1.15.
Optimization of the currents through the shim coils can be performed in two different ways. In one method, the real component of the deuterium lock signal is monitored, covered later in Section 1.9, in the other method magnetic field gradients are used, as described in Section 1.8.4.
1.8 Gradient Coils
Magnetic field gradient coils, a term usually shortened to simply “gradient coils”, are designed to produce a linear dependence of the effective magnetic field on spatial position. They consist of shaped conductors (wires or thin sheets) through which current passes to produce the gradient field. In highresolution NMR probes, a single zaxis gradient coil is usually integrated into the RF probe, although threeaxis gradients can also be present. For MRI, three independent orthogonal sets of gradient coils are present, each controlled by independent gradient amplifiers.
Since only the zcomponent of the magnetic field (B_{z}) interacts with the proton magnetic moments, it is the spatial variation of B_{z} that is relevant. The magnetic field gradients are designed to be linear over the sample, i.e.:
Figure 1.16 shows a plot of magnetic field vs. spatial position for a gradient applied along the zaxis.
When the gradient is switched on by passing current through the coil, the magnetic field B_{z} becomes a function of z position and is given by:
where G_{z} has units of tesla (T) per metre. The corresponding precession frequencies (ω_{z}) of the protons, in the rotating frame, are given by:
Details on gradient coil design, as well as the gradient amplifiers, are covered in Chapter 5. Gradient coils are used for many purposes in MR, the following being the most common:
(i) Dephasing or “crushing” of unwanted transverse magnetization.
(ii) Coherence selection in multiple quantum coherence experiments.^{16 }
(iii) Measurements of apparent diffusion coefficients of liquid samples,^{17 } or tissues in MRI.^{18 }
(iv) Rapid optimization of shim currents for highresolution NMR and MRI.
(v) Spatial localization in MRI^{19,20 } and localized in vivo magnetic resonance spectroscopy (MRS).
The following sections give a brief overview of these gradientbased applications.
1.8.1 Crusher Gradients to Dephase Transverse Magnetization
“Crusher” gradients are used to dephase transverse magnetization and are widely used, for example, in localized in vivo MR spectroscopy to suppress unwanted signals arising from imperfect RF pulses. In order to calculate the required strength and duration of a gradient pulse for effective dephasing, consider the effect of a gradient, G_{z}, applied for a time τ as shown in Figure 1.17(a), on transverse magnetization, M_{xy}. The resonance frequency of the protons is given by eqn (1.25). If one assumes a sample with length L in the zdirection, and with uniform proton density, then the average transverse magnetization, as a function of G_{z} and τ, over the length L is given by:
i.e. a sinc function. Figure 1.17(b) shows a plot of the transverse magnetization as a function of time and gradient strength. If one wishes, as an example, to completely dephase the magnetization for a sample of length 1 cm, then a 2 ms long gradient pulse with strength 0.37 T m^{−1} reduces the transverse magnetization by a factor of 1000.
1.8.2 Gradients for Coherence Selection in HighResolution NMR
Many NMR experiments involve the creation and selection of multiple quantum coherences to simplify the resulting spectra. Examples include homonuclear double quantum and triple quantum coherence selection in correlated spectroscopy (COSY) experiments, as well as heteronuclear multiple quantum coherences created in tripleresonance sequences. The topic of multiplequantum sequences is covered in many textbooks on high resolution NMR spectroscopy. Gradients can be used to select between different coherence pathways. The coherence order, p, is defined as the difference in the magnetic quantum number, m, of the relevant eigenstates, i.e.:
Longitudinal magnetization corresponds to p = 0, single quantum coherence transverse magnetization to p = ±1, doublequantum coherence to p = ±2, and so on. In any sequence, the coherence transfer pathway begins with p = 0, corresponding to thermal equilibrium magnetization along B_{0}.
In order to select only the desired coherence pathway, phase cycling can be used, i.e. repeating the sequence a number of times with different phases of the RF pulses. This is an efficient way of coherence selection, but limits the minimum total experiment time, especially for sequences requiring extensive phase cycles (16, 32 or 64 steps). An alternative method of selecting specific coherence orders is to use gradients, using the principle that the phase accumulation of the spins during the application of the gradient pulse is proportional to the coherence order. So for a rectangularshaped gradient pulse with strength G_{z}, applied for time τ, the phase ϕ is given by:
Eqn (1.28) shows, for example, that doublequantum coherences accumulate phase twice as fast as singlequantum coherence, and triplequantum coherences three times as fast. Thus, by applying gradient pulses of different strengths or durations it is possible to refocus selective coherence orders, while unwanted coherences are dephased. Simple examples are shown in Figure 1.18 for doublequantum and triplequantumfiltered COSY sequences.
1.8.3 Measurements of Apparent Diffusion Coefficients Using Gradients
The phase evolution of transverse magnetization when a gradient is applied can also be used to measure the molecular diffusion coefficient of a sample. The most common sequence used for this purpose is the Stejskal–Tanner spinecho, or variations thereof, shown in Figure 1.19.
The phase accumulation during the first gradient is given by:
The 180° pulse refocuses B_{0} inhomogeneities and chemical shift effects. If the diffusion coefficient of the sample is zero, then there is an equal and opposite phase accumulation produced by the gradient applied after the 180° pulse, and the effects of phase accumulation are completely rephased, the signal simply being attenuated by T_{2} relaxation. However, if there is indeed a physical displacement of the molecules, i.e. diffusion, during the time interval between the two gradient pulses, then the two phase accumulations are not equal and the signal amplitude is attenuated. The faster the diffusion coefficient (D) the greater the signal attenuation. In the “shortpulse limit”, i.e. when δ ≪ Δ, the signal intensity is given by:
where the bfactor is defined as:
By repeating the sequence with a set of different bvalues, usually via different values of the diffusionencoding gradient, the resulting signal amplitudes can be fitted to eqn (1.30) to determine the value of D. In addition to measuring diffusion in homogeneous liquid samples, diffusion weighting can be used in highresolution NMR^{21,22 } to filter out signals with a very fast diffusion coefficient, for example the water signal in a protein solution. Diffusion encoding sequences are very widely used in MRI in the areas of diffusion weighted imaging (DWI),^{18,23 } diffusion tensor imaging (DTI),^{24 } diffusion kurtosis imaging (DKI),^{25,26 } and fiber tractography.^{27 }
1.8.4 GradientBased Shimming
As outlined in Section 1.7, maximizing the magnetic field homogeneity for each sample involves B_{0} shimming, i.e. optimizing the currents through each of the individual shim coils. This is a timeconsuming process that is not ideal to perform manually, for example, for in vivo experiments. Rather than manual optimization, the process can be automated and speeded up by the use of gradients using a pulse sequence, such as the one shown in Figure 1.20(a), which measures the magnetic field inhomogeneity, ΔB_{0}(z) as:
where Δϕ is the spatially dependent phase difference between the measured projections shown in Figure 1.20(a). In terms of the shim settings, the residual magnetic field ΔB_{res}(z) can be defined as:
where S_{j}(z) is the magnetic field distribution of shim j, and c_{j} represents the corresponding weighting function. This residual is minimized by calculating the values of the coefficients c_{j} (i.e. the currents through each shim coil), which is normally performed in a leastsquares sense over the entire onedimensional zprojection:
where N_{z} is the number of data points acquired in the zprojection.
1.8.5 Gradients in MRI
In MRI three orthogonal sets of gradients are used to spatially encode the x, y and z dimensions of the sample. Each of these gradients is designed to provide a linear variation of magnetic field as a function of spatial dimension, i.e.:
The process of image formation is covered in more detail in Section 1.11 later in this chapter. For human MRI applications, typical gradient strengths of 60–70 mT m^{−1} are used, with some specialized gradients going up to 300 mT m^{−1}.^{28,29 } High gradient values can also be produced by reduced diameter “headonly insert” gradient coils. MRI is also extensively used in preclinical animal imaging systems, and also for microimaging experiments on samples as small as single cells.
1.9 The Deuterium Lock Channel and Field Monitoring
Although the static magnetic field is extremely stable over time, every magnet displays small frequency “drifts” that are typically of the order of 1–10 Hz per hour. Since many NMR experiments require data acquisition times on the order of hours or even days, it is essential to compensate in realtime for this field drift. If not corrected, then spectral linewidths are broadened, and artifacts can appear in the spectrum.
In highresolution liquidstate NMR, this correction is performed using a deuterium “lock channel”. One channel of one of the RF coils in the NMR probe is tuned to the deuterium (^{2}H) resonance frequency. The sample is dissolved in a fully or partially deuterated solvent (e.g. D_{2}O, CDCl_{3}, or C_{6}D_{6}). Deuterium is a quadrupolar nucleus with a very short T_{1} value, and so the signal can be pulsed and sampled effectively continuously. The imaginary “dispersive” component of the deuterium spectrum is monitored, as shown in Figure 1.21(a). Changes in the static magnetic field produce a shift in the dispersive spectrum, which is analyzed to define an error signal, as shown in Figure 1.21(a). This error signal forms the input to a negative feedback loop, which controls the current applied to the Z_{0} shim coil. This coil is a long solenoid, which produces a uniform magnetic field which can add or subtract from the main B_{0} field. Since the deuterium signal can be quite noisy (owing to the low power used for pulse transmission, the low gamma of the deuterium nucleus, and the low sensitivity of the deuterium channel of the RF coil), the deuterium signal is averaged over many hundreds or thousands of samples so that the current in the Z_{0} shim is only updated slowly. The negative feedback loop is designed such that it integrates the deuterium signals over a long period of time, and thus has a very slow timeconstant. The lock channel effectively forms a separate simple “spectrometer”, linked by a central clock/master oscillator to the rest of the data acquisition system.
The lockchannel can also be used to monitor the static field homogeneity during shimming. The better the homogeneity the sharper the deuterium line shape and the higher its amplitude. This system is still present on many highresolution NMR systems but gradientbased shimming, as described in Section 1.8.4, is increasingly being used.
For most in vivo MRI and MRS experiments there are not as stringent requirements for the stability of the magnetic field as there are in highresolution NMR. Experiments typically do not take as long, spectral linewidths in vivo are much wider owing to the intrinsic inhomogeneity of biological tissue, and imaging per se is much more robust with respect to small frequency drifts than spectroscopy. Therefore, in MRI systems there is no need for a separate lock channel. However, in MRI there are other mechanisms that can lead to drifts in the magnetic field. In sequences requiring rapid switching of the gradients, significant temperature changes can occur in the gradient coil, which in turn can heat components such as the passive iron shims and field booster rings. These thermal disturbances change the magnetic susceptibility of the component iron, and hence cause a change in the magnetic field. Changes owing to gradient heating are relatively slow owing to the large heat capacity of the physical former on which the gradient coils are wound, and the large mass of the structure, and so monitoring does not have to be continuous but can be interspersed between scans using very low tip angle spectroscopic measurements of the water resonance frequency, since it is the dominant species for in vivo measurements. Based on these measurements, rather than changing the magnetic field itself as described for the deuterium lock, the system simply alters the frequencies of the transmitter and receiver.
Although this type of monitoring can be used to compensate for global changes in the magnetic field, it cannot correct for spatially dependent changes, which, in addition to gradient heating, can be caused by many other factors, such as patient motion. Correcting for spatially dependent changes in the magnetic field clearly requires spatially dependent measurements. These can be implemented, for example, using multiple small microcoil probes that contain a fluorinated liquid and, similarly to the deuterium lock channel on a highresolution NMR system, form a separate but linked MR spectrometer.^{30 } The use of multiple fluorinated probes, shown in Figure 1.22, allows the extraction of spatial variations in the main magnetic field, and the ability to apply realtime corrections to compensate for these fluctuations.
1.10 Magic Angle Spinning SolidState NMR: Principles and Instrumental Requirements
NMR spectra of liquid samples consist of a series of very sharp resonances, owing to the averaging of anisotropic NMR interactions by rapid random tumbling, resulting in very long T_{2} values, typically hundreds of milliseconds. In contrast, NMR spectra of solid or rigid samples are very broad, since anisotropic and orientationdependent interactions are not averaged: an example is shown in Figure 1.23(a). The two most important interactions that produce broad linewidths in solids are dipolar coupling and chemical shielding, with the dipolar term being dominant especially at low magnetic fields.
Dipolar coupling results from the interaction of one nuclear spin with the magnetic field generated by a second nuclear spin, and vice versa. Dipolar coupling represents a direct throughspace interaction, the magnitude of which is given by:
where R$jkDD$ is the dipolar coupling between two spins j and k, and r_{jk} is the distance between the spins.
Chemical shielding is related to the chemical shift outlined earlier for liquid samples, and is an anisotropic interaction characterized by a shielding tensor. Anisotropy in the chemical shift leads to broadening of the spectral lines. For molecules which are spatially symmetric in threedimensions the chemical shift anisotropy (CSA) is very small. For nonsymmetric molecules, the CSA is larger, and linewidths correspondingly wider.
Both dipolar coupling and chemical shielding have an angular dependence with respect to B_{0}, containing multiplicative terms (3 cos^{2} θ − 1), where θ is the angle between a line connecting the two nuclei and B_{0} for the dipolar coupling, and between the direction with the largest deshielding and B_{0} for the chemical shift term. One can therefore effectively average out these components by rotating the sample very rapidly at an angle of 54.74° with respect to B_{0} such that 3 cos^{2} θ − 1 = 0, a technique termed magicangle spinning (MAS),^{31 } illustrated in Figure 1.23(b). For full averaging the rate of spinning must be greater than the anisotropic interaction. Stateoftheart microprobes are able to spin at a rate of 111 kHz.^{32 } For regularsized samples, typical diameter/spinning speeds are 1.3 mm diameter/65 kHz, 2.5 mm/35 kHz, 3.2 mm/23 kHz, 4 mm/8 kHz, and 7 mm/4 kHz. Since proton dipole–dipole coupling constants can be much greater than 100 kHz, full averaging is rarely achieved and MAS is often combined with multiplepulse sequences, which also reduce the effects of dipolar coupling, based on concepts originally developed as WAHUHA^{33 } or MREV8.^{34,35 } The combination of MAS with multiplepulse sequences is called CRAMPS (Combined Rotation and MultiplePulse Sequence) and requires highpower amplifiers, short RF times, and fast switching between the transmit and receive mode.
For dilute spin1/2 nuclei, such as ^{13}C, the homonuclear (^{13}C–^{13}C) dipolar coupling is insignificant owing to its low occurrence. The ^{1}H–^{13}C heteronuclear dipolar coupling can be minimized with highpower proton decoupling,^{33,36 } as shown in Figure 1.23(c). The sensitivity of this type of experiment can be increased using crosspolarization (CP)^{37 } techniques, which involve polarization transfer from ^{1}H to ^{13}C. Efficient CP requires that the precessional frequencies in the rotating frame are the same for protons and carbon, i.e.:
This requirement implies that the B$1+$ fields must be spatially homogeneous at both frequencies, and as discussed in Chapter 3 this requires that the coils be very well balanced, which is challenging, particularly at very high frequencies. Crosspolarization is generally combined with relatively lowspeed MAS (5 to 15 kHz) in a combined approach known as CP–MAS.
In a similar fashion to that described previously for liquidstate NMR, gradient coils can be incorporated into the probe in order to perform coherence pathway selection in multiple quantum solidstate experiments. In this case, the gradients must be oriented along the magic angle.^{38,39 }
The instrumental requirements corresponding to the types of experiments outlined above include:
(i) The ability to spin the sample extremely rapidly with a high degree of mechanical precision.
(ii) Very short (∼1 µs), highpower RF pulses must be applied, which place high degrees of demand on the RF amplifiers and components in the RF probe.
(iii) The RF fields for different nuclei must be spatially very well matched and homogeneous for efficient crosspolarization.
(iv) Isolation between the receive chains of the different nuclei, as well as between transmit and receive chains, must be very high since highpower decoupling may be applied during data acquisition.
(v) Magic angle gradients and associated gradient amplifiers must be capable of producing gradient pulses with durations below 100 µs and strengths of 500 mT m^{−1}.
1.11 Magnetic Resonance Imaging: Principles and Instrumental Requirements
In MRI there are a large number of different imaging sequences, which can be used for structural imaging, functional imaging, magnetic resonance angiography, and diffusionweighted imaging, to name only a few.^{12 } Two generic sequences, or “buildingblocks”, are shown in Figure 1.24, namely a gradientecho and spinecho sequence.
In the sequences shown in Figure 1.24 there are three “processes” used to produce the twodimensional image. First, sliceselection uses a frequencyselective RF pulse applied simultaneously with a magnetic field gradient, denoted by G_{slice}. If the selective RF pulse, with an excitation bandwidth of ±Δω_{s}, is applied at a frequency ω_{s}, then protons precessing at frequencies between ω_{s} + Δω_{s} and ω_{s} − Δω_{s} are rotated from the zaxis into the transverse plane, whereas protons with precession frequencies outside this range do not experience the RF pulse, as shown in Figure 1.25(a). By changing the centre frequency (ω_{s}) of the RF pulse, the slice can be centred at different parts of the sample. As indicated in Figure 1.25(b), the thickness of the slice can be decreased by using a larger gradient strength or a longer duration RF pulse that has a smaller frequency bandwidth.
Having selected a slice, a phase encoding gradient is applied to encode an orthogonal direction via the phase of the signal. After the phase encoding gradient has been switched off, the frequencyencoding gradient (G_{freq}) is turned on and data acquisition begins. N_{f} data points are sampled while the frequency encoding gradient is on, after which a relaxation delay (TR) occurs before the sequence is repeated using the next incremented value of the phaseencoding gradient. A total of N_{pe} phase encoding gradients are used, resulting in a total imaging time of TR × N_{pe}.
Assigning the G_{y} gradient to phase encoding, and G_{x} to frequency encoding, the combined effect of the phaseencoding and frequencyencoding gradients gives a signal:
where τ_{pe} is the time for which the phase encoding gradient is applied. Two variables k_{x} and k_{y} can be defined as:^{40,41 }
and eqn (1.38) can be reexpressed as:
The N_{f} × N_{p} data matrix can be visualized as a twodimensional dataset as a function of k_{x} and k_{y}, commonly referred to as the kspace domain. Consider the N_{r} data points collected when the maximum negative value of the phaseencoding gradient, G_{y}, is applied. From eqn (1.39) the value of k_{y} for all N_{r} data points corresponds to its maximum negative value. When the frequencyencoding gradient is switched on, the first data point collected corresponds to the maximum negative value of k_{x} due to the negative dephasing lobe shown in Figure 1.24(a), the second data point to a slightly more positive value of k_{x} and so forth, and so the N_{f} data points correspond to one “line” in kspace, shown as line 1 in Figure 1.26(a). The second line in kspace corresponds to the next value of the phaseencoding gradient, and so on. The spacing between the kspace points is inversely proportional to the respective spatial dimensions, or fieldsofview (FOV), in the image: Δk_{x} = 1/FOV_{x}, Δk_{y} = 1/FOV_{y}.
A twodimensional inverse Fourier transform of the kspace data S(k_{x}, k_{y}) gives ρ(x,y), which is the MR image, as shown in Figure 1.26(b). MR images are conventionally represented as the magnitude of ρ(x,y).
The signal intensity in each voxel of the image depends on the tissue relaxation times as well as the proton density. In terms of the MR relaxation times, for an axial image acquired using sliceselection in the zdirection, the image intensity of each voxel, I(x,y), is given by:
where ρ(x,y) is the “proton density” and the tip angle of the RF pulse in the gradient echo sequence is α°. The degree of T_{1}weighting of the image is determined by the respective values of the tissue T_{1} and the chosen TR interval between repeated phaseencoding steps: if TR ≪ T_{1} then there is no weighting, whereas if TR ≈ T_{1} then the image intensity is weighted by different tissue T_{1} relaxation times. Similarly, the situation of TE ≈ T$2*$ introduces T$2*$weighting into the image.
Although eqn (1.42) indicates that the SNR is maximized using a value of α = 90°, this case would require a long value of TR to allow full T_{1} relaxation to occur, and as a result an impractically long data acquisition time for clinical applications. In order to image more rapidly, the value of α is reduced to a value considerably smaller than 90°. For a given value of TR, the value of α that maximizes the signal intensity is given by:
For example, if TR is reduced to 0.05 T_{1}, then the optimum value of α is 8°. Using these parameters, images can be acquired in a few tens of seconds.
Gradientecho sequences allow very rapid image acquisition. The major disadvantage is that they are weighted by tissue T$2*$ values, which are typically much shorter than T_{2} in vivo. In order to introduce pure T_{2}contrast into the image a spinecho sequence can be used, as shown in Figure 1.24(b). The spatial encoding principles are exactly the same as for the gradient echo image, but now the intensity is weighed by the T_{2} rather than T$2*$ value:
As mentioned previously there are very many types of MRI sequences. Common instrumental requirements include:
RF coils and RF amplifiers must be able to handle/provide up to 30–60 kW of power, with duty cycles up to ∼20%. The pulses are both amplitude and phase modulated, with strict requirements for the reproducibility. The amplifiers must be linear over a large range of signal inputs/outputs.
For rapid imaging sequences such as echo planar imaging, gradient switching rates in the hundreds of hertz to kilohertz may be necessary. In this case, one also needs to consider peripheral nerve stimulation (PNS), which can occur when the dB/dt is on the order of 50–100 T s^{−1}.
Data acquisition involves much higher bandwidths than for spectroscopic experiments: fast imaging sequences may have bandwidths up to 1 MHz for very high gradient strengths.
The amount of streaming data is very high: a commercial 32channel receive array may acquire data essentially continuously over 20 minutes, representing several gigabytes of data that has to be processed in realtime for clinical evaluation.
Appendices
As seen in this first chapter, the hardware components of the MR system share many geometric properties and design goals. A cylindrical geometry is inherent in superconducting magnet design, RF volume coils, shim coils and gradient coils. Maximizing the homogeneity of the magnetic field is critical for superconducting magnet and RF coil design; producing a linear spatial variation in magnetic field is key for gradient coil design; and welldefined higherorder spatial distributions of the magnetic field are required for shim coil design. The basis for each of these component is a set of currentcarrying electrical conductors. Despite the fact that the operating frequencies of these different components are quite different (DC for magnets and shim coils, tens to hundreds of kHz for gradients, and tens to hundreds of MHz for RF coils), there are common mathematical tools that can be used to produce the desired magnetic field distributions. Two of the most common formalisms, namely the Biot–Savart law and spherical harmonic decomposition, together with specific examples of their use, are described in these two appendices. These models are further refined, and more sophisticated examples given, in several of the chapters later in the book.
Appendix A. Maxwell’s Equations and the Biot–Savart Law
The fundamental bases for calculating both magnetic and electric fields are termed Maxwell’s equations, listed in eqn (1.45–1.48).
where ρ_{v} is the electric charge density, ε the permittivity, µ the permeability, H the magnetic field, E the electric field, and J the electric current density. The operators on the left of eqn (1.45) and (1.46) represent divergence, and those in eqn (1.47) and (1.48) represent curl operators. In physical terms, the divergence of a vector field describes the degree to which it behaves as either a source or a sink at a given point. If the divergence is nonzero at some point then there must be a source or sink at that position: in contrast, if the divergence is zero then it indicates that there is neither. The curl operators on the left of eqn (1.47) and (1.48) represent the spatialvariation of the electric and magnetic fields, which are coupled to the timevariation of the magnetic and electric fields on the right hand side. In other words, as an electric field propagates throughout the sample it gives rise to a timevarying magnetic field. This magnetic field, which varies as a function of space, in turn gives rise to a timevarying electric field. Eqn (1.47) and (1.48) show that magnetic and electric fields are intrinsically coupled.
Designs for magnets, gradient coils, shim coils or RF coils can be formulated by simplifying Maxwell’s equations under conditions known as “quasistatic”, which corresponds to being able to neglect any effects of the finite wavelength of the EM wave within the sample. In this case, the magnetic field can be estimated quite accurately by the Biot–Savart law, which can be derived directly from Maxwell’s equations. The Biot–Savart law describes the magnetic field (dB) at a point P distance r from the wire, produced by a current I flowing through a small section (ds) of wire. The value of dB is given by:
where µ_{0} is the permeability of free space, equal to 1.257 × 10^{−6} T m A^{−1}. Two very simple examples are given below, a straight wire and a circular loop, both shown in Figure 1.27.
Example A1. Magnetic Field Produced by a Straight Wire
In Figure 1.27(a), the value of dB for a straight wire can be calculated by simple trigonometry:
The total magnetic field produced by the current in the infinitely long wire is then simply given by the integral of this expression:
The result shows that the magnetic field decreases as the inverse of distance from the wire.
Example A2. Magnetic Field Produced by a Circular Wire Loop
Consider a loop of wire with radius a, shown in Figure 1.27(b). If one considers the field produced along the central axis of the loop, there is only one nonzero component of the magnetic field, which is oriented along the zdirection and is given by:
So at the centre of the loop, the magnetic field is given by µ_{0}I/2a, i.e. the smaller the wire loop the higher the magnetic field produced per unit current. Along the central axis of the coil, i.e. along the zaxis, the magnetic field decreases approximately exponentially with distance.
The offaxis magnetic fields can also be calculated analytically, but are more complicated. They are given (in polar coordinates) by:
where E and K are complete elliptical integrals of the second and first kinds, respectively, and k is defined as:
Using these analytical results, designs using circular loops in particular can be optimized in terms of producing the desired spatial distribution of the magnetic field. The following two examples show the application in designing a linear magnetic field gradient and a homogeneous magnetic field, both with a simple twoloop arrangement.
Example A3. Design of a TwoLoop Coil Geometry to Produce a Linear zGradient
The simplest configuration for a coil producing a gradient in the zdirection is a “Maxwell pair”, shown in Figure 1.28(a), which consists of two separate loops of multiple turns of wire, each loop containing equal currents, I, flowing in opposite directions. In order to estimate the distance between the two loops that maximizes the linearity of the gradient, the value of B_{z} is first calculated using eqn (1.52):
where µ_{0} is the permeability of free space and a is the radius of the gradient set. By applying a Taylor series expansion, and noting that by symmetry the first two differentiable terms are zero, the first term that can give a nonlinear contribution is the third derivative, given by:
This term becomes zero at a value of d = a√3. The magnetic field produced by this gradient coil is zero at the centre of the coil, and is linearly dependent upon position in the zdirection over about onethird of the separation of the two loops. The region over which the gradient is linear can be extended by adding other sets of coils in the axial dimension, as covered later in more detail in Chapters 2 and 4.
Example A4. Design of a TwoLoop Coil Geometry to Produce a Homogeneous Magnetic Field
Using the same arrangement as before, except with the currents now flowing in the same direction shown in Figure 1.28(b), the firstorder term in the Taylor expansion is zero, and so the first perturbation arises from the second order term, which should therefore be set to zero, i.e.:
Combining eqn (1.55) and (1.57) gives the optimum value of the distance between the coils equal to the radius of each coil. In this case the magnetic field at the centre of the coil is given by:
Appendix B. Spherical Harmonic Representation of Magnetic Fields
As seen in Appendix A, the Biot–Savart law is an effective method for optimizing the design of simple geometries in terms of their behaviour onaxis. However, it becomes much more cumbersome to use when one needs to consider offaxis terms. In this case, a very widely used formalism is to represent magnetic fields in terms of spherical harmonics, as described in a simplified form below.
Visual Description
The starting point is to consider the magnetic field within a sphere of a certain diameter positioned at the centre of the magnet. If the aim is to produce a homogeneous magnetic field then one can clearly define the desired field by a single vector term B_{z} with fixed amplitude and direction within the sphere. As will be seen in Chapter 2, this is not possible to achieve in practice (theoretically one can achieve this only by passing current through an infinitely long solenoid) and there will be spatial perturbations in the magnetic field. As in many other areas of engineering one can define these perturbations in terms of increasing orders, i.e. firstorder, secondorder etc. In the case of spherical harmonics, there are three first order perturbations, five second order, seven third order, and so on. Within each order, there are a number of degrees, e.g. five degrees within the second order, seven degrees within the third order etc. The order is given the symbol n, and the degree the symbol m. The zero order term (m = 0, n = 0) represents a homogeneous magnetic field. The three first order (n = 1) perturbations correspond to linear variations in magnetic field, with the three orthogonal directions obviously being x, y and z. The degree (m) of the perturbation corresponds to the particular direction, with m = +1 being x, m = 0 being z, and m = −1 being y. The five second order terms (n = 2) correspond to m = +2, +1, 0, −1 and −2. Figure 1.29 shows the spatial distributions of the zero, first and second order spherical harmonics.
If one considers only the terms with m = 0, one can see that these are rotationally invariant with respect to the zaxis: these are called zonal harmonics. Considering the spheres to have longitudinal and latitudinal axes, analogous to a globe, there are 2m zeroes in the longitudinal axis and n − m zeroes in the latitudinal one.
Mathematical Description of Spherical Harmonics
Starting from Gauss’ law of magnetism and Ampere’s law, eqn (1.47) and (1.48), one can derive a very useful equation, which is referred to as Laplace’s equation.
where the differential Laplacian operator is defined as:
In the case of an MR magnet, the magnetic field is aligned along one axis (the zaxis), and so one can simplify the equation to give:
This equation is often solved in cylindrical coordinates (the derivation is long and complicated and covered in many textbooks so is not repeated here), shown in Figure 1.30, where θ and ϕ are the polar and azimuthal angles, respectively, and r is the radius.
The solution to Laplace’s equation results in a magnetic field B(r, θ, ϕ) which can be described by an expansion of orthogonal spherical harmonic functions Y_{nm} and coefficients C_{n,m}.
where n is the order and m the degree, as outlined in the previous section. Spherical harmonic functions are defined on the surface of a sphere, and are given by:
where C_{n,m} and ϕ_{n,m} are constants (ϕ_{n,m} = 0 for m ≥ 0 and π/2 for m < 0), and P_{nm}(cos θ) are polynomial functions known as Legendre polynomial functions for m = 0, and associated Legendre polynomial functions for m ≠ 0. Legendre polynomial functions can be calculated from:
and associated Legendre polynomials via:
Combining eqn (1.62) and (1.63), the magnetic field can be expressed as:
Table 1.2 gives the mathematical values of the lower order spherical harmonics that correspond to those shown in Figure 1.29.
P_{0,0}(cos θ)  
1  
P_{1,1}(cos θ)  P_{1,0}(cos θ)  P_{1,−1}(cos θ)  
sin θ  cos θ  sin θ  
P_{2,2}(cos θ)  P_{2,1}(cos θ)  P_{2,0}(cos θ)  P_{2,−1}(cos θ)  P_{2,−2}(cos θ) 
3 sin^{2} θ  3 sin θ cos θ  ½(3 cos^{2} θ − 1)  3 sin θ cos θ  3 sin^{2} θ 
P_{0,0}(cos θ)  
1  
P_{1,1}(cos θ)  P_{1,0}(cos θ)  P_{1,−1}(cos θ)  
sin θ  cos θ  sin θ  
P_{2,2}(cos θ)  P_{2,1}(cos θ)  P_{2,0}(cos θ)  P_{2,−1}(cos θ)  P_{2,−2}(cos θ) 
3 sin^{2} θ  3 sin θ cos θ  ½(3 cos^{2} θ − 1)  3 sin θ cos θ  3 sin^{2} θ 
To relate this mathematical description to the visual one presented earlier, one can consider a number of simple cases:
(i) All cases with m = 0. From eqn (1.66) the magnetic field is independent of ϕ, i.e. it is rotationally invariant around the zaxis. For the particular case that n = 0, m = 0, the magnetic field is constant. When m = 0, the remaining Legendre polynomials are referred to as zonal harmonics, and give rise to what is termed a zonal magnetic field.
If θ = 0, i.e. along the zaxis:
Since P_{n}(1) = 1, this can be expanded to give:
This expression is very useful in determining parameters in, for example, gradient coil design as covered in the examples at the end of this Appendix.
(ii) When m ≠ 0, the magnetic field around the z axis “oscillates” with a frequency mϕ and initial phase ϕ_{n,m}. For the case that m = +1, the field around the circumference should exhibit one cycle, and for m = −1 also for one cycle but with a π/2 phase shift in the origin of the cycle. Similarly for m = +2 and −2, there are two cycles circumferentially, as seen in Figure 1.29. Spherical harmonics with m ≠ 0 are referred to as tesseral harmonics.
For n = ±1 and m = 0 the function is rotationally invariant, and there is one cycle as a function of θ.
For n = 1, m = ±1 the number of zeros as a function of θ is zero. These correspond to what are termed as sectoral harmonics, corresponding to the case n = m. Since m = 1 then there is one cycle around the circumference.
Having given a mathematical description of spherical harmonics, the final step is to show how these can be used in very simple examples of generating specific spatial distributions of the magnetic field. The first two cases are identical to those solved in Appendix A to show the correspondence between the two techniques.
Example B1. Generation of a Homogeneous Magnetic Field
The basic building block to generate zonal harmonics is a current loop with its central axis lying along the zdirection. A declination angle α is defined with respect to a central point z = 0 as shown in Figure 1.31.
The magnetic field in terms of zonal harmonics is given by:
If a second loop is placed symmetrically about z = 0, then one can use the fact that:
and if equal currents are applied in the same direction in each loop, then eqn (1.71) means that all the odd zonal terms in z, z^{3}, z^{5}etc. are cancelled out, leaving the desired term (i.e. the homogeneous magnetic field) in z^{0} and the first terms that must be cancelled are in z^{2}. From eqn (1.70) the contribution is determined by the value of P_{3,1}(cos α). Using Table 1.2, this value is zero when 5 cos^{2} α − 1 = 0, from which α = 63° and d_{constant} = a, i.e. the separation is equal to the radius, the same value (fortunately!) as derived in example A1.
Example B2. Generating a Linear Magnetic Field Gradient in z
Consider the same two loops of wire; if the currents in the two loops are now equal and opposite, then even orders cancel, i.e. z^{2} = z^{4} = z^{6} = 0. Therefore, the first term that needs to be set to zero is the third order one. From Table 1.2, P_{41} contains a term in (7 cos^{3} θ − 3 cos θ), which is equal to zero for θ = 49.1°. This corresponds to a separation given by 1.73 times the radius.
Example B3. Generating a Linear Magnetic Field Gradient in x or y
As can be appreciated from Figure 1.29, generating a magnetic field gradient in either the x or ydirection involves spherical harmonics with n = 1, m = ±1, and since m ≠ 0 these involve tesseral harmonics rather than zonal harmonics. Unlike zonal harmonics, tesseral harmonics cannot be generated by a current loop, but can be generated instead using arcs of current, as shown in Figure 1.32(a). As shown by Romeo and Hoult,^{42 } the magnetic field produced by such an arc is given by:
where dψ represents the azimuthal width of the arc. In this case the constant terms C_{n,m} contain two associated Legendre polynomials. As was shown previously for rings, if two arcs are placed 180° apart with current flowing in opposite directions, then the even degrees cancel out, as shown in Figure 1.32(a). So, with respect to the degree n there are terms in B_{11}, B_{13}, B_{15}etc. and with respect to the order m there are terms in B_{21}, B_{31}, B_{41}etc. The term in B_{13} can be cancelled by appropriate choice of the width Δψ of the arc:
This term is zero when the angle subtended by the arc is 120°. The next step is to cancel out the higher order terms. As shown in the previous example, by using a symmetrical arrangement about the z = 0 axis, even order terms are cancelled out by extending the number of arcs from two to four, as shown in Figure 1.32(b). The next term is the contribution from B_{31}, which as also shown in Romeo and Hoult,^{42 } can be made equal to zero by calculating the relevant value of C_{n,m}, and results in the arrangement shown in Figure 1.32(c), with the values of α and β given by 21.3° and 68.7°, respectively.