Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

4/25/2016

Lesson 6: Sampling
Analog Signals
ET 438b Sequential Control and Data Acquisition

Department of Technology

Lesson 6_et438b.pptx 1

Learning Objectives

After this presentation you will be able to:


 Identify the steps in sampling an analog signal
 Indentify the frequency spectrum of a sampled signal
 Determine the minimum sampling rate of an analog signal
 Determine if a sampled signal contains aliased signals.

Lesson 6_et438b.pptx 2

1
4/25/2016

Sampled Signals
Sampling Process
Data Acquisition Card

Signal
Sensor
Conditioner
Physical
parameter Amplify

Multiplexer
Filter
Linearize Sample &
ADC
Hold

Other analog
Input channels To computer
Data bus

Lesson 6_et438b.pptx 3

Sampled Signals-Representation of
Signal
Analog Signal - defined at every point of independent variable
For most physical signals independent variable is time

Sampled Signal - Exists at point of measurement. Sampled


at equally spaced time points, Ts called sampling time. (1/Ts
=fs), sampling frequency
Analog Example
s(t )  5  sin(2  250  t  60 )  2  cos(2  500  t  120 )

Sampled Example
s(n)  5  sin(2  250  Ts  n  60 )  2  cos(2  500  Ts  n  120 )
n=sample number
Lesson 6_et438b.pptx 4

2
4/25/2016

Sampled Data Examples

Representation of
analog signal

Ts

Representation of sampled
analog signal

Lesson 6_et438b.pptx 5

Sample and Hold Operation


Sample and Hold Circuit
Operating Modes
tracking = switch closed
Control input operates hold= switch open
solid –state switch at
sampling rate fs Sample and Hold Parameters

Acquisition Time - time from


instant switch closes until Vi within
defined % of input. Determined by
input time constant t = RinC 5t
value = 99.3% of final value
decay rate - rate of discharge of C
Impedance when circuit is in hold mode
Buffer
aperture time - time it takes
switch to open.
Lesson 6_et438b.pptx 6

3
4/25/2016

Sample and Hold Signals


Pulse generator closes switch and captures signal value

10
10

5
Amplitude

s( t )
0
a( t )

 10 10
0 2 4 6 8 10
0 t 10
Time
Sampled Signal
Analog Signal

Analog and sampled signal Pulse generator output


Amplitude Modulated
s(t)=p(t)∙a(t)
Lesson 6_et438b.pptx 7

Sample and Hold Output


Sample must be held while digital conversion takes place. Total time to digitize

tc = ta + td Where tc = total conversion time


ta = total acquisition time
td = total digital conversion time
Hold
Time

Lesson 6_et438b.pptx 8

4
4/25/2016

Frequency Spectrum
Sampling is modulation. Shifts all signal frequency components
and generates harmonics
fc=1000 Hz fI1=50 Hz fI2=25 Hz

v(t )  1 sin(2 1000  t )1 sin(2  50  t )  1 sin(2  25  t )

Carrier Information

Modulation produces sums and differences of carrier and information


frequencies

fh1= fc±fI1 for the 1st information frequency


fh2= fc±fI1 for the 2nd information frequency
fhi= fc±fIi for the i-th information frequency

Lesson 6_et438b.pptx 9

Frequency Spectrum
Frequency Components
fh1= fc±fI1 =1000 Hz ± 50 Hz = 1050 Hz and 950 Hz
fh2= fc±fI1 =1000 Hz ± 25 Hz = 1025 Hz and 975 Hz

Frequency Spectrum Plot


|v|
1.0
1000 Hz

0.5

950 Hz 975 Hz 1025 Hz 1050 Hz


Frequency

Lesson 6_et438b.pptx 10

5
4/25/2016

Frequency Spectrum
Complex signals usually have a frequency spectrum that is wider. Can be
visualized with continuous f plot and found with an Fast Fourier Transform
(FFT)

|v|

highest
frequency in signal

dc f=0
Frequency

Frequency spectrum of input signals sample & hold must be known to


accurately reproduce original signal from samples
Lesson 6_et438b.pptx 11

Nyquist Frequency and Minimum


Sampling Rate
To accurately reproduce the analog input data with samples
the sampling rate, fs, must be twice as high as the highest
frequency expected in the input signal. (Two samples per
period) This is known as the Nyquist frequency.

fs(min) = 2fh

Where fh = the highest discernible f component in


input signal
fs(min) = minimum sampling f

Nyquist rate is the minimum frequency and requires an ideal


pulse to reconstruct the original signal into an analog value
Lesson 6_et438b.pptx 12

6
4/25/2016

Sampled Signal Frequency Spectrum


Sampling with fs >2fh

Amplitude

fh fs-fh fs fs+fh 2fs-fh 2fs+fh


2fs
Frequency

Sampling at less than 2fh causes aliasing and folding of sampled signals.
Folded
Amplitude

Frequencies

fh fs-zfh fs fs+fh 2fs-fh 2fs+fh


2fs
Frequency
Lesson 6_et438b.pptx 13

Nyquist Frequency and Aliasing


Only signals with frequencies below Nyquist frequency will be
correctly reproduced

Example: Given the following signal, determine the minimum sampling rate (Nyquist
frequency)

s(t )  2  sin(2100t )  5  sin(2250t )  1.5 cos(2500t )  3  sin(2400t )

Find the highest frequency component: 100 Hz, 250 Hz, 500 Hz, 400 Hz

fh= 500 Hz fs(min) = 2fh

fs(min) = 2(500 Hz)= 1000 Hz

Lesson 6_et438b.pptx 14

7
4/25/2016

Nyquist Frequency and Aliasing


Example: Given the following signal, determine the minimum sampling rate
(Nyquist frequency)

s(t )  1.5  sin(175t )  3  sin(250t )  0.5 cos(800t )  1.75  sin(900t )

Convert the radian frequency to frequency in Hz by dividing values by 2

175 250 800 900


f1   87.5 Hz f2   125 Hz f 3   400 Hz f 4   450 Hz
2 2 2 2

Find the highest frequency component: 450 Hz

fs(min) = 2fh

fs(min) = 2(450 Hz)= 900Hz

Lesson 6_et438b.pptx 15

Aliased Frequencies
Sampling analog signal below 2fh produces false frequencies.
Aliased frequencies determined by:

f alias  f I  n  f s
0  f alias  f nyquist
fs
f nyquist 
2
Where: fI = sampled information signal with fI>fnyquist
fs = sampling frequency (Hz)
n = sampling harmonic number
falias = aliased frequency
fnyquist = one-half sampling frequency

Lesson 6_et438b.pptx 16

8
4/25/2016

Samples/Period and Aliasing


Correct signal representation requires at least two samples/period

f s TI
Ns  
f I Ts
f s  f I and TI  Ts

Where Ns = number input signal samples per period of sampling frequency


fs = sampling frequency (Hz)
fI = highest information signal frequency (Hz)
Ts = sampling period, 1/fs, (seconds)
TI = period information signal’s highest frequency (1/fI)

Lesson 6_et438b.pptx 17

Sampling/Aliasing Examples
Example 1: A fs=1000 Hz sampling frequency samples an information
signal of fI=100 Hz . Determine samples/period, the resulting recovered
signal ,and aliased frequencies if present

Determine the number of samples/ period

1000 Hz 0.01 S
Ns    10 samples/period Above Nyquist rate of 2
100 Hz 0.001 S
f s 1000 Hz Signals below 500 Hz
f nyquist    500 Hz
2 2 reproduced without aliasing

View the frequency spectrum using FFT of samples

Lesson 6_et438b.pptx 18

9
4/25/2016

Sampling/Aliasing Examples
Frequency Spectrum 500 Hz
100 Hz
Nyquist
Recovered
Limit

100

1.5
Amplitude

0.5

0
0 100 200 300 400 500 600
Frequency
Frequency Spectrum

Lesson 6_et438b.pptx 19

Sampling/Aliasing Examples
Example 2: A fs=60 Hz sampling frequency samples an information signal
of fI=100 Hz . Determine samples/period, the resulting recovered signal
,and aliased frequencies if present

Determine the number of samples/ period

60 Hz 0.01 S
Ns    0.6 samples/period Below Nyquist rate of 2
100 Hz 0.001666 S
Aliased signals will occur due to low sampling rate

f s 60 Hz Signals below 30 Hz
f nyquist    30 Hz
2 2 reproduced without aliasing

Now compute the aliased frequency for 1st sampling harmonic


Lesson 6_et438b.pptx 20

10
4/25/2016

Sampling/Aliasing Examples
Alias frequencies for 1st harmonic of sampling f (n=1)

f alias  f I  n  f s f alias  100 Hz  1 60 Hz  40 Hz


0  f alias  f nyquist 60 Hz
f nyquist   30 Hz
fs 2
f nyquist  0  f alias  30 Hz
2
The falias is outside range 0-30 Hz, (40 Hz
> 30 Hz) No recovered signal

Find alias frequencies of 2nd sampling harmonic f (n=2)

f alias  100 Hz  2  60 Hz  20 Hz
The falias in range 0-30 Hz, 20 Hz
recovered signal

Lesson 6_et438b.pptx 21

Sampling/Aliasing Examples
30 Hz
Frequency Spectrum Nyquist
3
Limit
20 Hz
2.5
Alias f

2
Amplitude

1.5

0.5

0
0 5 10 15 20 25 30 35

Frequency

Frequency Spectrum

Lesson 6_et438b.pptx 22

11
4/25/2016

Sampling/Aliasing Examples
Example 3: A fs=80 Hz sampling frequency samples an information signal
of fI=100 Hz . Determine samples/period, the resulting recovered signal
,and aliased frequencies if present

Determine the number of samples/ period

80 Hz 0.01 S
Ns    0.8 samples/period Below Nyquist rate of 2
100 Hz 0.00125 S
Aliased signals will occur due to low sampling rate

f s 80 Hz Signals below 40 Hz
f nyquist    40 Hz
2 2 reproduced without aliasing

Lesson 6_et438b.pptx 23

Sampling/Aliasing Examples
Alias frequencies for 1st harmonic of sampling f (n=1)

f alias  f I  n  f s f alias  100 Hz  1 80 Hz  20 Hz


0  f alias  f nyquist 60 Hz
f nyquist   40 Hz
fs 2
f nyquist  0  f alias  40 Hz
2
The falias is inside range 0-40 Hz
20 Hz recovered signal

Find alias frequencies of 2nd sampling harmonic f (n=2)

f alias  100 Hz  2  80 Hz  60 Hz
The falias outside range 0-40 Hz, No
recovered signal

Lesson 6_et438b.pptx 24

12
4/25/2016

Sampling/Aliasing Examples
40 Hz
Frequency Spectrum Nyquist
Limit
20 Hz 3
Alias f
2.5

2
Amplitude

1.5

0.5

0
0 10 20 30 40 50
Frequency
Frequency Spectrum

Lesson 6_et438b.pptx 25

Sampling/Aliasing Examples
Example 4: A fs=100 Hz sampling frequency samples an information
signal of fI=100 Hz . Determine samples/period, the resulting recovered
signal ,and aliased frequencies if present

Determine the number of samples/ period

100 Hz 0.01 S
Ns    1 samples/period Below Nyquist rate of 2
100 Hz 0.01 S
Aliased signals will occur due to low sampling rate

f s 100 Hz Signals below 50 Hz


f nyquist    50 Hz
2 2 reproduced without aliasing

Lesson 6_et438b.pptx 26

13
4/25/2016

Sampling and Aliasing Examples


Alias frequencies for 1st harmonic of sampling f (n=1)

f alias  f I  n  f s f alias  100 Hz  1100 Hz  0 Hz


0  f alias  f nyquist 100 Hz
f nyquist   50 Hz
fs 2
f nyquist  0  f alias  50 Hz
2
The falias is inside range 0-50 Hz. 0 Hz
indicates that the recovered signal is a dc
level

View time and frequency plots of this example. 0 Hz is dc. Level


depends on phase shift of information signal relative to sampling
signal

Lesson 6_et438b.pptx 27

Sampling and Aliasing Examples


Time plot
2 50 Hz
Nyquist
1 Limit
Amplitude

0
3

1 2.5

2
2
0 0.02 0.04 0.06 0.08 0.1
Amplitude

Time 1.5

Sampled Signal
Information 1

0 Hz (dc) 0.5

Alias f
0
0 10 20 30 40 50 60
Frequency

Frequency Spectrum

Lesson 6_et438b.pptx 28

14
4/25/2016

Sampling and Aliasing Examples


Previous examples all demonstrate under-sampling. fs≤fI Folding occurs when
fs>fI but less that fnyquist

Example 5: A fs=125 Hz sampling frequency samples an information


signal of fI=100 Hz . Determine samples/period, the resulting recovered
signal ,and aliased frequencies if present
Determine the number of samples/ period

125 Hz 0.01 S
Ns    1.25 samples/period Below Nyquist rate of 2
100 Hz 0.008 S

Aliased signals will occur due to low sampling rate

f s 125 Hz Signals below 62.5 Hz


f nyquist    62.5 Hz
2 2 reproduced without aliasing
Lesson 6_et438b.pptx 29

Sampling and Aliasing Examples


Alias frequencies for 1st harmonic of sampling f (n=1)

f alias  f I  n  f s f alias  100 Hz  1125 Hz  25 Hz


0  f alias  f nyquist 125 Hz
f nyquist   62.5 Hz
fs 2
f nyquist  0  f alias  62.5 Hz
2
The falias is inside range 0-62.5 Hz. A 25
Hz signal is reconstructed

Find alias frequencies of 2nd sampling harmonic f (n=2)

f alias  100 Hz  2 125 Hz  150 Hz


The falias outside range 0-62.5 Hz, No
recovered signal at this frequency

Lesson 6_et438b.pptx 30

15
4/25/2016

Sampling and Aliasing Examples


f  
i  1 62.5 Hz
Frequency Spectrum i 
 Ns  Ts Nyquist
Limit
25 Hz
Alias f
2.5

2
Amplitude

1.5

0.5

0
0 10 20 30 40 50 60 70
Frequency
Frequency Spectrum

Lesson 6_et438b.pptx 31

End Lesson 6: Sampling


Analog Signals
ET 438b Sequential Control and Data Acquisition

Department of Technology

Lesson 6_et438b.pptx 32

16

You might also like