Advanced Process Control: Fuzzy Logic and Expert Systems
Applying fuzzy logic to control the reactor using only the three existing process measurements—output flow, composition, and temperature—imposes a severe performance limit on the system. Without a mathematical derivative capability in the rule syntax the system can react to the current values of the measurements, but not to how fast they are changing.
Prior articles in the Control Methods series:
Applying fuzzy logic to control the reactor using only the three existing process measurements—output flow, composition, and temperature—imposes a severe performance limit on the system. Without a mathematical derivative capability in the rule syntax the system can react to the current values of the measurements, but not to how fast they are changing. However, derivative action is very helpful in controlling variables that respond with a dominant capacity lag. For this application, product temperature is a lag dominant variable.
For this reason, the design needs a fourth controlled variable—incremental temperature change. This allows the design to include logic that reacts more strongly when the temperature is changing than when it is steady. The setpoint for this variable is 0, meaning that the system should seek to keep temperature constant at its absolute setpoint.
Reactor controls use three subsets for the controlled variables, which are applied to the measurement error to accommodate a variable set -point. The controlled variable error subsets are: small negative (NS), zero (ZE), and small positive (PS).
The design uses five subsets for the output variables, to accommodate the number of combinations of the 4 controlled variables. The subsets that describe the manipulated variable changes are: medium negative (NM), small negative (NS), zero (ZE), small positive (PS), and medium positive (PM).
The design also includes logic to decouple product flow and composition. For example, if both product composition and product flow are high, then the logic should force a decrease in both ingredient flows. But if the % A is high but product flow is on target, then the logic should force a reduction in ingredient A and an increase in ingredient B to change composition without changing total flow rate.
Table 1 shows the rules for changes in the flows of ingredients A and B to control product flow and composition. (In this context, positive error means measurement is higher than setpoint.)
Matrix intersections define the logic of the rules. For example, the combination of a positive error in total flow (PS) and negative error in product %A (NS) requires a small decrease in Fa (NS) and a medium decrease in Fb (NM). There are a total of nine combinations. The rule for each combination forces two control actions.
Table 2 shows a similar rule set for controlling product temperature and its incremental change.
For example, when temperature error is positive (PS), but temperature change is negative (NS), then steam flow should not change (ZE). Again, there are nine combinations, but each has only one control action. Since steam flow does not affect either product flow or composition, this part of the logic does not require any decoupling responses to change the ingredient flows.
At four-second intervals, this fuzzy logic controller 'fuzzifies' control inputs, evaluates both rule sets using the fuzzy inputs to generate fuzzy output variables, and de-fuzzifies these values to obtain values for incremental changes in all three manipulated flows.
Fuzzy logic control performance
The trend graphic shows the response of the fuzzy controls to the same changes in production rate and product composition as were used for the previous control applications.
Certainly, this fuzzy logic application provides adequate control. The question is: how does it compare to basic regulatory control and advanced regulatory control of the same process?
Table 3 shows that the performance of this fuzzy logic controller is worse than either form of regulatory control, with one exception. The fuzzy logic provided superior control of product composition during a production rate change, showing an index of 0.003. This is 5 times better than advanced regulatory control. This is because the requirement for maintaining composition is so straightforward. The two ingredient flow loops have identical dynamics, and the reactor is a pure delay. As long as the logic changes the ingredient flows simultaneously and in the proper proportion, product composition will remain constant.
By every other measure, performance of this fuzzy control system is relatively poor. Since the logical design lacks any counterpart to feedforward for temperature control, the temperature performance index for production rate changes is 1.35, 48 times worse than advanced regulatory control. On a production rate change, the temperature drops almost to the specification limit of 120 °F, with potential to make off-spec product.
Because the design does not include a composition change variable, the logic could not provide any equivalent to a derivative function for composition control. Consequently, the index for composition setpoint changes was worse than for basic regulatory control, 2.7 vs. 1.79. Since the temperature control logic is essentially the same as simple feedback control and the temperature change variable allows a derivative-like response, the temperature index for composition setpoint changes is close to that for basic regulatory control, and much worse than advanced regulatory control.
A much simpler fuzzy logic controller could have been applied. If the product flow and composition control logic had not included decoupling actions, the overall solution would have been functionally equivalent to single PID loops without derivative function, and the performance would have been worse in all aspects.
Likewise, a more complicated fuzzy logic controller could have been applied. Feedforward logic could have been included in the temperature control rule set by adding variables for changes in the ingredient flows. Similarly, the logic could have been expanded to include a composition and/or flow change variable, or variables related to ingredient temperatures. But with the addition of every new variable into the design, the number of combinations and rules increases exponentially.
Further, there is no way in fuzzy logic to provide the equivalent of dynamic compensation. Changing the ingredient flows does not immediately affect product temperature. For proper compensation, the logic would have to be capable of delayed actions, which would require creating timers and signal queues. The solution would have to be much more complex.
The fuzzy logic controller provided superior control of product composition during a production rate change.
Fuzzy logic is a well-defined and mature technology. Its success depends on the quality of the logic implemented in the rule set(s). In contrast to fuzzy logic, there is no precise definition for expert system technology. The only accepted definition is that an expert system is one whose performance can't be distinguished from that of a human expert.
It is an axiom of process control that no automatic control system can perform as well as an expert human operator who is 100% focused on controlling a specific variable with manual control. Human beings are smarter than any computer system. They can integrate a wide range of dynamic and steady-state information that may not be available to a control system into control action decisions.
But this level of intelligence can't be designed into a control system until it is obtained from the expert who has it. The design and success of an expert system relies entirely on the skills of the 'knowledge engineer' who extracts process control information from those who are identified as experts.
Furthermore, not all experts are created equal. Not all experts can clearly explain what they know. They will often disagree, or have varying degrees of correct understanding.
Because there is no precise definition of the technology of an expert system, it is impossible to quantify what its performance can or will be. Simply put, its relative performance will only be as good as the engineer's skills, process understanding, dedication, and budget can make it.
A rule-based system uses a set of concepts and tools that will probably be unfamiliar to process operators. Depending on the effort put into its human interface, such a system will appear more or less as a black box. Much depends on whether the rule-based system is used in closed-loop control, or functions in an off-line advisory mode. They will have little or no understanding of how it works, how to adjust its behavior, or what to do if they disagree with its decisions, other than simply ignoring or disabling it. This makes it even more important to involve the operators in the development of the system.
The objective of a rule-based system is to achieve control through a set of rules that imitates the analysis and decision-making process of an experienced human operator. But there is very little that is standard about how humans think and make decisions. For this reason, rule-based systems are very individual and unique solutions with a variety of complexity and scope.
This is an advantage and a disadvantage. Rule-based systems can be more flexible and creative than other control technologies. They provide a convenient way to introduce non-mathematical considerations into a control solution, and can include inputs that are difficult or impossible for other technologies to consider. Rule-based control systems can be the best solution for mixed systems where control logic must take several kinds of conditions into account, and any system is better than fully manual control.
But this flexibility becomes a liability when it is not needed. Rule-based systems are a poor replacement for even simple PID loops, and they can quickly become too complicated when more complex control structures are needed. There is no simple way to deal either with interactions among process variables or process dynamics, because the logic of the rules generally evolves from steady state responses. As the number of rules increase, either in the original design or through modification over time, there is a strong potential for introducing unrecognized conflicts into the overall logic. Until they are debugged, this can easily degrade production operations. Such a conflict may not be immediately evident and its consequence can appear unexpectedly.
Further, a fuzzy logic or expert system applied for closed-loop control still has to be tuned, and it is just as vulnerable to the problems created by varying process gains as any other system. A system under rule-based control can still oscillate, and there are no widely accepted procedures for tuning these systems. Often, the designer is the only one who understands the rule parameters well enough to tune them. Unless the rule structure is fairly simple, their performance is likely to degrade when the designer is no longer available to maintain the system.
Generally speaking, the performance of rule-based systems for typical process control problems is not as good as mathematical algorithms, which are more standard, efficient, and powerful.
The next installment in this series will introduce the concepts of model predictive control.
Lew Gordon is a principal application engineer at Invensys; www.invensys.com
Table 1. Rule set for changes in Fa and Fb
%A error PS
%A error ZE
%A error NS
Total Flow error PS
Fa = NM
Fa = NS
Fa = NS
Fb = NS
Fb = NS
Fb = NM
Total Flow error ZE
Fa = NS
Fa = ZE
Fa = PS
Fb = PS
Fb = ZE
Fb = NS
Total Flow error NS
Fa = PS
Fa = PS
Fa = PM
Fb = PM
Fb = PS
Fb = PS
Table 2. Rule set for changes in steam flow
Temp error PS
Temp error ZE
Temp error NS
Temp Change PS
Fsteam = NS
Fsteam = ZE
Temp Change ZE
Fsteam = NS
Fsteam = ZE
Temp Change NS
Fsteam = ZE
Fsteam = PS
Fsteam = PM
Table 3. Fuzzy logic reactor control performance
Change production rate
Change product composition
Basic regulatory control
Advanced regulatory control
Advanced fuzzy logic control
Other fuzzy logic articles:
Annual Salary Survey
After almost a decade of uncertainty, the confidence of plant floor managers is soaring. Even with a number of challenges and while implementing new technologies, there is a renewed sense of optimism among plant managers about their business and their future.
The respondents to the 2014 Plant Engineering Salary Survey come from throughout the U.S. and serve a variety of industries, but they are uniform in their optimism about manufacturing. This year’s survey found 79% consider manufacturing a secure career. That’s up from 75% in 2013 and significantly higher than the 63% figure when Plant Engineering first started asking that question a decade ago.