Sie sind auf Seite 1von 30

Basics of Virtual Instrumentation

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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

VIRTUAL INSTRUMENTATION
Real instruments Virtual instrument

1.2
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

STRUCTURE OF A VI

Communication bus
(PCI, USB, GPIB,
Physical quantity

Electrical signal

CAN)
Hardware Computer
interface
Process Transducer
(software)
Digital
acquisition
board

VIRTUAL INSTRUMENT

1.3
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

STRUCTURE OF A VI

1.4
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

ANALOG AND DISCRETE SIGNALS


examples
Ut [mV]

2
Analog signal
Voltage variation at a 1
thermocouple terminals ora

3.00 6.00 9.00 12.00

Discrete signal
Evolution of the solar
spots number over
time

1.7
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

ANALOG AND DISCRETE SIGNALS


examples

x(t) Analog signal

t
T

x(n)

T0 T0 T0 T0 n
0 2T0 4T0 (N-1)T0
T0 3T0 5T0
Discrete signal

1.8
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL SIGNAL PROCESSING

Process Digitization Digital Recovery Process


(Sampling + A/D processing (D/A conversion)
conversion)

1.9
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

SIGNAL ACQUISITION USING THE COMPUTER

Physical
quantity Analog signal Digital signal

Signal A/D
Transducer
conditioning conversion

Process Computer

Signal D/A
Actuator
conditioning conversion

Action Analog signal Digital signal

1.10
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION HARDWARE OPTIONS

1.11
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION BOARD ON PCI BUS

1.12
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION BOARD ON USB

1.13
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION BOARD ON USB

1.14
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DATA ACQUISITION USING COMPACT DAQ

Inputs
- Thermocouple
- RTD
- Resistor
- Voltage
- Current
- Digital (TTL)
- Accelerometer
- Microphone
- Strain gauge
Communication
- USB

1.15
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

PXI SYSTEM
Industrial platform for measurement and control based on
process computer

1.16
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION BOARD ON PCMCIA

1.17
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DIGITAL ACQUISITION BOARD FOR PDA

1.18
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

SIGNAL CONDITIONING

1.19
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

DATA ACQUISITION BOARD STRUCTURE


AI0
AI1
AI2

MUX AC P CEM CAN AI


FIFO
AI14
AI15

Bus P
interface C
DAC1 I
AO0
AO
FIFO B
AO1 DAC2 U
S
DIO0
DIO1
DIO DIO + cou nter BUS
PORT
DIO7

Gate
Source Counter
Clock

1.20
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

TECHNICAL CHARACTERISTICS
OF DAQ BOARDS
Analog Sampling
Analog Sampling freq. Digital I/O
Bus Model
inputs (AI) input
outputs freq.
lines
Triggering
(AO) output
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
1.25
PXI Express 6356 8 simultan 2 3.33 MS/s 24 Analog, Digital
MS/s/channel
1.25
PXI Express 6358 16 simultan 4 3.33 MS/s 48 Analog, Digital
MS/s/channel
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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

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
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

MULTIPLEXING

AI0
AI1
Analog
signals AI2
MUX OUT
Analog
signal
AIn

Command OUT
000 AI0 n0 n1 nm
001 AI1 Digital code
010 AI2 (command)

1.24
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

PROGRAMMABLE GAIN AMPLIFIER

IN + +
Analog Analogl
signal PGA OUT
signal
IN - _

Command
Command Gain
000 1
PGA = Programmable Gain Amplifier
001 2
010 5

1.25
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

SAMPLE & HOLD

From PGA To ADC


C

Command

T0 – Sampling period

Continuous signal 1 Sampled signal


f0 =
T0
1.26
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

SAMPLE & HOLD


x(t) Analog signal

Window

t
T

N samples
x(n)

T0 T0 T0 T0 n
0 2T0 4T0 (N-1)T0
T0 3T0 5T0
Discrete signal

1.27
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

ANALOG-TO-DIGITAL CONVERSION (ADC)

Reference
voltage
Uref
Voltage level
CAN N Digital code
U

U ref
U= n
N
2

1.28
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

ANALOG-TO-DIGITAL CONVERSION (ADC)

n = 3; Uref = 10 V
U
10
8,75
111 Window
110
7,5
101
6,25 100
5
011
3,75
2,5 010
1,25 001
0 000 t
0 1 2 3 4 5 6 7 8 9 10 11 12 13
N 000 010 100 101 111 111 100 011 100 010 001 001 000 011

x(n) = {0, 2, 3, 5, 7, 7, 4, 3, 4, 2, 1, 1, 0, 3}

1.29
Titular: Prof.dr.ing. Cristian Foşalău
Basics of Virtual Instrumentation

ANALOG-TO-DIGITAL CONVERSION (ADC)


- example -
n = 3; Uref = 10 V; U = 1,95 V

Without amplification

Uref N
Uref
U= n N U0 = n
2 2 N=111b
1,95 − 1,25 N=110b
ε= 100 = 35,9%
1,95 N=101b
N=100b
With amplification (A = 5) N=011b
U Uref N=010b
U = refn N U0 = n N=001b
A2 A2 U
N=000b
9 ,75 − 8,75 U0 2U0 3U04U0 5U0 6U0 7U0 Uref
ε= 100 = 10 ,25 %
8,75 U=1,95 AU=9,75
1.30
Titular: Prof.dr.ing. Cristian Foşalău

Das könnte Ihnen auch gefallen