120

What AI Can Do for You

Nov. 1, 2002
Artificial intelligence software improves, but successful use depends on communications, building a database, and a good model

Solving complicated control problems can sometimes can give you a headache, often accompanied by stomach upset. While most control problems can be solved without contacting a doctor (an engineering or science Ph.D. in this case), some tenaciously resist resolution. The engineer hopes the problem will just go away, but when it doesn't or when the process pain becomes too great it may be time to call in the artificial intelligence (AI) experts.

Like a doctor visit, these interactions with AI Ph.D.s and other experts can take a long time and be somewhat unpleasant. But the final result can be like applying the perfect cure to a nagging ailment. The problem is solved, the pain is gone, and everyone is happy. Sometimes the AI doctor is the only person who can solve the problem.

AI experts know control engineers are sometimes reluctant to implement their solutions. Much of this reluctance is because AI solutions have a reputation for being difficult to implement. AI vendors are striving to make AI easy, and progress is being made.

AI Defined

How is AI defined with respect to control? Here are some opinions. "I'd define AI as any of the class of computational techniques that have been developed in the past 20 years that attempt to mimic human-like inference, reasoning, prediction, and/or logic," says Russ Rhinehart, Bartlett Chair and head of the school of chemical engineering at Oklahoma State University in Stillwater. "AI solutions include expert systems, neural networks, fuzzy logic, nonlinear modeling, adaptive controllers, genetic algorithms, and their hybrid combinations with these and other established technologies such as statistical process control and model predictive control."

Another Ph.D., Eric Hartman, co-founder of Pavilion Technologies (http://www.pavtech.com), provides a real-world example of how AI solves complex problems. "Imagine describing the geometrical relationships between pixels that discriminate between letters," says Hartman. "Try to imagine writing down all of the possible relationships between the pixels that distinguish various versions of an 'a' from an 'o' or a 'd.' Humans can recognize handwritten characters with tremendous variations in style,variations that make formulating rules that are as successful as humans virtually impossible."

A neural network approaches the handwriting recognition problem in a different manner. "Instead of formulating rules by hand, one collects a set of examples of handwritten characters (the more the better), and uses them to train a network. The network learns by example, as humans do," Hartman says. "The inputs are some representation of the light and dark pixels for each character (analogous to the input to the eye), and the output is one of the 26 correct characters."

As with most control problems, there are various inputs that generate specific outputs based on a model. "The environment is represented by a set of data in the form of input-output pairs," explains Hartman. "Input examples are presented to the network, and the learning algorithm adjusts the weights to make the network's output match the data [the correct letter, in the handwritten character example]."

The power of neural networks is not evident because a PLC could accomplish the same task by means of a simple look-up table. The neural network goes beyond this and is able to infer answers.

"The value of a well-trained network is that it can return the correct output when presented with a novel input example that was not part of the training data," adds Hartman. "This ability is called generalization, as in generalizing from examples. Mathematically, it corresponds to interpolation."

The network can continue to learn and become more powerful as it is presented with more and more input examples. The question for a user is how closely to supervise the learning process. If the model gives the wrong output for an input example, learning could begin to proceed in the wrong direction. This is one reason why some AI solutions require close user supervision.

This example is a simplification of how AI works, and many implementations are much more complex. This complexity is often not fully appreciated by practitioners. Hartman references David Rumelhart, a Ph.D. in mathematical psychology, and the name behind an annual $100,000 prize given annually for contributions to the formal analysis of human cognition. During the past 10 years, Rumelhart has concentrated his work on the development of neurally inspired computational architectures.

"Rumelhart suggested the sharp corners of the threshold function simply be smoothed into a sigmoid, and the chain rule of elementary calculus be used to give the weight update rule in multilayer nets," says Hartman. "With differentiable 'transfer functions' [sigmoids instead of threshold units], the gradients of the objective function can readily be computed."

Got that? Perhaps the most telling part of this explanation is Hartman's add-on comment, "Such a simple idea in retrospect!"

So clearly, one of the challenges for AI Ph.D.s is to embed these complex algorithms in software that is easy to understand and implement.

AI Evolves

AI has advanced to the point where it is being implemented by end users to solve difficult control problems particularly in the process industries. Today's AI market is probably where the HMI market was in late 1980s.

HMI pioneers such as Intellution and Wonderware were trying to establish market position in the late 1980s and early '90s. Larger companies were wary of the technology and users were not sure how to proceed. Various incompatible HMI operating systems such as DOS, O/S2, and Windows complicated matters.

Windows eventually became the de facto operating system standard, and HMIs were accepted throughout the industry. All of the large automation firms either developed their own HMI solutions or acquired HMI pioneers. The AI market is following a similar path, and AI implementation and acceptance is increasing.

Figure 1: Standards Are Essential

Air Liquide is making advanced control application a little easier by using standard communications tools such as OPC and DDE-OPC bridges. (Source: Air Liquide)

One of the main difficulties with implementing current AI solutions is the interface between the AI platform and the existing control system. HMIs couldn't gain wide acceptance until standard drivers were available to enable communication with PLCs and other controllers, and AI vendors have to develop and implement similar communication standards and solutions.

Most AI products run on a computer separate from the main controller, although some AI products can run on the same Windows NT machine as an HMI or a soft-logic controller. In either case, a reliable communications protocol must be established between the AI software and the control system.

AI vendors are addressing the communications issue by adapting industry-standard protocols. "It was somewhat difficult to integrate the AI application into our control strategies the first time. Now it is easy since we use a standard communications bridge (DDE-OPC)," says Dave Seiver, PE, APC project manager at Air Liquide America, Houston. Air Liquide uses CyboSoft software to optimize control of air separation units (Figure 1).

Other AI vendors are following suit and rapidly adapting the OPC standard to simplify communications between AI solutions and existing control systems. OPC can ease integration problems, but some software development effort is still required to establish communication. The most elegant solution to these integration and communication issues is often the simplest.

Dude, Where's My Data?

AI solutions can be difficult to implement, but the fault does not always lie with the vendors. Most AI solutions need access to large amounts of process data. An ideal control system would already have one global database containing current process data, but this is not always the case. If such a database does not exist, then it must be created before the AI solution can be effective.

Creating a database for AI can be a time-consuming first step. "This is becoming a major project," says Jeremy Baldridge, production manager, Lone Star Industries, New Orleans. "We are gathering key process data in several data acquisition files for use in developing an empirical model. We are essentially conducting a broad study of our process since we have no usable model to employ in the algorithm. This is not a slam dunk."

Baldridge touches on another requirement that must be met for a successful AI project: development of an empirical model of the process. As he says, data must be gathered from a variety of sources and used to create a model of the process. This process model can only be created by users with an in-depth understanding of their operation.

After a global database is built, process models must be painstakingly created. "It took a couple of months to build an effective model of our process, and about a year to integrate the entire AI application," says Aundra Nix, sr. process control engineer for the Asarco Mission Copper Mine, located just south of Tucson, Ariz. "However, many factors complicated the project. We went through an equipment upgrade upstream during the implementation. During this time, feed was inconsistent to the plant and we could not dictate operating criteria to train the models on the wide range of conditions that we need to have a robust model."

Engineers usually turn to AI to solve intractable problems, so it is not surprising that AI implementation is time-consuming. "The ore-grinding process is a difficult one with the hardness of the ore changing at regular intervals without any type of quantitative measurement to indicate an upcoming change," adds Nix. "This application also requires different control philosophies depending upon upstream or downstream constraints. The AI package was somewhat difficult to integrate into the control for those reasons, as would be any technology. Furthermore, those are the very reasons we were seeking an advanced control solution."

Another mining application required a model, although this model was a set of rules for an expert system. Chino Mines is implementing AI for a copper milling and flotation circuit. The expert system will control two semiautogenious (SAG) mills, four ball mills, and a flotation circuit.

Creation of an expert system requires input from plant personnel familiar with the process. "It is very important to integrate all the operator's knowledge into the system rule base," says Ron Cook, sr. process control engineer at the mine in Chino, N.M. "Ultimately the operators must agree that the system is running the plant correctly and as efficiently as possible in order to obtain acceptance." Involvement of operators in the software development phase not only assures acceptance, it also increases the knowledge of the expert system.

Worth the Work

The examples shown reveal a key factor inhibiting easy AI. AI is usually applied to complex and intractable problems that have resisted resolution by conventional control system software and hardware solutions. Resolution of these complex problems is inherently time-consuming and difficult. AI is usually not easy because it is seldom applied to simple problems.

All of the truly difficult control problems can only be solved when personnel with an in-depth process understanding correctly apply the right hardware and software solution. "Successful AI applications require in-depth understanding of both the process and of control theory," says Bala Liptok, PE, independent process control consultant based in Stamford, Conn. "There is no substitute for understanding your process."

Sidebar:

AI Can Be Easy

Artificial Intelligence solutions can more easily implemented when the problem is limited to a single control loop. Rohm and Haas Co., Deer Park, Texas, used a CyboCon CE controller interfaced to an existing Fischer & Porter Micro DCI controller to tame a problematic pH control loop. CyboCon CE is a Windows CE-based controller with CyboSoft's model-free adaptive (MFA) controller embedded in it.

The recommended pH setpoint was 10.6, but operators were typically running the process at pH 12 because the pH loop became unstable when set close to the recommended setpoint. The excess caustic associated with the higher pH was resulting in solids formation in the downstream separation equipment. The MFA controller used artificial neural networks to control the pH at the desired setpoint.

With the improved pH control, the setpoint was lowered from 12 to 11. "The cost benefit as result of the reduced caustic usage was estimated to be about $170,000 per year," says Teshome Hailu, senior control engineer, Rohm and Haas. "Operators like the improved process upset handling of the new controller. There is also an unquantified reliability improvement due to reduced solids formation in the downstream equipment as a result of less excess caustic."

This AI implementation bypassed most of the steps needed for typical AI projects. The communications interface was simple because it was limited to two 4-20 mA signals. No global database was required, and no process model had to be created because a model-free controller was used. The problem was easily defined but hard to solve, and the best solution was AI.

Total time for implementation? "The wiring and installation work took one day," says Hailu. "Configuring and commissioning took half a day." Applying AI to a single control loop may be the best way for many users to gain experience and confidence with AI technology.