Box 2.2 Filters
2.7 Data Acquisition Hardware
Engineering systems use digital DAQ for a variety of purposes such as process condition monitoring and performance evaluation, fault detection and diagnosis, product quality assessment, dynamic test-ing, system identification (i.e., experimental modeling), and process control. A typical DAQ system consists of the following key components:
1. Sensors and transducers (to measure the variables in the process that is monitored) 2. Signal conditioning (filtering and amplification of the sensed signals)
3. DAQ hardware (to receive different types of monitored signals and make them available to the bus of a computer; Note: Some signal conditioning is typically present in DAQ)
4. Computer (personal computer, laptop, microcontroller, microprocessor, etc., to process the acquired signals so as to achieve the end objective of the DAQ system)
5. Power supply (external signal conditioning and active sensors will need power; DAQ power typi-cally comes from the computer)
6. Software (driver software to operate the DAQ hardware for properly acquiring the sensed data;
application software for use by the computer to process the data for the end objective)
Consider the process monitoring and control system shown in Figure 2.34. Typically, the measured variables (responses or outputs, inputs) of a physical system (process, plant, machine) are available in the analog form as signals that are continuous in time. Furthermore, typically, the drive signals
Computer
DAQ board
Amplifier Power supply
Process, plant, machine Central
processor
Memory Signal Sensors
conditioning
Fixed storage
Peripheral devices Co-processor
(DSP, etc.)
Storage (e.g., drive and
application software)
Computer bus
FIGURE 2.34 Components of a process monitoring and control system.
(or control inputs) for a physical system have to be provided in the analog form. These signals may have to be filtered to remove the undesirable components and amplified to bring the signals to proper levels for further use. Filtering and amplification have been studied in previous section of this chapter. A digi-tal computer is an integral component of a typical engineering system, and may take the form of a PC, laptop, or one or more general-purpose microprocessors with powerful processing capability or more specific microcontrollers with extensive input–output capabilities. For additional processing power, coprocessors such as DSPs may be incorporated. In the system, the digital computer will perform tasks such as signal processing, data analysis and reduction, parameter estimation and model identification, diagnosis, performance analysis, decision making, tuning, and control. Essentially, the computer per-forms the end objective of the monitoring and DAQ process.
Computer architecture and hardware: The computer uses a bus (e.g., PCI—Peripheral component inter-connect bus) to transfer data between components in the computer. In a typical PC, the DAQ card goes into an expansion slot of the computer. The power for DAQ comes from the PC itself. The operation of the DAQ is managed by driver software that is provided by the DAQ supplier and is stored in the computer. The driver software has to be compatible with the operating system (e.g., Windows, Mac OS, Linux) of the computer. This software manages accessing data from the DAQ and making them avail-able to the computer for further processing. This further processing is done by application software, which may be programmed using such tools as MATLAB and LabVIEW or using high-level program-ming languages such as C and C++. This software will not only process the acquired data to achieve the end objective (performance analysis, diagnosis, model identification, control, etc.) and also may be used to develop a suitable graphic user interface (GUI) for the monitoring system.
Motherboard: The motherboard (or main board or system board) of a computer represents internected key hardware components of a computer. External devices and input–output ports are also con-nected to the motherboard, through a computer bus. Various IC packages and other hardware devices are mounted on the motherboard, which is located in the computer housing. Other devices (various cards including DAQ) are mounted in expansion slots of the computer housing. A typical architecture of a computer motherboard is shown in Figure 2.35a. It shows the main components such as the central processing unit (CPU), memory, and clock; expansion slots for hardware such as DAQ, network card, video card, storage, sound card, and memory expansion card; and I/O ports for peripheral devices and communication, such as monitor, keyboard, mouse, printer, scanner, external storage, local area network (LAN).
Some acronyms used in the context of computer hardware, operation, and communication, are indicated in the following.
Small computer system interface (SCSI): Standards and protocols for connecting and transferring data between computers and peripheral devices such as hard drives, CD drives, and scanners.
Extended industry standard architecture (EISA): A bus standard for PCs.
Peripheral component interconnect bus (PCI bus): A popular bus of a PC, for connecting hardware devices in it and data transfer between them.
Internal bus: A bus for connecting internal hardware of a computer. Also known as system bus and front-side bus.
External bus: A bus for connecting external hardware to a computer. Also known as expansion bus.
Universal serial bus (USB): A computer bus for connection and communication with peripheral devices.
First in, first out (FIFO): A method for arranging data in a buffer or stack, where the oldest data ( bottom of the stack) are processed first.
Direct memory access (DMA): Capability where a hardware component in the computer can directly access the computer memory (without going through the CPU).
RS-232: A standard for serial communication of data.
SCSI USB Various memory (RAM, DRAM,
etc.) Video card
Network card CPU and co-processor EISA
Clock
(Ethernet)LAN
Scanner Printer
Harddrive Monitor
PCI bus Keyboard
Mouse
EISAbus
CD ROM SCSIbus
(a)
Multiplexer (MUX) Sample and
(S/H)hold
DAC
(b)
Counters, timers Clock
I/O bus of computer
External connector of DAQ card Interface
hardware (FIFO buffer,
registers,DMA, interrupt, etc.)
ADC Amplifier
(prog. gain)
FIGURE 2.35 (a) Hardware components of a computer and (b) main components of a DAQ card of a computer.
RS-422: Extends the range of RS-232 connections.
Universal asynchronous receiver/transmitter (UART): A hardware component that converts data between parallel and serial forms, for transmission. Commonly used with RS-232 and RS-422.
TCP/IP: Transmission control protocol (TCP) is a core communication protocol of the Internet pro-tocol suite (IP). This is a propro-tocol for network communication. More reliable at the expense of speed.
User datagram protocol (UDP): A communication protocol in the IP suite. Faster, at the expense of reliability.
DAQ and analog–digital conversion: Inputs to a digital device (typically, a computer or a microcon-troller) and outputs from a digital device are necessarily present in the digital form. Hence, when a digital device is interfaced with an analog device (e.g., sensor), the interface hardware and associated driver software have to perform several important functions. Two of the most important components of interface hardware are digital to analog converter (DAC) and analog to digital converter (ADC). An analog signal has to be converted into the digital form, using an ADC, according to an appropriate code, before it is read by a digital processor. For this, the analog signal is first sampled into a sequence of discrete values, and each discrete value is converted into the digital form. During this conversion, the discrete value has to be maintained constant by means of S/H hardware. If multiple signals (from multiple sensors) are acquired simultaneously, an MUX may have to be used to read the multiple signals sequentially by the computer. On the other hand, a digital output from a computer has to be converted into the analog form, using a DAC, for feeding into an analog device such as drive amplifier, actuator or analog recording, or display unit. DAC, ADC, S/H, and MUX are studied in the present section.
Both ADC and DAC are elements or components in a typical DAQ card ( or I/O board, or DAQ and control card or DAC). Complete DAQ cards and associated driver software, are available from such com-panies as National Instruments, ADLINK, Agilent, Precision MicroDynamics, and Keithly Instruments (Metrabyte). A DAQ card can be directly plugged into an expansion slot of a PC and automatically linked with the bus of the PC. Its operation is managed by the driver software, which has to be stored in the computer. Powerful microcontroller units (e.g., Intel Galileo) have DAQ functions and hardware already integrated into them (e.g., 14 digital I/O pins 6 of which are for pulse-width-modulated outputs;
6 analog inputs with a built-in analog-to-digital converter).
The main components of a DAQ card are shown in Figure 2.35b. The MUX selects the appropri-ate input channel for the incoming analog data. The signal is amplified by a programmable amplifier before ADC. As discussed in a later section, the S/H samples the analog signal and maintains its value at the sampled level until conversion by the ADC. The first-in-first-out element stores the ADC output until it is accessed by the computer for digital processing. The DAQ card can provide an analog output through the DAC. Furthermore, a typical DAQ card can provide digital outputs as well. An encoder (i.e., a pulse-generating position sensor) can be directly interfaced to the DAQ card, for use in motion control applications. Specifications of a typical DAQ card are given in Box 2.3. Many of the indicated parameters are discussed in this chapter. Others are either self-explanatory or discussed elsewhere in the book. Particular note should be made about the sampling rate. This is the rate at which an analog input signal is sampled by the ADC. The Nyquist frequency (or the bandwidth limit) of the sampled data would be half this number (e.g., for a sampling rate of 100 kS/s, it is 50 kHz). When multiplexing is used (i.e., several input channels are read at the same time), the effective sampling rate for each channel will be reduced by a factor equal to the number of channels. For example, if 16 channels are sampled simultaneously, the effective sampling rate will be 100 kHz/16 = 6.25 kS/s, giving a Nyquist frequency of 3.125 kHz.
Since DAC and ADC play important functions in engineering applications of monitoring, they are discussed now. DACs are simpler and less expensive than ADCs. Furthermore, some types of ADCs employ a DAC to perform their function. For these reasons, we will discuss DAC before ADC.
2.7.1 Digital-to-Analog Converter
The function of a DAC (or D/A or D2A) is to convert a digital word stored in its data register (called DAC register), typically in the straight binary form, into an analog value (voltage or current). In this manner, a sequence of digital data can be converted into an analog signal. Some form of interpolation (or, recon-struction filter) has to be used to connect and smooth the resulting discrete analog values, for forming the analog signal. Typically, the data in the DAC register are arriving from the data bus of the computer to which the DAC is connected (e.g., the DAC located in the DAQ card of the computer).
Each binary digit (bit) of information in the DAC register may be present as a state of a bistable (two-stage) logic element, which can generate a voltage pulse or a voltage level to represent that bit. For example, the off state of a bistable logic element or absence of a voltage pulse or low level of a voltage signal or no change in a voltage level can represent binary 0. Conversely, the on state of a bistable device or presence of a voltage pulse or high level of a voltage signal or change in a voltage level will represent