Tuesday, February 17, 2009

Time to Get Real

A Look at Real-Time Data Acquisition
Contributed editorial appearing in
Scientific Computing & Instrumentation 19:7, June 2002, pg. 16.

While engaged in World War II in the early 1940s, the United States Air Force was faced with an important data acquisition problem. Anti-aircraft weapons operators were having difficulty distinguishing between enemy and friendly aircraft. In such life and death situations, “real-time” target identification is paramount. Air Force psychologists set to the task of improving the visual acuity of its airmen developed a machine called the tachistoscope, from the Greek for “extremely swift viewing.” This device flashes images on a screen for a controlled amount of time. Trainees are asked to identify the images as their duration and size are decreased. With training on the tachistoscope, U.S. Navy ship gunners reportedly could identify aircraft with 100 percent accuracy after viewing a tiny silhouette for as little as 100 milliseconds.

This type of training increases the data-acquisition and analysis speed of the gunners. Additional research into visual perception rates led to the Evelyn Wood Reading Dynamics Program introduced in 1958. This “speed reading” course sought to increase both reading speed and comprehension by training the eye to recognize groups of words and phrases on sight instead of audiblizing groups of letters and syllables. Increased reading and data-acquisition speed is almost always helpful. However, it does not address the issue of multidimensionality.

Imagine our gunner is confronted with five enemy targets simultaneously and they differ in airspeed and firepower. Rapid identification is essential. However, the targets must be prioritized according to threat level. We all face a similar dilemma when we approach our in-box full of email, reports, articles, advertisements, and trade journals. There is not enough time in the day to read everything, regardless of how fast our reading speed; so we must prioritize. Dr. Phyllis Mindell developed a system known as “Power Reading” in the 1980s that emphasizes sorting and prioritization over raw reading speed. Printed material is scanned and ranked in order of importance with the highest priority flagged for critical “deep reading” while the least is placed in the circular file.

The same is true of “real-time” data acquisition (DAQ) systems that monitor and analyze multiple streams of data from distributed sensors. A simple prioritization scheme can be employed if the data is slow and periodic. For example, signals from a group of thermocouples can be read in succession with equal priority. If a small transient value is present at one of the thermocouples while another is being read, this data is lost but has little effect on the overall temperature history being recorded. Similar time-sensitive low frequency applications having no dire consequences for missed transient data are classified as “soft real-time.” Conversely, “hard real-time” acquisition systems such as automated flight control may become unstable or fail if measurements are not made and processed in a timely fashion.

Many acquisition systems are a combination of soft, hard, periodic, and random real-time signals. A priority must be assigned to each event so the DAQ system can respond to every critical signal before its specified deadline. Early versions of the Microsoft Windows (Win) and Macintosh (Mac) Operating Systems (OSs) responded to multiple tasks using a process known as “cooperative” multitasking, wherein each task voluntarily yielded processor time to other applications. Printer drivers were notorious for “freezing up” the computer until an entire document was printed. Modern versions of the Win and Mac OSs utilize preemptive multitasking in an effort to curtail selfish programs, but fall short of being real-time operating systems (RTOS). A true RTOS utilizes a combination of process priority and duration to optimize the dynamic schedule of operation and guarantee a worst case response time or “latency.” RTOS latency increases with sensor density.

An obvious solution is to increase the number of processors utilized by the system. Commercial DAQ cards available for the Win and Mac OSs can be billed as “real-time” by incorporating a dedicated microprocessor into the DAQ circuitry. Acquisition schedules and analysis routines are uploaded into the microprocessor and the DAQ card collects data independent of the computer OS and continues to operate even if the main OS fails or “hangs-up.” As “measurement bureaucracy” is reduced through local control, research continues into real-time sensor distribution algorithms facilitating “on-the-fly” upgrades and dynamic configuration changes.
blog comments powered by Disqus