Precision Controlling a Gigantic Piston for Oil & Gas Customer

Precision Controlling a Gigantic Piston for Oil & Gas Customer

The application

Everything is larger in Texas, and the pistons used by our Oil and Gas giant were no exception. The application was to control a piston large enough to park a car inside, and our job was to provide the hardware and software to make the system carefully draw in gas, monitor the temperature and pressure during the draw, and then expel the gas through a series of metering devices and characterize their performance. The system used two industrial controllers and no less than 160 inputs and outputs, and was a modernization of a technology that has existed for over 100 years.

The customer asked for a user-interface based to match that old layout but to add the ability to use databases, email or text managers with problems, and to provide on-screen animations of the status of the system. As a result, the systems need to run on Windows... but to achieve the performance requirements that Windows system would have to work with an NI CompactRIO. Yet due to the distance between the operator terminal and the piston, we realized we either need to run dozens of wires, or we should just use TWO CompactRIO systems connected only by Ethernet.

Sensors and Devices

The next challenge were the dozens of extreme high quality sensors, valves, and machined parts that were necessary to make the system operate as desired. Starting with some of the best differential and standard pressure sensors and temperature probes designed for fluid flow, each had to be combined with logic and PID control to manage the position of the piston, and the mix of gas to the customer's specifications.

The piston, for example, was lubricated by 50 gallons of oil which rides on the piston plunger up and down, and a level sensor on the piston monitored the oil levels constantly using several sensors - in fact, if the oil was low, the system pumped in more oil. Yet if the fill sensor failed, the system could overfill with oil and spill oil over the top of the piston onto the floor. As the piston was used, the wiper rings would also push oil to the bottom of the cylinder, and if that wasn't purged periodically the oil could enter the gas valve and ruin it. Thus just the lubrication subsystem alone was a small independent loop consisting of several control and measurement devices.

Precision Controlling a Gigantic Piston for Oil & Gas Customer

Motion Control Challenges

The motion control of the system was one of the most interesting challenges. To meet OSHA safety requirements, the system actually had to run a specified third-party motion controller. That isn't such a challenge for the CompactRIO to interface with a third-party controller, except that the system also used one of the most accurate linear encoders in the world to measure 0.01mm movements over a 20 foot length! Yet this encoder used a protocol that was not compatible with the motion controller, so the coordinated movement done by the CompactRIO had to include closed-loop control input from the encoder and analysis of pressure and temperature in real-time as the Step and Direction signals were sent to the motor driver.

Validation & Safety Concerns

Since that brought up concerns about safety, it was important to verify that the system was operating according to good safety principles and as a hybrid system it had to be inspected by the company's compliance officer. The core of the CompactRIO controller used is an FPGA, programmed in LabVIEW, which allows high-level simplified programming logic to be reduced to VHDL and deployed to the FPGA processor. That in essence results in a non-code solution where the logic is actually converted to gates and flip-flops so that the "code" is actually a deployed circuit. The system also included numerous fail-safe features like overpressure and independent verification measurements which could shut down the system for a number of unexpected conditions. Even the operator terminal had some safety considerations that had to be handled. Altogether, the CompactRIO with it's Real-Time Linux Operating System combined with the FPGA was a solid framework that passed validation testing. And since the products would eventually be used in Europe, the system was put under UL and TUV testing also.


This Mega Piston project was not without its challenges. Yet the system was validated to meet all specifications and installed in location where the floors had to be cut out and the system was installed by a crane through the roof. It was nonetheless very scary to operate as a piston

Featured Posts