Вы находитесь на странице: 1из 18

LAB2: Getting started with LabView and signal acquisition

Santi Pascual & Maties Pons


May 7, 2015

Prelab: First Part


PRELAB2-1.- define the following concepts
A/D converter Resolution
When convert a analog signal into a digital one is necessary to apply the sampling process. That sampling
process consist on a discretization of the values of the analog signal into N different values. The resolution
is often expressed in bits, which are calculated as log2 N .
Sampling Frequency
The sampling frequency is how many samples are taken for unit of time. In signal theory is known by
the Nyquist theory that its possible to recover without loss and analog signal if its sampled with twice
the maximum frequency that this signal contains.
Input dynamic range
The A/D converter works in a certain range of values. Outside that interval the values are not discretitzed
correctly. So, the dynamic range describes the range of the input signal levels that can be reliably
measured.
Input impedance
Input impedance is the measure of electric current flow resistance that a circuit has seen from the source.
When a circuit is supplied with steady direct current, the impedance equals the total resistance of the
circuit. When a circuit is supplied with alternating current, the impedance is affected by the inductance
and capacitance in the circuit that create reactances.
Impedance matching is important in any electrical or electronic system in which power transfer must
be maximized.

PRELAB2-2.-Research the National Instruments USB-6008 DAQ specifications and answer the following questions
0.1

What is the maximum sampling rate of the device?

The maximum sampling rate is: 10000samples/second

0.2

What is the maximum differential input voltage range?

The maximum differential input voltage is +-20V.

0.3

How many bits is the ADC?

12 bits in differential and 11 in single-eded mode.

0.4

How many digital levels does that number of bits give?

A maximum of 212 = 4096 levels.

0.5

If the DAQ is configured so that the input voltage range is 0-5 V, what
is the input analog resolution?

AnalogResolutionc =

5V
212

= 1.22mV

PRELAB2-3.-Consult the specifications of and explain the function of components of its input analog circuits.

The first block that the ADC has it the multiplexer. The multiplexers are use to share a resource. In
that case the resource is the input of the Adquisition Board itself. The multiplexer route an Analog
Input channel at ta time to the PGA.
After that, the programmable-gain amplifier (PGA) provides input gains of 1, 2, 4, 5, 8, 10, 16,
or 20 when configured for differential measurements and gain of 1 when configured for single-ended
measurements. The PGA gain is automatically calculated based on the voltage range selected in the
measurement application.
After the signal has been amplified goes trough the next stage that is the analog-to-digital converter
(ADC), which digitizes the AI signal by converting the analog voltage into digital code.
Finally, when the data are digitalized passes to the AI FIFO that is a first-in-first-out (FIFO) buffer
holds data during AI acquisitions to ensure that no data is lost.

PRELAB3-3.-Consult the specifications of and explain the different configurations for analog inputs in the acquisition board.

There are 4 types of different configurations depending of the kind of source (grounded or floating) and
the measurement (differential or referenced single-ended). The choose of the measurement type will vary
depending of the source (floating or grounded) and the measurement willing to be done (differential or
referenced single-ended).
Floating Signal Sources
A floating signal source is not connected to the building ground system, but has an isolated groundreference point. Some examples of floating signal sources are outputs of transformers, thermocouples,
battery-powered devices, optical isolators, and isolation amplifiers. An instrument or device that has an
isolated output is a floating signal source.
Floating Sources, differential measurement.
Use DIFF input connections for any channel that meets any of the following conditions:
- Your application requires input ranges other than 10 V.
- The input signal is low level and requires greater accuracy.
- The leads connecting the signal to the device are greater than 3 m (10 ft).
- The input signal requires a separate ground-reference point or return signal.
The signal leads travel through noisy environments. - Two analog input channels, AI+ and AI,
are available for the signal.
DIFF signal connections reduce noise pickup and increase common-mode noise rejection. DIFF

signal connections also allow input signals to float within the working voltage of the device.
Floating Source, RSE.
Only use RSE input connections if the input signal meets all of the following conditions:
- The input signal can share a common reference point, GND, with other signals that use RSE.
- Your application permits the use of the 10 V input range.
- The leads connecting the signal to the device are less than 3 m (10 ft).
DIFF input connections are recommended for greater signal integrity for any input signal that does
not meet the preceding conditions.
In the single-ended modes, more electrostatic and magnetic noise couples into the signal connections
than in DIFF configurations. The coupling is the result of differences in the signal path. Magnetic
coupling is proportional to the area between the two signal conductors. Electrical coupling is a
function of how much the electric field differs between the two conductors.
With this type of connection, the PGA rejects both the common-mode noise in the signal and the
ground potential difference between the signal source and the device ground.
Grounded Sources
A ground-referenced signal source is a signal source connected to the building system ground. It is
already connected to a common ground point with respect to the device, assuming that the computer
is plugged into the same power system as the source. Non-isolated outputs of instruments and devices
that plug into the building power system fall into this category.
The difference in ground potential between two instruments connected to the same building power
system is typically between 1 and 100 mV, but the difference can be much higher if power distribution
circuits are improperly connected. If a grounded signal source is incorrectly measured, this difference
can appear as measurement error. Follow the connection instructions for grounded signal sources to
eliminate this ground potential difference from the measured signal.
Grounded source, differential. Use DIFF input connections for any channel that meets any of the
following conditions:
-

Your application requires input ranges other than 10 V.


The input signal is low level and requires greater accuracy.
The leads connecting the signal to the device are greater than 3 m (10 ft).
The input signal requires a separate ground-reference point or return signal.
The signal leads travel through noisy environments.
Two analog input channels, AI+ and AI, are available for the signal.

NI USB-6008/6009 User Guide and Specifications 14 ni.com DIFF signal connections reduce noise
pickup and increase common-mode noise rejection. DIFF signal connections also allow input signals
to float within the working voltage of the device

Grouded source, RSE.


Do not use RSE connections with ground-referenced signal sources. Use differential connections
instead.
As shown in the bottom-rightmost cell of Table 6, there can be a potential difference between GND
and the ground of the sensor. In RSE mode, this ground loop causes measurement errors.

LAB
After completing the chapters of the manual in order to master Labview we proceed to the measurement
process and data logging. Basically we are going to take samples from two distinct signals:
1. A 100 Hz sinusoid with the smallest amplitude possible.
2. A 1 kHz square wave from 0 to 5V.
The minimum amplitude is 50mVpp. The signal visualized on the labview graphical interface is:

Figure 1: Labview Output for signal 100Hz 50mVpp


To acquire the signal the channel A0 has been selected and the number of samples has been set to
1000 at a sampling frequency of 1000 samples/second.
After processing the data obtained from the output file with Perl we obtain the next two figures using
Python:

Figure 2: Figure obtained by processing the output data file


We can appreciate the sinus waveform.
The multimeter only samples the peak values and thus we can not see a sinus waveform.
The same configuration has been used for the square wave (but now doubling the sampling frequency
to 2ksamples/sec) obtaining the next waveform:

Figure 3: Labview Output for 1Khz square wave


And the figure obtained from the data is:

Figure 4: Figure obtained by processing the output data file


As we see the plot matches with the graphic interface output.

Prelab: Second Part


In this second part we are going to calculate the uncertainties of the multimeter when measuring different
signals, first of all, lets consider the following assumptions, that are going to bound the specifications
we are working with. We will make use of the document Agilent 34401 user guide:
a) The estimation of the uncertainty from the instruments specifications is type B (non-statistical
method). If the distribution type is unknown, it is assumed that the distribution (probability density
function) is uniform.
As we know the uncertainty is given by:
u(V ) =

Accuracy
k

When considering a uniform distribution the k value takes a value of k =

The distribution type of the multimeters (HP34401) specifications is known, we can deduce the distribution and the coverage factor k used in specifications from the manual (see p. 227).
b) Assume that the equipment is calibrated once a year and the laboratory temperature is between
18 degrres C and 28 degrees C. Disregarding the specification aging (aging).
That information will be usefull in order to calculate the uncertainties we have, and to select the
correct ones from the specifications table.

c) If for a given measure is not specified the accuracy it means that the manufacturer does not warrant
that this measure can be done correctly with this instrument (the measurement uncertainty is unknown).
d) In the function generator the accuracy is specified at 1 kHz, we must add the flatness specification
for different frequencies than 1 kHz.
e) In some waveforms with high amplitude and low RMS value additional errors that are dependent
on the peak factor must be considered. The crest factor is defined as the peak value divided by the RMS
value.
f) Perform all theoretical calculations and measurements with the multimeter on the scale that provides less uncertainty.
The scale that provides less uncertainty will be the one in which the signal occupies all the maximum
range without over-passing the limits.
1) From the specifications of the function generator calculate the standard uncertainty
in the frequency and amplitude of a sinusoidal signal of 1 Vrms of amplitude and 1 Hz, 1
kHz and 1 MHz.
First of all we have noted that the results obtained when generating a 1Hz signal were not stable
(the multimeter had problems in order to acquire the signal) thus, we have changed the 1Hz frequency
to 10Hz.
From the theory we know that the uncertainity is the combination of the uncertainties of the input
variables and the combined incertainity is calculated as: (if the input variables are considered to be
independent):
v
uN
uX
u2i (y)
uc (g) = t
i=1

The kinds of uncertainties that we will take into account are listed below:
Accuracy
Flatness
Resolution
Low frequency errors
Additional Crest factor errors
A/D linearity
Sinewave transfer
etc
In each calculation we will decide which ones are the most relevant and suitable to obtain the result.
FUNCTION GENERATOR

In order to calculate the frequency and amplitude uncertainties of the function generator we will make
us of the document Agilent 33120A user guide.pdf where we can find the specifications of the device.
Frequency Uncertainty
For the frequency uncertainty we have the following values in the specifications:

Figure 5: Table of inaccuracies


So we have two contributions of uncertainties the one that is coming from the resolution (10Hz)
and another one from the accuracy (20ppm per year).
The one coming from the resolution is independent of the frequency so it must be added in each case:
ur esolution =

10Hz

= 5.77Hz
3

For 10Hz
udependent =

20
10106

10

= 115.5Hz

Adding the indepedent of the frequency we have a final one of:


uf req10Hz =

(115.5Hz)2 + (5.77)2 Hz = 115.6Hz

For 1Khz

udependent =

20
10106

1000

= 11.55mHz
3

The addition of the dependent frequency inaccuracy is negligible in that case.


For 1Mhz
udependent =

20
10106

100
3

= 11.55Hz

The addition of the dependent frequency inaccuracy is negligible in that case.


Amplitude Uncertainty
In order to calculate the amplitude uncertainty of the function generator we will take into account
the accuracy (1%) and the flatness (1% if less than 100Khz and 1.5% above 100Khz):

Figure 6: Table of inaccuracies


So the accuracy is going to be equal for all frequencies with a value of:
0.01
uaccuracy (V rms) = = 5.77mV
3
The flatness is going to be equal for the first two frequencies.
For 10Hz
uf latness (V rms) = 5.77mV
So the total will be:
uamplitude =

5.772 mV + 5.772 mV = 8.16mV

For 1Khz
uf latness (V rms) = 5.77mV
uamplitude =

5.772 mV + 5.772 mV = 8.16mV

10

For 1Mhz
0.015
uf latness (V rms) = = 8.66mV
3
p
uamplitude = 5.772 mV + 8.662 mV = 10.41mV
MULTIMETER
Standard Uncertainty Frequency
In order to calculate the standard uncertainty in the multimeter measurement lets focus on the
paremeters that are affected. We will take a the paremeters from Agilent 34401 user guide.pdf

Figure 7: Table of inaccuracies


As we can see we have two components:
1 year at 23 5degrees we have a inaccuracy for frequencies ranging from 40Hz to 300Khz or above
of 1%.
Thus, this part is going to be shared and equal for all the measurements:
+ 0.03
100 = 5.94mHz
3
The second factor that we have tot take into account are the low-frequency errors that will be 0.2%
for 10Hz 0.01% for 1Khz and negligible for 1M hz.
uaccuracy (V rms) =

1
100

For 10Hz
0.2
100
uf requency10Hz =
= 1.15mHz
3

utotal =

p
(1.15 103 )2 + (5.94 103 )2 = 6.05mHz
11

For 1Khz
0.01
100
uf requency1KHz =
= 57.74Hz
3

utotal =

(57.74 106 )2 + (5.94 103 )2 = 5.94mHz

For 1Mhz
utotal = uaccuracy = 5.94mHz
Standard Uncertainty Amplitude
For the amplitude we have to take into account the following list of innacuracies:

Figure 8: Table of inaccuracies


So, we mainly have three factors to deal with. The first one is the accuracy itself of the lecture, being
0.35 + 0.04 in case of 10Hz, 0.06 + 0.04 for 1Khz and 4.00 + 0.50 for 1M hz.
The second one are the low frequency errors (for a medium-filter AC). In that case the innacuracies
will be: 0.74% for 10Hz and negligible for 1Khz and 1M hz.
Finally, the sinewave transfer accuracy is going to be 0.002% for 10Hz and 0.005% for 1Khz and
1M Hz

12

For 10Hz
uamplitude10Hz (V rms) =

0.35
100

+ 0.04
100 = 2.25mV
3

0.74
100
= 4.23mV
ulowf ilter10Hz (V rms) =
3
0.002
100
utransf er10Hz (V rms) =
= 11.5V
3

utotal10Hz (V rms) =

(2.25 103 )2 + (4.23 103 )2 + (11.5 106 )2 = 4.79mV

For 1Khz
uamplitude1KHz (V rms) =

0.06
100

+ 0.04
100 = 0.57mV
3

0.005
100
utransf er1KHz (V rms) =
= 28.8V
3

utotal1KHz (V rms) =

(57.73 103 )2 + (28.8 106 )2 = 0.57mV

For 1Mhz
uamplitude1M Hz (V rms) =

4
100

+ 0.5
100 = 25mV
3

0.005
100
utransf er1M Hz (V rms) =
= 28.8V
3

utotal1M Hz (V rms) =

(57.73 103 )2 + (28.8 106 )2 = 25mV

FCalculate the standard uncertainty in the frequency and amplitude as measured with
the multimeter with a 5 an a half -digit resolution with medium filter AC coupling on a
square signal with the rms voltage and frequency of paragraph 1.
When generating an square wave we have to take into account that the multimeter has specified a
paramter called crest factor, which introduces uncertainty in the measure of square signals.

Figure 9: Table of inaccuracies, crest factor


13

For the kind of square wave that we are going to use we will select crest factor=1.
That crest factor will introduce a 0.005% of uncertainty in the amplitude measures but will not affect
the frequency ones. So, the we should add a factor in each amplitude uncertainty calculated before of a
value:
0.005
100
= 288.68V
ucrest =
3

As we see that uncertainty will not have a huge impact in the final result.
Thus:
For 10Hz

utotal10Hz (V rms) =

(2.25 103 )2 + (4.23 103 )2 + (11.5 106 )2 + (288.68 106 )2 = 4.8mV

For 1Khz
utotal1KHz (V rms) =

(57.73 103 )2 + (28.8 106 )2 + (288.68 106 )2 = 0.57mV

For 1Mhz
utotal1M Hz (V rms) =

(57.73 103 )2 + (28.8 106 )2 + (288.68 106 )2 = 25mV

LAB
LAB2-1.- Measure with the multimeter for each of the three signals (sinus, square and
triangle) at the 3 different frequencies.
The three frequencies selected have been 10Hz, 1Khz and 100Khz (in order to avoid the bad frequency reading at 1Hz and the impossibility of producing a triangular wave of 1M hz).
In order to acquire the measures on the LabView software we modify the file .vi uploaded in Atenea
adding two block: one for controlling the X axis and the other one for the Y axis.
After that the equipment will be connected at for a given wave the LabView program will take simultaneosly measures with the oscilloscope and the multimeter.
The results will be displayed in the LabView graphical interface by means of two arrays containing
the information of both measures and also in a graph that will depict the ratio between the measures of
the oscilloscopes and the measures taken with the multimeter.
For default the time base was set to 10 fit 10 times the square wave in the oscilloscope display and
the vertical range with the appropriate value to be displayed occupying the maximum range.
The results obtained from the graphical interface of the LabView are the following ones:

14

For 10Hz

Figure 10: Sinus square and triangle at 10hz


As we said before, incorrect measures were taken if 1Hz wave was generated so we decide to move
to 10Hz
Sinus
Time base of 0.05seconds was selected with a vertical range of 0.4V.
Range of values:
Oscilloscope: (0.94)
Multimeter: (0.99)
Square
Time base of 0.05seconds was selected with a vertical range of 0.4V.
Range of values:
Oscilloscope: (0.96)
Multimeter: (0.996)
Triangular
Time base of 0.05seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (0.94)
Multimeter: (0.991)
For 1Khz

Figure 11: Sinus square and triangle at 1Khz


15

Sinus
Time base of 0.001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (1.016)
Multimeter: (0.9975)
Square
Time base of 0.001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (1.019)
Multimeter: (1.0005)
Triangular
Time base of 0.001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (1.015)
Multimeter: (0.9970)
For 100Khz

Figure 12: Sinus square and triangle at 100Khz


Sinus
Time base of 0.0001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (0.93)
Multimeter: (0.9995)
Square
Time base of 0.0001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (0.995)
Multimeter: (0.9993)

16

Triangular
Time base of 0.0001seconds was selected with a vertical range of 0.5V.
Range of values:
Oscilloscope: (0.92)
Multimeter: (0.9983)
Discuss the measures. Are in agreement with the specifications?
In all the graphs we can appreciate how the line obtained has practically an slope equal to 0, what
means that the results obtained with the multimeter and the oscilloscope are quite similar and all are
compliant with the specifications that we have seen in their datasheets.
Moreover, we can appreciate how the multimeter gives a value always closer to the real amplitude
value and its more precise than the oscilloscope.
Most of the values obtained are into the range of uncertainty that we calculated previously. That way,
for sinusoidal at 10Hz, the values obtained (0.9995)are into the 1 0.004mV , as well as for 1khz (0.9975)
into NOT HERE and we can say nothing about 1Mhz because the measures have been done by 100khz.
For non-square signals also most of the values are inside the ranges calculated.
COMPLETE THAT
Configure the function generator for a frequency of 1 kHz. Take 100 measurements for
each waveform with the multimeter and oscilloscope. What is the Type A uncertainty of
the measurements? Is it comparable with the Type B uncertainty? Why
The type A uncertainty is due to the measurement uncertainties of the device and can be obtained
by means of stadistical methods from a large number of samples.
So, we have taken 100 samples from the 1Khz using the oscilloscope and the multimeter. The process
has been done by three types of waveform: sinusoidal, square and triangular.
The results obtained have been pasted on a txt file. The commas have been replaced by points and
then imported to Matlab in order to calculate the mean (mean(A)) and the standard deviation (std(A)).
The results obtained have been:
Sinusoida
Oscilloscope
Mean= 0.9968
Standard Deviation: 1.17 105
Multimeter
Mean= 1.0156
Standard Deviation: 4.98 104
Square
17

Oscilloscope
Mean= 1.0182
Standard Deviation: 5.76 104
Multimeter
Mean= 1.0007
Standard Deviation: 1.72 105
Triangular
Oscilloscope
Mean= 1.0150
Standard Deviation: 3.19 105
Multimeter
Mean= 0.9966
Standard Deviation: 9.93 105
Type B is obtained by means of scientific judgement that is based in assumptions.
The type A uncertainty that we can measure with samples is not comparable with the type B that
needs the supervision and judgement of an expert.

18

Вам также может понравиться