measurement and instrumentation_lecture7
DESCRIPTION
Measurement and Instrumentation_7/8TRANSCRIPT
MEASUREMENT AND INSTRUMENTATIONBMCC 4743
LECTURE 7: COMPUTERISED DATA-ACQUISITION SYSTEMS
Mochamad Safarudin
Faculty of Mechanical Engineering, UTeM
2008
2
Recap – from previous lecture
Measurement process
Analogue signal conditioning - done
DIGITAL SIGNAL CONDITIONING
Sensor/transducerSignal
conditioningRecorder/display/processormeasurand
3
ANALOG AND DIGITAL
•Most measurands originate in analog form•Analog signal varies smoothly in time, without discontinuty •Example: 220 V ac, 60 Hz power line voltage
Example of analog signal
•Digital information is transmitted and processed in form of bits•Each bit defined by one or other of two predefined “logic level”•The time interval assigned to it called bit interval•Most common two logic states is predetermined voltage levels (say 0 and 5 V dc)
4
Why digital?
1. Digital electronics easier to design and fabricateex: IC, low cost, mass product compare to capacitor etc
2. Ease of data recording, storage and displayex: digital voltmeter provides a direct numerical displayof voltage compared with analog voltage that has to bevisually interpolated if the pointer is between two scales
3. Inherently noise resistant
6
Contents Components of computer
systems Representing numbers in computer
systems Components of data-acquisition
systems Configuration of data-acquisition
systems
7
Components of computer systems
CPU and RAM
Printer
Display
Mass storage(disk drives)
Keyboard
Digital input-output
(ports or expansion bus)
8
Typical computer components
Central processing unit (CPU) Program (software) Random access memory (RAM) - ROM Mass storage system – magnetic tape
recorder, magnetic disk drive, optical disk drive
Display/monitor/screen User input device (keyboard, mouse,
joystick,etc) Printers and plotters
9
Contents Components of computer systems
Representing numbers in computer systems
Components of data-acquisition systems
Configuration of data-acquisition systems
10
Representing numbers in computer systems
Computers use bistable flip-flops to store information, which have only 2 possible states: on (1) or off (0)E.g. 1001 2
1 byte = 8 bits
MSB LSB
4 bit binary number
MSB:Most Significant BitLSB: Least Significant Bit
11
Examples (binary/decimal)
1. Convert the 8-bit binary number 01011100 to decimal
2. Find the 8-bit binary number with the same value as that of the decimal number 92.
12
1. 01011100
N10=0(27)+1(26)+0(25)+1(24)+1(23)+2(22)+0(21)+0(20) =0+64+0+16+8+4+0+0 =92
2. By a series of divisions by 2remainder
2 922 46 02 23 02 11 12 5 12 2 12 1 0
0 1
LSB
MSB
Answer:1011100 but weare asked for 8 bit:01011100
13
Most commonly represented using:2’s complement binaryProcedure:
1. Convert the integer to binary as if it were positive
2. Invert all of the bits – change 0’s to 1’s and 1’s to 0’
3. Add 1 LSB to the final result
e.g. convert –92 to an 8-bit 2’s complement binary number
answer: from previous, 01011100
invert 10100011
+1 LSB 101000112 + 12 become 10100100
Note that, positive numbers always have 0 as MSB and negative
numbers have 1 as MSB In a computer a special code is used : ASCII – American Code for
Information Interchange, e.g. k = 011010112 = 10710
What about negative number?
15
Contents Components of computer systems Representing numbers in computer
systems
Components of data-acquisition systems
Configuration of data-acquisition systems
16
Components of data-acquisition systems
Multiplexer Simultaneous sample-and-hold
subsystem ADCs DACs
17
Multiplexer (MUX)
Works as an electronic switch – computer will ask MUX to select a particular channel to be read and processed, sequentially.
Can have crosstalk errors and transfer accuracy.
18
Simultaneous sample-and-hold subsystem Need to be used to record data from
different channel of MUX, precisely at the same time.
e.g. Measuring tire forces using 6 component force transducers simultaneously
19
Analogue-to-Digital Converters
Converts continuous analogue waveform into discrete digital signals
Examples: audio amplifiers, TV, output voltage from transducers, etc
Output of ADCs has 2N possible values If N , no. of possible output states ,
hence results more accurate
20
Types of ADCs
Unipolar single-slope integrating converter (ramp type – quite slow, not very accurate)
Successive-approximations converter (quite fast – typical 12-bit completes a conversion in 10 – 25 μs)
Parallel or flash or half-flash converter (the fastest – can be 10 ns, using lots of comparators)
Dual-slope integrating converter (used in digital voltmeter)
21
Unipolar single-slope integrating converter
1. A fixed reference voltage is used to charge an integrator at a constant rate2. The integrator output voltage then increase linearly with time3. A digital clock (counter) is started at the same time that the charging is begun4. The integrator output voltage is compared continuously with the analog input
voltage using a comparator5. When the integrator voltage exceeds the analog input voltage, digital clock is
stopped6. The count of the digital clock is the digital output of the A/D converter
23
Formula to estimate A/D converter digital output
The output of a 2’s-complement, given the analogue input voltage, is
where max. positive output is (2N/2 –1) and max. negative output is (-2N/2)
The output of an offset binary or simple binary converter is given by
where output will range from 0 to (2N-1) max.
2
22int
NN
rlru
rlio VV
VVD
N
rlru
rlio VV
VVD 2int
24
From example before, estimate the digital output for 6.115 V analog input to A/D converter
Example:
Answer:Since this is a simple binary devices the second equationIs applicable:
10)78.9int(2010
0115.6int 4
xDo
25
Quantisation error
Resolution uncertainty (or treated as random error, analogous to the reading error of a digital display) due to output of ADC with discrete steps, given by
Input resolution error =
The quantisation error is thus ±0.5 LSB
voltsVVN
rlru
25.0
26
Successive-approximations converter (most common type)1. A series of known analog voltages are created and compared to the analog input
voltage2. In the first trial, a voltage interval of one-half the input span is compared with the
input voltage3. If the input voltage is in the upper half of the range, the MSB is set to1; otherwise
it is set to zero4. This process is repeated with an interval half the width of the interval used in the
first trail to determine the second MSB and so forth until LSB is determined
Successive aproximationmethod for 4 bit A/Dconverter
28
Example:
A 12-bit A/D converter has an input range of -10 to +10 V.Find the resolution error of the converter for the analog input.
Answer:Using above equation
00244.02
)10(105.0
12
errorresolutioninput
The resolution uncertainty of ±0.00244 is the best thatcan be achieved
Comment: if input voltage=0.1 V (low end of input range),The quantization error would represent 2.5% of the reading,which is probably not acceptable. The input signal should be amplified probably before the signal enters the converter
29
Digital-to-Analogue Converters
Converts discrete digital signals into continuous analogue waveform
Examples: To operate heaters or valves under computer control
Similar specs as ADCs, i.e. depends on no. of input bits, analogue output range and conversion speed.
30
1. Rn=2nRf
2. When the switched is closed, in flows to the summing bus
Rf
v
R
vi
nR
n
Rn 2
3. The op-amp converts the currents to voltages
k
nnfo iRv
1
4 bit D/A converter
31
Example:A digital code 1011 (equivalent to 11) for the circuit abovewith Rf= 5 kq and vs=-10 V. then
i1=-1 mAi2=0i3=-1/4 mAi4=-1/8 mASumming these currents and multiplying by Rf gives Vo=6.875 V which is 11/16 of the full scale (ref) voltage
32
Contents Components of computer systems Representing numbers in computer
systems Components of data-acquisition
systems
Configuration of data-acquisition systems
33
Configuration of data-acquisition systems General overview of DAS configuration is
given by– Plugging one or more DAQ circuit boards
(includes a MUX and an ADC with an amplifier) into the bus of a PC
– PC turns into digital oscilloscope– GPIB (General Purpose Interface Bus) or IEEE488
system– Process control high performance computers– Distributed DAS – latest development for process
control where it use modular components close to the sensors.