Extending USB to Time-Critical Applications

Rack-based systems such as VXI and PXI have long been the mainstay of data acquisition and control systems. Due to the need for greater flexibility and reduced cost of ownership, there is a trend away from the bulky and expensive centralized rack-based architecture toward a portable platform based on the PC, with connectivity and expansion provided through the Universal Serial Bus (USB) interface. Although USB is the most popular external PC interface, dominating the peripheral connectivity market, its lack of determinism has prevented its wider application. Until now.

USB Basics

USB was collaboratively designed by a consortium of industry leaders as the next-generation connectivity interface for the PC. USB did not need to be compatible with legacy interfaces and was therefore optimized for ease of use, reliability, speed, and flexibility while cost of ownership was kept to a minimum.

Designed as a true plug-and-play interface, USB automatically connects multiple devices of different types from different manufacturers and seamlessly controls their enumeration and configuration. Because it is a hot-swap interface you can connect devices on the fly without needing to turn off the computer.

USB is an "asynchronous" bus that allows multiple devices to sequentially interact with the host PC. The nature of the USB protocol prevents devices from interacting with each other in a deterministic way. As a consequence, USB by itself has a very limited capacity to synchronize events or processes on multiple devices and has no provision for providing accurate timing information to multiple devices. Within the standard USB framework there is no ability to provide synchronous real-time control or data acquisition which means that deployment of USB in real-world test, measurement, and automation applications has been limited to single device data-uploading.

A New Twist on USB

USB-inSync technology has been developed to transform USB into a synchronous, deterministic, and expandable control platform. Think of it as an extension to USB that combines the widespread compatibility features of USB with the advanced timing and software features required for an industrial PC I/O communication platform. USB-inSync devices are USB-compatible and possess all the standard connectivity characteristics of USB in addition to accurate synchronization and deterministic timing capabilities. The technology lets you turn your PC into a highly deterministic distributed control platform, enabling the development of synchronized systems for distributed test and measurement, data acquisition, automation, and manufacturing applications.

Synchronization and Determinism

Each USB-inSync device is equipped with a local clock that is accurately phase-locked to that of every other USB-inSync device attached to a given host PC. A deterministic triggering system enables processes to be started and stopped in a precisely controlled manner. The onboard FPGA in each device executes the system triggering while distribution is accomplished via the synchronous clocks; the whole is controlled by software on the host PC.

In passive USB-inSync (so-called because the devices automatically lock to each other without needing any additional equipment), all local device clocks are passively synchronized to within ±5 ns of each other when connected to a common expansion hub (Figure 1). Up to seven USB-inSync devices can be passively locked to within ±5 ns of each other by attaching them all to a generic USB expansion hub.

Figure 1. Passive USB-inSync
Figure 1. Passive USB-inSync

Although all USB-inSync devices automatically lock their clocks together in frequency, there may be a small phase offset between clocks when the devices are located at different points along the USB connection tree. The phase offset for a typical highly distributed passive configuration is on the order of 100 ns.

Some people require much tighter timing capabilities than this. USB-inSync can actively compensate for these phase offsets and synchronize all clocks to within ±5 ns regardless of their connection location. This is called active USB-inSync and it uses a USB-inSync master hub to measure and compensate for the clock phase offset of each device (Figure 2). This is all done through the standard USB protocol and does not affect the operation of other normal USB devices, such as a mouse or a printer.

Figure 2. Active phase compensation
Figure 2. Active phase compensation

Notice in Figure 2 that only one USB-inSync master hub is depicted. The master hub operates as a timing controller to phase-align all device clocks, regardless of the number of standard USB expansion hubs used. This phase correction process occurs automatically during the device enumeration process and is repeated each time a new device is connected to the system, maintaining accuracy while preserving USB's hot-swap capability. As soon as the host PC's Windows 2000 or XP operating system recognizes the device, it is available for synchronous operation.

The system can be tied to an external reference clock signal of known accuracy to provide a reference clocking signal that can then be distributed around the plant. This enables you to specify the absolute accuracy of your own clock reference (perhaps accurate to 1 ppm). All USB-inSync clocks will then lock to the supplied frequency.

Deterministic control of multiple devices is achieved by harnessing structures that are already present in the USB, but by using them in new ways. Command sequences are queued within the separate devices and executed upon receipt of specific data structures that are broadcast to all devices. Those data sequences are also phase compensated to ensure trigger accuracy of ±5 ns across the system.

Distributed Synchronous Advantages

Existing architectures have limited expansion that is normally dictated by the number of bays in the mainframe chassis. Once the chassis is full, synchronous expansion can become very difficult. For instance, if you have 16 inputs attached to your 16-channel data acquisition device you can't expand unless you buy a 32-channel device. With USB-inSync you simply add another 16-channel device and synchronization is automatic.

A centralized architecture may result in many hundreds of control lines for a moderate-sized plant. Cabling looms can be expensive to install and maintain and the many mechanical connections can introduce possible signal integrity issues. USB-inSync can often reduce these large cabling looms to a single USB cable. The USB-inSync device then provides the "branching point" somewhere within the plant where multiplexed digital commands are deterministically routed to the many local control signals required in a given installation.

Distribution of the test equipment can also reduce unwanted noise. A centralized measurement system results in signal wires being fed back from distant equipment. This is far from ideal, and sensitive measurements can be polluted with noise from nearby machinery. When a USB-inSync data acquisition unit is placed next to the signal source on the factory floor, it synchronously acquires data and then transfers the results back to the central PC through the noise-immune and error-corrected digital USB interface.

The Limits of USB-inSync

One of the main drawbacks of USB is the limited range of the interface. USB was designed primarily as a desktop interface with a maximum range of 30 m from the PC. This means that, in principle, a USB-inSync synchronous network is limited to a circle with a radius of 30 m. Numerous methods have been developed to increase the range of USB to well over 120 m and some of these may also be applicable to USB-inSync.

Another limitation of USB is the number of devices that can be attached. The USB specification defines a total of 127 discrete devices that may be attached to the bus. This includes expansion hubs; in practice, almost 100 usable devices can be attached. New technology under development allows synchronization of multiple PCs, which effectively means that an unlimited number of devices can be used in a synchronized system.

Perhaps the most significant drawback to USB-inSync, and in fact any USB implementation, is the control loop time. Rack-based systems contain a locally embedded PC. While this adds significant cost, the high-speed local PC bus enables rapid signal detection of an external stimulus by one plug-in unit and response through another plug-in. By contrast, any USB system is a polled system. This means that the host must first ask if the first distributed device has received external stimulus, process the signal, and send a response to another unit. This would usually take several tens of milliseconds processing time, but in a Microsoft Windows environment there is no guarantee that the transaction would be completed within even a few hundred milliseconds. This situation applies only to stimulus and response on two discrete modules—any one module can be programmed to react almost instantaneously to a given response.

Development and Applications

Fiberbyte, the inventor of USB-inSync, was established to develop PC-controlled high-performance test and measurement equipment (e.g., power meters, tunable lasers, broadband light sources, and optical switches) for the fiber-optic industry.

In choosing a communication bus to interface between the computer and test equipment modules, Fiberbyte engineers faced a big challenge. Existing PC communication buses were at least twenty years old and weren't suitable for truly modular equipment. Newer buses didn't support multiple device control in a deterministic manner. USB offered several advantages over other, newer buses: plug-and-play operation, high-speed error-free data transfer, very low cost, self-power, low memory or CPU demands, and multiple device operation. USB was also the most widely used port on the computer, which guaranteed a long product life-cycle.

By adding deterministic timing and multiple device control to USB to create USB-inSync, Fiberbyte could offer a modular suite of optical test equipment which was computer controlled via a standard USB port. Each piece of test equipment operated in real time and synchronized with other USB-inSync devices as they were added to the system.

Fiberbyte is now leveraging USB-inSync to create a modular suite of data acquisition and triggering control products for system developers, engineers, and researchers to use in applications where determinism, multiple devices, and PC control are desirable.

Laser Processing. One potential application is distributed timing in industrial-scale laser processing. This technique is commonly used to grow silicon wafers and to manipulate substrates at a molecular level for various material sciences. Laser processing involves more than a dozen independent laser systems, each of which must be synchronized with the delivery of material into a series of high vacuum chambers. Each of the pulsed lasers must be coordinated such that their beams are either combined or sequenced into the interaction chamber.

Because measurement synchronization and sensitivity are paramount in this pump-probe laser application, data acquisition must take place as close as possible to the sensors placed throughout the experimental setup, both to reduce interference from the noisy plant and to increase the SNR. Time-based triggers and time-stamped synchronized measurements ensure that data can be postprocessed while the controllers require no real-time code.

Sometimes an event on one piece of equipment must trigger actions in other pieces of equipment. In a conventional distributed system, the subsequent event-based trigger signal must be issued to each of the distributed devices, usually through a dedicated trigger system. The time-based approach provided by USB-inSync allows the first device to detect the event and then configure all other devices to respond at a predetermined "time." These time-triggers are passed through normal USB communication channels and each of the distributed devices executes its commands at the appointed time—synchronously.

Motion Control. Motion control is another application for a highly distributed synchronous system. In a distributed motion system employing many conveyors and actuators, mechanical connections between the various subsystems ensure coordinated operation. Such systems are mechanically inefficient, losing energy in the various bearings and transports. Failure of a mechanical linkage may also result in downtime until replacement linkages can be commissioned. A system of distributed synchronous motor controllers, with each device operating from a synchronous clock with time-based control sequences, enables distributed motion control.

In Conclusion

The consumer USB port, available on every PC and laptop, has been transformed into a high-bandwidth, synchronous, and distributed instrumentation bus. USB-inSync offers the synchronous and deterministic accuracy of rack-based systems such as PXI but in a distributed, PC-based format, able to perform complex sequenced functions and provide reliable real-time data across a distributed environment.

Peter Foster, PhD, can be reached at Fiberbyte Pty Ltd, Adelaide, South Australia; pfoster@fiberbyte.com.

Chris Svensrud, BS , can be reached at Fiberbyte, San Francisco, CA; 415-543-6859, us_sales@fiberbyte.com, www.fiberbyte.com.