set is its “grade of membership.” Note that ...... come dominant and cause a
discontin- uous control action. '''1 I .8 ..... tal control ot nucle,ir re acton with a
minor in.
Use of a Rule-Based System for Process Control John A. Bernard ABSTRACT: A rule-based, digital, closedloop controller that incorporates “fuzzy” logic has been designed and implemented for the control of power on the 5-MWt Massachusetts Institute of Technology (MIT) Research Reactor under both steady-state and transient conditions. Based on this experience and having designed several other controllers for the same purpose, a comparison is made of the rule-based and analytic approaches. Differences in the division of labor between plant engineers and control specialists, the type of knowledge required and its acquisition, the use of performance criteria, and controller testing are discussed. The design, implementation, and calibration of rulebased controllers are reviewed, with specific examples taken from the completed work on the MIT Research Reactor. An evaluation is then made of the possible role of rule-based technology in process control. It is noted that there are no comprehensive guidelines for the design of rule-based controllers and that such systems are quite difficult to calibrate. The advantage of rule-based systems is that they are generally more robust than their analytic counterparts. Therefore, the rule-based and analytic technologies should be used to complement each other, with rule-based systems being employed both as backups to analytic controllers and as a means of improving the man-machine interface by providing human operators with the rationale for automatic control actions.
Introduction “Fuzzy” logic and “rule-based” techniques were originally advocated by Zadeh [ 11 and Mamdani and Assilian [2] as a means of both capturing human expertise and dealing with uncertainty. These concepts were soon applied to ill-defined industrial processes. Such systems are normally operated by experienced individuals who often achieve excellent results despite receiving information that is imprecise. The origin of this imPresented at the 1987 International Conference on Industrial Electronics, Control, and Instrumentation, Cambridge, Massachusetts, November 3-6, 1987. John A. Bernard is with the MIT Nuclear Reactor Laboratory, Massachusetts Institute of Technology, Cambridge, MA 02139.
precision might be time delays between the application of a control signal and indication of its effect, nonlinearities in the system dynamics, or degraded sensors. Processes to which the fuzzy, rule-based approach has been applied include cement kilns, wood pulp grinders, and sewage treatment plants [3]. In many instances, the degree of control achieved using the fuzzy, rule-based approach was superior to that which had been attained using strictly manual methods. These successful applications have shown that the technique is both practical and of benefit for the control of ill-defined processes. However, its value to the operation of well-characterized systems has not been demonstrated clearly; as a result, the fuzzy, rule-based approach has yet to achieve general acceptance. This paper explores the construction and use of rule-based systems for process control. Specifically, the objective of the control methodology described herein is the automation of discrete control actions that are, or can be, undertaken by human operators on a reasonable time scale (e.g., seconds or minutes). As such, this paper draws heavily on the results of a program at the Massachusetts Institute of Technology (MIT) to develop and apply advanced instrumentation and control techniques to nuclear reactors. This ongoing program has resulted in the development of several control strategies, each of which has been demonstrated on the 5MWt MIT Research Reactor (MITR-11). Among the concepts tested were controllers to evaluate the use of “fuzzy logic” and a “rule-based” controller [4]-[6]. Based on this experience and having also developed several very successful analytic controllers [7], [8], a comparison is made of the rulebased and analytic approaches to process control. Three factors stand out as being responsible for the process control industry’s reluctance to adopt the rule-based approach. First, in spite of a growing body of literature on the topic, there is little practical guidance on the design of rule-based controllers. Second, few comparative studies have been performed of rule-based and analytically derived control laws. As a result, the potential benefits of the rule-based approach and the realization that it can complement rather than 0272 1708 88)1000 0003 $01 00
October
I988
\c
replace analytic methods are not generally recognized. Third, there is no general method for validating the design of a rule-based controller; rather, an extensive on-line test program is necessary. The specific objectives of this paper are ( I ) to provide a brief overview of the theory of “fuzzy” logic and “rule-based” control; (2) to delineate the major differences between the construction of fuzzy, rule-based controllers and conventional design; (3) to review the design of fuzzy, rule-based controllers, with specific examples taken from the system that has been used successfully for the transient control of power on the 5MWt MITR-11; (4)to describe the successful implementation of this controller on the MITR-11; (5) to summarize the findings of a comparison of the rule-based and analytic approaches to control; and (6) to discuss the possible role of rule-based technology in the control of well-defined processes.
Fuzzy Logic and Rule-Based Control Zadeh [l], [9] introduced fuzzy logic to describe systems that are “too complex or too ill-defined to admit of precise mathematical analysis.” Its major features are the use of linguistic rather than numerical variables and the characterization of relations between variables by fuzzy conditional statements. Zadeh foresaw the technique as having applications in fields such as economics, management, and medicine. Mamdani and Assilian [2], recognizing that fuzzy logic provided a means of dealing with uncertainty, extended the concept to industrial process control in the expectation that it would be applied to systems for which precise measurements of the state variables could not be obtained. Fuzzy logic and rulebased systems are a means of dealing with imprecision, a method of modeling human behavior, and a means of achieving control of industrial systems that cannot be modeled rigorously. Regarding process control, the principal difference between the fuzzy, rulebased approach and conventional techniques is that the former uses qualitative information whereas the latter require rigid analytic relations to describe the process.
1988 IEEE
3
The actions of plant operators support the prcmise that humans categorize information, including sensor outputs, with linguistic labels. For example, an important parameter in the control of a nuclear reactor is the reactor period, which is a measure of the rate of rise of the power. (Note: Period is defined as the power level divided by the rate of change of power. Thus, a period of infinity corresponds to steady state, while one equal to a small positive number indicates a rapid power increase.) An observed reactor period might be classified as “too short,” “short,” or “negative.” Transitions between classes are not abrupt and a given reading might belong to several labeled groups. For example, a positive period of 90 sec might be termed “too short” to degree 0.2, “short” to degree 1.O, and “negative” to degree 0.0. The parameter being classified-in this case, the period-is termed a “universe of discourse,” with individual labels (e.g., “too short” or “short”) being considered “subsets’’ of that universe. The degree to which a measured value belongs to a particular subset is its “grade of membership.” Note that membership grades are not probabilities. It is not a case of uncertainty in the measurement, and the period is, therefore, classified as being “too short” with a certain probability. Rather, the value of the period is known and it simultaneously belongs in varying degrees to one or more labeled groups. The standard rules of Boolean algebra permit labeled groups to be combined. The intersection of two or more such groups or subsets, which is denoted by the connective AND, is the minimum of the membership grades within any of the subsets. Similarly, the union of two or more subsets, which is denoted by the connective OR, is the maximum of the membership grades within any of the subsets. The ability to connect labeled groups makes it possible to express control rules as fuzzy conditional statements, such as: “If the period is short and the power level is close to the desired value and if the control rod height is not excessive, then insert the control rod at its normal speed.” Note that. in this example, the period, power level, control rod height, and control rod speed are all universes of discourse. The terms “short,” “close,” “not excessive,” and “normal” are each subsets of those universes. Each of these subsets or labels has a special meaning to a human operator. For example, were a survey conducted of all licensed operators at a given reactor, a consensus could presumably be achieved as to the range of control rod speeds that are con-
4
sidered “normal.” Fuzzy conditional statements are usually referred to as “if-then’’ or production rules. Control action in a rule-based system is achieved by first measuring the relevant parameters and then determining their membership grades in the appropriate subsets. Next, the intersection (or, if appropriate, union) of the subsets associated with a given rule is found with the value of that intersection being the rule’s degree of fulfillment (DOF). The DOF of every rule is determined in this manner. Finally, the net control action is found by combining the action specified by each rule in proportion to the associated rule’s DOF. This process is illustrated in the ensuing sections of this paper.
Comparison of Rule-Based and Analytic Approaches The overall process of constructing a fuzzy, rule-based controller is analogous to that of designing an analytic controller in the sense that, in each case, the plant process must be understood, key parameters identified, and a control methodology developed. However, as is discussed below, the two technologies differ markedly in their approaches to these tasks. Responsibility for Controller Design
If an analytic controller were being developed, the plant design engineers would construct a mathematical model of the process dynamics so that a transfer function or system of state equations that accurately described the plant’s response to changes in demand would be available. This information, together with performance specifications, would be provided to a control specialist who would do the actual controller design. This division of labor is efficient because neither the plant design nor the control engineer need be a specialist in the other’s field of expertise. The situation with regard to the creation of rule-based controllers is quite different. A mathematical model of the plant is not employed; rather, use is made of rules that stipulate that a certain action be initiated should a specific set of conditions occur. This approach mandates that the person developing the controller be intimately familiar with the plant’s operation. Some division of labor is still possible; however, given that it takes years of study to master a single industrial technology, it is not practical for a control specialist to acquire a working knowledge of the process. Hence, the plant engineer must learn the details of the fuzzy, rule-based methodology and then apply that information to the industrial pro-
cess on which he or she is an expert. The control specialist’s role becomes that of a consultant. This pattern, in which experts acquire a working knowledge of the rulebased methodology and then apply it to their own field of interest, has been observed for most successful expert systems-e.g., MYCIN and DENDRAL, which were developed for medical diagnosis and the identification of chemical compounds, respectively [IO], [I 11. This same trend is apparent in the development of expert systems for use in the generation of electric power [ 121, and there is no reason to believe that the situation will be markedly different with respect to rulebased controllers. Description of Plant Dynamics
As mentioned earlier, the traditional approach to process modeling, which is to develop a mathematical description of the plant’s dynamics, is abandoned. Instead, knowledge of the plant is contained in extensive sets of rules that describe the plant’s operation. That is, while the dynamics might be available as so-called “deep” knowledge, the emphasis is on empirically obtained conditional rules that prescribe a certain action in response to a specific set of conditions. Thus, a rule-based controller uses both a different format (if-then statements) and a different type of knowledge (operating conditions) than does an analytic controller. Not surprisingly, this new approach requires the use of a new method for acquiring the requisite knowledge. Information on operating rules must be obtained not only from a knowledge of the plant functions but also from observing skilled human operators. This can be achieved by means of interviews, questionnaires, and on-line recording of human-initiated control actions. The procedure is time-consuming and often frustrating in that much incorrect or irrelevant information is garnered. Also, care must be exercised that employee rights to privacy are protected. The engineer-in-charge, in addition to being an expert on the plant and having studied the construction of rule-based controllers, must therefore also become familiar with industrial psychology and human performance measures. Use of P e $ o m n c e Criteria
Performance criteria are readily defined regardless of the type of controller. For example, the plant should respond in minimum time, maximum allowed stress levels should not be exceeded during transients, and overshoots should be restricted to a certain percent of the operating level. The difference between the rule-based and analytic control
IEEE Control Systems Magazine
,.
,
techniques becomes apparent when the use that is made of performance criteria is considered. If the conventional approach is followed, performance criteria either can be related to gain and rate parameten by empirical rules or can be incorporated as mathematical constraints in the equations that define the control law. In contrast, there is no direct way to utilize performance criteria in the design of rule-based systems. The controller must be constructed and then tested to determine its capabilities. This task can be quite involved. Many questions, some unanswerable, arise-e.g.: Have enough subsets been defined so that there is sufficient flexibility? Which subsets have no effect on performance and, therefore, can be eliminated? Is the rule base complete? That is, has every possible contingency been anticipated and an appropriate conditional statement been defined? Controller Calibration
The two approaches also differ in the methods used to calibrate the controller. Analytic designs usually are characterized by a gain, reset rate, and an allowed deviation band. Initial estimates of the proper settings of these parameters often can be obtained from open-loop measurements. Moreover, final adjustments can be made using known methods of analysis, such as the response to a step input. In marked contrast, there is no standard technique for the calibration of a fuzzy, rule-based controller. Repeated closed-loop trials are necessary in which the functions that relate each measured parameter to its membership grade are adjusted. Once this is accomplished, further trials are required in order to assess the effectiveness of each conditional rule. The overall process is iterative and, therefore, time-consuming. In summary, regardless of whether an analytic or rule-based approach is utilized, the same set of tasks must be addressed. For example, the plant must be described adequately, performance criteria identified, and the controller calibrated properly. In this regard, the fuzzy, rule-based approach is at a disadvantage because, being an emerging technology, standardized methods for its application have not yet been developed.
Design of a Rule-Based Controller As an illustration of the construction of a fuzzy, rule-based controller, the design of such a system for the steady-state and transient control of power on the 5-MWt MITRI1 is described. It is emphasized that the research reported here is an experimental evaluation of how a fuzzy, rule-based system
October I988
might be used in process control. As such, the resultant methodology may be of general use. However, the subsets and rule base described herein are unique to the MIT Reactor. Much additional information is given in [6].By way of introduction, a brief overview is given here of reactor operation. Reactor Dynamics and Operation
The quantity most fundamental to the control of power in a nuclear reactor is the reactivity, which may be considered to be the fractional change in the neutron population per unit time. A reactivity of zero corresponds to the critical condition and implies that the reactor power is constant. Adjustments of power in facilities such as the MITR-I1 are accomplished by positioning neutron-absorbing control rods so as to temporarily make the reactivity either positive or negative. If a power increase is desired, the operator would withdraw a control rod, thereby inserting positive reactivity and placing the reactor on a period. (Note: Recall that period is defined as the power level divided by the rate of change of power.) Having established a period, the reactor operator then allows the power to rise. Once the power level approaches the desired value, the control rod is reinserted gradually in order to reduce the reactivity to zero and to level the power without overshoot. The process is a complicated one because the equations of reactor dynamics are nonlinear and there are power-dependent feedback effects. Therefore, some degree of preplanning is necessary to level the power at the desired value without overshoot. Additional complications are that reactivity is not directly measurable, the differential reactivity worths of the control rods are often nonlinear functions of position, the reactivity is altered by thermal feedback effects resulting from power changes, and the relation between power and period is exponential, not linear. Additional information is given in [ 131, [ 141. Knowledge Acquisition
The essential task in the design of a rulebased controller is the knowledge acquisition process. If this is not done in a thorough and rigorous manner, then the controller cannot function properly. Rule-based control systems generally are quite simple, consisting of the knowledge base (the if-then rules), an inference engine, and a means of identifying plant conditions. Given the current state of the plant and the desired objectives, the inference engine is used to search through the knowledge base in order to identify those rules that are applicable. An appropriate
control action is then formulated. Much of the emphasis on rule-based systems is currently focused on the design of efficient search procedures. As a result, the importance of the knowledge acquisition process often is not fully perceived by prospective users of the technology. Relative to the design of a rule-based system for the control of power on the MITR11, three techniques were used. First, reactor operators were observed as they either raised or lowered the reactor power. Notes were taken on the instruments that they watched, when and how often they watched them, and when they moved the control mechanisms. Second, digital recordings were made of several manually conducted (i.e., open-loop) power increases. This permitted the power level, period, blade and rod positions, and temperature to be correlated with operatorinitiated movements of the control mechanisms. Based on these first two steps, the third step in the knowledge acquisition process was undertaken. A questionnaire was developed with the intent of elucidating the reasoning behind particular operator actions. Participants were first asked to describe, in as much detail as possible, their actions during several different power adjustments. This was a very broad question intended to provide an overall accounting of the process. Each participant then was asked to answer 21 specific questions, most with multiple parts. These were intended to elicit information on specific facets of reactor operation. As a means of verifying the consistency of the answers received, the survey included several questions that, while phrased differently, sought information on the same topic. This information then was supplemented by discussions with individual operators and additional recordings. The procedure for gathering this material was reviewed and approved by the MIT Committee on the Use of Humans as Experimental Subjects. A protocol that protected employee rights to privacy was specified. There are two features of this process that differ from the standard method used to acquire knowledge for most expert systems. First, every licensed operator was asked to participate in the survey. This contrasts with the currently accepted practice, which is to identify a single expert and to rely solely on his or her knowledge. The use of multiple experts was found to be beneficial in that several different control strategies for achieving the same objective were often identified. Second, it was possible to verify the portion of the knowledge base that concerned normal plant operation. This was done by comparing the responses on the
5
questionnaires to the recordings made of the manually controlled power increases. Organization of the Knowledge Base
The next step in the design process is to structure the information that has been obtained on plant operation. It is desired to achieve the following three objectives: (1) Identify the parameters used by plant operators for control. (2) Deduce the linguistic labels that are used by operators to classify measured values of each parameter and, where possible, identify the range of each label.
(3) Determine the conditional rules that relate these linguistic labels to specific control actions. MITR-I1 is equipped with six shim blades and one regulating rod. The former are used for criticality control and large adjustments of the power levels. The latter is intended for small power adjustments. The discussion that follows is limited to power increases using only the MITR-11’s regulating rod. Four measurable parameters were identified as being used by the licensed MITR operators for the formulation of control decisions. These were the power level, the period, the rod position, and the net rod withdrawal beyond the critical position. The first is the parameter being controlled. The second indicates the rate at which the power is being changed. The third is a measure of the strength of the control rod. The lower the regulating rod’s physical position, the greater its ability to absorb neutrons and, therefore, to halt a power rise. The fourth is an indication of the reactivity that has been added. That is, the further that the rod has been withdrawn beyond its steady-state critical position, the faster the power will rise. (Note: The reactivity itself is not directly measurable and, therefore, was not used. Were a traditional digital control system being designed, filters and/or special algorithms could be employed to provide estimates of the reactivity.) Sets of linguistic labels that characterized each of these four parameters were identified. For example, measurements of the reactor period were classified as belonging to the labeled groups “too short,’’ “short,” “positive,” ‘‘long,’’ “too long,” or “negative.” The range of each of these labels was also deduced. However, it was found necessary to revise these assigned ranges during the process of calibrating the controller. The next step in the process of organizing the information in the knowledge base was to identify the conditional rules that the op-
b
erators used to control the plant. This was an iterative procedure because often it was necessary to add or delete linguistic labels as new rules were considered. As an example of a rule, an operator might state that “the regulating rod should be inserted at full speed if the period were to become too short. ” A major concern that arises relative to the development of a rule base is its completeness. Monitoring operator actions usually will produce the rules that apply during routine operation. Unanticipated transients, being infrequent, are less likely to be observed. Therefore, caution must be exercised to ensure that the rules that are relevant to contingencies are not overlooked. Also, for the process control industry in general, there is usually no means of verifying the rules that govern responses to off-normal conditions. (Note: The nuclear power industry is an exception to this statement. Excellent simulation facilities are available for operator training. These could be used to evaluate a rule base.) Although there were only four parameters involved in the knowledge base for normal operation of the MITR-11, it was found that the trade-offs between those variables were complex. For example, if the control rod is above its normal operating range, then its differential worth (i.e., capacity to absorb neutrons) will be small and the operator will not be able to offset much reactivity by reversing the direction of rod motion. Hence, the period should be kept longer than normal and the transient conducted more slowly. Also, if a power change is initiated at a high rod height, then the incremental rod withdrawal will have to be larger than normal in order to achieve the desired period. This means that, on approaching the desired power level, it will take longer to eliminate the reactivity. Hence, rod insertion should be initiated sooner than would otherwise be the case. This illustrates another aspect of rule-based controllers. Even for small systems, the number of rules soon becomes substantial. Knowledge Representation
The next phase of the design process is to express the information in the knowledge base in a manner suited for use with a digital computer. There are two subgoals. First, functions must be defined that relate the value of a measured parameter to each linguistic label. Thus, a certain rate of change of power (i.e., period) might be classified as being a member of the labeled group “too long” to degree 0.20 and to the group “long” to degree 0.65. (Note: Degrees of membership
are not probabilities and they need not sum to unity. They merely reflect the degree to which human operators, on average, classify a particular measurement as being described by a given linguistic label.) Second, the structure of each rule must be analyzed using the rules of Boolean algebra. If two or more labeled groups are related by the connective OR, then the union of those groups, which is the maximum of the membership grades, is desired. Similarly, if the connective AND is involved, then the intersection, which is the minimum of the membership grades, is desired. As will be discussed subsequently in the section that concerns controller implementation, the selection of the functions that define the linguistic labels is a tedious, iterative process. As a first approximation, the form of these functions can be taken to be that elicited from the human experts during the knowledge acquisition phase. Successive refinements are then made by evaluating the performance of the controller. The overall process is disturbingly arbitrary. Relative to the MITR-11, the outcome of this step was that 14 fuzzy subsets of the power, the period, the rod height, and the rod withdrawal beyond the critical position were defined. These are shown in Table 1 . (Note: Subsets of the reactor power are expressed as the fractional change in power or “power fraction.” This is a simplification because, depending on the magnitude of the power change, operators expressed themselves either in terms of the percent change in power or the absolute deviation in the power level.) Twenty conditional rules were defined as given in Table 2. Each associates a possible plant condition with a specified control action. Controller ConJiguration
The next task regarding the design of a rule-based controller is its configurationi.e.: How are the rules to be combined in order to obtain a useful control action? There are four substeps to this process. First, measurements must be made at every sampling interval of the key parameters. Second, the degree to which each measured value is a member of a given labeled group is determined. A given measurement may be classified simultaneously as belonging to several different linguistic groups. Third, the DOF of each rule is determined by applying the rules of Boolean algebra to each linguistic group that is part of the rule. This is then done for all rules in the system. Fourth, the net control action is found by weighting the action associated with each rule by its DOF.
I € € € Control Sysfems Magazine
Table 1 Fuzzy Linguistic Functions of the Reactor Period, Power Fraction, and Rod Position Subset
Range
Subset
DOF
Range
DOF
~~~
Period ( T ) , sec: Too short Short Positive Long Too long
Negative
1.00 0.98 0.98 0.90 0.90 0.80 0.80 0.40 0.40 0.00
2.0 - 0.02T 1.o
6.0
Slightly high -
1.o
0.05T
Near
1.314 - 0.002627
.o
1
Close
2.0 - 0.002T 1 .o
0.8 -0.8
4.0 < A H 2.0 < A H < 4.0
Rod withdrawal ( A H ) , in.: Excessive
Power fraction (PF): High
1.o
O