Você está na página 1de 29

Data Acquisition Basics

Overview
Ground References
Floating versus Ground Referenced
Differential and Common Mode Rejection Ratio
(CMRR)
Analog multiplexers

Ground Referenced Single Ended (GRSE) and Non


Referenced Single Ended (NRSE)
Sampling Rate and Nyquist Criterion
Aliasing
Example Nyquist.VI, Aliasing.VI, Acq One Sample w

loop and waveform chart and freq.VI


Quantization Error
Example Quantization.VI, Linearity Check.VI

Resolution from Range and Number of Bits


Intro To NI-ELVIS
Circuit Safety

Floating Versus Ground References


Voltage is a measurement of the difference in electrical potential between two
points
As such, voltage measurements must always be referenced to a known level
Traditionally voltage measurements are made with respect to earth ground

In self generating voltage systems, like batteries and thermocouples, the


ground reference is usually the negative terminal of the source
If the negative terminal of a self generating system is connected to an
earth ground, then it is grounded
If the negative terminal of the self generating system is not connected to
earth ground, then it is floating
Floating means that the local ground reference of a system is not
tied to earth ground
Accumulation of static charge, electromagnetic coupling and other
phenomena can cause the local ground to raise to a energy potential
that is above earth grounds
Other power systems, such as dc-dc converters and transformer coupling, can
generate local grounds that are isolated from earth ground

Differential Voltage Measurements


Ideally every measurement of voltage would be purely differential
We would measure the potential difference between two points
V and V
These points are typically referred to as
A differential amplifier is a device that amplifies the difference between two
voltages

Voutput Gain (V V )

This requires two wires from every measurement and someway to connect both
wires to a differential amplifier to measure the signal
Either a dedicated differential amplifier for each measurement or
A switch (multiplexer or mux) that switches both wires into a differential
amplifier for each measurement
A reference to instrumentation system ground is established through the
amplifier
This allows comparison between measurement channels in a system
In large instrumentation systems this is a problem as it doubles the system

Differential

Analog
Multiplexers
From Labview
Data Acquisition
Basics Manual

Analog Multiplexers
Normally there is one analog to digital converter that is shared
in all the analog channels
In order to switch the different analog channels into the analog
to digital converter at the appropriate times, there is an analog
multiplexer
Definition of multiplexer is a set of electromechanical or
semiconductor switches arranged to allow the selection of one
of many inputs to a single output
Digital multiplexers, allow the selection of a digital value or
pulse train to an output
Analog multiplexers allow the selection of one of several
analog line voltages signals to an output

Common Mode Voltage Rejection Ratio (CMRR)

Any voltage measured with respect to the instrumentation


amplifier ground that is present at both of the inputs to a
differential amplifier is called Common Mode Voltage
Common Mode Voltage is rejected by an ideal amplifier, i.e.
not measured
This is an important noise reduction feature as noise due to
electromagnetic coupling and other sources is usually present
on both inputs
A differential amplifier can improve the signal to noise ratio
Practical devices are imperfect and can be described by
parameters such as common mode voltage range and Common
Mode Rejection Ratio (CMRR)
CMRR is frequency dependent
Most data acquisition devices will specify the CMRR up to 50
hertz, the power line frequency

CMRR Measurement

Vref

Test requires
Periodic signal
Source at frequencies
of interest

V V
CMRR(db) 20 log(
)
Vout
CMRR(db) 20 log

Differential Gain
Common Mode Gain

Ground-referenced Single Ended

In GRSE, all measurements are made with respect to a single node, AI GND,
that is directly connected to measurement system ground .
This reduces the number of wires and channels of multiplexing required.
High frequency signals often require the use of coaxial cables
A coaxial cable utilizes a solid center conductor surrounded by an insulator
which is surrounded by a grounded shield
Coaxial cables are needed in high frequency because most of the signal
travels along the outside surface of the cable
The shield also reduces the amount of noise coupling in high frequency
signals
These are by necessity single ended measurements

Ground Referenced Single Ended


(GRSE) and NRSE

In an non-referenced signal ended system, the channel and the sense line (low
reference point at the sensor) are not direct connected to a ground but have a
finite resistance to ground. This may be large or small. Bias resistors may be
installed to control this resistance to a known value to reduce the error in the
signal.

Ground Loop

A ground loop is when there is difference in potential between two ground points
resulting in current flow between the two ground points. This can introduce error
into measurements through direct effects (raising the ground) and indirect effects
(electromagnetic coupling)

Aliasing

A false lower frequency component that appears in sampled data acquired at too
low a sampling rate compared to the Nyquist Frequency.
This is the phenomena that explains why wagon wheels seem to turn backwards in
movies. The sampling rate of the pictures (60 hz) is not fast enough to capture more
than one cycle of the wheel so in subsequent frames, the wheel appears to turn
backwards

Nyquist Sampling Criteria

Sampling Rules
If data signal maximum frequency content is f, then
Must sample at greater than 2f to get frequency correct
Must sample at 10-20f to get shape correct
f is the highest frequency present, not necessarily the highest frequency
desired
This is why it is important to lowpass filter prior to sampling
Once it is sampled, the aliasing has occurred and further filtering cant
help
Anti-aliasing filtering cant be done in software unless initial sample
rate is high enough to be greater than the Nyquist criterion for all
frequencies present
Sampling at a much higher rate so that you can digitally filter is
called oversampling
In general filter before you sample or be sure you are oversampling
and then digitally filter
Example Nyquist.VI

Frequency Domain Representation of


Aliasing

Signal Spectrum Before Sampling at less than Nyquist frequency

Signal Spectrum after Sampling at less than the Nyquist frequency

Quantization error

Quantization - The process of converting an analog signal to a digital


representation.
Normally performed by an analog-to-digital converter (A/D converter or
ADC).
Quantization Error - The inherent uncertainty in digitizing an analog value.
The quantization error depends on the number of bits in the converter, along
with its errors, noise, and non-linearities

Quantization Error

Quantization error varies within a range

Quantization

Increasing the number of bits decreases the quantization


error for the same input range

The greater the input range, the greater the


effect of quantization error (for a fixed number
of bits of conversion)

Accuracy

Example Quantization.VI

Setting Limits Allows DAQ Device to


Make Better Use of Number of Bits in
ADC

Relative Accuracy

Example see Linearity Check.VI

LabVIEW Data Acquisition

Overview
Data Acquisition Structures Functions & locations
Timing, triggering and buffering - Software versus
board
Data Acquisition Libraries
Express
DAQ MX - the latest
Single Shot Acquisition of a single channel using
DAQMX
Software timing functions and time functions
Multi-channel acquisition using DAQMX
Multiple Samples of a single or multiple channels
using DAQMX
Timing
Triggering event and analog using DAQMX Page 25
Traditional NI-DAQ
NI-MAX

Layers of Data Acquisition


VI Using DAQMX VIs

DAQMX VI definition
DAQMX VIs - memories

Driver (DLL ) Interface (Code Interface Node)

Driver and its memory settings based on library calls (DLL)

DAQ Board Specific Interface


DAQ Board Functions/ Onboard Registers
This allows applications to move between different computers and different data
acquisition systems with similar capabilities without reprogramming

Page 26

Timing, Triggering and Buffering


There are three critical support functions performed in
data acquisition
Timing determining and controlling the separation
between samples
Triggering determining when to start and stop data
acquisition
Buffering storing information as it is acquired before it
is processed or transferred between elements of the data
acquisition system
These functions can be performed in
The hardware in the data acquisition board
The software in the computer
Both the data acquisition board and the software in the
Page 27
computer

Buffers

A buffer is a contiguous set of memory (in a computer) or registers (on a board) where data
can be written for future processing or read from as an input to processing
Incoming or outgoing information is temporarily stored in a buffer which acts as a
synchronizing element and allows devices on either side of an interface to act at their design
rate

A buffer is an intermediate device


Pointers serve as indexes into the buffer. Buffers can have read pointers (next location to be
read) and write pointers (next location to write)

Buffers allow data to be communicated more efficiently as the overhead in data transfer is
usually fixed and larger transfers are more efficient

Circular Buffers

Você também pode gostar