FPGAs and Automation

Arves Stolpe

Industrial machines are getting complex. I am not saying it was ever an easy task, but today's automation professionals are challenged to increase efficiency and throughput on their systems to stay competitive in today's global economy. One technology that helps meet the high performance and efficiency needs of today's machines is the field-programmable gate array (FPGA).

What Is an FPGA?
An FPGA is a silicon chip that contains a matrix of reconfigurable gate array logic circuitry. Generally, users can program this circuitry using a hardware description language (HDL) although new high-level design tools allow for programming in C or even via graphical interfaces. When an FPGA is programmed, the internal circuitry is connected in a way that creates a hardware implementation of the application defined in the software. In addition, FPGAs are completely reconfigurable and can be recompiled to implement additional functionality whenever necessary.

Reliability
In industrial automation applications, where reliability is essential, there is always a concern about how reliabile a new technology will turn out to be. Processor-based systems often involve an operating system and several layers of abstraction to help schedule tasks and share resources among multiple processes. And in the majority of cases, it is these abstraction layers and drivers that introduce instability to the system. Because FPGAs are a hardware solution, they do not share this architectural challenge. Rather, they provide the same reliability of fixed-function hardware circuitry. As a result, a growing number of critical applications such as plant control, monitoring, vehicle automation, and even biomedical applications are now using FPGAs.

The Move to Multicore
In recent years, you have heard a lot about the move to multicore processors to enable higher performance through parallel processing. Like these processor-based control systems, FPGAs are being used to implement all types of industrial control systems, including analog process control, discrete logic, and batch or control systems based on state machines. However, FPGA-based control systems differ from processor-based systems in some significant ways.

For any given processor core, only one instruction can execute at a time, and processor-based systems are continually at risk of time-critical tasks pre-empting one another, or overwhelming the processor. FPGAs, in contrast, use dedicated hardware for processing commands. FPGA logic executes in a truly parallel manner so different processing operations do not have to compete for the same resources. As a result, the performance of one part of the application is not affected when additional processing is added.

This functionality also makes it possible for multiple control loops to run on a single FPGA device at different rates. For instance, you could use the same FPGA hardware to simultaneously control a servo motor in a PID loop running at 20 kHz, monitor machine health by processing accelerometer data at 50 kHz, and fire triggered solenoids at 10 Hz. Because these operations are truly parallel, they work completely independently within the FPGA fabric.

The Need for Speed
In today's world, everything needs to be faster. For control, this means systems that are more stable, more efficient, easier to tune, and less susceptible to changing conditions and disturbances. For example, in a simple motion application today, the current in a DC motor might change as fast as 1 A/ms in response to a 24 V output from an H-bridge driver. To control the motor current, the control system must sample the current quickly and make frequent adjustments to the actuator output. As a rule, the control loop rate should be at least 10 times faster than the time constant of the system (plant), which puts a very high demand on processor time. Microprocessor-based systems typically offload the motor drive commutation to separate hardware. In contrast, FPGA-based systems can incorporate motion control and motor drive commutation in a single application, which can significantly reduce system and integration costs.

In FPGA-based automation and control applications, speed is limited by the sensors, actuators, and I/O modules rather than the processing performance of the FPGA. An FPGA can process multiple PID control algorithms in 300 ns. There are not many sensors or actuators that can perform at those rates, however, which means that processing ability is no longer the bottleneck with FPGA-based automation systems.

These are only a few benefits of FPGAs in automation applications, so as you are considering your next new application or system update it may be worth your time to take a look at FPGA technology.