'Fuzzy logic' system enhances pumping unit's engine operation

April 27, 1998
A "fuzzy logic" system was implemented on an oil-pumping station in Colombia to enhance the operation of diesel engines used to power a complete set of crude-oil pumps. The diesel engines burn a portion of the produced crude oil as fuel. This intelligent system emulates the operator's reasoning to diagnose operating conditions, evaluate conditions leading to an imminent shutdown or a mechanical failure, and decide upon action to keep crude-oil pumps running under optimal and safe conditions.
Jesús A. Dom!nguez
Zeus Technologies
Weston, Fla.

Carlos Nieto
Occidental de Colombia

A "fuzzy logic" system was implemented on an oil-pumping station in Colombia to enhance the operation of diesel engines used to power a complete set of crude-oil pumps. The diesel engines burn a portion of the produced crude oil as fuel.

This intelligent system emulates the operator's reasoning to diagnose operating conditions, evaluate conditions leading to an imminent shutdown or a mechanical failure, and decide upon action to keep crude-oil pumps running under optimal and safe conditions.

The system has enhanced engine operation by overcoming external constraints such as high ambient temperatures, avoiding unnecessary shutdowns, and readily detecting mechanical failures.

The pumping station is in the Cano Limón crude-oil field operated by Occidental de Colombia (subsidiary of Occidental Petroleum Corp.) in association with state-owned oil company Empresa Colombiana de Petroleos (Ecopetrol) and Shell Colombia.

Four similar intermediate pumping stations are located along the 800-km pipeline that reaches 2,800 m of differential elevation.

Each crude-oil-burning diesel engine in the pumping station is an Allen type, has six cylinders, and powers the respective pump via a 1:6 speed magnifier to deliver to the pipeline 240,000 b/d of crude oil at 2,000 psi (Fig. 1 [56,561 bytes]).

Process automation, control

Operation variables of the engine (lube oil and combustion-gas temperatures in each cylinder, cooling-water temperature, lube-oil pressure, inlet-air temperature, lube-oil temperature in turbo, vibration, and external temperature) are acquired by a Mistic PLC to perform a PID control on the speed (rpm) of the engine.

Visualization of these variables and of the entry setting of the speed setpoint is performed on the PC side via a man-machine interface built in Paragon TNT under Windows NT.

Through this man-machine interface, the operator supervises the entire process, starts up and shuts down the engine, and sets the setpoints for each engine speed based on the crude-oil production target.

Previously, the action to avoid shutdown in any of the five engines relied entirely on the alertness and judgment of the operator. There was no quantitative indication of how far from, or how close to, shutdown was the process.

The operator had to decrease the setpoint of the engine speed manually to reduce its value and force the conditions of the variable or variables causing the alarm status to drop below alarm limits. Once the alarm status disappeared, the operator had to decide the right time to put the setpoint back to its original target value which had triggered the alarm.

Most of the variables acquired by the Mistic PLC have their alarm and shutdown limit values. These limits constrain the operational range at which the engine can run without intervention of the operator to avoid an imminent shutdown.

The engine outside conditions, especially ambient temperature, have a significant effect on the operating conditions of the engine by increasing their values toward the alarm and shutdown limits. These conditions remain throughout the entire year; the ambient temperature can be as high as 102° F., making the engine outside temperature as high as 125° F.

One concern on the operation of the engine was the inability to shut down the engine as soon as a mechanical failure starts in any of the key engine parts such as cylinders, connecting rods, crankshaft, pistons, and piston rings. Mechanical failure of one key part usually leads to major damage in the engine if the shutdown is not promptly triggered.

"Fuzzy logic" alternative

"Fuzzy logic" systems are based on "fuzzy set" theory 1 which generalizes binary logic to include imprecise, vague, and ambiguous concepts-hence, "fuzzy."

Fuzzy logic extends the concept of binary states "True" and "False" to include a broad spectrum of possible states in between such as "usually" or "sometimes." The principal advantage of fuzzy-logic systems is that they are not model-based and can incorporate human heuristics (that is, how humans learn).

Up to now, probability was the only uncertainty with which mathematics had worked. Fuzziness expresses lexical uncertainty: a much more general uncertainty than probability because it expresses the uncertainty that is part of the meanings of words.

Probability models an uncertainty of whether a certain event will take place; lexical uncertainty deals with the uncertainty of the definition of the event itself. Probability theory cannot be used because the combination of subjective categories in human decision processes does not follow probability's axioms.2

A fuzzy-logic system was implemented to enhance engine operation, overcome external constraints (such as high ambient temperatures), avoid unnecessary shutdowns, and readily detect mechanical failures.

The intelligent system implemented in the Cano Limón crude-oil field has proven to be the right alternative as most of the corrective actions are based not only on human operator's experience but also on the imprecise detection of an incipient mechanical failure.

The rules and fuzzy sets were built both through qualitative analysis of historical data and testimonials from operators and engineers describing how they manually handled different operational events.

Fuzzy-logic strategy

The fuzzy-logic system monitors and quantifies the proximity of the variable values to their shutdown limits and takes action to reduce temporarily the engine-speed setpoint (set originally by the operator) if one or more variables approaches shutdown.

This reduction of setpoint is set to the minimum possible value to keep the pumping process at the target rate. If necessary, the system can decide to go deeper in reducing the speed setpoint as the operation conditions near shutdown.

Based on the diagnosis of the existing conditions, the fuzzy-logic system also can decide when it is appropriate to resume the operator's setpoint. Fig. 2 [123,197 bytes] shows a case on the Colombian installation in which the system temporarily reduced the operator's setpoint from 736 to 731 rpm as the lube-oil temperature in one cylinder was approaching shutdown.

After 50 min, the diagnosis led to resumption of the operator's target of 736 rpm.

The outside conditions, especially ambient temperature, have a significant effect on all operating variables, increasing their values as the ambient temperature increases. Fig. 3 [141,889 bytes] shows the outside temperature against, respectively, the lube-oil temperature in the cylinders (Fig. 3a) and cooling-water temperature in the cylinder jacket (Fig. 3b).

The fuzzy-logic system takes into consideration this effect and dynamically sets the alarm and shutdown limits of the lube-oil temperature in the cylinders as shown in Fig. 4 [107,882 bytes].

These limits generated by the fuzzy-logic system are higher than the original fixed ones at high ambient temperature but lower at low ambient temperature. The dielectric properties of the lube oil remain intact up to 235° F.; the original shutdown limits were fixed up to 215° F. The fuzzy-control system dynamically sets the shutdown limits, which are based on the external conditions, up to 220° F.

A measurement that may indirectly indicate a mechanical failure of an engine part is the temperature of the lube oil in the cylinders. Apparently having fixed shutdown limits would be enough to protect the engine. The problem is that those fixed original alarm/shutdown limit values were set to the highest possible values.

If the mechanical failure occurs early in the morning when the lube-oil temperature has its lowest value (because the engine outside temperature also reaches its lowest value), when the temperature value reaches the shutdown limit, it would be too late to shut down the engine and mitigate the mechanical damage.

The fuzzy logic system tackles these problems with two approaches:

  • The shutdown limit is now variable and more realistic: Early in the morning, the limit is usually much lower because the outside temperature is also lower. If a mechanical failure occurs, the engine will be shut down much earlier than with a fixed and high shutdown limit.

  • Once the mechanical failure occurs, the lube-oil temperature in one or more cylinders changes drastically. To detect a mechanical failure on the spot, the fuzzy-logic system also has a data-analysis module that gathers, in real time, the trend of the lube-oil temperature in each cylinder and shuts down the engine if this trend "implies" a mechanical failure.

Built and installed

A fuzzy-logic system prototype was originally built with Cubical package under Windows NT. This package allows the user to formulate the rules and fuzzy sets as well as run a prototype of the process using actual log data files as data input. After testing of the prototype, a final coded version of the application in C computer language is generated.

The PC man-machine interface built via Paragon TNT allows the programmer to run executable files written in C++, C, or Visual Basic in multitasking mode with the other programs involved in the execution of the man-machine interface.

The executable file is actually a Client Object Interface (COI) file that uses a compiler binder to get the executable file. The COI provides an object-oriented structure to access the process variables defined in the Paragon TNT man-machine interface and read from the Mistic PLC.

Fig. 5 [110,032 bytes] shows the relation of the fuzzy-logic system with all other hardware/software components of the pumping station. The fuzzy-logic program is the result of linking the libraries in C code provided by Cubical and TNT, the fuzzy-logic C application files generated by Cubical Windows program, and the proprietary main driver written in C.

The fuzzy-logic system installed in the Cano Limón crude-oil field has enhanced the operation of diesel engines used to power a pumping station. This system uses the capability of handling uncertainty and the operator's experience to supervise the engine operation and keep it running within safe operation conditions.

The number of engine shutdowns has been reduced by 96%. Manual intervention to control the operation has been practically eliminated. Another benefit is the immediate malfunction detection of peripheral equipment.

A similar fuzzy logic system is already in operation to optimize the power generation of two more stations that use diesel engines and crude oil as fuel to generate 42 mw, most of the power needed in the Cano Limón crude oil field.


  1. Zadeh, L.A., "Fuzzy Sets," Information and Control, Vol. 8 (1965).
  2. Altrock, C.V., Fuzzy Logic & NeuroFuzzy Applications Explained, Prentice Hall, p. 11.

The Authors

Jesús A. Dom!nguez is managing director and founder of Zeus Technologies, a division of Zeus Group Inc., Fort Lauderdale, Fla. Previously, he worked 9 years in research and development at the BOC Group Technical Center, Murray Hill, N.J.
Dom!nguez holds a BS in chemical engineering from Universidad del Valle, Cali, Colombia, an MS in chemical engineering from City University of New York, and an MS in computer science from Stevens Institute of Technology, Hoboken, N.J.
Carlos Nieto joined Occidental De Colombia Inc. in 1985 as a maintenance supervisor. In 1994, he was promoted to maintenance and construction manager. He holds a BS in mechanical engineering from the Santander Industrial University (1966).

Copyright 1998 Oil & Gas Journal. All Rights Reserved.