Compression Solutions For Test Applications

Innovative compression algorithms can improve today�s high-speed data sampling.

Compression algorithms have enabled many popular applications over the years. We cannot imagine sending e-mail attachments without ZIP lossless compression, downloading Internet audio without MP3 compression, or buying DVDs without MPEG compression. Compression provides a powerful trade-off between the size of an information stream and its quality.

However, test and measurement applications have not yet benefited from compression, primarily because the sampling rates of test and measurement applications�often hundreds of megasamples per second�are much higher than those used for audio and video. At test and measurement sampling rates, no effective lossless or lossy compression algorithm was available.

At first glance, you might think that you could just run a speech, audio, or video compression algorithm much faster. But think again. Compression algorithms for speech, audio, and video achieve their impressive compression ratios by exploiting weaknesses in human hearing and vision. No such weaknesses exist for radar reflections or orthogonal frequency division multiplexing (OFDM)-modulated signals since these signals aren�t meant to be heard by humans like music and movies.

The Limits of Virtual Instruments
Many test and measurement products are implemented using computer technology such as RAM, disk drives, PCI bus, Ethernet, and USB. The reason is simple: Leveraging the economies of scale of the PC industry lowers test and measurement equipment cost. This approach, sometimes called virtual instrumentation or VI, was pioneered by National Instruments, whose LabVIEW software is a leading application for programming all manner of devices for test and measurement applications.

However, VI has its limits:

� Standard computer buses and networks used in VIs have bandwidth limitations. You can�t ask a 32-b, 33-MHz PCI bus to transfer data faster than 132 MB/s. If your data acquisition project needs 200-MS/s capture speeds, you can�t stream your signal across a 32/33 PCI bus to disk. Instead, you�ll have to store your signal capture in a small, expensive snapshot RAM.
� Despite the fact that RAM and disk drive costs are always decreasing, it may be more cost-effective to add compression to test and measurement devices rather than buy more storage. For example, if a high-speed compression IC achieves 2:1 lossless compression for $20 but it costs more than $20 to double your RAM or disk drive capacity, you�re better off using compression.

Be aware that memory expansion for test and measurement products is notoriously expensive. Instead of paying $50 or $100 to upgrade a PCI-based capture or signal generator card, many test and measurement companies charge $250 to $1,000 for doubling your storage.

� As heretical as it might sound, sometimes you just don�t need the full dynamic range or the full bandwidth of test and measurement products. The instrument you select to generate or measure your signal may exceed your required specs. In some instances, you might be satisfied if your data acquisition card could capture 2� to 4� more signal by compressing it during the capture, even if the capture had a little distortion, as long as your final measurement was still correct.

In other instances, including compression in test and measurement devices allows you to get around the built-in VI bandwidth limitation, giving you 2� to 4� more signal bandwidth over a standard PCI bus or Ethernet network.

Theory of Compression
Compression algorithms can be divided into two broad categories: lossless compression and lossy compression. With lossless compression, each compress-decompress cycle generates exactly the same data. Lossless compression is mandatory for many computer data files, such as software applications, documents, or spreadsheets, where the loss of even a single bit causes the file to be useless or, at a minimum, unreliable.

Nearly all lossless compression products that compress computer data use some variant of the Lempel-Ziv-Welch (LZW) algorithm, whose 1984 patent is owned by Unisys. Lossless compression usually achieves compression ratios between 1.5:1 and 3:1 on many text, program, and spreadsheet PC files.

LZW algorithms look for redundancy between ASCII strings. PKzip and WinZIP, commercial implementations of LZW, replace each 11-character string compression with a dictionary pointer to an earlier use of the word compression. If pointers take up fewer bits than a corresponding ASCII character string, then the compressed file will be smaller than the original file.

But many kinds of sampled, real-world data can tolerate and indeed exploit a certain amount of loss where the data after a compress-decompress cycle is not bit-for-bit identical to the original data. In exchange for achieving higher, lossy compression ratios, often 10:1 or greater, you accept data that is similar to but not exactly the same as the original data, hence the term lossy.

The popular MP3 audio compression algorithm compresses digital audio files 10:1. For most sound files and casual listeners, the recovered waveform is audibly indistinguishable from the original audio. The decompressed audio sounds the same, but its audio samples are certainly not the same as the original samples of the source audio file.

Since lossless compression, by definition, generates exactly the same data after a compress-decompress cycle that was input to the compressor, no distortion is introduced. However, because lossy compression generates data that differs to some degree from the original data, we may wonder by how much the decompressed data differs from the original data.

Various metrics have been developed to quantify the amount of distortion introduced by lossy compression algorithms. Most lossy compression methods for speech, audio, and video use subjective human testing to quantify distortion. In these tests, audio and video data is compressed and decompressed at various compression ratios, and human subjects are asked to compare the quality of the original data to the quality of the decompressed data.

In these subjective tests, a mean opinion score (MOS) scale from 1 to 5 often is used, where 5 indicates that the decompressed audio or video is indistinguishable from the original and 1 is really bad. A downside of human testing is that measuring the distortion of speech, audio, image, and video compression is expensive.

How Can Compression Improve Measurements?
Let�s examine four real-world test and measurement problems that are solved by compression solutions.

Biomedical Acoustic Measurements
Figure 1 shows 3,500 samples of an acoustic reflection from a biomedical transducer sampled at 500 MS/s (8 b/sample) using a 32/33 PCI card (132 MB/s). Once a 16-kB buffer is captured in the acquisition card�s snapshot RAM, its data is transferred across the PCI bus to a digital signal processing (DSP) card for measurements.

Figure 1. An Acoustic Reflection Signal From a Biomedical Fluid Processor

The processing bottleneck in this application is the PCI bus. While a 16k buffer is captured in 32 �s and processed by the DSP card in 15 �s, the PCI bus needs 121 �s to transfer the uncompressed data. By adding Samplify compression to the capture card and decompression to the DSP card, the effective PCI bus transfer rate is increased by the compression ratio.

Arbitrary Waveform Generator
Figure 2 shows a two-carrier WCDMA wireless signal whose samples are stored in the RAM of an arbitrary waveform generator (Arb). Unfortunately this Arb can only store 650,000 complex waveform samples, about 2.6 MB or one 10-ms frame, which are played back at 61.44 MS/s.

Figure 2. Comparison of Uncompressed Arb Signal to Lossy Compression of Same Signal at 2:1 and 3:1

However, Samplify lossy compression allows two frames (20 ms) of the signal to be stored in the same 2.6 MB, with a slight degradation in the adjacent channel leakage ratio (ACLR) from 85 dB to 77 dB. When lossy compression is used at 3:1, the ACLR rises to 61 dB, but it still meets the 60 dB ACLR requirement. In this application, decompression allows you to flexibly extend the effective length of a fixed amount of Arb memory.

PCI Waveform Digitizer Card
Figure 3 illustrates a data acquisition card for the PCI bus. In this example, the 32-b, 33-MHz PCI interface limits the PCI stream-to-disk rate to 132 MB/s. The ADC rate of 200 MB/s is too fast to be streamed across the PCI bus. However, if Samplify 2:1 compression is added to the card, the resulting compressed data rate of 100 MB/s supports streaming data captures.

Figure 3. 2:1 Compression Allowing Streaming of 200-MB Data to the 132-MB Interface

Improved FFT Resolution
In aerospace and defense applications, detecting signal peaks above the noise is a common, important operation. As shown in Figure 4, Samplify compression can be used to improve the spectral resolution of discrete Fourier transforms and fast Fourier transforms (FFTs) by increasing the capture depth of snapshot buffers by 2� to 4�. Since the resolution of an FFT equals the sampling rate fs divided by the capture length N, a 2� or 4� longer capture improves spectral resolution by 2� or 4�.

Figure 4. FFT-Based Spectrum Analyzer Waveforms Showing Improved Spectral Resolution by 2� to 4� Using Samplify Compression

As Figure 4 demonstrates, some slight artifacts such as spurs and a small rise in noise floor occur when Samplify lossy compression is applied to these closely spaced pairs of sine waves. However, the closely spaced peaks can clearly be resolved when a 4:1 fixed-rate lossy compression mode is used.

Conclusion
Compression solutions can significantly improve high-speed sampled data applications for test and measurement. Compression can clearly benefit the cost, functionality, and measurement quality of data acquisition and signal generation systems.

References
1. Tuite, D., �Hardware Algorithm Fine-Tunes Converters for Best Compression,� Electronic Design, Sept. 20, 2004.
2. Wegener, A., �Samplify: Compression of Bandlimited A/D and D/A Converter Samples at 100 Msamp/sec,� GSPx Conference, Santa Clara, CA, September 2004.

About the Author
Al Wegener is a DSP systems specialist and inventor with more than 20 years of experience in defense electronics, professional and consumer audio, and wireless systems. Mr. Wegener, who founded Samplify Systems in 1999, holds a B.S.E.E. from Bucknell University, an M.S.C.S. from Stanford University, and nine U.S. patents. Samplify Systems, 229 Corte Madera Rd., Portola Valley, CA 94028, 408-221-1191, e-mail: [email protected]

FOR MORE INFORMATION
on compression solutions
www.rsleads.com/512ee-176

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!