A guide to the methodology of signal capture and generation from MHz to GHz
DataQuest Solutions have built up years of experience related to the requirements for ultra high-speed signal capture and waveform generation. Our customers look to us to provide PC instrumentation cards, most usually for an installation inside a PC, but also the industrial chassis. We also offer a complete solution with cards and software installed. To capture or generate signals at MHz and GHz speeds need not be a complicated process, certainly no more complicated than at slower sampling speeds, however it does bring with it extra considerations. What follows now is an explanation of these for someone new to this field, or for a person who wishes for an update as to the associated technology.
When using analogue to digital (A/D) conversion the binary data that represents the captured signal needs to be transferred, stored and processed. With a large enough memory on the card, data can simply be stored on that hardware until signal capture is complete. The data can then be processed after transfer to the host computer. In this situation the transfer speed is less critical unless one capture period is to follow very shortly after another. The second alternative is to stream directly to the computer, but this requires careful consideration as to the bandwidth limitations of the computer's interface with the card. This applies equally to where the programmer needs to do the reverse (i.e. generate a waveform), or indeed when using a digital I/O card and thus work with logic signals. Streaming data associated with relatively low sampling speeds of a few MHz is well within the capabilities of many types of interface including USB; however once the waveform frequency dictates that sampling needs to be faster, then hardware with and internal computer fitment is the most commonly used and effective interface. This interface is of the type that will be considered here.
Data exchange with the computer
DataQuest Solutions tackles the demands of very high-speed data transmission with the PC by using a range of "Spectrum" instrumentation cards which is suitable for the PCI-Express and PXI-Express slot interfaces. PCI-Express currently offers the greatest opportunity in terms of higher speeds for new applications, indeed with our Spectrum range of cards PCIe provides the advantage of allowing multiple cards to be used in the same PC without having to share available motherboard transfer bus bandwidth. Data transfer is by serial communication, however many of these communication lanes can be placed in parallel to increase overall transfer performance.
Click here for more information about the PCI-Express interface.
PCI-Express should not be confused with old PCI and PCI-X interface it replaced. PCI and PCI-X use purely a parallel communications bus which is rare now on computer motherboards. PCI and PCI-X are also slower and multiple cards have to share the available bandwidth. The ability of the chosen slot interface to have sufficient bandwidth is an important point to investigate. Here are some typical transmission speeds for the Spectrum range of cards:
PCIe (eight lane): 3 giga bytes/sec. (digitiser), 2 giga bytes/sec. (waveform generator)
Note these are not the theoretical maximums, which are higher, but takes into effect the current interface chip performance and system overheads.
To calculate how much bus bandwidth your application will require, start by deciding the number of samples per second you wish to record, then note your preferred cards A/D or D/A converter resolution. For example to digitise a waveform with an 8 bit (1 byte) converter at 100 mega samples per second, a quick estimate of the bus transfer bandwidth is simply:
At the risk of complicating things a little, in the computer world one million bytes is usually referred to as a mega byte and can be interpreted as having two values; 1,000,000 bytes, or 1,048,576 bytes
The answer is that computers work in binary and multiples thereof, so the computer mega byte is 202, which = 1024*1024 bytes, which = 1,048,576 bytes!
So if we use the computer's mega byte and modify the earlier calculation; (sample rate * converter bytes) / 1048576 we get:
In reality the first (simpler) method is fine for most scenarios, as it gives a safety margin as to how much bandwidth the interface can handle.
Logically a 16 bit converter (2 bytes) would double the resulting bandwidth and it is the same for the 12 bit or 14 bit converter, as these too need a 16 bit "word" to hold the complete digitised value. A bandwidth of around 100 mega bytes per second is well within the bandwidth capabilities of all interface types. It is important to note that the above presumes constant streaming. It could be that all the data can fit into the cards on-board memory in which case the sampling rate can be as fast as desired, or the programmer simply set the card to capture in bursts, controlled by a repeating trigger (e,g, an external repeating pulse). These triggers can be very close together as the Spectrum range of cards can rearm very quickly. These times are shown in the relevant datasheets and relate to a mode called Multiple Recording
When data is transferred to or from a card using one the interfaces just mentioned, one of the problems is coping with the temporary effects of PC operating system "housekeeping", where it grabs priority over the card data transfer. To handle this, memory installed on the cards is used as a temporary FIFO (First In First Out) buffer, so that if a brief interruption does occur during data transfer with the PC, no loss of data will occur. This FIFO buffer holds the extra data until the card has full access again to the PC bus and memory again.
Signal capture and data transfer route to PC RAM and computer drive.
|DataQuest Solutions Ltd. | Phone: 01526 557171 | Email: email@example.com|
Images courtesy of Spectrum Instrumentaqtion GmbH and modified for this article
Labview, DASYlab and LabWindows/CVI are trademarks of the National Instruments Corporation
MATLAB is a trademark of the MathWorks Corporation
© DataQuest Solutions 30.01.08. Updated 11.02.22