Copyright C IFAC Inaegration oC Process Design and Ccmtrol. Baltimore, Maryland, USA, 1994
SYSTEMATIC PROCESS MODELLING:A TOOL FOR INTEGRATING PROCESS DESIGN AND CONTROL
R. W. JONES" lad P. J. GA WTHROp.... -Department of Mechanical Engineering, University of Auckland, New Zealand --Department of Mechanical Engineering, Glasgow University, Glasgow G12 8QQ, Scotland, U.K.
Abttrad. This paper coDSiclers systematic process modelling and the fundamenlal role it can play in the analysis of ahCIIIIUve COdJOI.and opcl1ltiDg IlJalcPcs. In pIJticular a set of tools called the ModcUi~ T.. nsfonnation Toolbox, based upon the band papb approach to aySlem repraaUtion, ~ discussed with rcganllo the abilily to automaticllly JCnc..te alternative model rcprcscIIIations and system cbaJattcrislics, IUdt IS time and fRqllCnc:y response. This is achieved by coupling the MIT to 1Onw- aucll as the MAn.AB toolboxes.
Krr Wonb. mocIc1liD&.
Bond paph, co~cr-aidcd process design, aulomatic model JCRCration, process conlrol, structural opclllbility,
1. INTRODUCTION
mechanical, thermodynamic and hydraulic components. Bond graph based methods have been developed over the years and these developments have been recorded in textbooks (Rosenbergand Kamopp, 1983; Thoma, 1990).
Compared with other branches of engineering, process engineering is characterised by the complexity of the dynamic models associated with it and the difficulty of obtaining these models. As processes have become more complex and dynamic performance more demanding, there has been an inexorable growth in more rational, quantitative approaches to system design and operation . This interest is reflected in the introduction of an IF AC Workshop on the Interaction between Process Design and Control.
A key feature of a bond graph is that they provide a concise, complete and unambiguous representation of a dynamic system . Thus, in principle, a bond graph system representation can be automatically translated by computer into other representations, for example a simulation of the system dynamic response. This idea has lead to the development of simulation programs where the dynamic system is described in bond graph form . These include ENPORT (Rosenberg) and Tutsim (van Dixhoorn et ai, 1985). However, a theme of this paper is that this idea is more general : simulation is not the sole aim of system modelling.
Dynamic modelling and simulation of integrated processes is a fundamental component in the analysis of alternative control and operating strategies. The final evaluation of the operability of a system is through simulation and IS software packages are developed to trade off controllability, operability and economics, e.g. see Winter (1992), an effective modelling and simulation tool will be an essential part of the package. It is precisely because of this that it is so important to have techniques for describing, manipulating and communicating such models.
At its highest level, the bond graph provides a symbolic description of a system . It is therefore ideally suited to symbolic, rather than numerical, approaches. In particular the bond graph can be coupled with symbolic algebraic computation to automatically generate alternative system representations. These include state space equations and transfer functions, where functions and parameters remain in a completely symbolic form . Thus, structural controllability techniques (Russell and Perkins, 1987; Lin et al ., 1991) could be applied directly in the assessment of the systems operability . It is also particularly useful for highlighting the effect of particular system parameters on the overall behaviour.
Rather than concentrate on developing specific models for specific situations, it is more worthwhile in the long run to develop generic techniques which can then be applied to develop specific models in a more efficient way. This concept ofmetamodelling was originally pursued within the Engineering Design Research Centre at Glasgow University to generate a set of automatic modelling tools which have been utilised in both process systems (MacKenzie, et aI., 1991; Gawthrop et aI., 1993) and in the robotics area (Gawthrop, 1991). This set of tools called the modelling Transformation Toolbox, have been based upon the bond graph description . Within the TooIbox system modelling is viewed as a set of transformations between representations . Bond graphs form a core representation for this purpose. In this paper it is shown that the use of bond graphs for systematic modelling of process systems provides a solid and flexible foundation from which to develop software packages to analyse the interaction between process design and control.
Such a symbolic model can be readily converted into a numerical form and in conjunction with a description of the model uncertainly be coupled with appropriate robust control software, e.g . MATLAB's Robust control and Il-synthesis tool boxes, to examine the attainable system performance. A similar investigation into the interaction between system design and control has already been carried out in the Mechatronics area using the Model Transformation Toolbox (Gawthrop, 1992). Only conventional compensators were considered and simulations in conjunction with frequency response plots were used to compare control performance.
Bond graphs were introduced some 30 years ago by Paynter (1961) as a unifying notation for systems which involve energy exchange; important examples are systems involving
Alternative system designs can also easily be accommodated, the inherent object-orientated nature of bond graphs allows for the easy change, expansion, or contraction of the model .
153
Bond Graphs have a number of advantages compared to block diagrams for representing systems.
2. BOND GRAPHS FOR SYSTEM MODELLING , The bond graph representation and its corresponding methodology (Rosenberg and Karnapp, 1983) provide a systematic and insightful way of generating the equations describing such dynamic systems and, as such, support the analysis of dynamic systems. They have the important property that, on the one hand, the bond graph diagram relates closely to the structure of the system being modelled, yet, on the other hand, the bond graph contains enough information to derive other system representations such as state space equations. They provide a unified description of the dynamics of both technological and non-technological systems.
The close correspondence between the bond graphs and the physical system it represents. conserves structural information that is often lost in a block diagram . This has the additional advantage ofma1cing the model very amenable to modification for the purpose of process development and 'what if?' simulations. One energy bond represents a pair of across and through variables which would require two separate connections on a block diagram. The bond graph is thus a more concise system description.
For technological systems, the quantity which provides a unifying measure across physical domains is energy. Within each physical domain energy flow, or power is the product of two variables: an Q(:rOS$ variable and a throttgh variable.
The great power of bond graph description is that causality can be automatically assigned after the system has been described by the bond graph. In contrast, causality has to be considered before a block diagram can be drawn.
However, bond graphs can also be used in non-technological domains. Pseudo bond graphs arise when energy is not used as the unifying variable. One example of this is in economic systems. Here energy is replaced by money and the relevant effort and flow variables are price and flow of orders.
At its highest level . the bond graph provides a symbolic description of a system . It is therefore ideally suited to symbolic. rather than numerical approaches. In particular, the bond graph can be used to derive various system representations.
2 I Process Modemog The current software implementation of MTI is UNIX based and in addition to standard UNIX tools. relies on Prolog (Clocksin and Mellish. 1984), Redllce (Rayna, 1987) and Mat/ab (Mol er. et al.. 1987) as high-level languages to accomplish the transformations.
Power (or pselldo-power) conserving junctions form the key phase of modelling using bond graphs. Thus a system is regarded as a set of junctions: and to each junction is associated a name, a type and a set of bonds. Each bond has 5 attributed : a name, the component type to which it is connected, a direction (in or out), a casualty (effort and flow) and a constitutive relationship. These bonds may either be connected to a one-port component (effort-store, flow store or dissipator) or a two-port energy conserving component (transformer or gyrator).
At the moment a graphical front end is provided by an xfig (standard public domain figure editor) diagram of the bond graph, together with a description of the system's components. Full details of the tool box can be found elsewhere (Gawthrop et aI., 1991). 2 2 Differential-Algebraic EQuations
Both direction and causality refer to the junction end of the bond. Using the standard bond graph approach, variables describing quantities relevant to process engineering are divided into effort andflow variables. Some possibilities are listed in Table 1.
1 2 3 4
Domain Hydraulic Thermal Hydraulic Thermal
Effort Pressure Pa Tempen.ture degK Pressure Pa Temperature degK
Dynamic process engineering problems typically give rise to a mixture of ordinary differential equations (ODEs) and algebraic equations: such equation sets are called differential algebraic equations (DAEs) . The simulation of such systems could cause difficulties. The work of Gear and Petzold (1984) has not only given rise to algorithms for simulating systems described by DAEs but also has emphasised the so called "index problem': high index system are hard to simulate.
Flow Volume flow rate m O . Entropy flow rate WdegK-1 Mass flow rate I:g.-I EnthaJpy flow rate WdegK-1
Pantelides et al (1988) highlight two distinct sets of chemical engineering systems problems that give rise to DAEs with high index systems with internal constraints imposed by. for example from design situations where a desired system output is required. There are algorithms available for detecting and solving index problems e.g . (Chung and Westerbers. 1990). These methods are equation based : they operate on the equations which collectively describe the system .
Table I: Effort and flow variables The first two choices have the property that the product of the effort and flow variables is power and thus lead to true bond graphs; the latter two choices do not have this property and thus lead to pseudo bond graphs. The advantage of true bond graphs is that they can be readily coupled (via bond graph transformers) to other energy domains; the advantage of the latter is that they corresporid to standard process engineering practice (Gawthrop, et al ., 1993). Pseudo bond graphs will be used throughout the rest of the paper. The standard bond graph junctions may be used in either case:
An alternative approach is possible using Bond Graphs. Bond Graphs provide a systematic way of exploring the causal implications of system approximation before the equations themselves are formulated . Algebraic loops can be symptoms of deeper problems within the model. This is investigated by Brooks and Cellier (1993) with regard to the modelling of distillation columns. The existence of algebraic loops is used to invest inadequacies in thermodynamic chemical theory . Several ways of eliminating the algebraic loops and producing a dynamic distillation column model result from the bond graph description .
At 0 junctions, the effort variables are common and the flows sum (algebraically) to zero At 1 junctions. the flow variables are common and the efforts sum (algebraically) to zero
154
2J
J .O. CONTROLLABD..IIY AND OPERABILITY
Model-based Order Reduction
There are many approaches to the analysis of systems for plant and control system design . Most are based on an assessment of the ability of the system to meet some criterion related to the quality of control which can be achieved, and are referred to by terms such as operability, resilience and controllability .
Although the 'correct' model of a system may be high-order, it may be useful to approximate the system by one of lower order for a number of reasons: • to comprehend the system behaviour • to obtain better numerical properties - the high order system may be numerically stiff
The synthesis of a design can be viewed as consisting of the following two process sub-problems:
• to give simpler control system design.
I . Generation of all feasible system designs.
In the linear case, one approach is to derive the full state equations for the system and apply some standard model reduction algorithms to these equations; this is a black-box approach to model reduction. In contrast because bond graphs provide direct insisht into the interaction between individual components they allow a physical model-based approach to order reduction to be taken.
2. Evaluation and selection of a system design.
The first lub-problem is usually addressed within the framework of controllability and observability properties. Generation of all the alternative feasible control structures is achieved through combinational algorithms which incorporate the feasibility criterion in an appropriate way.
2 4 Model TrapsfolDlatiop
Once a number of feasible system designs has been generated, some choices will obviously be eliminated due to physical or operational considerations, or simply because of engineering intuition. In the framework of linear systems, further evaluation involves assessment of operability characteristics.
System modelling, the procedure for aniving at an appropriate (for its use) model can be viewed as a sequence of transformations between system representations as indicated in Figure I. The start of this chain of transformations is the physical system; an intermediate representation is the core representation; the final representation is the system model in an appropriate form . Bond graphs are used for the core representation.
In this contribution we are going to briefly consider the two sub-problems in relation to systematic process modelling and the current situation that exists in MTT . Structural controllability analysis is introduced for the purpose of generating feasible designs and time- and frequency response analysis is available for evaluating these designs.
• Physical system
• Tran$formation\
'* Repruentation\
J I
Structural controllabillity is an important consideration in the synthesis of control systems due to the uncertainty of the values of process parameters, especially during the early design stage.
• • Tran$/ormationN
Structure Coptrollabilitv
'* Core [('presentation
• Tran$/ormationN+l => Reprr .•entationN+l
Consider a linear, time invariant system
• Tran$/ormationN+l => R€"prruntationN+l
All: + Bu
•
y
Cx + Du
where: x is an n-dimensional state variable vector, u an mdimensional manipulated variable vector, y and r-dimensional output variable or control objective vector and A, B, C and D are sttuctural matrices (see the definition below).
Figure I : System modelling Transformations There is a wide range of system repreJefltatm/lS which the user may wish to view and the software tools provide a means of transform ing between such representations .
Definition J: (Structural matrix). A structural matrix A is a matrix having fixed zeros in certain locations and arbitrary entries (eenoted by X) in the remaining locations instead of numeric values. An X placed at the junction of a row and a column indicates that the column variable affects the row variable in some way . Definition 2: (Structural system). A structural system
For example in Gawthrop (1992) MII and Matlab were used to automatically generate • state-space equations,
(~ ~}s an ordered pair of structural matrices (refer to the
• transfer functions,
equations above) • frequency responses,
Definition 3: (Structurallyequivalelll). The systems (A,B) and (A', B') are structurally equivalent if there is a one-to-one correspondence between the locations of the fixed zeros and the non-zero entries of the corresponding matrices of each system (Lin, 1974)
• root-locus diagrams and • system simulations. Similarly for this paper many of the same representations will
be generated.
Definition 4: (Generic rank). The generic rank of a structural
155
matrix A is the highest rank which can be achieved by any structurally equivalent numeric matrix . \ Output structural controllability is a structural controllability concept based on process outputs introduced by Lin et al. (1991). Unlike the other structural controllability techniques, output structural controllability is not a structural extension of numerical output controllability .
The system depicted in Figure 2 consists of two uniform open tanks containing an incompressible liquid. The first tank is heated by an element generating qW. The inlet temperature is 10, and the specific heat of the liquid is taken as Cplkg- J equal . The fluid enters the left-hand tank. flows between the tanks, and leaves the second tank via short pipes which restrict the flow.
Definition 5: (Output structural controllability). A structural
Each tank, being uniform, has a linear constitutive relationship relating state (mass) to pressure
system S =
(~ ~}s output structurally controllable if there
ex ists the systematic pairing of control objectives and manipulated variables into SISO loops for all control objectives of the system (Lin et al . 1991).
Pi =
and it is assumed that each pipe acts as a linear resistance to flow
Definition 6: (Cause-and-ef!ect matrix). For a structural system S =
(~ ~). an r x m matrix called the cause-and-effect
lip, =
matrix (CEM) can be formulated (see Lin et al . 1991).
For simplicity the three flow resistances are taken to be equal .
(~~».
Figure 3 shows the bond graph of the stirred-tank heater system . The upper half of the bond graph represents the hydraulic properties of the system while the lower half corresponds to the thermal properties
I. From a control objective, search every possible access by a manipulated variable. It will be any or all of the following: direct access via matrix D direct access via matrix B to that state variable, which is the same node as the control objective (iii) indirect access form other states (via matrix A ) but these states are not control objectives. These make a row in the CEM. The non-zero entries indicate which column(s) i.e. manipulated variable(s) can influence this control objective, i.e. this row. (i) (ii)
s
~
r
o
R I I I I
(~~)
C
R
C
R
I I
I I I I
t
I I I I
t
I I I I
t
C
R
C
R
t
2. Go to next control objective and repeat Step I . A structural system S =
r,m,
where Apl is the pressure drop across each pipe.
Algorithm : (Determination of the CEM from a stn/ctl/ral system
i. 4, m ,
R
is output structurally S
1 1 1 1 1 1 1 1 1 T
~1
controllable if and only if the generic rank of the CEM is r, where r is the number of control objectives.
T
~O~
T
T
--=-O~
q
S
L
-·--------u ---------
o
r
I
r
r
Sf represents the flow source and Se the enthalpy of the flow source. R elements correspond to floN' resistance the flow through a short pipe being represented by a I junctionlR combination. There are three of these in the coupled-tanks system . The dynamics of process systems are, in this paper, due to C elements whereby aflow is integrated to produce an effort. The open-topped tank is the simplest of these C elements with an innow fj and an outnow fo . The two 0 junctionlC combinations represent the two tanks.
The process was studied by Wong (1984) and is shown in Figure 2.
r
r
S
Figure 3: Stirred-tank heaters: bond graph
4. EXAMPLE
JI
q2
l
Structural controllable conditions can provide a means for assessing whether it is possible for a set of inputs and outputs to define a system which is controllable (Russell and Perkins, 1987). However, whether the control structures work effectively or not will depend on the physical parameters of the system . Structural tests are therefore necessary but not sufficient for defining a 'feasible' control system.
Temperature is a transport property and signal bonds are used to indicate the lack of interaction with downstream temperatures . The dotted signals indicate that the thermal resistors and modulated by mass flow rates and the thermal capacities by tank masses. The system has four states: the mass, the enthalpy of the liquid in each tank. The third and fourth state equations renect the thermal properties of the process and are non-linear due to the xJ/x J terms. The
2
~ I
Figure 2: Stirred-tank heaters
156
thermal properties do not affect the hydraylic properties. The steady-state was computed for the constant inputs f = fo ; q = qo; t - to
objectives tl and t2 cannot be achieved independently irrespective of wbich control configuration (q - t I, f - t2) or (q t2, f - tl) is used. This also shows that numerical and structural output controllability have different definitions . Structural controllability implies that we can not only get to another output but we can stay there. Another advantage of an automated modelling procedure is that system properties can be easily analysed.
· -((Xl - x,)g - arud Xl = (ar) ·
X, = · X3
· X4
((Xl - 2x,)g) (ar)
(%1 =((c,. U1. U, + u3) arx (ar%d 1 -
=(((%3 -
%4)%1 -
%2)g%3)
%'%3)g)
(ar%d
(g%,) Y1= - -
a
Figure 4: Coupled tanks: time constants
The structural controllability will only be assessed for the temperature control case. The above relationships can be simplified to a more recognisable form . Only the thermal properties are considered
To illustrate this point, the effett of f( (the inter-tank flow resistance) is investigated. Figure 4 shows (on a logarithmic scale) the effect of fJ on the systems two time constants . Decreasing the value of rl gives one decreasing time constant .•...
-
.
.., - ---r-- ... -·-;~'!"::~T':'--·-t---·~ ·--~·-··--·~ .-..----.• --
cu----~ -· I.7':::L--f---·L-L .--L..~-:::-:c-. Consider the output equation
y
... ~
~ ..
. .>
f-
i~: -~-+--'-; , .~,:r~-··---·-----·· ·-
y--·..:.----t.. -i . . . -:l ___L _ .;",.,__
= C' x
.r
where
C'
..~/~
0.7 ,..•, .
,.C,_. __ • _ _ _
..
~ -<... ~
.{
/ -~--~~: ___ -t~-t--" '---( ' T--"--" "
(~ ~) al
:~ ..-
.. .~ .- -- ..... - .- --
._--t - - _.... .. __ .. _--._.-
~~-U~~~7'~O~A~~CU~~-~12~~I.~'~I~.'~~IJ~~
The rank of the output controllability matrix (C' B', C' A' B') is equal to 2, if all parameters are assigned proper values. Therefore, the system is output controllable in the numerical sense.
Figure 5: Coupled tanks step response
If the system is considered rom the structural point of view, the structural system is :
Ur---'---~----~--~-----r
___
o _ ___M ? ;---··--__···____ +-.._ _.._ .____.1______ _
B
(~:)
o =
0
:'
;-
:
4l " " - - \: .. [
J .....
. !
;
;
~. -
__ ~ _
____
~ __
_ ___ __ ____ _
~-
<.
; ....
....
...:: . -: ~ .. --.-.-...: ....
In fact, this is a defective structure , The CEM of the system can be set up, using the algorithm ofLin et al (1991) as :
CEM =
(~:)
.
The generic rank of the CEM is equal to I, and not 2 which is the number of control objectives, so that the system is not output structurally controllable. Therefore, the control
Figure 6: Coupled tanks : frequency response
157
6. REFERENCES
and one time constant corresponding to one tank with area al
+ a2 . An increasing value of fJ gives doe increasing time Brooks, B.A., and F.E . Cellier (1993). Modelling of a distillation column using bond graphs. 1nl. Conf. on Bond Graph Modelling, La JoIl&, 315-320. Chung, Y., and A .W . Westernerg (1990). A proposed numerical algorithm for solving nonlinear index problems, Ind. Eng. Chem. Res ., 29, 1234-1239. Clocksin, W.F., and C.S. Mellish (1984). Programming in ProIog (2nd edition). Springer-Verlag. Gawthrop, PJ . (1991). Bond graphs: A representation for mechatronic systems. Mcchmonics, I , 127-156. Gawthrop, Pol. (1992). Design of mcchatronic systems using bond graphs. IMcchE Conf. on Mcchatronics, Dundee. Gawthrop, P.J., N.A. Marrison, and L.Smith (1991). MTT: A bond graph tooIbOlt. In Proceedings of 5th IF ACIIMACS Symposium on CADCS, Swansea, 274-279. Gawthrop, PJ., S.A. McKenzie and R .W . Jones (1993) . Modelling chemical processes with pseudo-bond graphs. 1nl. Conf. on Bond Graph Modelling, La JoIla. Gear, C.W ., and L.R. Petzold (1984). Ode methods for the solution of differential/algebraic systems. SIAMJ Numer. Anal., 21, 716-728. Lin, X., M.O . Tade, and R.B . Newell (1991). Int. J. Sys. Sei., 22, 107. MacKenzie, S.A., Pol . Gawthrop, RW . Jones and J.W. Ponton (1991). Systematic modelling of chemical processes. IF AC Symps. on Advanced Control of Chemical Processes, Toulouse. MoIer, C., J . Little, and S. Banger! (1987). Madab user's guide. Mathworks Inc. Pantelides, C.C., D. Gritsis, KR . Morison and R.W .H. Sargent (1988). The mathematical modelling of transient systems using differentiat algebraic equations. Computers in Chem. Engrlg., 12,449-454. Paynter, H .M . (1961). Analysis and design of engineering systems. MIT Press, Cambridge, Mass. Rayna, G . (1987). Reduce: Software for Algebraic Computation Springer. Rosenberg, R.e. , The ENPORT Reference Manual, Rosencode Associates Ltd., Lansing, Michigan . Rosenberg, R.D ., and D.e. Kamopp (1983). Introduction to Physical System Dynamics, McGraw-Hill. Russell, LW. and J.D. Perkins (1987). Towards a method for diagnosis of controllability and operability problems in chemical plants, Chem. El/g. Res. Des., 65, 453-461. Thoma, J.V. (1990). Simulation hy Hond Graphs. SpringerVerlag, Berlin. van Dixhoorn, J.J ., J.J .A.J. Beukeboom and J.W. Meerman (1985). Simulation of mixed bond graphs and block diagrams on P.C's using TIlTSIM, J. Franklin Institute, 319, 257-268. Winter, P. (1992) Computer-aided process engineering: The evolution continues. Chem. £I/g. Progress, 88, 76-83 . Wong, M .P.F. (1984). Assessment of controllability of chemical processes, PhD Thesis, Imperial College, London.
constant (tending to that of an integrator) and one tending to that of the second tank. al = a2 = r2 = I The step response for fJ = 0.1, 1 and 10 appears in Figure 5, and the corresponding frequency response (shown in Nyquist form) appears in Figure 6. The response of the system to an increase in q is also shown in Figure 7 for three different flowrates.
0''-
uJT---:-'-I1~:::+==;===:::=:::J
. . ..1.....j I I
,
..
I
I
i:
"- -+---iic--+--+--!
0.4
0.6
G.I
1.2
u
lA
1.1
Figure 7: Stirred-tank heaters: temperature-heat step response 5. CONCLUSIONS
It is now widely recognised that process control should be considered from the earliest stages of process design. There will be an increased emphasis on the development of appropriate software packages through which the interaction between process design and control can be considered as part of the design process. In this paper it has been shown that the use of bond graphs for systematic modelling and their coupling with algebraic software tools can play a fundamental role in the development of these software packages. Process design and synthesis should of course deal with the entire plant rather than individual unit operation and this can easily be accommodated by joining the bond graphs of the individual units. The achievable quality of control for a particular system is limited by nonminium phase characteristics, constraints on the manipulated variables and model uncertainty . Software has to be written to generate uncertainty descriptions as part of the MTT package. Once this facility is integrated, though it is not a trivial problem, then it becomes straightforward to couple software tool s for robust control to synthesis the controller and analyse its performance.
158