VIRTUAL INSTRUMENTATION Virtual instrument an equimplent that allows accomplishment of measurements using the computer. It looks like a real instrument, but its operation and functionality is essentially different. VI has 2 components: - hardware interface - software for signal acquisition and processing Functions: - signal acquisition - signal processing and information recovery - information storing - remote data transmission - additional: implementation of algorithms for process monitoring and control 1.1
VIRTUAL INSTRUMENTATION Real instruments Virtual instrument 1.2
STRUCTURE OF A VI Process Physical quantity Transducer Electrical signal Hardware interface Communication bus (PCI, USB, GPIB, CAN) Computer (software) Digital acquisition board VIRTUAL INSTRUMENT 1.3
STRUCTURE OF A VI 1.4
ADVANTAGES OF A VI Possibility of measuring on a large number of points and places Complex processing of data and of measurement information Local or remote data storing Remote transmission of data through wired or wireless communication Statistics and forecasts accomplishment Flexibility: possibility of extension or adding of new functions to the instrument by simple modifications of software Improving measurement accuracy by statistical processing and compensation of influence factors Possibility of adding of new functions for process testing, monitoring and control 1.5
MEASUREMENT SIGNALS Signal = a variable on an energetic support containing information characteristic to a quantity or a phenomenon. Examples: audio, video or biomedical signals, sounds, music, radar, measurement signals. Measurement signal has a voltage or current support contains information regarding the measurement quantity (measurand). Is provided by the transducer (sensor) Depends on time Information is contained in: level, shape, frequency, phase, duty cycle. In terms of continuity, signals can be: - analog (they are continuous functions in time) almost all natural signals - discrete or digital - strings of numbers representing instances of the analog signal taken at equally spaced time intervals 1.6
ANALOG AND DISCRETE SIGNALS examples U t [mv] Analog signal Voltage variation at a thermocouple terminals 2 1 ora 3.00 6.00 9.00 12.00 Discrete signal Evolution of the solar spots number over time 1.7
ANALOG AND DISCRETE SIGNALS examples x(t) Analog signal t T x(n) T 0 T 0 T 0 T 0 n 0 2T 03T0 4T 0 (N-1)T 0 T0 5T 0 Discrete signal 1.8
DIGITAL SIGNAL PROCESSING Process Digitization (Sampling + A/D conversion) Digital processing Recovery (D/A conversion) Process 1.9
SIGNAL ACQUISITION USING THE COMPUTER Physical quantity Analog signal Digital signal Transducer Signal conditioning A/D conversion Process Computer Actuator Signal conditioning D/A conversion Action Analog signal Digital signal 1.10
DIGITAL ACQUISITION HARDWARE OPTIONS 1.11
DIGITAL ACQUISITION BOARD ON PCI BUS 1.12
DIGITAL ACQUISITION BOARD ON USB 1.13
DIGITAL ACQUISITION BOARD ON USB 1.14
DATA ACQUISITION USING COMPACT DAQ Inputs - Thermocouple - RTD - Resistor - Voltage - Current - Digital (TTL) - Accelerometer - Microphone - Strain gauge Communication - USB 1.15
PXI SYSTEM Industrial platform for measurement and control based on process computer 1.16
DIGITAL ACQUISITION BOARD ON PCMCIA 1.17
DIGITAL ACQUISITION BOARD FOR PDA 1.18
SIGNAL CONDITIONING 1.19
DATA ACQUISITION BOARD STRUCTURE AI0 AI1 AI2 MUX ACP CEM CAN AI FIFO AI14 AI15 AO0 AO1 DIO0 DIO1 DAC1 DAC2 DIO PORT AO FIFO DIO + counter BUS Bus interface P C I B U S DIO7 Gate Source Clock Counter 1.20
DATA ACQUISITION BOARD FUNCTIONS Analog inputs module - Analog signal multiplexing - Analog signal amplification - Sampling - Quantization (analog-to-digital conversion) - Data transmission to the computer Analog outputs module - Digital-to-analog conversion - Information updating to analog outputs Digital I/O module - Acquisition / generation of digital signals Counter module - Event counting, frequency/period measurement, pulse train generation 1.21
Bus TECHNICAL CHARACTERISTICS OF DAQ BOARDS Model Analog inputs (AI) Sampling freq. input Analog outputs (AO) Sampling freq. output Digital I/O lines Triggering PCI Express 6320 16 250 ks/s 0-24 Digital PCI Express 6321 16 250 ks/s 2 900 ks/s 24 Digital PCI Express 6323 32 250 ks/s 4 900 ks/s 48 Digital PCI Express, PXI Express 6341 16 500 ks/s 2 900 ks/s 24 Digital PCI Express 6343 32 500 ks/s 4 900 ks/s 48 Digital PCI Express 6351 16 1.25 MS/s 2 2.86 MS/s 24 Analog, Digital PCI Express 6353 32 1.25 MS/s 4 2.86 MS/s 48 Analog, Digital PCI Express, PXI Express 6361 16 2 MS/s 2 2.86 MS/s 24 Analog, Digital PCI Express, PXI Express 6363 32 2 MS/s 4 2.86 MS/s 48 Analog, Digital PXI Express 6356 8 simultan PXI Express 6358 16 simultan 1.25 MS/s/channel 1.25 MS/s/channel 2 3.33 MS/s 24 Analog, Digital 4 3.33 MS/s 48 Analog, Digital PXI Express 6366 8 simultan 2 MS/s/channel 2 3.33 MS/s 24 Analog, Digital PXI Express 6368 16 simultan 2 MS/s/channel 4 3.33 MS/s 48 Analog, Digital 1.22
SIGNAL DIGITIZATION Digitization supposes 3 operations: - Sampling taking at equally spaced time intervals of instantaneous values from an analog signal (samples) - Truncation cutting from an infinite time signal of a piece finite in time (window) - Quantization (A/D conversion) conversion of the samples voltage levels into digital codes (bits succession) 1.23
MULTIPLEXING AI0 Analog signals AI1 AI2 MUX OUT Analog signal AIn Command OUT 0 0 0 AI0 0 0 1 AI1 0 1 0 AI2 n 0 n 1 n m Digital code (command) 1.24
PROGRAMMABLE GAIN AMPLIFIER Analog signal IN + IN - + _ PGA OUT Analogl signal Command Gain 0 0 0 1 0 0 1 2 0 1 0 5 Command PGA = Programmable Gain Amplifier 1.25
SAMPLE & HOLD K From PGA C To ADC Command T 0 Sampling period Continuous signal f = 0 1 T 0 Sampled signal 1.26
SAMPLE & HOLD x(t) Analog signal Window t T x(n) N samples T 0 T 0 T 0 T 0 n 0 2T 03T0 4T 0 (N-1)T 0 T0 5T 0 Discrete signal 1.27
ANALOG-TO-DIGITAL CONVERSION (ADC) Reference voltage U ref Voltage level U CAN N Digital code U U = 2 ref n N 1.28
ANALOG-TO-DIGITAL CONVERSION (ADC) U 10 8,75 7,5 6,25 5 3,75 2,5 1,25 0 111 110 101 100 011 010 001 000 N 0 1 2 3 4 000 010 100 101 111 n = 3; U ref = 10 V 5 111 6 100 7 8 011 100 Window 9 10 010 001 11 12 001 000 13 011 t x(n) = {0, 2, 3, 5, 7, 7, 4, 3, 4, 2, 1, 1, 0, 3} 1.29
ANALOG-TO-DIGITAL CONVERSION (ADC) - example - n = 3; U ref = 10 V; U = 1,95 V U U= 2 U ε = Without amplification ref n N U U 0 = 2 1,95 1,25 100 = 35,9% 1,95 With amplification (A = 5) = ε = U ref n A2 N U = 0 U ref n ref n A2 9,75 8,75 100 = 10,25% 8,75 N N=111 b N=110 b N=101 b N=100 b N=011 b N=010 b N=001 b N=000 b U 0 2U 0 3U 0 4U 0 5U 0 6U 0 7U 0 U ref U=1,95 AU=9,75 U 1.30