0% found this document useful (0 votes)
64 views39 pages

Sampling Theory: Fourier Theory Made Easy

This document discusses sampling theory and the Nyquist sampling theorem. It begins with examples of correctly and incorrectly sampled sine waves. It then introduces the Nyquist frequency, which is half the sampling frequency, and states that it represents the highest frequency that can be measured in a signal. The document proceeds to explain how changing parameters like the sampling rate and duration can affect the sampled signal. It concludes by illustrating the Nyquist sampling theorem, which states that a signal can be reconstructed if it is sampled at a rate at least twice the highest frequency contained in the signal.

Uploaded by

Arannya Monzur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views39 pages

Sampling Theory: Fourier Theory Made Easy

This document discusses sampling theory and the Nyquist sampling theorem. It begins with examples of correctly and incorrectly sampled sine waves. It then introduces the Nyquist frequency, which is half the sampling frequency, and states that it represents the highest frequency that can be measured in a signal. The document proceeds to explain how changing parameters like the sampling rate and duration can affect the sampled signal. It concludes by illustrating the Nyquist sampling theorem, which states that a signal can be reconstructed if it is sampled at a rate at least twice the highest frequency contained in the signal.

Uploaded by

Arannya Monzur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 39

Sampling theory

Fourier theory made easy

Sampling, FFT
and Nyquist
Frequency

A sine wave
8

5*sin (24t)

Amplitude = 5

Frequency = 4 Hz

-2

-4

-6

-8

0.1

0.2

0.3

0.4

0.5

seconds

0.6

0.7

0.8

0.9

We take an
ideal sine wave
to discuss
effects of
sampling

A sine wave signal and correct sampling


8

5*sin(24t)

Amplitude = 5
4

Frequency = 4 Hz

Sampling rate = 256


samples/second

-2

Sampling duration =
1 second

-4

-6

-8

0.1

0.2

0.3

0.4

0.5

seconds

0.6

0.7

0.8

0.9

We do sampling of 4Hz
with 256 Hz so sampling
is much higher rate than
the base frequency, good

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

sin(28t), SR = 8.5 Hz

1.5

0.5

-0.5

-1

-1.5

-2

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

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


1. The Nyquist frequency is equal to one-half
of the sampling frequency.
2. The Nyquist frequency is the highest
frequency that can be measured in a
signal.
Nyquist
invented method
to have a good
sampling
frequency

We will give more


motivation to Nyquist and
next we will prove it

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
dont like integrals

The Fourier Transform


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

H f h t e

h t H f e

2ift

dt

2ift

df

The Fourier Transform


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

H n hk e

2ikn N

k 0

N 1

1
2ikn N
hk H n e
N n 0

Fast Fourier Transform


1.

The Fast Fourier Transform (FFT) is a very efficient algorithm for


performing a discrete Fourier transform

2.

FFT principle first used by Gauss in 18??

3.

FFT algorithm published by Cooley & Tukey in 1965

4.

In 1969, the 2048 point analysis of a seismic trace took 13 hours.

5.

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


2
1

Sine wave

0
-1
-2
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

300
250
200

Delta function

150
100
50
0

20

40

60

80

100

120

Calculated in real time by software that you can


download from Internet or Matlab

In frequency

Famous Fourier Transforms


0.5
0.4

Gaussian

0.3
0.2
0.1
0

10

15

20

25

30

35

40

45

50

In time

6
5
4

Gaussian

3
2
1
0

50

100

150

200

250

In frequency

Famous Fourier Transforms


1.5
1

Sinc function

0.5
0
-0.5
-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

In time

6
5
4

Square wave

3
2
1
0

-100

-50

50

100

In frequency

Famous Fourier Transforms


1.5
1

Sinc function

0.5
0
-0.5
-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

In time

6
5
4

Square wave

3
2
1
0

-100

-50

50

100

In frequency

Famous Fourier Transforms


1
0.8

Exponential

0.6
0.4
0.2
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

30
25
20

Lorentzian

15
10
5
0

50

100

150

200

250

In frequency

FFT of FID
1. If you can see your NMR spectra on a computer its because they are in a
digital format.
2. From a computer's point of view, a spectrum is a sequence of numbers.
3. Initially, before you start manipulating them, the points correspond to the
nuclear magnetization of your sample collected at regular intervals of time.
4. This sequence of points is known, in NMR jargon, as the FID (free
induction decay).
5. 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.
6. Indeed, the main processing task is to transform the time-domain FID into a
frequency-domain spectrum.

F t sin 2ft exp

T2

FFT of FID

T2=0.5s

SR=sampling
rate

0
f = 8 Hz
SR = 256 Hz
T2 = 0.5 s

-1
-2

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

70
60
50
40
30
20
10
0

20

40

60

80

100

120

In frequency

FFT of FID

F t sin 2ft exp

T2

2
f = 8 Hz
SR = 256 Hz
T2 = 0.1 s

1
0

T2=0.1s
Effect of
change of T2
from previous
slide

-1
-2

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

14

In time

12
10
8
6
4
2
0

20

40

60

80

100

120

In frequency

FFT of FID

F t sin 2ft exp

T2 = 2s

T2

Effect of
change of T2
from previous
slide

2
1
0
-1
-2

f = 8 Hz
SR = 256 Hz
T2 = 2 s
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

200
150
100
50
0

20

40

60

80

100

120

In frequency

Effect of changing sample rate


Change of
sampling rate, we
see pulses
2
1
0
-1
-2

In time

f = 8 Hz
T2 = 0.5 s
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

70

35

60

30

50

25

40

20

30

15

20

10

10

10

20

30

40

50

60

In frequency

Effect of changing sample rate


SR = 256 kHz

Reduces the Nyquist


frequency, which

SR = 128 kHz

Reduces the
maximum
measurable
frequency
Does not affect the
frequency resolution

SR = 256 Hz
SR = 128 Hz

1
0
-1
-2

Circles appear more


often
0

0.2

0.4

0.6

0.8

1.2

f = 8 Hz
T2 = 0.5 s
1.4

1.6

1.8

70

35

60

30

Peak for circles and crosses in


the same frequency

50
40

20
15

20

10

10

5
0

10

20

30

40

In time

25

30

Lowering the sample


rate:

50

60

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


2
1
0
-1
-2

f = 8 Hz
T2 = .5 s
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

10

12

14

16

18

20

In time

70
60
50
40
30
20
10
0

In frequency

Effect of reducing the sampling duration


from ST = 2s to ST = 1s
ST = Sampling
Time duration

2
1

ST = 2.0 s
ST = 1.0 s

0
-1
-2

f = 8 Hz
T2 = .5 s
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

10

12

14

16

18

20

In time

70
60
50
40
30
20
10
0

Reducing the sampling duration:

Lowers the frequency resolution


Does not affect the range of frequencies you can measure

In frequency

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

2
1
0
-1
-2

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

200
150
100
50
0

f = 8 Hz
T2 = 2.0 s
0

10

12

14

16

18

20

In frequency

Effect of changing sampling duration


T2 = 0.1s

2
ST = 2.0 s
ST = 1.0 s

1
0

f = 8 Hz
T2 = 0.1 s

-1
-2

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

10

12

14

16

18

20

In time

14
12
10
8
6
4
2
0

In frequency

Measuring multiple frequencies


3
f1 = 80 Hz, T21 = 1 s
f2 = 90 Hz, T22 = .5 s
f3 = 100 Hz, T23 = 0.25 s

2
1
0
-1
-2
-3

SR = 256 Hz
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

120
100
80
60
40
20
0

20

40

60

80

100

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

120

In frequency
Good sampling
is important for
accuracy

Measuring multiple frequencies


3
f1 = 80 Hz, T21 = 1 s
f2 = 90 Hz, T22 = .5 s
f3 = 200 Hz, T23 = 0.25 s

2
1
0
-1
-2
-3

SR = 256 Hz
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

In time

120
100
80
60
40
20
0

20

40

60

80

100

120

In frequency

Sampling
Theorem of
Nyquist

Nyquist Sampling Theorem


f x

Continuous signal:

x
Shah function (Impulse train):

s x

s x

x nx

projected

x0
Sampled function:

Sampled and
discretized

f s x f x s x f x x nx0
n

Multiplication in image domain

Sampling Theorem: multiplication in image domain is


convolution in spectral
Sampled function:

image

Sampling
frequency

Shah function
(Impulse
train):

f s x f x s x f x x nx0

1
x0

1
FS u F u S u F u
x0

n
u x
n
0

FS u

F u
A

u max

x0

u max

Only if u max

1
2 x0

x0

We do not want
trapezoids to overlap

Nyquist Theorem
If u max

FS u

2 x0

x0

Aliasing
u

umax
1

x0

When can we recover F u from FS u ?


Only if

umax

We can use

(Nyquist Frequency)
2 x0
Cu

x0
0

Then

u 1

2 x0
otherwise

F u FS u C u and

f x IFT F u

Sampling frequency must be greater than

2umax

Nyquist Theorem;
We can recover F(u)
from Fs(u) when the
sampling frequency is
greater than 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/FT
4FreeIndDecay.pdf
Mathcad tutorial for exploring Fourier transforms of free-induction decay
http://lcni.uoregon.edu/fft/fft.ppt
This presentation

Conclusions
1. Signal (image) must be sampled with high
enough frequency
2. Use Nyquist theorem to decide
3. Using two small sampling frequency leads to
distortions and inability to reconstruct a
correct signal.
4. Spectrum itself has high importance, for
instance in reading NMR signal or speech
signal.

You might also like