530 likes | 1.87k Views
Sampling theory Fourier theory made easy . Sampling, FFT and Nyquist Frequency. A sine wave. 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.
E N D
A sine wave 5*sin (24t) 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(24t) 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
Here sampling rate is 8.5 Hz and the frequency is 8 Hz An undersampled signal 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 frequencythat 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 http://www.falstad.com/fourier/j2/
The Fourier Transform • A transform takes one function (or signal) and turns it into another function (or signal)
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 & Tukeyin 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.
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
T2=0.1s FFT of FID 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
Lowering the sample rate: • Reduces the Nyquist frequency, which • Reduces the maximum measurable frequency • Does not affect the frequency resolution Effect of changing sample rate 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
Nyquist Sampling Theorem Continuous signal: Shah function (Impulse train): projected Sampled function: Sampled and discretized Multiplication in image domain
Sampling frequency Only if Sampling Theorem: multiplication in image domain is convolution in spectral Sampled function: image Shah function (Impulse train): We do not want trapezoids to overlap
If When can we recover from ? Only if (Nyquist Frequency) We can use Then and Sampling frequency must be greater than Nyquist Theorem Aliasing Nyquist Theorem; We can recover F(u) from Fs(u) when the sampling frequency is greaterthan 2 u max
Aliasing in 2D image High frequencies Low frequencies
Some useful links • http://www.falstad.com/fourier/ • Fourier series java applet • http://www.jhu.edu/~signals/ • Collection of demonstrations about digital signal processing • http://www.ni.com/events/tutorials/campus.htm • FFT tutorial from National Instruments • http://www.cf.ac.uk/psych/CullingJ/dictionary.html • Dictionary of DSP terms • http://jchemed.chem.wisc.edu/JCEWWW/Features/McadInChem/mcad008/FT4FreeIndDecay.pdf • Mathcad tutorial for exploring Fourier transforms of free-induction decay • http://lcni.uoregon.edu/fft/fft.ppt • This presentation
Conclusions • Signal (image) must be sampled with high enough frequency • Use Nyquist theorem to decide • Using two small sampling frequency leads to distortions and inability to reconstruct a correct signal. • Spectrum itself has high importance, for instance in reading NMR signal or speech signal.