 # Sampling theory Fourier theory made easy

## Presentation on theme: "Sampling theory Fourier theory made easy"— Presentation transcript:

Sampling theory Fourier theory made easy

Sampling, FFT and Nyquist Frequency

A sine wave We take an ideal sine wave to discuss effects of sampling
5*sin (24t) Amplitude = 5 Frequency = 4 Hz We take an ideal sine wave to discuss effects of sampling seconds

A sine wave signal and correct sampling
5*sin(24t) Amplitude = 5 Frequency = 4 Hz Sampling rate = 256 samples/second Sampling duration = 1 second We do sampling of 4Hz with 256 Hz so sampling is much higher rate than the base frequency, good seconds Thus after sampling we can reconstruct the original signal

An undersampled signal
Here sampling rate is 8.5 Hz and the frequency is 8 Hz Sampling rate Red dots represent the sampled data Undersampling can be confusing Here it suggests a different frequency of sampled signal Undersampled signal can confuse you about its frequency when reconstructed. Because we used to small frequency of sampling. Nyquist teaches us what should be a good frequency

The Nyquist Frequency The Nyquist frequency is equal to one-half of the sampling frequency. The Nyquist frequency is the highest frequency that can be measured in a signal. We will give more motivation to Nyquist and next we will prove it Nyquist invented method to have a good sampling frequency

Fourier series is for periodic signals
As you remember, periodic functions and signals may be expanded into a series of sine and cosine functions

The Fourier Transform A transform takes one function (or signal) and turns it into another function (or signal)

close your eyes if you don’t like integrals
The Fourier Transform A transform takes one function (or signal) and turns it into another function (or signal) Continuous Fourier Transform: close your eyes if you don’t like integrals

The Fourier Transform A transform takes one function (or signal) and turns it into another function (or signal) Continuous Fourier Transform:

The Fourier Transform A transform takes one function (or signal) and turns it into another function (or signal) The Discrete Fourier Transform:

Fast Fourier Transform
The Fast Fourier Transform (FFT) is a very efficient algorithm for performing a discrete Fourier transform FFT principle first used by Gauss in 18?? FFT algorithm published by Cooley & Tukey in 1965 In 1969, the 2048 point analysis of a seismic trace took 13 ½ hours. Using the FFT, the same task on the same machine took 2.4 seconds! We will present how to calculate FFT in one of next lectures. Now you can appreciate applications that would be very difficult without FFT.

Examples of FFT

Famous Fourier Transforms
Sine wave In time Delta function In frequency Calculated in real time by software that you can download from Internet or Matlab

Famous Fourier Transforms
Gaussian In time Gaussian In frequency

Famous Fourier Transforms
Sinc function In time Square wave In frequency

Famous Fourier Transforms
Sinc function In time Square wave In frequency

Famous Fourier Transforms
Exponential In time Lorentzian In frequency

FFT of FID If you can see your NMR spectra on a computer it’s because they are in a digital format. From a computer's point of view, a spectrum is a sequence of numbers. Initially, before you start manipulating them, the points correspond to the nuclear magnetization of your sample collected at regular intervals of time. This sequence of points is known, in NMR jargon, as the FID (free induction decay). Most of the tools that enrich iNMR are meant to work in the frequency domain; they are disabled when the spectrum is in the time domain. Indeed, the main processing task is to transform the time-domain FID into a frequency-domain spectrum.

FFT of FID T2=0.5s SR=sampling rate In time In frequency

FFT of FID T2=0.1s Effect of change of T2 from previous slide In time
In frequency

FFT of FID T2 = 2s Effect of change of T2 from previous slide In time
In frequency

Effect of changing sample rate
Change of sampling rate, we see pulses In time In frequency

Effect of changing sample rate
Lowering the sample rate: Reduces the Nyquist frequency, which Reduces the maximum measurable frequency Does not affect the frequency resolution SR = 256 kHz SR = 128 kHz Circles appear more often In time Peak for circles and crosses in the same frequency In frequency

Effect of changing sample rate
Lowering the sample rate: Reduces the Nyquist frequency, which Reduces the maximum measurable frequency Does not affect the frequency resolution To remember

Effect of changing sampling duration
In time In frequency

Effect of reducing the sampling duration from ST = 2s to ST = 1s
ST = Sampling Time duration In time In frequency Reducing the sampling duration: Lowers the frequency resolution Does not affect the range of frequencies you can measure

Effect of changing sampling duration
Reducing the sampling duration: Lowers the frequency resolution Does not affect the range of frequencies you can measure To remember

Effect of changing sampling duration
T2 = 20 s In time In frequency

Effect of changing sampling duration
T2 = 0.1s In time In frequency

Measuring multiple frequencies
In time In frequency conclusion: you can read the main frequencies which give you the value of your NMR signal, for instance logic values 0 and 1 in NMR –based quantum computing Good sampling is important for accuracy

Measuring multiple frequencies
In time In frequency

Sampling Theorem of Nyquist

Nyquist Sampling Theorem
Continuous signal: Shah function (Impulse train): projected Sampled function: Sampled and discretized Multiplication in image domain

Sampling Theorem: multiplying image by Impulse train in image domain
Continuous signal: Shah function (Impulse train): Sampled function:

Sampling Theorem: multiplication in image domain is convolution in spectral
Sampled function: image Sampling frequency Shah function (Impulse train): Only if We do not want trapezoids to overlap

Nyquist Theorem When can we recover from ? Aliasing Nyquist Theorem;
If Aliasing When can we recover from ? Only if (Nyquist Frequency) We can use Then and Nyquist Theorem; We can recover F(u) from Fs(u) when the sampling frequency is greater than 2 u max Sampling frequency must be greater than

Aliasing in 2D image High frequencies Low frequencies