CA1297560C - Process control system with on-line reconfigurable modules - Google Patents

Process control system with on-line reconfigurable modules

Info

Publication number
CA1297560C
CA1297560C CA000578694A CA578694A CA1297560C CA 1297560 C CA1297560 C CA 1297560C CA 000578694 A CA000578694 A CA 000578694A CA 578694 A CA578694 A CA 578694A CA 1297560 C CA1297560 C CA 1297560C
Authority
CA
Canada
Prior art keywords
block
user
supervisor
control
status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
CA000578694A
Other languages
French (fr)
Inventor
Richard D. Skeirik
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
EIDP Inc
Original Assignee
EI Du Pont de Nemours and Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=22293075&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=CA1297560(C) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by EI Du Pont de Nemours and Co filed Critical EI Du Pont de Nemours and Co
Application granted granted Critical
Publication of CA1297560C publication Critical patent/CA1297560C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/0265Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion
    • G05B13/028Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric the criterion being a learning criterion using expert systems only
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S706/00Data processing: artificial intelligence
    • Y10S706/902Application using ai with detail of the ai system
    • Y10S706/903Control
    • Y10S706/906Process plant

Abstract

PROCESS CONTROL SYSTEM WITH
ON-LINE RECONFIGURABLE MODULES

ABSTRACT
An integrated system for process control in which a process supervisor procedure (which is preferably the top-level procedure) is configured as a modular software structure with modules which can be revised by a user at any time, without significantly interrupting the operation of the process supervisor. Users can define or redefine modules by editing highly constrained templates. These templates use a standardized data interface (as seen by the user), which facilitates communications with an extremely wide variety of systems. The template set preferably contains highly constrained portions (which are optimized for the most common functions), and also contains pointers to user-customized functions. Thus, rapid set-up and modification are possible, but sophisticated users still have full flexibility to do customization.

Description

PARTIAL WAIVER OF COPYRICHT

A purtion of the disclosure of this patent document contains material which is subject to copyri~ht protection~ The c~pyri~ht own~r has no ob~ection to the facsimile reproduction by a~yone of the patent disclosure, as i~ appears in the Pate~nt Office patent files Qr records, but otherwise reserves all copyright rights whatsoever.

C}~Q8$~
Th~ following appllcatlonE~ o~ co~Dmon as~ e ~ont~in 80~Q com~on disclosur~, ~nd alre belleved to ha~
~~e~t~ve ~iling dates identlcal wlth that Or t~o present applic~tlon:

EXPERT SYST~M WITH THREE CLASSES OF RULES tDupont docket no. PI-446 (1100/2)); filed September 28, 1988:
Serial No. 578,705;
PRQCESS CONTROL SYSTEM WITH RECONFIGURA~LE EXPERT
BULES AND CONTRoL MODULES (Dupont docket no. PI-447 (llGO/3)): filed September 28, 1988: Serial No. 578,693 PRO~ESS CONTROL SYSTEM WITH ACTION LOGGIN~ (Dupont docket no. PI-448 (1100/4)) filed September 28, 1988:
Serial No. 578,692;
EXPERT SYSTEM WITH NATURAL-LANGUAGE RULE UPDATING
(Dupont docket no. PI-444 (1100/4)) filed September 28, 1988: Serial No. 578,704;
and PROCESS CONTROL SYSTEM WITH MULTIPLE MODULE
SEOUENC~ OPTIONS (Dupont docket no. PI-450 (1100/6)~
filed September 28, 1988: Serial No. 578,695;

125~756() BACKGROUND OF THE I~VENTION
Eield of the Invention The present invention relates to expert systems (also known as knowledge-based systems), to process control systems, and to hybrids thereof.
Discussion of Related Art Various known teachings which are believed to be related to various ones D f the innova~ions disclosed in the present application will now be discussed. However, applicant specifically notes that not every idea discussed in this section is necessarily prior art. For example, the characterizations of the particular patents and publications discussed may relate them to inventive concepts in a way which is itself based on knowledge of some of the inventi~e concepts. Moreover, the following discussion attempts to falrly present various suggested technical alternatives (to the best of applicant's knowledge), even though the teachings of some of those technical alternatives may not be "prior art" under the patent laws of the United States or of other countries.
Similarly, the Summary of the Invention section of the present application may contain some discussion of prior art teachings, interspersed with discussion of generally applicabl~ innovative teachings and/or specific discussion of the best mode as presently contemplated, and applicant specifically notes that statements made in the Summary section do not necessarily delimit the various inventions claimed in the present application or in related applicativns.

Process Cont~ol Generally ~o compete in global markets, manufacturers must continually improve the quality and cost of manufacture of their products. They must do this in the face of changing market needs, changing raw materials costs, and ~S~

reduced staffing. Automatic computer control of the manufacturing process can play an important part in this, especially in the chemical process industry. Most process plants already have the basic automatic regulating controls (low level controls) needed to control the plant at a given operating point. These provide the foundation for higher level super~visory controls (referred to here ~s supervisor procedures or supervisors) that seek to improve quality, reduce cost, and increase plant uptime by moving the plant to a different operating point. ~hese changes can be ~ade directly via the lower level controls, or indirectly via the plant operator.
Although supervisory controls have been in use for years, they have lacked a number of desirable features.
To best improve quality and cost, a supervisor procedure should:
- help control the quality of the end product;
- reduce the cost of operating the plant;
- help avoid unnecassary upsets or shutdowns;
- work effectively with plant operators;
- act in concert with standard operating procedures; and - be supportable by plant operating and support people.
To measure quality, a sUpervicor procedure should ideally have access to measurements of the basic properties of the product which affect its value and usefulness to the customer. Since most product properties measurements are sampled (and are measured in a laboratory), the supervisor should have access to a historical proces~ database which can store these measurements as well the basic process data from the lower level control systems. Since sampled measurements and the process itself normally include some components ~2~7560 of random variation, the supervisor should include statistical tests which can determine if a sequence of sampled measurements is varying normally around its aim value (i.e. is "on aim"), or has shifted significantly from aim (is "off aim").
To control quality, a supervisor procedure should have the capability to change the operating point of the process (via the lower level controls) when a measured property goes off aim. It should have the ability to act in response to new ~ata or statistical tests, or to act at regular time intervals. It should also be able to preemptively change the operating point when basic condltions (such as plant production rate) change. It should allow a number of independent control objectives, and new ones should be easy to add. Since the process may use any number of different low level controllers, the supervisor should be able to communicate with all of them.
To work effectively with plant operators, a supervisor procedure should be understandable. It should carry out its control actions in a way that is natural and understandable to operators. It should provide enough information about its current state and its past actions for the operator to judge its performance. It should inform the operator when it acts (or chooses not to act), explaining how much action was - taken, where it was taken, why it was done, and what effect it might have. Since the effect of actions taken to control quality and reduce cost can last longer than a single shift, it should provide a record of all its actions.
To act appropriately under all circumstances, to reduce operating costs in a way consistent with quality, to help avoid unnecessary upsets and shutdowns, and to take operating procedures into account, a supervisor ~97~i6(3 should ideally include the logical decision making capabilities of expert syste~ms. Because decisions will normally focus on a specific task or area, many independent expert systems should be allowed. The expert systems should have acce~s to the many sources of process measurements, laboratory measurements, and control system parameters. They should be able to reason symbolically using that information, and to make their decisions take effect through communication and control actions. To work effectively, the sl~pervisor should be able to control its expert system functions in concert with its other functions.
To be supported by plan~ personnel, the supervisor should be easy to use. It should allow common control actions to be set up easily, with a means of customizing less common functions. It should allow control actions to be changed easily. It should have a simple m ans of specifying the informative messages to be generated about it actions. Its expert systems should allow process knowledge to be entered, stored, and updat~d in a way that plant support people understand. It should provide a simple, appropriate knowledge representation which naturally includes data retrieval, symbolic reasoning, and effective means of implementing decisions in the plant. The knowledge structure should allow any authorized plant expert to enter knowledge, without restricting access to those who ~now computer languages or have memorized special rule structures.
The present invention addresses many of these concerns.
Normally supervisory control has been thought of separately from another higher level of control called opti~izing control, which seeks to minimize operating cost. In some cases, the requirement to minimize variation in product properties (i.eO to improve product ~297~0 quality) is absolutely primary, so that cost optimization only be performPd as an objective secondary to quality objectives. In this environment, use of classical optimization t~chniques to achieve cost optimization may not be possible. In other cases, it has been possible to integrate ~ balance of supervisory and optimizing control into the supe~risor.
Modularity Supervisory control systems using a modular structure are well known. For example, the Process Monitorinq and Control-1000 (PMC-1000) control package marketed~by Hewlett Packard is a modular control package which can function as a supervisory control system. PMC
modules, called blocks, perform alarming and limiting, proportional/integral~derivative control, tr~nding, driving an electrical output, running programs, and othex functions. Each block writes one or more output values into memory. To build PMC control structures, the user creates as many blocks as needed and links them to other block output values. A new runnable system must then be generated. Once the system is running, parameters such ~s gain constants can be changed, but the linking of blocks is fixed. PMC runs on a base time cycle, and blocks can only be scheduled to execute at multiples of the base cycle time. Although PMC
maintains ~ historical database, it cannot be used for control, ~nd does not effectively store intermittently sampled data. It is believed that there is no ~aximum number o~ blocks.
It is believed that some earlier discussion o~ the significance of modularity in process control software is found in Watson, "Process Control Using Hodular Package So~tw~re,~ IEE ~Conference Publications number 102 (1973).

~X5`7560 ~ilLt~r~q~ t~!base A dat~base of historisal process data is ge~erally described in Hale and Sellars, "Historical Data Recsrding for Process Computers," 77 Chem. En~'q ~ogr@ss 38 (19~1~

Continuous Control Actions In classical feedback and feedforward control, the prior art ~ea~hes that the best control results are achieved by making continuous changes to the process.
In computer control, where cyclic operation forces changes to be made in discrete steps, many small, frequent steps are conventionally preferred. While in principle this gives the best possible control lS performance, such control actions are very difficult to visualize. In fact, it may be impossible to determine what actions have been taken by what control strategies, and how long the control strategies have been making changes. This makes it very difficult to judge whether control strategies are working properly, or even if they are working at all. This method of control also runs counter to the methods used by operators, who generally make a few significant changes ~nd wait to see the effects.
In feedback control, the use of a deadband is a well known way of avoiding small actions caused by a noisy ~easurement. (That is, if the control variable falls within a sp~ci~ied deadband of values surrounding the goal value, the control value will not be m~nipulated.) This de~dband, as is well known, helps to avoid instability in control ~yste~s. Statistical proces~ co~trol also tends to reduce the number of feedback control nctions. However, neither technique is sufficient to make all control actions understandable, since some actions will not be considered noisy.

The use of a feedforward relation among control variables is also well known among those skilled in the art of process control. That i5, in some cases, whenever one variable changes (e.g. if a particular control variable is manipulated for any reason), another variable will also be manipulated according to a predetermined relationship. For ~xample, in a distillation process, it may be desirable to immediately decrease the heat input whenever the rate of feed o~ the crude feed stock is decreased. In feedforward control, a deadband is normally not used~

- Control of MultiDle ManiDulated Variables In many process control applications, several manipulated variables must be jointly controlled in a single control loop (e.~. in some relation to a single measured variable). A special (and very common) case of this is seen in many situations where a single manipulated variable can normally be used, but alternate manipulated variables should be used instead if the first-choice manipulated variable becomes constrained.
When human operators optimally handle problems of this kind, their choice of which output to change will often be made heuristically, based on cost, quality, response dynamics, and process stability.
"Decoupling" is a conventional way of reducing multi-input multi-output problems to sets of single-input single-output problems. In decoupling, it is usually assumed that all of the manipulated variables should be changed.
A different but related problem arises when a number of manipulated variables ("knobs"~ can be changed to respond to ~ ~ingle men~ur~d variable. Operator~
often u~e ~ heuri~ic ~pproa~h in chossing whioh knob ~or knobs) to manipulate, and ~omet~mes choose not to ~ct. The heuristio ~pproach may consider 06t, quality, response dyn~mics, ~nd process stability. It may include alternate knobs to be u~ed when all of the preferred knobs are constrained. Classic control methods are not well ~uited to this approach.

Expert Svstems Generally The term ~expert sy~tem~ 15 used in the present application (in accordance with what is believed to be the general usage ~t present) to refer to a system which includes non-t~ivial amounts of knowledge about an underlying problem. Almost ~ny control system which has lS been customized for a particular application ~lght be argued to embody s~all ~mounts of relevant knowledge in its very ~truoture, ~ut the term expert 6ystem is gener~lly used only for ~ystems which cont~in enough accessible information that they can usefully supplement the knowledge of at lea~t some (but normally not all) human users who ~ust deal with problems of the type ~ddressed. Expert systems ~t their best may serve to codlfy the expert knowledge of one person (a "domain expertn ), 50 that that person's expertise can be 2S distr~buted nnd ~ade accessible to many less expert users who must ~ddress problems of a certain type. Some well-known successful ex~mples ~nclude ~ ~edical di~gnost~c program (MYCIN) and a diAgnostic program w~ich ass~sts mech~nics working on dlesel engines.
As these ex~mples show, one very common are~ of application for experk ~ystems h~s been fault dl~gnosis.
Many other nrea~ of appl~tion h~ve been recogn~zsd;
~ee gener~lly (ed. R. Forsythe 1984) P. Harmon and D King, Exp~rt Systems (1985); and Donald Waterman, A guide to Expert Systems (19B4).

~nowledqe InPut and Updatinq One of the very general problems in the area of expert systems is how knowledge is to be gotten into an expert system in ~he first place. That is, specialists in ~rtificial intelligence often assume that a "know-ledge engineer" (that is, a person who is experienced and competent in the specialized computer languages and software commonly used for artificial intelligence applications) will interview a "domain expert" (that is, a person who actually has expert knowledge of the type of problems which the expert system is desired to be able to address) to extract his expertise and program an expert system accordingly. However, there are some very important drawbacks to this paradigm. First, competent "knowledge engineers" are not readily available. In particular, the requirements of maintaining a real-world application (such ~s an expert ~ystem for chemical process control, as in the preferred embodiments disclosed below) are such that it is dangerous to rely on a sufficient supply of "knowledge engineers" to go through the itera~ions necessary to not only input the knowledge base reliably, but also maintain the software base once it is created.
Tha rapidly developing art of software engineering has shown that one of the key requirements for a large ~oftware system i5 that it be maintainable. Thus, for example, the software fiystem must be set up so that, after ~he technologist who first puts together ~n expert 6ystem is gone, it can be maintained, modified, and updated as necessary ~y his successors.

Thus, one key problem in the 2Irea of expert systems is the problem o maintenance and updating. Especially in more complex real-world applications, it is necessary that a large suftware structure, such as that required for a sophisticated expert system, be maintainable. For example, in an expert control system, control strat~gies ~ay be modified, n~w con~rol strategies may be intro-duced, sensor and/or actuator types and/or locations may be changed, and the economic factors relevant to cost versus throughput versus purity tradeoffs may change.
Normally, expert systems attempt to maintain some degree of maintai~ability by keeping the inference rules which the processor executes separate from the software structure for the processor itself. However, this normally tends to lead to a larger software structure which operates more slowly.
Specialists in expert systems also commonly assume that expert systems must be built in a symbolic processing environment, e.q. in environments using ~ISP
or PROLOG. Even for complex processes, a single large knowledge base is usually assumed. The program which processes the knowledge therefore requires complex procedures for processing the Xnowledge base, and these are typically eoded separately from the knowledge. This leads to l~rge software structures which execute slowly on conventional computers. Specialized "LISP machines"
are commonly recommended to speed up the inference process.

Published ~ateri~l regarding knowledge based systems (expert systems) has proposed sever~l clas-sificatlons ~or ~he txpes o~ rules which are to be used.
For example, U.S. Patent No. 4,658,370 to Er~an e~ al., describe "a 1~975~S0 tool.. for building and interpreting a knowledge base having separate por~ions encoding con~rol knowledge, factual knowledge, and jud~ental rules." (Abstract).
The method described in this patent still appears to rely on the avallabili y of a "knowledge engineer." This pa~ent appears to focus on the application of an expert system as a consultation driver for extracting the relevant items of knowledge from a human observer.
Knowledge is separated into factual knowledge such as classes, attributes, allowed values, etc., which describe the objects in the domain; judgmental knowledge, which describes the domain (and its objects) in the form of rules; and control knowledge describing the problem solving process to be used by the inference procedure in processing the knowledge. (The control knowledge has nothing to do with control of an external process.) This knowledge structure is designed to make the task of knowledge engineering easier, and to make the knowledge system and its reasoning during a consultation easi-or to understand. The knowledge base is written in a specialized programming language. This is a very powerful structure, which requires a very high skill level.
Expert system developmen' tools which are designed to make the input of knowledge easier have been developed. U.S. Patent 4,648,044 to Hardy, et al., describes "a tool for building a knowledge system [which] includes a knowledge base in an easily understood English-like language expressing facts, rules, and meta-facts for specifying how the rules are to be applied to s~lve a specific problem". (Abstract).
Although this tool i5 not as complex as some current expert systems tools, the knowledge must be entered in a rigidly structured format. The user must learn a specialized language before h~ c~n program the knowledge base. Despite some simplification in the development process, a fairly high skill level is still required.

xDert SYstems_for Process Control Chemical processing plants are so complex that few people develop exper~ise except in limited areas of the process. Plants run around the clock, production rates on a single line are very h:igh, and startup is usually long and costly, so improper operation can be very costly. It has also been found that, in a complex chemical processing plant, some operators can achieve substantially higher efficiencies than others, and it would be adva~tageous if the skill level of the best operators could be made generally available. Expert systems promise significant benefits in real-time analysis and control by making scarce expertise more widely available. However, application of expert systems in this area has not progressed as far as it has in interactive, consultative uses.
Integration of expert system software with process control software poses special problems:
First, there is the problem of how the software structure for an expert system is to be combined with the software for a process control system.
Several expert systems which have been suggested for process control have used an expert system as the top-level supervisor procedure for the control system.
Second, as discussed above, many process control strategies have difficulty with situations where there are multiple control parameters (inputs to the process) which could be manipulated. That is, for processes which have only one prima~y control parameter (as many do), the problem of what value to set for that control parameter is in significant ways a much simpler problem than the question of which one or ones of 12~75~
multiple control parameters should be addressed, and in which direction.
It should also be noted that the use of an expert system to design a new process (or to debug a newly introduced process) has significan'fly different features from the problem of optimally controlling an existlng process. Similarly, while expert systems have also been applied to the automatic distribution of jobs to multiple wsrkstations through an automated materials handling system (an example ~f this is the DISPATCHER
Factory Control System developed by Carnegie Group Inc.), the queuing problems presented by the allocation of diff~rent types of materials in batches to many parallel assembly workstations making different products are quite different from the problems in continuously operating single line processes, particularly chemical processes.

"RESCUn The system known as ~RESCU" resulted from a collaborative demonstration project between British government and industry. See, e.q., Shaw, "RESCU online real-time ~rtificial intelligence," 4 ComPu~e~-aided Enqineerinq_J. 29 (1987): and the Digest of the IEE
Colloquium on 'Real-Time Expert Systems in Process Control', held 29 November 1985 at Salford, U.K.... From available information, it appears that this is a real-time expert system which was developed to provide advice on quality control in an detergent plant. The system searches for a hypothesis about the plant which is supported by process data, and uses it as the basis for advice. This system also uses a single knowledge base of the entire plant and thus requires complex inference control methods.

1~7S60 "~lcon~
~Falcon" is ~ fault diagnos;is system for a chemical reactor, which monitor~ up to 30 proces~ measurements and seeks to identify a set of up to 25 failures in the process. This was developed as a demonstration project between DuPont, the Foxboro Company, and th~ Uni~ersity of Delaware, and is described, for example, in D. Rowan, "Using an Expert System for Fa~lt Diagnosis,~ ~n the February 1987 issue of Control Enaineerinq- See also "Troubleshooting Comes On Line in the CPI" in the October 13, 1986. issue of Chemical Enaineerina at page 14. This system required several man years of development, and because it is programmed in LISP, it has proven difficult to maintain the knowledge ~ase through process changes.

"O~ISPEC SuPerintendent"
The "ONSPEC Superintendent" (TM), marketed by Heuristics Inc., is a real-time expert systems pac~age which monitors data from the ONSPEC (TM) control system.
See Manoff, ~On-Line Process S~mulation Techniques in - Industri~l Control including Parameter Identification ~nd Estimaticn ~echniques," in Proceedincs of the ~leventh__~nL9~1__Advanced Control Conference (1985);
and Manoff, "Control Software Comes to Personal Computers." at page 66 of the March 1984 issue of Control Enainee~ing. The "Superintendent" monitors for conformance with safety and control procedures and documents exceptions. It can also notify operators, generated reports, and cause control outputs.

:L2~756~) The PICON (TM~ system, which was marketed by Lisp Machines, Inc. (LMI), was apparently primarily intended for real-time analysis of upset or emergency conditions in chemical processes. It can monitor up to 20,000 input process measurements or alarms from a distributed control system. It uses a single knowledge base (e.g.
containing thousands of rules) for an entire process.
To handle such a large number of rules, it runs on a LISP computer and includes complex inference control methods. PICON must be customized by a LISP programmer before the knowledge base can be entered. The domain expert then enters knowledge through a combination of graphics icons and Lisp-like rule constructions. See, for example, L. Hawkinson et al., "A Real-Time Expert System for Process Control," in ~rtificial IntellLgence ADDlications in Chemis~ry (American Chemical Soriety 1986~, and the R. Moore et al, article in the May 1985 issue of InTech at page 55.

Self-tuninq Controllers Another development which should be distinguished is work related to so-called "self-tuning controllers. n Self-tuning single- and multiple-loop controllers contain real-time expert systems which analyze the performance of the controller (See "Process Controllers Don Expert Guisesn, in Chemical Eng'g, June 24, 1985).
These expert systems adjust the tuning parameters of the controller. They affect only low-level parts of the system, and use a fixed rule base embedded in a microprocessor.

~X~7560 SUMMARY OF TH.E I~VENTION
In this section various ones o the innovative teachings presented in the present application will now be discussed, and some of t:heir respective advantages described. Of course, not all of the discussions in this section define necessary features of the invention (or inventions), for at least the following reasons: 1) various parts of the following discussion will relate to some tbut not all~ classes of novel embodiments disclosed; 2) various parts of the following discussion will relate to innova~ive teachings disclosed but not claimed in this specific application as filed; 3) various parts of the following discussion will relate specifically to the "best mode contemplated by the inventor of carrying out his invention" (as expressly required by the patent laws of the United States), and will therefore discuss features which are particularly related to this subclass of embodiments, and are not necessary parts o~ the claimed invention; and 4) the following discussion is generally quite heuristic, and therefore focusses on particular points without explicitly distinguishing between the features and advantages of particular subclasses of embodiments and those inherent in the invention generally.
Various novel embodiments described in the present application provide significant and independent innovations in several areas, including:
systems and ~ethods for translating a domain expert's knowledge into an expert system without using a knowledge engineer;
software structures and methods for operating a sophisticated control 5ystem while also exploiting expert system capabilities;
generally applicable methods for controlling a continuous process; and 7S~O

innovations, applicabl to expert systems generally, which help provide highly maintainable and user-friendly experts.
Various olasses of e~bodim~nts described herein provide a process control system, wherein a process which operates ~ubstantially continuously is controlled by a system which includes (in addition to a process control ~y~tem which is closely coupled to the underlying process and which operates fairly close to real time, i.e. which has a maximum response time less than the ~inimum response time which would normally be necessary to stably control the underlying process) at least some of the following features:
1) A supervisor procedure, which has a modular structure, and retrieves process measurements from the process control system (or other process data collection systems), passes control parameters to the process control system, and communicates with people.
Preferably, the supervisor includes the capability for statistical prscess control. The supervisor preferably runs on a computer system separate from the process control system.
2) The supervisor procedure can preferably call on one or more expert ~ystem procedures as sub-routines. This is particularly useful in control applications where there are multiple possible manipulated variables, since the expert system(s) can specify which manipulated variable (or variables) is to be adjusted to achieve the end result change desired, and the supervisor system can then address simpler one-dimensional control problems.
3) Preferably, at least some users can call on a build-supervisor procedure which permits them to define or redefine modules of the supervisor procedure by editing highly constrained templates. The templates ~756~

use a standardized data interfacP (as seen by the user), which facilitates the use in control actions of data from a wide variety of systems. The templates in the available template set preferably contains highly constrained portions (which are optimized for the most common functions3, and pointers to functions which can be customized by the user.
4~ Preferably, the build-supervisor user can also call on a build-user program procedure, which allows fully customized control functions to be programmed by sophisticated users. The build-user program procedure can also be used to create customized message generation functions. These can be used to generate messages describing the actions of the lS supervisor, and also to call other sub-procedures, such as the expert procedures.
5) Preferably at least some users are also permitted to call on a build-expert procedure which can be used to construct an expert system. Knowledge is specified by user input to a set of highly constrained, substantially natural langua~e templates. The templates use a standardized data interface (as seen by the user), which facilitates the use in the expert system of data from a wide variety of systems. The completed templates can then be compiled to produce a runnable expert system. Preferably, the user can also retrieve, examine, and modify the input from previously specified templates. Thus, an expert system can be modified by recalling the templates which specified the current ~0 expert system, modifying them, and recompiling to generate a new run~able expert.
6) A historical process database advantageously standardizes the access to curxent and historical process data by the upervisor and expert procedures. This is particularly useful for collecting ~'75~S~
the results of laboratory ch2lracterizations over ~ime of ~he underlying process.

Cont~ol of Continuous Processes The goals in management o~ a substantially continu4us process include the following:
1) Maximizing quality: In the chemical process industry, it is important to reduce variation in measured properties of the product, and to control the average measured properties at specified aim values.
2) Minimization of cost of manufacture: The process must be operated in a way that efficiently uses energy and feedstocks without compromising quality objectives. Upsets and inadvertent process ~hutdowns, which adversely affect quality and production rate, and reduce the total utility (fractional uptime) of the plant, are all costly and must be avoided.

Control of Multiple ManiDulated Variables As noted above, in many process control applications, several manipulated variables must be jointly controlled in a single control loop (e.~. in some relation to a single measured variable). A special (and very common3 case of this is seen in many situations where a single manipulated variable can normally be used, but alternate manipulated variables should be used instead if the first-choice ~anipulated variable becomes constrained. When human operators optimally handle problems of this kind, their choice of which output to change will often be made heuristically, based on cost, quality, response dynamics, and process stability.
One novel approach to this problem (which is used in 6everal of the pre~erred embodiments below) is to decompose the ~ultiple-variable problem intD a set of ~37~6(3 single~variable probl~ms. ,~n expert procedure is used to decide which control parameter(s) to adjust, and one or more from a et of single-input single-output procedures are used to make the adjustment(s). Not only does this facilitate quality, cost, and plant operability objectives, but it results in control strategies which act properly over a much wider range of conditions. Correct actions are taken, where conventional control methods would make no action or wrong actions. This improves the usefulness of the control strategy to the operator, and leads to higher use of the controls.
The various novel ideas described below are particularly advantageous in such multiple control parameter problems. In the presently preferred embodiment discussed below, a dimethyl terephthalate process (DMT) process is presented as an actual example to show the advantages achieved by the various novel ideas disclosed in this context.

Discrete Control Actions As mentioned above, control systems that continuously change manipulated parameters are very difficult to monitor. Since operators depend on the supervisor procedure to maintain important product properties and process operating conditions, it is important that they be able to understand and judge supervisor performance. By restricting supervisor changes to a reasonably small number of significant discrete actions, supervisor performance becomes much more understandable.
One novel teaching stated in the present application is an integrated system fox proces control in which a process supervisor procedure (which is preferably the top level procedure) defines parameters 7~

for one or more control systems (or control procedures).
The supervisor procedure changes control parameters only in discrete actions, and the thresholds for the decision to aGt are preferably mad~e large enough ~for each control parameter) that every action must be a significant change.
A rela~ed novel teaching herein is that ev~ry control action taken by the supervisor should be reported out to plant personnel in 2 substantially natural language message. Preferably, lnstances where action would be desirable but is not possible (because of constraints or other unusual circumstances) should also be reported. Preferably, a cumulative record of the messages is kept, and is available for review by operators and plant support people. Preferably, the message should report the time, amount, location, and reason for each action. Other relevant information, such as the time stamp of relevant sampled data, and the nature of statistical deviations from aim should preferably be included as well. Since every action is significant, and the number of actions is reduced, the cumulative record provides a meaningful record of supervisor performance.
This is particularly advantageous for systems where some of the relevant time constants are so slow that dynamic process responses last several hours (or longer). A new operator coming on duty at a shift change can use the cumulative record to judqe what effects to expect from supervisor actions on the previous shift.
The use of a deadband in feedforward action is one novel means that is advantageously used to discreti~e supervisor actions. Feedforward action i5 taken only when the ~easured value changes by more than the deadband from its value at the last action. This 12':~756V

generates a series of discrete changes in the manipulated variable, which can be effectively logged and evaluated by operators.
Statistical filtering o~ discretely measured values also serves to reduce control actions to a few significant changes. Statistical tests, as is well known, distinguish normal variation around the average from significant deviations from the average. In most cases, a number of measurements will be needed to indicate a deviation. By only acting on statistical deviations, relatively few, but significant, actions will result.

Expert Systems for Process Control A general problem with expert systems is how the expert system software is to be integrated with process control software. Several expert systems which have been suggested for process control have used an expert system as the top-level supervisor procedure for the control system. However, several of the novel embodiments disclosed herein achieve substantial advantages by departing from this conventional structure. For one thing, if the expert system is the top level procedure, then it becomes more difficult to accommodate more than one expert in the system tor, to put this another way, the potential modularity of the expert system cannot be fully exploited). Thus, one significant advantage of several of the novel embodiments disclosed here is that use of more than one expert system within a single integrated system becomes much more advantageouc.

T~es of Process Control sYstems ~7,~6V

It should also b~ noted that the use of an expert system to design a new process (or to debug a newly introduced process) has significantly different features from the problem of optimally controlling an existing process. While various ones of the novel ideas disclosed herein may have significant applications to such problems as well, the presently preferred embodiment is especially directed to the problem of optimally controlling an existing operating process, and the various novel ideas disclosed herein have particular advantages in this context.
A significant realization underlying several of the innovations disclosed in the present applicaticn is that the structure of expert systems for process control applications can advantageously be significantly - different from that of other expert system problems (such as consultative expert systems problems, in which a human is queried for information). The Hardy et al.
and Erman et al. patents ïllustrate this difference.
Consultative expert systems seek to substantiate one of a number of possible causes by interactively querying the user about the symptoms. Such systems must use complex knowledge representations and inference methods to m nimize the number of user queries by carefully selecting the information they solicit. ~oreover, since the user is not an expert, the system should be able to explain why it is requesting information.
In contrast, the real-time process problem is much simpler. The information needed by the expert is typically in the form of process measurements, which can be rapidly retrieved from process control and data systems without human intervention. There is much less need to mini~ize the requests for information. In fact, it may be faster to retrieve all the data that could be relevant to the problem than to determine what data is 2~

129 ~

relevant. Moreover, since the experts will run automatically, there i5 no need to explain the reasoning during the inference process. As long as the rulebase is not tuo larye, the process control expert can operate effectively using a simple "forward chaining" (or data driven) inference method. There is no need for the complex "backward chaining" procedures used in th~
consultative systems. Moreover, if a number of modular expert subprocedures are used within a single process, each expert tends to be smaller, and is more likely to wor~ effectively in forward chaining mode. The presently preferred embodiment is especially directed to process control and monitoring, and the novel ideas disclosed herein have particular advantages in this context. However, various ones of the novel ideas may have significant applications to other problems as well.
It is believed to be a significant innovation to use expert system techniques to point to the direction of action in a multi-parameter control problem, as discussed above. One advantage is that the use of the expert permits more cases to be handled; for example, when one control parameter is up against its limits, the expert system can specify another parameter to be changed. The expert can also be especially advantageous in preventing a wrong action from being taken: in some types of processes it is ronceivable that erroneous control strategies could potentially cause property damage or injuries, and the natural language inference rules of the expert (possibly combined with a more quantitative optimization scheme) can usefully ensure that this cannot happen. Thus, one advantage of various of the process control expert system embodiments disclosed in the present application is that they facilitate reliable implementation of a control strategy which (primarily) prevents a clearly wrong action from ~

b~ing taken, and (secondarily) pe:rmits minimizing costs.
In particular, it is especially advantageous to use a knowledg~ based (functional) structure where th~
rules are c~nstrained to be of -the three types descrlbed in the context of a process contro] appllcation. Th~ retrieval rules permit the predominantly quant1tative sensor data (and other input data) to be translated into a format which is suitable for expert system application, ~nd the control rules provide a translation back from expert system reasoning into an outp~t which matches the constraints of the control problem.
The present invention is particularly advantageous in controlling procrsses which are substantially continuous, ~s distinguished from job shop processes.
That is, while some computer-integrated manufacturing systems focus primarily on issues of queuing, throughput, statistical sampling of workpieces for inspection, etc., substantially continuous processes (such as bulk ~hemical synthesis and/or refinins processes) typically demand more attention to issues of controlling continuous flows.

ExPert Svstems Generallv The present ~pplicat$on contains many teachings which solve specific problems and offer corresponding advantages ln the sub-class of expert systems used for process control, or even the sub-sub-class of expert systems used for control of substantially continuous processes. ~owever, the present application ~lso discloses fflany novel features which could be ~dopted into many other t~pes of expert systems, ~nd/or into many other types o~ control applications, while still retaining many (if not all) of the advantages obtained in the context of the presently contemplated best mode.

lZ9'7~

Similarly, while the present application describes numerous novel features whirh are particularly applicable to rule-based forward-chaining expert systems, some of the innovations described herein are believed to be very broadly novel, and could be adapted for use with other typPs of expert systems too.

Natural-Lancuaae Rule Statements One of the innovative teachings in the present application provides an expert system tool in which ;0 knowledge is entered into the knowledge base through a limited set of pre-defined, highly constrained, natural-language knowledge structures which are presented as templates. In typical previous expert systems, knowledge is coded in the strict syntactical format of a rule or computer language, which allows great flexibility in knowledge repre entation. The person entering the knowledge (hereafter referred to as the developer) must learn the syntax, must choose an appropriate knowledge representations, and must formulate syntactically correct input.
In contrast, by restricting the developer to constrained, pre-defined structures, the need to learn rule or language syntax and structure is eliminated.
Moreover, if the number of such pre-defined knowledge structures is small enough, the total knowledge representation in the expert system can be easily understood. Thus, a knowledge engineer is not needed.
The domain expert can enter the knowledge to build an expert system directly. The developer's input can then be translated automatically into an operational expert system. The developer need not be concerned with or aware of the specific language or system used to implement the e~pert.

~2~37~0 Another innovativP teaching is that the knowl dge entered into ~he pre-defined natural-language structures is stored in substantially natural-language fo~m. This permits the knowledge to be revised at any time in the form in which it was originally entered: the develsper simply recalls the stored template information, modifies it, and stores the modified knowledge. This is also simple enough to be done by the domain expert. The modified knowledge can then be automatically translated into a modified operational expert.
Another significant advantage of several of the disclosed novel embodiments for creating an expert system is that the expert can be significantly more compact and faster in execution. This is achieved by integrating the expert system's rules with the code which performs the inference function. This allows many independent runnable expert systems to be created.
Moreover, the ease and simplicity of knowledge updating can still be preserved by maintaining the natural language form of the knowledge. The knowledge base can easily be reviewed and modified without hindrance from the specific inference method used in the runnable system.
Another novel feature of several of the disclosed embodime~ts is the use of a standardized data interface (as seen by the user) in the knowledge templates, which facilitates the use in the knowledge base of data from a wide variety of systems. Expert systems are allowed to require data from process or laboratory measurements ~both current and historical), or data collected from other sources (such as on-line analyzers), or data and parameters from the process control systems. A standard interface to all such data sources facilitates use of the data in expert systems, since domain experts usually ~X975~() lack the progra~ming expertise ~hat would otherwise ~e needed tD access these data sourcesO

As mentioned above, previous expert systems tool~
normally use a rule or computer language which allows great ~lexibility in knowledge representation. One innovative ~eaching in the present application is the restriction of the knowledge structure within an expert system to rules of three highly constrained types. The three rule types are: 1) retrieval rules, which each assign one of several descriptors to a name in accordance with ~he values of numeric inputs; 2) analysis rules, which each can assign a descriptor to a name ln accordance with the descriptor/name assignments made by other rules; and 3) action rules, which either execute or don'~ execute a command in ~ccordance with the descriptor/name assignments ~ade by other ~ules.
Pref~rably only the retrieval rules include numeric operations. Preferably only the action rules can enabie ~x~cution of an external command (~ of a command which does ~ot ~erely affect the opera~ion Or the expert procedure). Preferably each of the action rules requires only a logical test for ~he assignment of a ~ descriptor to a name. Preferably none of the action rules can assign a descriptor to a name.
~hile this organization o* an expert system's structure i especially advantageous in the context of a process control expert system, it can also be applied to other types of Qxpert systems In a process control ~ystem, the relevant inputs will normally be process data, laboratory data, or control system param~ters.
The relevant outputs will normally be 2xecutable procedures which affect the operation o~ con~rol or superviSOr systems, or co~municate with operators or ~2975~i(3 domain experts. This teaching could also be applied to expert systems ~enerally, in which other input and output functions are more important.
For example, in consultative us~, retrieval rules need not be confined to numeric inputs, but could accept the natural language descriptor~name assignments as input from the user. To better control the requests for input, such consultative retrieval rules could advantageously execute contingent upon a test ~or the previous assignment of a descriptor to a name.
In general, this structuring of the inference rules provides for a more understandable expert. The retrieval rules provide access to process and control system data, and translate from quantitative input data into a natural language form. The emulation of natural-language reasoning is concentrated as much as possible in the analysis rules, which capture knowledge in a form which might be used to communicate between domain experts. The action rules translate from the natural language inference process back to output procedures which are meaningful in the computer and control system being used.

Modular Organization The organization preferably used for process control has substantial advantages. The top level procedure is a modular process supervisory controller.
The supervisor modules allow flexible specification of timing and coordination with other modules. Modules carry out commonly used control functions, using data specified through a standard data interface, as well as calling user customized functions. User customized functions might generate ~essages, perform unusual control actions, or call expert system procedures.
Using the build-supervisor procedure, users can define ~7~6~

or redeflne modules by editing highly constrained templates which include ~ standard data interface specification. The standardized data interfacP (as seen by the user) facilitates communications with an extremely wide variety of systems. Dynamic revision is achieved by storing the us~er input to the constrained templates as data in a storage area accessible to both the supervisor and build-supervisor procedures. The running supervisor ~xamines the stored data to determine lo which ~unctions have been specified for that module, and what dhta sources have b~en specified through the standard data interface. The supervisor then calls an appropriate modular function and passes the user-specified data.
This organiæation is especially advantageous in providing parallelism and branching in control strategies. That is, the modular organization of the presently preferred embodiment permits at least the following capabilities:
a) control strategies for more than one independent control application can be defined and updated;
b) control strategies for more than one lower level process control system can be defined and updated;
c) alternative control strategies can be defined and stored, so that an expert system (or other software or user command) can switch or select between control strategies merely by selecting or "de-selecting"
modules;
d) timing and coordination of module functions is facilitated;
e) multiple independent expert system procedures can be utilized within a single supervisor;
f) more than one user can define control ~97Sf~3 strategies by accessing different modules, simultaneously if desired.
Another innovative teachiny herein is that ~ach supervisor module (or, less preferably, less than all of the module types) should preferably con~ain a pointer to optional user-customized functions. These functions can be used to generate informatiYe messages about module actions, or a sophisticated user can implement unusual or non-standard control functions, or other customization utilities (such as the build-expert procedure in the presently preferred embodiment) can be used to generate functions accessed in this manner.
This structure is "modular" in the sense that users can call up and modify the various blocks separately;
but, as will be discussed below, the command procedures which perform the standardized block functions are not necessarily separate within the source code. That is, modularity is advantageously achieved by storing the template-constrained user inputs to each block as data;
when the user wishes to modify the block, the data is translated back into corresponding fields in the template.
Preferably, one of the modular functions in the supervisor i5 statistical filtering. This is particularly useful in that statistical filtering can be introduced wherever it is advantagecus, without requiring extensive custom programming by the users. As described above, statistical filtering is advantageous both for avoiding overreaction to insignificant changes, and also for aiding the understanding by plant operators by reducing the number of actions.
One of the novel téachings contained in the present application is that the use of statistical filtering helps to minimize the number of control parameter adjustments performed by the expert system, which in ~975~

turn is very advantageous (as discussed below) in providing an understandable log of control actions taken.

Seouencinq Modular Blocks One innovative teaching herein i5 a system for process control having a modular supervisor procedure which includes novel module timing and sequencing methods. Users can preferably specify modules by editing highly constrained templates, which include several specifierc for methods to be used in controllins and coordinating module execution. Preferably the module timing options include: 1) execute module function at fixed time intervals; 2) execute module function when new data becomes available for a specified data source; 3) execute module function whenever another module executes; 4) execute module function only on programmatic request; and combinations of these.
Preferably a standardized data interface is used to specify the data source for the second of these options.

Inteqration of Ex~ert Procedures The integration of expert systems into process control has been a challenging problem. Most previous attempts to use expert systems in process control have used LISP based expert systems running on a dedicated 2S machine, often a symbolic processing machine~ Usually only one expert system with a single large knowledge base is created for a process. Since the knowledge base could contain ~any rules, a complex knowledge representation and in~erence process are needed to ~ake inferences fast enough for real-time use. The expert system typically runs indep~ndently, scheduling its own activities, and thus is effectively the "top level"
procedure. Using a top level expert makes it more 1~75~3 difficult to accommodate more than one expert system.
(Another way to regard this area of advantaq~ is to not~
that, without the inventions contained in the present application, the potential modularity of the expert system cannot be fully exploited.) Several of the novel e~mbodiments described herein achieve substantial advantages by using more than one expert system subprocedure within a single integrated system. Since expert decisions will normally focus on a specific task or area, the modularity of the problems can be exploited in the structure of the expert system.
Also, if the experts run under control of the supervisor, it is much easier to coordinate the decisions of the expert systems with the control actions of the supervisor. Since many important uses of expert systems will affect control actions, this is an important factor.
Another advantage of a modular structure, where expert systems are included as independent procedures called by the supervisor, is that the overall process control system is more reliable. A badly or incompletely functioning expert system within an overall supervisor system will affect only the functions it specifically interacts with. However, the failure of a top level expert system, which controls timing and execution of control functions, could disable all supervisor functions. The modular structure also has significant advantages in maintenance and debugging.
Thus, the organization preferably used for process control has substantial advantages. The top level procedure is a cycling procedure which functions as a process control supervisor. The supervisor process can call on one or more expert system procedures, and the user can call on a build-expert procedure which can reconfigure one of the expert systems already present, or create a new expert system. The supervisor procedure can preferably also call on a historical data base.
The modular organization described i5 especially advantageous, as discussed above, in providing parallelism and branching in control strategies. This is especially advantageous in process c~ntrol ~ituations, since the appropriate strategies for different oircumstances can be fully pre-defined by the user, and he can rapidly switch between pre-defined strategies s the need arises.

Historical Process Database The use of a historical database of process data n combination with a process supervisor procedure and/or expert system procedure is particularly advantageous.
In the presently preferred embodiment, a historical database is used which can provide a time-stamp with each piece of output data, to clearly indicate provenance, and can retrieve the stored data (for a given parameter) which bears the time-stamp closest to a given time. The historical database can preferably maintain a record of continuously measured process data (such as temperature, pressure, flow rate), as well as discretely sampled, time-delayed measurements, such as laboratory measurements. The database greatly facilitates the use of laboratory (or other sampled type) measurements. Because of the time delay in making laboratory measurements, the value of the measurement when it becomes available in the database will correspond to the continuously measured data for the instant at which the measurement sample was actually taken, which might be several hours in the past. The historical database allows time delayed measurements and their corresponding continuous measurements to be used together. This is ad~antageous for balancing componen~

1~75~
material flows in the process. In the presently preferred embodiment, the historical process database may be thought of as providing a way to "bufer" time-stamped data and provide a st~ndardized data interface, but it also pe~mits other functions to be served.
The historical database also advantageously provides a basis for statistical tests. So~e statistical tests will require a number of past measurements, which can be retrieved ~rom the database.
The database also advantageously allows the calculation of time average values of measurements. This can be useful in dampening noisy signals for use in a control action. In general, the database advantageously serves to buffer data input from a number of sources, standardizing access from the supervisor and expert procedures.
One of the innovative teachings in the present application is an integrated system for process control in which a process supervisor procedure (which is preferably the top-level procedure) is configured as a modular software structure, with modules which can be revised by a user at any time, without significantly interrupting the operation of the process supervisor.
The supervisor can define control parameters for many process control procedures, and can retrieve data from many sources (preferably including a historical database of process data, which can provide time-stamped data~.
The supervisor can also call on various expert subprocedures. Preferably the expert subprocedures can also be modified by an authorized user at any time, by calling up and editing a set of natural-language rule templates which correspond to the rules being executed ~y the expert subprocedure.
One of the innovative eachings in the present application is an integrated system for process control ~X9~ 60 in which the user can customize the process supervisox procedure with reference to a standardized data interface. The data values to be used by the supervisor are specified in the standard interface by two identifiers. T~e first identifies which (software) system and type of Yalue i'5 desired. The value of a setpoint in a particular distributed sontrol system, the value of a sensor measurement in a particular process monitoring system, the value of a constraint fxom a process control or supervisor system, and time averages of sensor measurements from a particular historical database are examples of this. The second identifier specifies which one of that type of value is desired, for example the loop number in the distributed control system.
Data values specified through the standard interface may be used as measured values, manipulated values, or as switch status values indicating an on/off status. Preferably the interface allows the user to specify data in any of the relevant process control and data collection systems used for the process, or for related processes~ Preferably, the interface also allows specification of data (both current and historical) in a historical process database. Since multiple control systems (or even multiple historical databases) may be relevant to the process, the standard interface greatly facilitates the use of relevant data from a wide variety of sources.

1 ~75 ~
~ F- ~SCRIPTION OF THE DRA~ING
The present invention wil] be described with ref~rence to the accompanying drawings, wherein:
Figure 1 schematically shows the structure of hardware and procedures pr~ferab]y used to emhody the novel process control syste~ with expert system capabil-ities provided by various of the innovative features contained in the present application.
Figure 2 is a schematic represPntation of the flow of information in the expert system structure preferably used.
Figure 3 shows the template used for a retrieval rule in the presently referred embodiment, together with a sample of a retrieval rule which has been entered into lS the template.
Figure 4 shows an example of a different kind of retrieval rule, known as a calculation rule.
Figure 5 shows an example of an analysis rule.
Figure 6 shows the presently preferred embodiment of the template fsr action rules, and an example of one action rule which ~as been stated in this format.
Figure 7 ~hows an example of a chemical synthesis processing layout in which the method taught by ~he present invention has been successfully demonstrated.
Figure 8 ~chematically ~hows the structure prefera~ly used for a supervisor procedure and a build-supervisor procedure.
Figure 9 shows a menu which, in the presently preferred e~bodiment, is presented to the user by the build-supervisor procedure to select a template to provide user inputs to de~ine or modify a block within the supervisor procedure.
Figures 10-13 show specific templates which, in the presently preferred embodiment, ~re presented to the user by the build-supervisor procedure to provide input to define or modify a feedback, feedforward, statistical filtering, or program block, respectively.
Figure 14 shows a block-editing utility menu presented to the user, in the presently preferred embodiment, ~y the build-supe~rvisor procedure.
Figure 15 shows a flow chart for the base cycle procedure used in the supervisor procedure in the presently preferred embodiment.
Figure 16 shows a menu which, in the presently preferred embodiment, is the top-level menu presented to the user by the build supervisor procedure, and Figure 17 shows a menu which is the top-level menu within the build-expert procedure.
Figure 18 is another schematic representation of the interrelations among the various proc~dures which permit user customization of functionality.

56~

DESCRIPTION OF ~HE_PREFERRED EMBO~IMENTS

5eneral Oruanization of ~ardware and Procedy~s Figure 1 schematically shows the structure of hardware and procedures preferably used to embody the novel process c~ntrol sys~em (with expert syste~, capabilities) provided hy various of the innovative features contained in the presPnt application. An underlying process (for example a chemical process) is very schematically represented as a single pipe 160, on which sensors 156 and one actuator 158 are explicitly shown. Of course, real woxld examples are substantially more complex; Figure 7 shows the chemisal process flow of a sample system in which the presently preferred embodiment has been successfully demonstrated. The various actuators 158 are controlled, in accordance with feedback signals received from various sensors 156, by one or more controll~rs 154.
In the presently preferrPd embodiment, th~
controller 154 is configured as a pneumatic proportional, integral, derivative (PID) controller.
However, a wide variety of other controller technologies and configurations could be used. Pneumatic controllers are used in this example because they are common in the chemical process industry, and match well with the feedback requirements of chemical process control.
Alternatively, an all-electronic distributed control system could be used instead. Moreover, the controller functionality could be different, e.a. a proportional~integral controller or a proportional controller could be used instead. In the presently preferred embodiment, the PID controller 154 is directly controlled by a computer control system 152. (This system 152 is referred to, in the various examples of user menus shown, as "PCS" (process control system.) The 6(~

computer controller system 152 and the PID controller 154 may be regarded together as a sinyle first level controller lS0, and could easily be configured in that fashion (as with a distributed digital control system) to implement the present invention.
The control system 150 receives at least ssme of its parameters 132 (e.q. setp~ints or feedforward ratios) from a supervisor procedure 130, which is preferably a higher level of control software. (In many of the sample user menus and fo~ms shown, the super~isor procedure 130 is referred to briefly as "ACS.") The supervisor not only receives inputs ~57 indirectly (or directly) from various sensors 156, it also receives lab measurement data 162, and also can issue calls to and receive inputs from the expert system 120, as will be described below.
In the presently preferred embodiment, the supervisor and build-supervisor procedures run on a minicomputer ~e.a. a VAX 11/785), while the computer control system 152 is a PDP-ll.
The supervisor 130 is preferably also connected to a historical process data base 140, which directly or indirectly receives the inputs from the sensors 157 and the off-line lab measurements 162. Thus, when the supervisor needs to access a value 157 or 162, it is not necessary for it to call on a physical device or read a real-time signal. It can simply call a stored value (together with a time stamp) from the database 140.
However, many of the advantages of the present invention could also be obtained without using the historical process data base 140.
In addition, the supervisor 130 preferably also embodies a - statistical control system. Statistical control systems, as are well known in the art of chemical processes, are advantageous when the proces ~ o'5~
characteristic:s and measurement charac~eristics are subject to significant random variation, as they normally are in the chemical process industry.
Statistical filtering tests are preferably performed to filter out statistically non~al variation, and ascertain whether a process has signi.ficantly deviated from its current goal or average. (Alternatively, the statistical filtering functions could be performed elsewhere in software, e.a. in the database software.) The supervisor procedure 130 is preferably run as a cycling process, and can call multiple expert systems 120 when indicated. (In many of the sample user menus and forms shown, the expert and build-expert procedures are referred to briefly as "PACE.") A sample realistic process context (in which numerous innovative features have been successfully demonstrated) will first be described. The operation of the historical process databasP will next be described, since that provides a standardized data interface to which many of the other functions connect. Next, the ~unctioning of the build-supervisor procedure will ~e described in detail, since that provides many details of how the supervisor is configured in the presently preferred embodiment, and after that the organization of the supervisor procedure itself will be discussed in greater detail. In later sections, the structure oP the expert systems preferably used will be described in detail, and the operation of the build-expert procedure which constructs the expert systems will also be described in detail.
SamDle Process Context Figure 7 schematically shows a sample embodiment of a chemical process incorporating several novel features described in the present application. The system shown is one in which various novel aspects set forth in the 756(~ .

present appli~ation have been advantageously demonstrated.
It should be understood that the present invention pro~ides a tool of very broad applicability, which can be used in many processes very different from that of Figure 7. Thus, for example, various of the claim~
herein may refer to sensors which sense "conditions" in a process, or to actuators which change "conditions" Ln a process, without reference to whether one sensor or many sensors is used, whether one or several parameters is sensed by respective ones of the sensors, whether the actuators are valves, motors, or other kinds of devices, etc.
Figure 7 shows part of the distillation train sf a process in which paraxylene is air oxidized to make - terephthallic acid, which is then ~sterified with methanol and refined to dimethyl terephthallate (DMT).
DMT is sold as a bulk product, and commonly used as a polyester precursor. The esterification process will produce a significant fraction of the impurity methyl formyl benzoa~e (MFB). One of the key objectives in a DMT synthesis process is controlling the compositional fraction of MFB, since it affects the properties of products made from DMT. The refining train shown in Figure 7 will reduce the average MFB fraction to a fairly constant level~which is (in this example) about 22 ppm (by weight).
The crude feed 702 will typically have a composition which is (by weight) about 74% DMT, about 20% orthoxylene (and related components which tend to recycle with the orthoxylene), about 5% methyl hydrogen terephthallate (MHT), and about 0.2% of methyl formyl benzoate (MFB). The MFB-depleted product 740 is preferably further refined to reduce the MHT fraction.

The crude feed 702 is fed into approximately the middle of a first distillation column 710. The column 710 is heated at its base by a st am reboiler 712. The steam flow is controlled by a flow controller 714 ~which is connected to an actuator 716 and a sensor 718.) Similarly, the feed flow con1:roller 704 is connected to an actuator 706, and a sensor 708. The column 710, as operated in the presently preferred embodiment, has internal pressures and temperatures which range from about 230 Torr at about 230- C at its bottom to about 55 Torr at about 70 C at its top. The vapor stream 720 is passed through a condenser 722, and some of the resulting condensate is fed back into the column as reflux 724. The product stream 726 has a mass flow rate of about 20~ of the crude feed 702, and is recycled. A
bottom product 728 is fed to the top of a second distillation column 730. The second distillation column has a steam reboiler 732 near its bottom (controlled by a steam flow controller 734, actuator 736, and sensor 738). The pressures and temperatures in the second colu~n 730 (which in the user screens of the presently preferred embodiment is frequently referred to as the "~FB column") ranse from about 240- C at about 235 Torr at tha bottom of the column to about 70 Torr and about 190- C at the top of the column. The bottom product 740 of the column 730 ~which has a mass flow of about 0.8 of the crude feed 702) is the MFB-purified product. (In this product the fraction of MFB will on average have been reduced to about 22 ppm, for the conditions given.) The top product 742 of the column 730 is passed through a condenser 744 and reintroduced into column 710 as a bottom feed. (Column 710 is referred to, in the ~pecific example given below, as the "xylene columnn.) The mass flow in the loop 728/742 is quite large;

129'7S6~3 typically the mass flow of flow 728 will be about three times the mass flow of the crude feed 702.
In addition, a third distillation column, in the presently preferred embodiment, is operated in parallel with a middle section of column 710. This third column 750 is fed a side draw stream 752 from the first column 710. The vapor stream 7S4 of column 750 is passed through a condenser, and part of the condensate is reintroduced to ~olumn 750 as a reflux 758. ~ost of the remaining condensate is reintroduced to first column 710 as an upper middle feed. Similarly, the liquid stream 762 of third column 750 is partly reintroduced as a bottom feed after being vaporized in the reboiler 76~, but is also partly fed back into column 710 as a lower middle feed 766. The additional separation provided by - the third column 750 enhances the net compositional segregation of MFB. The middle product 768 of the third column 750 is a low-flow-rate product flow (typically 0.003 times the mass flow of the'crude feed 702), and this product flow removes most of the undesired MFB
impurity from the system. The temperatures and pressures in the third column 750 range from (in this example) about 230- C at about 260 Torr at the bottom of the column to about 60 Torr at about 125 C at the top of the column. Stream 761 is a small purge stream removing intermediate materials.
In the sample embodiment, the three primary control points for control of MFB composition are the steam feed to the MF8 Golumn reboiler 730, which is controlled by flow controller 734; the steam feed to the xylene column reboiler 710, which is controlled by flow controller 714 î and the feed of crude feed stock to the ~ylene column 719, which is controlled by flow controller 704.
Numerous other controllers, pumps, and other process equipment maintain the temperatures, pressures, and flow ~X~7t~

rates at other points in the process. In accordance with principles well known in the art of chemical engineering, this serves to maintain mass and energy balances and compositional trends con~istent with the ultimate control objective, which is to maintain a high a~d constant purity in the prsduct stream 740.

Historical Process Database In the presently preferred embodiment (as shown in Figure 1), the supervisor 130 receives data primarily through a historical process data base 140, which directly or indirectly receives the inputs from sensors 157 and off~line laboratory measurements 162. Thus, when the supervisor nPeds to access a value 157 or 162, it is not necessary for it to call on a physical device or 15 . read a real-time signal, since it can simply call a stored value (together with a time stamp) from the database 140.
In the preferred embodiment, every data value provided by the historical database has a timestamp attached. Data are received in at least two ways: first, some parameters are received as nearly continuous data flows (more precisely, as high-sampling-rate time series). For example, the data 157 from sensors 156 (~g~ temperature sensors) will be received as a series of digital values from analog-to-digital converters 15S.
In the presently preferred embodiment, compression algorithms are used to reduce the storage requirements of this data, and permit a usefully long period of time to be represented without requiring impractical amounts of storage space. However, this operation (which includes both compression and decompression algorithms) is essentially invisible to the supervisor procedure 130.

:~2~7~
Secondly, lab analysis data ~62 can also be stored in the historical database 140. For example, compositional measurements must normally be done off-line. A physical sample will be pulled from the physical process flow and sent to the la~oratory for analysis.
The resulting lab analysis value is entered into the historical database, timestamped with the time the sample was taken.
A third source of data is simulations: running c~ -lo processes can be simulated, using any of a variety of currently available simulation methods, and predicted conditions can be stored in the historical database ~together with the proper timestamp). Thus, for example, control strategies can access data generated by complex real-time simulations.
Thus, many of the advantages of the database 140 derive from the fact that i can provide a timestamp to accompany every piece of data it provides. In addition, in the presently preferred em~odiment, the database also stores the name and units for each parameter. As presently practiced, the database is also able to ~erform a variety of other functions, including monitoring, activating alarms if certain sensed measurements reach certain critical levels, output processing (i.e. loading data out to physical devices), generating plots of selected parameters over time, as well ~s other common database functions (e.~. generating reports).
Th~s 6tructure is quite flexible: for example, in alternative embodiments, one supervisor procedure could interface to multiple dat~bases 140, and/or one database 140 could receive calls from more than one supervisor procedure 130 (which optionally could be running on different systems).

56~) Su~ervisor and Build-SuPervisor Procedures The present appli~ati~n describes some ver~
advantageous features of novelty in the 6upervisor procedure 130 and build-supervisor procedure 810, which could optionally and less preferably be incorporated in embodiments which did not include at least some of the innovative features described in the context of the expert and build-expert systems 110 and 120.
The supervisor procedure 130 preferably used contains a modular so~tware structure which greatly facilitates initial setup and also modification~
Prefera~ly the supervisor procedure 130 is a cycling procedure constructed as a set of blocks. That is, each block defines a core procedure which (as seen by the user, both initially and whenever called up for modification) is substantially self-contained, and which (in the presently preferred embodiment) is of one of four types. Preferably each block is either a feedforward block, a feedback block, a statistical filter block, or a program block. (That is, preferably each block is configured by user inputs to a template for one of these block types.) Preferably each kind of block also has the capability to call a user subroutine, and in fact the "program blocks" used in the presently preferred embodiment perform no other function.
The functional templates and data interface definitions for the most commonly used functions are pre-defined, but the user can also add code of his own if he wishes to do so. Providing standardized templates for the most co~monly used functions expedites initial functional definition, and also facilitates maintenance, but sophisticated users are not prevented from writing their own customi~ed functions (such as messaging).
Feedback blocks are used when a manipulated parameter must be adjusted to keep a measured paramet~r ~Z~756~3 near a desired goal. Feedforward blocks are used when tw~ parameters (which are n~t necessarily in a causal relation) are linked, e. when a manipulated parameter must be adjusted to keep it: in some ratio (or other relation) to a measured parameter. Statistical filtering blocks are used, in the presently pre~erred embodiment, to provide the advantages of statistical process control, and to facilitate minimizing the number of control parameter adjustment actions.
Preferably a maximum nu~ber of blocks is pre-defined. (In the presently preferred embodiment, 200 blocks is the preset maximum, and this number i5 large enough to serve the control needs of several different systems simultaneously.) The imposition of a maximum helps to maintain the software, by limiting the number of functions which can be crowded into any one software structure, and by motivating users to delete obsolete block definitions.
Thus, a software structure like that described can be used to control several systems and/or used by several users. The provision of "ow~ership"
identification for each block, which may optionally be combined with access privilege restrictions, advantageously helps to preserve maintainability in multi-user environments.
Figure 8 shows the preferred organization of the supervisor procedure 130. The top level loop (shown as a base cycle controller procedure 802), which calls the various blocks 851, 852, 853, ..., sequentially, is preferably a cycling procedure. For example, the dormant time waiting hlock 891 might be set, in the dimethyl terephthalate synthesis application described, so that the base cycle procedure 802 is executed every 15 minutes (and therefore the entire sequence of blocks 851 etc. is called for possible execution every 15 minutes).

~2~756~

The base cycle proc dure also preferably performs some overhead function~. For example, the base cycle procedure 802 optionally contains the appropriate commands for bra~ching on interrupts 804, and for initialization after a start: command 806. Secondly, the base cycle proc~dure 802, upon calling each ~lock, will pre~erably look at the header of the block ~which is stored as data in shared memory, as discussed below), and usually also at some external information, such as the system clock value or the time stamp of a variable, to see i~ that block is due to execute. In the presently preferred embodiment, each block will also have status flags which indicate whether it may be executed, and will also have timing options which can be used by the user to specify, for example, that a particular block is to be executed only every 175 minutes.
The base cycle procedure 892 is not the only procedure which is relatively "high-level" with respect to the blocks 851, 852, etc. The build-supervisor procedure 810 is able to present the user with templates 812, and to (effectively) change the operation of the blocks 851, 852, etc., by changing shared memory values in accordance with the user's inputs to the templates 812.
That is, the real time control actions of the supervisor procedure blocks are supervised by the base cycle procedure 802. The base cycle procedure is responsible for determining when blocks are on/off, when blocks should be initialized, and when blocks should be executed. It also controls the timing of the base scan through all blocks.
In the presently preferred embodiment, each time the base cycle procedure executes a block, it checks the block type label (in shared memory) and calls the appropriate subroutine. That is, a single block of 129~S~O
executable code is us~d for all of the feedback blocks, and similarly another block of cc,de is used for all the feedforward ~locks, etc., so that all 200 blocks require only four subroutines for their standard functions. Each time the base cycle routine executes a feedback block, it calls up the user-defined parameter set for that particular block, and passes those parameters to the subroutine which performs feedback functions in accordance with those parameters.

Base Cvcle Procedure Figure 15 shows a flow chart of the logic preferably used in the base cycle procedure 802. The sequence of actions used in the main control program, when it is first started (e.q. by submitting it to a job queue) is:
- Chec~ to see if more than 30 minutes has passed since the last control cycle in the supervisor procedure. If so, initialize all blocks whose status is "On", "Active", or "Just turned on". ~Initialization sequence is given below).

Start the control cycle loop: (This loop is shown ~s 1510 in the flow chart of Figure 15.) - S e t t h e- s y s t e m s t a t u s t o "Running-Comp~ting".
- Compute the next cycle time by adding the base scan interval to the current time.
Start a loop through all blocks, starting with block number 1 and counting up to the maximum number of blocks (This loop i5 shown as lS20 in the ~low chart of Figure 15):
- Check block status-* Get the switch status of the block. If the block is switching with an external ~witch ~r,r,s parameter, get its status. ~The switch status will be "On" if the external switch is on, or "Off" if the external switch is off.) If the loop is switched manually, the switch status is the same as the block's current status.
~ If the switch status is "On", "Active", "Toggled on", or "Just turned on", the block is on.
* If the block is on, and the current block status is not "On" or "Just turned on", then the block is just being turned on. Set the Block Status to "Just turned on".
* If the block i5 on, and the current block status is l'On" or "Just turned on", then the block is continuing to be on. Set the Block Status to "On".
* If the block is not on, it is off. Set the block status to "off".
- If the block status is "Off", "Inactive", or "Failed", loop back up and start the next block.
- If the bloc~ status is "Just turned on", INITIALIZE the block (These steps are shown as 1524 in the flow chart of Figure 15):
* If the block has a measured variable, set the "Last measured time" equal to the current time of the measured variable.
~ * If the block has a ~ey block, set the "Key block time" equal to the "Last execution time" of the key block.
* Set the "Last execution time" of the block to the current time.
* If the block is a feedforward block, set the "Old measured value" equal to the current value of the measured variable.
- If the block has a ~easured variable, get its current time.

~3~75 - If the block has a key block, get its las~
execution time.
- I~ the block timing option includes Cixed interval, and if the elapsed time since the "last S execution time" of the block is greater than or equal to the execution time interval, set the execute flag for the block.
- If the block timing option includes keying off the measured variable, and if the current time of the measured variable is more recent than the "last measured time" of the block, set the "last measured time" for the block equal to the current time of the measured variable, and set the execute flag for the block.
- If the block timing option includ~s keying off another block, and if the last execution time of the Xey block is more recent than the "key block time", set the "key block time" equal to the last execution time of the key block, and set the execute flag for the blocX.
- If the execute flag for the block is set, set the last execution time for the block equal to the current time, and execute the block. Only execute the block once, even if more than one timing option was satisfied. (The block execution procedures are discussed in greater detail below, and are shown generally as 1530 in the flcw chart of Figure 15~) - If more blocks need to be processed, loop back to the next block.
This is the end of the loop 1520 through all the blocks.
- Set the system status to "Running-Sleeping".
- Set a wake up timer for the next cycle time computed above, and go to sleep until the timer expires, or until awakened by a request to terminate the program.

~2~7~
- Wake up. Check to -ee if interrupted to terminate. If so, et the system status to 'JTerminated normally", and stop completely.
- If not terminated, branch back to the star~
of the control cycle loop 1510.

SamDle Source Code The source code for the procedure which actuall~
performs this function, in the presently preferred embodiment, is as follows. Due to the formatting requirements of patent applications, some portions o this and other portions of source code provided herPin contain statements which are wrapped across more than one line (and hence would need to be restored to single-line format, or appropriate leaders inserted, before being loaded for execution); but thosP skilled in the art will readily recognize these instances, and can readily correct them to produce formally perfect code.
Table 1 C**********************************
C

C Control.~or C Main control program for the Advanced Control C System, C a high level optimization and control system C running on the Vax, using Vantage facilities.

C**************************~********
C Program Control Include 'ACS~includes:Block parameters.inc/nolist' Include 'ACS$includes:Van functions.inc/nolist' Include 'ACS$includes:Sys functions.inc/nolist' Include 'ACSSincludes:Manlp Params~in Include 'ACSSincludes:Meas ~arams.inc' Include 'ACS$includes:Filter Params.inc' Include 'ACS~includes:ACSserv.inc' Include 'ACS$includes:ACSstatus.inc' Integer*4 Block Integer*4 Integer Now Character*20 Character now 12:9756f3 Inte~er*4 Timbuf(2) Integer*4 Measured time_stamp Integer*4 Key ~lock exec time Logical*2 Execute block Logical Success Logical First Character~18 Debug time ~ogical Force initialization Parameter (Force_initialization = .True.) Logical Dont force initialization Parameter (Dont force initialization = .False. ;
Integer*2 Meas_type Integer*2 Meas_var Integer~2 Filt_type Integer*2 Filt_var C

Integer~4 Event flag state Integer*4 Timer_flag Integer*4 Interrupt_flag Character*9 Cluster_name Parameter ( Cluster name = 'ACS FLAGS' ) Integer*4 Flag mask C
Logical Interrupt_flag_set Interrupt flag set() = Btest(Event flag state,1) Timer flag - 64 Interrupt flag = 65 First = .True.
Flag mask ~ O
Flag mask = Ibset ( Flag mask , O ) Flag mask = Ibset ( Flag mask , 1 ) C

C...Record control program startup in the log file C

Van status = Vss$ from ascii time ( ' ' , Integer now ) Van status ~ Vss5 to ascii time ( Integer now , 1 Character now ) Write (6,*) ' Started the ACS control program at ', 1 Character now C

C...Create the event flag cluster , clear interrupt flag C

Sys status = Sys~ascefc ( %Val(Timer flag ) , 1 %descr(Cluster name) , O , ) Sys status = sys$clref ( %val(Interrupt flag )) C...Check to see if ACS control has been down for more than C 30 minutes. If so, lnitialize all active blocks.
C

Van status = Vss$ from_ascii time ( ' ' , Integer now ) ~g756~3 If ( Integer now - Integer_next_cycle .gt. 30*60 3 ThPn Do 10 Block = l,Max blocks If ( ( Block status~81Ock)(1:2) .eq. 'On' ) .or.
1 ( Block_status(Block)(1:6) .eq. 'Active' ) .or.
1 ( Block status(Block)(1:14) .eq. 'Just turned on' ) ) 1 Call Initialize_bloc]c ( Block ) Continue End If C
C....The main block control loop 1 Continue C..~.Set system status to Running C

System status - 'Running-Computing C

C...Set Wake up time to ACS base scan minutes from now C

Van_status = Vss$_from ascii_time ( i ~ , Integer now ) Van status = Vss$ to ascii time ( Integer now , 1 Character now ) Integer next_cycle = Integer_now + ACS_base scan*60 Call Vss~_get systime t Integer next cycl~ , Timbuf ) C
C....Loop through all the blocks C

Do 100 Block = l,Max blocks C

C....Update the block Status from the info coming from PCS
C

Call Check block_status ( Block ) C...Check the block status, if inactive or off, skip it C

If ( ( Block status(Block)(1:8) .eq. 'Inactive' ) .or.
1 ( Block status(Block)(1:6) .eq. 'Failed' ) .or.
1 ( Block statu~(Bleck)(1:10) .eq. 'On-holding') .or.
1 ( Block status(Block)(1:3) .eq. 'Off' ) ) The Go To 100 End if d If ( First ) d 1 write(6,*) ' Block: ',block,' Status = ' 1 block_status(block) C

C...If the block has just been turned on, initialize it If (BlocX status(81Ock)(1:14) .eq. 'Just turned on' ) Then Call Initialize block( Block ) End if C....Check to see if it is time to execute the block c;~o c C...... Use appropriate calls for the block type C

If ( 1 ( Block type ( Block )(1:8 ) .eq. 'Feedback' ) .or.
1 ( Block_type ( Block ~ 11) .eq. 'Feedforward' ) .or.
1 ( Block_type ( Block )(1:7 ) .eq 'Program' ) 1 ) Then ACS status = ACS_get_meas var type t Block , Meas type ) If t Meas type .eq. Cur val van var ) Then ACS status = ACS get_~eas var_num ( Block , Meas var ) Van_status = Vss~g_curtime ( Meas_var , 1 Measured time stamp ) Else Measured_time stamp = 0 End If C

Els2 If ( 1 ( Block_type ( Block )(1:8 ) .eq. 'Shewhart' 1 ) Then ACS_status = ACS get_filtered_var type ~ Block , Filt_type If ( Filt_type .eq. Van var filter ~ Then ACS status = ACS get filtered_var num ( Block , Filt_var - Van_status = Vss~g curtime ( Filt var , 1 Measured time stamp ) Else Measured time stamp = 0 End If End If C

C...Get exec time of key block, if defined C

Key block = Var num2(Block) If ( Key block .ne. Empty ) Then Key block exec time = Last execution time ( Rey block Else Key block exec time = 0 End If C

Execute block = .False.
d If ( First .eq. .True. ) Then d Van STATUS = vss$ to ascii time ( integer now , Debug_time ) d write(6,*) ' Block = ',block d write(6,*) 'Integer now = ',Debug time d Van STATUS = vss$ to ascii time ( last execution time(block) d 1 , Debug time-~
d write(~,*) 'last execution time - ',debug time d Van STATUS - vss$ to ascii time ((-l)*Frequency(block)*60 d 1 , Debug time ) d write(6,*) 'Frequency(block) = ',Debug time d Van STATUS - vss$ to ascii ime ( last measured time(block) d 1 , Debug time ) ~9756S~

d write(6,~) 'last_measured time = ',Debug_time d Van_STATUS = vss$ to_asci3 time ( measured time stamp d 1 , Debug time ) d write(6,*) 'measured_time stamp = ',Debug time d write(6,*) 'timing option = ', Var num3(BLock) d End If C

I timing_option - Var num3(Block) If ( ( I_timing option .eq. Interval ) .and.
1 ( Integer_no~ - Last ex~cution_time(~lock) ~ge.
1 Frequency(Block)*60) ) Then 1 Last_execution time~Block) = Integer now Last measured_time(Block) = Measured_time_stamp Execute_block = .True.
lse If ( I_timing_option .eq.
1 Key_off_measured_variable ,The-.
If ( Measured_time_stamp .gt.
1 L2st measured_time(Block~ ) Then Last_execution time(Block) = Integer_now Last_measured_time(Block) = Measured time_stamp Execute_block = .True.
End If C
Else If ( I timing_option .eq.
1 Rey_off ACS block ) Then If ( Rey block exec_time .gt.
1 Fix time(Block) ) Then Last execution_time(Block) = IntegPr now Last measured_time(Block) = Measured time_stamp Fix time(block) = Key block_exec_time Execute_block = .True.
End If C

Else If ( I timing_option .eq.
1 Intrvl and key off ACS_block) Th-e~
If ( 1 ( Key block exec time .gt.
1 Fix time(Block) ) .or.
1 ( Integer now - Last execution time(Block) .ge.
1 Frequency(Block)~60) 1 ) Then Last execution time(Block) = Integer now Last measured time(Block) = Mea~ured time_stamp Fix_time(block) ~ Key_block exec_time Execute_block = .True.
End If Else If ( I timing option .eq.
~ Intrvl and key off_meas var) Then If ( 1 ( Measured time stamp .gt.
5~

~2!~7~
1 Last measured_time(Block) ~ .or.
1 ( Integer now - Last_execution time(Block) .ge.
1 Frequency(Block)*60) 1 ) Then Last execution time(Block) = Integer now Last_mea6ured time(Block) = Measured time_stamp Fix time(block) = ~ey block exec time Execute block = .True.
End If C

Else If ( I timing option .eq~
1 Key off meas var and block) hen If ( 1 ( ~ey_block exec time .gt.
1 Fix time(Block) ) .or.
1 ( ~easured_time stamp .gt.
1 Last measured time(Block) ) 1 ) Then Last execution time(Block) = Int~ger now Last measured_time(Block) = Measured time stamp Fix_time(block) = Key block exec_time Execute block = .True.
End If C

Else lf ( I timing option .eq.
1 Intrvl and Rey meas and block)Then If ( 1 ( Key_block exec time .gt.
1 Fix time(Block) ) .or.
1 ( Measured time stamp .gt.
1 Last measured time(Block) ) .or.
1 ( Integer now - Last execution_time(Block) .ge.
1 Frequency(Block)*60) 1 ) Then Last execution time(Block) = Integer now Last ~easured time(Block) = Measured time stamp Fix time(block) = Rey block_exec_time Execute block = .True.
End If End if C

C...If Time to execute, call the Subroutine for the appropriate block C ., If ( 2xecute block .eq. .True. ) Then If ( Block type(Block)(l:ll) .eq. 'Feedforward' ) then Call Feedforward block(Block) Else If ~ Block type(Block)(1:8 ) .eq. 'Feedback' ) then Call Feedback block(Block) Else if ~ Block type(Block)(1:7 ) .eq. 'Program' ) then Call Program block ( Block) Else if ~ Block type(Block)(1:8 1 .eq. '~hewhart' ) then Call Shewhart block( BlocX) 7~;6~
End if End if C

100 Continue C

C...All Blocks checked and executed if needed; go to sleep until neede C

102 Continue C

Sys status = Sys$setimr ( %val~Timer_flag) , %ref(Timbuf),, If (Sys status .eq. %loc(Ss$_normal~ ) Then d Write(6,*) ' Successfully set timer.' Else Write(6,*) ' Error return from setimr in Control at ', 1 Character now End If System_status = 'Running-Sleeping Sys status = SysSwflor ( %val(Timer flag) , %val(Flag_mask) If ( .not. Sys status ) Call LibSsignal(%val(Sys_status)) Sys status = sysSreadef ( ~val(Timer flag ) , 1 %ref(Event flag state) If ( .not. Sys status ) Call LibSsignal(~val~Sys status)) c If ~ ( Sys status .ne. %loc(Ss~ wasclr) ) .and.
1 ( Sys_status .ne. %loc(Ss$ wasset) ) ) Then Write(6,~) ' Problem reading event flag status' End If C

C.. Test the interrupt bit- if set, process the request If ( Interrupt flag set() ) Then d Write(6,*3 Igot an interrupt' Call Shutdown ( Event flag_state ) Else d WRite(6,*) 'Timer expired.' End I f C
First - .False.
Go To 1 C

End Copyright (c ) 1987 E. I. DuPont de Nemours & Co ., all rights reserved 1~9~7~i6~

Build-Supe~visor ~rocedure The build-supervisor procedure 810 presents templates 812 to the user and stores the user responses to these templates in a ~Iglobal section" portion of S memory (~ a shared or co~monly accessiole portion of memory). That is, the user inputs to the templates for the various blocks B51, 8S2, etc., are stored where the base cycle procedure 802 can access them and the build-supervisor procedure 810 can also access them. Thus, an authorized user can at ~ny time interactively call up data from shared memory space 814, see these parameters in the context of the templates 812, and modify the functions of the various blocks 852, 853, etc. and/or define new blocks ~and/or delete existing blocks), while the base cycle procedure 802 continues to call the various blocks on the appropriate schedule. That is, the base cycle procedure 802 is preferably a cycling procedure which satisfies the real-time process control demands of the underlying process, while the build-supervisor procedure 810 retains the capa~ility for reconfiguring the operation of the various blocks in the supervisor, according to user input.
It should be noted that the structural features and advantages of the build-supervisor procedure are not entirely separate from those of the supervisor procedure. The two procedures are preferably operated separately, but they provide an advantageous combination. The features of the supervisor procedure are partly designed to advantageously facilitate use of the build-supervisor procedure, and the features of the build-supervisor procedure are partly designed to advantageously facilitate use of the supervisor procedure.
In the presently preferred embodiment, the nexus between the build-supervisor procedure and the ~29~56~

supervisor procedure is somewhat different ~rom the nexus between the build-expert pr~cedure and the operating expert procedures. The user entries made into the more constrained parts of the templates can be transferred fairly directly to the operating supervisor procedure: the build-supervisor procedure stores values (corresponding to the data input by the user in the accessible ~ields of th~ te~plate-) in a shared section of memory, which is immediately accessible by the supervisor procedure as soon as the stored status value for the block is changed to "Active". By contrast, if the customized user routines (including the expert routines generated by the build-expert software) are modified, they must be compiled and linked with the supervisor procedure.
The build-supervisor procedure 810 preferably also has the capability to stop or restart the base cycle procedure 802, independently of whether the build-supervisor procedure 810 has updated the shared memory 814 in accordance with user inputs to templates 812.

Top-Level_Menu The user who begins an interaction with the build-supervisor procedure is first presented with a menu which (in the presently preferred embodiment) resembles that shown as Figure 16. This menu provides options which permit the user to setup (or modify) blocks, to monitor blocks, to call block-management utilities, to exit, or to go into a structured environment for writing user programs.
If t~e user chooses block setup, he next sees a menu like that shown in Figure 9. This menu is presented to the user by the build-supervisor procedure 810 to select a specific existing template 812' (i.e. a template with the previously defined data values of a 5~i~

particular block are 6hown in the appropriate fields of the template~ or a blank template 812 of a given type to provide user inputs to define or modify a block 851, 852, etc.
This form allows the user to choose which block to enter setup parameters for, and, if the block is a new one, allows a choice of which type block it will be. To go back to the previous form (in this case the top-leYel menu), he can pr~ss the ~ key on the keypad.
To set up a new block, the user can either enter a block number which he knows is not in use, or the build-supervisor procedure will provide him with the lowest number block which is not in use. To enter a block number, the user can simply type the number in the block number field and press the return key. To get the build-- supervisor procedure to find the lowest number unused block, the user can press keypad 8. The cursor will mov~
to the block type field and the build-supervisor procedure will r~quest that the user enter the number from the list for the type of block desired. The build-supervisor procedure will then present the user with a block setup form for that block type. If the user mistakenly enters a block number which is already in use, the build-supervisor procedure will go directly to the setup form for that block, but the user can simply press keypad minus on the setup form to go back to the block setup selection form and try again. To enter or modify setup parameters for an existing block, the user can simply enter the block number and press the return key, and the build-supervisor procedure will present tAe block setup form for that block.
In the best mode as presently practiced, all four block setup forms have some common features. Keypad 9 will move the cur~Qr from anywhere on the form up to the block nu~ber field. Keypad 8 will find the lowest numh~r ~.'$6~:3 available bloGk and ~et it up as the same block type as the form showing on the scr~een. Reypad 7 tests all the parameters on the block and changes the block status to switch it on or off, or rec~e--ts new data if the user ha~ not yet supplied it. (In addition, many of the para~eters ar checked for gross error as the user enters them.) The various block =etup forms shown as Figures 10 through 13 will be individually described below; but first, some features common to some or all of the block setup forms, and some features characteristic of the operation of the blocks thus defined, will be described.
When a block is turned on, the block status will not go directly to "On." (The full system of block status options (in this embodiment) is described below.) Depending on how the block is set up to be switched on and off, the status will change to 'IToggled on" or "Active". The base cycle procedure will update the status as the block is executed, changing to "Just turned on" and then to "On". When turning a block off, the status will chang~ to "Off" or "Inactive", again depending on how the block is set up to switch. These status sequencing rules facilitate use of initialization and/or shutdown steps in controlling block functionality.
Any time a parameter is entered or changed on a setup form, the block status will be set to "Inactive."
This means that the block parameters have not been checked to assure that everything needed has been entered and is consistent. If a parameter is changed on a block which is currently on, the block must be toggled fro~ "Inactive" to "Active" or "Toggled On" using Reypad 7.

Data Source S~ecification The templates presented to the user for block customization include a standardized data interface. The data values to be used by the supervisor are specified in the standard interface by two identifiers. The first identifies which (software) system and type of value is desired. The value of a setpoint in a particular distributed control system, the value of a sensor measurement in a particular process monitoring system, the value of a constraint from a process control or supervisor system, and tim~ averages of sensor measurements from a particular historical database are examples of this. The second identifier specifies which one of that type of value is desired, for example the loop number in the distributed control system.
For example, in Figure 10 the user has entered "4"
in the highlighted area 1002 after the phrase i'Measured Variable Type:"O This particular identifier (i.e. the value entered in this field by the user) indicates that the variable type here is a current value of a variable from the historical database, and the build-supervisor procedure adds an abbreviated indication of this ("Current Val Hist Dbase Var #") onto the user's screen as soon as the user has entered this value in the field 1002. (If the user entered a different code in the field, a different short legend might be shown. For example, as seen in Figure 10, the user has indicated a variable type of "2" after the phrase "Manipulated Var Type", indicating that the manipulated variable is to be a loop goal of the DMT control system.) As the second identifier, the us~r has indicated a value of "2990" in ~ield 1004, to indicate (in this example) which particular Database variable's current value is to be used. For this identifier too, the build-supervisor procedure adds an abbreviated indication of its ~75~
interpretation of this iden1:ifier ("DMT PRD MFB SHWP~T
DEVIAT") onto th2 user's scre~n ~ soon as the user has entered this value in the field 1304.
Data values specified through the standard interface may be used as measured values, manipulated values, or as switch status values indicating an on/off status. Preferably ~he in~erface allows the user to specify data in any of the relevant process control and data collection systems used for the process, or for related processes. Preferably, the interface also allows specification of data (both current and historical) in a historical process dat~base. Since multiple control systems (or even multiple historical databases) may be relevant to the proc ss, the standard interface greatly facilitates the use of relevant data from a wide variety of sources.

Block Timina Information In the presently preferred embodiment, all blocks except the Shewhart block provide the same block timing options. Block timing determines when a block will perform its control actions. The build-supervisor procedure provides three fundamental block timing options, which can be used in any combination, providing a total of 7 block timing options. The three fundamental options are:
Fixed Time Interval: the block will execute at a fixed time interval. The user specifies the time interval, e . a . in minutes. (Note that a combination of this option and the following has been specified in the example of Figuxe 13, by the user' s entry of "5" into field 1306~) Xey Off ~easured Variable: the block will execute eYery time a new value is entered into the process database for the measured variable. The measured 129'756iif3 variable must be a "sampled" typ variable. (Note that this option has been specified in the example of Figure lO, by the user's entry of "2" into field 1006.) Key Off Another ACS Block: the block will execute every time a (specified) lower numbered block executes~ The user specifies which block will be the key block. Any combination of one, two or three timing options can be used. Blocks uslng a combination timing option execute whenever any of the specified timing options are satisfied. (Note that this option has been specified in the example of Figure 11, by the user's entry o~ "3" into field 1006.) Block timing options are represented on the setup forms by a number code. The user enters the number code corresponding to the desired timing option. If the timing option includes fixed interval timing, an execution time interval must also be specified. If the block is to key off another block, the key block number must be specified.
In future alternative embodiments, the block timing options set forth here may be especially advantageous in multi-processor embodiments: the separation of the control action specifications in multiple ~locks shows the inherent parallelism of the problem, while the keying options in which one block keys off another show the block sequencing constraints which delimit the parallelism. The standardized data interface used in the presently preferred embodiment may also be advantageous in this context, by allowing block execution to be keyed off events external to the supervisor.

Primarv Block Switchina The supervisor procedure provides several ways to switch block actions on and off. If the block needs to be turned on and off by an operator, the build-~29~5~1 supervisor procedure allows the user to pecify an external switch system and a switchable entity within that system which the block on/off status is to follow.
For example, the user may specify a specific control system and a loop number within that system. The block will turn on when that loop i5 on, and off when that loop is off. The standardized data interface allows any accessible control syst~m to act as the switch system.
As a further alternative, the blocks can be se~ to switch on and off only under the control of the developer (i.e. under the control of the build-supervisor user). I~ this case, the block can only b~
switched using the toggle on/off function on the block setup form.
The external switch system is represented on the - block setup forms by a number. The user enters the number corresponding to the external switch system he wants to use. The entity within the switch system (e.q the loop number] is entered in the next fi~ld. (In the example of Figure 10, the user entries in fields 1008 and 1010 have specified an external switching variable.) If the block is to be turned on and off only from the build-supervisor procedure setup form, a zero is entered for the switch system number, and the word "Manual" will show in the field for the switch entity number. (This option has been selected in the example of Figure 13.) Secondary Block Switchin~
The supervisor also provides secondary means of controlling block execution. Blocks which have been turned "on" by their primary switch contxols may be "sel~cted", "de-selected", or "held" by programmatic requests. The ctatus of selected blocks changes to "On-selected". Selected blocks continue to function as if they were "On". The status of blocks which are ~ 29~7~;6~
deselected by programmatic request changes to "On-deselected". De-selected blocks take no control action. However, they differ from blocks which are "off" because they continue to maintain all their S internal information so that they are always ready to execute if "selected". The status of blocks which are held by programmatic request changes to "on- holding".
The programmatic request includes the length of time the block is stay on hold. Blocks which are holding act as if they were off. When the holding time expires, the status of holding blocks changes to "Just turned on, ~?
and they initialize.
One advantage of these block switching options is that they provide a way to embed alternative control strategies in the supervisor procedure. That is, control strategies can be readily changed merely by selecting some blocks in the supervisor procedure and/or deselecting other blocks. This is adYantageous in terms of software docl~mentation, since it means that alternative control strategies can be documented and maintained within the same software structure. It is also advantageous in interfacing to other procedures:
for example, the expert systems called by the presently preferred embodiment will frequently take action by selecting and/or deselecting blocks of the supervisor procedure.
These block control options facilitate the use of one supervisor procedure to interface to multiple controllers, and the use of one supervisor procedure by different users to control different proçesses. The block status system permits one or more blocks to be updated without interfering with the running supervisor process; in fact, in optional environments, multiple users could be permitted to update different blocks at the same time.

~X~7~
Bloc~ DescriDtiQ~-Elel~
All ~locks allow the user to enter three descriptive fields. These ~ields are for user re~erence and can be search~d when printing lists of bloc~
p~rameterS. ~hey have no eff~ct on blook actions. The "control application name" field allows the user to group blocks that are part of the ~am~ control appli~ation by giving them all the same application name. ~In the example o~ Figure 10, the user ~ntry in ~ield 1014 has specified "MFB Control". Note that th~
examples ~f Figures 11, 12, ~nd 13 show corresponding entries in this field.) The ~loc~ description field allows the user to describe the block's speci~ic action or purpose. (In the example of Figure 13, the user entry - in ~ield 1316 has explained that this is a "Block to run expert deciding where to ~ake MFB feedback action".) The ownership ~ld speci~ies which usar has control of the block. (In the example of Figure 10, the user entry in ~ield 1012 has specified "Skeirik". Note that the examples of Figures 11, 12, and 13 show corresponding entries in this field.~ ~his field facilita~es use of the organization described in environments where multiple users are defining blocks which run within the same supervisor procedure.
Of course, in multi-user environments it may be desirable to allow some users a greater degree of access than others. Thus, for example, some users ~ay ~e authorized to ~dit a block, while others may be 39 authorized to toggle the block on or of~ but no~ to edit it, and others may be authorized to monitor block operation but not authorized to change it. Similarly, ~ccess to expert ~ystem~ may be constrained ~y giving greater authorization to some users than to others; some u~ers ~ay be permitted to make calls to the expert ~2~375~(~
system but not ts edit the rulebase, and other users ~ay not be permitted to do either. In the presently preferred embodiment, all o~ these choices can readily be implemented by using the file ownership and access control list options available in the VMS operating systems, but of course this functionality could be implemented in many other ways instead.

Action Loaainq The supervisor procedure provides a means of reporting control actions and/or logging them in a file for recall. Control action messages are written by a user routine. Control blocks call user routines aft~r their control actions are complete, and pass data regarding their actions. The action log file field 15 . allows the user to enter the name of the file to which logging messages will be written. The same log file can be used for more than one block (e.~. if the two blocks' actions are part of the same control application). (For example, note that field 1018 in the example of Figure 10 and field 1118 in the example of Figure 11 both specify "MFBC0NTROL" as the action logging file.) The log file name is limited to letter and number characters, and no spaces are allowed (except after the end of the name).
Block Status Note that, in the example of Figure 10, a block status of "On-selected" is displayed in area 1020. This is not a field into which the user can directly enter data, but it will change in response to user actions (e.~. the user can toggle the block on or off by hitting keypad 7). The block status codes used in the presently preferred embodiment reflect several aspects of blocX
setup and execution, including:
Proper configuration of block parameters;

~297560 On/off status of block;
Failure of block actions; and Failure of user routines.
Some common block status values are:
"Inactive:" this indicates that the block has not been properly configured and toggled on, or that a parameter was changed. This is also the normal "off"
status of a block which has been configur~d to switch on and off with a switch system variable, if the user toggles it off from the setup form.
"On:" this is the normal status for blocks which are performing their control actions.
"Off:" this is the normal status, for a block which has been configured to switch on and off with a switch system variable, when that variable i5 in its off state. This is also the normal status for blocks which are configured to switch on and off through the setup form only and have been toggled off from the setup form.
"Active:" this is the status to which a block is toggled on if it is configured to switch on and off with a switch system variable. This status will change on the next cycle of the control program, to "On" or to another value, depending on the state of the switch system variable.
"Toggled on:" this is the status to which a block is toggled on if it is configured to switch on and off through the setup form only. This status will change on the next cycle of the control program.
~7ust turned on:" this is a normal transition state for blocks going from an "off" status (eg: off, inactive) to "On" status. 81Ocks whose status is "Just turned on" will be initialized by the base cycle procedure, which resets the last execution time and the meas~red variable and key block times used for block ~9~75~0 timing. Feedforward blocks initialize the "old"
measured variable value to the current value.
"On-selected~: indicates that a block which is on has been selected by a programmatic request. The block continues to function as if it were On.
"On-deselected": indicates that a block which is on has been de-selected by a programmatic request.
The block taXes no control actions, but continues to maintain its internal parameters as if it were On. This keeps the block ready to act if selected.
"On-holding": indicates that a block has been put on hold for a specified length of time by a programmatic request. The block takes no control action. A block that has been holding will re-initialize and go back to "On" status when the holding period expires.
"On-Failed usr routin:" this status indicates that a user routine called by this block had a fatal error which was bypassed by the supervisor procedure on the most recent execution of the block. Fatal errors in user routines are reported in the control program log file (not the same as action log files), and can be reviewed using the "List log file" option on the System Functions screen, described in the section on block monitoring.
"On-Recovrd usr Error:" this indicates that a fatal error wa~ bypassed in the user routine, but that the user routine ran successfully on a later execution.
Again, the log file will give more details about what happened.
~'Qn-Err ..... :" many abnormal status values can indicate that problems were encountered in block execution, ~g~ problems in the input or output of data to control syst~ms. The latter part of the status field ~X975'5iV

gives some indication of the problem. Most such errors are also recorded in the control program log file.
Various other block status values can readily be inserted, along the lines ~emonstrated by these examples.

Feedback Bl~cks Figure 10 shows a sample of a template 812 presen-ted to the user to define a feedback block. In the specific example shown, the block being worked on is block number three of the 200 available blocks 851, 852, etc., and the various data values shown in this Figure reflect the entries which have been made at some time to define this particular block.
The feedback block provides proportional feedback action. In feedback action, the user specifies a measured value (called the "measured variable") and a goal value (setpoint) at which he wants to maintain it.
Feedback action calculates the "error" in the measured variable (measured variable value - goal), and computes its action by multiplying the error times the "proportional gain". The current value of the "manipulated variable" is changed by the amount of the calculated action.
The basic feedback action can be altered by several additional parameters. A deadband around the goal can be specified. If the measured value falls within plus or minus the deadband of goal, no action is taken. The amount of action taken can be limited to a fixed amount.
The range over which the value of the manipulated variable can be changed can be limited to keep it within operable limits. Screening limits can be specified on the measured variable value, in which case measured values outside the screening limits will be ignored.

s~

Block timing and switching and the block description fields follow the general outlines given above.
Specifying a feedback block on the block setup selection form (Figure 9) brings up a feedback block setup fo~m, as shown in Figure 10.

Parameters The parameters which the user is asked to specify include:
Measured variable type: a number code representing the software system and the type of entity which the blosk should use for the measured variable.
(A sample response might be a number code indicating a Historical database variable.) Measured variable number: the number of the entity within the specified system which the block will use for the measured variable. For example, if the measured variable type is a histsrical database variable, the measured variable number is the number of the variable in the historical database. After the measured variable type is entered, the label next to this field will show what type of data is needed. When the measured variable number is entered, other fields will also be filled in: the name and units for the measured variable, deadband and goal; units and default va ues for the max and min measured values. If block timing is to key off entry of new data into the measured variable, only discretely sampled variable types can be used.
Goal: the value at which the measured variable is to be "held". The value is ent~red in entered in the units of the ~easured variable.
Manipulated variable type: a number code representing the "target system" - the software package and the type of enti~y which the block should manipulat~. Examples are: con1 rol system loop goal, historical database variable, a setpoint in a distributed control system, or ~ setpoint for a programmable loop controller.
Manipulated variable number: the number of the entity within the target system which the block will manipulate, For example, if the manipulated variable type is a control system loop goal, the manipulated variable number would ~e the number of the loop whose goal is to be changed. The lab~l next to this field will show what type of information is needed; in this case the label would show "Cont Sys loop X"-Proportional gain: the constant relating the change in the manipulated variable to the error. The units of the gain are shown to the right of the field after the measured and manipulated variable have been specified. Control action is calculated:

Error = [Measured variable value - goal value]

Manipulated delta = Error ~ [Proportional gain]

The manipulated delta is added (subject to limits~ to t~e current value of the manipulated variable.
- Deadband: A range around the goal value. If tke value of the measured va~able ~alls within a range defined by the goal plus or minus the deadband, no action is taken Timing option, execution time interval, and Key block nu~ber: these parameters are those described ~bove.
External ~witch system and switch number:
these par~meters nre described above.
ffaximum manip delta: the maximum change tha~

~9~ 0 can be made in th~ manipulated variable's value in one cor~trol action .
Minimum and maximum value of the manipulated variable: limit valu~s outside which control action will not move the value of the manipulated variable. If a computer control action would put the manipulated value outside the limits, the value is set equal to the limit.
If the manipulated value is moved outside the limits (by operator action, for example) the next control action will return the value to within the limits.
Minimum and maximum value of measured variable: Screening limits for reasonable values of the measured variable. Any time the measured variable value falls outside these limits, the value will be ignored and no action is taken.
Action log file: this specifies the name of the log file for action logging.

Feedback Block Operation The sequence of actions performed by each feedback block, when executed by the base cycle routine, is:
- If block status is "On-deselected", do no further actions;
- Get the current value of the measured variable (If not accessible, set status to "On-err...."
and do no further actions);
- Get the current time stamp of the measured variable;
- Test the value of the measured variable. If it is outside the minimum and maximum allowed values, set status to "On-msrd out of lims" and do no further actions.
- Get the current value of the manipulated variable. I not accessible, set status to "On-err ..... " and do no further actions.

~29~5~) - Comput~ the error (= Measured value - Goal).
If absolute value is less than the deadband, do no further actions.
- Compute th~ change in the manipulated variable:

Delta manip = Error * proportional Gain -If the absolute delta is greater that the maximum allowed delta, set it equal to the maximum (maintaining proper sign).
- Compute the new value of the manipulat~d variable:

New ~anip value = Current manip value ~ delta manip If the value is outside the max/min limits, set it equal to the nearest limit. If limited, recompute the delta using the limit.
- Change the manipulated variable value to the new value computed. If not accessible, change status to "On-err ..." and do no further actions.
- Load user array values for use by the user routine.
- If delta manip is not zero, update the past action values and times.
- Call the user routine.

ata passed to the user routine In the presently preferred embodiment, each feedback block is ~ble to pass information about its actions to the user routine, by using a commonly accessible memory block named "User vars." (The use of this data by the user routines is described in more ~97~j6~
detail below.) Th~ data passed by the feedhack block may include:
"User integer(l)" - th~ time stamp of the measured variable (from the database);
"User integer(2)" - the time the action ~as taken;
"User real(l)" - the changs in the value of the manipulated variable;
"User real(2)" - the computed error; and "User_character(l)" - a string (alphanumeric) sequence which describes the block type; for feedbacX
blocks this is set to be = 'Feedback'.

SamDle Source Code The source code for the procedure which actually performs this function, in the presently preferred embodiment, is as follows.
Table 2 C
C Feedhack_block.for C ACS subroutine to do feedback action on the Vax, communicating C directly with the target system.
C
C
Subroutine Feed~ack block ( Block ) Include 'ACS$includes:Block parameters.inc/nolist' Include 'ACSSincludes:Van functions.inc/nolist' Include 'ACS$includes:User vars.inc/nolist' Include 'ACSSincludes:ACSstatus.inc/nolist' Include 'ACSSincludes:ACSserv.inc' Include 'AcsSincludes:TIserv.inc' Include 'Acs$includes:TIstatus.inc' Include 'ACS$includes:Manip params.inc' Include 'ACSSincludes:Meas ~arams.inc' C

~ 29756~

Integer*2 Meas var system Integex*2 Meas var number Inteqer*2 Manip_var system Integer*2 Manip var number Integer*4 Block Integer*4 Measured time stamp Integer*4 Integer Now Charact~r*20 now time Real*4 Measured value Real*4 Current manipulated value Real*4 New manipulated value C...Special handling for 'On-deselected' status - do nothi~g If ~ Block status(Block)(1:13) .eq. 'On-deselected') Then Return End If C

ACS status = ACS get meas var type ( Block , MEAS VAR_system ) Manip var system = Manipulated variable(Block) Manip var_number = New_manipulated variable(Block) D Write(6,*) ' Calling new_feedback - block = ',block C

C...~et the measured value Van_status = Vss$_from ascii time ( ' ' , Integer now ) van_status = Vss~_to a~cii time( Integer now , now time ) C

C... Measured Value is TPA PCS loop goal If ( Meas_var system eq. PCS_TPA_Loop goal ) Then ACS_status = ACS_get PCs goal( 'TPA
1 Measured variable(Block) , Measured value ) If ( ACS Status .ne. Sloc(ACS success) ) Then C... ..........If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal get' Write( 6, *) 'Feedback exit due to measured var not availa write(6,~)' ACS Block: ',block,' at: ',now time Return End If C

C............... Measured Value is DMT PCS loop goal Else If ( MEAS var_system .eq. PCS DMT loop goal ) Then ACS status - ACS get pcs goal( 'DMT ' , 1 Measured variable(Block) , Measured value ) If ( ACS Statu ne. %loc(ACS success) ) Then C......... If PCS goal value not available, don't execute 129~5~3 Block status(Block) - 'On-Err-PCS goal get' Write( 6, ~) 'Feedback exit due to measured var not availa write(6,*)' ACS Block: ',block,' at: ',now time Return End If C

C...Measured Value is ACS block goal C

Else If ( MEAS var system .eq. ACS block goal ~ Then ACS status = ACS get goal ~
1 Measured variable(Block) , Measured value ) If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........If ACS goal Value not available, don't execute Block status(Block) = 'On-Err-ACS goal gPt' Write( 6, *) 'Feedback exit due to measured Yar ~e;: ~.vaila write(fi,*) l ACS Block: ',block,' at: ',now time Return End If C... Measured Value is Vantage variable C

Else If ( Meas var system .eq. cur val Van var ) Then Van Status = VssSg current( Measured variable(Block) , 1 Measured value ~
If ( Van Status .ne. %loc(vss normal) ) Then C....... ....If Variable Value not available, don't execute Block status(Block) - 'On-Failed Msrd var ' Write( 6, *) 'Feedback exit due to measured var not availa write(6,*)' ACS Block: ',block,' at: ',now time Return End If C

end if Van status = Vss$g curtime ( Measured varia~le(Block) , 1 Measured_time_stamp ) C....Check the Measured variable to see if it is within limits C

If ( (Measured value .lt. Measured min(block) ) .or.
1 (Measured value .gt. Measured_max(block) ) ) Then C.. ........Reject the data point Write( 6, *) 'Feedback exit due to out of limts measured' write(6,*)' ACS Block: ',block,' at: ',now time Block status(Block) = 'On-Msrd out of lims ' Return End if C
C.. ;Get the current manipulated value C
C

1;~975~0 C... Target is TPA PCS loop goal If ( Manip vax_system .eq. PCS TPA_Loop ) Then ACS status = ACS get ~cs_goal( 'TPA
1 Manip_var_number , Current_manipulated value , If ( ACS Status .ne. ~loc(ACS_success) ) Then C... ..........If PCS goal value not available, don't execut2 Block status(Block) = 'On-Err-PCS goal get' Return End If C

C...Targzt is DMT PCS loop goal C

Else If ( Manip_var_system .eq. PCS_DMT_loop ) Then ACS_status - ACS get pcs goal( ~DMT ' , 1 Manip var_number , Current manipulated value ) If ( ACS Status .ne. %loc(ACS success) ) Then C....... ......If PCS goal value not available, don't execute BlocX status(BlocX) = 'On-Err-PCS goal get' Return End If C

CTarget is ACS block goal C
Else If ( Manip var system .eq. ACS_block ) Then ACS status = ACS get goal ~ Manip_var number , 1 Current_manipulated value ) If ( ACS_Status .ne. %loc(ACS success) ) Then C....... ~.. ......If ACS goal Value not available, don't execute Block_status(Block) = 'On-Err-ACS goal get' Return End I f CTarget is Vantage variable C

Else If ( Manip var system .eq.
1 Vantage variable ) Then Van Status = Geteuval ( Manip var number , 1 Current manipulated value ) If ( Van Status .ne. %loc(vss success) ) Then C....... ......If Variable Value not available, don't execute Block status(Block) = 'On-Err-Vant var get ' Return End If C

C...Target is Texas Instruments PM550 controller setpoint in CRD
C

Else If ( ( Manip var system .ge. Low PM550 ) .and.
1 ( ~anip var system .le. Hi PM550 ) ~ Then C

If ( Manip var system .eq. CRD_ESCHS_PM550_01 ) Then ACS_status = TI get loop setpoint ( 'TI_PM550 01 PORT' ~2975~(3 1 Manip var number , Current_manipulated value ) Else If ( Manip var system .eq. CRD_ESC~S PM550 02 ) Th~n ACS status ~ TI get loop_setpoint ( 'TI PM550 02 PORT' , 1 Manip var ~umber , Current_manipulated value ) Else If ( Manip_var system .eq. CRD_ESCHS_PM550 03 ) Then ACS_status = TI get_loop_setpoint ( 'TI PM550 03 PORT' , 1 Manip var number , Current_manipulated value ) Else I~ ( Manip var system .eq. CRD ESCHS PM550 04 ) Then ACS status = TI get loop_setpoint ( 'TI PM550 04 PORT' , 1 Manip var_number , Current_manipulated value ) Else If ( Manip_var sy~tem .eq. CRD ESCHS PM550 05 ) Then ACS_status = TI_get_loop_setpoint ( 'TI PM550 0S_PORT' , 1 Manip_var_number , Current manipulated value ) Else If ( Manip_var system .eq. CRD ESCHS PM550 06) Then ACS_status = TI get loop setpoint ( 'TI PM550 06 PORT' 1 Manip var_number , Current manipulated value ) Else If ( Manip_var_system .eq. CRD ESC~S _PM550_07) Then ACS_status - TI_get_loop_setpoint ( 'TI_PM550_07_PORT' 1 Manip_var_number , Current_manipulated_value ) End If If ( ACS_Status .ne. %loc(TI_success) ) Then C....... ......If PM550 setpoint value not available, don't execute Block_status(Block) = 'On-Err-TI setpnt get' Write( 6, *) 1 ' Feedback exit - TI PM550 Manip var not gettable.' Write (6, *) ' ACS Block: ',block,' at: ',now_time Return End If Else ! Other Manip device type End If C

C...Value is within limits - Test to see if the error is less th deadband C

Error = Measured_value - Goal(Block) If ( Abs(Error) .lt. Absolute_deadband(Block) ) Then d Write( 6, *) 'Feedback error less than deadband' Return End If C

C..... Compute proportional Feedback Responsa-Test Delta to see if too C

Delta = Error * Proportional_gain(Block) If ( Abs(Delta) .~t. Max_manip delta(Block) ) Then Delta = Sign(Max_manip_delta(Block),Delta) End If C

C...Calculate new manipula~ed value, check to see it within limits C

New_manipulated_value = Current_manipulated value + Delta C

If ( New_manipulated_value .gt. Manipulated max(31Ock) ) 12~7t~

New manipulated value = Manipulated_max(Block) Else If t New manipulated_value .lt. Manipula~ed min(Block) ) New manipulated_value - Manipulated min(Block) End If Delta = New manipulated_value - Current manipulated value C

C... Transmit the new Manipulated Value to the manip variable C

C...Target is TPA PCS loop goal C

If ( Manip var sy~tem .eq. PCS TPA_Loop ) Then ACS status - ACS put pcs goal( 'TPA ' , 1 Manip var_number , New manipulated value j If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........If PCS yoal value not available, don't execute Block status(Block) = 'On-Err-PCS goal put' Write( 6, ~) 'Feedback exit due to failed manip var put.
Write(6,*)' ACS Block: ',block,' at: ',now time Return End If 'C
C... Target is DMT PCS loop goal Else If ~ Manip var_system .eq. PCS DMT loop ) Then ACS status = ACS put pcs goal( 'DMT ' , 1 Manip var number , New manipulated_value ) If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal put' Write( 6, *) 'Feedback exit due to failed manip var put.
Write(6,*)' ACS Block: ',block,' at: ',now_time Return End If C

C... Target is ACS block goal Else If ( Manip var system .eq. ACS block ) Then ACS status = ACS put_goal ( Manip var number , 1 New manipulated_value ) If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........If ACS goal Value not available, don't execute Block_status~Block) = 'On-Err-ACS goal put' Write( 6, *) 'Feedback exit due to failed manip var put.
Write(6,*)' ACS Block: ',block,' at: ',now time Return End If C

C...Target is Vantage variable C

~2975~0 Else If ( Manip_var_sy~tem .eq.
1 ~antage variable ) Then Van status = Puteugen ( Manip var number , 1 New mani.pulated value ) If ( Van Status .ne. %loc(vs; success) ) Then C...... O.. ......If Variable Value not avai.lable, don't execute ~lock status(Block) = 'On~-Err-Vant var put ' Write( 6, *) 'Feedback exi.t due to failed manip Yar put.
Write(6,*)' ACS Bloçk: ',block,' at: ',now time Return End If CTarget is Texas Instruments PM550 controller setpoint in CRD
C

Else If ( ( Manip_var_system .ge. Low_PM550 ~ .and.
1 ~ Manip_var system .le. Hi_PM550 ) ) Then If ( Manip var system .eq. CRD_ESC~S PM550_01 ) Then ACS_status - TI~put_loop setpoint ( 'TI_PM550_01 PORT' , 1 Manip var number , New_manipulated value ) Else If ~ Manip var_system .eq. CRD_ESCHS_PM550_02 ) Then ACS_status - TI ut loop setpoint ( 'TI PM550 02_PORT' , 1 Manip_var nu~oer , New manipulated value ) Else If ( Manip_var_system .eq. C~D ESC~S PMS50 03 ) Then ACS status = TI put_loop_setpoint ( 'TI PM550 03 PORT' , Manip var_number , New manipulated value ) Else If ( Manip var system .eq. CRD ESC~S PM550 04 ) Then ACS status s TI put loop setpoint ( 'TI_PM550_04_PORT' , 1 Manip var number , New manipulated value ) Else If ( Manip var_system .eq. CRD_ESCHS_PM550_05 ) Then ACS status = TI_put loop setpoint ( 'TI PM550 05_PORT' , 1 Manip var number , New manipulated value ) Else If ( Manip_var system .eq. CRD ESC~S PM550 06) Then ACS status = TI put loop setpoint ( 'TI PM550 06_PORT' , 1 Manlp var_number , New manipulated value ) Else If ( Manip var system .eq. CRD ESCHS_PM550 07) Then ACS status = TI put loop setpoint ( 'TI PM550 07_PORT' , 1 Manip var_number , New manipulated_value ) End If If ( ( ACS Status .ne. Sloc(TI success) .and.
1 ( ACS status .ne. %loc(TI clamped) ) Then C........... ....If PM550 setpoint value not accessible, dont execute Block status(Block) = 'On-Err-TI se~pnt put' Write( 6, *) ' FeedbacX exit - TI P~550 Manip v puttable.' Write (6, *) ' ACS BlocX: ',block,' at: ',now_time Return End If Else ! Other manip device types End If C

C....Load special arrays for user programs to log messages.

c ~9~56~
User_integer~l) = Measured_time_stamp User_integer(2) = Integer now User real(l) = Delta User_real(23 = ~rror User character(1) - 'Feedback C
C...If Delta is non-zero, update past actions C

If ( Delta .ne. O ) Then Do 90 J = 5,2,-1 Past actio~_value(Block,J) = Past action_Yalue(Block,J-l~
Past_action_time (Block,J) = Past_action_time (alock~J-l) Past_action_value(Block,l) = Delta Past action time (Block,1) = Integer_now End If C

C....Call User subprograms for this block Call User prsgrams(Block) C

C...All done C

Return End Copyright (c) 1987 E.I.DuPont de Nemours & Co., all rights reserved 1~975160 Eeedforward Block Figure 11 shows a sample of a template 812 prese~-ted to the user by the build-supervisor procedure to.
define a feedforward block. In the specific example shown, the block being worked on is blsclc number six of the 200 available blocks 851, B52, etc., and the various data values shown in this Figure ref:Lect the entries which have been made at some time to define this particular block.
The feedforward block provides proportional feedforward ~ction. In feedforward action, the user specifies a measured value (called the "measured variable") and a manipulated variable whose value is to be changed in proportion to (or, more ge~erally, in accordance with) the change in value of the m2asured variable. Feedforward action begins when the "old measured value" is set equal to a current value (usually when the block is first turned on). The measured variable is then monitored for changes in value and the manipulated variabl~ value is changed in proportion. The "old measured value" is then updated to the value at the time of this action. (The use of the "old measured value" in feedforward rules is one reason why an initiAlization ctage is needed: if a feedforward block were switched from inactive status directly to on status, it might indicate a very large change to the manipulated variable i~ the delta were calculated ~rom an out-of-date "old ~easured value.n) In the presently preferred embodiment, the basic feedforward nction can be altered by several additional para~eters. A deadband c~n be specified, so that, if the ~easured value changes by less than the deadband, no action is taken. ~he amount of action t~ken can ~e limited to a f~xed amount. Ihe range over w~ich the value o~ the ~anipulated variable can be changed can-be ~x~

limited to keep it wi~hln operable limits. Screening limits can be specified on the measured variable value, 50 that measured values outside the screening limits are ignored. Block timing and switching options and the block description fields follow the general outlines given above.
In the presently preferred e~odiment, specifying a feedforward block on the block setup selection for~
(Figure 9) brings up a feedforward block setup form liXe that shown in Figure 11.

Parameters The parameters are:
Measured variable type: a number code representing the software system and the type of entity which the block should use for the measured variable.
Measured variable number: the number of the entity within the specified system which the block will use for the measured variable. For example, if the measured variable type is a historical database variable, the measured variable number is the number of the variable in the historical database. After the measured variable type is entered, the label next to this field will show what type of data is needed. When the measured variable number is entered, other fields will also be filled in: the name and units for the measured variable, deadband; units and default values for the max and min measured values. If block timing to key off entry of new data into the measured variable, only discretely sampled variable types can be used.
Goal: the goal field cannot be used for feedforward blocks.
Manipulated variable type: a number code representi~g the software package and the type of entity ~12~751EO
which the block should manipulate. Examples are: control system loop goal, historical database variable.
Manipulated variable number: the number of the entity within the specified system which the bloc~ will manipulate. For example, if the manipulated variable type is a control system loop goal, the manipulated variable number would be the number o~ the loop whose goal is to be changed. The label next to this field will show what type of information is needed; in this case the label would show "Cont Sys loop #".
Proportional gain: the constant relatîng the change in the manipulated variable's value to the change in the measured variable's value. The units of the gain are shown to the right of the field after the measured and manipulated variable have been specified. Control action is calculated as:

Measured delta = [Measured variable value - Old value]

Manipulated delta = Measured delta * [Proportional gain]

The manipulated delta is added (subject to limits) to the current value of the manipulated variable.
Deadband: A range around the "
old measured value" (i.e. the measured value at the time of the last block action). If the value of the measured variable i5 within plus or minus the deadband of the old measured value, no action -is taken and the old measured value is not changed.
Timing option, execution time interval, and Xey block number: these parameters are described above.
Switch system and switch number: these are described above.

~37S~it3 Maximum output delta: the maximum change that can be made in the manipulated variable's value in one control action.
Minimum and maximum value of the manipulated variable: llmit values outside whioh control actlon will not move the value of the manipulated variable. If ~
computer control action would put the manipulated value outside the limits, the value is set equal to the limit~
If the manipulated value is moved outside the limits (by operator action, for example) the next control action will return the value to within the limits.
Minimum and - maximum value of measurec variable: These define screening limits for reasonable values of the measured variable. Whenever the measured variable value falls outside these limits, the value will be ignored and no action is taken.
Action log file: this field is described above.
The use of a deadband in feedforward blocks is one of the features which tend to force process control into discrete steps, rather than continuous small changes.
One advantage of this novel teaching is that full logging can be used: every single change made by the supervisor procedure can be logged, without generating an excessive number of messages. This in turn means that monitoring, diagnosis, and analysis of processes ~and of process control systems) becomes much easier.

Block O~eration The sequence of actions performed by a feedforward block is:
- Get the current value of the measured variable (If not accessible, set status to "On-err..."
and do no further actions);

t7S~iO

- Test the value of the measured variable. If it falls outside the allowed range of values, set status to "On-msrd out of lims" and do no further actions.
- Compute the change in the value of the measured variable:
Delta measured = Measured value - Old measur~d value.
If the absolute value of the change is less than the deadband, do no further actions.
- Compute the change in the manipulated variable:
Delta manip = Delta measured * Proportional gain.
- Set "old measured value" equal to the current value of the measured variable.
- If block status is "On-deselected", do no further actions;
- Check the magnitude of the manipulated value delta. If greater than the maximum allowed delta, set magnitude equal to the maximum.
- Get the current value of the manipulated variable. If not accessible, set status to "On-err ..... " and do no further actions.
- Compute the new value of the manipulated variable:
New manip value = Current manip value + delta manip.
If the value is outside the max/min limits, set it equal to the nearest limit. If limited, recompute the delta using the limit.
- Change the manipulated variable value to the new value computed. If not accessible, change status to ~0 "On-err .. ." and do no further actions.
- Load user array values for use by the user routine.
- If delta_manip is not zero, update the past action values and times.
- Call the user routine.

Data passed to the user routine The feedforward block passes information about its actions to the user routine through the User_vars common block. The use of this data is described in more detail in the chapter covering User routines. In the presently preferred embodiment, the data passed by the feed forward block includes:
User_integer(1) - the time stamp of the measured variable;
User_interger(2) - the time the action was taken;
User_real(1) - the change in the value of the manip variable;
User_real(2) - the change in the value of the measured variable from the last time the "old measured value" was updated;
User_character(1) - = `Feedforward'.
Sample Source Code The source code for the procedure which actually performs this function, in the presently preferred embodiment, is as follows.
Table 3 Subroutine Feedforward_block ( Block ) Include `ACS$includes:Block_parameters.inc/nolist' ~7~6() Include 'ACSSincludes:Yan_functions.inc/nolist' Include 'ACS5includes:User varsrinc/nolist' Include 'ACSSincludes:ACSstatus r inc/nolist' Include 'ACS~includes:ACSserv.lnc' Include 'Acs~includes:TIserv.inc' Include 'AcsSincludes:TIstatus.inc' Include 'ACS$includes:Manip Darams.inc' Include 'ACS$includes:Meas Params.inc' C

Integer*2 Manip var_type Integer*2 Manip var num Integer~2 Meas var_type Integer*2 Meas_var num Integer*4 Block Real*4 Measured value Real*4 Current_manipulated value Real*4 New manipulated_value Integer*4 Integer Now Character*20 Character now Integer*4 Measured time stamp C

Van status = VssS from ascii_time ( ' ' , Integer_now ) Van status = VssS to_ascii_time( Integer_now , Character_now ) - C
C...Get the measured value C

ACS status = ACS get meas var_type ( BlocX , Meas_var_type ) ACS_status = ACS get_meas_var_num ( Block , Meas var_num Measured time stamp = 0 C

C... Measured Value is TPA PCS loop goal If ( Meas var type .eq~ PCS TPA Loop goal ) Then ACS_status = ACS get ~cs goal( 'TPA
1 Meas var_num , Measured value ) If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal get' Write( 6, *) 'Feedback exit due to measured var not availa write(6,*)' ACS Block: ',block,' at: ',Character_now Return End If C

C...Measured Value is DMT PCS loop goal C

Else If ( Meas_var_type .eq. PCS DMT_loop goal ) Then ACS status - ACS get pcs_goal( 'DMT ' , 1 Meas_var_num , Measured value ) If ( ACS Status .ne. %loc(ACS success) ) Then C....... ......If PCS goal value not available, don't execute Block_status(Block) = 'On-Err-PCS goal get' Write( 6, *) 'Feedback exit due to measured va llo ~ ~va i ~9 ~

write(6,*)' ACS Block: ',block,' at: ',Character now Return End If C

C...Measured Yalue is ACS block goal C

Else I~ ( Meas var_type .eq. ACS block_goal ) Then ACS status - ACS_g~t goal ( 1 Meas var_num , Measured value ) If ( ACS Status .ne. %loc(ACS_success) ) Then C....... ......If ACS goal Value not available, don't execute Block status(Block) = 'On-Err-ACS goal get' Write( 6, *) 'Feedback exit due to measured var not avai write(6,*)' ACS Bloc~: ',block,' at: ',Character now Return End If C

C...Measured Value is Vantage variable C

Else If ( Meas_var_type .eq. cur_val_Van_var ) Then Van_Status = Vss$g_current( Meas_var_num , 1 Measured value ) If ( Van Status .ne. %loc(vss_normal) ) Then C....... ....If Variable Value not available, don't execute Block_status(Block) = 'On-Failed Msrd var ' Write( 6, ~) 'Feedback exit due to measured var not availa write(6,*)' ACS Block: ',block,' at: ',Character_now Return End If Van status = Vss$g_curtime ( Meas_var_num , 1 Measured time_stamp ) C

End If C

C....Check the Measured variable to see if it is within limits C

If ( (Measured_value .lt. Measured_min(block) ) .or.
1 (Measured value .gt. Measured_max(block) ) ) Then C... ..Reject the data point Return End if C... Test to see if the change in the measured value is less th deadband C
Delta_meas = Measured value - Old measured_~alue(Block) If ( Abs( Delta meas ) .lt.
1 Absolute_deadband(Block) ) Then Return End If C

756~

C...Special action for 'On-deselected' status ~ update old meas valu exit.
C

Old measured value(Block) = Measured value If ( Block status(Block)(1:13) ~eq. 'On-deselected' ~ Then Return End If C...Value is within limits - Compute Feedforward Response C

Delta manip = D~lta meas * Proportional gain(Block) C

C...Test Delta manip to see if too great C

If ( Abs(Delta manip) .gt. Max manip delta(Block) ) Then Delta manip = Sign(Max man1p delta(8lock),Delta_manip) End If C

C...Get the current manipulated value C

ACS status = ACS get_manip var sys ( Block , Manip_var_type ) ACS_status = ACS_get manip var_num ( Block , Manip_var_num C

C...Target is TPA PCS loop goal C

If ( Manip var type .eq. PCS TPA Loop ) Then ACS status = ACS get pcs goal( 'TPA
1 Manip var num , Current manipulated_value , ) If ( ACS Status .ne. %loc(ACS_success) ) Then C....... ......If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal get' Return End If C

C...Target is DMT PCS loop goal C

Else If ( Manip var_type .eq. PCS DMT loop ) Then ACS status = ACS get_pcs goal( 'DMT ' , 1 Manip var num , Current manipulated value ) If ( ACS Status .ne. %loc(ACS success) ) Then C....... ......If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal get' Return End If C

C...Target is ACS block goal C

Else If ( Manip var type .eq. ACS block ) Then ACS status = ACS get goal ( Manip_var num , 1 Current_manipulated_value ) If ( ACS Status .ne. ~loc(ACS success~ ) Then C.......... If ACS goal Value not available, don't execute ?S~

Block status(Block) - 'On--Err-ACS goal get' Return End If C

C...Target i5 Vantage varlahle C
Else If ( Manip var_type .eq.
1 Vantage variable ) rhen Van_Status = Geteuval ( Manip var num , 1 Current manipulated_Yalue ) If ( Van Status .ne. %lo~(vss_success) ) Then C... ..........If Variable Value not available, don't execute Block status(Block) = 'On--~rr-Vant var get ' Return End If C... Target is Texas Instruments PM550 controller setpoint in ~~3 Else If ( ( Manip_var type .ge. Low PM550 ) .and.
1 ( Manip_var type .le. Hi PM550 ) ) Then If ( Manip var type .eq. CRD_ESCHS_PM550 01 ) Then ACS status = TI get loop setpoint ( 'TI PM550 01_PORT' , 1 Manip var num , Current manipulated value ) Else }f ~ Manip var type .eq. CRD ESCHS PM550_02 ) Then ACS status = TI get loop setpoint ( 'TI PM550 02_PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 03 ) Then ACS status = TI get loop setpoint ( 'TI PM550 03 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 04 ) Then ACS status = TI get loop setpoint ( 'TI PM550 04 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 05 ) Then ACS status = TI get loop setpoint ( 'TI PM550 05 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 06) Then ACS status = TI get loop setpoint ( 'TI PM550 06 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 07) Then ACS status = TI get loop setpoint ( 'TI PM550 07 PORT' , 1 Manlp var num , Current manipulated value ) End If If ( ACS Status .ne. Sloc(TI success) ) Then C... ..........If PM550 setpoint value not available, don't execute Block status(Block) = 'On-Err-TI setpnt get' Write( 6, *) 1 ' Feedforward exit - TI PM550 Manip var not accessible Write (6, *) ' ACS Block: ',block,' at: ',now time Return End If Else ! Other Manip device type ~'7~;6~

End If C

C...Calculate n~w manipulated value, ~heck to sae it wi~hin limit~
C

New_manipulated value = Current Manipulated_value + Delta mani If ( New manipulated value .qt. Manipulated max(Block) ) Then New manipulated value = Manipulated max(810ck) Else If ( New manipulated value .lt. Manipulated min(Block) ) New manipulated value - Manipulated min(Block) End If Delta manip = New manipulated value - Current Manipulated_valu C

C... .Transmit the New Manipula~ed Value to the manipulated ~ariable C
C... Target is TPA PCS loop goal If ( Manip var type .eq. PCS TPA Loop ) Then ACS status = ACS put pcs goal( 'TPA ' , 1 Manip var num , New manipulated value ) If ( ACS Status .ne. ~loc(ACS success) ) Then C... ..........If PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal put' Write( 6, *) 'Feedback exit due to failed manip var put.
Write(6,*)' ACS Block: ',block,' at: ',now time Return End If C ...
C... Target is DMT PCS loop goal Else If ( Manip var type .eq. PCS DMT loop ) Then ACS status - ACS put_pcs goal( 'DMT ' , 1 Manip var num , New manipulated value ) If ( ACS Status .ne. %loc(ACS success) ) Then C... ..........I~ PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal put' Write( 6, *) 'Feedback exit due to failed manip var put.
Write(6,*)' ACS Block: ' ,block,' at: ',now time Return End If C

C... Target is ACS block goal Eise If ( Manip var type .eq. ACS block ) Then ACS status s ACS ~ut goal ( Manip var num , 1 New manipulated value ) If ( ACS Status .ne. %loc (ACS_ success) ) Then C... ..........If ACS goal Value not available, don't execute 810ck status(Block) = 'On-Err-ACS goal put' Write( 6, ~ 'Feedback exit due to failed manlp var put.

~X97~60 Write(6,*)' ACS Block: ',block,' at: ',now time Return End If C

C...Target is Vantage variable Else If ( Manip_var t~pe .eq.
1 Vantage_variable ) rhen Van_status = Puteugen ( Manip var num , 1 New_manipulated_value ) If ( Van Status .ne. %loc(vss_success) ) Then C....... ......If Variabl~ Value not availahle, don't execute Block status(BlocX) = 'On-Err-Vant var put ' Write( 6, *) 'Feedback exit due to failed manip var ?ut.
Write(6,*)' ACS BlocX: ',block,' at: ',now time Return End If C

C...Target is Texa~ Instruments PM550 controller setpoint in CRD
C

Else If ( ( Manip_var_type .ge. Low_PM550 ) .and.
1 ( Manip var tvpe .le. Hi_PM550 ) ) Then If ( Manip_var type .eq. CRD ESCHS PMS50 01 ) Then ACS status = TI p~lt loop setpoint ( 'TI PM550 01 PORT' , 1 Manlp var num , New manipulated value ) Else If ( Manip var type .eq. C~D ESCHS PM5S0 02 ) Then ACS status - TI ut loop setpoint ( 'TI PM550 02 PORT' , 1 Manlp var num , New manipulatPd value ) Else If ( Manip var type .eq. CRD ESCHS PM550 03 ) Then ACS status = TI DUt loop setpoint ( 'TI PM550 03 PORT' , 1 Manip var num , New manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 04 ) Then ACS status = TI ~ut loop setpoint ( 'TI PM550_04 PORT' , 1 Manip var num , New manipulated value ) Else If ~ Manip var type .eq. CRD ESCHS PM550_05 ) Then ACS status = TI put loop setpoint ( 'TI PM550 05 PORT' , 1 Manip var num , New manipulated value ) Else If ( ~anip var type .eq. CRD ESCHS PM550 06) Then ACS status ~ TI PUt loop setpoint ( 'TI PM550 06_PORT' , 1 Manlp var num , New manipulated value ) Else If ( Manip_var type .eq. CRD ESCHS PM550 07) Then ACS status = TI put loop setpoint ( 'TI PM550_07_PORT' , 1 Manip var num , New manipulated value ) End If If ( ACS Status .ne. %loc(TI success) ) Then C......... ....If PM550 setpoint value not available, don't execute Block status~Block) = 'On-Err-TI setpnt put' Write( 6, *) 1 ' Feedforward exit - TI PM550 Manip var not puttable.' Write (6, *) ' ~CS Block: ',block,' at: ',now time Return ~X~75f~0 End I
Else I Other Hanip device type End If C....Load speci~l array~ for user progr~ms to log messages.
C

User lnteger(l~ - Measured time stamp User integer(2) = Integer now User real(1) = Delta manip User real(2) = Delta meas User character~l) = 'Feedforward C

C If Delta is non-zero, update past actions I~ ( Delta ~anip ~ne. 0 ) Then Do 90 J ~ 5,2,-1 Past action value(Block,J) = Past action value(Block,J-1~
Past action_time (Block,J) = Past action time rBlock,J-1) Past action value(Block,l) = Delta manip Past action time ~Block,l) = Integer now End If .C.... .Call User subprograms for this block C

Call User programs(Block) Return End Copyright (c) 1987 E.I. DuPont de Nemours & Co.
all rights reserved ~975~

S~istical Filterinq ~locks Figure 12 fih~w~ a ~ample of a template 812 presen-ted to the user by the build~supervisor procedure to define a statist~cal filtering block. In the specific example shown, the block being worked on is block number one of ~he 200 available blocks ~5~, 852, etc., and the various data values shown in this Figure reflect the entries which have been made at some time to define this particular block.
The Shewhart block provides statistical filtering of a sampled measurement using Shewhart tests. The user specifies an aim value (field 1222 in Figure 12) and a standard deviation (sigma) (field 1224 in Figure 12) which characterizes the normal variability in the measurement. The Shewhart tests a series of rules to determine whether the sequence of measurements are ~tatistically the same as ("on aimn) or different from ("off aimn) the norm~l variability with the average at the aim. After each test, the Shewhart block ~tores in the process database an estimate of the deviation from aim and a value indicating what rule was broken.
In the presently preferred embodiment, Shewhart blocks do not allow timing options to be specified. They perform their tests only~ when a new measurement is entered into the database for the filtered variable. In the presently preferred embodiment, the conditions tested for by the Shewhart block are:
Was the last point more than 3 sigma dif~erent from aim?
Were two of the last three polnts ~ore than 2 ~igm~ different fro~ aim in ~he same direction?
~ere fo~r of the last five points more than l ~igma different from ~im in the ~ame direction?
Were the l~st seven points all o~f ni~ on the same ~ide of ~im?

~975~{1 The rules are tested in the order shown. For the second and third rules, the test is first applied to the last two (or four) points in a row, then to the last three (or five) points. If any rule is violated, the process is off aim, and a d viation from aim is calculated by averaging the points which broke the rule. For example, if the last four points were outside the 1 sigma limit, the average of the four is taken as the deviation. If four of the last five points were outside the 1 sigma limits, the average of the last five points is taken.
The basic Shewhart action can be altered by several additional parameters. A fix time inter~al can be specified (in field 1226), so that, if one of the Shewhart tests shows a rule violation, Shewhart tests lS will be suspended for this interval after the time of the sample that violated the rule. This is useful in process control to allow control action in response to a rule violation to have time to move the process back to a statistically "on aim" position before taking any further actions. The range of calculated deviations can be limited, as specified by the data entered into fields 1228 and 1230. Screening limits can be applied to the filtered variable, so that measurements falling outside the range defined in fields 1232 and 1234 are ignored.
The Shewhart block differs from the feedback and feedforward blocks in that it requires resources outside of the supervisor procedure. It uses two process database variables to store its computed deviation from aim and its rule value. To configure a Shewhart block, in this sample embodiment, the user must get database variables allocated and properly configured. Since this is usually a database system manger's function, the details are not covered here. -Specifyinq a "Shewhart" (i.e. statistical 3S filtering) block on the block setup selection form 7r;~

(Figure 9) brings up the Shewhart block setup form shown in Figure 12.

The parameterC shown on this form include:
Filtered variable type: a number cods representing the software system and the type of entity which the block should use for the filtered variable.
Filtered variable number: the numb r of the entity within the specified system which the block will use for the filtered variable. For example, if the filtered variable type is a historical database variable, the filtered variable number is the number of the variable in the historical database. After the filtered v~riable type is entered, the label next to this field will show what type of data is needed. When the filtered variable number is entered, other fields will also be filled in: the name and units for the filtered variable, aim, and sigma; units and default values for the max and min filtered values. Since Shewhart block timing always keys off entry of new data into the filtered variable, only discretely sampled variable types can be used.
Deviation variable type: a number code representing the software system and the type of entity into which the block should store the computed value of deviation from aim.
Deviation variable number: the number of the entity within the specified system into the block will store the computed deviation from aim. For example, if the deviation variable type is a historical database variable, the deviation variable number is the number of the variable in the historical database. After the deviation variable type is entered, the label next to this field will show what type of data is needed. When ~7~6~

the deviation variable number is entersd, other information will be automatioally filled in by the build-supervisor procedure; in the example o~ Figurs 12, region 1236 indicates the pre-stored designation of historical database variable 2084. Such automatically completed information will preferably include the name and units for the deviation variable; units and default values for the max and min deviation values. Since Shewhart blocks execute on entry of new data into the filt~red variable, only discretely stored deviation variable types can be used.
Rule variable type: a number code representing the software system and the type o~ entity into which the block should store a number code indicating which rule was broken.
Rule variable number: the number of the entity within the specified system into the block will store a number code indicating which rule was broken. For example, if the rule variable type is a historical database variable, the rule variable number is the nu~ber of the variable in the historical database.
After the rule variable type is entered, the label next to this field will show what type of data is needed.
When the rule variable number is entered, the name and units for the rule variable will also be filled in.
Since Shewhart blocks execute on entry of new data into the filtered variable, only discretely stored rule variable types can be used.
Aim: the "on aim" value of the filtered variable.
Sigma: the standard deviation of the value of the filtered variable when the measurement is "on aim".
Fix time: A time interval after rule violations during which no rule tests are done. New measurements entered during the fix time interval are 1~7S6(3 ignored. The fix time is entered as a delta time character string: "ddd hh:mm:ss" where "ddd" i5 the number of days, "hh" is th~ number of hours, "mm" is the number of minutes, and "ss" is the number of seconds.
The fix time is taken from the timestamp of the filtered variable value which caused the deviation to be identified. The timestamp of latex samples is compared against this, and if the difference is less than the fix time interval the sample is ignored.
Switch system and switch number: these are described above.
Minimum and maximum value of the calculated deviation: limits on the allowed value of the calculated deviation from aim. Deviations outside this range are set equal to the closest limit.
Minimum and maximum value of filtered variable: Screening limits for reasonable values of the filtered variable. Any time the filtered variable value falls outside these limits, the value will be ignored and no action is taken.
Action log file: this field is described above.

Block O~eration In the presently preferred embodiment, the sequence of actions performed by the Shewhart block is:
- If the block status is "On-deselected", do no further calculations.
- Retrieve the last 7 values of the filtered variable. If not available, do no further calculations.
- Check the last value of the filtered variable. If it is outside the allowed limits, do no ~urther calculations.
- Search backward through the stored values of the deviation variable for the most recent non-zero 1;2~75~:~0 value. If a non-zero value is found within one fix time interval hefore the present inst:ant, do no further calculations.
- Compute the cutoff time = time of last non-zero deviation plus the 2ix time.
- Initialize the deviation and rule values (to zero).
- Begin testing Shewhart rules:
* If the last point is oldPr than tlle cutoff time, do no further calculations.
* If the last point is outside the 3 sigma limits ( i.e. Abs(point-aim) is greater than 3 sigma), then:
Deviation = Last point - aim Rule = 1 - Skip remaining rules.
* If the second newest point is older than the cutoff time, Skip remaining rules.
* If the last 2 points are both either greater than aim + 2 sigma or less than aim - 2 sigma, then:
Deviation = Sum(last 2 points )/2 - Aim Rule = 3 Skip remaining rules.
* If 2 out of the last 3 points are both either greater than aim + 2 sigma or less than aim - 2 sigma, then:
Deviation = Sum(last 3 points~/3 - Aim Rule = 3 Skip remaining rules.
* If the last 4 points are all either greater than aim + sigma or less than aim - sigma, then:
Deviation = Sum(last 4 points)/4 - Aim Rule = s Skip remaining rules.

* If 4 of the last 5 points are ~11 either grea~er than aim ~ sigma or less than aim -sigma, then:
Deviation - Sum(last 5 points)/5 - Aim Rule = 5 Skip remaining rules.
* If all of the last 7 poin s are greater than aim or all less than aim, then:
- Deviation = Sum(last 7 point)/7 - Aim Rule - 7 Skip remaining rules.
- Check and store result:
* If the deviation is outside the allowable limits, set equal to the closest limit.
* Store the deviation value and rule value in the respective variables. These values are time stamped the same as the last filtered value.
- If the deviation is non-zero, update past actions.
- Call the user routine.
Of course, other statistical filtering methods could be used instead. It is generally realized that statistical filterin~ is highly advantageous, and that numerous algorithms can be used to accomplish statisti-cal filtering.The Shewhart algorithm used in the presently preferred embodiment could be replaced by any of a wide variety of other known algorithms.

Sam~le Source Code The source code for the procedure which actually performs this function, in the presently preferred embodiment, is as follows.

7r~;o Table 4 C*****~*************~****~*~****
C Shewhart_block.for C
C

C*************~*****~*******~*~*
C

Subroutine Shewhart_block ( Block) C

Include 'ACS$includes:Block_parameters.inc/nolist' Include 'acsSincludes:ACSserv.inc/nolist' Include 'acsSincludes:ACSstatus.inc/nolist' Include 'ACS$includes:Van_functions.inc/nolist' Include 'ACSSincludes:Filter_params.inc/nolist' Include 'ACS$includes:dev_params.inc/nolist' Include 'Acssincludes:rule-params.inc/nolist~
Include 'ACSSincludes:User vars.inc' Integer*4 Block Integer Error lun Parameter ( Error lun = 6 ) Character*20 Store_time Character*20 now time C

Integer*2 Filtered variable Integer*2 Deviation variable Integer~2 Rule variable Integer*2 Filtered variable type Integer*2 Deviation variable type Integer*2 Rule variable type Integer*4 I4 deviation variable Integer*4 I4 rule variable Real*4 Aim Real*4 Sigma Integer~4 Integer fix time Integer*4 Cutoff time Integer*4 Safe tlme Real*4 Deviation Real*4 Rule Real*4 Last filtered value Logical All same sign Logical Need violation C

Integer*4 Num points Parameter (Num points = 7) Real*4 Point(Num ~oints) Integer*4 Times(Num_points) Character*l~ Char times(Num Points) Integer*4 Num pointsl Parameter (Num_pointsl = ~) r~
~ J

Real~4 Pointl(Num pointsl) Integer*4 TimesltNum pointsl) Character*18 Char ti~esl(Num_pointsl) Real*4 Viola~ion_value(l) Integer*4 Violation_time(1) Integer*4 Newest time Integer*4 Oldest_time Integer*4 ~3uffer size Lsgical*l First request Integer*4 Bloc~ location Integer*4 Entry count Integer~4 Begin span status Byte Interp flags Integer*4 Begin span time Integer~4 End span time Integer*4 Num points retrieved Integer*4 Integer Now Integer*2 Start ~oint C.. ..Special case for 'On-deselected' status If ( Block status(Block)(1:13) .eq. 'On-deselected' ) Then Return End If C.. Set the value of the local variables ACS status = ACS get filtered var type(Block,filtered variable Filtered variable = Measured_variable(Bloc~) ACS status = ACS get dev var_type ( Block , deviation variabl Deviation variable = ~anipulated variable(~lock) ACS status = ACS get rule var type ( Block , rule variable typ Rule variable = New manipulated variable(Block) Aim - Goal(~lock) Sigma = A~solute deadband(Block) Integer fix time = Fix time(Block) Van_status = Vss$ f'rom ascii time ( ' ' , Integer now ) Van status = VssS to_ascii tlme ( Integer_now , now time ) d Van status = Vss$ to ascii time ( Integer now , Store_time ) d write(6,202) ' Calling Shewhart on var ',filtered_variable,' a d 1 Store time d 202 f'ormat(//,a,' ',i5,' ',a,' ',a) C

C...Retrieve enough points to test all the rules If ( Filtered_variable type .eq. Van_var_filter ) Then C

Newest time = Integer now Oldest time = Newest time - 365*24*60*60 ~7'~

Buffer size = Num points First_request 5 . True.
Num points retrieved = O
Start Doint - 1 C

Do 777 ; - l,Num points Times(j) = 0 777 Point(j) - O.o C

Van status - %loc(vss_systemdown) Do While ( (Van status .eq. %loc(vss_systemdown)) .or.
1 (Van status .e~. ~loc(vss unavaildata)) ) Van status = Vss$ Retrieve ( Filtered variable , Ne~est_tim 1 -Oldest time , Buffer size , Times(start point) , 1 Point(Start Point) , 1 First request , 310ck location , Entry_count , 1 Begin span status , Interp flags , Begin span_time , 1 End span tlme ) Num_points_retrieved = Num points retrieved + Entry_count If ( Num ~oints retrieved .lt. Num points ) then Buffer size = Buffer_size - Num points_retrieved Start point = Start point + Entry count End If d write(6,*) 'Finished data retr.' c End Do c d do 11 J =l,Num points d 11 Van status = Vss$ to_ascii_time ( Times(j) , Char_times(j)) d write(6,12) (Char times(j),Point(j),j=l,num points) d 12 Format( ~,' Here are the times and points~',//
d 1 (' ',al8,' ',fl2.4 , / ) d write(6,*) ' Got ',Num points retrieved,' points.' If ( Num Doints retrieved .lt. Num points ) then Write(Error lun,*) 1 'Shewhart Failed to get enough data on Variable ', 1 Filtered variable write(error lun,*)'from ACS block:',block,' at:',now_time Write(Error_lun,*) 'Wanted ',Num_points,'; Got ', 1 Num points retrieved Return End If d write(6,*) 'Got enough points.' C
C

C....Check the ~eas~red variable to see if it is within limits C

Last filtered value = Point(l) If ( (Last flltered value .lt. Measured_min(block) ) .or~
1 (Last filtered_value .gt. Measured max~blo~k) ) ) T
C..... Reject the data point 7~

Write( 6, *) 'Shewhart exit due to out of limts filtered.' write(6,*)' ACS Block: ',block,' at: ',now_time Return End if Else if ( Filtered variable type .eq. Van run 2 filter ) Then C

Newest time = Integer now Oldest time = Newest time - 365*24*60*60 Buffer size = Num pointsl First request - .True.
Num points retrieved = O
Start_point = 1 Do 1777 j = l,Num Points Timesl(j) - 0 1777 Pointl(j) = 0.0 C

Van status = %loc(vss systemdown) Do While ( (Van status .eq. %loc(vss systemdown)) .or.
1 (Van status .eq. %loc(vss unavaildata)j ) Van status = VssS Retrieve ( Filtered variable , Newest tim 1 Oldest time , Buffer size , Timesl(start point) , 1 Pointl(Start point) , 1 First request , Block location , Entry count , 1 Begin span status , Interp flags , Begin span time , 1 End span time ) Num points retrieved = Num points retrieved + Entry_count If ( Num points retrieved .lt. Num pointsl ~ then Buffer size = Buffer size - Num Points retrieved Start point = Start point + Entry count End If d write(6,*) 'Finished data retr.' c End Do d do 111 J -l,Num pointsl d 111 Van status = Vss$ to ascii time ( Timesl(j) , Char timesl(j)) d write(6,112) (Char tlmesl(j),Pointl(j),j=l,num pointsl) d 112 Format( /,' Here are the times and points:',//
d 1 (' ',al8,' ',fl2.4 , / ) d write(6,*) ' Got ',Num points retrieved,' points.' If ( Num points retrieved .lt. Num ~ointsl ) then Write(Error_lun,*) 1 'Shewhart Failed to get enough data on Variable ', 1 Filtered variable write(error lun,*)'from ACS block:',block,' at:',now_time Write(~rror lun,*) 'Wanted ',Num pointsl,'; Got ', 1 Num poi~ts retrieved Return End If d write(6,*) 'Got enoush points.' 9~60 C
C.... Check the Measured variabie to see if it is within limits Last filtered value = (Pointl(l)+Pointl(2))/2.
If ( (Last flltered value .lt. Measured min(block) ) .or.
1 (Last filtered value .gt. Measured max(block) ) ) T
C.... .Reject the data point Write( 6, *) 'Shewhart exit due to out of limts filtered.' write(6,*)' ACS 81Ock: ',bloc~,' at: ',now_time Return End if Do j = 1,num points ! running average point(j) = (pointl(j)+pointl(j+l))/2 times(j) = timesl(j) end do Else ! Improper filtered type Write( 6, *) 'Shewhart exit due to invalid filtered var 'y~e.' write(6,~)' ACS Block: ',block,' at: ',now time Return End If ! Filtered types C
C

C....Check to see if the last violation was within the Fix time -C If so, do no calculations.
C...Retrieve the last stored nonzero deviation from aim C

If ( Deviation variable type .eq. Van var dev ) Then C

Newest time = Integer now Oldest time = Newest time - 365*24*60*60 Buffer size = 1 First request = .True.
Need violation = .True.
Do While ( Need violation ) Van status = Vss$ Retrieve ( Deviation variable , Newest ti 1 Oldest time , Buffer size , Violation time , 1 Violation_value , 1 First request , Block location , Entry count , 1 Begin span status , Interp flags , Begin span_time , 1 End span_time ) If ( ( Van status .ne. %loc(vss systemdown) ) .and.
1 ( Van status .ne. %loc(vss unavaildata)) .and.
c ( Van status .ne. %loc(vss notallfound)) ) Then Write(6,*)' Shewhart Violation retr - status vss badva write(6,*)' ACS Block: ',block,' at: ',now_time 7~
c Else If ( Van_status . eq. %loc (Vss badtime) ) then Write(6,*) ' Shewhart Violation retr - status vss_badti write(6, *) I ACS Block: ' ,block, ' at: ' ,now time c Else If ( Van status . e~. %loc (Vss badtimespan) ) then Write ( Ç, *) ' Shewhart Violation retr - s vss badtimespan ' write(6,*) ' ACS Block~ lock, ' at: ',now time Else If ( Van status . eq. %loc (Vss badbufsize) ) then Write(6,*) ' Shewhart Violation retr - status vss badbu write(6,*) ' ACS Bloc}c: ',block,' at: ',now ti;ne Else If ( Yan tatus .eq. %loc(Vss normal) ) then Write(6,*) ' Shewhart Violation retr - statt:s vss norina write(6,*) ' ACS Block: ',block,' at: I,now time c Else If ( Van status . eq. %loc (Vss nonefound) ) then Write(6,*) ' Shewhart Violation retr - status vss_nonef write(6,*) ' ACS Block: ',block,' at: ',now time c Else If ( Van_status . eq. %loc (Vss nomoreonline) ) then Write ( 6, *) ' Shewhart Violation retr - s vss nomoreonline ' write(6,*) ' ACS Block: ',blocX,' at: ',now_time c End I f WRite ( 6, * ) ' Van status = ', Van status Van status = Vss$ to ascii time ( Violation time ( 1 ) , Stor ) Write ( E:rror lun, * ) 'Shewhart-couldn' 't get a non zero deviation - exiting' write(6,*) ' ACS Block: ',block, ' at: ',now_time Write (Error lun, * ) ' Oldest violation got: ' ,Violation value(l), ' at ' ,Store_ Return End I f If ( ( Abs(Violation value(l)) .gt. 1.0 E-10 ) .or.
Violation time ( 1 ) . lt .
(Times(7) - Abs( Integer fix time ) ) ) ) Then Need violation = . False .
End I f c End Do Else ! Improper deviation var type Write ( 6, * ) ' Shewhart exit due to inval id deviation var type write(6~ *) ' ACS Block: ' ,block, ' at: ' ,now time Return End If ! Get last deviation for allowed deviation types c c ~ 75~(?
d Van status ~ Vss$ to ascii time ~ Violation_time(l) , store_tl d write~6,*) ' Got a vlolation of ',Violation value(1),' at ', d 1 Store time C

C... ..Go through the shewhart Rules - any point older than the last vio C time + the fix time is not aoceptable.
Cutoff time = Violation time(1) + Abs(Integer fix time) d Van status = VssS to_ascii time ( Cutoff time , Store_time ) d write(6,*) ' Cutoff time is ', Store time Deviation = 0.0 Rule = 0.0 If ( Times(~) .lt. Cutoff time ) Return d write(error lun,*) 'Testing 1 out of 1 rule.' If ( Abs(Point(1)-Aim) .gt. 3*5igma ) Then Deviation - Point(1) - Aim Rule = 1.0 Go To 1000 End if ` C
C.... Test 2 in a row outside 2 sigma C

If ( Times(2) .lt. Cutoff time ) Go To 1000 d write(error lun,~) 'Testing 2 out of 2 rule.' Sum points = 0.0 Num out high = O
Num out low = O
Do 2 J = 1,2 Sum Points = Sum points + Point(J) If ( (Point(J)-Aim) .gt. 2*Sigma ) Then Num out high = Num_out high +1 Else If ( (Point(J)-Aim) .lt. -2*Sigma ) Then Num out low = Num out low + 1 End If 2 Continue If ( ( Num out high .eq. 2 ) .or.
1 ( Num out low .eq. 2 ) ) Then Deviation = Sum_points/2 - Aim Rule - 3.0 Go To 1000 End If C

C... Test 2 out of 3 outside of 2 sigma C
If ( Times(3) .lt. Cutoff time ) 50 To 1000 d write(error lun,*) 'Testing 2 out of 3 rule.' Sum ~oints - Sum ~oints + Point(3) If ( (Point(3)-Aim) .gt. 2*Sigma ) Then :1.,'3~S~i~
Num out_high s Num out high +l Else If ( (Point(3)-Aim) .lt. -2*Sigma ) Then Num_out low = Num_out low ~ 1 End If If ( ( Num out high .eq. 2 ) .or.
1 ( Num out low .eq. 2 ) ) Then Deviation = Sum Points/3 - Aim Rule = 3.0 Go To 1000 End If C

C...Test 4 in a row outside 1 sigma C

If ( Times(4) .lt. Cutoff_time ) Go To 1000 d write(error lun,*) 'Testing 4 out of 4 rule.
Sum Points - O. O
Num out high = O
Num_out low = O
Do 3 J = 1,4 Sum Points = Sum points + Point(J) If ( (Point(J)-Aim) .gt. l*Sigma ) Then Num_out high = Num out high +l Else If ( (Point(J)-Aim) .lt. -l*Sigma ) Then Num out low = Num_out low + 1 End If 3 Continue If ( ( Num out high .eq. 4 ) .or.
1 ( Num out low .eq. 4 ) ) Then Deviation = Sum points/4 - Aim Rule = 5.0 Go To 1000 End If C

C...Test 4 out of 5 outside 1 sigma C

If ( Times(5) .lt. Cutoff time ) Go To 1000 d write(error_lun,*) 'Testing 4 out of 5 rule.' Sum ~oints = Sum ~oints + Point(5) If ( (Point(5)-Aim) .gt. l*Sigma ) Then Num out high = Num out high +l Else If ( (Point(5)-Alm) .lt. -l*Sigma ) Then Num out low s Num out low + 1 End If If ( ( Num out high .eq. 4 ) .or.
1 ( Num out low .eq. 4 ) ) Then Deviation = Sum_points/5 - Aim Rule = 5.0 Go To 1000 End If C

C...Test 7 in a row - same side of aim C

~37~i~

I~ ( Times(7) .lt. Cutoff time ) Go To 1000 d write(error lun,*) 'Testing 7 in a row rule.' Sum ~oints = O.O
Sign deviation = Sign( 1.0,(Aim-Point(l)) ) If ( (Aim Point(l)) .ne~ O) Then All same sign = .True.
else All ~ame sign = .False.
End if Do 4 J = 1,7 If ( (Aim-Point(J)~ .eq. O) ~hen All same_sign - False.
Else If ( Sign( l.O,(Aim-Point(J~) ) .ne. Sign deviation ) All same sign = .False.
End if 4 Sum_points = Sum_points + Point(J) If ( All same sign ) then Deviation - Sum_points/7 - Aim Rule = 7.0 Go To 1000 End If C

1000 Continue d write(6,*) 'Got deviation, rule of ',deviatio~,rule C

C...Clamp the deviation at allowed limits C

If ( Deviation .gt. Manipulated max(Block) ) Then Deviation = ~anipulated max(Block) Else If ( Deviation .lt. Manipulated min(Block) ) Then D~viation = Manipulated_min(Block) End If C

C...Store the Computed Deviation and Rule number with Timestamp C

d Van status = Vss$ to ascii time ( Times(1) , Store time ) d write(6,*) 'putting var ',i4 deviation_variable,' at ',store t d 1' with value ',deviation If ( Deviation variable type .eq. Van_var dev ) Then I4 deviation variable = Deviation variable Dmt status = DmtS putlab ( I4 deviation_variable , Times(1) , 1 Deviation , 2 , .False. ) Else ! Other deviation types End If ! Deviation types d write(6,*) ' Did putlabs -first status = ',dmt status d write(6,*) 'putting var ',i4 rule variable,' at ',store_time, d 1' with value ',rule If ( Rule variable type .eq. Van var_rule ) Then I4_rule variable - rule_variable Dmt_status ~ DmtS putlab ~ I4_rule_variable , Times(1~ , 1 Rule , 2 , .False. ) Else ! Other rule types End If ! Rule types c status = vss$ mehclose() !close file just in ca d write(6,*) ~ Did putlabs -secoad status - ',dmt s~atus d write(6,~) ' Did putlabs ~exiting' C...... If Deviation i5 non-zero, update past actions If ( Deviation .ne. o ) Then Do 90 J = 5,2,-1 Past aotion_value(Block,J) = Past action val~e(~lock,J-1) Past action time (~lock,J) = Past_action_time !Block,J-1) Past action value(Block,l) = Deviation Past action time (Block,1) = Times(1) End If C

C...Load user arrays for user programs C

User integer(l) = Integer ~ow ! Time of Tests User integer(2) = Rule User real(l) ~ Deviation Do J = l , Max ( Num Points , 18 ) User integer~2~J) = Times(J) ! Time of sa~ples used in test User real (2~J) = Point(J) ! Value of samples used in tes End Do If ( Rule .eq. O.O ) Then User character(1) ~ 'On aim, No rules broken ' User_character(2) ~ 'on aim, No rules broken.' Else If ( Rule .eq. l.O ) Then User character(l) c 'Shewhart l out of 1 rule' User character(2) ~ 'Shoe heart 1 out of 1 rule' Else If ( Rule .eq. 3.0 ) Then User character(l) ~ 'S~ewhart 2 out of 3 Nle' User, character(2) = 'Shoe heart 2 out of 3 rule' Else If ( Rule .eq. 5.0 ) Then User character(l) ~ 'Shewhart 4 out of 5 rule' User character(2) e 'Shoe heart 4 out of 5 rule' Else If ( Rule .eq. 7.0 ) Then User character(l) - 'Shewhart 7 in a row rule' User_character(2) ~ 'Shoe heart 7 in a row rule' End If C...Call User routine Call User progra~s ( Block ) Return End Copyright (c) 1987 E.I. DuPont de Nemours & Co., ; all rights reserved 5i~

Use~Defined P~oqr~Lloc:k Figure 13 shows the form which (in the presently preferred embodiment) is presented to a user who has chosen the "User program" option from the menu shown in Figure 9.
The user program block provides a means of controlling the execution of a user written FORTRAN
subroutine. The block itself performs no control actions, but allows the user to specify a timing option and switch parameters for executing the block's user routine. A user routine exists for every block in the supervisor procedure. (In the example shown in Figure 13, where the block shown is block number 2, the block will (selectively) make calls to BLOCX2_USER ROUTINE.) Initially these routines (BLOCXl_USER ROUTINE, BLOCR2 USER ROUTINE, BLOCX3_USER ROUTINE, etc.) do nothing ~' e., their default content is merely the FORTRAN state~ents Return and End), but they can be modified by the user. The user program ~lock only sets up parameters for controlling execution of the user program.
The user program timing options include keying off a measured variable. In this case the variable is not used for anything but timing. This option can be altered by specifying screening limits on the measured variable value (using fields 1332 and 1334), so that measured values outside the screening limits are ignored. Block timing and switching and the block description fields follow the general outlines given above.

Parameters The parameters are:
Measured variable type- a number code representing the sof~ware system and the type of entity which the block should use for the measured variable.

~756~

Measured variable number: the number of the entity within the specified system which the block will use for the measured variable. For example, if th measured variable type is a historical database variable, the measured variable number is the number of the variable in the historical clatabase. After the measured variable ~ype is entered, the label next to this field will show what type of data is needed. When the measured variable number is entered, other flelds will also be filled in: the name and units for ~he measured variable; units and default values for the max and min measured values.
Timing option, execution time interval, and ~ey block number: these parameters are described above.
Switch system and switch number: these are described above.
Minimum and maximum value of measured variable: These define screening limits for reasonable values of the measured variable. Whenever the measured variable value falls outside these limits, the value will be ignored and no action is taken.
Action log file: this field is described above.

Proqram Block O~eration The sequence of actions performed by a User proqram block is:
- If block status is "On-deselected", do not exec-~te the user routine.
- If a measured variable is specified:
~ Get the current value of the measured variable (If not accessible, set status to "On-err..."
and do not execute the user routine).
* Test the value of the measured variable. If it outside the range of allowed values, se'~

~2~75fi~
status to "On-msrd out of lims" and do no~ ~xecute the user routine.
- Execute the user rout:ine. The routine name is derived from th~ block number. Block 1 calls Bl o c k l_u ser_rou tine, blo ck 199 calls Blockl99 user_routine, etc.
- If a fatal error occurs in the user routine, bypass the rest of the routine, ancl set the block status to "On-Failed usr routin".
- If the block failed on the last execution, but did not fail on this execution, set the block status to "On".
- Clear all the values in the user_vars common block.

Build-User-Proqram Procedure The build-supervisor procedure (in the presently preferred embodiment) also provides a structured environment for creating user programs. As will be described below, the build-expert procedure will create the source code for one or more customized expert systems; but the user must still insert a call to this expert code into one of the blocks in the supervisor procedure. The build-user-program procedure facilitates this, and also provides convenient support for sophisticated users who are able to write their own utilities.
In the presently preferred embodiment, this is a structured environment in which users can write FORTRAN
subroutines and incorporate them into control blocks.
User programs can be run as the only block function by defining a User Program block (as described above), or they can be used to take additional actions (such as message logging) in combination with feedback or feedforward control blocks.

~7S~3 At a minimum, a user with no programming knowledge can insert a one-line call into a user program block, to make use of an expert ubprocedure created using the build-expert procedure. However, to take full advantage of the capability for user programming, the user should (in the presently preferred embodiment) already be comfortable programming in FORTRAN and using FORTRAN
functions and subroutines, and in using the Vax EDT
editor. The build-user-program environment 1810 in this embodiment is menu driven rather than forms driven, and therefore provides less online help than some of the other functions described.
Writing a basic user program involves 5 steps:
- Selecting which block number's user program to edit;
- Editing the file which contains the user program code for that block. The EDT editor 1812 is used to write and modify the FORTRAN language code;
- Checking the code for errors in FORTRAN
syntax;
- Updating the supervisor procedure by incorporating the latest version of the user program into the base cycle procedure and running the new base cycle procedure; and - Monitoring user program execution to assure that the program is executing properly.
In the example shown in Figure 16, the top level build-supervisor menu permits the user to enter the build-user-program environment by pressing keypad 5.
While in the build-user-program environment, the user can edit the blo k user routine; check the block user routine for errors in FO~TRAN syntax; and update the supervisor procedure by incorporating the new version of the block user routine. The first prompt from the user program menu asks what block number's routine the user ~297~16~

wants to work on. Entering the block number and pressing return brinqs up another program menu, with options which will now be described.
Editing the user routine begins by selecting menu option 1 ("Edit user routine"). This will start the EDT
editor. User routines of some sort already exist ~or all the blocks. Blocks which have never had any special programming have a user routine which does nothing - it consists simply of a RETU~N statement followed by an END
statement, and, if the block's user routine has never been worked on, this default routine will be brought up by the editor. To make a functioning routine, the user must add FORTRAN code before the RETURN statement to perform the desired function. (In the presently preferred embodiment, the user can simply edit the ~ile - like any other FORTRAN source code file on the VAX.) For example, code for logging messages or calling an expert subroutine can be inserted at this point.
Once the user has edited the user routine and returned to the menu, he can select option 5 to check for FORTRAN syntax errors. If the new routine has no FORTRAN syntax errors, the screen will show "The user's routine compiled with no errors in syntax." If the new coding has syntax errors, the user will see them reported on the terminal screen. The user can then correct the errors using Option 1 (edit), and repeat until all errors have been removed.
Once the user has a routine that compiles with no errors, he can include it in the running version of the supervisor procedure by using menu option 8 ("Update").
This will compile the user's routine, relink the base cycle procedure using the user's newly compiled routine, stop the procedure which is currently running, and restart the base cycle procedure using the newly linked version containing the user's new routine.

~75~

After compiling the user's routine, the build-supervisor procedure will ask if there are any other subroutines in separate files that need to be compiled.
Some application may require more than one subroutine, and, if desired, they can be split up in separate files.
To make a routine in a separate file, the user can select option 2 ("Edit a separate FORTRAN subroutine") to create and modify the file, and then select option 6 ("Check a separate subroutine for FORTRAN errors") to check for FORTRAN errors. To include the separate file into the supervisor procedure, the user can use the update option, then answer "Y:" when asked if any separate routines need to be compiled and included. The base cycle procedure can then be linked, and then restarted.
After the user's routine has been incorporated into the base cycle procedure, the user can monitor it to make sure it executes properly. There are two key indicators of a problem with the user's user routine:
the block status and the control program log file. If the user's routine has an error which would normally cause a stand-alone FORTRAN program to terminate, the base cycle procedure will bypass the error and the remainder of the user's routine, and change the block status to "On-Failed usr routin". This can be seen using the block monitoring screen. If the user's routine fails once but runs successfully on a subsequent execution, the block status will be changed to "On-Recovrd Usr Error", and a message will be posted in the control program log file indicating which user routine had the error, when it occurred, and what the error was. The log file can be viewed using the "List log file" option on the System functions screen.
The user can print a listing of a user routine by using option 3 (or option 4 for a separate routine).

~97~36~
If the user ' s user routine fails and the user needs to retreat to the last vers ion that was running, he can use the restore option (keypad 9). This will prompt the user for any separate routines that need to be r~stQred, and retrieve the old versions saved by the build-supersrisor procedure.
In the presently preferred embodiment, there are several include files which can be used in user routines: "User_vars. lnc" contains a common bloc~s which is used to pass information about contrs31 block actions to user routines. The common block contains a Real array, an integer array, and a character~80 array.
Control blocks load values into these arrays for the amount of change made in the manipulated variable, the error in a feedback l:~loc3c, the time the action was taken, etc. The user program block zeros out these values after the user routine executes a RETURN
statement. "ACSserv. inc" declares all the ACS service routines (which are integer*4 functions) .
"ACSstatus. inc" declares all the legal ACS status return values. These values must be declared external before they can be used. "Van functions. inc" declares some of the retrieval and time functions from the historical process database, and declares some of the status return 2 5 values .
Of course, many different computer languages and architectures could be used in practising the presenL
invention: the sample FORTR~N routines specified (as well as other features which, for example, relate specifically to the use of a VMS operating system) simply sets forth the best mode as presently practiced, but a tremendous variety of other languages, operating environments, and/or hardware could be used instead.

~9~ 0 Block-Handlina Utilities Figure 14 shows a menu which is preferably presented to a user who has elected to use the utilities provided in the build-supervisor procedure (e.a. by hitting keypad 9 when faced with the menu shown in Figure 16). While these utilities are not necessary parts of every implementation of the innovative concepts described in the present application, they do help users to take advantage of the full power available.
In the presently preferred embodiment, the supervisor procedure includes the capabilities for copying and deleting blocks, and for printing listings of block setup parameters. Deleting a block (Xeypad 7~
removes all the block type and setup parameter data for the block, leaving it a~ailable for another use. Copying a block (Reypad 8) reproduces the blocX type and setup parameters of one block into another. Printing blocks (Xeypad 9) allow the user to select blocks to be printed either by nu~ber range or by searching for string matches in the application name or block description fields, and makes full or abbreviated listings of block parameter data on the printer of the user's choice.
If the user elects to copy a block, the build-supervisor procedure prompts the user to enter in the "Source block" field 1402 the number of the block to copy. ~he build-supervisor procedure then fills in the information fields appropriately for that block, allowing the user to confirm that he has entered the right block number, and prompts the user again for the target block into which the block should be copied (field 1404). After this is entered the build-super~isor procedure fills in the information fields for the target block, and prompts the user again. When the user confirms that the block is to be copied, the block type and parameters are overwritten in the shared memory 814.

lX~7~6~

After the block is copied, the build-supervisor procedure prompts the user again, asking whether the source block should be deleted or left unchanged~ The build-supervisor procedure confirms that the source block was either del~ted or not deleted.
Block information can only b~e copied into target blocks whose status is "Off" or "Inactive". To copy information into a block with an active status, the user must go to the block setup form for that block, and toggle the block off. This safeguard provides greater system integrity.
In the presently preferred embodiment, keypad 9 will initiate printing a listing of selected block parameters. The build-supervisor procedure will prompt the user to enter in field 1410 for the starting range of block numbers to print, or to hit return if he wishes to select blocks by string searches. To print a range of block numbers, the user can enter the lowest number block in the range, press return, then enter the higher number block (in field 1412) and press return. To select the blocks to be printed by search for string matches, the user can press return without entering a number for the starting blocX. To search the block description fields, the user can enter the desired string in the description search string field 1406. To search the block application name field, the user can press return without entering anything in the description field, and enter the desired string when prompted in the application name field 1408. In either case, the user can use capital and lower case letters interchangeably, since case is not checked in the string searches. The user need not fill in the whole search string field. A
block will be selected to print if the string the user enters appears anywhere in the searched field~

1~5 The build-supervisor procedure will now prompt the user for a short or long list. A short list shows only the block number, type, description, and application name. A long list shows the entire setup form for that block. The build-supervisor procedure will clear the screen and prompt the user for the printer he wishes to use. The user can type the number of the printer if he knows it, or enter L to get a list of printers to chaose from. The user's terminal screen and its attached printer can be selected, as well as Vax system printers.
When the print job is completed, the build-supervisor procedure will report the number of blocks that were printed.

Monitorina In addition, the supervisor procedure provides several functions for following the performance of control strategies as they operate. The block monitoring screen allows the actions of individual blocks to followed. The system functions screen shows the status of the supervisor procedure. The control system runs as a batch-type process on the Vax, and so it has a log file which contains all the error messages generated by the system.
A user who requests block-monitoring is presented with a block description form which includes a block number field in which he can insert the number of the block to be monitored. The remaining fields on the form then are filled in appropriately by the build-supervisor procedure, and are subsequently updated every 5 seconds.
The information shown includes:
- the current time;
- the time at which the supervisor base cycle procedure will make its next scan through the blocks (and blocks which are due to execute will be executed);

ts~

- the block type twhlch was specified during block setup, e~q. feedforward, feedback, etc.);
- the block description (which was entered during setup);
- the type, number, name and units of the measured variable which was specified in block setup (if none was specified (e q. in a program block), this field will be blank);
- the current value and time stamp of the measured variable (the time stamp for compressed variables is the time the last new value was receivedi for manual entry variables it is the time stamp of the last entered value; and if no measured variable was specified, this field is blank);
- the goal value for feedback blocks (for other block types, this field is empty);
- the number, name, units and type of manipulated variable;
- the current value of the manipulated variable (with time stamp if one has been defined);
- the timing option entered during block setup;
- the execution time interval specified during block setup. If the block timing does not include any fixed frequency, this field is blank.
- the time the block last did its scheduled actions (this is normally the last time the block was scheduled to execute according to its timing option parameters, regardless of whether ~he block acted to change the manipulated variable);
- the current status of the block; and - the last five control actions made by the block (or, for Shewhart blocks, the last five deviation values) and the times at which they occurred.

1~7~

In the presently preferred embodiments, a similar overhead ~unction permits the user to take a look at the current status of key sys~em parameters, including:
- Base scan interval: the time interval at 5which the base cycle procedure scans through all the properly configured blocks, checking for changes in the on/off status, testing each according to its timing option and status to determine whether it should execute, and executing those that are due to execute.
10- Next base cycle time: the time at which -.he supervisor procedure will actually do the next scan.
This time should always be in the future, and should never be more than the base scan interval away.
- Current system status: provides information 15about what the supervisor procedure system is currently doing. Since the supervisor procedure only does its actions once every base scan interval, the system spends most of its time sleeping - i.e. waiting for the next cycle time to come. The normal system status values are:
20* Running-Sleeping : the normal status value. All control actions on the last scan have completed and the system i5 waiting for the next scan.
* Running-Computing : the system is currently performing block checks and executing blocks.
25Since calculations in the supervisor procedure finish rather quickly, this status will rarely be seen.
~ Terminated normally: This status indicates that the supervisor procedure system has been stopped in an orderly way. Normally this status value 30will only be seen if the system manager has stopped the system, or briefly when a user performs the Update function on the user program menu.
An authorized user can change the base scan interval, stop the supervisor process (together with any 35auxiliary processes used for communication with PCS or other control systems), r~start the supervisor process (and any auxiliary prscesses), or view the log file to which the base cycle procedure writes error r~ports and messages~

~ock Initialization Blocks are initialized when they are first tuxned on, or when the supervisor procedure is restarted after an outage of 30 minutes or more and the block had already been on. Block initialization sets the "last execution time" of the block to the current time. The "last execution time" value is used ln fixed interval timing and also as a block monitoring parameter. If the block has a measured variable, the "last measured time"
is set equal to the current time of the measured variable. This parameter is used when block timing is keyed off the measured variable. If the block timing is set to key off another block, the key block time is set equal to the last execution time of the key block. For feedforward blocks, the "old measured value" is set equal to the current value of the measured variable.

12975~(~
~uild-ExPe~t ~nd ~XPe~t P~ocedures The procedures for constructing an expert ~ystem from ~ domain expert's Xnowledge will now be described, together with the procedures by which the expert system is called up by ~he operating software ~preferably the process control supervisor procedure, as described above).
It should be noted that ~he structures and advantages of the build-expert procedure are not entirely s~parate from those of the expert procedure (or procedures) generated thereby. The two procedures are preferably çperated separately, but they are designed for advantageous combination. The features of the expert procedure are partly designed to advantageously facilitate use of the build-expert procedure, and the features of the build-expert procedure are partly designed to advantageously facilitate use of the expert procedure.
The build-expert procedure works especi~lly advantageously as an integral p~rt of the supervisor procedure, which (in the presently preferred embodiment) is a VAX-based layered control system. The build-expert procedure produces complete FORTRAN subroutines that execute the expert actions. The supervisor procedure (.e . a . via a user program block) provides the functions for running an expert subroutine at specified times, ~nd ~lso provides calla~le routines that can be used by these subroutines to m~ke and modify supervisor ~ctions.
The build-expert procedure can be used without t~e preferred superYisor procedure, but the user must provide a host program running at ~ppropriate times to call the subrouti~es.

~7560 In the presently preferred embodiment, the build-expert procedure is accessed by selecting the "User program" option on the top-level menu in the build-supervisor procedure (see Figure. 16), entering the desired block number, and then selecting the Expert system development option on the user program menu. This will take the user to the build-expert procedure, which (in the presently preferred embodiment) presents a menu as shown in Figure 17.
From this menu the user can access setup templates for the 3 rule types. The user also has access to functions for printing the rulebase, and for building a new expert subroutine.
The rule templates used in the build-expert procedure allow the user to enter and modify the specification information for rules. The build-expert procedure is different from the build-supervisor procedure in the way it handles data. When a rule name is entered in the build-expert procedure and the RETURN
or TAB key pressed, the letters are capitalized and the embedded spaces are transformed to underscores. This is how the build-expert procedure stores all character data. The other fields on rule templates are not transformed like this until the rule is stored. When the rule is recalled onto the template, the other fields will be capitalized with embedded blanks changed to underscores. In the presently preferred embodiment, the rule name, data type, and data number fields are the only fields on the rule templates for which the user's entry is checked i~mediately (others may be modified in the future to do this). The remaining fields can be filled in with any data that the template allows (some fields accept only intsgers, some only alphabetics, etc). The data on the remaining fields is tested only 12~756~

when the u er presses the keypad '-" to store the rule.
The build-expert procedure then examin~s the data for errors, and requests corrections if needed. The build-expert procedure always shecks rule names (and condition names) to be sure they are valid and meaningful where entered. In the presently preferred e~bodiment, the build-expert procedure checks other data for most errors, but it does not check for all conceivable errors. Data entered on a rule template is N4T stored until the keypad "-" key is pressed to store the rule.
Data on a template will not be stored if the rule name field is blank. Data on a template can be lost if the user enters the data, then modifies the rule name field before pressing keypad "-". All the rule templates have a "delete rule" (keypad "-") and "top of form" (keypad 9) softkey. The delete rule key will ask the user to confirm the deletion by pressing the key again, and then deletes the rule from the rulebase. The top of form key simply takes the user to the top of the template.
After all the rules have been entered, the FORTRAN
expert subroutine must be senerated using keypad 9, "Generate Expert". Changes made in the rules will not become effective until the expert is rebuilt. When the build-expert procedure is used within the build-user-program environment (as discussed above), the FORTRAN
subroutine is generated in the same directory with the user program and is named Blockn expert system.for, with the subroutine name Blockn expert system (n is the number of the block being worked on.) To use the expert from within the supervisor procedure, a one line user program must be written to call the expert. The one executable line is:
Call Blockn expert system .

~75~3 Standardized Pata Interface The build-expert procedure uses a ~tandard data interface. In the presently preferred embodiment, data sources are speci~i~d by a pair of integer parameters.
S O~e, the "data type", is a coded value which identifies the type of data desired and the da~a collection system from which the data is to come. The second , the "data number", identifies the specific data entity of that type within that system. Some data types (e.a. time averages) require a third parameter specifying the time over which to average.
This system has several advantages. First, it pro~ides a simple method of data identification in a many-system environment. Secondly, it allows the rules lS to easily reference data of many types from many diverse (and possibly remote) sources without requiring the user to write any custom program code for data retrieval.
Some useful data sources might include: any lower level process control system; any supervisor process (whether running on the same hardware system or another); any process database (whether running on the same hardware system or another): of any computer which collects or generates dat~ ("computer" be~ng defined v e r Y broadly to include, ~l~a., any system which includes microprocessor, such as a microprocessor based single loop co~troller).
In t~e presently preferred embodiment, the data types allowed by the build expert procedure ~re: 1) the latest value of ~ d~tab~se var~able; 2) ~ ti~e weighted average over ~ given ti~e interval of the value of ~
database variable; 3) ~ 6imple average over a g~ven t~me $nt~rval of the discrete d~t~ v~lues of ~ database ~ariabl~: 4~ the feedb~ck error of ~ feedback block ln the supervlsox process: 5) the change in the value of the ~e~sured ~ari~bl~ of a ~upervisor feedforward block 75~

since the last time the block acted; 6),7) the goal values of control loops in ~wo particular lower level control sys~ems; ~) the second most rec~nt value of a discretely sample proc~ss database variable; 9),10) the ~aximum and minimum limits for the manipulated variable value in a supervisor control block. Other sources could be used, for example any kind of parameter from any of the systems named in the previous paragraph, or system lexical functions (such as the system clock). As a further alternative, it might also be advantageous in some embodiments to make one of the options here a one-line blank, in which the user could enter a pointer to a callable procedure to fetch a variable value.
In the presently preferred embodiment, the user must specify the data type before the data number. When the data type is entered, a prompt line pops up on the template indicating the specific data type, which aids the user in entering the proper value for the data number. When the data number is entered, it is tested to be sure it is a meaningful entry for the data type specified. Some additional information is then displayed (such as a variable name and its units) to aid the user in confirming his input. These fields also serve to aid understanding of rule function and meaning when recalled for review or modification.

Constructina the ExDert SYstem An expert system goes through four steps in using knowledge: 1) The expert gets information from the outside world; 2) analyzes that information using its rules; 3) deduces the correct conclusion from its analysis; 4) communicates its decision to the outside world.
Rules state that WHILE one thing is true THEN
something else must ~e true. For example, WHILE the 1~7S~i() composition o~ water in the Feed mix drum is greater than 12%, we say "FEED MIX WATER COMPOSITION" is "HIGH".
Or, WHILE "FEED MIX WATE~ C~MPOSITION" is "HIGH", AND
"DEHY COLUMN BOTTOMS WATER" is "HIGH~', we say "TOTAL
SYSTEM WATER" is "TOO HIGH". WHILE "TOTAL SYST~M WATER"
is "TOO HIGH", we "Give a high water warning message."
This simple example shows the three basic types of rules which are used in the build-expert procedure: the sample retrieval rule described tests the VA WE (12%) of a process measurement (FEED MIX WATER), and assigns a value (HIGH, LOW, etc.) describing the condition of the measurement. The sample analysis rule given tests for combinations of values defined by other rules. If it finds the combination, the analysis rule creates a new condition (TOTAL SYSTEM WATER) and assigns a value (TOC
HIGH) describing that condition. The sample action rule described tests for one specific condition (TOTAL SYSTEM
WATERj has one specific value (TOO HIGH), and takes a specified action (Give a high water warning message).

Sam~le Ex~ert Svstem An example of construction of an expert system using novel methods and system as set forth in the present application will now be described in detail.
The sample system here chooses an optimum control action 2S from among three possibilities. A key element of the problem here is to control the composition of by-product MFB in the product stream of a refining train like that shown in Figure 7. MFB is separated in two columns in series. Essentially equivalent response in MFB
composition can be achieved by changing the steam flow to either column. Both columns use high value steam in their reboilQrsO The first, the Xylene column, dumps the steam energy to cooling water. The second column, the MFB column, recovers most of the energy by generating 1~7~6V
steam overhead. Equipment limitations constrain both steam flows to within high and low limits.
As column feed rate varies, steam loading can change from minimum steam on both columns to maximum S steam on both columns~ The optimum operation maximizes steam on the low cost column (MFB) and minimizes steam on the high cost column (XYL).
In this example, sontrol of the MFB composition is done statistically. The laboratory measurements of MFB
are statistically tested using Shewhart tests. The Shewhart tests determine the on aim status of MFB: Off aim high, Off aim low, or on aim. When MFB is off aim, the Shewhart test g~nerates an estimate of how far off aim MFB is. This estimate can be used to compute the feedback action needed to bring MFB back to aim: off aim high requires an increase in steam to the two columns, off aim low requires a decrease.
The expert system which is sought to be developed should instruct the supervisor procedure to make the least cost control action. Plant startup, problems, or poor manual operation may distribute steam in a non-optimal way, and this cannot be known beforehand.
The objective will be to move toward the optimum steam distribution through control action response to off aim conditions. Steam will not be shifted for cost savings only, since this complicates control and may negatively affect quality.
Although this may seem like a trivial decision, it actually involves considering 3 variables in the correct sequence. This is where the "expertise" gets into the "expert" system. Developing the logic is the task of the human expert, and the system disclosed herein merely expedites the transfer of that logic into the expert system. The process control decision tree which will be ~L~97S~i~
implemented, in the sample embodi;nent described, i5 a follows: First, decide whether to add or cut steam:
(1) If adding steam:
(1.1) First check the MFB column. lf MFB
column steam below maximum, add steam here.
(1.2) If the MFB column steam is maximum, then (1.2.1) Check the Xylene column. If xylene column steam is below the maximum, add steam here.
(1.2O2) If xylene column steam is maximum, the user cannot add steam. To get MFB on aim, feed to the column must reduced. Cut column feed.
(Z) If cut-ting steam:
(2.1) First, c~eck the xylene column. If xylene column steam is above the minimum, cut steam here.
(2.2) If xylene column steam i5 minimum, then (2.2.1) Check the MFB column. If MFB
columns steam is above minimum, cut steam here.
(2.2.2) If MFB column steam is minimum, the user cannot cut s eam. To get MFB on aim, Feed to the column must be increased. Add column feed.
It is highly desirable that the decision tree being implemented should cover all the possible cases, and that the conclusions should be mutually exclusive. If it does not cover all the possible cases, the e~pert will sometimes be unable to come to a conclusion. If the conclusions are not mutually exclusive, then more than one conclusion could exist. Although this might logically be possible, this condition might mean unpredictability as to which conclusion will be reached, so that there would not be a reproducible basis for action.

lX97~0 Domaln expert~, in performing the analytical ~teps which the ~xpert ~ystem should ideally emulate, will Garry out many ~teps implicitly; but implementing a process in a computer requires that each ~tep be expressly 6pelled sut. To m~ke the decision, the user must first ~pecify:
~ what measur~ments will be used to evaluate the process condition (in this example, MFB_STEAM, XYL_STEAM, DIRECTION OF CHANGE3;
- what ranges of values of the measurements (e.~. 40 ~ XYL STEAM) ma~ch what status values for the measurements (e.q.MID RANGE);
- what combinations of status values (e.q.
MFB_STEAM is MAX and XYL STEAM is MIN, and DIRECTION_OF CHANGE is ADD) will result in what other condi~ions (e.a. ACTION is CHANGE XYL STEA~);
- what must bedone to make the desired action happen.
The d~tailed specific~tions needed to handle this problem are defined as follows:
Measurements: For MFB column steam, the goal on the computer loop for MFB steam is a good measure. In the sample system referred to, this is loop 30 in the "DM~ PCS" system. For xylene column steam, the goal on the comput~r loop is a good measure. In th~ sample system referred to, this is loop 5 in the "DMT PCS"
system. For the direction of change, the best measure is the feedback error on the control block that will be changing steam (in this case, the third block in ~he supervisor procedure). For MF8 column steam, we know the operat~ng limits of ~te~m flow to the column (in tho~sands of pounds per hour (MPP~
MAX ~ 49.~;
MIN < 28.5;
MID > 28.5 ~ 49.5.

~9~s~

And for the xylene column:
MAX > 66. 5 MIN ~ 4 0 . 5 MID ~ 40.5 < 66.5.
For the direction of action, we know that an off aim high condition means a steam increase. Our feedback block ( in the supervisor procedure) is using the Shewhart deviatiorl f:rom aim as the measured variable, with an aim of 0. 0. Thus if the feedback error is positi~fe, we increase steam:
ADD if Feedback error > 0 CUT i f Feedback error < 0 or = 0 For the analysis of these conditions, we need to specify what combinations of conditions lead to what result . This expert provides only one result: it def ines what the manipulated variable will be - xylene column steam ~ "xyl col_steam" ), MFB column steam ( "MFB col steam" ), or column feed ( "column feed" ) . ~his logic results in the following rules:
Table 5 MANIPULATED VARIABLE is MFB COLUMN STEAM While Direction of change is ADD
and MFB COL STEAM is not MAX

MANIPULATED_VARIABLE is XYL COLUMN STEAM While Direction of change is ADD
and MFB COL STEAM is MAX
and XYL FOL STEAM is not MAX

MANIPULATED VARIABI~: is COLUMN FEED While Direction of change is ADD
3 0 and MFB COL STEAM is MAX
and XYL COL STE~ is MAX

~7560 MANIPULATED VA2IABn~ is XYL COLUMN STEAM While Direction of_change is CUT
and XYL COL STEAM is not MIN

MANIPULAT~D VARIABT.F is MFB COLUMN_ST~M whil0 Direction of change is CUT
and XYL COL STEAM is MIN
and MFB COL STEAM is not MIN

MANIPULATED_VARIABLE is COLUMN FEED While Direction of ohange is CUT
and XYL_COL_ STEAM is MIN
and MFB COL_STEAM is MIN

Note that: 1) some of the conditions are negated, i.e. it is specified that a rule or condition must NOT
have a certain value (MFB COL_STEAM is NOT MIN). 2) More than one test can set the value of the same condition (MANIPULATED VARIABLE in this case). 3) More than one test can assign the same value to the same condition ( e. the second and fourth both set MANIPULATED
VARIABLE to XYL_COL STEAM, under different conditions).
8y contrast, the retrieval rules each assign one of several descriptors to a name which is unique to that specific rule.
Finally, the expert must do something with its conclusion to change the way the supervisor acts. In this case, assume that there are three feedback blocks in the supervisor procedure, all having the Shewhart MFB
deviation as measured variable, with aims of 0Ø One (#3) manipulates xyl COL steam, one (#4) MFB_column steam, and one (~5) column feed rate. The supervisor procedure includes a FORTRAN callable function named ACS SET~CT BLOCK, which allows only one block out of a set to take action. The others are "de-selected" and 56~

stand ready to act if selected. When ACS select block is called, the first block number in the argument list becomes selec~ed, the others are deselected. Trailing zeros are ignored.
Thus, to enable the expert ~eing built to change the control strategy, the following rules are added :o the rule set:

While MANIPULAT~D VARIABLE is XYL COL STEAM Then do the FGRTRAN statement:
ACS status = ACS select block ( 3, 4, 5, 0, 0, 0 j While MANIPULATED V~RIABLE isMFB_COL_STEAM Then do the FORTRAN statement:
ACS status = ACS select_block ( 4, 3, 5, 0, 0, 0 ) While MANIPUL~T~D VARIABLE isCOLUMN FEED Then do the FORTRAN statement:
ACS status - ACS_select_block ( 5, 3, 4, 0, 0, 0 ) The foregoing data entries are all the inputs needed to define the expert system.
Within the supervisor procedure, an expert system can be developed for each block. Used in this way, the build-expert procedure will create the FORT~AN
subroutine Blockn expert system (where n is the block number, e. the subroutines will be named BLOCR2 EXPERT SYSTEM etc.), compile it, and place it in the proper library so that it can be called from within a supervisor block (by a user routine).

ExDert Rule Structure This sample embodiment provides an example which may help clarify what an expert procPdure does. Some 1~9~7~i0 more general teachings regarding expert system methods and structure will now be set forth.
Figure 2 is a schematic representation of the organization preferably used for the knowledge base.
Three main categories of rules are used, namely retrie-val rules 210, analysis rules 220, and action rules 230.

Retrieval_Rules The retriev~l rules 210 each will retrieve one or more quantitative inputs (which may be, e.q., sensor data 157 from one of the sensors 156, historical data 141 and/or laboratory measurements 162 from a historical data base 140, limits on variable values, goals 132 defined by the supervisor procedure 130, combinations of these, or other inputs). One of the significant advantages of the system described is that it provides a very convenient user interface for accessing quantitative inputs from a very wide range of sources:
essentially any data object which can be reached by the host computer can be used. (The presently preferred embodiment uses DECnet and serial communication lines to link the computer which will be running the expert system with the various computers it may be calling on for data, but of course a wide variety of other networking, multiprocessor, and/or multitasking schemes could be used instead.~
In the presently preferred embodiment the retrieval rules are of two kinds: the simpler kind (referred to as "variable rul~s") will name one quantitative value (which may optionally be derived from several independently accessed quantitative inputs), and assign one of a predete~mined set of descriptors (variable status values 222) to that name. Each of the more co~plex retrieval rules (referred to as "calculation rulesn) pe~mits descriptors to be assigned selectively S6~

to a name in accordance with one or more calculated values (which may sptionally be derived from a number of guantitative variaoles).
Figure 3 shows the template used for a retrieval rule in the presently preferred embodiment, together with a sample of a retrieval rul~ which has been entered into the template. The areas in this drawing which are surrounded by dotted lines indicate the parts of the template which the user can modify, and which are preferably highlighted to the user in some fashion, ~g~
by showing them in reverse video. In this example, the user has typed in the rule name as "xylene column steam." The build-expert software has automatically translated this rule name, by changing all the spaces in lS it to underscores, so that it appears as a one word name. (This can be conveniently used as part of a variable name in conventional computer languages.) Thus, the rule shown in Figure 3, when translated into an expert procedure by the build-expert procedure, will define a set of variables whose names each begin with "XYLENE_COLUMN STEAM."
For example, in the presently preferred embodiment the rule shown will translate into the following set of variables:
"XYLENE COLUMN STEAM_STATUS" is a character variable (also known as a string or alphanumeric variable) which will have a string value which is either "MIN," "MAX," or "MID;"
"XYLENE COLUMN STEAM_VALUE" will be a real variable, representing the quantitative value originally retrieved for the parameter;
"XYLENE COLUMN STEA~ AGE" will be an integer varia~le representing the age of the quantitative value originally retrieved;

'375~0 "XYLENE CO~UMN_STEAM ASTAT" will be a character variable which is defined to have values of "TOO OLD" or "OK," depending on wh~ther the age value is within limits (note, for example, that this variable could easily be configured as a logical variable instead);
and "XYIENE COLUMN ST~AM FIRED" will be a logical variable which indicates whether this particular rule has been fired (on a given pass).
In filling out the retrieval rule template, the user must fill $n at least two of the classification blanks. However, in the presently preferred embodiment, only five classification ranges are permitted. (This limit could be changed, but there are significant lS advantages to permitting the user to input only a restricted number of ranges. Where the process control algorithm absolutely demands that the varia~le be classified into more ranges, two or more process variable rules could be used to label up to eight or more ranges.) Another constraint used in the presently preferred embodiment is that the user must enter at least the first two open ended ranges. He may enter up to three bounded ranges, to provide a complete coverage of all cases, but he must enter at least two open ended range specifications.
In the presently preferred embodiment, the build-expert procedure checks to see that the ranges defined are comprehensive and non-overlapping, before the rule is permitted to he added to the rule base.
Figure 4 shows an example sf a different kind of retrieval rule, known as a calculation rule. The menu for this rule is (in the presently preferred embodiment) presented to the user as two screens. The user may 3~ specify up to ten quantitative inputs, of any of the ~ ~'7S6V
types just referred to, as well as up to ten v~lues arithmetically derived from these inputs (or constants).
By having some of the derived values refer back to other ones that are derived values, quite complex formulas may be implemented. (One advantageous use of such formulas may be to relate off-line time-stamped laboratory measurements with the continuously-measured values of the same (past) time era, e q. in a component material balance.) Moreover, notice that the variable values and calculated values thus assembled may be used not only :o define a "key value" to be categorized, but also :o define the limits of the various categories against which the key value is sought to be tested.

Analysis Rules Analysis rules generally are used to embed the natural language reasoning as practiced by the domain expert. One important distinction between retrieval rules and analysis rules is that each rPtrieval rule has a unique name, but the analysis condition names defined by analysis rules are not necessarily unique. Figure 5 shows an example of an analysis rule 220. Again, the portions of the template which the user can modify are shown inside dashed boxes. Note that the template preferably used defines an analysis condition name and assigns a descriptor to that analysis condition name if specific conditions are met. In the presently preferred embodiment, the only tests permitted are ANDed combinations of no more than five logical terms, each of which can consist only of a test for identity (or non-identity) of two strings. Moreover, the string identity tests are preferably set up so that each of the com-parisons either tests a retrieval rule name to see if a certain variable status value 212 was assigned by that rule, or tests an analysis condition name to see if --.

o certain analysis status value 222 was assigned by one of the analysis rules. That is, as seen schematically in Figure 2, there is potential for recursion among the analysis rules 220 considered as a group, since some of the analysis rules 220 can refer to the outputs of other analysis rules 220~ Optionally the analysis rules could be sequenced so that there would never be any open-ended recursions, but in the presently preferred embodiment this extra constraint i5 not imposed.
Any one analysis condition name may (under various conditions) be assigned values by more than one analysis rule. That is, each analysis rule is preferably set up as an IF statement, and multiple such IF statements will typically be needed to specify the various possible values for any one analysis condition name.
In the presently preferred embodiment, the status of every analysis condition name and variable rule name are initially defined to be "unknown," and the logical comparisons are implemented so that no test will give a "true" result if one term of the comparison has a value of "unknown."
The order in which the analysis rules are executed may be of importance where an analysis condition name is multiply defined. That is, it may in some configurations be useful to permit the conditions of the various analysis rules 220 to be overlapping, so that, under some circumstances, more than one analysis rule may find a true precondition and attempt to assign a status value to the same analysis condition name. In this case, the sequence of execution of the analysis rules 220 can optionally be allowed to determine priority as between analysis rules. However, as mentioned above, this is not done in the presently preferred embodiment.
Moreover, more than one analysis rule may assign 5~0 the same analysis 6tatus value 222 to the same analysis condition name, under different circumstances.
It can be adv~ntageous, for purposes of documenting the reasoning embedded in the expert system, to give names to the analysis rules which include both the name and descriptor possibly linked by that rule: thus, for instance, a rule which is able to conclude that column operation is normal might be named "COLUMN_OP NORMAL."

Action Rules Figure 6 shows the presently preferred embodimen~
of the template for action rules, and an example of one action rule which has been stated in this format. Again, the portions of the template which the user can modify are i~dicated by dashed boxes.
The user has chosen to name this particular action rule "Change Xylene Steam," which the build-expert software has translated into CXANGE XYLENE_STEAM (for incorporation into various variable names such as "CHANGE XYLENE STEAM FIRED"). The names assigned to action rules are primarily important for documentation, 50 that, when this user or another user looks back through the rule base, the use of clear rule names for action rules will help to understand what the structure of the expert system's inference chaining is. In fact, it may be advantageous, as in the example shown, to generally pick analysis status values 222 which have fairly descriptive names, and then, to ~he extent possible, name the action rules identically with the corresponding analysis status values.
Note also that the action rules can refer back to a variable status value 212 as well as to an analysis status value 222.
Thus, in th~ presently preferred embodiment the action rules embody an absolute minimum of logic. They 56~) are used primarily as a translation from descriptive key words embedded within the inference chaining structure to the actual executable statements (or command procedures) which specify the action to be taken. Thus, S one way to think about the advantages of the expert system oryanization preferably used is that the emulation of natural language reasoning is concentrated as much as possible in the analysis rules, while the retrieval rules are used to provide translation from quantitative measurements into input usable with natural language inference rules, and the action rules are used almost exclusively to provide translation from the natural language inference process back to executable command procedures which fit in well with the computer system used.
Each of the action rule templates also gives the user several choices for the action to be taken to implement the action rule if its precondition is met.
The user can either insert an executable statement (in FORTRAN, in the presently preferred embodiment) or insert a pointer to a command procedure, or simply have the action rule send advisory messages. The third option is useful for debugging, since the expert can be observed to see what actions it would have taken, without risking costly errors in the actual control of the system.
In the example shown, an executable FORTRAN
statement is used, but the statement specified merely passes an action code back to the supervisor process. In the example shown in Figure 6, the procedure call given will cause the supervisor procedure to turn on the hlock whose number is given first, and turn off all other blocks whose numbers are given. Thus, the statement acs status - acs select_block (3, 4, 5, 0, 0, 0) 1~375g~0 would change the status of block 3 to "on-selected"
(assuming that it did not need to be initialized), and would set the status values of blocks 4 and 5 to "on-deselect~d." Thus, when the expert system has completed running, the supervisor procedure which called the expert procedure as a subroutine can selectively execute block functions depending on the values passed bacX to it by the subroutine.
Thus, the action rules permit a very large variety of actions to be performed. For example, one optional alternative embodiment provides synthetic-speech output;
optionally this can be combined with a telephone connection, to permit dial-out alert messages (e.a. to a telephone number which may be selected depending on the time of day shown by the system clock, so that appropriate people can be notified at home if appropriate).
Another optional embodiment permits an action rule to call up a further sub-expert. This might be useful, for example, if one expert subprocedure had been customized to handle emergency situations - who should be called, what should be shut down, what alarms should be sounded.

Generatina the ~x~ert Procedure After the user has input as many rule statements as needed, or has modified as many of an existing set of rule templates as he wishes to, he can then call the generate code option to translate the set of templates 115, including the user inputs which have been made into the rule templates, to create the expert system 120.

~297S6o Ge~eratin~ Source Code As a result of the c~nstraints imposed in the various rule templates, the translation from the constrained format of the templates is so direct that the executable rules can be generated simply by a series of appropriate string-eguivalent tests, string-append operations, logical-equivalence tests, arithmetic operations, and fetches.
Preferably three passes are performed: the first does appropriate character type declarations; the second loads the appropriate initializations for each rule; and the third translates the inference rules themselves.
An example of the initialization steps is seen in initialization of the analysis rules: an initial value such as "dont know" is assigned to each condition name, and the equivalence tests are redefined slightly by the translation procedure, so that, until some other value is assigned to the name by another rule, the statement "name" - "descriptor"
will be evaluated as false, and the statement NOT("name" = "descriptor") will also be evaluated as false.
SamDle Source Code A portion of the source code-for the procedure which actually performs this function, in the presently preferred embodiment, is as follows.

~2~7S~O

Table C ********~*******
C Build expert.for C Routine to generate FO~TR~N expert system code using C the process rulebase.
C
C
Subroutine Build expert C

Include 'pace$includes:Variable rule Params.inc' Include 'paceSincludes:Expert data.inc' Include 'paceSincludes:Analysis_commons.inc' Include 'pace$includes:Analysis rule.inc' Include 'pace5includes:Action commons.inc' Include 'pace$includes:Action rule.inc' Include 'pace5includes:Action Darams.inc' .C
Logical First Logical No more Character*25 Last cond Character~80 code dir file Character*80 Directory Integer*2 L dir Character~39 Subroutine name Character*14 Subprocess name Character~3 Cblock Integer*2 L sp Character*l Search string Integer*2 Srlen C

Call FdvSPutl(' Generating Expert System code....') C

C...Rewind the code file d write(6,*) ' will rewind code file' Rewind ( Unit = Code lun ) Next label = 2 -C...Get the name of the expert system code file, pick out the C subr name from it d Call Fdv$putl ( 'Will translate logicals.') Call Lib$sys trnlog ( 'PACE~RULES' ,, Directory ,,,) Call LibSsys trnlog ( 'PACE5CoDE' ,, Code dir file ,,,) d Call FdvSputl ( 'Did translate logicals.') Istart = Index ( Code_dir file, ']' ) 1~7560 Subroutine_name = Code_dir file(Istart+1:80)//Blank d Call FdvSputl ( 'Will get index of ".".') Iend = Index ( Subroutine name, '.' ) d Call FdvSputl ( 'Will clip subrout name.') If ( Iend .gt. 1 3 Then Subroutine name = Subroutine name(l:Iend-l)//Blank Else Subroutine name - 'Expert'//Blank End If d Call FdvSputl ( 'Will trim subroutine name.') Call Str$trim ( Subroutine name, Subroutine name, Srlen ) d Wri~e ( 6, 100 ) Subroutine name Write ( Code lun, 100 ) Subroutine name C

Cconstruct a sub process name If ( Subroutine name(1:5) .eq. 'BLOCR' ) Then d Call Fdv$putl('Is block.') d Call FdvSwait ( It ) Read ( Subroutine name(6:8), '(I3)' ,err= 91 3 Iblock d Call Fdv$putl('Is > 99.') d Call Fdv$wait ( It ) - Liblock = 3 Go To 93 91 Read ( Subroutine name(6:7), '(I2)' ,err= 92 ) Iblock d Call ~dv~putl('Is > 9.') d Call Fdv$wait ( It ) liblock = 2 Go To 93 92 Read ( Subroutine namet6:6), '(Il)' ,err= 93 ) Iblock d Call Fdv$putl('Is < 10.') d Call Fdv5wait ( It ) Liblock = 1 Go To 93 93 Write ( Cblock, '(I3)' ) Iblock Istart = 4 - Liblock Subprocess name = 'B'//Cblock(Istart:3)//' ' L sp = 3 + Liblock Else L sp = 1 End If C

100 Format( 1 ' Options /Extend source', /, 1 'C~*****************************~************** ~/~
1 'C' ,/~
1 'C Expert System Code',/, 1 'C' ~ /~
'C*******~*****~*************~***~*************~,/, 1 'C', ~, 1 ' Subroutine ', A, /, 1 'C', / ~

37~i60 1 ' Include ''ACSSincludes:~CSserv.inc " ' , / , 1 ' Include "ACS$include~:ACSst~tus.ino'' ' , / , 1 ' Include ''ACSSincludes:Sys funotions.inc'' ' , / , 1 ' Include ''($Jpidef)'' ' , / , 1' Integer*4 Vss~_to ascii time' , / , 1 ' Integer This Pass fires' , / , 1 ' Character*25 Unknown' , / , 1 ' Parameter ( Unknown = ''Unknown ")' 1 ' Character*25 OK' , / , 1 ' Parameter ( OR = ''OK
1 ' Character*25 Too old' , ~ , -1 ' Parameter ( Too old = "Too_old '')' 1 ' Integer*4 Now' , / , 1 ' Integer*4 Then' , / , 1 ' Character*18 C now' , / , 1 ' Integer*4 Itemlist(4j' , / , 1 ' Integer*2 Code(2)' , / , 1 ' ~quivalence ( Itemlist(l) , Code(l) )' , / , 1 ' Integer*4 Mode' , / , 1 ' Integer*2 Len' , / , 1 ' Character*80 Line' , / , 1 'C' 1 ) d write(6,*) ' wrote header info.' C..Make declaration code for variable rules C
C

First = .True.
1 Continue C

C..Read A rule C

Call Read var rule Params ( First , No more ) If t No more ) Go To 200 C..Write out FORTRAN declarations Call Str~trim ( Rule_name , Rule name , Len ) Write ( Code lun , 101 ) (Rule_name(l:len) , J=1,5 ) 101 Format ( 1 ' Real*4 ' , A , ' value' , / , 1 ' Integer*4 ' , A , ' age' , / , 1 ' Character*25 ' , A , ' stat' , / , 1 ' Logical*l ' , A , ' fired' , / , 1 ' Character*10 ' , A , ' astat' , / , 1 'C' 1 ) C

Go To 1 200 Continue S6(3 C..Make declaration code for calculation rules ~all Declare calc rules C..Make declaration code for analysis rules C
Last_cond - ' First = .True.
2 Continue C..Read A rule Call Read anal_rule params ( First , No more If ( No more ~ Go To 201 C..Write out FORTRAN declarations Call StrStrim ( An cond_name , An cond name , L2n ) Call StrStrim ( An_rule_name , An rule_name , ILen ) Write ( Code lun , 104 ) If ( An_cond name .ne. Last_cond ) 1 Write ( Code lun , 102 ) (An cond name(l:len) ) Write ( Code lun , 103 ) (An rule name(l:Ilen) ) Last cond = An cond name 102 Format ( 1 ; Character*25 ' , A , ' stat' 103 Format ( 1 ' Logical*l ' , A , ' fired' 104 Format ( 1 'C' Go To 2 201 Continue C..Make declaration code for action rules C
First = .True.
252 Continue C..Read A rule Call Read action rule params ( First , No more ) If ( No more ) Go TD 251 C..Write out FORT~AN declarations 1~7S~
c Call Str~trim ( Ac rule_name , Ac rule name , Len ) Write ( Code_lun , 262 ) Ac rule name(l:len) 262 Format ( 1 ' Logical*l ' , A , ' fired' , / , 1 'C' 1 ) C

Go To 252 C

251 Continue C
C...Now Write Initialization code Write ( Code_lun , 401 ) Subroutine name (l:Srlen) 401 Format ( 1 'C', / ~
1 'C Initialize the status values.' , / , 1 'C' ~ / ~
1 ' Van status = VssS from ascii time ( " " , Now )' , /
l ' Van status = VssS to ascii time ( Now , C Now )' , / , 1 ' Code(l) - 4 ' , / , 1 ' Code(2) = jpi~ mode' , / , l ' Itemlist(2) = %loc(Mode)' , / , 1 ' Itemlist(3) = %loc(Len)' , / , 1 ' Itemlist(4) = 0' , / , 1 ' sys_status = sys$getjpiw ( ,,,Itemlist,,,~' , / , 1 'd Write(6,901) C now' , / , 1 '901 Format ( / , " Running ' , A , ' at " , A )' , / , 1 'C' 1 ) C.... Initialize variable rules - This will set logical flags false and C retrieve the necessary data for the rule.
C

First = .True.
402 Continue C
C

C..Read A rule C

Call Read var rule params ( First , No more ) If ( No more ) Go To 420 Call StrStrim ( Rule name , Rule name , Len ) Write ( Code lun , 403 ) ( Rule n me(l:Len) , J =1,4 ) 403 Format ( 1 'C', /, l 'C....' , A , ' rule initialization' , / , 1 tC' ~ / ~
1 ' ' , A , '_astat = Unknown' , / , 1~9756~

A , ' _ s'cat = Unknown ' 1 ' ', A, '_fired = .False. ' C

I~ ( Ret_meth . eq. Current val ) Then Write ( :ode lun, 404 ) Var_num, (Rule name(l^len) ,J=1,2) 404 Format ( l ' Call Get eur data ( ', I4, ', ', A, '_value, 7 '_age 1 ) Else If ( Ret meth . eq. Discrete_avg ) Then Write ( code_lun , 405 ) ~et time , Jar_n (Rule_name(l:len) ,J=1,2) 405 Format ( 1 'C' ~ / ~
1 ' Then = Now + ', I12, /, 1 ' Call Get disc_avg_data ( ', I4, ', ', ~, '_value A, ' _ age, Then, Now ) ' Else If ( Ret meth . eq. Time _ wt avg ) Then Write ( code_lun , 406 ) Ret time , Var n (Rule name ( 1: len), J=l, 2 ) 4 0 6 Format 1 'C', / ~
1 ' Then = Now + ', I12, /, 1 ' Call Get_time wt avg_data ( ', I4, ', ', A, '_val , A
, '_age, Then, Now ) ' Else If ( Ret_meth . eq. Sec_last vant Point ) Then Write ( code_lun , 411 ) Var num , Rule name ( 1: len) 411 Format ( 1 ' Call Get_sec last vant POint ( ', I4, ', ', A, ' , Itime_stamp ) ' Else If ( Ret meth .eq. ACS ff delta ) Then Write ( code_lun , 407 ) Var num , Rule name ( l: len) 4 07 Format 1 ' ACS status = ACS get FF delta ( ', I4, ', ', A, ' Else If ( Ret meth . eq. ACS_fb error ) Then 1~756~) Write ~ code lun , 408 ) Var num , Rule_name(l:len) 408 Format ( 1 'C', /, l ' ACS status = ACS_get fb error ( ' , I4 , ' , ' , A , ' ) ' 1 ) Flse If ( Ret meth .eq. PCS DMT loop goal ) Then Write ( code lun , 409 ) Var num , Rule name(l:len) 409 Format ( 1 'C', /, 1 ' ACS status ~ ACS get_PCS_goal ( ''DMT '' , ' , 1 I , ' , ' , A , ' value )' 1 ~
Else If ( Ret_meth .eq. PCS TPA loop goal ) Then Write ( code lun , 410 ) Var num , Rule name(l:len) 410 Format ( 1 'C', / ~
1 ' ACS status = ACS get PCS goal ( ''TPA ~' , ' , 1 I , ' , ' , A , ' value )' 1 ) Else Write( Code lun , ~ ) 'C....Bad retrieval method' - End If C

Write ( Code lun , 510 ) (Rule name(l:len),J=1,2) 510 Format ( 1 'd Write(6,*) '' ' , A , ' value = '' , ' , A , '_value' C

Go To 402 420 Continue C

C....Initialize calculation rules C

Call Init_calc rules C

C....Initialize analysis rules Last cond ~ ' First = .True.
440 Continue C
C

C..Read A rule Call Read anal rule Paxams ( First , No more ) If ( No more ) Go To 450 Call Str$trim ( An cond name , An cond name , Len ) Call Str5trim ( An rule name , An rule name , ILen ) Write ( Code_lun , 441 ) ( An rule name(l:ILen) , J =1,2 ) If ( An cond name .eq. Last cond ) Go To ~40 lX~9756~
Last_cond = An cond name Write ( Code lun , ~42 ) ( An cond name(l:Len) , J =1,1 ) 441 Format ( 1 'C', /, 1 'C....' , A , ' rule initialization' , / , 1 'C', /, 1 ' ' , A , ' fired = .False.' 442 Format ( 1 ' ' , A , ' stat = Unknown' C
Go To 440 C

450 Continue C

C....Initialize action rules C

First = .True.
460 Continu~
C
C..Read A rule Call Read action rule ~arams ( First , No more ) If ( No more ) Go To 490 Call StrStrim ( Ac rule name , Ac rule name , Len ) Write ( Code lun , 461 ) ( Ac rule name(l:Len) , J =1,2 461 Format ( 1 'C', /, 1 'C....' , A , ' rule initialization' , / , 1 'C', /, 1 ' ' , A , ' fired = .False.' C

Go To 460 490 Continue 500 Continue C

C...Write the rule code C

Write ( Code_lun , 501 ) SO1 Format ( 1 'C', /, 1 ' 1 Continue' , / , 1 'C', /, 1 ' This pass fires = 0' , / , 1 'C' C
C

C...Write out variable rule code C

~97~i~0 First = .True.
C

502 Continue C

C..Read A rul~
Call Read var rule ~arams ( First , No more ) If ( No more ~ Go To 5 0 0 Call Str~trim ( Rule nam~ , Rule_name , Len ) If ( Age limit .eq. ~mpty ) Age limit = -365*24*60*50 Write ( Code lun , 299 ) ( Rule name(l:len),J=1,3) , Abs(Age_ 1 ( Rule_name(l:len),J=1,2) ~99 Format ( 1 'C', / ~
1 'C....' , A , ' Rules ' , / , 1 'C', / ~
1 ' If ( ' , /
1 ' 1 ( ' , A , ' astat .eq. Unknown ) .and. ' , / , 1 ' 1 ( ' , A , ' age .le. ' , I , ' ) ' , / , 1 ' 1 ) Then ' , / , 1 ' ' , A , ' astat = OK ' , / , 1 'd Write(6,*) ''' , A , ' age is OK.''' , / , 1 ' This ~ass fires = This Dass f ires + 1 ' , / , 1 ' End If' 1 ) Write ( Code lun ,Fmt=298 ) ( Rule name(l:len),J=1 Abs (Age limit) , 1 ( Rule name(l:len),J=1,2) 298 Format ( 1 'C', /, 1 ' If ( ~ , / , 1 ' 1 ( ' , A , '_astat .eq. Unknown ) .and. ' , / , 1 ' 1 ( ' , A , '_age .gt. ' , I , ' ) ' , / , 1 ' 1 ) Then ' , / , 1 ' ' , A , '_astat = Too old' , / , 1 'd Write(6,*) " ' , A , ' age is Too old.' " , / , 1 ' This ~ass fires = This pass f ires + 1 ' , / , 1 ' End If' 1 ) C

Write( code lun , 505 ) (Rule name(l:len),J=1,3) , Log opl , 1 Rule name(l:len) , Statusl , Rule name(l:len) , 1 Statusl , Rule name(l:len) 505 Format ( 1 'C', /, lX~7~

l ' If ( ' , / , 1 ' 1 ( .not. ' , A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , ' astat .eq. OK ) .and. ' , / , 1 ' 1 ( ' , A , ' value ' , A4 , ' ' , F12.5 , ' ) ' , 1 ' l ) Then ' , / , 1 ' ' , A , ' stat = " ', A25 ,'''' , / , 1 'd Write(6,*) ' " , A , '_stat is ' , A ,' " ' , / , 1 ' ' , A , '~ired - .True.' , / , 1 ' This_pass fires 5 This_pass_fires + 1' , / , 1 ' E~d If' 1 ) Write( code lun , 506 ) (Rule name(l:len),~=1,3) , ~og_op8 , 1 Rule name(l:len) , Status8 , Rule_name(l:len) , 1 Status8 , Rule_name(l:len) 506 Format ( 1 'C', / ~
l ' If ( ' , / , 1 ' 1 ( .not. ' f A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , ' astat .eq. OK ) Oand. ' , / , 1 ' 1 ( ' , A , ' value ' , A4 , I ' , F12.5 , ' ) ' , 1 ' 1 ) T~.en ' , / , 1 ' ' , A , '_stat = ''', A25 ,'''' , / , 1 'd Write(6,*) " ' , A , ' stat is ' , A ,'''' , j , 1 ' ' , A , ' fired = .True.' , / , 1 ' This pass_fires = This ~ass_fires + 1' , / , 1 ' End If' 1 ) If ( Status2 .ne. ' ' ) Then Write( code lun , 508 ) (Rule name(l:len),J=1,3) , Log_op2 , 1 Rule name(l:len) , Log op3 , Limit3 , 1 Rule name(l:len) , Status2 , Rule_name(l:len) , l Status2 , Rule name(l:len) 508 Format ( 1 'C', / ~
1 ' If ( ' , / , 1 ' l ( .not. ' , A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , ' astat .eq. OK ) .and. I , / , 1 ' l ( ' , A , ' value ' , A4 , ' ' , F12.5 , ' ) .and 1 ' 1 ( ' , A , ' value ' , A4 , ' ' , F12.5 , ' ) ~ , 1 ' 1 ) Then ' , / , 1 ' ' , A , ' stat = ''', A25 ,'''' , / , l 'd Write(6,*) ' " , A , ' stat i5 1, A, ~ I I I, /, 1 ' ' , A , ' fired = .True.' , / , 1 ' This pass fires = This ~ass fires + 1' , / , 1 ' End If' 1 ) O

End If If ( Status4 .ne. ' ' ) Then C

Write( code lun , 509 ) (Rule_name(l:len),J=1,3) , Log_op4 , 1 Rule name(l:len) , Log_op5 , Limit5 , 1 Rule name(l:len) , Status4 , Rule name(l:len) , 1 Status4 , Rule name(l:len) 509 Format ( 1 'C', / ~
1 ' 1 ( .not. ' , A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , '_astat .eq~ OK ) .and. ' , / , 1 ' 1 ( ' , A , '_value ' , A4 , ' ' , F12.5 , ' ) .and 1 ' 1 ( ' , A , '_value ' , A4 , ' ' , F12.5 , ' ) ' , 1 ' 1 ) Then ' , / , 1 ' ' , A , '_stat = " ', A25 , " " , / , 1 'd Write(6,~) " ' , A , '_stat is ' , A ,' " ' , / , 1 ' ' , A , '_fired = .True.: , / , 1 ' This pass_fires = This ~ass_fires + 1' , / , 1 ' End If' 1 ) End If If ( Status6 .ne. ' ' ) Then C

Write( code lun , 511 ) (Rule name(l:len),J=1,3) , Log_op6 , 1 Rule name(l:len) , Log_op7 , Limit7 , 1 Rule name(l:len) , Status6 , Rule_name(l:len) , 1 Status6 , Rule_name(l:len) 511 Format ( 1 'C', / ~
1 ' 1 ( .not. ' , A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , ' astat .eq. OK ) .and. ' , / , 1 ' 1 ( ' , A , '_value ' , A4 , ' ' , F12.5 , ' ) .and 1 ' 1 ( ' , A , '_value ' , A4 , ' ' , F12.5 , ' ) ' , 1 ' 1 ) Then ' , / , 1 ' ' , A , '_stat = ''', A25 ,'''' , / , 1 'd Write(6,*) ''' , A , ' stat is ' , A ,'''' , / , 1 ' ' , A , '_fired = .True.' , / , 1 ' This pass_fires = This Pass-fires + 1' , / , 1 ' End If' 1 ) End If Go To 502 C

~7S60 600 Continue C

C...Write out calculation rule code C

Call Write calc_rules C

C...Write out analysis rule code C

First = .True.
C

602 Continue C

C..Read A rule Call Read anal_rule params ( First , No_ more j I ( No more ) Go To 700 C
Call StrStrlm ( An cond_name , An cond_name , Len ) Call StrStrim ( An rule name , An_rule_name , ILen ) Write ( Code_lun , 699 ) (An rule name(l:Ilen),j-1,2) 699 Format ( 1 'C', / ~
1 'C....' , A , ' Rules ' , / , 1 'C', / ~
l ' If ( ' , / , 1 ' 1 ( .not. ' , A , ' fired ) .and. ' 1 ) If ( An rulel .ne. ' ' ) Then Call StrStrim ( An rulel , An rulel , Len ) C

If ( An notl .eq. '.NOT.' ) Then Write( code lun , 1001 ) An rulel(l:len) End If 1001 Format ( l ' 1 ( .not. ( ' , A , ' stat .EQ. Unknown ) ) .and.' 1 ) ~rite( code lun , 608 ) An notl , An_rulel(l:len) , 1 An statusl 608 Format ( l ' l ( ' , A , ' ( ' , A , ' stat .EQ. ''' , A , ' .and.' End I~
If ( An rule2 .ne. ' ' ) Then - Call Str$trim ( An rule2 , An rule2 , Len ) C

If ( An not2 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An rule2(1:len) End If Write( code_lun , 603 ) An not2 , An_rule2(1:1en) , 1 An_statusZ
60~ Format ( 1 ' 1 ~ ' , A , ' ( ' , A , ' stat .EQ. ''' , A , ' .and.' 1 ) End If If ( An_rule3 .ne. ' ' ) Then Call StrStrim ( ~n rule3 , An_rule3 , Len ) C

If ( An not3 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An_rule3(1:len) End If Write( code lun , 610 ) An not3 , An rule3(1:len) , 1 An_status3 610 Format ( 1 ' 1 ( ' , A , ' ( ' , A , ' stat .EQ. ''' , ~ , ' .and.' 1 ) End If C

If ( An rule4 .ne. ' ' ) Then Call StrStrim ( ~n rule4 , An rule4 , Len ) If ( An not4 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An rule4(1:1en) End If Write( code lun , 611 ) An not4 , An rule4(1:1en) , 1 An status4 611 Format ( 1 ' 1 ( ' , A , ' ( ' , A , ' stat .EQ. ''' , A , ' .and.l 1 ) End If If ( An rule5 .ne. ' ' ) Then Call StrStrim ( An rule5 , An rule5 , Len ) C

If ( An not5 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An rule5(1:len) End If Write( code lun , 612 ) An not5 , An rule5(1:len) , 1 An_status5 612 Format ( 1 ' 1 ( ' , A , ' ( ' , A , ' stat .EQ. ''' , A , ' .and.' 37,5fiO
1 ) End If C

Call Str$trim ( A~ csnd name , An_cond_name , Len ) Write ( Code lun , 613 ) 1 (An cond name(l:len),j=1,1) , An_end_status , 1 (An cond_name(l:len),j=l,l) , An_end_status , 1 (An_rule name(l Ilen),j=1,1) 613 Format ( 1 ' 1 ( .True. ) ' , /
1 ' 1 ) Then ' , / , 1 ' ' , A , ' stat = ''', A25 , "'' , / , 1 'd Write(6,*) "' , A , '_stat is ' , A ,;~ t, /, 1 ' ~his Dass_fires - This ~ass_fires ~ 1' , / , 1 ' End If' 1 ) Go To 602 C
700 Continue C
C...Write out action rule code C

First = .True.
C

702 Continue C

C..Read A rule C

Call Read action_rule ~arams ( First , No_more ) If ( No more ) Go To 800 C
Call Str$trim ( Ac rule name , Ac rule name , Len ) Write ( Code lun , 799 ) (Ac rule name(l:len),j=1,2) 799 Format ( 1 'C' , ~ /, 1 'C....' , A , ' Rules ' , / , 1 'C', /, 1 ' If ( ~ , / , 1 ' 1 ( .not. ' , A , ' fired ) .and. ' 1 ) C

Call Str$trim ~ Ac rulel , Ac rulel , Len ) Write( code lun , 708 ) Ac rulel(l:len) , 1 Ac_statusl 708 Format ( 1 ' 1 ( ' , ' ( ' , A , ' stat .EQ. "' , A , ''' ) ) ' 1 ) ,.
C

C ~'97~
Call Str~trim ( Ac rule name , Ac rule name , Len ) Write ( Code lun , 713 ) (Ac rule name(l:lenj,j=1,2) 713 Format ( 1 ' 1 ) Then ' , / , 1 'd Write(6,*) ''Doing action rule ' , A , "'' , / , 1 ' ' , A , ' fired - ~True.' , / , 1 ' This pass fires = This ~ass fires + 1' 1 ) C

Call Str$trim ( Ac data line , Ac data line , Len ) If ( Iac type .eq. Exec fort_statement ) Then Write ( code_lun , 714 ) Ac_data linetl:Len) 714 Format ( 1 ' ' , A
Else If ( Iac type .eq. Exec_dcl Procedure ) Then Subprocess name(L_sp:14) = Ac_rule name Call StrStrim ( Subprocess name , Subprocess name , ILen ) Write ( code lun , 715 j Ac data_line(l:Len) , 1 Subprocess_name(l:Ilen) 715 Format ( 1 ' Call LibSspawn ( "Q' , A , "',,,,' " , A , "' ,....
Else If ( Iac type .eq. Send_vaxmail_msg ~ Then Call Str$trim ( Ac_rule name , Ac_rule_name , Len ) Call Str$trim ( Directory , Directory , L dir ) Subprocess name(L_sp:14) = Ac rule_name Call Str$trim ( Subproc~ss name , Subprocess_name , ILen ) Write(Code lun , 788 ) `
788 Format ( 1 ' If ( Mode .eq. Jpi$k other ) Then' 1 ) Write ( code lun , 718 ) Directory(l:L dir) , 1 Ac rule name(l:len) , 1 Subprocess name(l:Ilen) 718 Format ( 1 ' Call Lib$spawn ( "Q' , A , A , '.mailmsg'',,,, "' , A
,,, ,,, ,) Write(Code lun , 787 ) 787 Format ( 1 ' Else if ~ Mode .eq. JpiSk_interactive ) Then' 1 ) Write ( Code lun , 789 ) Directory(l:L_dir) , 1 Ac rule name(l:lenj , Next label, Next label Next label - Next label ~ 1 789 Format ( 1 ' Open(ll,File= "' , A , A , '.mailmsg'' ,Status=''old"

1;~975~
1 ^ Do J ~ 1,3 ' ,/, 1 ' Read ( 11 , " (A~ 'Line' ,/, 1 ' End Do' ,/, 1 ' Do J ~ 1,60' ,/, 1 ' Read (11 , " (A~' , End - ', I4 , ' ) Line ,/, 1 ' Write(6,~) Line 1 ,/, 1 ' End Do' ,/, 1 I4 ,' Continue' ,/, 1 ' Close ( 11 ) ' 1 ) Write(Code lun , 786 ) 786 Format ( 1 ' End If' 1 ) C

Else Write ( oode lun , 716 ) 716 1 ,F Write(6,~) " Bad Action type.'' End If Write ( C~de lun , 717 ) 717 Format ( 1 ' End If' 1 ) C

Gc To 702 C

c8oo Gontinue ~rite( Code_lun , 9998 ) 9998 1 'd Write(6,*~ This pass fires,'' rules fired this pass.' 1 ' If ( This Pass-fires .gt. 0 ) Go To 1' , / , 1 'C', / ~
1 ~ Returnl , / , 1 ' C~ll Fdv$Putl(' Gen~r~t~ng Expert System code..~. Done.') Return End Copyright (c) 1987 E.I. DuPont de Nemo~rs & Co., all rights reserved 1~6 ~7~

Thus, steps such as those list:ed above will produce (in this example) FORTRAN source code which defines an expert system including rules as defined by the user.
This source code can then be compiled and linked, a~
described above, to provide an expert procedure which ls callable at run-time. This expert procedure is tied into the supervisor procedure, as described abov~, by inserting an appropriate call into the user program section of one of the blocks in the supervisor procedure. Thus, the expert procedure can be called under specific circumstances (e.a. if selection among several possible manipulated variables must be made), or may optionally be called on every pass of the base cycle procedure, sr at fixed time intervals, or according to any of the other options set forth above.
As will be recognized by those skilled in the art, the innovative concepts described in the present application can be modified and varied over a tremendous range of applications, and accordingly their scope is not limited except by the allowed claims.

Claims (64)

1. A computer-based method for operating a substantially continuous process, comprising the steps of:
(1) operating the process with one or more sensors connected to sense conditions in materials being processed, and one or more actuators connected to change conditions in the process;
(2) controlling one or more of said actuators with a process controller in accordance with signals received from said sensors and in accordance with one or more control parameters;
(3) running a process supervisor procedure comprising one or more software modules, for selectively defining one or more of said control parameters for said process controller;
(4) selectively presenting a functional structure to a user, for a new software module for said process supervisor procedure and/or a functional structure corresponding to the user input from which a current software module of said process supervisor procedure was generated, and selectively loading the user input from said functional structure to be used by said process supervisor procedure;
wherein step (4) of presenting a functional structure includes presenting standardized data interface definitions further comprising the step (5) of enabling each said software module to perform the steps of getting data from any one of a plurality of data collection and/or process control systems and/or sending process control parameters to any one of a plurality of data collection and/or process control systems without the user explicitly defining any custom data interfacing procedures.
2. A computer-based process control system, comprising:
(a) one or more sensors connected to sense conditions in the process, and one or more actuators connected to change conditions in the process;
(b) a process controller connected to control one or more of said actuators in accordance with deviations between one or more of said sensors and a respective goal condition;

(c) process supervisor means, running on a digital computer separate from said process controller, and comprising one or more software modules, connected for communicating one or more of said respective goal conditions to said process controller;
(d) build-supervisor means configured for:
(1) selectively presenting to a user a functional structure for a new software module for said process supervisor means;
(2) upon command, presenting to a user a functional structure corresponding to the user input from which a current module of said software modules of said process supervisor means was generated; and (3) selectively loading the user input from said functional structure to be used by said process supervisor means;
wherein said process supervisor means has a maximum iteration period significantly longer than the maximum iteration period of said process controller.
3. A computer-based process control system, comprising:

(a) one or more sensors connected to sense conditions in the process, and one or more actuators connected to change conditions in the process;
(b) process control means, comprising one or more software modules for controlling the process, respective ones of said software modules defining a control relation among one or more of said sensors and actuators;
(c) build means which is configured to:
(1) present to a user a template for a new software module for said process control means;
(2) present to a user a template including data corresponding to the user input from which a current software module of said process control means was generated;
and (3) selectively loading user input from said template to be used by said process control means;
wherein each said template presented by said build means includes (i) a standard functional control relationship selected from a limited set, and (ii) a pointer to optional user-customized programming.
4. The method of claim 1, wherein said process controller of step (2) uses a cycling step, and wherein said process supervisor procedure of step (3) uses a cycling step.
5. The method of Claim 1, wherein said process supervisor procedure of step (3) uses a cycling step, and said process controller of step (2) operates in substantially real-time.
6. The method of Claim 1, wherein step (4) comprises the step of presenting functional structures in a substantially natural language format which is readily understandable by a user who is technically skilled in a predetermined art but who is not necessarily competent in any computer language.
7. The method of Claim 1, wherein step (4) comprises the step of allowing the user to alter only restricted portions of said functional structure.
8. The method of Claim 1, wherein step (4) comprises the step of presenting user-alterable portions of said functional structure which appear differently to said user than do other portions of said functional structure.
9. The method of Claim 1, wherein step (4) comprises the step of presenting said functional structure in a substantially natural language format.
10. The method of Claim 1, wherein said process supervisor procedure of step (3) comprises the step of calling on at least one expert subprocedure which uses a knowledge base and inference structure relevant to the process.
11. The method of Claim 1, wherein, for each of said control parameters of step (2), said process supervisor procedure of step (3) comprises the step of being constrained not to make changes unless the indicia for the change exceed a certain threshold; and wherein said process supervisor procedure further comprises the step of reporting every instance where it changes one of said control parameters.
12. The method of Claim 1, wherein, for each of said control parameters of step (3), said process supervisor procedure of step (3) comprises the step of being constrained not to make changes unless the amount of the change exceeds a certain threshold.
13. The method of Claim 1, wherein said process supervisor procedure of step (3) comprises the steps of following a feedback control relation including a supervisor goal condition, and a deadband on said supervisor goal condition, and/or of following a feedforward control relation on input of said sensors, and including a deadband on said input.
14. The method of Claim 1, wherein said functional structure of step (4) comprise the step of allowing the user to define timing and sequencing parameters for respective ones of said software modules which include at least the following options:

become active if another specified software module has become active, become active if a new value has been entered for a specified data source;
or become active if a specified time of inactivity has elapsed.
15. The method of Claim 1, wherein said process supervisor procedure of step (3) comprises the step of using a maximum iteration period significantly longer than the maximum iteration period of said process controller.
16. The method of Claim 1, wherein said process controller of step (2) uses analog logic for controlling.
17. The method of Claim 1, wherein step (3) comprises the step of defining said software modules by respective data definitions, including pointers to procedures which will carry out a respective function, and, for at least some of said software modules, parameters to be passed to said procedures pointed to.
18. The method of Claim 1, wherein step (3) comprises the step of defining said software modules by respective data definitions, including pointers to procedures which will carry out a respective function, most of said procedures pointed to corresponding generally to one of a limited number of procedure types, and, for at least some of said software modules, parameters to be passed to said procedures pointed to.
19. The method of Claim 1, wherein step (3) comprises the step of defining said software modules by respective data definitions, including pointers to procedures which will carry out a respective function, wherein most of said procedures pointed to correspond generally to one of a limited number of procedure types, and wherein at least some of said procedures pointed to also contain further pointers to procedures which do not correspond generally to any one of said limited number of procedure types, and, for at least some of said software modules, parameters to be passed to said procedures pointed to.
20. The method of Claim 1, wherein one or more of said control parameters of step (3) comprise the step of including goals of said process controller.
21. The method of Claim 1, wherein said step of presenting functional structures includes presenting standardized data interface definitions such that the user can specify data having one of plural pre-defined temporal characteristics.
22. The method of Claim 1, wherein said step of presenting functional structures includes presenting standardized data interface definitions such that the user can specify data having one of plural pre-defined temporal characteristics, and said pre-defined temporal characteristics include both current values and also time-values.
23. The method of Claim 1, wherein said step of presenting functional structures includes presenting standardized data interface definitions such that the user can specify data from any one of several different types of control systems having different respective data standards.
24. The method of Claim 1, wherein said functional structure of step (4) comprise the step of using a limited set of standard functional control relationships and a pointer to optional user-customized programming.
25. The method of Claim 1, wherein said process controller and said process supervisor procedure of step (3) comprise the step of using processes running on the same computer system.
26. The method of Claim 1, wherein said process controller of step (2) and said process supervisor procedure of step (3) comprise the step of both using respective parts of the same software system.
27. The method of Claim 1, wherein some of said software modules of step (3) in said process supervisor procedure of step (3) comprise the step of not defining a control relation among said sensors and actuators.
28. The system of Claim 2, wherein said build-supervisor means of element (d) does not allow data corresponding to fresh user inputs to become actively accessed by said process supervisor means until a validation run has been performed.
29. The system of Claim 2, wherein said process controller of element (c) uses means for cycling, and said process supervisor means of element (c) uses means for cycling.
30. The system of Claim 2, wherein said process supervisor means of element (c) uses means for cycling, and said process controller of element (c) operates in substantially real-time.
31. The system of Claim 2, wherein only restricted portions of said functional structure of said build-supervisor means of element (d) are user-alterable.
32. The system of Claim 2, wherein portions of said functional structure of said build-supervisor means of element (d) are user-alterable, and appear differently to said use than do other portions of said functional structure.
33. The system of Claim 2, wherein said functional structure of said build-supervisor means of element (d) have a substantially natural language format.
34. The system of Claim 2, wherein said process supervisor means of element (c) also calls on at least one expert subprocedure means which includes a knowledge base and inference structure relevant to the process.
35. The system of Claim 2, wherein, for each of said goal conditions of element (b), said process supervisor means of element (c) is constrained not to make changes unless the indicia for the change exceed a certain threshold; and wherein said process supervisor means reports every instance where it changes a goal condition.
36. The system of Claim 2, wherein, for each of said goal conditions of element (b), said process supervisor means of element (c) is constrained not to make changes unless the amount of the change would exceed a certain threshold.
37. The system of Claim 2, wherein said process supervisor means of element (c) implements at least one feedback control relation including a supervisor goal condition, and a deadband on said supervisor goal condition, and also at least one feedforward control relation on input of said sensor, and including a deadband on said input.
38. The system of Claim 2, wherein said functional structure of said build-supervisor means of element (d) permit the user to define timing and sequencing parameters for respective ones of said software modules which include at least the following options:
become active if another specified software module has become active;
become active if a new value has been entered for a specified data source;
or become active if a specified time of inactivity has elapsed.
39. The system of Claim 2, wherein said process supervisor means of element (c) has a maximum iteration period significantly longer than the maximum iteration period of said process controller of element (b).
40. The system of Claim 2, wherein said process controller uses analog logic for controlling.
41. The system of Claim 2, wherein said software modules of element (c) are defined by respective data definitions, including pointers to means which will carry out a respective function, and (for at least some of said software modules) parameters to be passed to said means pointed to.
42. The system of Claim 2, wherein said software modules of element (c) are defined by respective data definitions, including pointers to means which will carry out a respective function, most of said means pointed to corresponding generally to one of a limited number of procedure types, and (for at least some of said software modules) parameters to be passed to said means pointed to.
43. The system of Claim 2, wherein said software modules of element (c) are defined by respective data definitions, including pointers to means for carrying out a respective function, wherein most of said means pointed to correspond generally to one of a limited number of procedure types, and wherein at least some of said means pointed to also contain further pointers to means which do not correspond generally to any one of said limited number of procedure types, and, for at least some of said software modules, parameters to be passed to said means pointed to.
44. The system of Claim 2, wherein said presentation of functional structure of said build-supervisor means of element (d) includes presenting standardized data interface definitions such that the user can specify data having one of plural pre-defined temporal characteristics.
45. The system of Claim 2, wherein said functional structure of said build-supervisor means of element (d) include standardized data interface definitions such that the user can specify data having one of plural pre-defined temporal characteristics, and said pre-defined temporal characteristics include both current values and also time-averaged values.
46. The system of Claim 2, wherein said functional structure of said build-supervisor means of element (d) include standardized data interface definitions such that the user can specify data from any one of several different types of control systems having different respective data standards.
47. The system of Claim 2, wherein said functional structure of said build-supervisor means of element (d) include a limited set of standard functional control relationships and a pointer to optional user-customized programming.
48. The system of Claim 2, wherein said process controller of element (b) and said process supervisor means of element (c) comprise processes running on the same computer system.
49. The system of Claim 2, wherein said process controller of element (b) and said process supervisor means of element (c) are both respective parts of the same software system.
50. The system of Claim 2, wherein some of said software modules of element (c) in said process control means do not define a control relation among said sensors and actuators.
51. The system of Claim 3, wherein said build means of element (c) does not allow data corresponding to fresh user inputs to become actively accessed by said process control means of element (b) until a validation run has been performed.
52. The system of Claim 3, wherein said template of said build means of element (c) is user-alterable, and appears differently to said user than do other portions of said template.
53. The system of Claim 3, wherein said template of said build means of element (c) have a substantially natural language format.
54. The system of Claim 3, wherein said process control means of element (b) uses analog logic for controlling.
55. The system of Claim 3, wherein said limited set of standard functional control relationships of said build means of element (c) comprises feedback, feedforward, statistical filtering, and/or null control relationships.
56. The system of Claim 3, wherein said process control means of element (b) and said build means of element (c) comprise processes running on the same computer system.
57. The system of Claim 3, wherein said process control means of element (b) and said build means of element (c) are both respective parts of the same software system.
58. A computer-based method for operating a substantially continuous process, comprising the steps of:
(1) operating the process with one or more sensors connected to sense conditions in materials being processed, and one or more actuators connected to change conditions in the process;
(2) controlling one or more of said actuators with a process controller in accordance with signals received from said sensors and in accordance with one or more control parameters:

(3) running a process supervisor procedure comprising one or more software modules, for selectively defining one or more of said control parameters for said process controller;
(4) selectively presenting a functional structure to a user, for a new software module for said process supervisor procedure and/or a functional structure corresponding to the user input from which a current software module of said process supervisor procedure was generated, and selectively loading the user input from said functional structure to be used by said process supervisor procedure;

wherein step (4) of presenting a functional structure includes presenting standardized data interface definitions.
59. A computer-based process control system, comprising:
(a) one or more sensors connected to sense conditions in the process, and one or more actuators connected to change conditions in the process (b) process control means, comprising one or more software modules for controlling the process, respective ones of said software modules defining a control relation among one or more of said sensors and actuators;

(c) build means which is configured to:
(1) present to a user a template for a new software module for said process control means;
(2) present to a user a template including data corresponding to the user input from which a current software module of said process control means was generated:
and (3) selectively to load user inputs from said template to be operationally accessible by said process control means.
60. A computer-based process control system, comprising:
(a) one or more sensors connected to sense conditions in the process, and one or more actuators connected to change conditions in the process;
(b) process control means, comprising one or more software module's, for controlling the process, respective ones of said software modules defining a control relation among one or more of said sensors and actuators;

(c) build means which is configured to:
(1) present to a user a functional structure for a new software module for said process control means;

(2) present to a user a functional structure including data corresponding to the user input from which a current software module of said process control means was generated; and (3) selectively loading the user inputs from said functional structure to be used by said process control means;
wherein each said functional structure presented by said build means includes (i) a standard functional control relationship selected from a very limited set, and (ii) a pointer to optional user-customized programming.
61. A computer-based process control system, comprising:
(a) one or more sensors connected to sense conditions in the process, and one or more actuators connected to change conditions in the process;
(b) process control means, comprising one or more software modules, for controlling the process, respective ones of said software modules defining a control relation among one or more of said sensors and actuators;
and actuators:

wherein each said software modules includes (i) a standard functional control relationship selected from a limited set, and (ii) a pointer to optional user-customized programming.
62. The method of Claim 1, wherein said input from said functional structures of step (4) comprise the step of being operationally accessible by said process supervisor procedure.
63. The system of Claim 2, wherein said input from said functional structures of element (2) is operationally accessible by said process supervisor means.
64. The system of Claim 3, wherein said input from said templates of element (2) are operationally accessible by said process control means.
CA000578694A 1987-09-30 1988-09-28 Process control system with on-line reconfigurable modules Expired - Lifetime CA1297560C (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US07/103,047 US4965742A (en) 1987-09-30 1987-09-30 Process control system with on-line reconfigurable modules
US103,047 1987-09-30

Publications (1)

Publication Number Publication Date
CA1297560C true CA1297560C (en) 1992-03-17

Family

ID=22293075

Family Applications (1)

Application Number Title Priority Date Filing Date
CA000578694A Expired - Lifetime CA1297560C (en) 1987-09-30 1988-09-28 Process control system with on-line reconfigurable modules

Country Status (2)

Country Link
US (1) US4965742A (en)
CA (1) CA1297560C (en)

Families Citing this family (127)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5371895A (en) * 1985-10-08 1994-12-06 The Foxboro Company Local equipment controller for computerized process control applications utilizing language structure templates in a hierarchical organization and method of operating the same
US5206568A (en) * 1986-03-26 1993-04-27 Beckman Instruments, Inc. Coordinated control of stepper motors
US5311451A (en) * 1987-11-06 1994-05-10 M. T. Mcbrian Company, Inc. Reconfigurable controller for monitoring and controlling environmental conditions
US5345587A (en) * 1988-09-14 1994-09-06 Digital Equipment Corporation Extensible entity management system including a dispatching kernel and modules which independently interpret and execute commands
JPH02109127A (en) * 1988-10-19 1990-04-20 Hitachi Ltd Specification processing method
WO1990008988A1 (en) * 1989-01-25 1990-08-09 Hitachi, Ltd. Method and apparatus for automatically generating control program for computer controlled systems
JP2728559B2 (en) * 1989-10-09 1998-03-18 株式会社日立製作所 Knowledge processing system construction tool and inference program generation method
DE59008369D1 (en) * 1990-05-22 1995-03-09 Siemens Ag Control for a machine tool or a robot.
EP0473174B1 (en) * 1990-08-31 1996-05-08 Mazda Motor Corporation Diagnostic method for production line
JPH06168863A (en) * 1991-03-01 1994-06-14 Texas Instr Inc <Ti> Apparatus and method for execution of monitoring and control of semiconductor manufacturing apparatus
JP3239269B2 (en) * 1991-10-09 2001-12-17 富士通株式会社 Custom service control method
US6134304A (en) * 1992-11-10 2000-10-17 Telefonaktiebolaget Lm Ericsson General analysis system
US6243696B1 (en) * 1992-11-24 2001-06-05 Pavilion Technologies, Inc. Automated method for building a model
US5594858A (en) * 1993-07-29 1997-01-14 Fisher-Rosemount Systems, Inc. Uniform control template generating system and method for process control programming
SE9304246L (en) * 1993-12-22 1995-06-23 Asea Brown Boveri Procedure for monitoring multivariate processes
US6018716A (en) * 1994-04-28 2000-01-25 International Business Machines Corporation Apparatus and method for analysis of continuous process lines
US5742845A (en) 1995-06-22 1998-04-21 Datascape, Inc. System for extending present open network communication protocols to communicate with non-standard I/O devices directly coupled to an open network
US6314414B1 (en) * 1998-10-06 2001-11-06 Pavilion Technologies, Inc. Method for training and/or testing a neural network with missing and/or incomplete data
US6094600A (en) * 1996-02-06 2000-07-25 Fisher-Rosemount Systems, Inc. System and method for managing a transaction database of records of changes to field device configurations
US5801942A (en) * 1996-04-12 1998-09-01 Fisher-Rosemount Systems, Inc. Process control system user interface including selection of multiple control languages
US5862052A (en) * 1996-04-12 1999-01-19 Fisher-Rosemount Systems, Inc. Process control system using a control strategy implemented in a layered hierarchy of control modules
EP0825506B1 (en) 1996-08-20 2013-03-06 Invensys Systems, Inc. Methods and apparatus for remote process control
US6029092A (en) * 1996-11-21 2000-02-22 Intellinet, Inc. System and method for providing modular control and for managing energy consumption
US6394811B2 (en) 1997-03-20 2002-05-28 Terese Finitzo Computer-automated implementation of user-definable decision rules for medical diagnostic or screening interpretations
US5870698A (en) * 1997-05-03 1999-02-09 Atrix International, Inc. Multi-purpose machine metering/monitoring apparatus
JPH10335193A (en) * 1997-05-30 1998-12-18 Toshiba Corp Manufacturing process specification generation/operation system, process data generation system, and method for manufacturing semiconductor device
US6292712B1 (en) 1998-01-29 2001-09-18 Northrop Grumman Corporation Computer interface system for a robotic system
GB2334596B (en) * 1998-02-23 2002-02-20 Denno Co Ltd Control system
US7539637B2 (en) * 1998-04-24 2009-05-26 Starmine Corporation Security analyst estimates performance viewing system and method
US7603308B2 (en) * 1998-04-24 2009-10-13 Starmine Corporation Security analyst estimates performance viewing system and method
US7509277B1 (en) * 1998-04-24 2009-03-24 Starmine Corporation Security analyst estimates performance viewing system and method
WO1999057646A1 (en) * 1998-04-30 1999-11-11 Intellinet, Inc. System and method for providing modular control and for managing energy consumption
US6691183B1 (en) 1998-05-20 2004-02-10 Invensys Systems, Inc. Second transfer logic causing a first transfer logic to check a data ready bit prior to each of multibit transfer of a continous transfer operation
US6442512B1 (en) 1998-10-26 2002-08-27 Invensys Systems, Inc. Interactive process modeling system
US6323882B1 (en) 1998-10-26 2001-11-27 Simulation Sciences, Inc. Method and systems for a graphical real time flow task scheduler
US6490493B1 (en) 1999-01-21 2002-12-03 Rosemount Inc. Industrial process device management software
US7562135B2 (en) 2000-05-23 2009-07-14 Fisher-Rosemount Systems, Inc. Enhanced fieldbus device alerts in a process control system
US8044793B2 (en) 2001-03-01 2011-10-25 Fisher-Rosemount Systems, Inc. Integrated device alerts in a process control system
US7206646B2 (en) 1999-02-22 2007-04-17 Fisher-Rosemount Systems, Inc. Method and apparatus for performing a function in a plant using process performance monitoring with process equipment monitoring and control
US6975219B2 (en) 2001-03-01 2005-12-13 Fisher-Rosemount Systems, Inc. Enhanced hart device alerts in a process control system
US6510351B1 (en) * 1999-03-15 2003-01-21 Fisher-Rosemount Systems, Inc. Modifier function blocks in a process control system
US7272815B1 (en) 1999-05-17 2007-09-18 Invensys Systems, Inc. Methods and apparatus for control configuration with versioning, security, composite blocks, edit selection, object swapping, formulaic values and other aspects
US7096465B1 (en) 1999-05-17 2006-08-22 Invensys Systems, Inc. Process control configuration system with parameterized objects
US6754885B1 (en) 1999-05-17 2004-06-22 Invensys Systems, Inc. Methods and apparatus for controlling object appearance in a process control configuration system
US7089530B1 (en) 1999-05-17 2006-08-08 Invensys Systems, Inc. Process control configuration system with connection validation and configuration
AU5025600A (en) 1999-05-17 2000-12-05 Foxboro Company, The Process control configuration system with parameterized objects
US6788980B1 (en) 1999-06-11 2004-09-07 Invensys Systems, Inc. Methods and apparatus for control using control devices that provide a virtual machine environment and that communicate via an IP network
US6501995B1 (en) 1999-06-30 2002-12-31 The Foxboro Company Process control system and method with improved distribution, installation and validation of components
DE59913062D1 (en) 1999-06-11 2006-04-06 Ivyteam Ag Zug Information technology system for the definition, optimization and control of processes
US6618630B1 (en) 1999-07-08 2003-09-09 Fisher-Rosemount Systems, Inc. User interface that integrates a process control configuration system and a field device management system
WO2001009690A1 (en) 1999-07-29 2001-02-08 The Foxboro Company Methods and apparatus for object-based process control
US7385716B1 (en) 1999-09-02 2008-06-10 Hewlett-Packard Development Company, L.P. Authoring tool for bayesian network troubleshooters
US7016056B2 (en) * 1999-09-02 2006-03-21 Hewlett-Packard Development Company, L.P. Authoring tool for bayesian network diagnostic systems
US6473660B1 (en) 1999-12-03 2002-10-29 The Foxboro Company Process control system and method with automatic fault avoidance
US6779128B1 (en) 2000-02-18 2004-08-17 Invensys Systems, Inc. Fault-tolerant data transfer
US7389204B2 (en) 2001-03-01 2008-06-17 Fisher-Rosemount Systems, Inc. Data presentation system for abnormal situation prevention in a process plant
US6954713B2 (en) 2001-03-01 2005-10-11 Fisher-Rosemount Systems, Inc. Cavitation detection in a process plant
US6795798B2 (en) 2001-03-01 2004-09-21 Fisher-Rosemount Systems, Inc. Remote analysis of process control plant data
US8073967B2 (en) 2002-04-15 2011-12-06 Fisher-Rosemount Systems, Inc. Web services-based communications for use with process control systems
US7720727B2 (en) 2001-03-01 2010-05-18 Fisher-Rosemount Systems, Inc. Economic calculations in process control system
WO2002071173A2 (en) 2001-03-01 2002-09-12 Fisher-Rosemount Systems, Inc. Data sharing in a process plant
CN100524130C (en) 2001-03-01 2009-08-05 费舍-柔斯芒特系统股份有限公司 Automatic work command/unit command generation and track
US20020126137A1 (en) * 2001-03-06 2002-09-12 Kaestner Frederick G. Data display device
EP1410204B1 (en) * 2001-06-22 2016-11-09 Wonderware Corporation Supervisory process control and manufacturing information system application having an extensible component model
US7162534B2 (en) 2001-07-10 2007-01-09 Fisher-Rosemount Systems, Inc. Transactional data communications for process control systems
US7636680B2 (en) * 2001-10-03 2009-12-22 Starmine Corporation Methods and systems for measuring performance of a security analyst
EP1304605A1 (en) * 2001-10-19 2003-04-23 Siemens Aktiengesellschaft Automatic parameter acquisition
US20030217053A1 (en) 2002-04-15 2003-11-20 Bachman George E. Context control mechanism for data executed in workflows of process, factory-floor, environmental, computer aided manufacturing-based or other control system
US7367018B2 (en) * 2002-10-25 2008-04-29 Aspen Technology, Inc. System and method for organizing and sharing of process plant design and operations data
AU2002952648A0 (en) * 2002-11-14 2002-11-28 Softlaw Corporation Limited Forward-chaining inferencing
US7600234B2 (en) * 2002-12-10 2009-10-06 Fisher-Rosemount Systems, Inc. Method for launching applications
US8935298B2 (en) 2002-12-30 2015-01-13 Fisher-Rosemount Systems, Inc. Integrated navigational tree importation and generation in a process plant
US7493310B2 (en) 2002-12-30 2009-02-17 Fisher-Rosemount Systems, Inc. Data visualization within an integrated asset data system for a process plant
US7152072B2 (en) 2003-01-08 2006-12-19 Fisher-Rosemount Systems Inc. Methods and apparatus for importing device data into a database system used in a process plant
US7953842B2 (en) 2003-02-19 2011-05-31 Fisher-Rosemount Systems, Inc. Open network-based data acquisition, aggregation and optimization for use with process control systems
US7103427B2 (en) * 2003-02-28 2006-09-05 Fisher-Rosemont Systems, Inc. Delivery of process plant notifications
US6915235B2 (en) 2003-03-13 2005-07-05 Csi Technology, Inc. Generation of data indicative of machine operational condition
US7634384B2 (en) 2003-03-18 2009-12-15 Fisher-Rosemount Systems, Inc. Asset optimization reporting in a process plant
US7840509B1 (en) 2003-03-26 2010-11-23 Edmund Messina Computer-based system for interrogating a user and generating a result
AU2003901416A0 (en) * 2003-03-27 2003-04-10 Canon Kabushiki Kaisha Graphical object group management system
US7194320B2 (en) * 2003-06-05 2007-03-20 Neuco, Inc. Method for implementing indirect controller
US6736089B1 (en) 2003-06-05 2004-05-18 Neuco, Inc. Method and system for sootblowing optimization
US7299415B2 (en) * 2003-06-16 2007-11-20 Fisher-Rosemount Systems, Inc. Method and apparatus for providing help information in multiple formats
US8214271B2 (en) * 2004-02-04 2012-07-03 Neuco, Inc. System and method for assigning credit to process inputs
US7030747B2 (en) 2004-02-26 2006-04-18 Fisher-Rosemount Systems, Inc. Method and system for integrated alarms in a process control system
US7761923B2 (en) 2004-03-01 2010-07-20 Invensys Systems, Inc. Process control methods and apparatus for intrusion detection, protection and network hardening
US7260442B2 (en) * 2004-03-03 2007-08-21 Taiwan Semiconductor Manufacturing Co., Ltd. Method and system for mask fabrication process control
US7676287B2 (en) 2004-03-03 2010-03-09 Fisher-Rosemount Systems, Inc. Configuration system and method for abnormal situation prevention in a process plant
US7079984B2 (en) 2004-03-03 2006-07-18 Fisher-Rosemount Systems, Inc. Abnormal situation prevention in a process plant
US7515977B2 (en) 2004-03-30 2009-04-07 Fisher-Rosemount Systems, Inc. Integrated configuration system for use in a process plant
US7536274B2 (en) 2004-05-28 2009-05-19 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a heater
CA2567139A1 (en) * 2004-06-12 2005-12-29 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a process gain of a control loop
US7500437B2 (en) * 2004-08-27 2009-03-10 Neuco, Inc. Method and system for SCR optimization
US20060052902A1 (en) * 2004-08-27 2006-03-09 Neuco, Inc. Method and system for SNCR optimization
US7181654B2 (en) 2004-09-17 2007-02-20 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a reactor
US7877309B2 (en) 2004-10-18 2011-01-25 Starmine Corporation System and method for analyzing analyst recommendations on a single stock basis
WO2006047623A2 (en) * 2004-10-25 2006-05-04 Neuco, Inc. Method and system for calculating marginal cost curves using plant control models
US7421348B2 (en) * 2005-03-18 2008-09-02 Swanson Brian G Predictive emissions monitoring method
US8768664B2 (en) * 2005-03-18 2014-07-01 CMC Solutions, LLC. Predictive emissions monitoring using a statistical hybrid model
US8005647B2 (en) 2005-04-08 2011-08-23 Rosemount, Inc. Method and apparatus for monitoring and performing corrective measures in a process plant using monitoring data with corrective measures data
US9201420B2 (en) 2005-04-08 2015-12-01 Rosemount, Inc. Method and apparatus for performing a function in a process plant using monitoring data with criticality evaluation data
US7272531B2 (en) 2005-09-20 2007-09-18 Fisher-Rosemount Systems, Inc. Aggregation of asset use indices within a process plant
WO2007123753A2 (en) 2006-03-30 2007-11-01 Invensys Systems, Inc. Digital data processing apparatus and methods for improving plant performance
US8145358B2 (en) 2006-07-25 2012-03-27 Fisher-Rosemount Systems, Inc. Method and system for detecting abnormal operation of a level regulatory control loop
US7657399B2 (en) 2006-07-25 2010-02-02 Fisher-Rosemount Systems, Inc. Methods and systems for detecting deviation of a process variable from expected values
US8606544B2 (en) 2006-07-25 2013-12-10 Fisher-Rosemount Systems, Inc. Methods and systems for detecting deviation of a process variable from expected values
US7912676B2 (en) 2006-07-25 2011-03-22 Fisher-Rosemount Systems, Inc. Method and system for detecting abnormal operation in a process plant
US8762106B2 (en) 2006-09-28 2014-06-24 Fisher-Rosemount Systems, Inc. Abnormal situation prevention in a heat exchanger
US7917240B2 (en) 2006-09-29 2011-03-29 Fisher-Rosemount Systems, Inc. Univariate method for monitoring and analysis of multivariate data
US7752112B2 (en) * 2006-11-09 2010-07-06 Starmine Corporation System and method for using analyst data to identify peer securities
US8032340B2 (en) 2007-01-04 2011-10-04 Fisher-Rosemount Systems, Inc. Method and system for modeling a process variable in a process plant
US8032341B2 (en) 2007-01-04 2011-10-04 Fisher-Rosemount Systems, Inc. Modeling a process using a composite model comprising a plurality of regression models
US7827006B2 (en) 2007-01-31 2010-11-02 Fisher-Rosemount Systems, Inc. Heat exchanger fouling detection
US10410145B2 (en) 2007-05-15 2019-09-10 Fisher-Rosemount Systems, Inc. Automatic maintenance estimation in a plant environment
US8301676B2 (en) 2007-08-23 2012-10-30 Fisher-Rosemount Systems, Inc. Field device with capability of calculating digital filter coefficients
US7702401B2 (en) 2007-09-05 2010-04-20 Fisher-Rosemount Systems, Inc. System for preserving and displaying process control data associated with an abnormal situation
US9323247B2 (en) 2007-09-14 2016-04-26 Fisher-Rosemount Systems, Inc. Personalized plant asset data representation and search system
US8340824B2 (en) 2007-10-05 2012-12-25 Neuco, Inc. Sootblowing optimization for improved boiler performance
US8055479B2 (en) 2007-10-10 2011-11-08 Fisher-Rosemount Systems, Inc. Simplified algorithm for abnormal situation prevention in load following applications including plugged line diagnostics in a dynamic process
RU2495476C2 (en) 2008-06-20 2013-10-10 Инвенсис Системз, Инк. Systems and methods for immersive interaction with actual and/or simulated facilities for process, environmental and industrial control
JP5604510B2 (en) * 2009-04-30 2014-10-08 ジーイー・インフラストラクチャー・サウスアフリカ(プロプライアトリー)・リミテッド Process decision support system and method for providing process decision support system
US8463964B2 (en) 2009-05-29 2013-06-11 Invensys Systems, Inc. Methods and apparatus for control configuration with enhanced change-tracking
US8127060B2 (en) 2009-05-29 2012-02-28 Invensys Systems, Inc Methods and apparatus for control configuration with control objects that are fieldbus protocol-aware
US9524285B2 (en) 2011-03-05 2016-12-20 Kapaleeswar Madireddi Stream flow chemical process information system and method
US8468461B2 (en) 2011-03-05 2013-06-18 Flowatch Llc Form-based user-configurable processing plant management system and method
US9927788B2 (en) 2011-05-19 2018-03-27 Fisher-Rosemount Systems, Inc. Software lockout coordination between a process control system and an asset management system
US9529348B2 (en) 2012-01-24 2016-12-27 Emerson Process Management Power & Water Solutions, Inc. Method and apparatus for deploying industrial plant simulators using cloud computing technologies

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4648044A (en) * 1984-06-06 1987-03-03 Teknowledge, Inc. Basic expert system tool
US4658370A (en) * 1984-06-07 1987-04-14 Teknowledge, Inc. Knowledge engineering tool
US4616306A (en) * 1984-08-10 1986-10-07 Amchem Products, Inc. Metal treating process control
US4670848A (en) * 1985-04-10 1987-06-02 Standard Systems Corporation Artificial intelligence system

Also Published As

Publication number Publication date
US4965742A (en) 1990-10-23

Similar Documents

Publication Publication Date Title
CA1297560C (en) Process control system with on-line reconfigurable modules
US4907167A (en) Process control system with action logging
US5006992A (en) Process control system with reconfigurable expert rules and control modules
US4910691A (en) Process control system with multiple module sequence options
US4884217A (en) Expert system with three classes of rules
US4920499A (en) Expert system with natural-language rule updating
EP0335957B1 (en) Expert system with process control
EP0423287B1 (en) Batch process control using expert systems
US4975865A (en) Method and apparatus for real-time control
Moore et al. Process control using a real time expert system
Arzen Use of expert systems in closed loop feedback control
Pike Process control software
Hitzmann et al. An expert system approach for the control of a bioprocess. I: Knowledge representation and processing
Eklund et al. Rule generation as an alternative to knowledge acquisition: A systems architecture for medical informatics
Rao et al. Computer integrated process systems in continuous manufacturing industries
Astrom Where is the intelligence in intelligent control?
Sallé et al. A comparison between three development tools for real-time expert systems: Chronos, G2 and Muse
Xia et al. A hybrid intelligent system for process operations support
De Maine et al. Computer aids for chemists
JPH06222922A (en) Expert system
Stephanopoulos et al. An Intelligent System for Planning Plant-Wide Process Control Strategies
Vraneš et al. A framework for engineering intelligent control systems
Xia et al. Integrated intelligent control system for peroxide bleaching processes
Rao et al. IOMCS for Pulp and Paper Processes
JOSEPH STRUCTURE OF EXPERT SYSTEMS

Legal Events

Date Code Title Description
MKLA Lapsed