Smart Grid
NI Links
| Boost Your PLC System: FPGA Programming |
|
|
|
This article is part of the 7 Ways to Boost Your PLC System white paper series.
FPGAs Are Programmable Chips with the Reliability and Performance of Custom HardwareProgrammable logic controllers (PLCs) are a mainstay for industrial process control and automation applications. They are low-cost, reliable, easy to use, and have been proven with years of successful operation. Their discrete analog and digital I/O features and ability to close control loops in the hundreds-of-hertz range meet many application needs. Unfortunately, not all applications easily fit into these constraints. Many new approaches to machine building have necessitated higher-performance controllers with innovative architectures. NI CompactRIO is a PAC that combines the real-time computing power of a computer with the reliability and flexibility of a field-programmable gate array (FPGA). The FPGA portion of the RIO architecture enables three core benefits over traditional control systems: high-performance parallel processing, custom hardware flexibility, and hardware logic reliability.
Figure 1. You can program the FPGA at the core of CompactRIO with custom logic or algorithms. Running advanced algorithms, such as field-oriented control (FOC) for brushless DC motors, can reduce power consumption and increase the life of components. These control algorithm advances are making machines more efficient, but often the algorithms need too much computational power to run on a PLC. For example, an FOC controller must continuously compute the vector control algorithm at a rate of 10 to 100 kHz. In parallel with the control algorithm, additional intellectual property (IP) blocks such as the high-speed PWM outputs need to execute without affecting the timing of the control algorithm. With their inherent parallel execution, FPGAs are able to perform control algorithms with loop rates up to hundreds of kilohertz, with room left over to handle multiple axis control algorithms, data communication for a human machine interface (HMI), or interaction with a host microprocessor. Moreover, with the reconfigurable nature of FPGAs, you can adjust the control algorithm whenever necessary.
Figure 2. You can push control loop rates to greater than 100 kHz when you deploy them directly to the FPGA on CompactRIO. Advanced, high-speed control algorithms are not the only reason to consider adding an FPGA-based PAC to your PLC system. You can also use the programmable FPGA to implement custom logic for timing or triggering or communication protocols to talk to nearly any sensor or actuator. For example, with rotating machinery, you can determine the health of bearings and gears and other mechanical components by monitoring and analyzing the amplitude and frequency components of machine vibration. Because the FPGA on CompactRIO is strategically placed between the I/O modules and the high-level real-time controller, it can enable data reduction and reduce the processing load on the processor by resampling, filtering, or preprocessing the I/O data as it is acquired. The FPGA can also fill the gap between the PAC and any sensor that needs a custom digital communication protocol.
Figure 3. National Instruments provides hundreds of processing blocks for inline data analysis and signal processing. FPGA-based analysis is deterministic and frees up the real-time processor for higher-level tasks such as data logging or communication. Finally, because the logic programmed onto the FPGA is compiled directly into hardware circuitry, it has the reliability of physical logic gates connected directly to your control system. The FPGA is not subject to memory leaks, multithread priority inversion, or other problems that plague OS-based controllers. The FPGA is an ideal spot to place safety logic or stimulus/response logic that requires submicrosecond response time. Case Study: Using CompactRIO for Increased Production Throughput and Welding QualityC L Consulting SPRL in Bolivia needed to improve the rolling mill production process in outdated mills across Europe to prevent breakage as two sheets of metal are welded at the start of a production line. Welding the sheets together enables continuous processing, but a faulty weld can result in breakage inside the mill and up to 72 hours of downtime as the broken strips are removed from the mill, recoiled, and fed back through the machines. Needless to say, the automated welding process quality was critical in the overall efficiency of the rolling mill. Figure 4. C L Consulting SPRL was able to improve rolling mill production throughput with better control of the coil welding process using LabVIEW and CompactRIO. C L Consulting SPRL chose CompactRIO for the welding controller. The company used the FPGA to implement the fast control of the resistance welder and hydraulic clamps for the sheets of metal. The current in the resistance welder must also be synchronized with the power grid so that the welder is turned on and off only on the zero crossing of the input power waveform or the thyristors could be damaged and the general power grid affected. With FPGA, C L Consulting SPRL was able to synchronize the welder to within 10 ns of the correct switching time using FPGA-based filters on the incoming power signal to remove the high-frequency harmonics and disturbances that were already present on the company's power grid. Overall, the new control system from C L Consulting SPRL was able to reduce metal weld strip breakage from 2 percent in older factories to around 0.05 percent using CompactRIO, improving production throughput significantly. Additional Case Studies
|








