How to Choose Between Dedicated Versus Host-Based Processing -- Part I
Overview
Several years ago, the question of whether to use dedicated or host-based processing was a simpler decision than it is today. In years past, you could make most measurements on dedicated instruments that performed all analysis on raw data with dedicated processing within the instrument. You only performed host-based processing on a computer if you could analyze the data long after the acquisition. Recent advances in computers have seen a dramatic increase in processor speed and bus interface speeds, making the differences between dedicated processing and host-based processing harder to distinguish. Read on to discover what you need to consider when choosing between these two approaches. In this part I of this article, we consider a typical measurement system that consists of an instrument and a computer performing signal analysis on an acquired time-domain waveform.
You need to consider the question of dedicated versus host-based processing when deciding between different dynamic signal acquisition (DSA) products from National Instruments. The NI 455x Series dynamic signal analyzers have an onboard DSP, which is dedicated to performing signal processing on data from the analog to digital converters (ADCs). This Series uses the PCI bus interface. The NI 445x Series also uses the PCI bus interface to the computer. These products rely on the host processor to perform all signal analysis.
Table of Contents
- Understand a Typical Measurement System
- Study Common Definitions
- Investigate Older System Configurations
- Learn New Developments
- Solve Problems with NI Hardware and Software
- Define System Requirements
- Choose Real-Time, Gap-Free, or Post Processing
- Determine the Number of Channels
- Decide Frequency Range
- Conclusion
Understand a Typical Measurement System
Measurements involving signal processing on acquired data have similar arrangements. A typical measurement system has some signal conditioning in line with the analog to digital converter (ADC). Signal conditioning prepares the signal to be digitized by the ADC. Examples of signal conditioning are antialias filtering and integrated circuit piezolelectric current conditioning. ADCs convert the incoming signal to digital data by sampling it at a given rate. ADCs are one component of a measurement system and have a maximum sample rate, which determines the upper frequency range of the measurement system as defined by the Nyquist criteria. The ADC also has an input resolution given in number of bits. When making frequency measurements, this is what determines the dynamic range of the instrument.
After the ADC digitizes the signal, the data is passed to a processor for further analysis. You can have two possible configurations -- a dedicated processor or the computer processor controlling the measurement system. Dedicated processors perform analysis only on signals coming from the ADC. Other operations present in the measurement system do not affect the performance of the processor. The second configuration uses the computer’s processor to perform the signal processing. This is the same processor that controls the measurement system and thus may be performing other operation simultaneously such as video display or allocating resources to another device on the computer.
In order for the data from the ADC to be passed to the computer, you must use some type of interface bus. You need an interface bus whether or not you use the computer to perform the signal processing. Examples of interface buses are GPIB, serial, ISA, PCI, and PXI/CompactPCI.
When you use a PC to perform measurements with an instrument, you can use it to control the instrument as well as perform the signal analysis. You use the processor of the computer to program various tasks for the instrument and retrieve data from it. The computer processor also manages the storage and presentation of data, in report format or on a display. In addition to these tasks, you may use the computer processor to perform analysis on the acquired signal before and/or after the presentation and storage of the signal data.
Study Common Definitions
Before continuing with the discussion at hand, we give a few definitions of terms. These terms are "real time," "gap free," "post, dedicated, and host-based processing."
Real-Time Processing
Real-time processing can carry different meanings for different applications. There are two common meanings that are implied by the term real-time processing. The first is sometimes called "hard" real time. You can apply hard real time to control systems in which you need deterministic behavior. For example, you need a system to execute in a predetermined, specified amount of time. You may not need extremely fast execution, but you need reliability. This behavior is very important in control systems where reaction to certain parameters needs to occur not more or less than an exact predetermined amount of time.
"Soft" real time differentiates itself from hard real time because it does not necessarily imply that the operation occurs in an exactly specified amount of time, but only under a specified time limit. In other words, it does not matter how long it takes for the operation to execute as long as it occurs within the predetermined time. Soft real time is typically used in measurement systems performing signal analysis on acquired time-domain signals. For example, when performing a continuous frequency-domain measurement on a signal using the fast Fourier transform (FFT), you acquire the signal in discrete blocks of time-domain data. The data is then sent to a processor to be converted to the frequency-domain via the FFT algorithm. If the processing of the frequency transform is executed as fast or faster than the time it takes to acquire the block of time-domain data, then the operation is said to execute in "real time."
When performing measurements using a standard computer, whether using dedicated processor or the computer processor, the term real-time is sometimes not applied. A standard computer cannot guarantee 100 percent that any operation will occur in or under a specified time. Because absolute determinism is required by "hard" real-time systems, you can argue that the term does not apply. However, the increased performance in computers has enabled measurement systems using computers to satisfy "soft" real-time requirements close to 100 percent of the time. Thus, we still use the term real time to describe these measurement systems performing signal analysis.
Gap-Free Processing
Often the only concern in acquiring data is that none of it is lost. Whether or not the data is displayed on the screen in real time is not important as long as no data is missed during the acquisition and storage of the signal. This is known as "gap-free" processing. If a device advertises gap-free processing, then you are guaranteed not to miss any data during your acquisition. It simply means that no data is lost and does not imply that you are using real-time or post processing.
A question may arise in determining the difference between gap-free and real-time processing. For example, when would you have gap-free processing, but not have real-time processing? Assume that data is acquired by an instrument and then passed to a computer for signal processing. The computer may be able to receive all of the data from the instrument and store it to disk without losing any of it. This would qualify the operation as being gap-free. However, other operations may place computational burdens on the processor and thus compromise real-time processing performance.
Post Processing
Post processing defines processing that takes place after the acquisition has finished. Measurement systems that continuously acquire data break the acquired signal into smaller time-domain blocks that are processed simultaneously with the acquisition. Post-processing is typically performed on the computer with data previously stored to disk or in memory. It is used for signal processing algorithms that are too computationally intensive to be performed with real-time or gap-free performance, such as a 12,000 line FFT. You also use post processing to implement custom signal analysis that is not present as a standard function on a dedicated processor or stand-alone instrument.
Dedicated Processing
Dedicated processing is often the choice when real-time or gap-free processing needs to be guaranteed. The processor is only used for computations on the acquired signals and has enough power to maintain real-time or gap-free performance regardless of the number of channels, sampling rate, or other parameters. Because the processor is not the same as that controlling the instrument, the processing is not affected by other simultaneously occurring operations. This is typically done on a DSP or some other type of processor.
Host-Based Processing
When you use the same processor to control the instrument as well as perform the signal processing, it is termed host-based processing because you are using the host computer as the processor. You can perform real-time, gap-free or post-processing on the host computer. Current advances in computer processor technology have enabled real-time and gap-free processing to occur on host-based processing systems. With this hardware configuration the processor that controls the instrument is the same processor that performs the signal analysis. Any other operation that executes simultaneously with the signal processing can slow it down and affect real-time or gap-free performance. Other operations can include processing for displaying data and accepting an interrupt from another instrument on the same measurement system.
Investigate Older System Configurations
Before the increase in performance of computer technologies, there were few system configuration choices when determining whether you needed real-time or post-processing. If you needed real-time processing, you had to use an instrument with a dedicated processor. This was usually designed as a stand-alone instrument whose interface to the computer would be through GPIB, serial, or some other protocol. The computer was primarily used to control the functionality of the instrument.
The stand-alone instrument performed all processing on the stand-alone instrument and later passed it to the computer for storage and report generation. The processors on the computers controlling the instruments were not fast enough to perform the signal analysis as fast as the acquisition rates. Another bottleneck for the data was the interface bus. GPIB was the most common interface from computers controlling the instruments. GPIB can only transfer limited quantities of data over this bus with these slow rates. Any processing performed on the computer was post processing. Even with post processing, the capabilities were limited because of the lack of processing power in the computer.
Learn New Developments
In recent years, the advances in computer technologies have greatly enhanced the ability to perform host-based measurements with real-time or gap-free performance. Companies have developed many new instruments that use faster bus interfaces to transfer data from the instrument to the host computer. National Instruments dynamic signal acquisition devices use the PCI and PXI buses, which deliver data from the devices to the computer processor at rates up to 132 Mbytes/s. This is much better than the 1.5 Mbytes/s maximum rate that the GPIB bus interface delivers.
In addition to finding ways to deliver the data faster to the computer, processors used in computers have increased dramatically in performance. These processors can now keep up with the data that is transferred to them at high rates. Real-time or gap-free processing is now a possibility with host-based processing because of these new developments. The challenge now lies in choosing a dedicated or host-based processing system configuration. In the following paragraphs, we discuss methods for making this decision and differentiating between when to use dedicated or host-based processing.
Solve Problems with NI Hardware and Software
National Instruments provides a number of solutions for making real-time, gap-free, and post-processing measurements. The NI 4551 and NI 4552 for the PCI bus are DSA boards that use dedicated DSPs to perform all signal processing. The instrument driver and optional software add-on provide FFT, octave, and swept sine analysis that is processed on the DSP. These products provide dedicated processing that is fast enough to give gap-free and "soft" real-time performance. These products are also capable of streaming the unprocessed time-domain data to disk for custom host-based processing.
NI also provides products that use host-based processing to perform all signal analysis. The NI 445x Series products for PCI use the host computer’s processor and provide the same signal conditioning as the NI 455x Series products. Another host-based line of products is the NI data acquisition (DAQ) boards often used in conjunction with SCXI for signal conditioning. LabVIEW and Measurement Studio provide analysis tools for performing host-based processing with these products. The Sound and Vibration Toolset for LabVIEW and the Signal Processing Toolset provide additional tools that you can use for host based and post processing.
NOTE: You can use LabVIEW Real-Time on a PXI system with a data acquisition board to guarantee "hard" real-time performance under certain conditions. Simply because the system says real-time does not imply that it will be faster. Whether or not the processing can keep up with the signal acquisition is dependent on the speed of the computer processor. However, if the processor is large enough to handle the amount of signal processing, then you can obtain "hard" real-time performance with this configuration. Learn more about real time at ni.com/realtime
Define System Requirements
Now, even understanding the processing definitions and product solutions, you may not be clear on which product to use for your application. The differences between using host-based processing and dedicated processing have become blurred in many applications. The best approach is to look at the requirements of your application, look at how they may affect each other, and then match up what is needed to the available product solutions. We present various system requirements, how they affect each other, and available solutions.
Choose Real-Time, Gap-Free, or Post Processing
Applications can have varying requirements as to when the data should be processed and presented to the user. Some applications require that the data be presented to the user in real time, or "soft" real- time, meaning that the processing is completed as fast or faster than the simultaneously occurring time-domain acquisition. Gap-free processing is often required because it ensures that no data is lost during the acquisition. Both real-time and gap-free processing are possible with dedicated and host-based processing given today’s current solutions. For both solutions, certain parameters or other requirements can change whether or not a solution satisfies the real-time or gap-free criteria.
If real-time or gap-free processing is not an absolute requirement, post processing is a good option. Post processing is most often performed on the computer as host-based processing. This alternative offers greater flexibility in performing custom signal analysis or variations on common analysis routines implemented in dedicated processors. An example of this would be performing a very large FFT or fine resolution octave analysis.
Determine the Number of Channels
When performing measurements requiring signal processing, adding more channels naturally increases the amount of processing that must take place. For instruments using dedicated processors, real-time and gap-free processing are typically guaranteed regardless of the number of channels, unless specified otherwise. For example, using the four-channel NI 4552, which has the dedicated onboard DSP, real-time and gap-free processing is guaranteed with an autopower spectrum regardless of whether you are acquiring 1 or 4 channels simultaneously. A DSP with enough processing power to handle all channels simultaneously is typically designed into the instrument so that channel count does not affect real-time or gap-free performance. The DSP is dedicated to those channels and does not perform other simultaneous operations.
For instruments using the host computer to perform the processing, the situation is different. There is no guarantee that the processor can keep up with an increase in channel count. However, for a computer processor having a speed of 800 MHz on a low-channel count system, it is relatively safe to assume that performance is not greatly compromised by a small increase in channel count.
Decide Frequency Range
Frequency range, or bandwidth, affects the rate at which data is sent to the processor. You can also think of it as sampling rate. The frequency range or bandwidth is usually slightly less than one-half the sampling rate to satisfy the Nyquist criteria. Faster sampling rates cause the data to stream to the processor at faster rates, giving more data to be analyzed in less time. Assume, for instance, that a host-based processing system has two channels and can acquire data gap-free within a frequency range of 80 kHz. If the processor on the computer is relatively slow, then an increase in channel count can affect gap-free performance. A parameter that you can compromise to maintain gap-free performance would be frequency range. You can lower the sampling rate to maintain gap-free performance.
Conclusion
In Part II of "How to Choose Between Dedicated Versus Host-Based Processing", we consider analysis routines, streaming data to disk, data display, and offer quick answers and suggestions to help you determine which is best for your measurement application.
Reader Comments | Submit a comment »
Could use some low-level block diagrams or layouts of possible and/or typical
solutions.
- Michael Westgate, Eastman Kodak Company. michael.westgate@kodak.com - Dec 13, 2001
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
