Sie sind auf Seite 1von 9

EE445L Lecture 16.

1

by J onathan W. Valvano

Lecture 16 objectives
Data Acquisition System Design, Chapter 9
Introduce the Nyquist theorem
ADC, Chapter 8


General Instrumentation/Control System
Measurand
Transducer
Calibration
Signal
Electromagnetic
Electrical
Thermal
Sound
Optical
Analog
Preamp
Analog Filter

and

Amplification
Microcomputer
ADC
Primary sensing
Variable conversion
Real world
timer
x(t) y(t)
z(t)
Actuator applies energy


Xducer
Amp
Analog
Mux
Analog
Filter
x(t)
y(t)
z (t)
1
2
z (t)
S/H A/D
Xducer
Amp
Analog
Filter
Xducer
Amp
Analog
Filter

EE445L Lecture 16.2

by J onathan W. Valvano

Quantitative DAS
range (r
x
)
resolution (x)
precision (n
x
in alternatives)
frequencies of interest (f
min
to f
max
)
repeatability ( of repeated measurements, same conditions)
reproducibility ( of repeated measurements, different conditions)

Qualitative DAS
sounds good
looks pretty
feels right

Other qualitative DASs involve the detection of events.
true positive (TP)
baby stops breathing and apnea monitor detects it
false positive (FP)
baby is breathing OK but apnea monitor alarms
false negative (FN)
baby stops breathing but monitor does not alarm


Prevalence = (TP +FN) / (TP +TN +FP +FN)
Sensitivity =TP / (TP +FN)
Specificity =TN / (TN +FP)
PPV =TP / (TP +FP)
NPV =TN / (TN +FN)



EE445L Lecture 16.3

by J onathan W. Valvano

Using Nyquist Theory to Determine Sampling Rate.
Voltage quantizing

precision n
z
= 2
n


Time quantizing
Nyquist theory states that if the signal is sampled at f
s
, then the
digital samples only contain frequency components from 0 to f
s
.

Conversely, if the analog signal does contain frequency components
larger than f
s
, then there will be an aliasing error. Aliasing is
when the digital signal appears to have a different frequency than
the original analog signal.

V(t) = A sin(2ft + )

Nyquist theory says that if f
s
is strictly greater than twice f, then one
can determine A f and from the digital samples.

But if f
s
less than or equal to 2f, then the apparent frequency, as
predicted by analyzing the digital samples, will be shifted to a
frequency between 0 and f
s
.

Valvano Postulate: If f
max
is the largest frequency component of the
analog signal, then you must sample more than ten times f
max
in
order for the reconstructed digital samples to look like the original
signal when plotted on a voltage versus time graph.

EE445L Lecture 16.4

by J onathan W. Valvano
The choice of sampling rate, f
s,
is determined by the maximum
useful frequency contained in the signal.

f
s
> 2 f
max


A low pass analog filter may be required to remove frequency
components above 0.5f
s
. A digital filter can not be used to remove
aliasing.

*******the following plots were created with FFT16.XLS*******
Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data
FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

A 100 Hz sine wave is sampled at 1600 Hz.


Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data

FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

A 200 Hz sine wave is sampled at 1600 Hz.
EE445L Lecture 16.5

by J onathan W. Valvano

Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data

FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

A 400 Hz sine wave is sampled at 1600 Hz.
Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data

FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

An 800 Hz sine wave is sampled at 1600 Hz.


Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data

FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

A 1500 Hz sine wave is sampled at 1600 Hz.
EE445L Lecture 16.6

by J onathan W. Valvano

The data plotted in the next figure demonstrate the result that occurs when we sample an
input with multiple frequency components. This original signal has three frequencies 0,
100 and 400 Hz. In particular,

V(t) = 0.25 + 2 sin(2 100t) + 0.5 sin(2 400t)

Notice in the FFT that the information from all three components is properly retained.
This will be true for any input that has its highest frequency component less than f
s
.
Sampled Data
-3
-2
-1
0
1
2
3
0 2 4 6 8 10
Time (ms)
V
o
l
t
a
g
e

(
V
)
Sampled Data
True Data
FFT Magnitude
0.0
0.5
1.0
1.5
2.0
2.5
0.0 0.2 0.4 0.6 0.8 1.0
Frequency (kHz)
V
o
l
t
a
g
e

(
V
)

A signal with DC, 100 Hz and 400 Hz components is sampled at 1600 Hz.


How Many Bits Does One Need for the ADC?
Xducer
Amp
Analog
Mux
Analog
Filter
x(t)
y(t)
z (t)
1
2
z (t)
S/H A/D
Xducer
Amp
Analog
Filter
Xducer
Amp
Analog
Filter

Let the following describe the nonlinear system.
EE445L Lecture 16.7

by J onathan W. Valvano

z = f(x)

The required ADC precision, n
z
,

x

=
r
x
n
x

z

= min {f(x+
x
)-f(x)} for all x in r
x

z

=
x
x
f

for all x in r
x

n
z
= r
z
/
z



If z=f(x) is linear, then n
z
= n
x


If z=f(x) is nonlinear, then n
z
> n
x


Specifications for the Analog Signal Processing
The analog signal processing is linear then

z = Gy + b

Choose so the full scale range of the input signal x, maps into the
full scale range of the ADC.

Another factor to consider is the electrical noise.
Let e
z
be the electrical noise referred to the ADC,
any ADC
z
<e
z
would be wasteful

E.g., range is 0 to +8V, noise at the ADC is 1mV
EE445L Lecture 16.8

by J onathan W. Valvano
then any ADC bits beyond 13 would be wasteful.




Physical
Signal
Transducer
H (s)
Transducer
Output
X(s)
Y(s)
Amp
H (s)
A/D
Amp
Output
Analog
Filter
H (s)
Filter
Output
Z (s)
1
1
2
3 Z (s)
2

Z
2
(s) = H
3
(s)Z
1
(s) =H
3
(s)H
2
(s)Y(s) = H
3
(s)H
2
(s)H
1
(s) X(s)


Analog Filter
Let the gain of the analog filter be G
3
= H
3
(s).
Then the system should pass, with little error as seen by the ADC,
for signal frequencies between f
min
and f
max
.
2
2 +1
n
n
n
2
2 - 1
n
0.707
0
0
f
c
f
min
f
c
f
max
0.5 f
s
Ideal
G
3
Frequency
1
Filter with no
A/D error

EE445L Lecture 16.9

by J onathan W. Valvano
Ideal and practical filter responses.


aliased
properly represented
undetectable
frequency
Z
2
z
f
s
1
2

To prevent aliasing => no measurable signal above 0.5f
s
.

Das könnte Ihnen auch gefallen