CA1297561C - Process control system with multiple module sequence options - Google Patents

Process control system with multiple module sequence options

Info

Publication number
CA1297561C
CA1297561C CA000578695A CA578695A CA1297561C CA 1297561 C CA1297561 C CA 1297561C CA 000578695 A CA000578695 A CA 000578695A CA 578695 A CA578695 A CA 578695A CA 1297561 C CA1297561 C CA 1297561C
Authority
CA
Canada
Prior art keywords
block
user
status
value
procedure
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
CA000578695A
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=22293526&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=CA1297561(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 CA1297561C publication Critical patent/CA1297561C/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models

Landscapes

  • Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Medical Informatics (AREA)
  • Feedback Control In General (AREA)

Abstract

PROCESS CONTROL SYSTEM WITH MULTIPLE
MODULE SEQUENCE OPTIONS

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. A user can define or redefine modules by editing highly constrained templates, which preferably include module timing and sequencing options including: block becomes active if another specified block has become active; block becomes active if a new value has been entered for a specified data source;
block becomes active if a specified time of inactivity has elapsed; and combinations of these.

Description

56~

PARTIAL WAIVER OIF COPYRIGHT

A portion of the disclosllre of this patent document contains material which is subject to copyright p~ot~ction. The ~opyright owner h~s no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent Office patent fi1es or records, but otherwise reserves all copyright rights whatsoever.

CROSS-REFERENCE TO OTHER APPLICATIONS
The following applications of common assignee contain some common disclosure, and are believed to hav~
effective filing dates identical with that of the present application:
EXPERT SYST~ WITH ~REE CL~SSES OF RULES (Dupont docket No. PI-446 (11 00/2)) filed September 28, 1988:
Serial No. 578,705;
PROCESS CONTROL SYSTEM WITH RECONFIGUR~LE EXPERT
RULES AND CONTROL MO~UL~S (Dupont docket np. PI-447 (1100/3)); filed September 28, 1988: Serial No. 578,693;
PROCESS CO~TRO~ SYSTEM WITH ACTION ~OG~ING (Dupont docket no. PI-448 (1100/4)) filed September 28, 1988:
Serial No. 578,692:
PROC~SS Co~-~BQ~ SYSTEM WITH ON-LI~ R~ÇONFIGURAB~E
MODULES (Dupont docket no. PI-449 (1100/5) filed September 28, 1988: Ser.ial No. 578,694;
and EXP~ SYS~EM WITH N~Y~clA~UAGE RUL~
UPDATING (DuPont docket no. PI-445 (1100/1)); filed September 28, 1988: Serial No. 578,704;

~ f~5~1 BACKGROUND OF THE I~VENTION
Field of the Invention The present invention relates to expert systems (alss known as knowledge-based systems), t~ process control systems, and to hybrids thereof.
DiscussiQn of Related Art Various known teachings which are believed to be related to various ones of the innovations disclos~d 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 tne particular patents and publications discussed may relate them to inventive concepts in a way which is itself based on knowledge of some of the inventive concepts. Moreover, the following discussion attempts to fairly present variotls suggested technical alternatives (to the best of applicant's knowledge), even though the teachings of som~ 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 applicable innovative teachings and/or specific discussion of the best mode hS 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 applications.

Process Control Generallv To 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 reduced staffing. Automatic computer control of the manu~acturing process can play an important part in this, especially in the chemical process industry. Most process plants already have the basie automatic regulating controls (low level controls) needed to control the plant at a ~iven operating point. These provide the foundation for higher level supervisory controls (referred to here as supervisor prooedures or supervisors) that se~k to i~prove quality, reduce cost, and increase plant uptime by moving th~ plant to a different operating point. These changes can be made directly via the lower level controls, or indirectly via the plant operator.
Although supervisory controls have be~n 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 unnecessary 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 supervisor 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 process database which can store these ~ea~urements as well the b~sic process data from the low~r level control systems. Since sampled measurements and the process itself normally include some components 756~

of random variatio~, the s~pervisor should include statistical tests which can determine if a sequence o~
ampled measurements is varying normally around its aim value (i.e. is "on aim"), or has shifted significantly from aim (is 7'ofP aim"~.
To control quality, a ~upervisor 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 r2sponse to new data or statistical tests, or to act at regular time intervals. It should also be able to preemptively change the operating point when basic conditions (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 a~le to communicate with all of them.
To work ef~ectively 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 75~

should ideally include the logical decision making capabilities of expert systems. Because decisions will normally ~ocus on a specific task or area, many independent expert systems should be allowed. The expert systems should have access 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 supervisor should be able to control its expert system functions in concert with its other functions.
To be supported ~y plant 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 means of specifying the informative messages to be generated about it actions. Its expert systems should allow process knowledge to be entered, stored, and updated 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 know 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 optimizing control, which seeks to minimize operating cost. In some cases, the requirement to minimize variation in product properties (i.e. to improve product s quality) is absolutely primary, so that cost optimization only be performed as an objectiYe seoondary to quality objectives. In this environment, use of classical optimization t~chni~les to achieve GoSt optimization may not be possible. In other cases, it has been possible to integrate a balance of supervisory and optimizing control i~to the supervisor.
~odularitv Supervisory control systems usi~g a modular structure ~re well known. For example, the Process Monitoring 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, trending, driving an electrical output, running programs, and other functions. Eac~ 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 as 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, and does not effectively ~tore intermittently ~ampled data. It is believed that there is no ~aximum number of blocks.
It is believed that some earlier discus~ion of the significance of modularity in process control software 1~ ~ound in ~atson, "Process Control Using Modular P~ckage Software,~ IEE Conference Publications number 102 ~1973~, ~7~

~isto~ical Process patabase A dat~base of histori~al process dat~ is generally described in Hale and Sellars, "Historical Data Recording for Process Computers, n 7~ Chem. Enatq P~oqre~s 38 (1981) Continuous Control Actions In classical feedback and feedforward controll the prior art teaches that the best control results are achieved by ~aking çontinuous changes to the process.
In computer control, where cyclic operation forces changes to be made in discrete st~ps, many small, frequent steps are conventionally preferred. While in principle this gives the best possible control perfo~mance, such control actions are very difficult to ~isuali~e. 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 j~dge whether control strategies are working properly, or even if they are working ~t all. This method of control also runs counter to the ~ethods used by operators, who generally ~ake a few significant changes and wait to see ~he effects.
In feedback control, the use of a deadband is a well known way of avoiding small actions caused by a noisy measurement. (That is, if t~e control variable ~alls within n specified deadband of values surrounding the goal v~lue, the control value will not be manipulatedO) This deadband, ~s is well known, helps to avoid instability in control syste~s. St~tistical proces~ control ~lso tends to reduce the number of feedb~ck control ~ctions. 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 wPll Xnown amonq those skilled in the art of process control. That is, in some cases, whenever one variable changes (e.g. if a particular control variable is manipulat~d for any reason), another variable will also be manipulated according to a predetermined relationship. For example, in a distillation process, it may be desirable to immediately decrease the heat input whenever the rate of feed of the crude feed stock is decreased. In feedforward control, a deadband is normally not used.

Control of Multiple Mani~lated Variables In many process control applications, several manipulated variables must be jointly controlled in a single control loop (e.a. 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 ~ariables ("knobs") can be changed l~t7S6~L
to re~pond to ~ slngle measur~d v~riable. Oper~tor~
often u~e ~ heuri~tic ~pproach ln chnosing which knob (or knobs~ to manipulnte, and sometimes choose not to act. The heuristic appro~ch may consider csst, quality, S response dynamics, and process stability. It may include altern~te knobs to be used when all of the preferred knobs are constrained. Classic oontrol ~ethods ~re not well ~uited to this approa~h.

ExRert $vste~s GenerallY
The term ~expert 6ystem" is used ~n the present application (in accordance with what is believed to be the general usag~ at present) to refer to a system which includes non-t~ivia~ amounts of knowledge about an underlying problem. Almost any control system which has been customized for ~ particular application might be argued to embody small ~mounts of releva~t knowledge in ~ts very ~tructure, but the term expert system is generally used only for ~ystems which contaln enough accessible information that they can usefully supplement the knowledge of ~t le~st some (but normally not all) human users who must deal with problems of the type addressed. Expert systems at their best may serve to codify the expert knowledge of one person (a "domain expertn), so th~t that person's expertise can be di~tributed ~nd made accessible to ~any less expert users who must address problems of ~ certa$n type. Some well-known ~uccessful examples include ~ medical dt~gnostic program (MYCIN~ ~nd a diagnost~c progr~m which assi6ts mech~nies working on diesel eng$nes.
As these examples show, one very common ~rea of ~pplication for expert ~ystems has been fault diagnosis.
~ny other area~ of ~ppllcation h~ve been recognized;
~e gener~lly ~xper~ Sv~t~ (ed. R. Forsythe 1984) ~29~

P. Harmon and D King, Expert SYstenls tl985); and D~nald Waterman, A ~uide to Ex~rt Systems (1984~.

Knowledqe InFut 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 the first place~ That is, specialists in artificial intelligence o~ten assume that a "know-ledge engineer" tthat 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 know~edge 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 as an expert system 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.
The rapidly developing art of software engineering h~s shown that one of the key requirements for ~ large software systen i5 that it be maintainable. Thus, for exa~ple, the ~oftware ~yste~ must be set up ~o that, after the technologi~t who first puts together an expert ~yste~ is gone, it can be ~aintained, ~odified, and updated as necessary by his successors.

~9~5~.

Thus, one key problem in the area of expert systems is the pro~lem of maintenance and updating. Especially in more compl~x real-world applications, it is necessary that a large software structure, such as that required for a sophisticated expert system, be maintainable. For example, in an expert control system, control strategies may be modified, new 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 maintainability by keeping the inference rules which the processor executes separate from the software structure for the processor itself. However, this lS normally tends to lead to a larger software structure which operates more slowly.
Specialists in expert systems also co~monly assume that expert systems must be built in a symbolic processing environment, e.q. in environments using LISP
or PROLOG. Even for complex processes, a single large Xnowledge base is usually assumed. The program which processes the knowledge therafore reguires complex proc~dures for processinq the knowledge base, and these are typically coded separately from the knowledge. This leads to large softw2re structures which execute slowly on conventional computers. Specialized "LISP machines"
are commonly recommended to speed up the inference process.

Expert SYste~ Knowlçdqe Structures Publiched ~teri21 regarding knowledge based ~ystem6 (expert ~ystems) has proposed several clas-sifications ~or the types of rules which are to be used.
For example, U.S. Patent No. 4,658,370 to Erman e~ al., describe "a ~.~q~sr~L

tool.. for building and in1:erpreting a knowledge base having separate por~ions encoding control ~nowledge, factual knowledge, and judgmental rules." (Abstract).
The method descrihed in this patent still appears to rely on the availability of a "knowledge engineer." This patent appears to focus on the application of an expert system as a consultation driver for extracting the relevant items of knswledge from a human observer.
Knowledqe 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 easier to understand. ~he knowledge base is written in a specialized programming language. This is a very powerful structure, which requires a very high skill level.
Expert system development 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 solve a specific problem". (~bstract).
Although this tool is 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 he can program the knowledge base. Despite some simpli~ication in the development process, a fairly high skill level is still required.

E~E~F_~___ s-~L ~ ;s Control Chemical processing plants are so complex that few people develop expertise except in limited areas of the process. Plants run around the clock, production rates on a single line are very high, 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 othPrs, and it would be advantageous if the skill level of the best operators could be made generally available. Expert systems promise significant benefits in real-time 15 . 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 super~isor 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 primary control par~meter (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 3756~
multiple control parameters should be addressed, and in which direction.
It should also be noted that the use of an exper~
system to design a new process (sr to debug a newly introduced process) has significantly different features from the problem of optimally controlling an existing process. Similarly, while expert sy~tems have ~lso been applied to the automatic distribution of jobs to multiple workstations ~hrough an ~utomated materials handling system (an example of this is the ~ISPATCHER
Factory Control System developed by Carnegie ~roup Inc.), the queuing problems presented by the allocation of different types of materials in batches to many parallel assemhly workstations making dif~erent products are quite different from the problems in continuously operating single line processes, particularly chemical processes.

"RESCU"
The system known as "RESCU-I resulted from a collaborative demonstration project between British government and industry. See, e.q., Shaw, "RESCU online re~l-time ~rtificial intelligence," 4 Co~u~er-Aided Enqineeri~q J 29 (19B7): 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.

"Falcon~ L2~75~
"Falcon" is a fault diagnosis system or a chemlcal react~r, which monitors up to 30 process 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 thQ University of Delaware, and is described, for example, in D. Rowan, "Using an Expert System for Fault Diagnosis,~ ln the February 1987 issue of Control ~ . See also "Troubleshooting Comes On Line in the CPI" in the October 13, 1986. issue of Chemical Enqineerin~ at page 14. This system required several man years of development, and because it iD programmed in LISP, it has proven difficult to maintain the knowledge base through process changes.

O~SP1~:C SuPerintendent"
The "ONSPEC Superintenden~n (TM), ma keted by Heuristics Inc., is ~ real-time expert systems package which monitors data from the ONSPEC (TM) control system.
See Manoff, ~On-Line Process Simul~tion Techniques in - Industrial Control including Parameter Identification and Estimation Techniques," in ~roceedi~qs of the ~leventh ~nnual~ nced Control Con~ere~ce (1985);
and Manoff, "Control Software Comes to Personal Computers." at page 66 of the March 1984 issue of Control Engineerinq. ~he "Superintendent" monitors for conformance with safety and control procedures and documents exceptions. It can also notify operators, generated reports, and cause control outputs.

s~>~

PI CON "
The PICON (TM) system, whi~h was marketed by Lisp M~chines, Inc. (LMI~, was apparently primarily intend~d for real-ti~e analysis of upset or emergency conditions in chemical processes. It can monitor up to 20,000 input process measurements or a]arms 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 ~
LISP comput0r 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, 15 for example, L. Hawkinson et al., "A Real-Time Expert System for Process Control,~ in ~rtificial Intelliqence A~Dlicati~ns in Chemistrv (American Chemical Society 1986), and the R. Moore et al, article in the May 1985 issue of InTech at page 55.

Self-tuninq_Controllers ~nother 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 ~ffect only low-level parts of the 6ystem, nnd use a fixed rule base embedded in a ~icroprocessor.

1~75~
SUMMARY oF TH:E-l~yE~m ~
In this section various ones of the innovativa teachings presented in the present applicatisn will now be discussed, and some of their respective adYantag~s described. Of course, not all of the dis~ussions in this section define necessary features o~ the invention (or inventions), for at least the following reasons: 1) various parts of the following discussion will relate to some (but not all) classes of novel embodiments disclosed; 2) various parts of the following discussion will relate to innovative 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 of 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 methods 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 system while also exploiting expert system capabilities;
generally applicable methods for controlling a continuous process; and innovations, applicable to expert systems generally, which help provide highly maintainable and user-~riendly experts.
Various classes of embodiments d~scribed herein provide a pr~cess control sy~tem, wherein a process which ~perates ~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 minimum 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 process 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 sys~em(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 ~odules of the supervisor procedure by editing highly constrained templates. The templates use a standardized data interface (as seen hy the user), which facilitates the use in cc ntrol actions of data from a wide variety of systems. The templates in the available templa e set preferably contains highly constrained psrtions (which are optimized for the most common functions), and pointers to functions which can be customized by the user~
4) Pr~ferably, 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 ~eneration functions. These can be used to generate messages describing the actions of he 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 language templates. The templates use a standardi ed 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 expert system, modifying them, and recompiling to generate a new runnable expert.
6 ) A historical process database advantageously standardizes the access to current and hictorical process data } y the supervisor and expert procedures. This is particularly useful for collecting s~

the results of laboratory characterizations over time of the underlying process.

Control of Continuous Processes The goals in management of a substantially continuous process include the following:
1) Maximizi~g 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 ~nergy and feedstocks without compromising quality objectives. Upsets and inadvertent process shutdowns, 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 MultiDle ManiDulated Variables As noted above, in many process control applications, several manipulated variables must be jointly controlled in a single control loop (e.q. 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.
One novel approach to this problem (which is used in several of the preferred embodiments below) is to decompose the multiple variable problem into a set of ~7'~
single-variable problems. An expert procedure is used to decide which control parameter(s) to adjust, and one or more from a set of E;ingle-input single-sutput 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 condi~ions. Correct act:ions 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 ~he 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 novDl 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 for process control in which a process supervisor procedure (which is preferably the top level procedure) defines parameters 75~

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 act are preferably made large enough (for each control parameter) that every action must be a significant change.
A related novel teaching herein is that every control action taken by the supervisor should be reported out to plant personnel in a substantially natural language message. Preferably, instances 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 judge 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 discretize supervisor actions. Feedforward action is taken only when the measured value changes by more than the deadband from its value at the last action. ~his 1~9756~

generates a series of discrete changes in the manipulated variable, which can be effectively logged and evaluated by operators.
Statistical filtering of 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 Pew, 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 structurè. 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 (or, 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 advantageous.

Tv~es of Process Control Svstems ~ 7~

It shoulA also be noted that the use of an expert system to design a new pr~c:ess ~or to debug a newly introduced process~ has significantly different features from the problem of optimally controlling an existing process. Whil~ various ones of the novel ideas disclosed herein may have siynificant 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 no~el ideas disclosed herein have particular advantages in this context.
A significant realization un~erlying several of the innovations disclosed in the present application 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 gueried for information). The Hardy et al.
and ~rman et al. patents illustrate this difference.
Consultative expert systems seek to substantiate one of a number of possible causes by interactively guerying the user about the symptoms. Such systems must use complex knowledge representations and inference methods to minimize the number of user queries by carefully selecting the information they solicit. Moreover, 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 minimize the requests for infor~ation. In fact, it may be faster to retrieve all the data that could be relevant to the problem than to determine what data is 1~9~5~i~
relevant. Mor~over, since the experts will run automatically, there is no need to explain the reasoning during the inference proces~. As long as the rulebase is not too large, the process control expert can sperate effectively using a simple "forward chaining" (or data driven) inference method. There is no need for the complex "backward chaining" procedures used in the 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 work effectively in forward chaining mode. The presently preferred embodiment is especially directed to process control and monitoring, and the novel ideas disclosed herein have par~icular 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 pro~lem, 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 conceivable 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 being taken, and (secondarl~y~ perm6i:~s minimizing costs.
In particular, it i~ especial.ly advantageous to use a knowledge based (functional) structure where ~he rules are constrained to be of the three types described ln the context oE a p~oces~ control application. 1`h~ retrieva]
rules permit th~ pred~minantly quantitative sensor data (and other input data) to be translated into a format which is suitable for expert system application, and the control rules pr~vide a translation back from expert system reasoning into al~ output which matches the constraints of the control problem.
The present invention is particularly advantageous in controlling processes which are substantially continuous, as ~istinguished from job shop processes.
That is, while some computer-integrated manufacturing systems focus primarily on issues of queuing, t~roughput, statistical sampling of workpieces for inspection, etc., substantially continuous processes (such as bulk chemical synthesis and/or refining processes) typically demand more attention to issues of controlling continuous flows.

ExPert ~stems ~ene~allv The present ~pplication contains many teachings which solve specific problems and offer corresponding advantages in the sub-class of expert systems used for process control, or even the sub-sub-class of expert ~ystems used for control of substantially continuous processes. However, the present application also discloses many novel features which could be ~dopted into many other types of expert systems, and/or into many other types of control applications, while still ret~ining many (if not all) of the advantages obtained in the context of the presently conte~plated best mode.

1~37~

Similarly, while the present application describes numerous novel features which are particularly applicable to rule-based forward-chaining expert systems, some of the innovations described herein are believed to be Yery ~roadly novel, and could be adapted for use with other types of exper~ systems too.

Natural-~anquaae Ru_e Statements One of the innovative teachings in the present application provides an expert system tool in which 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 system~, knowledge is coded in the strict syntactical format of a rule or computer language, which allows great flexibility in knowledge representation. 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.
~oreover, if the number of such pre-defined knowledge structures i5 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 expert.
7.5~
Another innovative teachin~ is that th~ knowledge entered into the pre-defined natural-language structures is stored in substantially natural-language form. This permits the knowledge to b~ revised at any time in the form in which it was originally entered: the deYeloper 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 embodiments 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 ~2~3'7S~

lack the programming expertise that would otherwise be needed ~o access these data sources.

ExDert Svstem Rule '~2~
As mentioned above, previous expert systems tools normally use a rule or computer language which ~llows great ~lexibility in k~owledge representation. One innovative teaching in the present application is the restriction of the knowledge structure within an expert system to rules of thre~ highly constrained types. The three rule ~ypes are: 1) retrieval rules, ~hi-h ~ach assign sne of several descriptors to a name in accordance with the values o f numeric inputs; 2) analysis rules, which each can assign a descriptor to a name in accordance with the descriptor/name assignments made by sther rules; and 3) action rules, which either execute or don't execute a command in accordance with the descriptor/name assignments made by other rules.
Preferably only the retrieval rules include numeric operations. Preferably only the action rules can enable execution of an external com~and (i,e. of a command which does not merely affect the operation of the expert 2rocedure). Preferably each of the action rules reguires 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.
While this organization of an expert system's structure is especially advantageous in the context of a process c~ntrol expert system, it can also be applied to other types of expert ~ystems. In a proc~ss control system, the relevant inputs will normally be process data, laboratory data, or control system parameters.
The relevant outputs will normally ~e executable proceduras which affect the operation of co~trol or ~upervisor systems, or communicate with opera~ors or g7~
Aomain experts. This teaching could ~lso be applied to experk systems generally, i.n which other input and output functions are more important.
For example, in consultative use, retrieval rules need not be confined to numeric inputs, but could accept the natural language descriptor/name assignments as input from the user. Ts better control the requests for input, such consultative retrieval rules could advantageously execute contingent upon a test for 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 proYide access to process and control system data, and translate from quantitative input data lS into a natural language form. The emula~ion 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 ar~ 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 messages, perform unusual control actions, or call expert system procedure~.
Using the build-supervisor procedure, users can define ~~9~
or redefine modules by editing highly constrained templates which include a 6tandard data interface specification~ The standardlzed data interface ~as seen by the user) facilitates communications with an extremely wide variety of systems. Dynamic revision i5 achieved by storing the user input to the constrained templates as data in a storage area accessible to both the supervisor and build-supervisor procedures. The running supervisor examines the stored data to determine which functions have been specified for that module, and what data sources have heen specified through the standard data interface. The supervisor then calls an appropriate modular function and passes the user-specified data.
This organization 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) m-~ltiple independent expert system procedures can be utilized within a single supervisor;
f3 more than one user can define control 5~
strategies by accessing different modules, simultaneously if desired.
Another innovativ~ teaching herein is that ea~h ~upervisor module (or, less preferably, less than all of the module types~ should preferably contain a pointer to optional user-customlzed functions. These functions can be used to generate informative 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 is statistical filtering. This is particularly useful in that statistical filtering can be introduced wherever it is advantageous, 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 teachings 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 turn is very advantageous (as discussed below) in providing an understandable log of control actions taken.

5~W~ooiLoL:e bl~ locks S One innovative ~eaching herein is a system ~or process control having a modular supervisor procedure which includes novel module ~iming and sequencing methods. Users can preferably specify modules by editing highly constrained templat~s, which include several specifiers for methods to be used in controlling 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 wheneve. another module executes; 4) execute module function only sn programmatic request; and combinations of theseO
Preferably a standardized data interface is used to specify the data source for the second of these options.

Inte~ration of ~x~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 machine, often a symbolic processing machine. Usually only one expert sy~tem with a single large knowledge base is created for a process. Since the knowledge base could contain many rules, a compIex knowledge representation and inference process are needed to make inferenc~s fast enough for real-time use. The expert system typically runs independently, scheduling its own activities, and thus is effectively the l'top level"
procedure. Using a top level expert makes it more ~'97X~
difficult to accommoda~e more than one expert system.
(Another w~y to regard this area of advantage i5 to note that, without the inventions contained in the pr~sent application, the potential ~odularity of the expert S system cannot be fully exploited.) Several of the novel embodiments described herein achieve substantial advantages by using more than one e~pert system subprocedure within single integrated system. Since expert decisions wlll 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 coordinat~ 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. ~he 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 ~he expert systems already present, 7~

or create a new expert system. The supervisor procedure Gan preferably also call on a historical data base.
The modular organization described is especially advantageous, as discussed above, in providing parallelism and branching in control strategies. This is especially advantageous in process control situations, since the appropriate strategies for different circumstances 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 advantageous for balancing component ~17~
material flows in the process. In khe presently preferred embodiment, the historical process database may be thought of as providing a way to "buffer" time-stamped data and provide a standardized data interface, but it also permits other functions to be served.
The historical database also advantageously provides a basis for statistical tests. Some statistical tests will require a nu~ber of past mçasurements, which can be retrieved fxom 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 exp~rt 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 by the expert subprocedure.
One of the innovative teachings in the present applicati~n is an integrated system for process control ~i~4 ~

in which the user can customize the process supervisor 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. The first iclentifies whiGh (software) system and type of value is desired. The value sf a setpoint in a particular distribut~d control system, the value of a sensor measurement in a particular process monitoring system, the valu~ of a constraint from a process control sr 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.

75~
~RIEF D~SCRIPTION OF TH~ PRAWING
The present invention will be described with reference to the accompanying drawings, wherein:
Figure 1 6chematically shows the structure of hardware and procedures prefera~ly used to embody the novel process control system with expert system capabil-ities provided by various of the innovative features contained in the present application.
Figure 2 is a schematic representation 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 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 analy~is rule.
Figure 6 shows the presently preferred embodiment of the template for action rules, and an example of one action rule which has been stated in this format.
Figure 7 shows an example of a chemical synthesis processing layout in which the method taught by the present invention has been successfully demonstrated.
Figure 8 schemat~cally shows the 6tructure preferably used for a supervisor procedure and a build-supervisor procedure.
Figure 9 shows a menu which, in the presently preferred embod~ment, is presented to the user by the build-supervisor procedure to select a template to provide user inputs to de~ine or modify ~ block within the ~upervisor procedure.
Figures 10-13 ~how speoific templates w~ich, in the presently preferred embodiment, are presented to the user by the build-supervisor procedure to provide input '75~

to define or modify a feedbac)c, feedforward, statistical filtering, or progra~ blsck, respe~tively.
Figure 14 shows a block-editing utility menu presented to the user, in the presently preferr d embodiment, by the build-supervisor procedure.
Figure 15 shows a flow chart for the base cycle procedure used in the supervisor procedure in the presently preferred emhodimentr 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 procedures which permit user customization of functionality.

I:)ESCRIPI ION OF THE PREFERRED EMBODIMENTS

General Orqani2ation of Hardware and Procedures Figure 1 schematically shows th0 structure of hardware and procedures preferably used to embody the novel process control system (with expert system capabilities) provided by various o~ the innovative features contained in the present application. An underlying process (for examE~le 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 world examples are substantially more complex; Figure 7 shows the chemical 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 controllers 154.
In the presently preferred embodiment, the controller lS4 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 sys~em.) The 7~

computer controller system 152 and the PID controller 154 may be regarded together as a single first level controller 150, 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 some of its parameters 132 (e.q. setpoints or feedforward ratios) from a supervisor pr~cedure 130, which is preferably a higher level of control software. (In many of the sa~ple user menus and forms shown, the supervisor procedure 130 is referred to briefly as "ACS.") The supervisor not only rec ives inputs 157 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 VAX 11/785), while the computer control system 1~2 is a PDP-11.
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 s~ored 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 5~;~

characteristics and measurement characteristics 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 normal variation, and ascertain whether a process has significantly deviated from its current goal or average. (Al~ernatively, 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 database will next be described, since that provides a standardized data interface to which many of the other functions connect. Next, the functioning of the build-supervisor procedure will be 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 of 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.
Sample Process Context Figure 7 schematically shows a sample embodiment of a chemical process incorporating several novel ~eatures described in the present application. The system shown is one in which various novel aspects set for~h in the ~75~

present application have been advant~geously demonstrated.
It ~hould be understood that the present invention provides a tool of very broacl applicability, which can be used in many processes very different f~om that of Figure 7. Thus, for example, various of the claims herein may refer to sensors which sense "conditions" in a pr~cess, or to actuators which change "conditions" in a process, without reference to whethe- one sensor or many sensors is used, wh~ther one or several parameters is sensed by respective ones of the sensors, whethe:-the actuators are valves, motor~, or other kinds ~
devices, etc~
Figure 7 shows part of the distillation train of a process in which paraxylene is air oxidized to make terephthallic acid, which is then esterified 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 benzoate (MFB). One of the key objectives in a DMT synthesis process is controlling the compositional ~raction 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 7~0 is preferably further refined to reduce the MHT fraction.

1:~9~ 6~L
The crude feed 702 is fed into approximately th~
middle of a first distillation column 710. The column 710 is heated at its base by a steam reboiler 712. The steam flow is controlled by a flow controller 714 (which is connected to an actuator 716 and a sensor 718.3 Similarly, the feed flow controller 704 is connected to an actuator 706, and a sensor 708. The column 710, as operated in the presently preferred embodiment, h~s internal pressures and temperatures which ranse from a~out 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. Th~ 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 column 730 (which in the user screens of the presently preferred embodiment is frequently referred to as the "MFB column"~ range from about 240- C at about 235 Torr at the 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 speci~ic example given below, as the "xylene columnn.) The mass flow in the loop 728/742 is quite large;

~9~1~6~
typically the mass flow of flow 728 will be about three times the mass flow of the crude f~ed 702.
In addition, a third distillatisn c91umn, in the presently preferred embodiment, is operated in parallel with a middle section of col~nn 710. This third column 750 is fed a side draw stream 752 from the first column 710. The vapor stream 754 of column 750 is passed through a condenser, and part of the condensate is reintroduced to column 750 as a reflux 758. Most of the remaining condensate is reintroduced to first column 710 as an upper middle ferd. Similarly, the liquid stream 762 of third column 750 is p~rtly reintroduced as a bottom feed after being vaporized in the reboiler 764, 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 MF8 composition are the steam feed to the MFB column 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 xylene column 710, which is controlled by flow controller 704.
Numerous other controllers, pumps, and other process equipment maintain the temperatures, pressures, and flow rates at other points in the process. In accordance with principles well known i~ the art of ch~mical engineering, this serves to maintain mass and energy balances and compositional trends consistent with the ultimate control objective, which is to maintain a high and constant purity in the product stream 740.

Historlcal 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 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, 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 (e.a. temperature sensors) will be received as a series of digital values from analog-to-digital converters 155.
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 (whiGh includes both compression and decompression algorithms) is essentially invisible to the supervisor procedure 130.

~9~S~.
Secondly, lab analysis data 162 can also be stored in the historical database 140. For example, compositional measurements must normally be done off-line. A physical sample will be pu:Lled from the physical process flow and sent to the laboratory 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 ~
lo pro--esses can be simulated, using any of a varif~ty of currently available si~ulation 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 o f the advantages of the database 140 derive from the fact that it can provide a timestamp to accompany every piece of data it provides. In addition, in the presently preferred embodiment, 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) .
This structure is quite flexible: for example, in alternative embodiments, one supervisor procedure could interface to ~ultiple databases 140, and/or one database 140 could receive calls from more than one supervisor procedure 130 ~which optionally could be running on different ~ystems).

75~i~

SuDervisor and 8uiLd-Supervisor Pxocedures The present application describes 60me ve~y advantageous features of novelty in the ~upervisor 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 139 preferably used contains a modular software structure which greatly facilitates initial setup and also modification.
Pre~erably 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 i5 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 commonly used functions expedites initial functional definition, and also facilitates maintenance, but sophisticated users are not prevented from writing their own customized functions (such as messagin~).
Feedback blocks are used when a ~anipulated parameter must be adjusted to Xeep a measured paramete.

~7~

near a desired goal. Feedforward blocks are used when two parameters (which are not necessarily in a causal relation) are linked, L~ whPn a manipulated parameter must be adju~ted to keep it in some ratio (or oth~r relation) to a measured parameter. Statistical filtering blocks are used, in the presently preferred embodi~ent, to provide the advantages of statistical process control, and to facilitate minimizing the number o~
control parameter adjustment actions.
Preferably a maximum number of blocks is pre-defined. (In the presently preferred embodiment, 20G
blocks is the preset maximum, and this number is 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 dele~e 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 "ownership"
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 block 891 might be set, in the dimethyl terephthalate synthesis application described, so that the base cycle procedure 802 is executed every 15 minutes (and therefsre the entire sequence of blocks 851 etc. is called for possible execution every 15 minutes~.

~97~

The base cycle procedure also preferably performs some overhead functions. ~or example, the base cycle procedure 802 optionally contains the appropriate commands for branching on interrupts 804, and for initialization a~ter a start rommand ~06. Secondly, the base cycle procedl]re 802, upon calling each block, will preferably 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 sys~em clock value or ~he ~ime stamp of a variable, to see if 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 80~ 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 a~tions 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 '756'1 executable code is us~d for all of the feedback blocks, and similarly another block ~f code is used for all the feedforward hlocks, etc., so that all 200 blscks require only four subroutines for their standard functions. ~ach S time the base cycle r~utine executes a feedback blsck, it calls up the user-defined pa;rameter set for that particular block, and passes those parameters to the subroutine which performs ~e~dback functions in accordance with those parameters.

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

Start the control cycle loop: (This loop is shown as 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 "Runnin~-Computing~.
- Compute the next cycle time by adding the base scan interval to the current time.
Start ~ loop through all blocks~ ~tarting with block number 1 and counting up to the maximum number of blocks (This loop is shown as 1520 in the ~low chart of Figure 15):
- Check block status.
* Get the switch status o~ the block. If the block i~ ~witching with an external switch ~ r~57~

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 th~ block's current status.
* If the switc:h status is "On", "Active", "Toggled On", or "Just turned on", the block is on.
~ If the blocX 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 is on, and the curren~
block status is "On" or "Just turned on", then the block is continuing to be on. Set the Block Status ts "On"O
* If the biock is not on, it is off. Se' the block status to IlOffll.
- If the block status is "Off", "Inactive", or "Failed", loop back up and start the next block.
- If the block 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 Key block, set the "Rey 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 meast~red variable, get its current time.

1~'75~

- If the block has a key block, get its last execution time.
- If the block timing option includes fixed interval, and if th elapsed ~ime since the "last 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.
lS - If the block timing option includes keying off another block, and if the last execution time of the key 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 block.
- If the exesute 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 flow 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'l.
- 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.

~?75~.

- Wake up~ Check to see if interrupted to terminate. If 50, set the system status to "Terminated no~mally", ~nd stop completely.
- If not terminatecl, branch back to the star~, of the control cycle loop 1510.

SamDle Source Code The source code for the procedure which actuall-y performs this function, in the presently preferred embodiment, is as follows. Due to the formattin~
requirements of patent applications, some portions o~
this and other portions of source code provided herein 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 those skilled in the art will readily recognize these instances, and can readily correct them to produce formally perfect code.
Table 1 **********************************
C Control.for C Main control program for the Advanced Control C System, C a high level optimization and control system C running on the V~x, using Vantage facilities.
C***********************************
C Program Control Include 'ACS$includes:310ck parameters.inc/nolist' Include 'ACS$includes:Van_functions.inc/nolist' Include 'ACSSincludes:Sys functions.inc/nolist' Include 'ACS$includes:Manip params.inc' Include 'ACS~includes:Meas Params.inc' Include 'ACS$includes:Filter ~ar~ms.inc' Include 'ACS~includes:ACSserY.inc' Include 'ACS~includes:ACSstatus.inc' Integer*4 Block Integer*4 Integer Now Character*20 Character now s~

Integer*4 Timbuf(2) Integer~4 Measured_time stamp Integer*4 Key block exec time L~gical*2 Execute block Logical Success Logical First Character*18 Debug time!
Logical Force init:ialization Parameter (Force initialization = .True~) Logical Dont f~rce~ initializatlon Parameter (Dont force initialization = .False. ;
C

Integer*2 Meas_type Integer*2 Meas_var Integer~2 Filt type Integer*2 Filt var C

Integer*4 Event ~lag 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() z Btest(Event flag state,l) C

Timer flag = 64 Interrupt ~lag = 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 - Vss$ 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 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 1~7~
If ( Integer_now - Integer next cycle .gt. 30*60 ) Then Do 10 Block = l,Max_blocks If ( ( Block_status(Block)(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_block ( Bl~ck ) Continue End If C

C....The main blocX control loop 1 Continue c C....Set system status to Running C

System_status = 'Running-Computing C

C...Set Wake 11p time to ACS_base scan minutes from now C

Van_status = Vss$_from ascii time ( ' ' , 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 ( Integer next_cycle , Timbuf ) C
C....Loop through all the blocks C

Do 100 Block = 1,Max blocks C

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

Call Check block status ( Block ) C

C...Check the block status, if inactive or off, skip it C

If ( ( BlocX status(Block)(1:8) .eq. 'Inactive' ) .or.
1 ( Block status(Block)(1:6) .eq. 'Failed' ) .or.
1 ( 81Ock status(Bl4ck)(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... If the block has just been turned on, initialize it C
If (Block_status(Block)(1:14) .eq. 'Just turned on' ) Then Call Initialize block( Block ) End if C....ChecX to see if it is time to execute the blocX

5~
c C...... Use appropriate calls for the block type C

If ( 1 ( Block_typP ( Block )(1:8 ) .eq. 'Feedback' ) .or.
1 ( Block typ~ ( Block j(1:11) .eq. 'Feedforward' ) .or.
1 ( Block type ( ~lock )(1:7 ) .eq. 'Program' ) 1 ) Then ACS status - ACS get meas var type ( Block , Meas type ) I f ( Meas_type .eq. Cur val van var ) Then ACS_status - ACS_get_meas_var_num ( Block , Meas_var ) Van status = VssSg curtime ( Meas var , 1 Measured time stamp ) Else Measured_time_stamp = 0 End If C

Else If ( 1 ( Block type ( Block )(1:8 ) .eq. 'Shewhart' ) 1 ) Then ACS_status 8 ACS_get_filtered_var_type ( Block , Filt_type If ( Filt_type .eq. Van_var filter ) Then ACS status = ACS get filtered var num ( Block , ~ilt_var - Van_status = Vss$g curtime ( Filt var , 1 Measured_time stamp ) Else ~easured_time stamp = 0 End If End If C

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

Xey block = Var num2(Block) If ( Xey 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 = v~s$ to ascii time ( integer now , Debug time ) d write~6,*) ' Block s ',block d write(6,*) 'Integer now = ',Debug time d Van STATUS = vssS to ascii time ( last execution time(block) d 1 , Debug time ) d write(6,*) 'last execution time = ',debug time d Van STATUS s vss$ to ascii time ((-l)*Fre~uency(block)*60 d 1 , Debug time ) d write(6,*) '~requency~block) = ',Debug time d Van STATUS = vss$ ~o ascii time ( last_measured time(block) d 1 , Debug time ) l~?;P~-S~

d write(6,~) 'last measured time = ',Debug_time d Van_STATUS = vss~_to ascii_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 I~
C

I timing option = Var num3(Block) If ~ ~ I timing_option .eq. Interval ) .and.
1 ~ Integer now - Last execution time(Block) ~ge.
1 Frequency(Block)~60) ) Then 1 Last_executisn_time(Block) = Integer now Last measured_time(Block) = Measured_time_stamp Execute_block = .True.
Else If ( I timing option .eq.
1 Key off_measured variable TAe~
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 Xey off_ACS block ) Then If t Key_block exec time .gt.
1 Fix time(Block) ) Then Last execution_time(Block) = Integer now Last measured time(Block) = ~easured 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) Then If ( 1 ( Rey block exec time .gt.
1 Fix time(Block) ) .or.
1 ( Integer now - Last execution time(Block) .ge.
1 Erequency(Block)~60) 1 ) Then Last execution time(Block) = Integer now Last measured time(Block) = Measuxed 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 meas var) Then If ( 1 ( Measured time stamp .gt.

:1.2~ ~'S~:~
1 Last_measured time(Block) ) .or.
1 ( Integer now - Last execution time(Block) .ge.
1 Frequency(Block~*60) 1 ) Then Last_execution time(Block) a Integer now Last_measured time(Block) = Mea~ured ti~e stamp Fix_time(block) = Key block exec time Execute_block = .True.
End If C

Else If ( I_timing option .eq.
l ~ey off_meas var and block) l'hen If ( 1 ~ Key block exec time .gt.
1 Fix_time(Block) ) .or.
l ( Measured_time stamp .gt.
1 Last_measured_time(Block) ) 1 ) Then Last execution time(Block) = Integer 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_Rey_meas and_block)Then If ( l ( Key block_exec_time .gt.
1 Fix_time(Block) ) .or.
l ( Measured time stamp .gt.
1 Last measured time(Block) ~ .or.
1 ( Integer now - Last execution_time(Block) .ge.
1 Frequency(Block)*60) l ) Then Last execution time(Block) = Integer_now Last measured time(Block) = Measured_time_stamp Fix time(block) = Key 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 ( Execute_block .eq. .True. ) Then If ( Block type(Block)(l:ll) .eq. 'Feedforward' ) then Call Feedforward_block(Block) Else If ( Llock 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 ) .eq. '~Shewhart' ) then Call Shewhart block( Block) 1~7~
End if End if C

100 Continue C~.. ..All Blocks checked and executPd if needed; go to sleep until neede 102 Continue Sys status = Sys$setimr ( %val(Timer flag) , Sref(Timbuf),, If (Sys status .eq. ~loc(Ss$ n~rmal) ) Then d Write(6,*~ ' 5uccessfully set timer.
Else Write(6,~) ' Error return from setimr in Control at ', 1 Character now End If c System_status = 'Running-Sleeping Sys_status = Sys~wflor ( ~val~Timer_flag) , %val(Flag_mask) If ( .not. Sys status ) Call Lib5signal(%val(Sys status)~
Sys status = sys$readef ( %val(Timer flag ) , 1 %ref(Event flag state) c If ( .not. Sys_status ) Call Lib$signal(%val(Sys status)) If ( ( Sys status .ne. %loc(SsS wasclr~ ) .and.
1 ( Sys_status .ne. %loc(Ss$_wasset1 ) ) Then ~rite(6,~) ' Problem reading event flag status' End If C

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

1 :nd Copyright (c) 1987 E.I. DuPont de Nemours & Co., all rights reserved `60 ~7~

Build-Supervisor Procedure The build-supervisor procedure 810 presents templates 812 to the user and stores the user responses to these templates in a "global sectiQn" portion sf memory (i.e. a shared or commonly accessible portion OL
memory). That is, the user :inputs to the templates for the various blocks 851, 852, 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 any 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 capability 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 ~he supervisor procedure.
In the presently preferred embodiment, the nexus between the build-supervisor procedure and the ~1 3i7~

supervisor procedur~ is somewhat different from the nexus between the build-expert procedure and the operating exper~ procedures. The user entries made into the more constrained parts of ~he 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 fields of the templates) in a shared section of memory, which is immediately accessikle 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.

To~-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 the 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 ~elect a specific existing template 812' (i e. a template with the previously defined data values of a 5~3.

particular hlock are shown in the appropriate ~ields of the template) or a blank template 812 of a given type to provide user inputs to define or modify a blocX 851, 852, etc.
This f orm allow~ 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 ~orm (in this ~ase the top-level menu), he can press the "-" key on the ke~pad.
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 move to the block type field and the build-supervisor procedure will request 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 the block setup form for that block.
In the best mode as presently practiced, all four block setup forms have some common features. Reypad 9 will move the cursor from anywhere on the form up to the block number field. Keypad 8 will find the lowest number 1~7~

available block ~nd set it up as the same block type as the form showing on the scre!en. Keypad 7 tests all the parameters on the block and changes the block status to switch it on or off, or requests new data if the user has not yet supplied it. ~In addition, many of the parameters are checked for gros~ error as the user enters them.) The various block setup forms shown as Figures 10 thr~ugh 13 will be individually described below; but first, some features common to some or all of he 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 "Toggled on" or "Active". The base cycle procedure will update the status as the block is executed, changing to "Just ~urned on" and then to "Qn". When turning a block off, the status will change 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 ~lock must be toggled from "Inactive" to "Active" or "Toggled On" using Keypad 7.

~ c~

Data Source ~Decification The templates presented to the user for block customization include a stanclardized data inter~ace. The data values to be used by the supervisor are specified in the standard interface by two identifiers. The first identifies which (software3 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 par~icular process monitoring system, the value of a constraint from 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.
For example, in Figure 10 the user has entered "4"
in the highlighted area 1002 after the phrase "Measured Variable Type:". This particular identifier ( 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 khat the manipulated variable i5 to be a loop goal of the DMT control system.) As the second identifier, the user has indicated a value of "~990" in field 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 la~37~5~L

interpretation of this identifier ("DMT PRD MFB SHWRT
DEVIAT") onto ~he user's screen as soon as the user has entered this value in the field 1004.
Data values specified through the standard interface may be used as measured values, manipulated values, or as swi~ch status ~ralues indicating an on/off status. Preferably the int~erface allows the user to specify data in any of the relevant process control and data collection systems usecl for the process, or ~or related proc~sses. 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.

lock 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 usar specifies the time interval, e.a. in minutes. (Note that a combination of this option and the followinq has been specified in the example of Figure 13, by the user's entry of "5" into field 1306.) Key Off Measured Variable: the block will execute every time a new value is entered into the process database for the measured variable. The measur~

1~756~

variable must be a "sampled~' type variable. (Note that this option has been specifi~ed in the example o~ Figure 10, by the user's entry of "2" into field 1006.) ~ey 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 using a combination timing option execute whe~ever 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 of "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 blocks 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 proc~dure 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-supervisor procedure allows the user to specify an e~ternal 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 ~ loop number within that system. The block will turn on when that loop is on, and off when that loop is off. The standardizecl data interface allows any accessible control system t~ act as the switch system.
As a further alternative, the blocks can be set to switch on and off only under the control of the deYeloper (i.e. under the control of the build-supervisor user). In this case, the block can only be 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 field. (In the example of Figure lO, 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 ~5 show in the field ~or the switch entity number. (This option has been selected in the example of Figure 13.) Secondary Block Switchina The supervisor also provides secondary means of controlling block execution. Blocks which have been turned "on" by their primary switch controls may be "selected", "de-selectad", or "held" by programmatic requests. The status of selected blocks changes to "On-selected". Selected blocks continue to function as i~ they were "On". The status of blocks which are deselected by progr~mmatic request changes to "~n-deselected". De~selecte~d blocks take no control action. However, they differ from blocks which are "off" because they continue to maintain all their internal inform~tion 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 advantageous in terms of software documentation, 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 ~o control different processes. 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.

~75~

E~lock ~esCriD1~
All blocks allow the user to enter three descriptive ~ields. These fields are for user reference and can be searched when printing lists of block parameters. They have no e~fect on block actions. The "control application name" field allows the user to group blocks that are part of the same control application by givinq them all the same application name. r In th example of Figure 10, the user entry in field lC14 has specified "~FB Control". Note that the examples of Fig~res 11, 12, and 13 show corresponding entries in this field.) The block description field allows the user to describe the blockls speci~ic action or pu~pose. (In the example of Figure 13, the user entry in field 1316 has explained that this is a ~lock to run expert deciding where to take MFB feedback a~tion".) The ownership ~ield specifies which user has control of the block. (In the example of Figure 10, the user entry in field 1012 has specified "Skeirik". Note that the examples of Figures 11, 12, and 13 show corresponding entries in this field.) This field facilitates use of the organization described in environments where multiple users are defining blocks which run within the same supervisor procedure.
0~ cours~, in -~lti-~se~ en~iro~men*,s it m~y ~e desirable to allow some users a greater degree of access than others. Thus, for example, some users may be authorized to edit a block, while others ~ay be authorized to toggle the block on or of~ but not to edit it, and others may ~e authorized to monitor block operation but not authorized to change it. 5imilarly, access to e~pert systems may be constrained by giving greater authorization to some users than to others; soms users may be permitted to make calls to the expert ~97~
system but Aot to edit the ~llebase, and other users may not be permi~ted to do either. In the presently preferred embodiment, all of these choices can rçadily 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 I,oaainq 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 after their control actions are complete, and pass data regarding their actions. The action log file field 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.a. if the tws blocks' actions are part of the same control application). (For ex~mple, note that field 1018 in the example of Figure 10 and field 1118 in the example of Figure 11 both specify "MFBCONTROL" 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 te.~. 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 block setup and execution, including:
Proper configuration of block parameters;

7~
On/off status of block;
Failure of block actions; and Failure of user rout:inesA
Some common block st~tus 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 configured 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 is in its off state. This is also the normal status for blocXs 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 confiyured to switch on and off through the setup form only. This status will change on the next cycle of the control program.
"Just turned on:" this is a normal transition state for blocks going from an "off" status (eg: off, inactive) to "On" status. Blocks whose status is "Just turned on" will be initialized by the base cycle procedure, which resets the last execution time and the measured variable and key blocX times used for block timing. Feedforward blocks initialize the "old"
measur~d variable value to the current value.
"On~selected": indic~tes that a block which is on has been selected by a programmatic request. The block continues to ~unction as if it were On.
"On-deselected": indicates that a block which is on has been de-selected by a programmatic request.
The block ta~es no control actions, but continues to maintain its internal para~eters 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 was bypassed in ~he user routine, but that the user routine ran successfully on a later execution.
Again, the log file will give more details about what happened.
"On-Err O.~ " many abnormal status values can indicate that problems were encount~red in block execution, ~g~ problems in the input or output of data to control systems. The latter part of the status field gives some indication o the problem. Most such errors are also recorded in the control proyram log file.
Various other block status valu2s can readily be inserted, along the lines d~monstrated by these examples.

Feedback Blocks 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 çhown in this Figure reflect the entries ~hich 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 ~easured 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 feed~ack block setup form, as shown in Figure 10.

Parameters The parameters which the user is asked t~ specify include:
Xeasured variable type: a number code representing the softwzre system and the type of entity which the block 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 historical database variable, the measured variable number is the number of the variable in the historical database. After the measured variable type i5 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 values for the max and min measured values. If hlock 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 meas~red variable is to be "held". The value is entered in entered in the units of the measured variable.
Manipulated variable type: a number code representing the "target system" - the software package and the type of entity which the block should ~97~ j6~

manipulate. ~xamples ar : ~ontrol system loop goal, hist~rical datahase variable, a setpoint in a distributed control system, or a setpoint for a programmable loop controller.
S Manipulated variable number: the number of the entity within the target syst~m which the block will manipulate. For example, if the manipulated variable type is a control system looE~ goal, ~he manipulated variable number would be the number of the loop whose goal is to be changed. The label next to this fi~ld will show what type of information is needed; in this case the label would show "Cont Sys loop #".
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 value3 Manipulated delta = Error * tProportional gain]

The manipulated delta is added (subject to limits) to the current value of the manipulated variable.
Deadband: A range around the goal value. If the value of the measured var~able ~alls within a range defined by the goal plus or minus the deadband, no action is taken Timing option, execution time interval, and Rey bloc~ number: these parameters are those described above.
External switch system and switch number:
these par~meters are described above.
M~xi~um ~n~p delt~: the maxi~um ch~nge that 5~;1 can be made in the manipulated variable's value in one control action.
Minimum and maximum value of the manipulated variable: limit values outside which control action will not move the value sf 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 ti~e 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 O~eration 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 varia~le;
- 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 ~ctions.
- Get the current value of the manipulated variable. If not accessible, set status to "On-err ..... " and do no further a~-tions.

7~

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

Delta_manip = Error * pr~portional Gain If the absolute delta is greater that the maximum allowed delta, set it equal to the maximum (maintaining proper siqn).
- Compute the new value of the manipulated variable:

New mallip 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.

Data ~assed to the user routine In the presently preferred embodiment, each feedback block is able to pass information about its actions to the user routine, by using a commonly accessible ~emory block named "User vars." (The use of this data by the user routines is described in more 5Çi~

detail below.) The data passed by the feedback blocX may include:
"User integer~ the time stamp of the measured variable (from the databass);
"User integer~2)" - the time the action ~as taken;
"User real(1)" - the change in the value of the manipulated variable;
"User_real(2)" - the computed error; and "User_character(1)" - a string (alphanumeric) sequence which describes the block type; ~or ~eedbac~
blocks this is set to be = 'FeedbacX'.

Sam~le Source Code The source code for the procedure which actual?y performs this ~unction, in the presently preferred embodiment, is as follows.
~able 2 C
C Feedback_block.for C ACS subroutine to do ~eedback action on the Vax, communicating C directly with the target system.
C
C***~*********************~******~***
Subroutine Feedback block ( Block ) Include 'ACS$includes:Block ~arameters.inc/nolist' Include 'ACSSincludes:Van_functions.inc/nolist' Include 'ACS$includes:User vars.inc/nolist' Include 'ACSSincludes:ACSstatus.inc/nolist' Include 'ACSSincludes:ACSserY.inc' Include 'AcsSincludes:TIserv.inc' Include 'Acs$includes:TIstatus.inc' Include 'ACSSincludes:Manip params.inc' Include 'ACSSincludes:Meas Params.incl C

~t3~
C

Integer*2 Meas var system Integer*2 Meas var number Integer*2 Manip var system Integer*2 Manip var number Integer*4 Block Integer*4 Measured time_stamp Integer*4 Integer Mow Character~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 nothing C

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...Get the measured value Van status = YssS from ascii time ( ' ' , Integer_now ) van status = VssS to ascii 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. %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: ',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 Status .ne. %loc(ACS_success) ) Then C......... If PCS goal value not avail2ble, don't execute ~ $~5~

Block status(Elock) ~ 'On-Err-PCS goal get' Write( 6, *) '~eed~ack exit due to measured var not ~vaila write(6,*)' ~CS Block: ',bloGk,' at: ',now time Return End If C

C... Measured Value is ACS block goal 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... ..........lf ACS goal Value not available, don't execute Block status(Block~ = 'On-Err-ACS goal get' Write( 6, *) 'Feedback exit due to measured VaJ- a~ .vaila write(6,*)' ACS Block: ',block,' at: ',now ti.lne 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 exscute Block status(Block) = 'On-Failed Msrd var ' Write( 6, *) 'Feedback exit due to measured var not availa write(6,*)' ACS Block: ',block,l at: ',now time Return End If C

end if Van status = Vss$g_curtime ( Measured variable(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 CC
C... ;Get the current manipulated value C
C

C... Target is TPA PCS Ioop goal If ( Manip var system .eq. PCS TPA Loop ) Then ACS_status ~ ~CS_get_pcs goal( 'TPA
1 Manip var number , Current_manipulated value , ) If ( ACS_Status .ne. ~loc(ACS_success) ) Then C... ..........If PCS goal YaIue not available, don't execut~
Block status(Block) = 'On-Err-PCS goal get' Return End If C

C.~.Target is DMT PCS loop goal C

Else If ( ~anip var system .eq. PCS DMT_loop ) Then ACS status - ACS get DCS 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'f execute Block status(Block) = 'On-Err-PCS goal get' Return End If C

C... Target 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 If C

C...Target is Vantage variable C

Else If ( ~anip_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... Target is Texas Instruments PM550 controller setpoint in CRD
C

Else If ( ( ~anip var system .ge. Low PM550 ) .and.
1 ( Manip 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' 1 Manip var number , Current manipulated_value ) Else If ( Manip_var system .eq. CRD_E5CHS PM~50_0~ ) Then ACS_status - TI qet loop setpoint ( 'TI_PM550 02_PORT' , 1 Manip var number , 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_numher , Current_manipulated value ) Else If ( Manip var system . eq. CRD_ ESCHS PM550 04 ) T~en ACS status = TI get loop setpoint ( 'TI PM550_04 PORT' , 1 Manip var number , Current_manipulated value ) Else If ( Manip var system .eq. CRD ESCHS PM550_05 ) Then ACS_status - TI get_loop setpoint ~ 'TI_PM550 05_PORT' , 1 Manip_var numbex , Current_manipulated_value ~
Else If ( Manip var system .eq. C~D_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 ESCHS PM550 07) Then ACS status = TI get loop setpoint ( 'TI_PM550_07 PORT' 1 Manlp_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~ lock,' 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 Writ~( 6, *) 'Feedback error less than deadband' Return End If C

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

Delta = Error * Proportional_gain(Block) If ( Abs(Delta) .gt. Max manip_delta(Block) ) Then Delta = Sign(Max manip_delta(Block),Delta) End If C...Calculate new manipulated value, check to see it within limits C

New manipulated value = Current_manipulated value + Delta C

If ( New ~anipulated value .gt. Manipulated max(31Ock) New manipulated_value = Manipulated_~ax(Block) Else If ( New manipulated value .lt. Manipulated_min(810ck) ) New manipulated value = Manipulated min(Block) End I~
Delta - New manipulated value - Current manipulated_value C

C... Transmit the new Manipulated Value to the manip vaxiable C...Target is TPA PCS loop goal C

If ( Manip_Yar_system ~eq. PCS ~PA Loop 3 Then A S status - ACS put pcs_goalt 'TPA ' , 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 ~anip var put.
Write(6,~)' ACS BlocX: ',block,' at: ',now_time Return End If C

C...Target is D~T PCS loop goal C

Else If ( Manip var system .eq. PCS DMT loop ~ Then ACS status = ACS ut_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 I f C

C...Target is ACS block goal C

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

6~

Else If ( Manip var system .eq.
1 Vantage_variable ) Then ~an status = Puteugen ( Manip var_number , 1 New_manipulated value ) If ~ Van_5tatus .ne. ~loc(vss success) ) Then C....... ......If Variable Value not available, don't execute Block_status(Block) = 'On-Err-Vant var 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 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 C

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 put loop setpoint ( 'TI PM550_02_PORT' , 1 Manip_var number , New manipulated value ) Else If ( Manip_var system .eq. CRD ESCHS_PM550 03 ) Then ACS_status = TI ~ut loop setpoint ( 'TI PMS50 03 PO~T
} Manip var number , New manipulated value ) Else If ( Manip var_system .eq. CRD ESC~S_PM550 04 ) Then ACS status = TI put loop s~tpoint ( '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 ESCHS PM550_06) Then ACS_status - TI put loop_setpoint ( 'TI PMS50 06 PORT' , 1 Manip 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. %loc(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 setpnt put' Write( 6, *) ' Feedback exit - TI PM550 Manip v puttable.' Write (6, *) ' ACS Block: ',block,' at: ',now time Return End If Else ! Other manip device types End If C....Load special arrays for user programs to log messages.

User_integer(l~ - Measured time_stamp User_inteqer(2) = Integer_now User real(13 = Delta User real(2) = Error User character~ 'Feedback -C...If Delta is non-zero, update past actions C

If ( Delta .ne. O ~ Then Do 90 J z 5,2,~1 Past_action_value(Block,J) = Past_action value(Block,J-1) Past action time (Block,J) = Past_action_time (~lock,J-l) Past_action_value(Block,l) = Delta Past action time (Block,l) = Integer_now End If CO.... Call User su~programs for this block Call User Programs~Block) C

C...All done C

Return End Copyright (c) 1987 E.I.DuPont de Nemours & Co., all rights reserved ~6 ~'75~

Feedforward Block Figure 11 shows a sampl~ of a template 812 presen-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 bloclc number six of the ~00 available blocks 851, 852, etc., and the various dat~
values shown in this Figure reflect the entries which have been made at some time to define this particular block.
The feedforward block provides proportional feedforward action. 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 generally, in accordance with) the change in value o~ the measured 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 variable 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 stage 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 v~riable if the delta were calculated from an out-o~-date "old ~easured value.n) In the presently preferred embodiment, the basic feedforward ~ction can be altered by several ~dditional parameters. A deadband can be specified, so that, if the measured value changes by less than the deadband, no act~on is taken. The ~mount of action taken can be limited to a fixed amount. The range over which the value of the manipulated variable can be chanyed can-be limited to keep it within operable limits. Screening limits can be specified on the mea~ured variable value, so that measured values outside the ~creening limits are ignored. Block timing and switching options and the block description fields follow the general outlines given above.
In the presently preferred embodiment, specifying a feedforward block on the block setup selection form (Figure 9) brings up a feedforward block setup form like that shown in Figure 11.

Parameters The parameters are:
Measured variable type: a number code representing the software system and the type of entity 15 - 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 representing the software package and the type of entity 8~

1~75~
which the block should manipulate. ~xamples ar~: control system loop goal, historîcal database variable.
Manipulated variable number: the number of the entity within the specified system which the block will manipulate. For example, if the manipulated variable type is a control system loop goal, the manipulated variable number would be the number of the loop whose goal is to be changed. The label n~xt 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 relating the change in the manipulated variable's value to the chanse 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 is 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 ~umber: these parameters are described above.
Switch system and switch number: these are described above.

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: limit values 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: 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 fila: 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 ad~antage 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.

810ck O~eration The se~uence 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);

~ 3~

- 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 measured 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 a~tions.
- 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 "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.

7t~
~ L~ ser routine The feed~orward block passes information about its actions to the user routine through the User vars common block. The us~ of this data is described in ~ore detail in the chapter covering User routines. In the presently preferred embodiment, the data passed by the feed~orward block incl~des:
User integer(l) - the time stamp of the measured variable;
User_integer(2) - the tim~ the action was taken;
User_real(1) - the change in the value of ~he 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(l) - = 'Feedforward'.

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

C FEEDFORWARD block.FOR
C
C Subroutine to do feedforward calculations on the Vax, C communicating directly with the target system.

C
C*****~**********************.********
Subroutine Feedforward block ( Block ) Include 'ACS$includes:Block Darameters.inc/nolist' Include 'ACS5includes:Van_~unctions.inc/nolist' Include 'ACS~includes:User vars.inc/nolist' Include 'ACS$includes:ACSstatus.inc/nolist' Include 'ACS$includes:ACSserv.inc' Include ~Acs~includes:TIserv.inc' Include 'Acs$includes:TIstatus.inc' Include '~CSSincludes:Manip params.inc' Include 'ACS$includes:Meas Params.inc' 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 Reali4 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 = Vss~_to_ascii_tlme( IntPger now , Character now ) C
C...Get the measured value ACS status = ACS_get_meas_var_type ( Block , Meas_var_type ) ACS_status - ACS get_meas var_num ( Block , Meas_var_num Measured_time stamp = 0 C...Measured Value is TPA PCS loop goal C

If ( Meas_var_type .eq. PCS TPA_~oop_goal ~ Then ACS_status = ACS_get_pcs_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 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... ..........lf PCS goal value not available, don't execute Block status(Block) = 'On-Err-PCS goal get' Write( 6, *) 'Feedback exit due to measured Yar ilor -~va 1 7~

write(6,*)' ACS BlocX: ',block,' at: ',Character_noW
Return End I f C

C... Measured Value is ACS blocX goal Else I~ ( Meas var type .eq. ACS block goal ) Then ACS status ~ ACS get 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 Block: ',blocX,' at: ',Character now Return End I f 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 ~easured_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 I f Van status z Vss$g curtime ( Meas var num , 1 Measured time stamp ) End I f C... .Check the Measured variable to see if it is within limits 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 z Measured value - Old measured value~Block) If ( Abs( Delta meas ) .lt.
1 Absolute_deadband(Block) ) Then Return End If 1~7~

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

Old measured value(Block) = ~easured value If ( Block status(Block)ll:13) .eq. 'On-deselected' ) Th~n Return End If C

C...Value is within limits - ComputP Feedforward Response Delta manip = Delta_meas * Proportional_gain~Block) C...Test Delta manip to see if too great C

If ~ Abs(Delta manip) .gt. Max_manip delta(Block) ) Then Delta_manip = Sign(Max manip delta(Block),Delta manip) End If 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...Target is TPA PCS loop goal C

If ( Manip_var type .eq. PCS TPA_Loop ) Then ACS status s ACS get pcs goal( 'TPA
1 Manip_var_num , Current manipulated value , ) If ( ACS S atus .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 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 ( ~anip var num , 1 Current manipulated_value ) If ( ACS Status .ne. ~loc(ACS_success) ) Then C.......... If ACS goal Value not available, don't execute 7S~

Block status(Block) = 'On-Err-ACS goal get' Return End I f C

C...Target is Vantage variable C
Else If ( Manip var_type .eq.
1 Vantage variable ) rhen Van Status = Geteuval ( Manip var num , 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 PMS;0 controller setpoint in -RD
C

Else If ( ( Manip_var type .ge. Low PM550 ) .and.
1 ( Manip_var_type .le. Hi=M550 ) ) Then If ( ~anip_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 If ( Manip var type .eq. CRD ESCHS PM550 02 ) Then ACS status = TI get loop setpolnt ( ITI PM550 02_PORT' , 1 ~anip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESCHS PM550 03 ) Then ACS status - TI get loop setpolnt ( 'TI PM550 03 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESC~S PM550 04 ) Then ACS status - TI get loop setpolnt ( ITI PM550 04 PORT' , 1 Manip var num , Current manipulated value ) Else If ( Manip var type .eq. CRD ESC~S PM550 05 ) Then ACS status = TI get loop setpoint ( ITI 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 ( ITI 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 ( ITI PM550 07 PORT' , 1 Manip var num , 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) = IOn-Err-TI setpnt get Write( 6, *) 1 I Feedforward exit - TI PM550 Manip var not accessible Write (6, *) I ACS Block: I,block,l at: I,now time Return End If ~lse ! Other Manip device type End If C...Calculate new manipulated value, check to see it within limits C

New manipulated value = Current Manipula~ed value ~ Delta mani C

If ( New manipulated value .gt. Manipulated max(Block) ) Then New manipulated value = Manipulated max(Block) Else If ( New manipulated value .lt. Manipulated min~Block) ) New manipulated value = Manipulated min(Block) End I~
Delta manip - New manipulated value - Current Manipulated valu C..~ Transmit the New Manipulated Value to the manipulated vari~ble C
C...Target is TPA PCS loop goal C

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,*3' ACS Block: ',block,' at: ',now time Retur~
End If C ...
C...Target is DMT PCS loop goal C

Else If ~ Manip var type .eq. PCS DMT loop ) Then AC5 status = ACS DUt pcs goal~ 'DMT ' , 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(~lock) = '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 C

Else If ( Manip var type .eq. ACS block ) Then ACS status = ACS put 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 Block status(Block) = 'On-Err-ACS goal put' Write( 6, ~) 'Feedback exit due to failed manip var put.

~7~

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

C...Target is Vantage variable C

Else If ( Manip var type ~eq.
1 Vantage variable ) Then Van status = Puteugen ( Manip var_num , 1 New manipulated value ) If ( Van Status .ne. %loc(vss success) ) Then C....... ......If Variable Value not availa~le, don't execute Block status(Block) = 'On-Err-Vant var put ' Write( 6, *) 'Feedback exit due to failed manip var ?ut.
Write(6,*)' ACS ~lock: ',block,' at: ',now time Return End If C

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

Else If ( ( Manip va- 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 put loop setpoint ( 'TI PM550 01 PORT' , 1 Manlp var num , New manipulated value ) Else If ( Manip_var type .eq. CRD ESCHS PM550 02 ) Then ACS status = TI put loop setpoint ( 'TI PM550 02 PORT' , 1 Manlp var num , New_manipulated value ) Else If ( Manip_var_type .eq. CRD ESCHS PM550 03 ) Then ACS status = TI ~ut loop setpoint t '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 put_loop_setpoint ( 'TI PM550 04 PORT' , 1 Manip var num , New manipulated value ) Else If ~ Manip vax type .eq. CRD ESCHS PMS50 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 ~ut_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 Manlp var num , New_manipulated value ) End I~
If ( ACS Status .ne~ %loc(TI success) ) Then C~ If PM~50 setpoint value not available, don't execute Block status(~lock) = 'On-Err-TI setpnt put' Write~ 6, ~) 1 ' Feedforward exit - TI PM550 Manip var not puttable.' Write (6, *) ' ACS Block: ',block,' at: ',now time Return End If 12~
Else I Other Manip device type End If C
C~ Load 6pecisl arrays for user programs to log me~sages.
C

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

C...If Delta is non-zero, update past actions C

If ( ~elta manip .ne. 0 ~ Then Do 90 J ~ 5,2,-1 Past action value(Block,J) = Past action value(Bloc~,J-l) 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

.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 ~t~tistical Filterin~ ~locks Figure 12 ~hows a sample of a template 812 presen-ted to the user by the build-supervisor procedure to define a statistical filtering block. In the specific example shown, the block being worked on is block number one 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 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 o~ rules to determine whether the sequence of measurements are statistically the ~ame as ("on aimn) or different from ("off aimn) the no~mal 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 ~he presently preferred e~bodiment, Shewhart blocks do not allow timing options to be specified. They perform their tests only when a new measurement is 2S 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 different from aim?
Were two of the l~st three points more than 2 sigma different from ~im in the same direction?
Were fuur of the lhst five points ~or~ than 1 sigma different from ai~ in the ~ame direction?
Were the last 6even points ~11 o~ ai~ on the same ~ide of aim?

~97~

The rules are tested in the order shown. For the second and third rules, ths test i5 first: applied to the last two (or four) points in a row, then to the last three (or five) points. If any rule is vislated, the process is off aim, and a deviation frsm aim is calculated by averaging the poin~s which broke the rule. For exanpie, 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 interval can be specified (in field 1226), so that, if one of the Shewhart tests shows a rule violation, Shewhart tests wili 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.
5pecifying a "Shewhart" (i.e. statistical filtering) block on the block setup selection form ~75~.

(Figure 93 brings up the Shewhart block setup o~m shown in Figure 12.

~a The parameters shown on this form include:
Filtered variable type: a num~er code representing the software system and the type of entity which the block should use for the filter@d variable.
Filtered variable number: the number of the entity within the specified syst2m which the blocX will use for the ~iltered 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 variable 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~5~
the deviation variable number is entered, other information will be automatically filled in by the build-supervisor procedure; in the example of Figure 12, region 1236 indicates the pre-stored de~ignation of historical database variable 2084. Such automatically completed info~ation will preferably includ~ the name and units for the deviation variable; units ~nd default values for the max and min deviation values Since Shewhart blocks execute on entrv of new data into the filtered variable, only discretely stored deviatior.
variable types can be used.
Rule variable type: a number cod_ representing the software system and the type of entity into which the block should store a number code indicating which rule was broken.
Rule variable numbex: 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 number 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 aimU 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 ~re ~ j~>~r~7S~

ignored. The fix time is entered as a delta time character string: "ddd hh:mm:ss" where "ddd" is the number of days, "hh" is the number of hours, "m~" is the number of minutes, and "ss" is the number of seconds.
The fix time is taken from the timestamp of th~ filtered variable value which caused the deviation to be identified. The timestamp of later 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 tne 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 ~alue falls outside these limits, the value will be ignored and no action is taken.
Action log file: this field is described above .

~lock 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 further calcula~ions.
- Search backward through the stored values of the deviation variable for the most recent non-zero ~375~i~

value. If a non-zero value is fsund within one ~ix time interval before the present instant, do no further calculations.
- Compute the cutoff time = time of last non-zero deviation plus the fix time.
- Initialize ~he deviation and rule values (to zero).
- Begin testing Shewhart rules:
* If the last point is older than t]le 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 1QSS than aim - sigma, then Deviation = Sum~last 4 points)/4 - Aim Rule = 5 S~ip remaining rules.

75~ ~.

* If 4 of the last 5 points are all either greater than aim + sigma or less than aim -sigma, then:
Deviation - S~m(last 5 points)/5 - Aim ~ul~ -- 5 Skip remaining rules.
* If all of the last 7 points 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:
* lf the deviation is outside the allowable limits, set egual to the closest limit.
* Store the deviation value and rule value in the respective varlables. 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.

~7~5~

Table 4 C***********************~***~***
C Shewhart_block.for C
C

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

5ubroutine Shewhart block ( Bloc:kj C

Include 'ACS$includes:Block_parameters.inc/nolist' Include 'acs$includes:ACSserv.inc/nolist' Include 'acs~includes:ACSstatus.inc/nolist' Include 'ACS~includes:Van functions.inc~nolist' Include '~CSSincludes:Filter_params.inc/nolist' Includ~ 'ACS$includes:dev_params.inc/nolist' Include 'ACS5includes: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 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 Siqma 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 ~oints Parameter (Num_points = 7) Real*4 Point(Num Doints) Integer*4 Ti~es(Num_points) Character*18 Char kimes(Num ~oints) Integer~4 Num ~ointsl Parameter (Num pointsl = 8) ~ ~''.'7~

Real*4 Pointl(Num_pointsl) Inteyer~4 Timesl(Num_pointsl) Character*18 Char timesl(Num_polntsl) Real*4 Violation_value(l) Integer*4 Violation time(1) Integer*4 New st_time Inte~er*4 Oldest_time Integer*4 Buffer size Logical*l First_request Integer*4 Block_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~point C

C....Special case for 'On-deselected' status C

If ( ~lock_status(Block)(1:13) .eq. 'On-deselectedl ) Then Return End If C..Set the value of the local variables C

ACS_status z ACS_get_filtered_var_type(Block,filtered_variable Filtered variable = Measured_variable(Block) ACS_status = ACS_get_dev_var_type ( Block , deviation_variabl Deviation_variable = Manipulated_variable(Block) ACS_status = ACS get_rule_var_type ( Block , rule_variable_typ Rule_variable = New manipulated_variable(Block) Aim = Goal(81Ock) Sigma = Absolute_deadband(Block) Integer_fix_time = Fix_time(Block) C

Van_status = Vss$_from_ascii_time ( ' ' , Integer_now ) Van_status - Vss$_to_ascii_time ( Integer_now , now_time ) d Van_status = VssS to_ascii_time ( Integer_now , Store_time ) d write(6,202) ' Calling Shewhart on var ',filtered_variable,' a d 1 Store_time d 202 format(//,a,' ',i5,' ',a,' ',a) C...Retrieve enough points to test all the rules If ( Filtered variable type .eq. Van_var_filter ) Then Newest_time = Integer_now Oldest_time = Newest_time - 365*24*60*60 ~J~S~i~

Buffer_size ~ Num Points First_request - .True.
Num Points-retrieved = O
Start_point = 1 C

Do 777 j = l,Num_points Times(j) = O
777 Point(;) - 0.0 C

Van status = ~loc(vss_systemdow~) Do While ( (Van _status .eq. ~loc(vss_systemdown)) .or.
1 (Van status .eq. ~loc(vss unavaildataj) ) Van_status = Vss$ Retrieve ( Filtered variable , Newest_ti~
1 -Oldest_time , Buffer size , Times(start point) , 1 Point(Start point) , 1 First_request , BlocX_location , Entry count , 1 hegin_span_status , Interp flags , Begin span time , 1 End span_time ) Num Points retrieved = Num Doints_retrieved + Entry_count If ( Num_points_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.' 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 ~' ',alB,' ',fl2.4 , / ) d write(6,i) ' Got ',Num points_retrieved,' points.' If ( Num Points retrieved .lt. Num Points ) then ~rite(Error lun,*) 1 'Shewhart Failed to get enough data on Variable ', 1 Filtered variable write(error_lun,*)'from ACS blocX:',block,' at:',now time Write(Error lun,*) 'Wanted ',Num Points,'; Got ', 1 Num Polnts retrieved ~eturn End If d write(6,*) 'Got enough points.' C
C....Check the Measured variable to see if it is within limits C

Last filtered value = Point(1) If ~ (Last filtered value .lt. Measured min(block) ) .or.
1 (Last_filtered_value .gt. Measured_max(block) ) ) T
C..... Reject the da~a point 3L'.~5~

Write( 6, *) 'Shewhart exit due to out of limts filtered.' write(6,*)' ACS ~lock: ',block,' at: ',now time Return End if Else if ( Filtered_variable type .eq. Van run 2 filter ) Then C

Newest time = In~eger now Oldest time = Newest time - 355*24*60~60 Buffer size = Num polntsl First request - .True.
Num Points retrieved = 0 Start_point = 1 C

Do 1777 j = l,Num pointsl 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 ) c Yan_status = VssS Retrieve ( Filtered variable , Newest_tim 1 Oldest_time , Buffer_size , Timesl~start Point) , 1 Pointl(Start point) , 1 First request , ~lock 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_ratrieved Start Point = Start point + Entry count End If d write(6,*) 'Finished data retr.' c End Do c 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 timesl(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 pointsl ) 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 Pointsl,'; Got ', 1 Num points_retrieved Return End If d write(6,*) 'Got enough points.' ~f7~

C....Check the Measured variable 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 maxSblock) ) ) T
C...~.Reject the data point Write( 5, *) 'Shewhart exit due to out of limts filtered.' write(6,*)' ACS Block: ',block,' at: ',now time Return End if C

Do j = 1,num ~oints ! running avera~e point(;) - (pointl(j)+pointl(j+l))/2 times(;) - timesl(j end do Else ! Improper Piltered type Write( 6, *) 'Shewhart exit due to invalid filtered var ype.' write(6,*)' ACS Block: ',block,' at: ',now time Return End If ! Filtered types 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 = l First request = .True.
Need violation = .True.
Do While ( Need violation ) Van status = VssS Retrieve ( Deviation variable , Newest ti l Oldest time , Buffer size , Violation time , l Violation value , 1 First_request , Block location , Entry count , l Besin span status , Interp_flags , Begin span_time , l End span time ) If ( ( Van status .ne. %loc(vss systemdown) ) .and.
l ( Van status .ne. ~loc(vss unavaildata)) .and.
l ( Van status .ne. ~loc~vss notallfound)) ) Then Write(6,*)' Shewhart Violation retr - status vss_badva write(6,*)' ACS Block: ',block,' at: ',now time ~'?r~,5~

Else I~ ( Van status . eq. 96loc (Vss badtime) ) then Write(6,*) ' Shewhart Vio:Lation retr - status vss badti write(6,~) ' ACS Block: ' ,block, ' at: ' ,now time c l:lse If ( Yan status . e~ %loc (Vss badtimespan) ) then ~ rite(6,*) ' Shewhar~ Violation retr - s vss badtimespan' write(6,*3 ' ACS 810c~: ',block,' at: ', now_ time Else If ( Van_status .eq. %loc(Vss_badbufsize) ) then Write(6,*) ' Shewhart Violation retr - status vss_badbu write(6,*) ' ACS Block: ',block,' at: ',now_ time Else If ( Van status .eq. 96loc(Vss normal) ) then Write(6,~) ' Shewhart Violation retr - status vss_nor;~a write(6,*) ' ACS Block: ',block,' at: ' ,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 Else If ( Van_status . eq. %loc (Vss nomoreonline) ) then Write ( 6, *) ' Shewhart Violation retr - s vss _ nomoreonline ' write(6,*)' ACS Block: ',block,' at: ' ,now_time End If WRite(6,*) ' Van_status = ' ,Van_status Van status = VssS_to ascii_time ( Violation time(l), Stor Write (Error _ lun, *) 'Shewhart-couldn' 't get a non zero deviation - exiting' write(6,*) ' ACS Block: ' ,block,' at: ' ,now_time Write ( Error _ 1un, * ) ' Oldest vlolation got: ' ,Violation_value(l), ' at ' ,Store_ Return End I f If ( ( Abs(Violation_value(l) ) .gt. 1.0 E-10 ) .or.
( Violation _ time ( l) . lt .
(Times(7) - A}~s( Integer_fix time ))) ) Then Need violation = . False End I f c End Do Else ! Improper deviation var type ~rite( 6, *) 'Shewhart exit due to invalid deviation var type write(6, *) ' ACS 810ck: ' ,block, ' at: ' ,now_time Return End If ! Get last deviation for allowed deviation types c ~ f~ ~

d Van status = Vss$ to ascii time ( Violation time(1) , Store_ti d write(6,~) ' Got a violation of ',Violation value(l),' at ' d 1 Store time C

C... ..Go through the shewhart Rules any point older than the last vio C time + the fix time i5 not accepta~le.
Cutoff time = Violation time(1) + Abs(Integer fix time) d Van status - Vss~_ to ascii time ( Cutoff_time , Store time ) d write(6,*) ' Cuto~f time is ', Store time Deviation = 0.0 Rule - 0.0 If ( Times(1) .lt. Cutoff time ) Return d writs(error lun,*) 'Te~ting l out of 1 rule.' If ( A~s(Point(1)-Aim) .gt. 3*Sigma ) Then Deviation = Point(1) - Aim Rule a 1. 0 Go To lOOO
End if ' C
C.... Test 2 in a row outside 2 sigma If ( Times(2) .lt. Cutoff time ) Go To 1000 d write(error lun,*) 'Testing 2 out of 2 rule.' Sum ~oints = 0.0 Num out_high = O
Num out low - O
Do 2 J - 1,2 Sum ~oints = Sum Points + Point(J) If ( (Point(J)-Aim) .gt. 2*Sigma ) Then Num out high = Num out high +l Else If ( (Point(J)-Alm) .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 ) Go To lOOO
d write(error lun,*) 'Testing 2 out of 3 rule.' Sum Points - Sum_points + Point(3) If ( (Point(3)-Aim) .gt. 2*Sigma ) Then 37~5~

Num out high - Num out_high +l Else If ( (Point(3)-Aim~ . -2*Sigma ) Then Num_out low = Num out low ~ 1 ~nd If If ( ( Num out high .eq. 2 ) .or.
1 ( Num out low .~q. 2 ) ) Then Devi~tion - Sum points/3 - Aim Rule ~ 3.0 Co To 1000 End If C

C... Test 4 in a row outside 1 sigma If ( Times(4) .lt. Cutoff time ) Go To 1000 d write(error lun,*~ 'Testing 4 out of 4 rule.
Sum ~oint~ - 0.0 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 Points - Sum Points + Point(5) If ( (Point(5)-Aim) .gt. l*Sigma ) Then Num out high = Num out high +l Else If ( (Point(5)-Aim) .lt. -l*Sigma ) Then Num out low = 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 Test 7 in a row - same side of aim C

. , 7.~

If ( Times(7~ .lt. Cutoff_time ) ~o To 1000 d write(error_lun,*) 'Testing 7 in a row rule.' Sum Doints ~ O.O
Sign deviation - Sign( 1.0,(Aim-Poin~(l)) ) If ( (Aim-Point(l)) .ne. 0~ Then All same sign = .True.
else All same ~ign = .False.
End if Do 4 J = 1,7 If ( (Aim-Point(J)) .eq. O) Then All same sign = .False.
Else If ( Slgn( l.O,~Aim-Point(J)) ) .ne. Si~n deviation ) All same_sign = .False.
End if 4 Sum_points = Sum_points + ~oint(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 ',deviation,rule C

C...Clamp the deviation at allowed limits If ( Deviation .gt. Manipulated_max(Block) ) Then Deviation = Manipulated_max(Block) Else If ( Deviation .lt. Manipulated_min(Block) ) Then Devi2tion - Manipulated_min(Block) End If C...Store the Computed Deviation and Rule number with Timestamp d Van status = Vss$ to ascii_time ( Times(l) , 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 - Dmt~_putlab ( I4 deviation variable , Times(1) , 1 Deviation , 2 , .False. ) Else ! Other deviation types End If ! Deviation types c d write(6,*) ' Did putlabs -first status = ',dmt status d write(6,*) 'putting var ',i4_rule variable,' a~ ',store time, d 1' with value ',rule If ( Rule variable type .eq. Van var_rule ) Then I4 rule variable - rule variable ~mt status - Dmt$_putlab ( I4_r~le_variable , Times(l) , l 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 -second status = ',dmt status d write(6,*) ' Did putlabs -exiting' C... If Deviation is non-zero, update past actions C

If ( Deviation .ne. o ) Then Do 90 J = 5,2,-l Past action value(Block,J) = Past action value(~lock,J-l~
Past action time (Block,J) = Past_action_time (Block,J-l) Past action_value~Block,l) = Deviation Past action time (Block,l) = Times(l) End If C

C...Load user arrays for user programs User_integer(l) = Integer now ! Time of Tests User integer(2) = Rule User real(l) - Deviation Do J - 1 , Max ( Num Points , 18 ) User integer(2+J) = Times(J) ! Time of samples 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(l) ~ 'On aim, No rules broken ' User character(2) - 'On aim, No rules ~roken.' Else If ( Rule .eq. l.O ) Then User character(l) ~ 'Shewhart 1 out of 1 rule' User character(2) ~ 'Shoe heart l out of l rule' Else If ( Rule .eq. 3.0 ) Then User character(l) - 'Shewhart 2 out of 3 rule' User_character(23 ~ 'Shoe heart 2 out of 3 rule' ~lse If ( Rule .eq. 5.0 ) Then User character(l) G ~ Shewhart 4 out of 5 rule' ~ser c~aracter(2) c 'Shoe heart 4 out of 5 rule' Else If ( Rule .eq. 7.0 ) Then ~ser character(1) - 'Shewhart 7 in a row rule' User_char~cter(2) - 'Shoe heart 7 in a row rule' End If C...Call User r~utine C~ll User Programs ( Block ) Return End Copyright (c) 1987 E.I. DuPont de Nemours & Co.
all rights reserved 1~7~

User-pefined Proaram Block Figure 13 shows the form which (in the presently preferred e~bodiment) is presented to a user who has chosen the "User progxam" option from the menu shown in Figure 3.
The user program block provides a means of controlling the execution of a user written FORTRAN
subroutine. The block itsel~ performs no control actions, but allows the user to specify a timing option and switch parameters for executing the block's user routine. ~ user routine exists for every block in the super~isor procedure. (In the example shown in Figure 13, where the block shown is block number 2, the block will (selectively) make calls to BLOCK2_USER_ROUTINE.) Initially these routines (BLOCKl USER_ROUTINE, BLOCK2_USER ROUTINE, B~OCK3_USER_ROUTINE, etc.) do nothing ( ie., their default content is merely the FORTRAN statements Return and End), but they can be modified by the user. The user program block 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 ~ields 1332 and 1334), so that measured values outside ~he screening limits are ignored. Block timing and switching and the block description fields follow the ge~eral outlines given above.

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.

~7~

Measured variable number: the number o~ the entity within the specified system which the block will use for the msasured variable. For example, if the measured variable type is a historical database 5variable, 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 10will 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 Rey block number: these parameters are described above.
15Switch 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 20variable value falls outside these limits, the value will be ignored and no action is taken.
Action log file: this field i5 described above.

Proaram Block O~eration 25The sequence of actions performed by a User program block is:
- If bloc~ status is "On-deselected", do not execute the user routine.
- If a measured variable is specified:
30* 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~

~75~1 status to "On-msrd out of lims~ and do not execute the user routine.
- Execute the user routine. The routine name is derived from ~he block nu~er. Block 1 calls Bl o ck l_u ser routine, b lock 199 calls 810ckl99 user routine, etc.
- If a fatal error occurs in the user routine, bypass the rest of the routine, and set the block status to "On-Failed usr routin"~
- I~ 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.

lS - Build-User-Proaram 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 customizsd 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.

At a minimum, a user with no programming knowledge can insert a one-line call into a user program block, ~o make use of an expert subprocedul-e created using the build-expert procedure. Howsver, to take full advantage of the capability for user progra~ing, the user should (in the presently preferred embodiment~ already be comfortable programming in FORTRAN and using FORTRAN
functions and su~routines, and in using the Vax ~DT
editor. The build-user-program environ~ent 1810 in this embodiment is menu driven rather than forms driven, and therefore provides less online help than some of the o~her ~unctions 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 block user routine; check the block user routine for errors in FORTRAN 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 wants to work on. En~ering the block number and pressing return brings up another program menu, with options which will now be descri~ed.
Editing the user routinP begins by selecting menu option 1 ("Edit user routine"). This will start the EDT
editor. User routines of some sort already exist for all the blocks. Blocks which have never had any special programming have a user routine which does nothing - it consists simply of a RETURN 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. tIn the presently preferred embodiment, the user can simply edit the file 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 ~ewly 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.

~,~i7~

After compiling the user's rsutine, 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 separa~e files.
To make a routine in a sPparate file, the user can select option 2 ("Edit a separate FORTRAN subroutine") to create and modi~y ;he file, and then select option 6 ("Check a separate subroutine for FORTRAN errors") to check for FORT~AN errors. To include the separate file into the supervisor procedure, the user can use the update option, then answer l-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 exec~ltes 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 ~ser 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 5ystem functions screen.
The user can prin a listing of a user routine by using option 3 (or op~ion 4 for a separate routine).

7~
If the user's usex routine fails and the user needs to retreat to the last version that was running, he can use the res~ore option (keyp~d 9). This will prompt the user for any separate routines that need to be restored, and retrieve the old versions saved by the build-supervisor procedure.
In the presently preferred embodiment, there are several include files which can be used in user routines: "U er vars.inc" contains a common bloc~ which is used to pass in~ormation about control 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 feedhack block, 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 values.
Of course, many different computer languages and architectures could be used in practising the present invention: the sample FORTRAN 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.

75~

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 kexpad 9 when faced with the menu ~hown in Fi~ure 16). While these utilities are not necessary parts of every implementation of the innovative concepts described in the present application, they ds 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 paramet rs. Deleting a block (Keypad 7) removes all the block type and setup parameter data for the block, leaving it available for another use. Copying a block (Keypad 8) reproduces the block type and setup p~rameters of one block into another. Printing blocks (Xeypad 9) allow the user to select blocks to be printed either by number range or by searching ~or string matches in the application name or block description fields, and makes full or abbreviated listings of block parameter data on ~he 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. The 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-supervisor 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 ~5 and parameters are overwritten in the shared memory 814.

7 ~

After the block is copied, the build-supervisor procedure prompts the user again, asking whether the ssurce block should be deleted or left unchanged. The build-supervisor procedure confirms that the source block was either deleted or not deleted.
Block information can only b~e copied into target blocks whose status is 'lOffl- or "Inactive". To copy information into a blsck 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 integr,ty.
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 block. 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. ~
block will be selected to print if the string the user enters appears anywhere in the searched field.

375~

~he build-supervisor procedure will now prompt the u er for a ~hort or lo~y list. A short list shows only the block number, type, description, and application name. A long list show the entire setup ~or~ for tha~
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 n~mber of the printer if he knows it, or enter L to get a list of printers to choose 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);

X~i7~

- the block type (which was specified during block setup, e.q. feedforward, feedback, etc.);
- the block description (which was entPred during setup);
- the type, number, name and units o~ the measured variable which was specified in block setup (if none was specified (e.g 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 re~eived, for manual entry variables it is the tlme 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 the 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 blo~ks, the last five deviation values) and the times at which they occurred.

s~

In th~ presently preferred embodiments, a ~imilar overhead ~unction permits the user to take a look at the current status of key system parameters, including:
- Base scan inter~al: the time interval at 5which the ~ase cycle procedure scans through all the properly configured blocks, checking for changes in the on/of~ status, testing each açcording 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 prosedure 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 is waiting for the next scan.
* Running-Computing : the system is currently performing block checks and executing blocks.
Z5Since 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 5~l other control systems), restart the supervisor process (3nd any auxiliary processes), or view the log file to which the base cycle procedure writes error reports and messages.

Block Initialization Blocks are initialized when they are first turned on, or when the supervisor procedure is restarted after an outage of 39 minutes or more and the block had already been on. Block initialization sets the "last execution time'' of the block to the current time. ~he "last execution time" value is used in fixed interval timing and also as a blocX 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.

Eyild-ExDer~ ~nd E~P~ ocedures The procedures for constructlng an expert 6y5tem from ~ domain expert's knowledge will now be described, together with the procedures by which the expert system is called up by the operating software (preferahly the process control supervisor procedure, as described above).
It should be noted that the structures and adva~tages of the build-expert procedure are not entirely separate from ~hose of the expert procedure (or procedures) generated thereby. The two procedures are prefer~bly operated 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 especially ~0 advantageously as an integral part 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, and lso provides c~llabl~ routines that can be used by these subroutines to make and modify supervisor actions.
The build-exp~rt procedure can be used without the preferred supervisor procedure, but t~e user must provide a host program running ~t appropriate times to call the subroutines.

37~

~xe~F~ed ~eau ~tructure In the presently preferred el~odiment, the build-expert procedure is accessed by selecting the "User programl' 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~ pre~ents a menu as shown in Figure 17.
From this menu the user can access setup templates for the 3 rule t~pes. 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 dif~erent from the build-supervisor procedure in the way it handles data. When a rule name ZO 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 ~5 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 ~-0 only fields on the rule templates for which the user's entry i5 checked immediately (others may be modified in the future to do this). The remaining fields can be filled in with any data that the template allsws (some fields accept only integers, some only alphabetics, 3~ etc). The data on the remaining fields is tested only 7~

when the user presses the keypad "-" to store the rule.
The build-expert procedure then examines the data for errors, and requests corrections if needed. The build-expert procedure always checks rule na~es (and condition S names~ to be sure they are valid and meaningful where entered. In the presently preferred embodiment, 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 i5 NOT 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) softXey. 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 generated 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 na~e 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 .

~,? ~

Standardized Data Ir~.ace The build-expert proc:edure uses a ~;tandard data interface. In the presently preferred embodiment, data so~rces are specifi~d by a pair of integer parameters.
One, the "data type", is a coded value which identifies the type of data desired and the data collection system from which the data ls 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 provides a simple method of data identification in a many-sys~em environment. Secondly, it allows the rules 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, ~ny supervisor process (whether runni~g 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 gener~tes dat~ ("computer" being defined v e r Y broadly t~
include, e.G., any ~ystem which includes a microprocessor, such as a microprocessor based single loop controller).
In the presently preferred embodiment, the data types allowed by the build expert procedure are: 1~ the latest vslue o~ ~ dat~base varinble; 2) ~ time weighted ~verage over ~ given time interval of ~he value of a d~t~base v~riable; 3) a ~impl~ average over a given time interval o~ the digcrete data values of ~ d~tab~se Yarlabl~s 43 the ~aedback error o~ a feedback block in the ~upervisor process; 5) the change in the v~lue of the ~easure~ ~ri~bl~ o~ n superv~sor feed~orward block since the last time the blocX acted; 6~,7) the goal values of control loops in two particular lower level control systems; 8) the second most recent value of a discretely sample process database variable; 9),10) the S maximum and minimum limits for tAe manipulated variable value in a supe~isor control block. Other sources could be used, for example any kind cf parame~er from any of the systems named in the previous paragraph, or system lexical functions ~such as the system clocX). As a further alterna~ive, it migh~ 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 tne 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 n~mber. 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 Ex~ert Svstem 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 be true. For example, WHILE the '75~

composition of water in the Feed mix drum is greater than 12%, we say "FEED MIX WATER COMPOSITION" is "HIG~".
Or, WHILE "FEED MIX WATE~ COMPOS~:TION" is "~IG~", AND
"DEHY COLUMN BOTTOMS WATER" is "HIGH", we say "TOTAL
SYSTEM WATER" is "TOO HIGH". WHILE "TOTAL SYST~M WATER"
is "TOO HIG~", 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~UE ~12%) o~
a process measurement (FEED MIX WATER), and assigns a value (~IGH, LOW, etc.) d~scribing the condition oE 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 (TOO
HI5H) describing that condition. The sample action rule described tests for one specific condition (TOTAL SYSTEM
WATER) has one specific value (TOO HIGH), and takes a specified action (Give a high water warning message~.

Sam~le Expert Svstem An example o~ construction of an expert system using novel methods and system as set farth in the present application will now be described in detail.
The sample system here chooses an optimum control action 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 reboilers. The first, the Xylene column, dumps the ~team energy to cooling water. The second column, the MFB column, recovers most of the energy by generating 75~3~

steam overhead. Equipment limitations constrain both steam flows to within high and lo~ limits.
A5 column feed rate varies, steam loading can change from minimum steam on both columns to maximum steam on both columns. The optimum operation maximizes steam on the low cost column (MFB~ and minimizes steam on the high cost colu~n (XYL).
In this example, control of the MFB composition is done statistic~lly. The laboratory measurements of MFB
are statistically tested using Shewhart tests. The Shewhart tests dete~mine the on aim status of MFB: Off aim high, Off aim low, or on aim. When MFB is off aim, the Shewhar~ test generates 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 sPem like a trivial decision, it actually involves considering 3 variables in ~he correct sequence. This is where the "expertise" gets into the "expert" syste~. Developing the logic is the task of the human expert, and the system disclosed herein merely expedites the transfer o~ that logic into the expert ~ystem. The process control decision tree which will be 7~

implemented, in the sample embodiment described, is as follows: First, decide whether to add or cut stQ3m:
(1) If adding steam:
(1.13 First check the MFB column. If ~FB
column steam below maximum, add steam here.
(1.2) If the MFB column steam is maximum, then (1.2.1) Check the Xylene solumn. If xylene column steam is below the maximum, add steam here.
(1.2.2) ~f xylene column steam is maximum, the user cannot add steam. To get MF8 on aim, feed to the column must reduced. Cut column feed.
(2) If cutting steam:
~2.1) First, check the xylene column. If xylene column steam is above the minimum, cut steam here.
(2.2) If xylene column steam is 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 steam. 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 expert 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 reach~d, so that there would not be a reproducible basis for action.

5~L
Domain exp~rt~, in p~rfo~ming *he analytical steps which the expert ~ystem should ideally emulate, will carry out many ~teps implicitly; but impl~menting a process in a computer requires that each 6tep b~
expressly ~pelled out. ~o make the decision, the usPr must first specify:
- what measurements will be used to evaluate the process condition (in this example, HFB STEAM, XYL STEAM, DIRECTION_OF_CHANGE);
lo - what ranges of values of the measurements (e.q. ~o > XYL STEAM) match what status values for th~
measurements (~g_MID RANGE);
- wha~ 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 conditions (e.q. ACTION is CHANGE XYL STEAM);
- what must bedone to make the desired action happen.
The det~iled specifications needed to handle this problem are defined as follows:
Measurements: For MFB column ~team, the goal on the computer loop for MFB steam is a good measure. In the sample ~yste~ referred to, this is loop 30 in the "DMT PCS" syste~. For xylene column ~tea~, ~he goal on the computer loop is a good measure. In th~ sample system referred to, this is loop S 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 ~tea~ (in thi~ case, the third block in the ~upervisor procedure). For MFH column steam, we Xnow the oper~ting limit~ of gtea~ flow to the column Sin t~ou~nds o~ pounds per hour (MPPH)~:
MA~ > 49.5;
~IN < 28.S;
~ID > 28.5 c 49.S.
~38 7~
~d for the xylene c:olum~:
~AX ~ 6 6 . 5 MIN < 4 0 . 5 PlID > 40.5 < 66.5.
For the direction o~ action, we know that an of f im high condition means a steam increase. O~lr feedback block (in the supervisor procedure) is using the Shewhart devlation from aim as the measured variable, with an aim of 0 . 0 . Thus iî the feed}: ack error is positive, we increase steam:
ADD if Feedback error > 0 CUT if Feedback error < 0 or = 0 For the analysis of these conditions, we need to specify what corrbinations of conditions lead to what result . This expert provides only one result: it def ines what the ~anipulated variable will be - xylene column steam ( "xyl col steam" ), MFB column steam ( "MFB col steam" ), or column feed ( "column feed" ) . This lo~ic results in the following ruleso Table 5 MANIPULATED VARIABLE is MFB COLUMN STEAM While Direction of change is ADD
and MFB COL STEAM is not MAX

MANIPUI~TED VARIABLE is XYL COLUMN STEAM While _ Direction of change is ADD
and MFB COL STEAM is MAX
and XYL COL STEAM is not MAX

MANIPULATED VARIABI,E is COLUMN FEED While Direction of change is ADD
3 0 and MFB COL STEAM is MAX
and XYL COL STEAM is ~X

~,t~S~i~

MANIPULATED V~RI~BLE is XY~ COLUMN STEAM While Direction of change is CUT
and XYL COL STEAM is not MIN

M~NIPULATED VARI~BI,E is MFB COLU~l_STEA~ while ~ire tion_of_change is CUT
and XYL COL STEAM is MIN
and MFB COL_STEAM is not MIN

MANIPULATED VARIABLE îs COLUMN_FEED While Direction of change 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 ~OT
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 (i.e. the second and fourth both set MANIPULATED
VARIABLE to X~L COL STEAM, under different conditions).
By 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 MF8 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 FORT~AN callable function named ACS SELECT BLOCX, which allows only one block out of a set to take action. The others are "de-selected" and ~ ~75~

stand ready to act if selected. When ACS select_block is called, the first block number in the argument list b~comes selected, the others are deselected. Trailing zeros are ignored.
Thus, to enable the expert being built to change the control strategy, the followi~q rules are added :~
the rule set:

While MANIPULATED VARIABLE is XYL_COL_STEAM Then do the FORTRAN statement~
ACS_status = ACS select_block ( 3, 4, 5, O, O, ' , While MANIPULATED VARIABLE isMFB_COL_STEAM Then do the FORTRAN statement:
ACS status = ACS_select_block ( 4, 3, 5, O, 0, O ) While MANIPULATED VARIAELE isCOLUMN FEED Then do the FORTRAN statement:
ACS status - ACS select_block ( 5, 3, 4, O, O, 0 ) 2C 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 FORTRAN
subroutine Blockn_expert system (where n is the block number, i.e. the subroutines will be named BLOCX2 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).

~r~ e ~ e This sample embodiment provides an example which ~ay help clarify what an expert procedure does. Some more general teachings regarding expert system methods and structure will now be set forth.
Figure 2 is a schematic representation of the organization pre~erably 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 retrieval rules 210 each will retrieve one or more quantitative inputs (which may be, e.~., sensor data 157 from one of the sensors 156, historical data 141 and/or laboratory measurements 152 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 networkinq, 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 rules") will name one quantitative value (which may optionally be derived from several independently accessed quantitative inputs), and assign one o~ a predetermined set of descriptors (variable 6tatus valu~s 222) to that name. Each of the more complex retrieval rules (referred to as "calculation rules") permits descriptors to be assigned selectively 1-?~ 7~

to a name in accordance with one or more calculated values (which may optionally be derived from a number of quantitative variables).
Figure 3 shows the template used ~or a retrieYal rule in the presently preferred embodiment, together with a sample of a retrieval rule 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 oan modify, and which are preferably highlighted to the user in some fashion, e.q.
by showing them in reverse video. In tnis 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 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 STEAM AGE" will be an integer variable representing the age of the quantitative value originally retrieved;

"XYLENE_COLUMN_STEAM_ASTAT" will be a character variable which is defined to have values of "TOO OLD" or "OX," depending on whether the age value is within limits (note, for example, that this variable could easily be configured as a logical variable instead);
and 'IX'~LENE_COLUMN STEAM 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 in at least two of the classification blanks. Ho~ever, in the presently preferred embodiment, only five classification ranges are permitted. ~This limit could he changed, but there are significant advantages to permitting the user to input only a restricted number of ranges. Where the process control algorithm absolutely demands that the variable be classified into more ranges, two or more procsss variable rules could be used to label up to eight or ZO more ranges.) Another constraint used in the presently preferred embodiment i5 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 ~0 is permitted to be added to the rule base.
Figure 4 shows an example of 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 specify up to ten quantitative inputs, of any of the ~,,?~ Y~

types just referred to, as well as up to ten values arithmetically derived from thes~ inputs (or constants).
By having some of the derived values refer back ~o other ones that are derived values, quite complQx formulas may be implemented. (One advantageous use of such fo~mulas may be to relate off-line time-stamped laboratory measurements with the continuously-measured values of the same (past) time era, e.a. in a component material balance.) Moreover, notice tha~ 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 retrieval 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 o~ the com-parisons either tests a retrieval rule name to see i~ a certain variable status value 212 was assigned by that rule, or tests an analysis condition name to see if a 7~

certain analysis status value 222 was assigned by one of the analysis rules. That is, as seen s~hematically 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 rule could be sequenced so that there would never be any open-ended recursions, but in the presently preferred embodiment this extra constraint is not imposed.
Any one analysis condition name may (under varlous 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 cequence 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 ~7~

the same analysis status value 222 to the same analysis condition name, under different circumstances.
It can ~e advantageous, 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 miqht be named "COLU~ oP NORMAL."

Action Rules Figure 6 shows the presently preferred embodim~nt 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 indicated by dashed boxes.
The user has chosen to name this particular action rule "Change Xylene Steam," which the build-expert software has translated into CH~NGE 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, so 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 the 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 21~ as well as to an analysis status value 222~
Thus, in the presently preferred emhodiment the action rules embody an absolute minimum of logic. They ~,f~7S~il are used primarily as a translation from descriptive Xey words emhedded within the inference chaining structure to the actual executable statements (or command procedures) which specify the action to be taken. Thus, one way to think about th~ advantages of the expert system organization 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 lansuage 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 th~ 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 ~et.
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 block whose number is given first, and turn off all other blocks whose nu~bers are given. Thus, the statement acs status - acs select block (3, 4, 5, O, O, O) 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-deselected." Thus, when the expert system has completed running, the supervi~or procedure which called the expert procedure as a subroutine can selectively execute block functions depending on the values passed back to it by the subroutine.
Thus, the action rules permit a very large variety of actions to be performed. Eor example, one optional alternative embodiment provides synthetic-speech output;
optionally this can be combined with a telephone connection, to permit dial-out alert messages te.a. to a telephone number which may be selected depending on the time of day shown by the system cloc~, 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 ExDert 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.

~37~

As a result of the constraints 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-equivalent tests, string-append operations, logical-equivalence tests, arithmetic operations, and fetches.
Preferably three passes are performed: the first does appropriate character type declaratlons; 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 ~now" 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 2S which actually performs this function, in the presently preferred embodiment, is as follows.

5~

C**~****~***~*******~***~*~*******~**
c C Build expert.for -C Routine to generate FORTRAN expert system code using C the process rulebase.
C
C

C******~****~**~**~****~*~******~***,t*
C
5ubroutine Build expert C

Include 'pace~includes:Variable rule params.inc' Include 'pace$includes:Expert data.inc' Include 'paceSincludes:Analysis_commons.inc' Include 'pace$includes:Analysis rule.inc' Include 'pace$includes:Action_commons.inc' Include 'pace$includes:Action rule.inc' Include 'paceSincludes:Action params.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 Fdv$Putl(' 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

C...Get the name of the expert system code file, pick out the C subr name from it C

d Call Fdv~putl ( '~ill translate logicals.') Call Lib$sys trnlog ( 'PACE$RU~ES' ,, Directory ,,,) Call LibSsys trnlog ( 'PACE$CoDE' ,, Code dir file ,,,) d Call Fdv$putl ( 'Did translate logicals.') Istart = Index ( Code dir file, ']' ) ~ 5 ~ ~

Subroutine name = Code_dir_file(rstart+1:80)//Blank d Call FdvSputl ( 'Will get index of ".".') Iend = Index ~ Subroutine name, '.' ) d Call FdvSputl ( 'Will clip ~ubrout name.') If ( Iend .gt. 1 ) Then Subroutine name - Subroutine name(l:Iend-l)j/Blank Else Subroutine name - 'Expert'//Blank End If d Call FdvSputl ( 'Will trim subroutine name~') Call StrStrim ( Subroutine name, Subroutine name, Srlen ) d Write ( 6, 100 ) Subroutine name Write ( Code lun, 100 ) Subroutine name C
C... construct a sub-process name C

If ( Subroutine_name(l:5) .eq. 'BLOCX' ) Then d Call Fdv$putl('Is block.') d Call FdvSwait ( It ) Read ( Subroutine name(6:8), '(I3)' ,err= 91 ) Iblock d Call Fdv$putl~'Is > 99.') d Call Fdv$wait ( It ) Liblock = 3 Go To 93 91 Read ( 5ubroutine name(6:7), '(I2)' ,err- 92 ) Iblock d Call FdvSputl('Is > 9.') d Call FdvSwait ( It ) liblock = 2 Go To 93 92 Read ( Subroutine name(6:6), '(Il)' ,err= 93 ) Iblock d Call Fdv$putl('Is c 10.') d Call FdvSwait ( 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', /, 'C***********~*********************************.
1 'C' ~/~
1 'C Expert System Code',/, 1 'C', /~
1 'C*****~*****************************~*********',/, 1 'C', /~
1 ' Subroutine ', A, /, 1 'C', /, ,5~
1 ' Include "ACSSincludes:ACSserV.inc'' ' , / , l ' Include ''ACS~includes:ACSstatus.inc'' ' , / , 1 ' Include ''ACSSincludes:Sys functions.incl' ' , / , l ' Include " ~$Jpidef)'' ' , / , 1' Integer*4 VssS to ascii time' , / , 1 ' Integer This ~ass fires' , / , 1 ' Character*25 Unknown' , / , 1 ' Parameter ( Unknown = "Unknown '')' 1 ' Character*25 OK' , / , l ' Parameter ( OR = 'IOK )' , / , l ' Character*25 Too old' , / , l ' Paxameter ( Too old - ''Too old '')' l ' lnteger~4 Now' , / , 1 ' Integer*4 Then' , / , 1 ' Character*18 C_now' , / , 1 ' Int~ger~4 Itemlist(4)' , / , l ' Integer*2 Code(2~' , / , 1 ' Equivalence ( Itemlist(1) , Code(l) )' , / , 1 ' Integer*4 Mode' , / , 1 ' Integer~2 Len' , / , l ' Character*80 Line' , / , 1 'C' 1 ) d write(6,*) ' wrote header info.' C

C..Make declaration code for variable rules First = .True.
1 Continue C

C..Read A rule Call Read var rule Darams ( First , No more ) If ( No more ) Go To 200 C

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 ' , ~ astat' , / , 1 'C' 1 ) C

Go To 1 C

200 Continue 5~

C..Make declaration code for calculation rules Call Declare calc rules C..Make declaration code for analysis rules C
Last cond - ' First = .True.
C 2 Continue C..Read A rule Call Read anal rule_params ( First , No mor If ( No more ) Go To 201 C..Write out FORTRAN declarations Call Str$trim ( An_cond name , An_cond name , Len ~
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*1 ' , 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 arams ( Firs~ , No more ) If ( No more ) Go To 251 C..Write out FORTRAN declarations 5~ s~

Call Str$trim ( Ac rule name , Ac rule_name , Len ) Write ( Code lun , 262 ) Ac rule name(l:len) 262 Format ( 1 ' ~ogical~l ' , A , '_fired' , / , 1 'C' 1 ) Go To 252 C

251 Continue C
C...Now Write Initialization code C

Write ( Code lun , 401 ) Subroutine_name (l:Srlen) 401 Format ( 1 'C', /, 1 'C Initialize the status values.' , / , 1 'C' ~ / ~
1 ' Van status = Vss$ from_ascii_time ( " " , Now )' , /
1 ' Van_status = VssS_to ascii_time ( Now , C Now )' , / , 1 ' Code(l) = 4 ' , / , l ' Code(2) = jpiS mode' , / , 1 ' Itemlist(2) = %loc(Mode)' , / , l ' Itemlist(3) = ~loc(Len)' , / , 1 ' Itemlist(4) = 0' , / , 1 ' sys status = sysSgetjpiw ( ,,,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 r retrieve the necessary data for the rule.
First = .True.
402 Continue C
C..Read A rule C

Call Read var rule params ( First , No more ) If ( No more ) Go To 420 C

Call Str$trim ( Rule name , Rule name , Len ) Write ( Code lun , 403 ) ( Rule name(l:Len) , J =1,4 ) 403 Format ( 1 'C', / ~
1 'C....' , A , ' rule initialization' , / , 1 'C', / ~
1 ' ' , A , ' astat = Unknown' , / , ?~61 1 ' ' , A , ' stat = Unknown' , / , 1 ' ' , A , ' fired = .False.' C

If ( Ret meth .eq. Current_val ) Then Write ( code lun , 404 ) Var num , (~ule name(l:lenj,J=1,2) 404 Fo~mat ( 1 ' Call Get cur data ( ' , I4 , ' , ' , A , '_value , ' '_a~e 1 ) Else If ( Ret meth .eq. Discrete avg ) Then Write ( code_lun , 40; ) Ret time , Jar_n (Rule name(l:len),J=1,2) 405 Format ( 1 'C', / ~
1 ' Then = Now + ' , Il2 , / , 1 ' Call Get disc avg data ( ' , I4 , ' , ' , ~ value A , ' age , Then , Now )' 1 ) Else If ( Ret_meth .eq. Time wt avg ) Then Write ( code lun , 406 ) Ret time , Var_n (Rule name(l:len),J=1,2) 406 Format ( 1 'C', /, 1 ' Then = Now + ' , Il2 , / , 1 ' Call Get time wt avg data ( ' , I4 , ' , ' , A , ' val , A
, ' age , Then , Now )' 1 ) Else If ( Ret meth .eq. Sec last vant Point ) Then Write ( code lun , 411 ) Var_num , 1 Rule name(l:len) 411 Format ( 1 'C', /, 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) 407 Format ( 1 'C', /, 1 ' ACS status = ACS ~et FF delta ( ' , I4 , ' , ' , A , ' _ 1 ) Else If ( Ret meth .eq. ACS fb_error ) Then ~,? ~5~

Write ( code lun , 408 ) Var num , Rule name(l:len) 408 Format ( 1 'C', /, 1 ' ACS sta us = ACS get ~b error ( ' , I4 , 7 , ' , A , ' ) ' Else I ( Ret meth .eq. PCS DMT loop_goal ) Then Write ( code_lun , 409 ) Var num, Rule name(l~len) 409 Format ( 1 'C', /, 1 1 ACS status = ACS ~et_PCS_goal ( ''DMT '' , ' , 1 I , ' , ' , A , ' value )' 1 ) Else I ( 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 '' , I , 1 I , ' , ' , A , ' value )' 1 ) Else Write( Code_lun , * ) 'C....Bad retrieval method' End If C

Write ( Code_lun , ~10 ) (Rule_name(l:len),J=1,2) 510 Format ( 1 'd Write(6,*) '' ' , A , ' value = '' , ' , A , ' valuP' C

Go To 402 420 Continue C

C....Initialize calculation rules C

Call Init calc rules C

C....Initialize analysis rules C

Last cond = ' First = .True.
440 Continue C
C

C..Read A rule Call Read anal rule Params ( First , No_more ) If ( No more ) Go To 450 Call Str$trim ( An cond_name , An cond name , LRn ) Call Str$trim ( 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 440 75~.~
Last cond = An cond name Write ( Code lun , 442 ) ( An cond name(l:~en) , J =1,1 441 Format ( 1 'C', / ~
1 'C....' , A , ' rule initialization' , / , 1 'C', / ~
l ' ' , A , ' fired = .False.' 442 Format ( l ' ' , A , ' stat = Unknown' C
Go To 440 C

450 Continue C....Initialize action rules C

First = .True.
460 Continue C
C

C..Read A rule Call Read action rule Darams ( 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', / ~
l ' ' , A , ' fired = .False.' C

Go To 460 490 Continue C

500 Continue C

C...Write the rule code Write ( Code lun , 501 ) 501 Format ( 1 'C', / ~
1 ' l Continue' , / , 1 'C', / ~
1 , This ~ass fires = 0' , / , 1 ) C
C...Write out variable rule code C

First = .True. ~ 7 502 Continue C

C..Read A rule Call Read var rule ~arams ( Fir~;t , No more If ( No more ) Go To 600 Call Str$trim ( Rule name , Rule_name , Len ) If ( Age limit .eq. Empty ) Age limit = -365*24*60*60 Write ( Code lun , 299 ) ( R~lle name(l:len),J=1,3) , Abs(Age 1 ( Rule_name(l:len),J=l,2) 299 Format ~
1 'C', /, 1 'C....' , A , ' Rules ' , / , 1 'C', /, 1 ' 1 ( ' , A , ' astat .eq. Unknown ) .and. ' , / , 1 ' 1 ( ' , A , ' age .le. ' , I , ' ) ' , / , l ' 1 ) Then ' , / , 1 ' ' , A , ' astat = OK ' , / , 1 'd Write(6,*) ''' , A , '_age is OK.''' , / , l ' This pass_fires = This Dass_fires + l' , / , 1 ' End If' 1 ) Write ( Cade lun ,Fmt=298 ) ( Rule_name(l:len),J=1 Abs(Age limit) , l ( Rule name(l:len),J=1,2) 29B Format ( 1 'C', /, 1 ' If ( ' , / , 1 ' 1 ( ' , A , ' astat .eq. Unknown ) .and. ' , / , 1 ' 1 ~ ' , A , ' age .gt. ' , I , ' ) ' , / , l ' 1 ) Then ' , / , 1 ' ' , A , '_astat = Too old' , / , 1 'd Write(6,*) "' , A , ' age is Too old.''' , / , 1 ' This_pass fires = This pass_fires + l' , / , 1 ' End If' 1 ) Write( code lun , 50S ) (Rule_name(l:len),J=1,3) , Log_opl , 1 Rule name(l:len) , Statusl , Rule name(l:len) , 1 Statusl , Rule_namP(l:l~n) 505 Format ( 1 'C', / ~

1, ,~75~1 1 ' 1 ( .not. ' , A , ' fired ) .and. ' , / , 1 ' 1 ( ' , A , '_astat .,eq. OK ) .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 ' E~d If' 1 ) Write( code lun , 506 ) (Rule name(l:len),J=1,3) , ~,og op8 , 1 Rule_nams(l:len) , Status8 , Rule name(l:len) , 1 Status8 , Rule_name(l:len) 506 Fo~mat ( 1 'C', / ~
1 ' If ( ' , / , 1 ' 1 ( .not. ' , A , '_fired ) .and. ' , / , 1 ' 1 ( ' , A , '_astat .eq. OK ) .and. ' , / , 1 ' 1 ( ' , A , '_value ' , A4 , ' ' , F12.5 , ' ) ' , 1 ' 1 ) Then ' , / , 1 ' ' , A, ' stat = ''', A25 ,'''' , / , 1 'd Write(6,*) ~i , 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) , 1 Status2 , Rule name(l:len) 508 Format ( 1 'C', / ~
1 ' If ( ' , / , 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_fi~es = This pass_fires + 1' , / , 1 ' End If' 1 ) End If If ( Status4 .ne. ' ' ) Then 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 pass_fires + 1' , / , 1 ' End If' 1 ) End If If ( Status6 . ne . ~ ~ ) Then 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_firos + 1' , / , 1 ' End If' 1 ) End If C

Go To 502 C

600 Continue C...Write out calculation rule code C

Call Write calc rules C

C...Write out analysis rule code First = .True.
C

602 Continue C

C..Read A rule Call Read anal rule ~ar~ms ( First , No_more j If ( No_more ) Go To 700 C
Call Str$trim ( An cond_name , An_cond_name , ..en J
Call Str$trim ( An_rule_name , An_rule_nam~ , ILen ) Write ( Code lun , 699 ) (An_rule_name(l:Ilenj,~--1,2) 699 Format ( 1 'C', / ~
1 'C.... ' , A , ' Rules ' , / , 1 'C', / ~
1 ' If ( ' , / , 1 ' 1 ( .not. ' , A , ' f ired ) .and. ' 1 ) If ( An rulel .ne. ' ' ) Then Call StrStrim ( An_rulel , An rulel , Len ) If ( An notl .eq. '.NOT.' ) Then Write~ code_lun , 1001 ) An_rulel(l:len) End If 1001 Format ( 1 ' 1 ( .not. ( ' , A , '_stat .EQ. Unknown ) ) .and.' Write( code lun , 608 ) An_notl , An_rulel(l:len) , 1 An statusl 608 Format ( 1 ' 1 ( ' , A , ' ( ' , A , '_st~t .EQ. ''' , A , ' .and.' 1 ) End If If ( An rule2 .ne. ' ' ) Then Call StrStrim ( An_rule2 , An_rule2 , Len ) If ( An_not2 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An_rule2(1:len) ~.62 End If Write( code lun , 609 ) An_not2 , An_rule2(1:1en) , 1 An statusZ
609 Format ( 1 ' 1 ( ~ , A , ~ ( ' , A , ' stat .EQ. lll , A , ' .and.' 1 ) End If If ( An_rule3 .ne. ' ' ) Then Call Str$trim ( An rule3 , ~n_rule3 , Len ) If ( An not3 .eq. '.NOT.' ) Then Write( code lun , 1001 ) An rule3(1:1en) End If Write( code lun , 610 ) An not3 , An_rule3(1:1en) , 1 An status~
610 Format ( 1 ' 1 ( ' , A , ' ~ ' , A , ' stat .EQ. "' , ~ , ' .and.' 1 ~
End If C

If ( An rule4 .ne. ' ' ) Then Call Str$trim ( ~n rule4 , An rule4 , Len ) If ( An not4 .eq. '.NOT.' ) Then Write( code_lun , 1001 ) An rule4(1:len) End If Write( code lun , 61~ ) An not4 , An_rule4(1:1en) , 1 An status4 611 Format ( 1 ' 1 ( ' , A , ' ( ' , A , '_stat .EQ. ' " , A , ' .and.' 1 ) End If If ( An rule5 .ne. ' ' ) Then Call Str$trim ( An rule5 , An rule5 , Len ) If ( An not5 .eq. '.NOT. ' ) Then Write( code_lun , 1001 ) An rule5(1:len) End If Write( code lun , 612 ) An not5 , An_ruleS(l:len) , 1 An status5 612 Format ( 1 ' 1 ( ' , A , ' ( ' , A , ' stat .EQ. ''' , A , ' .and.' ~lt?~75~1 1 ) End If C

Call Str$trim ( An cond_name , An cond_name , Len 3 Write ( Code_lun , 613 ) 1 (An_cond name(l:len),j=1,1) , An_end_status , 1 (An cond name(l:len),j=l,1) , An_end_statu 1 (An_rule_name(l:Ilen),j=1,1) 613 Format ( 1 ' 1 ( .True. ) ' , / , l ' l ) Then ' , / , 1 ' ' , A , '_stat = "', A25 ,' " ' , / , l 'd Write(6,*) "' , A , ' stat is ' , A ,~
1 ' T~is pass fires = This pass_fires ' 1' , /
1 ' End If' 1 ) C

Go To 602 C
700 Continue CC
C...Wri~e out action rule code C

First = .True.
C

702 Continue C

C..Read A rule Call Read action rule Params ( First , No_more ) If ( No_more ) Go To 800 CC
Call Str$trim ( Ac rule_name , Ac rule name , Len ) Write ( Code lun , 799 ) (Ac rule_name(l:len),~=1,2) 799 Format ( 1 'C' ,~ /, 1 'C....' , A , ' Rules ' , / , 1 'C', /, 1 ' If ( ' , / , l ' 1 ( .not. ' , A , '_fired ) .and. ' 1 ) Call Str$trim ( Ac_rulel , Ac_rulel , Len ) Write( code lun , 708 ) Ac rulel(l:len) , 1 Ac statusl 708 Format ( ( ' , ' ( ' , A , '_stat .EQ. "' , A , ''' ) ) ' 1 ) .
C

c ~2~i~5~1 Call Str$trim ( Ac rule_nam~ , Ac rule name , Len ) Write ( Code lun , 713 ) (Ac rule name(l:len),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_~ires ~ 1' 1 ) C

Call Str$trim ( Ac data_line , Ac data line , Len ) I~ ( Iac type .eq. Exec_fort_statement ) Then Write ( code lun , 714 ) Ac data line(l:Len) 714 Format ( 1 ' ' , A
Else If ( Iac type . 8q. Exec dcl procedure ) Then Subprocess_name(L_sp:14) = Ac rule name Call Str$trim ( Subprocess_name , Subprocess_name , lLen ) Write ( code_lun , 715 ) Ac_data line(l:Len) , 1 Subprocess_name(l:Ilen) 715 Format ( 1 ' Call Lib~spawn ( "@' , A , "',,,, " ' , A , ~ll ,....
Else If ( Iac_type .eq. Send_vaxmail msg ) Then Call Str~trim ( Ao rule name , Ac_rule name , Len ) Call Str~trim ( Directory , Directory , L dir ) Subprocess_name(L_sp:14) = Ac_rule_name Call Str5trim ( Subprocess_name , Subprocess name , ILen ) Write(Code_lun , 788 ) `
788 Fo~mat ( 1 1 If ( Mode .eq. Jpi5k_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 ( "~' , A , A , '.mailmsg'',,,,''' , A
,,, ,,, ,) ~rite(Code_lun , 787 ) 787 Format ( 1 ' Else if ( Mode .eq. Jpi~k_interactive ) Then' 1 ) Write ( Code lun , 789 ) Directory(l:L_dir) , 1 Ac rule_name(l:len) , Next_label, Next_label Next label = Next label + 1 789 Format ( 1 ' Open(ll,File= "' , A , A , '.mailmsg'' ,Status=''old'' 16~

1 ' Do J ~ 1,3 ' ,/, 1 ' Read ( 11, " ~A) ' ~ ) Line' ,/, 1 ' End Do~ ,/, DRJad (;1 ~ (A~ nd ~ ', I4, ) Ilne ,/
l ' Write(5,~) Line ' ,/, End Do ' , ~, 1 I4 , ' Continue' ,/, 1 ' Close ( 11 ) ' Write(Code_lun, 785 ) 786 Format ( End I f ' 1 ) C

Else ~Irite ( -ode_lun, 716 ) 716 Frmatr(te(6 *) "Bad Action type.

End I f Write ( Code lun , 717 ) 717 Format ( End If ' 1 ) 5O To 7 02 C

800 Con'cinue Write ( Code lun , 9998 9998 1 'd WritQ(6,*) This Pass--fires~ ' ' rules fired this pass. ' 1 ' If ~ This_pass_fires .gt. 0 ~ Go To 1', /, 1 'C', / ~
Return ' 1 ~
~:~11 FdvSPutl( ' G~ner~ting ~Sxpert System code.... Done. ' ) Return End Copyright (c) 1987 E.I. DuPont de Nemo~rs & Co., all rights reserved {~1 Thus, steps such as those listed above will produce (in this example) FORT~AN source code which de~ines an expert system including rules as defined by the user.
This source code can then be compiled and linked, as described above, to provide an expert procedur~ which is callable at Nn-time. This expert procedure is tied into the supervisor procedure, as described above, by inserting an appropriate call into the user program section of one of the blocks in the supervisor procedure. ~hus, 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, or at fixed time intervals, or according to any of the other options set forth above.
As will be recognized by those s~illed in the art, the i~novative 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 (28)

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 the process, 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 control parameters;
(3) repeatedly 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) 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 user inputs into said functional structure to be used by said process supervisor procedure;
(5) wherein said functional structure permits the user to define timing and sequencing parameters for respective ones of said software modules which include at least the following options:
(a) become active if another specified software module has become active;
(b) become active if a new value has been entered for a specified data source; or (c) become active if a specified time of inactivity has elapsed.
2. The method of Claim 1, wherein said timing and sequencing parameters of step (5) further provide the option of:
become active if a specified external event is found to have occurred.
3. The method of Claim 1, wherein said step of loading user inputs to become actively accessed by said process supervisor procedure is only performed after a validation run has been performed.
4. The method of Claim 1, wherein said process controller of step (2) uses a cycling step, and 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 said functional structure of step (4) comprises the step of presenting itself 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 only restricted portions of said functional structure of step (4) comprises the step of allowing for user alterability.
8. The method of Claim 1, wherein said user-alterable portions of said functional structure of step (4) comprise the step of appearing differently to the user than do other portions of said functional structures.
9. 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 includes a knowledge base and inference structure relevant to the process.
10. The method of Claim 1, wherein, for each of said control parameters, said process supervisor procedure of step (3) comprises the step of being constrained not to make changes unless the amount of the change would exceed a certain threshold; and wherein said process supervisor procedure reports every instance where it changes a control parameter.
11. The method of Claim 1, wherein, for each of said control parameters, said process supervisor procedure of step (3) comprises the step of being constrained not to make changes unless the amount of the change would exceed a certain threshold.
12. The method of Claim 1, wherein said process supervisor procedure of step (3) comprises the step of following a feedback control relation including a deadband on respective ones of said control parameters, and wherein said process supervisor procedure follows a feedforward control relation including a deadband on respective ones of said control parameters.
13. The method of Claim 1, wherein said process supervisor procedure of step (3) comprises the step of having a maximum iteration period significantly longer than the maximum iteration period of said process controller of step (2).
14. The method of Claim 1, wherein said process controller of step (2) uses analog logic for controlling.
15. The method of Claim 1, wherein said step (3) of repeatedly running a process superYisor procedure comprises the step of running said process supervisor procedure using a cycling step.
16. The method of Claim 1, wherein said software modules of step (4) comprise the step of being defined by respective data definitions, including pointers to procedures which will carry out a respective function, and (for at least some of said modules) parameters to be passed to said procedures pointed to.
17. The method of Claim 1, wherein said software modules of step (4) comprise the step of being defined 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 modules, parameters to be passed to said procedures pointed to.
18. The method of Claim 1, wherein said software modules of step (4) comprise the step of being defined 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 containing 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 modules, parameters to be passed to said procedures pointed to.
19. The method of Claim 1, wherein said control parameters of step (2) comprise the step of including goals of said process controller.
20. The method of Claim 1, wherein said functional structure of step (4) comprises the step of including standardized data interface definitions such that the user can specify data having one of plural pre-defined temporal characteristics.
21. The method of Claim 1, wherein said functional structure of step (4) comprises the step of including 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.
22. The method of Claim 1, wherein said functional structure of step (4) comprises the step of including 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.
23. The method of Claim 1, wherein said functional structure of step (4) comprises the step of permitting the user to define timing and sequencing parameters for respective ones of said modules which also include the additional option of: become active if a specified parameter in a lower-level controller has changed.
24. The method of Claim 1, wherein said functional structure of step (4) comprises the step of permitting the user to define timing and sequencing parameters for respective ones of said software modules which also include the additional option of: become active only on programmatic request.
25. The method of Claim 1, wherein said functional structure of step (4) comprises the step of permitting the user to define timing and sequencing parameters for respective ones of said software modules which also includes the additional option of: become active upon external switching in a specified switch system.
26. The method of Claim 1, wherein each said functional structure of step (4) comprises the step of including a standard functional control relationship selected from a very limited set and a pointer to optional user-customized programming.
27. The method of Claim 1, wherein said process controller of step (2) and said process supervisor procedure of step (3) comprise processes running on the same computer system.
28. The method of Claim 1, wherein said process controller of step (2) and said process supervisor procedure of step (3) are both respective parts of the same software system.
CA000578695A 1987-09-30 1988-09-28 Process control system with multiple module sequence options Expired - Lifetime CA1297561C (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US103,124 1987-09-30
US07/103,124 US4910691A (en) 1987-09-30 1987-09-30 Process control system with multiple module sequence options

Publications (1)

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

Family

ID=22293526

Family Applications (1)

Application Number Title Priority Date Filing Date
CA000578695A Expired - Lifetime CA1297561C (en) 1987-09-30 1988-09-28 Process control system with multiple module sequence options

Country Status (2)

Country Link
US (1) US4910691A (en)
CA (1) CA1297561C (en)

Families Citing this family (123)

* 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
US5081598A (en) * 1989-02-21 1992-01-14 Westinghouse Electric Corp. Method for associating text in automatic diagnostic system to produce recommended actions automatically
US5355444A (en) * 1990-01-23 1994-10-11 International Business Machines Corporation Expert system wtih a plurality of independent knowledge bases
US5122976A (en) * 1990-03-12 1992-06-16 Westinghouse Electric Corp. Method and apparatus for remotely controlling sensor processing algorithms to expert sensor diagnoses
JP3062338B2 (en) * 1991-03-01 2000-07-10 キヤノン株式会社 Image processing device
US5499193A (en) * 1991-04-17 1996-03-12 Takeda Chemical Industries, Ltd. Automated synthesis apparatus and method of controlling the apparatus
US5576215A (en) * 1991-06-03 1996-11-19 Abbott Laboratories Adaptive scheduling system and method for operating a biological sample analyzer with variable interval periods
US5351200A (en) * 1991-11-22 1994-09-27 Westinghouse Electric Corporation Process facility monitor using fuzzy logic
US6234689B1 (en) * 1992-04-06 2001-05-22 Hewlett-Packard Co. Apparatus and method for mapping a custom routine to an interface button
US5781797A (en) * 1992-09-30 1998-07-14 Microsoft Corporation Method and system for configuring device driver by selecting a plurality of component drivers to be included in the device driver
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
US5590271A (en) * 1993-05-21 1996-12-31 Digital Equipment Corporation Interactive visualization environment with improved visual programming interface
US5328787A (en) * 1993-05-24 1994-07-12 Eastman Kodak Company Method for assessing and controlling the sensitometric characteristics of photographic products
US5594858A (en) * 1993-07-29 1997-01-14 Fisher-Rosemount Systems, Inc. Uniform control template generating system and method for process control programming
US5485620A (en) * 1994-02-25 1996-01-16 Automation System And Products, Inc. Integrated control system for industrial automation applications
US6018716A (en) * 1994-04-28 2000-01-25 International Business Machines Corporation Apparatus and method for analysis of continuous process lines
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
EP0976070A1 (en) * 1997-04-17 2000-02-02 Glaxo Group Limited Statistical deconvoluting of mixtures
US6389406B1 (en) * 1997-07-30 2002-05-14 Unisys Corporation Semiotic decision making system for responding to natural language queries and components thereof
GB2334596B (en) * 1998-02-23 2002-02-20 Denno Co Ltd Control system
US7269475B1 (en) * 1998-03-02 2007-09-11 Xerox Corporation Distributed control system with global contraints for controlling object motion with smart matter
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
US7137101B1 (en) * 1998-12-03 2006-11-14 International Business Machines Corporation Apparatus and method for performing general integrity checks using integrity rule checking points in an enterprise application
US6542880B2 (en) * 1998-12-22 2003-04-01 Indeliq, Inc. System, method and article of manufacture for a goal based system utilizing a table based architecture
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
US7096465B1 (en) 1999-05-17 2006-08-22 Invensys Systems, Inc. Process control configuration system with parameterized objects
AU5025600A (en) 1999-05-17 2000-12-05 Foxboro Company, The Process control configuration system with parameterized objects
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
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
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
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
US6510352B1 (en) 1999-07-29 2003-01-21 The Foxboro Company Methods and apparatus for object-based process control
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
US6865566B2 (en) * 2000-05-09 2005-03-08 Fair Isaac Corporation Approach for re-using business rules
US7389204B2 (en) * 2001-03-01 2008-06-17 Fisher-Rosemount Systems, Inc. Data presentation system for abnormal situation prevention in a process plant
US6795798B2 (en) 2001-03-01 2004-09-21 Fisher-Rosemount Systems, Inc. Remote analysis of process control plant data
DE60206884T2 (en) 2001-03-01 2006-07-27 Fisher-Rosemount Systems, Inc., Austin Sharing of data in the process plant
US8073967B2 (en) 2002-04-15 2011-12-06 Fisher-Rosemount Systems, Inc. Web services-based communications for use with process control systems
US6954713B2 (en) 2001-03-01 2005-10-11 Fisher-Rosemount Systems, Inc. Cavitation detection in a process plant
US6965806B2 (en) * 2001-03-01 2005-11-15 Fisher-Rosemount Systems Inc. Automatic work order/parts order generation and tracking
US7720727B2 (en) * 2001-03-01 2010-05-18 Fisher-Rosemount Systems, Inc. Economic calculations in process control system
US20020191102A1 (en) * 2001-05-31 2002-12-19 Casio Computer Co., Ltd. Light emitting device, camera with light emitting device, and image pickup method
US7707550B2 (en) * 2001-06-22 2010-04-27 Invensys Systems, Inc. Supervisory process control and manufacturing information system application having an extensible component model
US6813587B2 (en) 2001-06-22 2004-11-02 Invensys Systems, Inc. Remotely monitoring/diagnosing distributed components of a supervisory process control and manufacturing information application from a central location
US7496911B2 (en) * 2001-06-22 2009-02-24 Invensys Systems, Inc. Installing supervisory process control and manufacturing software from a remote location and maintaining configuration data links in a run-time environment
US7650607B2 (en) * 2001-06-22 2010-01-19 Invensys Systems, Inc. Supervisory process control and manufacturing information system application having a layered architecture
EP1410557A4 (en) 2001-06-22 2009-11-18 Wonderware Corp A security architecture for a process control platform executing applications
US7162534B2 (en) * 2001-07-10 2007-01-09 Fisher-Rosemount Systems, Inc. Transactional data communications for process control systems
US6975914B2 (en) * 2002-04-15 2005-12-13 Invensys Systems, Inc. Methods and apparatus for process, factory-floor, environmental, computer aided manufacturing-based or other control system with unified messaging interface
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
US7493310B2 (en) 2002-12-30 2009-02-17 Fisher-Rosemount Systems, Inc. Data visualization within an integrated asset data system for a process plant
US8935298B2 (en) 2002-12-30 2015-01-13 Fisher-Rosemount Systems, Inc. Integrated navigational tree importation and generation in 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
US20040158474A1 (en) * 2003-02-06 2004-08-12 Karschnia Robert J. Service facility for providing remote diagnostic and maintenance services to 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
US20040230328A1 (en) * 2003-03-21 2004-11-18 Steve Armstrong Remote data visualization within an asset data system for a process plant
US7369912B2 (en) * 2003-05-29 2008-05-06 Fisher-Rosemount Systems, Inc. Batch execution engine with independent batch execution processes
US7299415B2 (en) * 2003-06-16 2007-11-20 Fisher-Rosemount Systems, Inc. Method and apparatus for providing help information in multiple formats
US7029922B2 (en) * 2003-07-18 2006-04-18 Dade Behring Inc. Method for resupplying reagents in an automatic clinical analyzer
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
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
US20050267709A1 (en) * 2004-05-28 2005-12-01 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a heater
CN1969239B (en) * 2004-06-12 2011-08-03 费舍-柔斯芒特系统股份有限公司 System and method for detecting an abnormal situation associated with a process gain of a control loop
US7181654B2 (en) * 2004-09-17 2007-02-20 Fisher-Rosemount Systems, Inc. System and method for detecting an abnormal situation associated with a reactor
US8768664B2 (en) * 2005-03-18 2014-07-01 CMC Solutions, LLC. Predictive emissions monitoring using a statistical hybrid model
US7421348B2 (en) * 2005-03-18 2008-09-02 Swanson Brian G Predictive emissions monitoring method
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
US7840285B2 (en) * 2005-10-28 2010-11-23 Invensys Systems, Inc. Sequence of events recorder facility for an industrial process control environment
US7860857B2 (en) 2006-03-30 2010-12-28 Invensys Systems, Inc. Digital data processing apparatus and methods for improving plant performance
US7912676B2 (en) * 2006-07-25 2011-03-22 Fisher-Rosemount Systems, Inc. Method and system for detecting abnormal operation in a process plant
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
EP2392982B1 (en) * 2006-09-28 2015-03-25 Fisher-Rosemount Systems, Inc. Abnormal situation prevention in a heat exchanger
US8014880B2 (en) * 2006-09-29 2011-09-06 Fisher-Rosemount Systems, Inc. On-line multivariate analysis in a distributed process control system
US20080188972A1 (en) * 2006-10-11 2008-08-07 Fisher-Rosemount Systems, Inc. Method and System for Detecting Faults in a Process Plant
US7680550B2 (en) * 2006-10-20 2010-03-16 Rockwell Automation Technologies, Inc. Unit module state processing enhancements
US20080095196A1 (en) * 2006-10-20 2008-04-24 Rockwell Automation Technologies, Inc. Unit to unit transfer synchronization
US7684877B2 (en) * 2006-10-20 2010-03-23 Rockwell Automation Technologies, Inc. State propagation for modules
US8601435B2 (en) * 2006-10-20 2013-12-03 Rockwell Automation Technologies, Inc. Module class subsets for industrial control
US7725200B2 (en) * 2006-10-20 2010-05-25 Rockwell Automation Technologies, Inc. Validation of configuration settings in an industrial process
US7844349B2 (en) * 2006-10-20 2010-11-30 Rockwell Automation Technologies, Inc. Standard MES interface for discrete manufacturing
US7894917B2 (en) * 2006-10-20 2011-02-22 Rockwell Automation Technologies, Inc. Automatic fault tuning
US8392008B2 (en) * 2006-10-20 2013-03-05 Rockwell Automation Technologies, Inc. Module arbitration and ownership enhancements
US7676292B2 (en) * 2006-10-20 2010-03-09 Rockwell Automation Technologies, Inc. Patterns employed for module design
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
US20080177612A1 (en) * 2007-01-24 2008-07-24 Sciformatix Corporation Method And System For Designing, Storing, and Executing Workflows For Laboratory Processes
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
US8418135B2 (en) * 2007-05-31 2013-04-09 Red Hat, Inc. Method and apparatus to abstract away rule languages
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
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
CN104407518B (en) 2008-06-20 2017-05-31 因文西斯系统公司 The system and method interacted to the reality and Simulation Facility for process control
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
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 (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4215396A (en) * 1978-08-24 1980-07-29 Texas Instruments Incorporated Intelligent programmable process control system
JPH0650442B2 (en) * 1983-03-09 1994-06-29 株式会社日立製作所 Facility group control method and system
US4649515A (en) * 1984-04-30 1987-03-10 Westinghouse Electric Corp. Methods and apparatus for system fault diagnosis and control
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
US4642782A (en) * 1984-07-31 1987-02-10 Westinghouse Electric Corp. Rule based diagnostic system with dynamic alteration capability
US4644479A (en) * 1984-07-31 1987-02-17 Westinghouse Electric Corp. Diagnostic apparatus
US4616306A (en) * 1984-08-10 1986-10-07 Amchem Products, Inc. Metal treating process control
US4672529A (en) * 1984-10-26 1987-06-09 Autech Partners Ltd. Self contained data acquisition apparatus and system
JPH0789283B2 (en) * 1984-11-02 1995-09-27 株式会社日立製作所 Formula processing control system
US4670848A (en) * 1985-04-10 1987-06-02 Standard Systems Corporation Artificial intelligence system
GB8521663D0 (en) * 1985-08-30 1985-10-02 British Steel Corp Control of reactants in chemical engineering systems
US4754410A (en) * 1986-02-06 1988-06-28 Westinghouse Electric Corp. Automated rule based process control method with feedback and apparatus therefor
US4752889A (en) * 1986-08-18 1988-06-21 Neuron Data, Inc. Dynamic, interactive display system for a knowledge base

Also Published As

Publication number Publication date
US4910691A (en) 1990-03-20

Similar Documents

Publication Publication Date Title
CA1297561C (en) Process control system with multiple module sequence options
US5006992A (en) Process control system with reconfigurable expert rules and control modules
CA1297558C (en) Process control sytem with action logging
US4884217A (en) Expert system with three classes of rules
US4965742A (en) Process control system with on-line reconfigurable modules
EP0335957B1 (en) Expert system with process control
US4920499A (en) Expert system with natural-language rule updating
EP0423287B1 (en) Batch process control using expert systems
Sripada et al. AI application for process regulation and servo control
Arzen Use of expert systems in closed loop feedback control
Lopez-Mellado et al. A failure recovery scheme for assembly workcells
Rao et al. Computer integrated process systems in continuous manufacturing industries
Verbruggen et al. Artificial intelligence and feedback control
Astrom Where is the intelligence in intelligent control?
Xia et al. A hybrid intelligent system for process operations support
Valavanis et al. Analytical design of intelligent machines
Xu et al. An intelligent tuning control technique
Schram et al. Fuzzy logic control
Fiol-Roig et al. Expert system for supervision of real time control processes
Terpstra et al. A robust reactive scheduler for mixed-batch/continuous plants
Anderson Adaptive pole placement control using multiple transputers
Shinohara Application of an AI method to optimal reactor control problems
Rao et al. IOMCS for Pulp and Paper Processes
Sullivan et al. Expert aided adaptive control
Marcos et al. A methodology for the design of rule-based supervisors

Legal Events

Date Code Title Description
MKLA Lapsed