<<

Molecular Biophysics - September 22, 2011 1 Part I Math Fundamentals - NMR

1 Complex Numbers

Complex numbers are widely used as a convenient method of keeping track of the frequency and phases of 1 pulses and signals in NMR. In the case of x-ray crystal- lography, they provide a way of representing the effect of atomic position on the scattering of x-rays. 0 A complex number is of the form z = a + ib, where 0 10 20 30 40 50 a and b are real numbers. The symbol i is defined as Amplitude i = √ 1. There are various ways to represent complex − numbers. one of the most useful is a Argand diagram, -1 shown in Fig. 2. In the Argand diagram the real (a) Time and imaginary (b) components of the complex number define the position of the point in a Cartesian system Figure 1: Two electric fields are with the real and imaginary axis as the two basis, or shown. Both have the same fre- coordinate axis. It is also possible to represent complex quency, but differ in phase. The ◦ numbers in polar coordinates. The two representations solid line has a phase shift of 0 , ◦ are equivalent. The latter representation is more useful while the dotted line is shifted -120 in NMR because the phase of the NMR signal can be . obtained directly from the size of θ. The representation of the complex number in polar coordinates gives the following defi- nition: z = r(cosθ + isinθ), (1) A useful relationship is Euler’s identity:

eiθ = cosθ + isinθ (2)

This can be seen from the series expansion of eiθ, cosθ, and sinθ. θ2 θ4 θ θ3 θ5 cosθ =1 + . . . sinθ = + . . . (3) − 2! 4! − 1! − 3! 5!

i i r θ r r

Figure 2: Representation of complex numbers. An Argand diagram is shown on the left and the representation in polar coordinates is shown on the right. The real and imaginary axis are labeled with r and i, respectively. In polar coordinates, r = √a2 + b2 and θ = atan(b/a). Note that this ’r’ refers to the length of the vector from the origin to the position of the point, not the real axis. In this particular example, a = 1, b = 3, r = √10, and θ = 71.56◦. 2

iθ (iθ)2 (iθ)3 (iθ)4 eiθ = 1+ + + + + . . . 1! 2! 3! 4! iθ i2θ2 i3θ3 i4θ4 = 1+ + + + + . . . 1! 2! 3! 4! iθ θ2 iθ3 θ4 = 1+ + − + − + + . . . 1! 2! 3! 4! θ2 θ4 iθ iθ3 = 1+ − + + . . . + + − + . . .  2! 4!  1! 3!  = cosθ + isinθ

Linear combinations of eiωt and e−iωt can also be used to define signals that are represented by cos(ωt) and sin(ωt):

eiθ + e−iθ eiθ e−iθ cosθ = sinθ = − (4) 2 2i The linear combination of the two complex numbers simply serves to cancel the complex part of the number, leaving only the real part. Nevertheless, it can be useful to think of cos(ωt) signal as the of two complex vectors, one that rotates counter clockwise (eiωt) and the other that rotates clockwise (e−iωt). Similarly, sin(ωt) can be thought of as 1 the difference between these same two vectors, except that the difference is multiplied by i which interchanges the real and imaginary axis.

1.1 Representation of Signals A time dependent oscillation can be characterized by an amplitude (A), frequency(ω), and phase (φ). Complex numbers provide a way of representing all three of these parameters in a concise manner: S(t)= Aei(ωt+φ) (5) This function can be imagined as a vector that rotates in the Argand plane with a frequency ω. In terms of the observable signal, only the real component of the complex function exists. Its imaginary component simply provides a way of incorporating the phase shift of the signal.

2

The Dirac delta function, δ(x x′), is an infinitely sharp “spike” located at x′ whose ∞ ′ − ′ ′ is unity ( −∞ δ(x x )dx = 1). Extending this to two dimensions, δ(x x )δ(y y ) represents − ′ ′ − − a spike locatedR at x = x and y = y in a two dimensional plane. An important property of the the delta function is its ability to select a single point from a : ∞ f(x)δ(x x′)dx = f(x′) (6) Z−∞ − This result follows from the integral property of the δ-function: ∞ δ(x x′)dx =1 (7) Z−∞ − Equation 6 can be proven by taking the range of the integration from x = x′ ǫ to x′ + ǫ. The integral is zero outside this range because the delta function is zero outside− this range. 3

Eq. 6 can now be written: x′+ǫ f(x)δ(x x′)dx (8) Zx′−ǫ − as ǫ is decreased, f(x) f(x′), and the integral becomes: ≈ x′+ǫ f(x′) δ(x x′)dx = f(x′) (9) Zx′−ǫ −

3 Fourier Transforms

In very general terms the Fourier transformation is a mathematical technique that determines the amplitude and frequencies of oscillatory signals contained within a time varying function. In the case of NMR, the is used to converts the time domain NMR signal (FID) to a frequency domain signal, otherwise known as the NMR spectrum. For example, if the time dependent signal is given by the following equation, f(t)= Acos(ωt), (10) then the Fourier transform of this signal will provide both the frequency of the oscillation, (ω), as well as the amplitude of the component at that frequency (A). The amplitude is the intensity of the spectral line. In the case of X-ray crystallography, the input data to the Fourier transform is the scattering intensities as a function of reciprocal space and the resultant transform is the electron density in real space.

3.1 Fourier Series The Fourier series is a useful starting point to understand some concepts of Fourier trans- forms. The Fourier series describes any time dependent periodic function, f(t), in terms of discrete frequency components: ω, 2ω, 3ω.... If a function has a period of 2π then it can be represented by the following sum, or Fourier series representation of f(t):

∞ a f(t)= o + a cos(nt) + b sin(nt) (11) 2 n n Xn=1 The above indicates that we can represent an arbitrary function as a linear combination of a series of basis functions (cosine and sin), just as we might write an arbitrary vector in terms of its x-, y-, and z-components. As with any other set of basis functions, these functions are orthogonal: π sin(mt)sin(nt)dt = πδmn (12) Z−π π cos(mt)cos(nt)dt = πδmn (13) Z−π π sin(mt)cos(nt)dt =0 (14) Z−π

δmn =1 if m = n, otherwise, δmn = 0. These orthogonality relationships can be used to calculate the coefficients of the Fourier series representation of f(t): 4

1 π an = f(t)cos(nt)dt (15) π Z−π 1 π bn = f(t)sin(nt)dt (16) π Z−π an and bn are the amplitudes of the various frequency components that sum to give f(t). Note that bo is always zero since sin(0) = 0. For well behaved functions, as n gets larger both an and bn approach zero. For example, coefficients for the Fourier series representation of a square wave are given in Fig. 4 and the Fourier representation of the square wave is given in Fig. 3. How well a Fourier series represents its function depends on the nature of the function. In general, functions with sharp edges (i.e. square wave) require a large number of terms to adequately represent the function, as illustrated in Fig. 3.

AB

-2 0 2 4 -2 0 2 4 Time Time

Figure 3: The Fourier series that represents a square wave is shown as the sum of the first 3 terms of the series (panel A) as the sum of the first 7 terms of the series (panel B). Note that the representation of the square wave becomes more accurate as the number of terms increases. The square wave is drawn with a dotted line while the Fourier sums are shown as a continuous line.

b n

0 2 4 6 8 10 12 14 16 18 n

Figure 4: Fourier components, or spectrum, of a square wave. The coefficients, bn are plotted as a function of frequency, ωn. The strongest frequency component corresponds to ω, the second strongest is 3ω, etc. Note that only discrete values of ω are allowed since a square wave is a periodic function.

3.2 Non-periodic Functions - The Fourier Transform Once the function becomes non-periodic it is necessary to utilize a continuous transform, called the Fourier transform: 1 ∞ F (ω)= f(t)eiωtdt (17) √2π Z−∞ In this case, the non-periodic time domain signal f(t) is represented by a continuous function in the frequency domain, F (ω). F (ω) gives the amplitude of the frequency components which 5 are present in the time domain signal. If F (ω) exists, then it is possible to calculate the inverse Fourier transform of a function: 1 ∞ f(t)= F (ω)e−iωtdw (18) √2π Z−∞

3.3 Examples of Fourier Transforms: 3.3.1 Cosine The and cosine functions describe the time evolution of the detected magnetization from the magnetic dipoles in the x-y plane as they precess about Bo. The Fourier transforms of these two functions are shown in Fig. 5

Cosine f(t)= cos(ωot) (19)

∞ iωt F (ω) = cos(ωot)e dt Z−∞ ∞

= cos(ωot)[cos(ωt)+ isin(ωt)]dt (20) Z−∞ The complex term is zero since sin is an odd function, its integral from to + is zero. −∞ ∞ Therefore: ∞

F (ω)= cos(ωot)cos(ωt)dt (21) Z−∞ this integral can be evaluated by taking the limits to be from a to +a: − +a F (ω) = cos(ωot)cos(ωt)dt Z−a 1 +a = [cos([ωo ω]t)+ cos([ωo + ω]t)] dt 2 Z−a − sin(ω ω)a sin(ω + ω)a = o − + o (22) (ω ω) (ω + ω) o − o This function becomes large when ω = ωo. In the limit, as a , it consists of two δ ± 1 → ∞ functions, one at +ωo and a second at ωo . This result can also be obtained by expressing− cos(ωt) as a sum of complex exponentials:

∞ iωt F (ω) = cos(ωot)e dt Z−∞ 1 ∞ = eiωot + e−iωot eiωtdt 2 Z−∞   1 = [δ(ω ω )+ δ(ω + ω )] (23) 2 − o o 1A delta function is a special function that is infinitely narrow and infinitely high at a single point. For example, such a peak at x = 2 would be written as δ(x − 2); the delta function is found at the value of x that makes the argument, x − 2, zero, i.e. δ(0) = ∞. 6

A B

-5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 Frequency [rad/sec] Frequency [rad/sec]

Figure 5: Fourier transform of cos(ωt) (Panel A) and sin(ωt) (Panel B). All of these peaks are delta functions. Also note that the Fourier transform of sin(ωt) is imaginary.

Sine The Fourier transform of sine is very similar to that of a cosine: ∞ iωt F (ω) = sin(ωot)e dt Z−∞ 1 ∞ = eiωot e−iωot eiωtdt 2i Z−∞ −   1 = [δ(ω ω ) δ(ω + ω )] (24) 2i − o − o Note that this function is imaginary.

3.3.2 Square-Wave A single pulse that is centered about zero with a width of 2a has the following Fourier transform:2

1 a F (ω) = 1eiωtdt √2π Z−a eiωa e−iωa = iω√2π − iω√2π √2sin(ωa) = (25) ω√π This function is called a sinc function and its shape is shown in Fig. 6. The width of this function, measured as the distance between the first zero-crossing points, is: 2π ∆ω = (26) a π 1 The position of the first zero-crossing point is a in rad/sec or 2a in Hz (Frequencies are given in two common units, rad/sec and Hz. The former is usually associated with the symbol ω while the latter is associated with the symbol ν or f. The two are related as follows: ω =2πν.) Note that as the value of a decreases (the square pulse becomes narrower) the width of the sinc function increases. This inverse relationship between a function and its Fourier transform is quite general and of importance in both NMR spectroscopy and X-ray diffrac- tion. 2 ax eax R e dx = a . 7

4

3

2

1

0

-1 -10 -8 -6 -4 -2 0 2 4 6 8 10 Frequency [rad/sec]

Figure 6: Sinc functions for two different values of a are shown. The solid line corresponds to a = 2 and the dotted line to a = 5.0.

3.3.3 Decaying Exponential

1.00 2.00 A B

1.00 0.00

0.00 -1.00 -10 -8 -6 -4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10 Frequency [rad/sec] Frequency [rad/sec]

Figure 7: The Lorentzian lineshape. The real, or absorption, lineshape is shown in panel A and the dispersion, or imaginary, lineshape is shown in panel B. The solid line corresponds to a = 0.5 (T2 = 2 sec) and the dotted line corresponds to a =2,oraT2 of 0.5 sec. The increase in linewidth for the shorter T2 results in a decrease in peak height, however the total area of the peak remains the same.

The time varying NMR signal will usually decay with a time constant T2, i.e.:

S(t)= eiωote−t/T2 (27) The first part of the above signal, eiωt, defines the position of the resonance line, while the second part, et/T2 defines the lineshape. The Fourier transform of the decaying exponential is:

∞ ∞ F (ω) = e−ateiωtdt = e−(a−iω)tdt Z0 Z0 1 a + iω a + iω = = = (28) a iω (a iω)(a + iω) (a2 + ω2) − − This function is called a Lorentzian line shape, with a real and an imaginary, or dispersion component, as shown in Fig. 7. Since modern NMR spectrometers record data in complex form, it is possible to observe both of these components. In fact, most raw spectra are a linear combination of the real and imaginary functions. Phase correction of the NMR 8 spectrum can convert this mixed form to a pure lineshape. Because the real component has a narrower linewidth it is usually the component that is plotted in spectra. In the case of NMR, a =1/T2, where T2 is the spin-spin relaxation time. This gives for the real part:

T2 F (ω)= 2 2 (29) 1+ T2 ω Note the dependence of the linewidth on the T2. The smaller (shorter) T2 is, the broader the line. In fact, the full width of this line at half-height is: 1 ∆ν = (30) πT2

3.4 Convolutions: Fourier Transform of the Product of Two Functions A common task is to calculate the Fourier transform of a product of two functions. If the Fourier trans- form of each of the individual functions is known g(x) then the Fourier transform of the product is the −2 −1 0 1 2 convolution of the two individual Fourier trans- forms. ∞ h(x) 1 ′ ′ ′ F G(ω)= G(ω )F (ω ω )dω (31) −2 −1 0 1 2 ⊗ √2π Z−∞ −

The convolution of two functions can be difficult to g(x) h(x) visualized. Consider the example shown in Fig. 8, −2 −1 0 1 2 where g(x) is some complex shape (a cat) located at the origin and h(x) is a delta function located at Figure 8: Convolution of Two Functions x = 2, i.e. h(x)= δ(x 2). The convolution of g and h is particularly straight-forward since h(x) is a delta function.− Evaluating g h at x=2: ⊗ ∞ g h(x =2) = g(x′)h(2 x′)dx′ ⊗ Z−∞ − ∞ g h(x =2) = g(x′)δ([2 x′] 2)dx′ ⊗ Z−∞ − − g h(x =2) = g(x′)δ( x′)dx′ ⊗ Z − = g(0). (32) The last step used the fact that δ( x′) is only non-zero when x′ = 0. Therefore, the convolution of g(x) with h(x) has essentially− moved the shape (g(x)) from the origin to the position of the delta function (h(x)). As another example, consider the tail of the cat, which is located at x =0.25 in g(x) and at x =2.25 in g h: ⊗ ∞ g h(x =2.25) = g(x′)h(2.25 x′)dx′ ⊗ Z−∞ − ∞ g h(x =2.25) = g(x′)δ(2.25 x′ 2)dx′ ⊗ Z−∞ − − ∞ g h(x =2.25) = g(x′)δ(0.25 x′)dx′ (33) ⊗ Z−∞ − 9

The last integral is only non-zero for x′ =0.25, therefore:

g h(x =2.25) = g(0.25) (34) ⊗