Copyright © IFAC 12th Triennial World Congress, Sydney, Australia, 1993
MODELING OF PROCESS CONTROL SYSTEMS IN OMOLA B. Nils.'ion Department
0/ Automatic Control, Lund Institute a/Technology, Box 11 8, S-221 00 Lund, Sweden
Abstract: In this paper an object-oriented approach to modeling of process control systems is discussed . Many control methodologies uses a limitied number of primitives as building blocks which are based on a mathematical framework using equations and events. In Omola, an object-oriented modeling language, model entities are defined as classes. A class is composed of attributes which are definitions of model components. A class inherits attributes form its super class. The paper conclude that Omola can describe integrated control systems. The paper also conclude that there is a need of additional structuring principles and hierarchical control methodologies.
1.
INTRODUCTION
Modeling and the use of models are gaining more and more interest in industry. Because of economical and environmental demands on the process industry material and energy are recycled. Together with just-in-time production and increased safety arrangements the processes becomes complex and hard to overview. Studies of the dynamic properties of the industrial processes is therefore important. The design of all parts of the control system require dynamic studies, for instance regulators for continuous control, sequences for start-up and shot-downs and diagnosis modules for safety control and production monitoring. Dynamic simulation is an important and frequently used tool in control engineering. Tools available today, with few exceptions, are based on the Continuous System Simulation Language standard, CSSL [Augustin et al., 1967], which use state-space description as model representation. The drawbacks are explicit ODE representation and poor event simulation capability. In this paper the object-oriented modeling language Omola is used which handle system descriptions on equation-oriented form together with discrete events, see [Mattsson and Andersson, 1990] . The events can be explicit, time dependent events, and implicit, state dependent events. The paper discuss an object-oriented approach to modeling of integrated process control systems. The discussion is based on an example, a controlled continuous stirred tank reactor, CSTR.
2.
PROCESS CONTROL SYSTEMS
Process control systems of tomorrow will make it possible to integrate different control techniques, like continuous and sequential control, monitoring, decision support, optimization, planning, etc. See [Arzen, 1992]. The designers of a process control system like this must have tools that facilitate their work. There are a number of different tool excellent of creating good support for specific design methods. There must also be tools that can be used in the study of integration of the different parts of the control system. In this paper a process control system, composed of continuous control, sequence control and monitoring, is modeled together with a minor chemical process. The process example is a reactor, a typical part of a chemical plant. The reactor is an exothermic continuous stirred tank reactor, CSTR. In the reactor a chemical reaction is assumed to occur, A -+ E, and the reaction produce heat which must be removed . A more detailed discussion is found in [Nilsson, 1990] . The continuous feed to the reactor is controlled by a valve while the continuous outflow is set by the surrounding system. Heat is removed by a cooling jacket. The cooling medium flow can be changed by a valve. The process has two analog control signals, the two valves, three digital control signals, three switch valves and five analog measurements. The process control system of the tank reactor is composed of continuous controllers, sequential controller and diagnosis modules. 1043
have gone wrong. An intelligent help in faulty situations. The same methodology can be used to monitor other things like production conditions. Notice that the sequential controller can start and stop the continuous controllers and the diagnosis system. The sequential controller can be started and stopped form the out side. 3.
OMOLA
Omola is an object-oriented modeling language which provides powerful structuring concepts for modeling of large dynamical systems. It support both model structuring concepts and the inheritance concept. For an overview of the Omola language see [Andersson, 1989] or [Mattsson and Andersson, 1990]. In [Andersson, 1993] the discrete event concept in Omola is discussed. Omola is used as the textual description language of the model data base in OmSim, the Omola Simulation Environment, implemented in C++. The OmSim simulator can handle differential and algebraic equation systems combined with discrete events.
Fig. 1. The tank reactor, CSTR, with a process control system composed of continuous control system, CCS, monitoring control system,KCS, and a sequential control system, SCS .
The continuous controllers are used to control the reactor at the operation conditions. The most important goal for the controllers is to minimize the influences of disturbances on the operation conditions, i. e. , control problem. If the desired operation condition is changed they have to move the process to the new conditions, i. e. , the servo problem. The primary quality control goal is to produce the desired product B. The concentrations in the reactor are not measured so the reactor temperature is used as the primary quality control objective. It is controlled by a PID controller using the coolant flow valve as actuator. The secondary control goal is inventory control of the level in the reactor. This is done by a cascade structure of PID controllers using the level and inflow measurement and the feed valve as actuator.
In Omola models are represented as object classes. A model class is composed of a number of attributes. These attributes are model component objects classes, which can be of three major component categories, terminals, parameters and realizations. Terminals and parameters are the interface of the model while the realization is the encapsulated model interior. Terminal is a model component which describe model object interaction with another connected model. Parameter is a model component that allows the user to interact with the model, in order to adapt its behavior to new applications. Realization or behavior is a description of the internal model behavior. The realization can be of two different kinds primitive or composite. A primitive model express its behavior symbolically with equations and internal variables. A composite model is described by a structure of connected submodels.
The sequential controller is used to make start up and shot down of the process. In start up and shot down operations additional three-way switch valves are used . In start up the reactor is fed by solvent and not with reactant, this is done by the switch valve on the feed input. The solvent is heated to the right reaction temperature before reactant enters the reactor . By the use of a switch valve the function of the jacket can be changed from cooling to heating. During shot downs the reactor must be cooled and the reactant must be wash out. This washing out flow can not proceed down in the plant. Instead a third switch valve, on the outflow, makes the flow go another way.
Structural decomposition can be done recursively, using composite models, creating a structure hierarchy. Primitive models are described as differential and algebraic equations, DAE, with discrete events. The events can be explicit as time events or implicit as state dependent events. An object class inherits all its super class attributes. A local defined attribute overwrite an inherited attribute if they have the same name. This creates an inheritance hierarchy. Model components, terminals, parameters and realizations, are also object classes. Model and model component class definitions can be global and possible to reuse through inheritance. Model components class can also be defined locally inside a model.
The diagnosis system monitors a number of signals and diagnose the state of the process. It makes fault and production diagnosis. Fault diagnosis is used to make proper indication about what might 1044
posed of quality control system, QSC, and inventory control system, rcs, which are composed of other predefined controllers.
The process control system is composed of continuous controllers, sequential controllers and a diagnosis module. Simulation of the reactor with continuous and sequential control system is seen in [Nilsson, 1992]
A modification of the control system is easy to do by the use of inheritance. The old definition of the control system, CCS, can be overwritten by the definition of the new one. The only restriction is that the new control system must have terminals with the same internal structure as the old one. This is the analogy in modeling to polymorphism in object-oriented programming. If the model interface is not changed, only the interior structure of a submodel, then the surrounding submodels can not see any difference. In our case the temperature PID controller can easierly be changed to a state space feed back controller using the reactor and jacket temperatures. Actually this is not a pure polymorphism. The equation oriented problem solving extract all equations and manipulate them in order to create efficient simulation code. A small change in the interior of a model can have global effects on the equation system. Polymorphism in equation oriented modeling is more then just an unchanged interface, it is also unchanged causality.
Continuous Control System
Sequential Control System
The continuous or steady state control system is composed of three controllers. To keep the reactor at the desired steady state one need a stabilizing controller of the reactor temperature and a controller for the reactor level. The continuous controllers for the tank reactor can be described with the concepts discussed above. The reactor has one structured terminal describing the control signal of the two analog valves and the three digital valves. It has also one structured terminal describing the five sensors: level, reactor and jacket temperature, in and out flows. A model of the control system is connected to the reactor system through the control signal terminal and the sensor measurement terminal. This is seen in Figure 1. The control system is a composite model with an internal structure of submodels that represents the different SISO-controllers. The quality control system, QCS, is just a temperature PID controller which is an ordinary PID with reversed action. The inventory control system, rcs, is a cascade configuration which is composed of an inner loop with only a P controller and an outer loop with a PI controller.
A total control system solution of a real control problem always contain some kind of sequential control part as start up and shot down sequences, alarm and emergency activities etc. One very efficient way of defining sequences is the Grafcet notation. A Grafcet is composed of a limited number of objects and a syntax for coupling them. The most common Grafcet objects are the step, or state, and the transition. It is possible to create an hierarchy of Grafcets by using macro steps which is composed of other steps. By the use of the Omola event mechanism it is possible to develop Grafcet objects. Sequences based on Grafcet can be developed using graphics.
_ _ _ _ _ .I-- _ _ _ _
User Det. Library
\
-
,L... _ _ _ _ _
~--'--::::.;
\ \
\ '--
'-
---
Fig. 2. The continuous control system, ees, definition hierarchy. The black arrows show the inheritance, IS A, and the dashed arrows the owner hierarchy, HAS A.
4.
CONTROL SYSTEM REPRESENTATIONS
The class hierarchy in Figure 2 is divided into two major branches, primitive and composite controllers. Primitive controller are described by equations and events while composite controllers are described by a structure of other controllers. In the example four composite controllers are defined . The continuous control system, CCS, is com-
UserOet.-~--L..---1k Library
Fig. 3. The class hierarchy in the sequential control library. The Grafcd primitives are defined as classes that are specialized in composite Grafcet classes.
1045
The sequence, in Figure 1, can be structured in three steps, start up, continuous production and shot down . The inheritance hierarchy, seen is in Figure 3, the SCS is a Grafcet model and is composed of the two macro steps, Start and Stop.
Another problem is multiple representation of the same object. Model descriptions of a process object or a control object is used in different control methodologies. One example above is that a controller in the continuous control system also is modeled in the DMP model as model equations and model assumptions. A change of a controller means that the DMP system also has to be remodeled. One solution to this is the multi view object, MVO, [Arzen, 1992] . An object can be represented in different contexts, views, and these representations are clustered together with MVO.
Monitoring Control System The monitoring control system in the example, in Figure 1, is based on the DMP diagnosis methodology, see [Petti and Dhurjati, 1991]. DMP stands for Diagnostic Model Processor and it is based on a few object types connected in a structure. Measurements enters model equations on residual form. If the measurements confirm the model equation then the residual becomes small. If the model equation can not predict the measurements then the residual becomes larger which indicate the an model assumption is violated. The second object is therefore the model assumption. A number of model equations can be based on the same assumption and vice versa. The relations between equations and assumptions are described by connections. All connected and scaled residuals are compared in the assumption generating a failure likelihood of the assumption.
I would like to thank Mats Andersson, the inventor of Omola, and Karl-Erik Arzen for many useful discussions.
6.
ANDERSSON, M. (1989): "An object-oriented modeling environment." In IAZEOLLA et al., Eds., Simulation Methodologies, Languages and Architectures and AI and Graphics for Simulation, 1989 European Simulation Multiconference, Rome, pp. 77-82. The Society for Computer Simulation International. ANDERssoN, M. (1993): "Modelling of combined discrete event and continuous time dynamical systems." In Proceedings of the 12th World Congress of Automatic Control. ARZEN, K .-E. (1992): "A model-based control system concept." Report ISRN Department L UTFD2 /TFRT - -3213- -SE, of Automatic Control, Lund Institute of Technology, Lund, Sweden. AUGUSTIN, C. D. C., M. S. FINEBERG, B. B . JOHNSON, R. N. LINEBARGER, F. J. SANSON, and J . C . STRUSS (1967): "The SCi continuous system simulation language (CSSL)." Simulation, D, pp. 281-303. MATTSSON, S. E. and M. ANDERSSON (1990): "A kernel for system representation." In Preprints 11th IFAC World Congress, volume 10, pp. 91-96, Tallinn, Estonia. NILSSON, B. (1990): "Object-oriented modelling of a controlled chemical process." In Preprints 11th IFAC World Congress, volume 10, pp. 22-27, Tallinn, Estonia. NILSSON, B. (1992): "Object-oriented chemical process modelling in Omola." In Proceedings of the 1992 IEEE Symposium on ComputerAided Control System Design, pp. 165-172. PETTI, T. F. and P . S. DHURJATI (1991): "Object-based automated fault diagnosis." Chemical Engineering Communications, 102, pp. 107-126.
The primary use of the DMP in the example is in fault diagnosis. Finding which model assumption that is violated, e. g. , sensor bias or stucked actuator. A secondary use is as production monitoring. Assumptions can also be production goals, like certain reaction rates, indicating how well the process perform. Notice that the MCS contains equations and assumptions describing the reactor and also other parts of the control systems, like assumptions about the PID controllers. 5.
REFERENCES
CONCLUSION
We have seen that different process control system methodologies are based on a limited number of basic primitives which can be defined in Omola. These primitives can be described by differential equations and discrete event descriptions. The development of large control systems are facilitated through reuse and polymorphism using inheritance. Another important facility is abstraction through decomposition hierarchies. This can be done in the Omola language with success. Building large decentralized process control systems is facilitated by the use of decomposition and inheritance. The controlled tank reactor discussed above can be used in a plant example. The local reactor control system is then supervised by a global plant control system. But there is a lack of methodology for hierarchical control system development like this.
1046