MRI-110 · Lesson 9 of 12 · 30 min

Spatial encoding with gradients

▶ Video coming soon A video version of this lesson is on the way.

Ishani was planning her first knee study on her own while Mireille watched. She drew sagittal slices on the localizer, then paused. 'The whole knee is inside the coil,' she said. 'Every proton in it is sending signal at the same time, into the same coil. How does the scanner know which signal came from the meniscus and which came from the patella?' Mireille pointed at the timing diagram. 'Three gradients. One picks the slice. One labels position with frequency. One labels position with phase. Once you understand those three, the rest of MRI is mostly bookkeeping.'

The receiver coil picks up a single, combined signal from every excited spin within its range. Nothing in the coil itself tells where each part of that signal came from. MRI solves this by making the resonant frequency and phase of the spins depend on their position, using gradient magnetic fields. This lesson explains what a gradient is, how gradients select a slice, how frequency encoding and phase encoding locate signals within the slice, and how slice orientation, slice thickness, field of view and matrix relate to gradient strength.

What a gradient does

A gradient coil adds a small extra field along z whose strength changes linearly with position along one axis. With the x gradient on, for example, the total field is slightly stronger on one side of the bore, exactly B0 at the middle of the magnet (the isocenter), and slightly weaker on the other side. Gradients are measured in millitesla per meter, and the field at a position is B0 plus the gradient strength multiplied by the distance from the isocenter.

\[B(x) = B_0 + G_x \, x \qquad f(x) = \bar{\gamma}\,(B_0 + G_x x)\]

Because the Larmor frequency is proportional to the local field, a gradient turns position into frequency. Spins on the stronger side precess faster, spins on the weaker side slower. The size of the effect follows from the Larmor equation.

Worked problem

Frequency offset from a gradient

An x gradient of 10 mT/m is switched on. What is the frequency offset of hydrogen spins 10 cm from the isocenter? What is the frequency difference between two points 1 mm apart?

Show solution
  1. Field offset at 10 cm = 10 mT/m multiplied by 0.1 m = 1 mT = 0.001 T.
  2. Frequency offset = 42.58 MHz/T multiplied by 0.001 T = 42.58 kHz.
  3. For 1 mm: 10 mT/m multiplied by 0.001 m = 0.01 mT = 0.00001 T.
  4. 42.58 MHz/T multiplied by 0.00001 T = 426 Hz.

Answer: About 42.6 kHz at 10 cm, and about 426 Hz between points 1 mm apart. These offsets are tiny compared with the 63.9 MHz Larmor frequency at 1.5 T but easily measured.

The scanner has three gradient coils, one for each physical axis: x (left-right), y (anterior-posterior) and z (along the bore, head-foot). Each sequence assigns them three jobs: slice selection, phase encoding and frequency encoding. For an axial slice, the slice-select gradient is z; for a sagittal slice, x; for a coronal slice, y. Oblique slices use combinations of two or three physical gradients at once. The physics of each job is the same regardless of which coil performs it.

Slice selection

To image one slice, the scanner switches on the slice-select gradient during the RF pulse. The gradient spreads the resonant frequencies along the slice direction, so that each plane of tissue has its own frequency. The RF pulse is designed to contain a narrow band of frequencies, called its transmit bandwidth. Only spins whose frequencies fall within that band are excited. The result is a slab of excited tissue: the slice.

A graph of frequency offset in kilohertz against position along z in millimeters. Two straight lines pass through the origin: a gradient of 10 mT per meter and a steeper gradient of 20 mT per meter. A shaded horizontal band from minus 0.5 to plus 0.5 kilohertz is labeled RF pulse bandwidth 1 kHz. Dotted vertical lines show that the shallower gradient selects a slice about 2.3 millimeters thick and the steeper gradient a slice about 1.2 millimeters thick.
Slice selection. The same 1 kHz RF bandwidth selects a thinner slice when the gradient is steeper.

The slice position is set by the center frequency of the pulse: shifting the pulse frequency moves the slice up or down the gradient. The slice thickness depends on the transmit bandwidth and the gradient strength.

\[\Delta z = \frac{\Delta f_{\text{RF}}}{\bar{\gamma}\, G_{ss}}\]

Worked problem

Calculating slice thickness

An RF pulse has a bandwidth of 1 kHz and the slice-select gradient is 10 mT/m. What is the slice thickness? What happens if the gradient doubles to 20 mT/m? What bandwidth would give a 5 mm slice at 10 mT/m?

Show solution
  1. Gamma-bar multiplied by G = 42.58 MHz/T multiplied by 0.010 T/m = 425,800 Hz per meter, or 425.8 Hz per mm.
  2. Thickness = 1,000 Hz divided by 425.8 Hz per mm = 2.35 mm.
  3. At 20 mT/m: 851.6 Hz per mm, so thickness = 1,000 divided by 851.6 = 1.17 mm.
  4. For 5 mm at 10 mT/m: bandwidth = 5 mm multiplied by 425.8 Hz per mm = 2,129 Hz, about 2.1 kHz.

Answer: About 2.3 mm; doubling the gradient halves it to about 1.2 mm; a 5 mm slice needs about 2.1 kHz of bandwidth.

Thinner slices therefore need either a steeper gradient or a narrower RF bandwidth. Narrow bandwidth pulses must last longer (a pulse's bandwidth is roughly the inverse of its duration), which lengthens the minimum TE. The maximum gradient strength and slew rate of the scanner set a practical limit on how thin a slice can be. In 2D imaging, slices thinner than about 2 to 3 mm become difficult and lose signal; 3D imaging, which uses phase encoding in the slice direction, is used for very thin slices.

Slice profile, gap and cross-talk

An ideal slice would have a perfectly rectangular profile: full excitation inside, none outside. Real RF pulses have finite duration and produce profiles with sloping edges, so tissue just outside each nominal slice is partly excited. When slices are contiguous, the edges of neighboring slices overlap. Excitation of one slice then partly saturates its neighbor, reducing signal and altering contrast. This is called cross-talk. Leaving a gap between slices, often 10 to 30 percent of the slice thickness, and acquiring slices in an interleaved order reduce cross-talk at the cost of not sampling the tissue in the gaps.

Rephasing the slice

The slice-select gradient also causes spins across the thickness of the slice to dephase, because spins at the top and bottom of the slice precess at slightly different rates during the pulse. A short gradient lobe of opposite polarity immediately after the pulse, the slice rephasing lobe, unwinds this dephasing. It appears on the timing diagrams of lessons 7 and 8 as the small negative lobe after the excitation pulse.

Frequency encoding

Within the slice, one direction is encoded by frequency. During the echo, the scanner switches on the frequency-encoding gradient, also called the readout gradient. While it is on, spins at different positions along that direction precess at different frequencies. The received signal is therefore a mixture of many frequencies, each one coming from a different column of tissue across the slice, and the amplitude at each frequency reflects how much signal that column produces.

The scanner digitizes the echo, sampling it many times during the readout. The mathematical operation called the Fourier transform separates a mixed signal into its component frequencies, much as the ear distinguishes the notes of a chord. Applied to the readout, it tells how much signal came from each position along the frequency-encoding direction. Lesson 10 shows how this fits into k-space.

Receiver bandwidth and pixel width

The range of frequencies the receiver accepts across the field of view is the receiver bandwidth. It is related to the readout gradient strength and the field of view. If the field of view in the frequency direction is divided into N pixels, each pixel corresponds to a band of frequencies equal to the receiver bandwidth divided by N.

Worked problem

Receiver bandwidth and pixel bandwidth

A sequence uses a receiver bandwidth of plus or minus 16 kHz (32 kHz total) across a 256 mm field of view with 256 frequency-encoding samples. What is the bandwidth per pixel, the readout gradient strength, and the sampling time?

Show solution
  1. Pixel bandwidth = 32,000 Hz divided by 256 = 125 Hz per pixel.
  2. Hz per mm across the field of view = 32,000 divided by 256 mm = 125 Hz per mm.
  3. Gradient = 125 Hz per mm divided by 42.58 Hz per mm per mT/m (since 1 mT/m gives 42.58 Hz per mm) = about 2.9 mT/m.
  4. Sampling interval = 1 divided by 32,000 Hz = 31.25 microseconds; 256 samples take 256 multiplied by 31.25 microseconds = 8 ms.

Answer: 125 Hz per pixel, a readout gradient of about 2.9 mT/m and a sampling time of 8 ms.

Receiver bandwidth is a parameter the technologist can change, and it has three linked effects. A wider bandwidth needs a stronger readout gradient and shorter sampling time, allowing shorter TE and TR, and it reduces chemical shift and susceptibility distortion measured in pixels. But it admits more noise, lowering the signal-to-noise ratio. A narrower bandwidth raises SNR but lengthens the minimum TE and increases chemical shift. Lesson 11 quantifies the SNR trade-off, and MRI-111 deals with the artifacts.

Worked problem

Chemical shift in pixels

At 1.5 T, fat and water differ by about 224 Hz. How far is fat displaced relative to water, in pixels, at a pixel bandwidth of 125 Hz? What if the bandwidth is halved, or the scan moves to 3 T with the same pixel bandwidth?

Show solution
  1. Displacement = frequency difference divided by pixel bandwidth = 224 divided by 125 = 1.8 pixels.
  2. Halving the bandwidth to 62.5 Hz per pixel: 224 divided by 62.5 = 3.6 pixels.
  3. At 3 T the difference is about 447 Hz: 447 divided by 125 = 3.6 pixels.

Answer: About 1.8 pixels at 1.5 T; it doubles to about 3.6 pixels if the bandwidth is halved or the field is doubled.

Phase encoding

Frequency encoding locates signal along one direction within the slice. The other in-plane direction is encoded by phase. After excitation and before readout, the scanner briefly switches on the phase-encoding gradient along that direction. While it is on, spins at different positions precess at slightly different rates, and when it switches off they return to the same frequency but keep the phase differences they gained. The spins are left with a phase that depends on their position along the phase-encoding direction.

A single phase measurement cannot separate all positions, because many combinations of positions could give the same mixed signal. The sequence therefore repeats, applying a different phase-encoding gradient strength each time, from strongly negative through zero to strongly positive. Each repetition produces one echo, one line of data. After as many repetitions as there are pixels in the phase-encoding direction, the scanner has enough information to separate the signal by position using a second Fourier transform.

This is why the number of phase-encoding steps appears directly in the scan time formula. Doubling the phase matrix doubles the number of repetitions and so doubles the scan time. The frequency matrix, by contrast, costs no extra repetitions, because all the frequency samples are collected during one readout. Technologists therefore often choose a higher frequency matrix than phase matrix (for example 320 by 256) and choose which direction will be phase-encoded with care.

The three spatial encoding steps.
StepWhen it happensWhat it encodesEffect on scan time
Slice selectionDuring each RF pulseWhich slice is excitedNone directly; slices interleave within TR
Phase encodingBetween excitation and readout, a different strength every TRPosition along the phase direction, by phaseScan time proportional to number of phase steps
Frequency encodingDuring the echo (readout)Position along the frequency direction, by frequencyNone directly; samples collected in one readout

Field of view, matrix and pixel size

The field of view (FOV) is the size of the region shown in the image, in each direction. The matrix is the number of pixels in each direction. Pixel size equals FOV divided by matrix, and voxel size adds the slice thickness as the third dimension.

Worked problem

Pixel and voxel size

A brain sequence uses a 230 mm FOV, a matrix of 320 (frequency) by 256 (phase), and 5 mm slices. What are the pixel dimensions and the voxel volume?

Show solution
  1. Frequency direction: 230 divided by 320 = 0.72 mm.
  2. Phase direction: 230 divided by 256 = 0.90 mm.
  3. Voxel volume = 0.72 multiplied by 0.90 multiplied by 5 = 3.2 cubic mm.

Answer: Pixels are about 0.72 by 0.90 mm, and each voxel is about 3.2 cubic mm. The pixels are slightly rectangular; interpolation can display them as square, but the true resolution is unchanged.

The FOV in the phase direction can be reduced on its own, a feature called rectangular FOV, for anatomy that is narrower in one direction, such as the spine or an axial body section. With the same pixel size, fewer phase steps are needed, which shortens the scan. If any anatomy lies outside the FOV in the phase direction, however, it wraps around into the image, an artifact called aliasing or wrap. Lesson 10 explains why, and MRI-111 explains how to prevent it.

Choosing the phase-encoding direction

Motion during a scan produces ghosts that are copied along the phase-encoding direction, because phase encoding is spread over the whole scan, while frequency encoding is completed within milliseconds. Choosing the phase direction therefore matters. In a sagittal spine, phase encoding anterior-posterior would spread swallowing and breathing ghosts across the spinal canal, so phase is usually set head-foot. In an axial abdomen, the phase direction is usually anterior-posterior because the body is narrower that way, reducing phase steps, though respiratory ghosts then appear in that direction. These choices balance artifacts, scan time and wrap, and they are a routine part of technologist practice.

Common mistakes

  • MistakeThinking the receiver coil can tell where signal comes from.

    InsteadThe coil records a combined signal; gradients encode position as frequency and phase.

  • MistakeBelieving a steeper slice-select gradient makes thicker slices.

    InsteadA steeper gradient spreads frequencies more, so the same RF bandwidth selects a thinner slice.

  • MistakeAssuming a larger frequency matrix lengthens a 2D scan.

    InsteadFrequency samples are collected in one readout; only phase steps add repetitions.

  • MistakeTreating receiver bandwidth as having no effect on image quality.

    InsteadNarrower bandwidth raises SNR but increases chemical shift and minimum TE; wider bandwidth does the reverse.

  • MistakeChoosing the phase direction without regard to motion.

    InsteadMotion ghosts appear along the phase direction, so orient it away from critical anatomy where possible.

Summary and key terms

  • A gradient makes the field, and so the Larmor frequency, vary linearly with position; 10 mT/m gives about 426 Hz per mm for hydrogen.
  • Slice selection uses a gradient during a band-limited RF pulse; thickness equals RF bandwidth divided by gamma-bar times gradient.
  • Frequency encoding applies a readout gradient during the echo; the Fourier transform separates positions by frequency.
  • Phase encoding applies a gradient of different strength each repetition; the number of phase steps sets scan time.
  • Receiver bandwidth affects SNR, minimum TE and chemical shift in pixels; pixel size equals FOV divided by matrix.
  • Motion ghosts and wrap occur along the phase direction, so its orientation is chosen with care.
Gradient
A field that varies linearly with position, measured in mT/m.
Isocenter
The middle of the magnet, where gradients add no field.
Slice-select gradient
The gradient applied during RF pulses so that only one slice resonates.
Transmit bandwidth
The range of frequencies contained in an RF pulse.
Frequency encoding
Locating signal along one direction by making frequency depend on position during readout.
Phase encoding
Locating signal along a second direction by giving spins position-dependent phase before readout.
Receiver bandwidth
The range of frequencies accepted by the receiver across the field of view.
Field of view (FOV)
The size of the region represented in the image.
Matrix
The number of pixels in the frequency and phase directions.
Cross-talk
Partial excitation of neighboring slices due to imperfect slice profiles.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. With a 25 mT/m gradient, what is the frequency difference between points 2 mm apart?

    Show answer

    25 mT/m multiplied by 0.002 m = 0.05 mT; multiplied by 42.58 MHz/T gives about 2.1 kHz.

  2. A 3 mm slice is wanted with a 1.5 kHz RF bandwidth. What gradient is needed?

    Show answer

    G = bandwidth divided by (gamma-bar multiplied by thickness) = 1,500 divided by (42.58 times 10 to the 6 multiplied by 0.003) = about 11.7 mT/m.

  3. A sequence uses a 200 mm FOV and a 256 by 192 matrix with 4 mm slices. What is the voxel volume?

    Show answer

    0.78 mm multiplied by 1.04 mm multiplied by 4 mm = about 3.3 cubic mm.

  4. Changing the phase matrix from 192 to 256 with the same TR and NEX changes scan time by what factor?

    Show answer

    256 divided by 192 = 1.33, so about one third longer.

  5. Fat and water differ by 447 Hz at 3 T. What pixel bandwidth keeps the chemical shift to 1 pixel?

    Show answer

    About 447 Hz per pixel.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz