\setchapterpreamble[u]{%
    \margintoc\hfil%
    \dictum[Oscar Wilde]{You can never be\\overdressed or overeducated.}
}
\chapter{NMR Concepts}
\labch{concepts}

This chapter will quickly introduce the topics an inclined reader with an electronics background might need a short introduction to. It aims to be a quick reminder of the most important formulas and concepts without going into any depth. A full introduction to chemistry and \acrshort{nmr} is outside the scope of this text. For a better introduction than the author will ever be capable of, please take a look at other literature, such as \enquote{Spin Dynamics}\sidecite{levittSpinDynamicsBasics2008a}, \enquote{Experimental Pulse NMR}\sidecite{fukushimaExperimentalPulseNMR1981} for the chemistry and \enquote{Halbleiter-Schaltungstechnik}\sidecite{tietzeHalbleiterSchaltungstechnik2019} or \enquote{The Art of Electronics}\sidecite{horowitzArtElectronics2022} for the electrical engineering.

Simply put, a nucleus of an \enquote{NMR active} atom will absorb and then later emit radio waves at a specific frequency that depends on an external magnetic field -- the stronger the field the higher the frequency:

\[
    \omega = -\gamma{}B_0
\]

The specific frequency \(\omega\) is usually called the \emph{Larmor frequency}. \(\gamma\) is called the \emph{gyromagnetic ratio} and depends on the atom. Finally, \(B_0\) is the name for the external static magnetic field produced by a large magnet\sidenote{As opposed to \(B_1\) which is the magnetic component of the field generated by an \acrshort{rf} pulse.}.

The magnetic dipole moment \(\vec{\mu}\) can be but in relation with the quantum spin number \(\vec{S}\) through the same gyromagnetic ratio \(\gamma\)
\[
    \vec{\mu} = \gamma\vec{S}
\]
This tells us that atomic nuclei with both an even number of protons and neutrons do not show this effect, because their spin is zero and thus have no nuclear magnetic dipole moment, which can be easily verified with the equation above. Examples of nuclei that are so-called \enquote{NMR active} include \ch{^1H}, \ch{^{13}C} and \ch{^{19}F} among others.

Nature now has it, that the exact frequency that the nuclei \emph{resonante} with depends on their surroundings. Inversely, we can thus exploit this property to figure out these surroundings if we know the frequency at which the nuclei resonate. \emph{Surroundings} include for example whether an atom is located next to another atom not only in space due to some folding of a long molecule, but also whether a chemical bond is present as well.

Thus we need to send radio waves at multiple frequencies and then look at the corresponding return signals recording the different resonant frequencies and amplitudes. From these measured shifts of the expected resonance frequency to the observed scientists can perform structural, chemical and physical analysis. Chemists usually specify the resonance frequency relative to a reference resonance frequency, that is --- by international convention --- \acrshort{tms} and give the shift in the units of \unit{\partspermillion} instead of \unit{\hertz} and call it \emph{chemical shift}. To speed this process up, we can send all frequencies we're interested in at the same time using so-called \acrshort{ftnmr}.

The conceptually simplest method of NMR spectroscopy would be to send an \enquote{infinitely} long\sidenote{In practice just \emph{very} long} radio wave with a slowly changing frequency to find the exact frequencies that the nuclei resonate at. This technique is called \acrlong{cwnmr} or short \acrshort{cwnmr}.

The Fourier theorem states that any periodic signal can be written as a sum of pure sinus waves. In practice, any time signal can be viewed as periodic with a period of infinity. The process of decomposing a signal into its sine components is called Fourier Transform (FT)\sidenote{In practice, a specific algorithm called Fast Fourier Transform (FFT) is used. If it is performed on discrete values (e.g. arrays of data), it is often called DFFT for Discrete Fast Fourier Transform}. The other way around --- composing a signal by summing up pure sine waves --- is called inverse Fourier Transform or iFT.

The concept of Fourier Transformation can then be used to very easily send multiple frequencies at once. This concept is called pulsed NMR or FT-NMR. The simplest pulse is a multiplication of a rectangle signal (see the left side of \reffig{rect}) with a simple pure sine wave (see the left side of \reffig{sine-inf}) with a frequency close to the suspected resonance frequency. In practice, this simply means quickly switching the transmission of the sine wave on and off (see the left side of \reffig{sine-pulse}). Because a single rectangle pulse consists of many frequencies (right side of \reffig{rect}), only a single pulse of a sine wave close to the relevant resonant frequency is needed to excite multiple nuclei with slightly different resonance frequencies (see \reffig{sine-inf} and \reffig{sine-pulse})\sidenote{A multiplication of the time domain signals results in a convolution in the frequency domain}. The shorter the pulse, the more frequencies can be excited, but less energy is transmitted in total and per frequency.
\begin{figure}[htb]
    \includesvg{images/pulse_fft/1s_rect_pulse_fft.svg}
    \caption{A rectangle window function of length \qty{1}{\second} in time domain with an amplitude of 1 on the left side and its Fourier transform on the right side, capped to \(\pm{}\qty{10}{\hertz}\)}
    \labfig{rect}
\end{figure}

\begin{figure}[htb]
    \includesvg{images/pulse_fft/20hz_inf_fft.svg}
    \caption{An infinite sine wave of \qty{20}{\hertz} plotted from \qty{-1}{\second} to \qty{1}{\second} on the left side and its Fourier Transform on the right}
    \labfig{sine-inf}
\end{figure}

\begin{figure}[htb]
    \includesvg{images/pulse_fft/20hz_1s_pulse_fft.svg}
    \caption{A pulsed sine wave of \qty{20}{\hertz} and a pulse length of \qty{1}{\second} plotted from \qty{-1}{\second} to \qty{1}{\second} on the left side and its Fourier Transform on the right. Notice the broadening in the centre compared to the pure sine wave in \reffig{sine-inf}. We are sending multiple frequencies around \qty{20}{\hertz} at the same time simply by pulsing a single frequency sine wave.}
    \labfig{sine-pulse}
\end{figure}
