Intelligent Systems at the Service of Mankind
Intelligent Systems at the Service of Mankind Volume I November 2003
Edited by Wilfried Elmenreich, J. A. Tenreiro Machado, and Imre J. Rudas
The views and opinions expressed in all the papers of this book are the author’s personal ones. The copyright of the individual papers belongs to the authors. Copies cannot be reproduced for commercial profit. c 2004, Copyright protected.
Printed in Germany.
Table of Contents
Preface
v
1
Intelligent Control
1
A Modified Renormalization Algorithm Based Adaptive Control Guaranteeing Complete Stability for a Wide Class of Physical Systems J´ozsef Tar, Imre J. Rudas, Jan´os F. Bit´o, and Krzysztof R. Kozłowski . . .
3
Minimal linearization via HOSVD in LMI based control P´eter Baranyi, Yeung Yam, Domonkos Tikk, and P´al Michelberger . . . .
15
Automatic Language Control of Electrical Drives. Background and Applications J. F. Martins, A. J. Pires, R. Vilela Mendes, and J. A. Dente . . . . . . . .
29
Application of Fractional Calculus in Mechatronics J. A. Tenreiro Machado, Ramiro S. Barbosa, Fernando Duarte, and Nuno Ferreira . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
Module Library for Rapid Prototyping and Hardware Implementation of Vector Control Systems J´ozsef V´as´arhelyi, M´aria Imecs, J´anos J. Incze, and Csaba Szab´o . . . . .
53
Robotics
65
A Robust Certainty Grid Algorithm for Robotic Vision Wilfried Elmenreich and Raimund Kirner . . . . . . . . . . . . . . . . .
67
Force-feedback Tests for Medical Robots Iulian Iordachita, Alexandru Patriciu, Dumitru Mazilu, Gheorghe Catrina, and Dan Stoianovici . . . . . . . . . . . . . . . . . . . . . . . . . .
79
Gait Analysis of Natural and Artificial Walking Systems Manuel F. Silva, J. A. Tenreiro Machado, and Ant´onio M. Lopes . . . . .
87
2
i
Marker-Based Mobile Robot Positioning in Respect of Displacement of the Markers Istv´an Nagy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
99
A Real-Time Optimization for 2R Manipulators E. J. Solteiro Pires, J. A. Tenreiro Machado, and P. B. de Moura Oliveira . 109 Forward Kinematics of a Stewart Platform Mechanism Domagoj Jakobovi´c and Leo Budin . . . . . . . . . . . . . . . . . . . . . 121 3
Intelligent Manufacturing Systems
133
Communication Issues in Multi-Agent-Based Plant Automation Scheduling Yoseba K. Penya and Thilo Sauter . . . . . . . . . . . . . . . . . . . . . 135 Advanced Factory Automation System for Deburring and Dressing of Automotive Engine Parts Ulrich Berger and Raffaello Lepratti . . . . . . . . . . . . . . . . . . . . 145 Petri Net-Based Optimization of Production Systems Szilvia Gyapay, Andr´as Pataricza, J´ozsef Sziray, and Ferenc Friedler . . . 157 Production Part Approval Process in Quality Management System Marianna Lendvay and Attila L. Bencsik . . . . . . . . . . . . . . . . . . 169 Application of Product Model in Internet Based Robot Control L´aszl´o Horv´ath and Imre J. Rudas . . . . . . . . . . . . . . . . . . . . . 179 4
Data Mining and Learning Systems
187
Representing Directed and Weighted Graphs and Their Properties in a Relational Spatial Database Model ´ Agnes B. Nov´ak and Zsolt Tuza . . . . . . . . . . . . . . . . . . . . . . . 189 An Integrated Intelligent System for Data Mining and Decision Making Filip Ujevic and Nikola Bogunovic . . . . . . . . . . . . . . . . . . . . . 199 Business Rules Modeling by Means of F-logic, UML and Ontologies (problems and possible solutions) ˇ Mirko Cubrilo and Mirko Malekovi´c . . . . . . . . . . . . . . . . . . . . 211 Document Clustering Using Concept Set Representation L´aszl´o Kov´acs and P´eter Baranyi . . . . . . . . . . . . . . . . . . . . . . 225 Text Mining for Documents Annotation and Ontology Support Jan Paralic and Peter Bednar . . . . . . . . . . . . . . . . . . . . . . . . 237
ii
Fuzzy Relational Thesauri in Information Retrieval: Automatic Knowledge Base Expansion by Means of Classified Textual Data Domonkos Tikk, Jae Dong Yang, P´eter Baranyi, and Anik´o Szak´al . . . . 249 How to Combine Various Factors to Select Appropriate Knowledge Elicitation Technique? Sandra Lovrenˇci´c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Personal Agents in Distance Learning Systems Marko Rosic, Slavomir Stankov, and Vlado Glavinic . . . . . . . . . . . 271 Forgetfulness in Multi-Agent Systems ˇ Mirko Malekovi´c and Mirko Cubrilo . . . . . . . . . . . . . . . . . . . . 283 5
Algorithms and Methods
297
Multi-Head Rules in Equivalent Transformation Takahiko Ishikawa, Kiyoshi Akama, Hiroshi Mabuchi, and Yuichi Yamamoto299 Genetic Scheduling Algorithm for High-Level Synthesis ´ am Mann, and Andr´as Orb´an . . . . . . . . . . . 311 P´eter Arat´o, Zolt´an Ad´ Parameterization Through Null Space — A New Redundancy Resolution Method for Differential Kinematic Problems in Comparison to Other Methods Zsolt Kem´eny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Achieving Dependability in Time-Triggered Networks by Sensor Fusion Wilfried Elmenreich and Philipp Peti . . . . . . . . . . . . . . . . . . . . 335 Implementation of VLSI Routing Algorithms ´ am Mann, Csaba Megyeri, and Bence Golda, B´alint Laczay, Zolt´an Ad´ Andr´as Recski . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 6
System Modeling
361
Intelligent Engineering Modeling by Active Models L´aszl´o Horv´ath and Imre J. Rudas . . . . . . . . . . . . . . . . . . . . . 363 Optimizing Algorithms for System Level Synthesis P´eter Arat´o, Tibor Kand´ar, and Bence Cs´ak . . . . . . . . . . . . . . . . 373 A Verification and Validation Model for Software Systems J´ozsef Sziray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 Modelling Communication Requirements and Network Services in Distributed Systems with UML Antun Brumnic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
iii
Analysis of Systems with Backlash and Impacts through the Describing Function Ramiro S. Barbosa and J. A. Tenreiro Machado . . . . . . . . . . . . . . 411 Mathematical Model of the Half Bridge Resonant Converter Zolt´an Puklus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 UML Statechart-Based Verification and Testing of Embedded Systems Bal´azs Beny´o . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
iv
Preface The “information revolution” of our time permeates the entire lifestyle of our generation. While emerging visions of the “Information Society” with its financial, legal, business and privacy aspects became increasingly prominent during the past few years, the “traditional scene” of information technology, that is industrial automation preserved its significance as the field of ceaseless development, too. Since the old-fashioned concept of “Hard Automation” applicable only to industrial processes of fixed, repetitive nature and manufacturing large batches of the same product [1] were thrust to the background by keen market competition, the key element of this development remained the improvement of “Machine Intelligence”. Despite of the fact that L. A. Zadeh already introduced the concept of “Machine Intelligence Quotient” in 1996 to measure machine intelligence [2], this term remained more or less a mysterious meaning best explicable on the basis of practical needs. The weak point of hard automation is that the system configuration and the operations are fixed and cannot be changed without incurring considerable costs and downtime. Mainly it can be used in applications that call for fast and accurate operation in large batch production. Whenever a variety of products have to be manufactured in small batches and consequently the work-cells of a production line should be quickly reconfigured to accommodate a change in product, hard automation becomes inefficient and fails due to economic reasons. In these cases a new, more flexible way of automation, the so-called “Soft Automation” is expedient and suitable. The most important “ingredient” of soft automation is its adaptive ability of efficiently coping with changing, unexpected or previously unknown conditions, and working with a high degree of uncertainty and imprecision since in practice increasing precision can be very costly. This adaptation must be realized without or with limited human interference: this is one essential component of machine intelligence. Another important factor is that engineering practice often has to deal with complex systems of multiple variable and multiple parameter models almost always with strong non-linear coupling. The conventional analytical techniques-based approaches for describing and predicting the behavior of such systems in many cases are doomed to failure from the outset, even in the phase of the construction of a more or less appropriate mathematical model. These approaches normally are too categorical in the sense that in the name of “modeling accuracy” they try to describe all the structural details of the real physical system to be modeled. This significantly can increase the intricacy of the model and may result in a huge computational burden without achieving considerable improvement
v
of precision. The best paradigm exemplifying this situation may be the classic perturbation theory: the less significant the achievable correction, the more work has to be invested to obtain it. A further important component of machine intelligence is a kind of “structural uniformity” giving room and possibility to model arbitrary particular details a priori not specified and unknown. This idea is similar to the ready-to-wear industry, which introduced products, which can be slightly modified later on in contrast to tailor-made creations aiming at maximum accuracy from the beginning. These subsequent corrections can be carried out by machines automatically. This “learning ability” is a key element of machine intelligence. To realize the above philosophy in a mathematically correct and perfect way L.A. Zadeh separated Hard Computing from Soft Computing quite a long time ago. This revelation immediately resulted in distinguishing between two essential complementary branches of machine intelligence: the Hard Computing based Artificial Intelligence and the Soft Computing based Computational Intelligence. In the last decades it became generally known that Soft Computing employing fuzzy logic, artificial neural networks, and probabilistic reasoning is a fruitful orientation towards designing intelligent systems. Moreover, it became generally accepted that soft computing rather than hard computing, should be viewed as the foundation of real machine intelligence [3] via exploiting the tolerance for imprecision, uncertainty and partial truth to achieve tractability, robustness, low solution cost and better rapport with reality. Further research in the past decade rather confirmed the view that the typical components of the present soft computing as fuzzy logic, neurocomputing, evolutionary computation and probabilistic reasoning are of complementary nature and that the best results can be applied by their combined application. In our days the two complementary branches of Machine Intelligence, that is Artificial Intelligence and Computational Intelligence serve as the basis of Intelligent Engineering Systems. The huge number of scientific results published in Journal and conference proceedings worldwide substantiates this statement. The present book contains several articles taking different viewpoints in the field of intelligent systems. The first chapter comprises five papers on intelligent control. The second chapter gives an insight on intelligent robotics. Following five papers on the subject of intelligent manufacturing systems are presented. The fourth chapter deal with the subjects of data mining and learning systems. Chapter five presents algorithms and methods in the scope of an intelligent system. Chapter six containing seven papers on system modeling concludes the book.
Imre J. Rudas
J. A. Tenreiro Machado
vi
Wilfried Elmenreich
Bibliography [1] C. W. De Silva. Automation intelligence. Engineering Application of Artificial Intelligence, 7(5):471–477, 1994. [2] L. A. Zadeh. Fuzzy logic, neural networks and soft computing. Communications of the ACM, 37:77–84, 1994. [3] L. A. Zadeh. Berkeley initiative in soft computing. IEEE Industrial Electronics Society Newsletter, 41(3):8–10, 1994.
vii
viii
Chapter 1 Intelligent Control
A Modified Renormalization Algorithm Based Adaptive Control Guaranteeing Complete Stability for a Wide Class of Physical Systems József K. Tar1, Imre J. Rudas1, János F. Bitó1, and Krzysztof R. Kozáowski2 1
Institute of Mathematical and Computational Sciences, Budapest Polytechnic, John von Neumann Faculty of Informatics, Budapest, Hungary {tar, rudas, bito}@nik.bmf.hu 2
Chair of Control, Robotics, and Computer Science, PoznaĔ University of Technology, PoznaĔ, Poland
[email protected]
Abstract — A new branch of Computational Cybernetics based on principles akin to that of the traditional Soft Computing (SC) is outlined. Via restricting its applicability to a relatively limited class of non-linear, coupled MIMO systems’ control considerable computational advantages as a priori known, uniform, lucid, and reduced model- and structure size can be achieved. Furthermore, the often intricate and stochastic parameter tuning is replaced by simple and short explicit algebraic procedure especially fit to real time applications. It is proven in this paper that under quite common conditions the "Complete Stability" of the operation of the so obtained controllers can be guaranteed. It also is shown that the approach is quite versatile. Simulation examples are presented for the control of a 3 DOF SCARA arm suffering from various nonlinearities. It is concluded that the method is promising and probably imposes acceptable convergence requirements in problem classes considerably wider than the control of electromechanical devices.
1 Introduction The basic components of Soft Computing were almost completely developed by the sixties. In our days it roughly is a kind of integration of neural networks and fuzzy systems enhanced with high parallelism of operation, and supported by several deterministic, stochastic or combined parameter-tuning methods (learning). Its main advantage is that it evades the development of intricate analytical system models. Instead of that typical problem classes has been identified for the solution of which typical uniform architectures has been crystallized (e.g. multilayer perceptron, Kohonennetwork, Hopfield-network, Cellular Neural Networks, CNN Universal Machine, etc.). Fuzzy systems also use membership functions of typical (e.g. trapezoidal, triangular or step-like, etc.) shapes, and the fuzzy relations can also be utilized in a standardized way by using different, even parametric classes of fuzzy operators. The "first phase" of applying traditional SC is the identification of the problem class and finding 3
TAR, RUDAS, BITÓ, KOZàOWSKI the appropriate structured for dealing with it, normally is easy. The next phase, i.e. determining the necessary size of the structure and fitting its parameters via machine learning is far less easy. For neural networks certain solutions starts from a quite big initial network and apply dynamic pruning for getting rid of the "dead" nodes [1]. An alternative method starts with small network, and the number of nodes is increased step by step (e.g. [2-3]). Due to the possible existence of "local optima", for a pure "backpropagation training" inadequacy of a given number of neurons cannot be concluded simply. To evade this difficulty "learning methods", also including stochastic elements, were seriously improved in the last decade (e.g. [4-7]). In spite of this development it can be stated that for strongly coupled non-linear MIMO systems traditional SC still has several drawbacks. The number of the necessary fuzzy rules strongly increases with the degree of freedom and the intricacy of the problem. The same is true for the necessary neurons in a neural network approach. External dynamic interaction on which normally no satisfactory information is available influences the system's behavior in dynamic manner. Both the big size of the necessary structures, the huge number of parameters to be tuned, as well as the "goal" varying in time still mean serious problem. It seems to be reasonable to risk the supposition that "generality" and "uniformity" of the "traditional SC structures" excludes the application of plausible simplifications which may be characteristic to a whole set of typical tasks. This makes the idea rise that several "simplified" branches of SC could be developed for narrower problem classes if more specific features could be identified and taken into account in the uniform structures. The first steps in this direction were made in the field of Classical Mechanical Systems (CMSs) [8], while further refinements were published in [9], on the basis of principles detailed e.g. in [12]. This approach used the internal symmetry of CMSs, the Symplectic Group (SG) of Symplectic Geometry in the tangent space of the physical states of the system. The "result" of the "situation-dependent system identification" was a symplectic matrix mirroring the effects of the inaccuracy of the rough dynamic model initially used as well as the external dynamic interactions not modeled by the controller. By considering the problem from a purely mathematical point of view, independently of CMSs, it became clear that all the essential steps used in the control can be realized by other mathematical means than symplectic matrices. The SG can be replaced by other Lie groups defined in a similar manner by the use of some "basic quadratic expression" [10]. In this approach the Lie group used in the control does not describe any internal physical symmetry of the system to be controlled. Regarding the convergence of the method satisfactory conditions were presented for SISO systems and preliminary indications were drawn that proper extension of the proof can be expected for MIMO systems, too [10]. Also, in [11] by introduction of the "Partially Stretched Orthogonal Transformations" a computationally exceptionally efficient transformation was introduced which is not comprised in the set of the originally proposed Lie groups defined by simple quadratic expressions. In this paper satisfactory condition is given for the Complete Stability of the control for MIMO systems. Simulation examples are presented for the control of 3 DOF SCARA arm structure by the use of the "Generalized Lorentz Group" (GLG) and the "Minimum Operation Symplectic Transformations" also defined in [10].
4
A MODIFIED RENORMALIZATION ALGORITHM …
2 The Control Problem in General From purely mathematical point of view the control problem can be formulated as follows: there is given some imperfect model of the system on the basis of which some excitation is calculated for a desired reaction of the system used as the input of the controller id as e=M(id). The system has its inverse dynamics described by the unknown function resulting in a realized ir instead of the desired one, id: ir=\(M(id))= f(id). (In Classical Mechanics these values are the desired and the realized joint accelerations, while the external free forces and the joint velocities serve as the parameters of this temporarily valid and changing function.) Normally any information on the behavior of the system can be obtained only via observing the actual value of the function f(). In general it can considerably vary in time. Furthermore, no any possibility exists to "directly manipulate" the nature of this function with the exception of the direct manipulation of its actual input from id to certain id* „deformed“ value. The controller’s aim is to achieve and maintain the id=f(id*) state. [Only the nature of the model function M(id) can directly be determined.] The Modified Renormalization Algorithm consists in seeking a series of linear transformations as: i 0 ; S1f i 0 i 0 ; i1 S1i 0 ; ... ; S n f i n 1 i 0 ; i n 1 S n 1i n ; S n n o I (1) of
It is evident that (1) does not unambiguously determine the possible appropriate quadratic matrices. This ambiguity can be utilized via choosing "simple" linear transformations possibly having the properties as fast and computationally efficient invertibility and the ability of being as close to the identity transformation as possible. So let G be a nonsingular quadratic, otherwise arbitrary constant matrix. Let the set ^v (i ) ` a linearly independent complete set of vectors corresponding to the dimensions of G. Let this set called "special according to G" if it satisfies the restrictions v ( i )T Gv ( j )
G ij .
(2)
The elements of this set form the columns of a special matrix V, and that this matrix trivially satisfies the equation
V T GV
G V 1
G 1 V T G
(3)
that is the calculation of the inverse of such matrices in general is very easy and computationally cost-efficient, they form a group and may have the determinant r1. The unimodular sub-group trivially is a Lie group with the generators satisfying the restrictions GH H T G
0
(4)
ª 0 Iº 2 « I 0» , and g 1,...,1,c , ¬ ¼ result in the Orthogonal, the Symplectic, and the Generalized Lorentz Group, respectively ("c" is the velocity of light here chosen to be 1). The appropriate special sets are the orthonormal, the symplectic, and the Lorentzian sets. In these examples G is either symmetric (I, g) or skew-symmetric (), consequently H can be constructed of skewsymmetric or symmetric J matrices, respectively, as H=G-1J. It is easy to prove that the columns of the following matrix form a generalized Lorentzian set: The special cases in which G corresponds to I,
5
TAR, RUDAS, BITÓ, KOZàOWSKI º » f 2 / c 2 1»¼
ªe( f ) f 2 / c 2 1 e( 2 ) ... e( DOF ) « f / c2 0 ... 0 «¬
f
(5)
In this solution the physically interpreted vector f is accomplished with a fictitious (DOF+1)th component, and it is placed into the last column of a generalized Lorentzian. [The e(2), …, e(DOF) set can be obtained by rigidly so rotating a whole set of orthonormal basis vectors, e.g. the columns of the unit matrix, that this operation alters only the 2D subspace spanned by f and e(1).] In strict analogy with (3) the proper Lorentzian transforming the observed acceleration into the desired one can be calculated as L
T
º 1 ª... fD »g « 2 D2 f / c 1¼ ¬...
ª... « ¬...
º fR » g 2 R2 f / c 1¼
(6)
To avoid numerical problems arising in connection with zero vectors it is advantageous to add a physically not interpreted ("dummy"), non-zero, constant component to f, so for a 3DOF system we use Lorentzians of 5 rows and 5 columns. As it was done in [10], the Minimum Operation Symplectic transformations have bigger size but can be constructed by similar rotations and stretches. They have the structure as follows: ~ ~ (1) ª f (1) u ( 2 ) e (3) ... f ( 2) u 0 ...º S « ( 2) (7) » ~ (1) (1) ( 2 ) ~ u 0 ... f u e ( 3) ...¼ ¬f with u
1 ª (1) f ( 2)T f (1) ( 2) º «f ( 2)T ( 2 ) f » f (1)T f (1) ¬ f f ¼ (1)T ( 2 ) ª ( 2) f f º 1 f (1)T (1) f (1) » ( 2 )T ( 2 ) « f f ¬ f f ¼
(1)
u ( 2) ~ (1) f ~ (1) u
(1)
f ~ , f ( 2) ( 2 )T ( 2 ) f f f f u (1) ~ ( 2) ,u u (1)T u (1) u ( 2)T u ( 2 ) (1)T
(1)
(8)
( 2)
f f f f ( 2 )T f ( 2 ) u ( 2) u (1)T u (1) u ( 2 )T u ( 2) (1)T
(1)
In (8) f(1) has the dimension of DOF+1 (also containing a "dummy" one) and f(2) can be obtained from f(1) via a permutation of its components. An alternative possibility also considered in the simulation in this paper is the use of El Hini’s abstract rotations [11]. J
I s 1
bb T , T bT b
WJ
(9)
In this operation vector b simply is rotated into the direction of vector a by the orthogonal matrix W, and it also is rescaled by introducing the scalar factor s:=_a_/_b_. W makes a rotation concerning only the two-dimensional sub-space stretched by a and b. It is evident that if v is orthogonal to b, then Jv=v. If c=Eb, then Jc=sEb, that is this transformation applies stretch/shrink only in the desired direction, and leaves the orthogonal sub-space of the pair a and b unchanged. Following this direction-selective shrink/stretch, rotation comes as a gentle operation. 6
A MODIFIED RENORMALIZATION ALGORITHM …
3 Proof of Complete Stability In the realm of Cellular Neural Networks the concept of Complete Stability is often used as a criterion. It means that for a constant input excitation the network asymptotically converges to a constant response. If the variation of the input is far slower that the network’s dynamics, with a good accuracy, the net provides with a continuous response corresponding to some mapping of the time-varying input. The same idea is applied when we seek for series pertaining to a constant desired response. The f i n o i 0 requirement can be expressed in more or less restricted forms. For instance, assume, that there exists 0
(10)
This requirement trivially guarantees the desired complete stability with a convergence to the desired value. So suppose that there is given an unknown, differentiable, invertible function f(x) for which there exists an inverse of xd as xˆ f 1 x d z 0 . Let the Jacobian of f that is wf be positive definite and of a norm considerably smaller than 1. Furtherf cxˆ { wx more, let us suppose that the actual estimation of the deformed input x is quite close to the proper inverse of xd. Consequently two near-identity linear transformations must exist in the chosen group for which Txˆ x , Sf x x d . Following classic perturbation theory, if variable [ is chosen to be the “small variable” the above operators can be written as T I [ G , S I [ H in which G and H must be certain generators of the given group. Taking into account only the 0th and the 1st order terms in [ we obtain the estimations as
f x # f >I [ G @xˆ # x d [
wf Gxˆ wx
(11)
§ · § wf · wf Sf x # I [ H ¨¨ x d [ Gxˆ ¸¸ # x d [ ¨¨ Gxˆ Hx d ¸¸ O [ 2 w x w x © ¹ © ¹
xd
This implies that
wf Gxˆ Hx d wx
0
(12)
The next approximation so is determined as f Sx f STxˆ # # f >I [ H @>I [ G @xˆ # x d [
wf G H xˆ wx
(13)
For the convergence we need decreasing error, that is f Sx x d d K f x x d which means that
[
wf wf G H xˆ d K [ w f Gxˆ or Hx d Hxˆ d K Hx d wx wx wx
(14)
For a finite generator H Hxˆ and Hx d must be approximately of the same norm and same direction that is the angle between them is acute because it was supposed that xˆ # x d , and because the matrix multiplication is a continuous operation. Due to the 7
TAR, RUDAS, BITÓ, KOZàOWSKI
positive definite nature of f ': angle between Hxd and
wf multiplication with it also can result in an acute wx
wf Hxˆ (13) has the following geometric interpretation: wx
Hx d
Hx
-f'Hx Hx d -f'Hx
The allowed set of the vectors of reduced norm Figure 1: Geometric interpretation of the convergence criteria On the basis of Figure 1 it is evident that under quite general conditions the algorithm can converge to the desired solution. For instance, in the Euler-Lagrange equations of a Classical Mechanical System the inertia matrix can be roughly approximated by a small scalar inertia plus a big additive „vector“ term. The positive definite nature of the inverse of the actual inertia matrix of the system can guarantee convergence for this problem class. To keep the desired value in the vicinity of the actual one, which also is a necessary criterion of convergence, instead of the joint accelerations its "interpolated" version is taken into account, that is a "regulated correction" is applied as: [
xd f
1 max x
d
, f
,O
1 H 1 H 2 1 H 1
[ 1[
, xˆ d
f O xˆ d f
(15)
For large relative difference the „regulating factor“ OoH2 (a small value moderating the norm of the transformation matrices to be applied), while for small difference it approaches (1+H1), with a mall positive H1 meaning a kind of slight extrapolation of the tendency.
4 Simulation Results The motion of the same 3DOF SCARA arm structure was considered along the same nominal trajectory with the same velocity with the same adaptive law applying Lorentzian and symplectic matrices. In Figure 2 the phase trajectories and the joint coordinate errors are compared with each other. Apart from the "transient part" the very much similar behavior belonging to the two choices is apparent. The same can be stated for the behavior of the regulating factor and the joint generalized forces described in Figure 3.
8
A MODIFIED RENORMALIZATION ALGORITHM … Phase Space
Phase Space
13.90
13.92 11.70
10.21
9.49 7.27
6.52
5.05
2.83
2.84 0.62
-0.86
-1.59 -3.81
-4.55
-6.03
-8.24 -2.75
-1.95 qp1 qp2 qp3
-1.15
-0.34
0.46
1.27
-8.24 -2.76
2.07
-1.95 qp1 qp2 qp3
-1.15
-0.34
0.46
1.27
2.07
Joint Coordinate Errors -- T ime
Joint Coordinate Errors -- T ime 0.07
0.08
0.05
0.06
0.03
0.04
0.01
0.02
-0.01
0
-0.03
-0.02
-0.05
-0.04
-0.07
-0.06 -0.08
-0.09 0
200
400
600
800
1000
1200
0
200
400
600
800
1000
1200
Figure 2: The Phase Space and the joint coordinate errors for the control versus time using the Generalized Lorentz (left side) and the Minimum Operation Symplectic Transformations (right side) [q1, q2 in rad (solid and dashed), q3im m (dotted), time measured in ms units]
The nominal velocity along the same geometric path was doubled for further comparison. In Figure 4 the phase space and tracking error for the fast non-adaptive motion is described. In Figure 5 the phase space and the joint coordinate errors for the control using the Generalized Lorentz and the Minimum Operation Symplectic Transformations are compared to each other. The significance of the non-linearities drastically increased in the forthcoming figures in which the viscous, Coulomb and adhesive friction forces were introduced in the robot joints and in the external disturbance forces not modeled by the controller. Furthermore, the mechanical degree of freedom of the problem has been doubled by introducing deformable joints also not modeled by the controller. In this case the manipulation of a part (moving it along an elevating arc, then inserting it into a part along a vertical straight line) was considered. In the case of the adaptive control El Hini’s partially stretched rotations were applied. In Fig. 6 the adaptive and the non-adaptive controls’ simulated results are compared to each other. The drastic change in the sign of the acceleration of the desired trajectory, and the that of the friction forces depending on the relative velocity’s sign of the parts in contact completely destroy the non-adaptive control. The presence of the unmodeled deformable joints also has contribution in the fluctuation of the control. However, introduction of adaptivity considerably improves the situation. Further details of the adaptive control are given in Figure 7. It can well be seen that the trajectory tracking error of the end-point as well as the deformation of the deformable components is treated properly. The regulation factors suffers very significant variation, therefore it takes significant part in the control. The rotation angle of the El Hini Transformation usually is very small in comparison to the full rotation 2S. (The shrinking factor is almost identical 9
TAR, RUDAS, BITÓ, KOZàOWSKI Joint Generalised Forces - T ime
Joint Generalised Forces - T ime 15e3
17e3
11e3
13e3 9e3
7e3
5e3
3e3
1e3 -1e3
-3e3 -5e3
-7e3
-9e3
-11e3
-13e3
-15e3 -19e3
-17e3 0
200
400
600
800
1000
0
1200
200
400
600
800
1000
1200
1000
1200
Regulating Factor
R e g u la t i n g F a c t o r
1 .2
1.2
1 .0
1.0
0 .8
0.8
0 .6
0.6
0 .4
0.4
0 .2
0.2 0
0
0
200
400
600
800
1000
0
1200
200
400
600
800
Figure 3: The joint generalized forces [Q1, Q2 in Nm (solid and dashed), Q3 in N (dotted)] and the regulating factor (nondimensional) versus time [ms] for the Lorentzian and the symplectic matrices based identification to 1 therefore it is not plotted.) This is in harmony with the requirement to be met for the complete stability (e.g. the need for near identity transformations). The variation of the external disturbance force to be defied y the controller also is very significant.
5 Conclusions In this paper a novel branch of computational cybernetics was outlined. It is based on the idea of the partial and situation-dependent system-identification, the modified renormalization transformation, application of simple Lie groups as sources of uniform structures and easily invertible solutions, some linear interpolation-like regulating technique and the application of "dummy" components to avoid numerical singularities. It was theoretically proven that the combination of these simple and fastoperating components can result in a completely stable controller for a wide class of Phase Space
Joint Coordinate Errors -- T ime
27.80
0.3 22.88
0.2
17.96 13.04
0.1 8.12
0
3.20 -1.72
-0.1 -6.64
-0.2
-11.56 -16.48 -2.75
-1.95 qp1 qp2 qp3
-1.15
-0.34
0.46
1.27
2.07
-0.3 0
200
400
600
800
1000
1200
Figure 4: The phase space and the joint coordinate error for the fast non-adaptive motion [the same notation and units as in Figure 2] 10
A MODIFIED RENORMALIZATION ALGORITHM … Phase Space
Phase Space
27.8
28.0
20.4
20.6
13.0
13.2
5.7
5.8
-1.7
-1.7
-9.1
-9.1
-16.5 -2.75
-1.95 qp1 qp2 qp3
-1.15
-0.34
0.46
1.27
2.07
-16.5 -2.77
-1.96 qp1 qp2 qp3
-1.16
-0.35
0.46
1.27
2.07
Joint Coordinate Errors -- T ime
Joint Coordinate Errors -- T ime
0.12
0.3
0.08 0.2
0.04 0.1
0 -0.04
0
-0.08 -0.1
-0.12 -0.16
-0.2 0
200
400
600
800
1000
1200
0
200
400
600
800
1000
1200
Figure 5: The Phase Space and the joint coordinate errors for the control using the Generalized Lorentz and the Minimum Operation Symplectic Transformations for a fast nominal motion [the same notation and units as in Figure 2]
problems as e.g. in the control of mechanical devices. Computer simulation was used to verify and exemplify the operation of the method for a 3 DOF SCARA paradigm controlled by the use of the Generalized Lorentz Group and the Minimum Operation Symplectic Transformations and El Hini’s partially stretched rotations. Research aiming at further potential fields of applications seems to be expedient.
Acknowledgments The support by the FANUC's "Financial Assistance to Research and Development Activities in the Field of Advanced Automation Technology Fund", by the Hungarian National Research Fund OTKA T 34651, and that of the Hungarian-Polish Bilateral Scientific and Technology Co-operation Fund TéT PL-2/01 is gratefully acknowledged.
References [1] [2] [3] [4] [5]
R. Reed. Pruning Algorithms - A survey. IEEE Transactions on Neural Networks, (4):740–747, 1993. S. Fahlmann and C. Lebiere. The cascade-correlation learning architecture. Advances in Neural Information Processing Systems, (2):524–532, 1990. T. Nabhan and A. Zomaya. Toward generating neural network structures for function approximation. Neural Networks, (7):89, 1994. G. Magoulas, N. Vrahatis and G. Androulakis. Effective backpropagation training with variable stepsize. Neural Networks, (10):69–82, 1997. C. Chen and W. Chang. A Feedforward neural network with function shape autotuning. Neural Networks, (9):627–641, 1996.
11
TAR, RUDAS, BITÓ, KOZàOWSKI
Figure 6: The Phase Space and the deformation of the internal degrees of freedom (motor and robot shaft data [q1, q2 [rad] (solid and dashed), q3 [m]) vs. time for the non-adaptive (left side) and the El Hini Transformations based adaptive (right side) control, time measured in ms units [6]
W. Kinnenbrock. Accelerating the standard backpropagation method using a genetic approach. Neurocomputing, (6):583–588, 1994. [7] A. Kanarachos and K. Geramanis. Semi-stochastic complex neural networks. In Proceedings of the IFAC-CAEA '98 Control Applications and Ergonomics in Agriculture, pages 47–52, 1998. [8] J.K. Tar, I.J. Rudas and J.F. Bitó. Group theoretical approach in using canonical transformations and symplectic geometry in the control of approximately modelled mechanical systems Interacting with unmodelled environment. Robotica, (15):163–179, 1997. [9] J.K. Tar, I.J. Rudas, J.F. Bitó and O.M. Kaynak. A new utilization of the Hamiltonian formalism in the adaptive control of mechanical systems under external perturbation. Intelligent Automation and Soft Computing, 5(4):303–312, 1999. [10] J.K. Tar, M. Rontó. Adaptive Control Based on the Application of Simplified Uniform Structures and Learning Procedures. Zbornik Radova, 24(2):174–194, 2000. [11] Yahya El Hini. Comparison of the application of the symplectic and the partially stretched orthogonal transformations in a new branch of adaptive control for mechanical devices. In Proceedings of the 10th International Conference on Advanced Robotics, pages 701–706, Budapest, Hungary, August 22-25, 2001. [12] V.I. Arnold. Mathematical Methods of Classical Mechanics. (in Hungarian) MĦszaki Könyvkiadó, Budapest, Hungary, 1985.
12
A MODIFIED RENORMALIZATION ALGORITHM …
Figure 7: The trajectory tracking error of the end-point [m], the regulating factor [nondimensional], the angle of abstract El Hini rotation [rad], and the 3rd component of the external disturbance force [N] vs. time [ms]
About the Authors József K. Tar received his Master’s degree in Physics in 1981 from the Loránd Eötvös University, and PhD degree in 1989 in Budapest, Hungary. His research focuses on the adaptive control of very inaccurately modelled coupled non-linear systems. Imre J. Rudas, IEEE Fellow Grade Member, received a Master’s degree in Mathematics in 1977 from the Loránd Eötvös University, and PhD degree in 1987 from the Technical University in Budapest, Hungary. His research interests include non-conventional fuzzy operators of tuneable parameters, adaptive control, and robotics. János F. Bitó, IEEE Senior Member, graduated as physicist in 1958 from the József Attila University, Szeged, Hungary. He obtained a DSc degree in 1971. His research activity, among others, covered plasma physics, soft computing and robotics. Krzysztof R. Kozáowski, IEEE Senior Member, received the M.S. degree in electrical, and PhD degree in control engineering from PoznaĔ University of Technology in 1973, and 1979, respectively. He also obtained the M.S. degree in mathematics form A. Mickiewicz University in PoznaĔ in 1972. His current research interests include robot dynamics and control, hybrid control of robots, path planning for cooperating mobile robots, and various aspects of sensory feedback in robotics.
13
14
Minimal linearization via HOSVD in LMI based control ∗ P´eter Baranyi1,2 , Yeung Yam3 , Domonkos Tikk1,2 and P´al Michelberger4 1 Dept.
of Telecommunications & Telematics Budapest University of Technology and Economics, Budapest, Hungary
[email protected],
[email protected] 2 Intelligent
3 Dept.
Integrated Systems Japanese–Hungarian Laboratory Budapest, Hungary Automation and Computer Aided Engineering The Chinese University of Hong Kong Shatin, N.T., Hong Kong
[email protected] 4 Research
Group for Mechanics Hungarian Academy of Sciences Budapest, Hungary
Abstract — In this paper we propose a HOSVD (Higher Order Singular Value Decomposition) based approach to LMI based control design and stability analysis techniques. The proposed method deals with the analytic differential equations of dynamic models and automatically finds their TS model representation. As a further advantage, it optimizes the complexity of the resulting TS model with respect to approximation accuracy.
1
Introduction
Having the recently proposed powerful algorithms (and associated theory) for convex optimization, we can now solve very rapidly many convex optimization problems for which no traditional “analytic” or “closed form” solution are known (or likely to exist). This fact has far-reaching implications for engineers: it changes our fundamental notion of what’s being a solution to a problem. There are “analytical solutions” to a few very special cases in the wide variety of problems in systems and control theory, but in general ∗
This paper is supported by FKFP 180/2001, OTKA F030056, T034233, T34212 and D034614. P´eter Baranyi is supported by Z. Magyary scholarship.
15
BARANYI, YAM, TIKK, MICHELBERGER
non-linear problems cannot be solved. Applying the recent numeric convex optimization techniques, a control engineering problem that reduces to solving even a large number of convex algebraic Riccati inequalities should also be regarded as “solved”, even though there is no analytic solution. A number of problems that arise in Systems and Control such as optimal matrix scaling, digital filter realization, interpolation problems that arise in system identification, robustness analysis and state feedback synthesis via Lyapunov functions, can be reduced to a handful of standard convex and quasi-convex problems that involve Linear Matrix Inequalities (LMI). Extremely efficient interior point algorithms have recently been developed for and tested on these standard problems. With regard to the above the use of TS modelling (Takagi - Sugenlo modelling) [1] is motivated by the fact that it can easily be cast or recast as convex optimization which involves LMIs. The controller design and the Lyapunov stability analysis of a non-linear system can, hence, be reduced to solving an LMI problem in many cases. Based on this idea Tanaka et al. and Wang et al. have introduced various powerful controller design methods and relaxed stability theorems [2, 3, 4, 5]. TS model is a kind of convex combination or superposition of linearized models. The convex combination is defined by antecedent membership functions (say basis functions). Actually, TS model is a kind of standard Tensor Product (TP) based approximation, where the approximation points become linear models. Since the TS model has the universal approximation property, we may conclude that any kinds of differential equation systems can be given in TS model form, whereupon the execution of numerical techniques, such as LMI, leads to a controller design and stability analysis. Despite this advantageous idea discussed above the use of TS models is practically limited. The reason of this is that though the TS model has the universal approximation property in theory [6, 7, 8, 9], it suffers from the problem of exponential complexity with regard to approximation accuracy, e.g., K´oczy and Hirota [10]. It means that the number of linearized models in the convex combination grows exponentially as the approximation error tends to zero. Particularly, in the general case of TS model, the number of linearized models grows to infinity while zero approximation error is achieved. Moreover, for TS model it is shown, that if the number of linearized models is bounded, the resulting set of function is nowhere dense in the space of approximated functions [11, 12]. In conclusion, the exponential complexity explosion of TS models, cannot be eliminated, so the universal approximation property of these modelling approaches cannot be exploited straightforwardly for practical purposes. The mutually contradicting results naturally pose the question as to what extent the model approximation is deemed accurate enough for the available complexity. From the practical point of view, though, it is enough to achieve an “acceptably” good approximation, where the given problem determines the factor of acceptability in terms of ε. The task is, hence, to find a possible trade-off between the specified accuracy and the complexity. Motivated by the above conflicts the main objective of this paper is twofold. The first is to propose a HOSVD based method capable of implementing various kinds of differential equation systems of a dynamic models in TS model form with specific basis functions whereupon the LMI based controller design techniques and stability analysis can be executed. The second is to find a tradeoff between the TS modelling accuracy, hence system performance, and the controller complexity which is bounded by the available real time computation power at hand.
16
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
The previous works [13, 14, 15, 16, 17, 18, 19, 20] of this paper gives detailed introduction to the concepts utilized in this paper especially to the aspects of HOSVD in fuzzy rule base complexity reduction.
2
TS model and its restricted approximation property in practice
Dynamical system models of plants operating around particular operating conditions are often obtained as multi-model representations of the form sx(t) = Ai x(t) + Bi u(t) y(t) = Ci x(t) + Di u(t);
(1)
where sx(t) = x(t) ˙ for a continuous-time system or sx(t) = x(t + 1) for a discrete-time system. The multi-model (1) can be alternatively specified by the sequence of system matrices Ai Bi . (2) Si = Ci Di Such a model belongs to the more general class of so- called polytopic models sx(t) = A(p)x(t) + B(p)u(t)
(3)
y(t) = C(p)x(t) + D(p)u(t); where p is time varying and may include some elements of x(t). The system matrix varies within a fixed polytope of matrices S(t) ∈ {S1 , S2 , . . . , SN } = { N i=1 αi Si : αi ≥ N 0, i=1 αi = 1}. The systems S1 , S2 , . . . , SN are called vertex systems. If the convex combination of the vertex system matrices are defined by basis functions w(p) given over p then we obtain the explicit form of TS- fuzzy model: S(p) =
N
wi (p)Si
i=1
with {∀p : N i=1 wi (p) = 1, ∀i, p : wi (p) ≥ 0}. When the basis functions are decomposed for dimensions we deal with a higher order structure as: S(p) =
I1 I2 i1 =1 i2 =1
···
IN N
wn,in (pn )Si1 ,i2 ,...,iN
(4)
iN =1 n=1
where values In pn are the elements of p. As a matter of fact, the basis is normalized: {∀n, pn : in =1 wn,in (pn ) = 1, ∀i, n, pn : wn,i (pn ) ≥ 0}. Equation (4) is equivalent with the explicit form of MISO TS (Takagi-Sugeno ) fuzzy model defined by fuzzy rules: IF antecedent set w1,i1 AND antecedent set w2,i2 . . . AND antecedent set wN,iN THEN Si1 ,i2 ,...,iN The explicit form of TS model (4) can be reformulated in terms of tensor product as: N wn (pn ) , (5) S(p) = S n=1
17
(N +1)
BARANYI, YAM, TIKK, MICHELBERGER
(for definition and notation of tensor product see Appendix) where the row vector wn (pn ) ∈ RIn contains the antecedent membership functions (or say basis functions) wn,in (pn ), the N + 2 -dimensional coefficient tensor S ∈ RI1 ×I2 ×···×IN ×O×L is constructed from the matrices Si1 ,i2 ,...,iN ∈ RO×L . The first N dimensions of S are assigned to the dimensions of the parameter space P . The next two are assigned to the output and input vectors, respectively. Let us briefly study the TS model as an approximator of dynamic models. Without the loss of generality let us consider a two dimensional problem as a demonstration. Suppose that the following dynamic model is given: x¨(t) = f (x(t), ˙ x(t), u(t)) This equation can be approximated over a compact domain by a convex combination of linearized models: J I
x¨(t) =
w1,i (x(t))w ˙ ˙ x(t), u(t)) 2,j (x(t))fi,j (x(t),
(6)
i=1 j=1
˙ x(t), u(t)) = (ai,j x(t) ˙ + bi,j x(t) + ci,j u(t)). fi,j (x(t), In state space form x˙ =
I J
w1,i (x1 )w2,j (x2 )Ai,j x(t) + Bi,j u(t)
(7)
i=1 j=1
which takes the form x˙ = A ×1 w1 (x1 ) ×2 w2 (x2 ) ×3 xT (t)+ +B ×1 w1 (x1 ) ×2 w2 (x2 ) ×3 uT (t) =
x˙ = S ×1 w1 (x1 ) ×2 w2 (x2 ) ×3 xT (t) uT (t) . Zero approximation error is achieved, in general case, if I and J goes to infinity. They, however, becomes constant I, J = C1 , C2 < ∞ if a specified approximation error ε is acceptable. If ε is numerically zero then the right side and the left side of Eq. (7) is considered to be numerically equivalent, which implies for a large variety of engineering applications that any function can be computed in the form of Eq. (7) by computer in finite time. As a conclusion two important theorems should be addressed in this Section. These theorems are cited from [11]. First, if the number of basis functions wn,i (xn ) in each input dimension, and hence, the number of models is bounded by I, J, and I · J, respectively, then the set of TS approximators in the form (7) is not capable of approximating with arbitrary accuracy a particular continuous function, this is also true for multi variable case (5). Further, exploiting the above statement, [11] shows that the set of TS approximators with bounded number of basis functions is nowhere dense in the space of continuous functions with respect to the Lp norm p ∈ [1, ∞]. Second, the number of linearized models grows exponentially when the approximation error tends to zero. Because of this contradiction finding a tradeoff between the approximation accuracy and complexity is highly desired [15].
18
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
3
From differential equations to TS model form
This Section proposes a method capable of extracting the TS model from a given differential equation. The complexity of the resulting TS model is determined by the given approximation error. In order to facilitate further reading, first the TS approximation of a function f (x) ∈ RN is introduced via HOSVD then the approximation of differential equations are discussed. Let an N dimensional hyper rectangular grid be defined by values an = [an,1 , an,2 , . . . , an,In ],
n = 1, . . . , N.
We require the grid to be uniformly distributed on the sampled space: Definition 3.1 Let RN ⊃ Ω = [a1 , b1 ] × · · · × [aN , bN ], further let {λn }∞ k=1 be a sequence of finite subsets of Ω with #λk = k. If #(λk ∩ ω) |ω| <ε ∀ε > 0 ∃k0 ∀ω ∈ Ω ∀k ≥ k0 : − (8) #λk |Ω| then the set λk are uniformly distributed on the domain Ω. Here #(λk ∩ ω) denotes the cardinality of the finite set (λk ∩ ω), and |ω| is the Lebesque measure of ω.
Remark 3.1 In our denotation, k, the number of sample points equals N n=1 In . Then let the given function f (x) ∈ RN be sampled over the grid points as: bi1 ,i2 ,...,iN = f (z),
(9)
where z = [a1,i1 , a2,i2 , . . . , aN,iN ] and ∀n : in ∈ [1, In ]. Let the HOSVD then be executed in exact mode on tensor B (see appendix) created from N r elements bi1 ,i2 ,...,iN which leads to B = B n=1 Un . Therefore the TS approximation is: f(x) = B r
N
wnr (xn ),
(10)
n=1 r
where row vector wnr (xn ) ∈ RIn contains the extracted basis. The points of the extracted basis functions are included in matrices U: r (an,in ) = uin ,j , wn,j
(11)
r In order to obtain a simple bi-linear approximation, let the extracted functions wn,j (xn ) be constructed by linear pieces between the characteristic points (an,in , uin ,j ). The number of extracted basis functions on the nth input dimension equals the n-mode rank of tensor B. In this light we can conclude that a minimal basis is obtained. Consequently, the number of basis functions equals the number of columns in the singular matrix Un , and the values of the basis functions over the grid lines equal the elements of the columns in the singular matrix, respectively. Thus, the more dense grid we define, the more precise basis functions we obtain, and the size of tensor B r increases minimally.
19
BARANYI, YAM, TIKK, MICHELBERGER
If the rank of tensor B sampled from f (x) tends to a constant while we increase λk , the density of the hyper rectangular grid, to infinity, then we can state that the “rank” of the given function f (x) is finite: ∀n : rankn (f (x)) = lim rankn (B) = cn . λk :k→∞
(12)
This implies that the given function can exactly be transformed to tensor product based form. If the rank of B goes to infinity then the tensor product representation, which has finite number of terms, obviously becomes an approximation. If the number of larger singular values, which are not considered to be numerically zero, tends to constant and only the number of small values may increase with the density of the grid, then we obtain a quantity, which can be considered the numerical rank of the given function f (x). In the case of TS model the basis functions wn,i (xn ) must hold a specific property required by the fuzzy concept, e.g., the membership functions should be bounded by [0, 1]. Let this property be called: Property 3.1 (Non-Negativeness: NN) Antecedent function w(x), x ∈ X, has the nonnegativeness property if ∀x : w(x) ∈ [0, 1]. (13) An other important property is: Property 3.2 (Sum-Normalization: SN) Basis functions wi (x),i = 1, . . . , I, x ∈ X, have the sum-normalization property if they fulfill: ∀x :
I
wi (x) = 1.
(14)
i=1
This Property 3.2 is also called Ruspini -partition in the related fuzzy literature. This additional property required, for instance, in Tanaka’s LMI based stability theorems [1-5]: The basis functions defined by the column vectors of Un resulted by HOSVD may not be interpretable as fuzzy membership values, because the bound of the elements in Un is [−1, 1]. Another crucial point is that the resulting basis functions do not guarantee the Ruspini -partition, namely, property SN. This fact would destroy the effectiveness of the whole concept if the resulting tensor product form is for further studies in, for instance, Tanaka’s stability analysis, where the antecedent functions assumed to have property SN and NN. Condition SN is essential in the theory of polytopic models as well. Since the column vectors of matrices Un define the basis or membership functions let the above two properties be formulated for matrices: Definition 3.2 (SN and NN matrix) A given matrix U is called sum-normalized if (U) = 1 (where operator (A) sums up the column vectors of A as: (A) = A1). A given matrix U is called non-negativeness if all of its elements are bounded by [0, 1]. The next part of this Section is intended to recall additional transformations from [20] to the above HOSVD method pertaining to NN and SN conditions. Let this goal be specified by the following theorem:
20
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
Theorem 3.1 (SN and NN basis matrices) Assume that executing HOSVD on tensor B ∈ N
RI1 ,I2 ,...,IN , results in B = S ⊗ [ Un Udn ], where the size of matrix Un is (In × Inr ). n=1
Discarding of singular values and their corresponding singular vectors stored in Udn ∈ N r = B r ⊗ Un . Matrix Un can RIn ×(In −In ) , where “d” denotes “discarded”, yields B always be transformed to SN and NN matrix Un subject to
n=1
r N
N
B r ⊗ Un = B ⊗ Un n=1
(15)
n=1
r
Notation Un denotes here that Un is SN and NN normalized, further, B means that B r is modified subject to equ. (15). Transformation techniques to yield the normalized system in (15) are introduced and detailed via various examples in [13, 14, 15, 16, 19, 20]. The last part of this Section is to show in Method 3.1 how to extract a minimized basis to TS modelling from given differential equations. The difference from the above introduced TS function extraction is that approximation points becomes matrices. Method 3.1 Assume that the differential equation system of a dynamic model is given in the form of x˙ = f (x(t), u(t), p). (16) y Vector p ∈ RN varies in the parameter space P in which the given system is nonlinear (vector p may contain some elements of x as well). The goal of this method is to find tensor product based approximation x˙ = f (x(t), u(t), p) ∼ (17) = y r ∼ = (S
N
wrn (pn )) ×N +2 xT (t) uT (t) ,
n=1
wrn (pn )
where the size of vector is minimized and it is SN and NN. Step 1: Let (16) be sampled a high density rectangular grid defined
or linearized over by grid points pi1 ,i2 ,...,iN = pi1 pi,2 . . . piN : x˙ (18) = f (x(t), u(t), pi1 ,i2 ,...,iN ) = y
= Si1 ,i2 ,...,iN ×2 xT (t) uT (t) . Step 2. Let HOSVD, extended with SN and NN transformation, be executed on tensor S in such a way that the SVD is performed only on dimensions n ∈ [1, N ]. Dimensions N + 1 and N + 2 are not reduced. Therefore one obtains: x˙ = f (x(t), u(t), p) ∼ (19) = y
21
BARANYI, YAM, TIKK, MICHELBERGER
∼ =
S
r
N
wrn (pn )
×N +2 xT (t) uT (t) .
n=1
Basis functions wn,i (pn ) are determined as above. Along in the same line as in the previous discussion, the density λ of the grid points is increased until an acceptable εa is achieved.
4
Demonstrative example
This example is a controller design to a simple mass-spring-damper mechanical system. First of all, it is shown that the differential equations of the model have analytically been derived to a TS fuzzy model [3], in order to execute PDC controller design. Then it is assumed in the example that the analytical derivation between the TS fuzzy model and the differential equations is unknown and hard to solve. Therefore, Method 3.1 is utilized to find a complexity minimized TS fuzzy model. The example shows that the proposed transformation finds a minimal form of the TS fuzzy model which existence is proven by the analytic design. The example shows that the transformed model is capable of recovering the same structure as revealed in the analytically derived model. Finally, the controller is determined from the minimized model, which results in a complexity minimized controller.
u
m x d
k
Figure 1: Mass-spring-damper system Consider the non-linear mass-spring-damper mechanical system as depicted on Figure 1 and its dynamical equation, m · x¨(t) + g(x(t), x(t)) ˙ + k(x(t)) = φ(x(t)) ˙ · u(t)
(20)
where m is the mass and u(t) stands for the force. The function k(x(t)) is the nonlinear or uncertain stiffness coefficient of the spring, g(x(t), x(t)) ˙ is the non-linear or uncertain term damping coefficient of the damper, and φ(x(t)) ˙ is the non-linear input term. Assume that g(x(t), x(t)) ˙ = d(c1 x(t) + c2 x˙ 3 (t)), k(x(t)) = c3 x(t) + c4 x3 (t), and 3 ˙ ∈ [−b, b] and φ(x(t)) ˙ = 1 + c5 x˙ (t). Furthermore, assume that x(t) ∈ [−a, a], x(t) a, b > 0. The above parameters are set as: m = 1, d = 1, c1 = 0.01, c2 = 0.1, c3 = 0.01, c4 = 0.67, c5 = 0, a = 1.5, and b = 1.5. Equation (20) then becomes: x¨(t) = −0.1x˙ 3 (t) − 0.02x(t) − 0.67x3 (t) + u(t).
22
(21)
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
The non-linear terms are −0.1x˙ 3 (t) and −0.67x3 (t). The non-linear state-space model is: 1 ˙ u(t). (22) x(t) = A(x1 (t), x2 (t))x(t) + 0 We refer to the results of an analytic derivation presented in the paper written by [3], which says that Eq. (22) can exactly be represented by a TP model as: ˙ x(t) =
2 2
2
a a w1,i (x1 (t))w2,j (x2 (t))Aai,j x(t)+Bu(t) = Aa ⊗ wna (xn (t))x(t)+Bu(t). n=1
i=1 j=1
(23) Superscript “a” denotes that this result is obtained via analytic derivations. The basis functions wna (xn (t)) are depicted on Figure 2. 1
1
w 1,a 1
r 1, 1
w
0.5
w 2,a 1 w2,r 1
r 1, 2
w
0.5
w2,r 2 w 2,a 2
w 1,a 2 0
1.5
+1.5
0
x
1.5
+1.5
x
Figure 2: Antecedent functions of the original approximation via analytical derivation and the antecedents extracted by the TS fuzzy model transformation In the followings we assume that the analytic derivation from the model (22) to a TS fuzzy model (23) is unknown, like in usual practical cases. The proposed TS fuzzy model transformation goes about generating the complexity minimized TS fuzzy model, and we expect that it finds four linear models like in the case of the analytic design. According to the proposed method, let us sample the state-space model (22) over the dense (400 × 400) approximation grid points defined by x1,i = −1.5 + (i − 1)3/399 and x2,j = −1.5 + (j − 1)3/399: −0.1x21,i −0.02 − 0.67x22,j s , i, j = 1, . . . , 400. Ai,j = 1 0 Let us execute HOSVD, extended with SN and NN transformations, on tensor As ∈ R400×400×2×2 constructed from Asi,j . Let us keep all the nonzero singular values. We find that the rank of tensor As is two on the first two dimensions. Note that if we increase the density of sampling grid to infinity the limes of the rank of the sampled tensor remains 2 on the first two dimensions. Actually, the proof of this statement is the analytic derivation itself, see Eq. (23). The numerically obtained antecedent functions wr (x(t)) are depicted on Figure 2. The antecedent fuzzy sets are in Ruspini -partition. This means that PDC controlled design techniques can immediately be executed on the resulted TS fuzzy model
23
BARANYI, YAM, TIKK, MICHELBERGER
form. One of the advantages of the minimization is that the PDC design (or any further LMI analysis) can be restricted to the four fuzzy rules in the present case. The PDC results in a controller that has four fuzzy rules. Therefore, the controller takes the form of: 2 2 2 r r r w1,i (x1 (t))w2,j (x2 (t))Fi,j x(t) = − F ⊗ wn (xn (t)) x(t). u(t) = − n=1
i=1 j=1
Let the feedback gains in F be simply defined by the simple pole-replacement technique in thepresent case. Let the closed-loop eigenvalues of the four linear systems be −2 −2 . Fi,j = pole(Ai,j , B, −2, −2). Finally let the stability of the controlled nonlinear system be analyzed. Let us apply the stability criteria introduced by [3] (see, criteria C14 in the paper):
Figure 3: Control result. x˙ and x are depicted by dash and solid line respectively. The control signal is depicted by dash dot line.
N
Theorem 4.1 (Quadratical stability) Dynamic system (20) where u(t) = −F ⊗ wrn (pn (t)) n=1
is quadratically stable if and only if Reλi (H) = 0, where H is an indicator matrix whose elements are defined in the paper of [3]. In the present example the eigenvalues of H are −2.0, −2.0, 2.0 and 2.0. Therefore the designed controller quadratically stabilizes the nonlinear system. Figure 3 shows the effect of the controller.
24
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
5 Conclusions The main novelty of this paper is to propose a method capable of automatically transforming, according to a given approximation accuracy, any differential equation systems of dynamic models to TS model form, which can easily be formed as convex optimization and whereupon LMI based control design can, hence, be performed. This paper also points out an important fact as the motivation of the present approach, that the widely adopted linearization by TS forms can not arbitrarily well describe a given model, it needs to consider the tradeoff between complexity and approximation accuracy. Our future work is to replace the product in TS with the Rudas’s [21, 22] type generalized operator which may offer a continuous tuning between smooth and robust feature of the controlled system.
Appendix Definition 5.1 (n-mode matrix of tensor A) Assume an N th order tensor A ∈ RI1 ×I2 ×...×IN . The n-mode matrix A(n) ∈ RIn ×J , J = k Ik contains all the vectors in the nth dimension of tensor A, where k = 1, . . . , N and k = n. The ordering of the vectors is arbitrary in A(n) . This ordering shall, however, be consistently used later on. (A(n) )j is called an jth n-mode vector. Note that any matrix of which the columns are given by n-mode vectors (A(n) )j can readily be restored to become tensor A. The restoration can be executed even in case when some rows of A(n) are discarded since the value of In has no role in the ordering of (A(n) )j [23, 24]. Definition 5.2 (n-mode sub-tensor of tensor A) Assume an N th order tensor A ∈ RI1 ×I2 ×···×IN . The n-mode sub-tensor Ain =α contains elements ai1 ,i2 ,...,in−1 ,α,in+1 ,...,iN . Definition 5.3 (n-mode tensor partition) Assume an N th order tensor A ∈ RI1 ×I2 ×···×IN . The n-mode A are Bl ∈ RI1 ×I2 ×···×In−1 ×Jl ×In+1 ×...IN and denoted partitions of tensor as A = B1 B2 · · · BL n , where L is the number of partitions (l = 1, . . . , L) and Jl . In = l
Definition 5.4 (Scalar product) The scalar product A, B of two tensors A, B ∈ RI1 ×I2 ×···×IN def is defined as A, B = · · · bi1 i2 ...iN ai1 i2 ...iN . i1
i2
iN
Definition 5.5 (Orthogonality) Tensors of which the scalar product equals 0 are mutually orthogonal. def
Definition 5.6 (Frobenius norm) The Frobenius norm of a tensor A is given by A =
A, A.
Definition 5.7 (n-mode matrix-tensor product) The n-mode product of tensor A ∈ RI1 ×I2 ×···×IN and a matrix U ∈ RJ×In , as denoted by A ×n U, is an (I1 × I2 × · · · × In−1 × J × In+1 × · · · × IN )-tensor of which the entries are given by A ×n U = B, where B(n) = U · A(n) . N
Let A ×1 U1 ×2 U2 × · · · ×N UN be denoted as A ⊗ Un for brevity. n=1
25
BARANYI, YAM, TIKK, MICHELBERGER
Theorem 5.1 (Matrix singular value decomposition (SVD)) Every real valued (I1 × I2 )T matrix F can be written as the product of F = U · S · V = S ×1 U ×2 V, in which 1. U = u1 u2 · · · uI1 is a unitary (I1 × I1 )-matrix, 2. V = v1 v2 · · · vI2 is a unitary (I2 × I2 )-matrix, 3. S is an (I1 × I2 )-matrix with the properties of (i) pseudo-diagonality: S = diag(σ1 , σ2 , . . . , σmin(I1 ,I2 ) ) (ii) ordering: σ1 ≥ σ2 ≥ · · · ≥ σmin(I1 ,I2 ) ≥ 0. The σi are the singular values of F, and the vectors Ui and Vi are, respectively, an ith left and an ith right singular vector. There are major differences between matrices and higher-order tensors when rank properties are concerned. These differences can directly affect the way an SVD generalization look like. As the matter of fact, there is no unique way to generalize the rank concept. In this paper we restrict the description to n-mode rank only. Definition 5.8 (n-mode rank of tensor A) The n-mode rank of A, denoted by Rn = rankn (A), is the dimension of the vector space spanned by the n-mode matrices as rankn (A) = rank(A(n) ). Theorem 5.2 (Higher Order SVD (HOSVD)) Every tensor A ∈ RI1 ×I2 ×···×IN can be written as the product N Un (24) A=S n=1
in which 1. Un = u1,n u2,n . . . uIN ,n is a unitary (IN ×IN )-matrix called n-mode singular matrix. 2. tensor S ∈ RI1 ×I2 ×...×IN whose sub-tensors Sin =α have the properties of (i) all-orthogonality: two sub-tensors Sin =α and Sin =β are orthogonal for all possible values of n, α and β : Sin =α , Sin =β = 0 when α = β, (ii) ordering: Sin =1 ≥ Sin =2 ≥ · · · ≥ Sin =In ≥ 0 for all possible values of n. (n) The Frobenius norm Sin =i , symbolized by σi , are n-mode singular values of A and the vector ui,n is an ith singular vector. S is termed core tensor. The computation of the HOSVD in exact mode is done by executing SVD on each dimension of A. Namely, Un in Eq. (24) is determined by executing SVD (Theorem 5.1) on the n-mode matrix A(n) of tensor A as: Dn 0
d d T V V , (25) A(n) = Un Un n n 0 Ddn where diagonal matrix Dn contains the retained, and Ddn contains the discarded n-mode (n) singular values σi . Matrix Ddn has only zero elements and Dn contains the non-zero singular values as diagonal elements, so the number of diagonal elements in Dn is rankn (A). Therefore: A(n) = Un Dn VnT .
26
MINIMAL LINEARIZATION VIA HOSVD IN LMI BASED CONTROL
Then the product of Dn VnT yields S(n) , which, after restoring S(n) into tensor Sn , leads to: A = Sn ×n Un Determination of Un+1 is done in the same way. Again, let SVD be executed on n + 1mode matrix (Sn )(n+1) of tensor Sn obtained in the above step. This results in: T , (Sn )(n+1) = Un+1 Dn+1 Vn+1
where diagonal matrix Dn+1 contains the retained n + 1-mode singular values. Then T into tensor Sn+1 we have: restoring the product of S(n+1) = Dn+1 Vn+1 A = Sn+1 ×n Un ×n+1 Un+1 . Repeating the above step on each dimension leads to Eq. (24). More detailed discussion of HOSVD and detailed algorithm is given in papers [16, 19, 20].
References [1] T. Takagi and M. Sugeno. Fuzzy identification of systems and its applications to modeling and control. IEEE Trans. on SMC, 15:116–132, 1985. [2] K. Tanaka and M. Sugeno. Stability analysis and design of fuzzy control systems. Fuzzy Sets and Systems, 45(2):135–156, 1992. [3] K. Tanaka, T. Ikeda, and H. O. Wang. Robust stabilization of a class of uncertain nonlinear systems via fuzzy control: Quadratic stabilizability, H∞ control theory, and Linear Matrix Inequalities. IEEE Trans. Fuzzy Systems, 4(1), 1996. [4] K. Tanaka, T. Ikeda, and H. O. Wang. Fuzzy regulators and fuzzy observers: relaxed stability conditions and LMI-based design. IEEE Trans. Fuzzy Systems, 31(2):250–265, 1998. [5] H. O. Wang, K. Tanaka, and M. F. P. Griffin. An approach to fuzzy control of non-linear systems: Stability and design issues. IEEE Trans. Fuzzy Systems, 4(1):14–23, 1996. [6] K. Hornik, M. Stinchcombe, and H. White. Multilayer feedforward networks are universal approximators. Neural Networks, 2:359–366, 1989. [7] G. Cybenko. Approximation by superposition of sigmoidal functions. Mathematics of Control, Signals and Systems, 2:303–314, 1989. [8] E. K. Blum and L. K. Li. Approximation theory and feedforward networks. Neural Networks, 4(4):511–515, 1991. [9] V. K˚urkov´a. Kolmogorov’s theorem and multilayer neural networks. Neural Networks, 5:501–506, 1992. [10] L. T. K´oczy and K. Hirota. Size reduction by interpolation in fuzzy rule bases. IEEE Trans. on SMC, 27:14–25, 1997. [11] D. Tikk. On nowhere denseness of certain fuzzy controllers containing prerestricted number of rules. Tatra Mountains Math. Publ., 16:369–377, 1999. [12] D. Tikk, P. Baranyi, and R. J. Patton. Polytopic and TS models are nowhere dense in the approximation model space. In IEEE Int. Conf. System Man and Cybernetics (SMC’02), pages 150–153, Hammamet, Tunisia, 2002. [13] P. Baranyi, A. R. V´arkonyi-K´oczy, Y. Yam, R. J. Patton, P. Michelberger, and M. Sugiyama. SVDbased reduction of TS model approximation. To appear in IEEE Trans. Electronics. [14] P. Baranyi, Y. Yam, A. R. V´arkonyi-K´oczy, and R. J. Patton. SVD based reduction to MISO TS models. IEEE Transaction on Industrial Electronics, 50(2):232–242, 2003.
27
BARANYI, YAM, TIKK, MICHELBERGER
[15] P. Baranyi, Y. Yam, D. Tikk, and R. J. Patton. Trade-off between approximation accuracy and complexity: TS controller design via HOSVD based complexity minimization. In J. Casillas, O. Cord´on, F. Herrera, and L. Magdalena, editors, Interpretability Issues in Fuzzy Modeling, number 128 in Studies in Fuzziness and Soft Computing, pages 249–277. Springer-Verlag, Heidelberg, 2003. [16] P. Baranyi and Y. Yam. Complexity reduction of a generalised rational form. In D. Ruan and E.E. Kerre, editors, Fuzzy If-Then Rules in Computational Intelligence: Theory and Applications, number SECS 553 in The Kluwer international series in engineering and computer science, pages 135–160. Kluwer Academic Publishers, Dordrecht, The Netherlands, 2000. [17] P. Baranyi, Y. Yam, C.T. Yang, P. Varlaki, and P. Michelberger. Inference algorithm independent SVD fuzzy rule base complexity reduction. International Journal of Advanced Computational Intelligence, 5(1):22–30, 2001. [18] P. Baranyi, Y. Yam, P. Varlaki, and P. Michelberger. Singular value decomposition of linguistically defined relations. International Journal of Fuzzy Systems, 2(2):108–116, 2000. [19] Y. Yam. Fuzzy approximation via grid point sampling and singular value decomposition. IEEE Trans. SMC, 27:933–951, 1997. [20] Y. Yam, P. Baranyi, and C. T. Yang. Reduction of fuzzy rule base via singular value decomposition. IEEE Trans. Fuzzy Systems, 7(2):120–132, 1999. [21] I. J. Rudas and O. Kaynak. New types of generalized operations. Computational intelligence: Soft computing and fuzzy-neuro integrationwith applications. Springer NATO ASI Series. Series F: Computer and Systems, Sciences, 192:128–156, 1998. [22] I. J. Rudas and O. Kaynak. Entropy-based operations on fuzzy sets. IEEE Transactions on Fuzzy Systems, 6:33–40, 1998. [23] L. D. Lathauwer, B. D. Moor, and J. Vandewalle. A multi linear singular value decomposition. SIAM Journal on Matrix Analysis and Applications, 21(4):1253–1278, 2000. [24] L. D. Lathauwer, B. D. Moor, and J. Vandewalle. An introduction to independent component analysis. Jour. Chemometrics, 14:123–149, 2001.
About the Authors P´eter Baranyi received degrees M.Sc. in electrical engineering (1994), M.Sc. in Education of Engineering Sciences (1995) and Ph.D. (1999) from the Technical University of Budapest. He received the International Dennis Gabor Award in (2000). His research focuses on fuzzy and neural network techniques. Yeung Yam (M’92) received the B.S. degree from the Chinese University of Hong Kong and the M.S. degree from the University of Akron, OH, both in physics, in 1975 and 1977, respectively, and the M.S. and Sc.D. degrees in aeronautics and astronautics from the Massachusetts Institute of Technology, Cambridge, in 1979 and 1983, respectively. His research interests include analysis, design, and identification of control systems. Domonkos Tikk received his B.Sc. and M.Sc. degree in computer science both from E¨otv¨os L´or´and Science University in Hungary in the years 1993 and 1995, respectively. He received his doctoral degree in engineering in 2000 from Budapest University of Technology and Economics in Hungary. His research interests include data mining, text mining, automatical categorization methods, fuzzy systems, and soft computing techniques. P´al Michelberger He received M.Sc. in Mechanical and Military Engineering (1952) at Technical University of Budapest, Candidate of Technical Sciences (Ph.D., 1960), D.Sc. (1970). His research interest include analysis, design, and identification of control systems for vehicle designs.
28
Automatic Language Control of Electrical Drives. Background and Applications J. F. Martins1,2, A. J. Pires1,2, R. Vilela Mendes2, and J. A. Dente2 1
LabSEI – Laboratório de Sistemas Eléctricos Industriais Escola Superior de Tecnologia de Setúbal, Instituto Politécnico de Setúbal, Portugal
[email protected] 2
Laboratório de Mecatrónica, Instituto Superior Técnico, Lisboa, Portugal
Abstract — A new formal language concept for automatic control of electrical drives is presented. The proliferation of these systems promises improved efficiency and reliability, reduced maintenance and operative costs, and a more environment friendly operation. However, they exhibit considerable complexities related with their behaviour such as large uncertainties at structural and parameter levels, multidimensionality, and strong mutual interactions. The integration of these systems with information processing techniques allows a better adaptative modelling of their behaviour. The electrical drive system is assumed as a linguistic source producing a certain language. A developed grammatical inference algorithm is used in order to extract the productions that govern a grammar representing that language. The formalism of the developed formal language based control algorithm is presented and experimental results are discussed.
1 Introduction High performance motion control applications, using induction motor drives, are of critical importance. Although several advance motion controllers can perform such task, often the controller design requires complicated theoretical and numerical procedures under the desired control specifications. The application of soft computing techniques within electrical drives intelligent controllers design has presented promising features. A wide variety of high-quality strategies, using Artificial Neural Networks, Fuzzy Logic or Genetic Algorithms, have been reported in the literature [1] [2] [3]. Typical features of electrical drive systems include a considerable degree of dynamical complexity. They are highly non-linear coupled systems, with large uncertainties at the structural and parameter levels. They are multidimensional and contain highly unknown nonlinearities. When fast performance is required for evolving non-linear systems, classical methods yield a limited representation of the real system. It becomes necessary to complement, and even correct, this classical modelling with other information processing techniques that allows a better modelling 29
MARTINS, PIRES, VILELA MENDES, DENTE other information processing techniques that allows a better modelling of their behaviour. A new formal language approach in modelling electrical drive systems was already proposed [4], where the drive is assumed as a linguistic source producing a certain language. A grammatical inference algorithm extracts the productions of the drive’s language grammar. An advantage over other information processing techniques relies on the fact that, in the formal language approach, the structure of the productions is not established in advance. Different types of productions are established according to the incoming words from the linguist source. This method provides good recognition results and a reasonable quantitative accuracy, for the identification of unknown dynamics [5]. Fault detection in control systems, based on the distance between the words generated by the faulty system and the grammar that represents the non-faulty system, is another application of this technique [6].
2 Formal Language Concepts The formal language procedure considers a linguistic source that generates the words within the produced language. In this way any dynamical system is assumed as a linguistic source capable of generating a certain language, characterised by a grammar that can generate all the words in that particular language. This grammar, denoted by G, defines the structural features of the words produced by the linguistic source and, in this way, models the source itself [7]. G is a 4-tuple (1), where the terminal alphabet ¦T is constituted by symbols that make up the resulting words, the non terminal alphabet ¦N is constituted by symbols that are used to generate the patterns, the start symbol S is a special non-terminal symbol that is used to begin the generation of words, and the set of productions P is a set of rules (in the form DoE, where D and E are strings) that determines the generation of words [8]. G = (P, ¦N, ¦T, S)
(1)
Both alphabets – terminal and non terminal – must be established from the codification of the variables obtained from the dynamical system. Within our established formal language formalism the codification of the output variable – y – produces the terminal alphabet and the codification of the input variable – u – produces the non-terminal alphabet (2). y
Codificati o y j ¦T on
u
Codificati o Ui ¦ N on
(2)
The learning algorithm must establish the relations between both alphabets (input and output information) in order to produce terminal words that denote the output variable evolution. In this way p-type productions are considered assuming the general form (3). Sequence y1...yp, of length p, is constituted by terminal symbols, U is any non-terminal symbol, yp+1 is a terminal symbol, and G is a special non-terminal symbol that can be replaced by any non-terminal symbol. A p-type production has p terminal symbols in the left part of the production, denoting the previous dynamic evolution of the output variable. y1 y p U o y1 y p y p 1G
30
(3)
AUTOMATIC LANGUAGE CONTROL OF ELECTRICAL DRIVES Given this general form production (3), since the left part of any production contains at least one non-terminal symbol, this grammar can be classified as context sensitive in the Chomsky hierarchy [9]. To establish the grammar productions a grammatical inference based algorithm was developed [5]. Out of a set of sample words, resulting from the codification of the dynamic evolution of the system input/output variables, the basic learning algorithm has a simple paradigm in order to establish the set of productions: A 0-type production is considered for every symbol of the terminal alphabet that occurs in the sample. A (n+1)-type production is considered if the established n-type production already exists. One must note that the structure of the formal language productions is not established in advance. According to the word samples involved, one can obtain different types of productions (0-type, 1-type, ...) in the resulting grammar. This feature allows the modelling of different behaviours detected in a dynamical system.
3 Formal Language Control and Experimental Results As an example consider the non-linear dynamical system (4), where x denotes the state variable, u the command and y the output. Note that the input command can only be –1, 0 or +1. ° x k 1 x k x k 1 2u k ® °y ¯ k xk
x ^1,2,3,4` with ® k ¯u k ^ 1,0,1`
The three manifolds presented in Figure 1 define the working domain of the above dynamical system. The grammar that represents this dynamical system presents a P set with one 0-type production, two 1-type productions and twenty-four 2-type productions. A four symbol terminal alphabet and a three symbol non-terminal alphabet where considered, as presented in Table 1. yk l ¦T 1la 2lb 3lc 4ld
uk l ¦ N -1 l A 0lB +1 l C
Table 1: Alphabets considered for the dynamical system (4)
31
(4)
4
4
3
3
x[k+1]
x[k+1]
MARTINS, PIRES, VILELA MENDES, DENTE
2
2 1 4
1 4 4
3 x[k]
4
3
3
2
2 1
1
3
2
2 1
x[k]
x[k-1]
1
(a)
x[k-1]
(b)
x[k+1]
4 3 2 1 4 4
3
3
2
2 1
x[k]
1
x[k-1]
(c) Figure 1: Working Domain of the Dynamical System (4) with: (a) uk=–1; (b) uk=0; (c) uk=+1 Once the grammar, representing the dynamical system, is obtained (thus defining the structure of the words produced by the linguistic source), it can be considered as a model of this source. In this way the set of productions can be used to predict the evolution of the dynamical system, establishing the sequence of commands (non-terminal alphabet) necessary to take the system from one state to another. This sequence of non-terminal symbols should be established according some performance objective. Consider that a terminal word, denoting the sequence of values that the system should follow, is given. Knowing the initial state, for each symbol in the terminal word one should choose the appropriate non-terminal symbol that takes the system to the nearest state to the objective. Whenever the desired value is not reached, due to some perturbation, the objective terminal word is rewritten in order to fulfil the initial objective. As a control example consider that the objective terminal word (5) should be reached by the dynamical system (4).
w obj
^c b c b a a b c c c a c c`
The dynamical evolution of the system’s output, considering a initial terminal symbol ‘d’, is presented in Figure 2, where the objective word is depicted with a solid line (rectangular marker) and the actual word reached with a dashed line (circular marker).
32
(5)
AUTOMATIC LANGUAGE CONTROL OF ELECTRICAL DRIVES
Terminal Symbols
d
c
b
a
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time
Figure 2: Controlled Evolution of the Dynamical System (4) One should note that in order to go from an objective terminal word symbol to another the system could go through other terminal symbols. According to the internal dynamics (4) and the available non-terminal alphabet it is not possible to reach the terminal symbol ‘c’ from the symbol ‘a’. That is, doesn’t exist any production [[aUo[[acG, where [ denotes any terminal symbol and U any non-terminal symbol. It is necessary to successively apply the productions baAobaaG, aaCoaabG and abCoabcG, when the purpose is to reach the terminal symbol ‘c’ from the symbol ‘a’. Due to this physical limitation the obtained terminal word necessary differs from the objective terminal word. As presented in Figure 2, the objective terminal word (5) is not obtained but the terminal word (6), where the reached objective terminal symbols are underscored. Every symbol in the objective terminal word is reached, however the actual terminal word has some additional symbols. The reached terminal word doesn’t belong to the grammar, but is, considering the physical limitation of the dynamical system, the best approximation. Taken into account the limited input command (only three symbols are considered), the grammar establishes the best non-terminal word (input command) so that the objective terminal symbols (output variable values) are reached in the shortest period of time. w reached
^d b a a b c a a b c a a b a a b c c b a a b c c`
The considered electrical drive system is composed by a simple volts/Hz speed command and an induction motor drive with a variable mechanical load. With low slip performing operation, a normal condition for this type of electrical drive, the volts/Hz speed regulator is able to impose the desired speed through the stator currents frequency. Some difficulties arise at low speed operating conditions, where the resistive voltage drop becomes mandatory, or due to an increase of the rotor time constant, resulting from a rotor resistance increase. This last condition, which corresponds to a parameter change, is particular severe since it increases the value of the slip. The highly oscillatory nature of the system prevents a full conventional approach closed-loop compensation, when fast dynamical responses are required. 33
(6)
MARTINS, PIRES, VILELA MENDES, DENTE
Neglecting the volts/Hz regulator power inverter dynamics, the behaviour of the electrical drive can be described by a set of functional relationships (7), where Z denote the drive speed and f the induction motor stator frequency. These functional relationships are dependent of the electrical drive set of parameters, denoted by P, and of the external torque, denoted by T. g P ,T Z kk p , f k
Z k 1
(7)
The proposed formal language controller, being a model of the drive, will produce the appropriate stator frequency in order to obtain the desired speed. Figure 3 presents the considered drive system with the correspondent grammatical modelling, where the input variable is codified into the non-terminal alphabet and the output variable into the terminal alphabet of the considered grammar.
Stator Frequency
V/Hz
V/Hz Regulator
Induction Machine
Torque
Input
Speed
Mechanical Load
ELECTRICAL DRIVE
Non-Terminal Alphabet
Grammar
Output Terminal Alphabet
Figure 3: Induction Motor Electrical Drive. In order to overcome open-loop inverse modelling instabilities problems the linguistic controller was combined with a conventional feedback controller (Figure 4), assuring global stability [10], as an indirect compensation control loop. The conventional controller (implemented as a PI controller) is used to assure a significative covering of the electrical drive’s working domain during the learning period, where the obtained grammar infers a relation between the input and the output of the electrical drive. Linguistic Controller
+ Speed Reference
_
Conventional Controller
Stator Frequency
+ +
Electrical Drive
Load Torque
Figure 4: Linguistic Controller Control Loop
34
AUTOMATIC LANGUAGE CONTROL OF ELECTRICAL DRIVES It is very difficult to obtain an adequate training data set from an open-loop training scheme. Due to nonlinearities of the drive, if the system is excited with a random signal it remains within a restricted part of the working domain. This data set collection does not describe the system dynamics on its all-operating region. The coarse closed-loop PI conventional controller scheme, used in the learning process, serves as a guide for the drive’s output signal to travel through the operating region. After this modelling phase is finished the output of the conventional controller vanishes to zero. To obtain a representative training data set, a sinusoidal reference signal, with a combination of amplitudes and frequencies, is supplied as input variable, to obtain output variable values in the operating region of the system. In this way, the amplitude and frequency values can be set within the limits of the drive’s response, thus avoiding the filtering problem, and allowing the collected data to be a good training set of the system’s operating domain. Figures 5 and 6 show the experimental dynamical performance, when a sinusoidal reference is considered, for both controllers when working alone. The drive’s speed reference is denoted as a continuous black line and the actual speed is denoted as a continuous grey line. The conventional controller results (with the linguistic controller switched off) are presented in Figure 5 and the linguistic controller results in Figure 6, where a better dynamical behaviour of the linguistic controller can be observed. The good accomplishment within the learning phase allows a good language modelling, and thus a good control feature, through the performing region of the drive. It is important to note that for the speed response presented in Figure 6 the PI conventional controller it is not intentionally switched off but its output remains naturally extremely close to zero. The input of the electrical drive is assured exclusively by the signal provided by the linguistic controller. One of the major advantages regarding the use of grammatical inference linguistic controllers is its ability to adapt themselves to new operating situations. Whenever a change of parameters occurs the inferred functional relationship (7) are no longer exact, since they are parameter dependent. In this case it is important to correct the grammar productions (3) that denote the mentioned functional relationship, in order to model this new situation keeping the grammar up to date. 100
Speed [pu]
80
60
40
20
0 0
2
4
6
8
10
12
14
16
18
Time [seg]
Figure 5: Conventional Controller Speed Response.
35
20
22
MARTINS, PIRES, VILELA MENDES, DENTE 100
Speed [pu]
80
60
40
20
0 0
2
4
6
8
10
12
14
16
18
20
22
Time [seg]
Figure 6: Linguistic Controller Speed Response. For a particular set of parameters P1 the electrical drive establishes the functional relationship (8), inferred by a grammar with a set of productions of the type (3).
Z k 1
g1 Z kk p , f k
(8)
For a different set of parameters P2 the functional relationship (8) is no longer valid, and a new one (9) must be inferred by the linguistic algorithm.
Z k 1
g 2 Z kk p , f k
(9)
Since this new set of parameters doesn’t correspond to new operating conditions, in the sense of new areas of the working domain of the drive, the idea is to adapt the existent productions instead of creating new ones. This procedure doesn’t increase the complexity of the grammar keeping it as a good model of the considered source. For the same operating point the correspondent production is corrected adjusting the non-terminal symbol (10), which corresponds to an adjustment of the linguistic controller command action. Ut 1 Ut 'U
(10)
Figure 7 shows an automatic adaptation of the linguistic controller to the previous described new situation (changes within the electrical drive’s parameters), considering the updating scheme presented in Figure 4. After a change in the induction machine rotor time constant (still unknown for the inferred grammar) the following of the speed reference is ensured by the conventional controller action. However, immediately the correction of the considered production is started. With this new situation incorporated the new production is again sufficient to establish the control of the drive, vanishing the conventional controller command action towards zero.
36
AUTOMATIC LANGUAGE CONTROL OF ELECTRICAL DRIVES
4 Conclusions and Remarks This paper proposes a new formal language approach in modelling and controlling electrical drive systems. An advantage over other information processing techniques relies on the fact that, in the proposed formal language approach, the structure of the productions is not established in advance. Different types of productions are established according to the incoming words from the linguist source. This method provides good recognition results and a reasonable quantitative accuracy, for the identification of unknown dynamics. The acquired linguistic modelling provides the implementation of a linguistic based control topology. The control topology consists in an indirect compensation control loop. It combines the linguistic controller, as a direct compensator, and a conventional controller that allows the covering of the working domain in the learning phase. The experimental results obtained with this topology showed the abilities that this control technique provide. The linguistic controller adapts itself to changes in the system dynamics, acquiring therefore some autonomy in its functioning. The integration of these linguistic techniques within the electrical drive control loop allows a better adaptative modelling of their behaviour, and thus a better control performance. Furthermore, this integration allows the use of these techniques for other features such as anomaly detection [6]. 100
Speed [pu]
80
60
40
20
0 0
4
8
12
16
20
24
28
Time [seg]
(a)
37
32
36
40
44
48
52
MARTINS, PIRES, VILELA MENDES, DENTE 100
Linguistic Controller Command
Command Action [pu]
80
60
Conventional Controller Command
40
20
0 0
4
8
12
16
20
24
28
32
36
40
44
48
52
Time [seg]
(b) Figure 7: Automatic adaptation of the linguistic controller to new drive’s parameters. (a) Output Response. (b) Command Actions
References [1] P. Vas; Artificial-Intelligence-Based Electrical Machines and Drives, Oxford Science Publications, 1999. [2] S. Mondal, J. O. P. Pinto and B. K. Bose; “A Neural Network Based Space Vector PWM Controller for a Three-Level Voltage-Fed Inverter Induction Motor Drive”, in IEEE IAS Annu. Meet. Conf. Rec., Chicago, USA, 2001. >3@ K. Itoh, M. Iwasaki and N. Matsui; “Autonomous Motion Controller Design Using Genetic Algorithms”, in IEEE IAS Annu. Meet. Conf. Rec., Chicago, USA, 2001. [4] J.F. Martins, A.J. Pires, R. Vilela Mendes, J.A. Dente; “Modelling Electromechanical Drive Systems: A Formal Language Approach”, in 1st ICAF Conference on Mechatronic Systems, Darmstad, Germany, 2000. [5] J. F. Martins, J. A. Dente, A. J. Pires, R. Vilela Mendes; “Language Identification of Controlled Systems: Modelling, Control and Anomaly Detection”; IEEE Trans. on Systems, Man and Cybernetics (Part C), vol. 31, no. 2, pp. 234-242, May 2001. >6@ J. F. Martins, P. J. Costa Branco, A. J. Pires, J. A. Dente; "Fault Detection using ImmuneBased Systems and Formal Language Algorithms"; in Proc. of the 39th IEEE Conf. on Decision and Control, Sidney, Australia, December 2000. [7] K.S. Fu and T. L. Booth; “Grammatical inference: Introduction and Survey – Part I”, in IEEE Trans. on SMC, vol 5, no. 1, pp 409-423, January 1975. [8] A. Saloma; Computation and Automata, Cambridge University Press, 1985. >9@ N. Chomsky; Aspects of the theory of syntax, MIT Press, Cambridge, Massachusetts, 1965. [10] H. Gomi and M. Kawato; “Neural Network Control for a Closed-Loop System Using Feedback-Error-Learning”, Neural Networks, vol. 6, pp 933-946, 1993.
38
AUTOMATIC LANGUAGE CONTROL OF ELECTRICAL DRIVES
About the Authors J. F. Martins graduated in electrical engineering at Instituto Superior Técnico (IST), Technical University of Lisbon, in 1990. He received his M.Sc. and Ph.D. degrees in electrical engineering at the same institute, respectively in 1996 and 2003. His research areas are in control of electrical drives, advanced learning control techniques for electromechanical systems, grammatical inference learning algorithms and non-linear systems. A. J. Pires graduated in Electrical Engineering at Instituto Superior Técnico (IST), Technical University of Lisbon, in 1985. He received his M.Sc. in 1988 and his Ph.D. in 1994 in electrical engineering at the same institute. His research areas are in electrical machines, power electronics, intelligent control systems for electrical drives and non-linear systems. R. Vilela Mendes graduated in electrical engineering at Instituto Superior Técnico (IST), Technical University of Lisbon, in 1960, and received the Ph.D. degree in physics from the University of Texas, Austin, in 1970. His main interests are currently nonlinear dynamics of multiagent systems and quantum information. J. A. Dente graduated in electrical engineering and received the Ph.D. degree in electrical engineering from the Instituto Superior Técnico (IST), Technical University of Lisbon, in 1975 and 1986, respectively. His primary areas of interest are in electrical machines, motion control, and he is presently engaged in research on advanced learning control techniques for electromechanical systems.
39
40
Application of Fractional Calculus in Mechatronics J. A. T. Machado1, Ramiro Barbosa1, Fernando Duarte2, and Nuno Ferreira3 1
Institute of Engineering, Polytechnic Institute of Porto, Porto, Portugal {jtm,rbarbosa}@dee.isep.ipp.pt 2
School of Technology, Polytechnic Institute of Viseu, Viseu, Portugal {fduarte}@mat.estv.ipv.pt 3
Institute of Engineering, Polytechnic Institute of Coimbra, Coimbra, Portugal {nunomig}@isec.pt
Abstract — Fractional Calculus (FC) goes back to the beginning of the theory of differential calculus. Nevertheless, the application of FC just emerged in the last two decades. In the field of dynamical systems theory some work has been carried out but the proposed models and algorithms are still in a preliminary stage of establishment. Having these ideas in mind, the paper discusses a FC perspective in the study of the dynamics and control of mechanical systems.
1 Introduction The generalization of the concept of derivative Dαf(x) to non-integer values of α goes back to the beginning of the theory of differential calculus. In fact, Leibniz, in his correspondence with Bernoulli, L’Hôpital and Wallis (1695), had several notes about the calculation of D1/2f(x). Nevertheless, the development of the theory of Fractional Calculus (FC) is due to the contributions of many other mathematicians such as Euler, Liouville, Riemann and Letnikov [1−3]. In the fields of physics and chemistry [1], FC is presently associated with the modeling of electro-chemical reactions, irreversibility and electromagnetism. The adoption of the FC in control algorithms has been recently studied using the frequency and discrete-time domains [4−5]. Nevertheless, this research is still giving its first steps and further investigation is required. Bearing these ideas in mind, this paper is organized as follows. Section 2 outlines the fundamental aspects of the theory of FC. Section 3 introduces the main algorithms to approximate fractional-order derivatives. Section 4 presents several case studies on the implementation of FC based models in the analysis and control of mechanical systems. Finally, section 5 draws the main conclusions.
41
MACHADO,BARBOSA,DUARTE,FERREIRA
2 Main Mathematical Aspects of the Theory of Fractional Calculus Since the foundation of the differential calculus the generalization of the concept of derivative and integral to a non-integer order α has been the subject of several approaches. Due to this reason there are various definitions of fractional-order integrals (Table 1) which are proved to be equivalent [1−3]. Based on the proposed definitions it is possible to calculate the fractional-order integrals/derivatives of several functions. For example, according with [3] we have the formulae of Table 2. Nevertheless, the problem of devising and implementing fractionalorder algorithms is not trivial and will be the matter of the next sections.
(I ϕ)(x ) = Γ(1α) ³ α a+
Riemann-Liouville
(
)
α Grünwald-Letnikov I a + ϕ (x ) =
x
a
ϕ(t )
(x − t )1−α
d t, a < x , α ∈ C
ª [( x −a ) h ] Γ(α + j ) º 1 ϕ( x − jh )» lim «h α Γ(α) h → +0 « Γ( j + 1) » j =0 ¬ ¼
¦
{ }
L I 0α+ ϕ = L{ϕ} s α , Re(α ) > 0
Laplace
Table 1: Some definitions of fractional-order integrals
ϕ( x ) , x ∈ R
( x − a )β−1 e λx sin(λx ) ® ¯cos(λx ) e
(γx ) ® ¯cos(γx )
λx sin
(I ϕ)(x ) , x ∈ R , α ∈ C α +
Γ(β ) (x − a )α+β−1 , Re(β) > 0 Γ(α + β )
λ− α e λx , Re(λ ) > 0 sin(λx − α π 2 ) λ− α ® , λ > 0,Re(α ) > 1 ¯cos(λx − α π 2 ) e λx
(λ2 + γ 2 )α 2
sin(γx − αφ) φ = arctan (γ λ ) , ® ¯cos(γx − αφ) γ > 0,Re(λ ) > 1
Table 2: Fractional-order integrals of several functions
3 Approximations to Fractional-Order Derivatives In this section we analyze two methods for implementing fractional-order derivatives, namely the frequency-based and the discrete-time approaches, and its implication in control algorithms. In order to analyze a frequency-based approach to Dα, with α ∈ R such that 0 < α < 1, let us consider the recursive circuit represented on Figure 1a: n
I=
¦ I i , Ri +1 = i =0
C Ri , Ci +1 = i , ε, η > 1 ε η
42
(1)
APLICATION OF FRACTIONAL CALCULUS IN MECHATRONICS
where η and ε are scale factors, I is the current due to an applied voltage V and Ri and Ci are the resistance and capacitance elements of the ith branch of the circuit. The admittance Y (jω) is given by: I ( jω) Y ( jω) = = V ( jω)
n
jωCε i
¦ jωCR + (ηε)i
(2)
i =0
Figure 1b shows the asymptotic Bode diagrams of amplitude and phase of Y(jω). The pole and zero frequencies ( ωi and ω′i ) obey the recursive relationships: ω′i +1 ωi +1 ω ω′ = = εη , i = ε , i +1 = η ω′i ωi ω′i ωi
(3)
From the Bode diagram of amplitude or of phase, the average slope m′ can be calculated as: log ε m′ = (4) log ε + log η Consequently, the circuit of Figure 1a represents an approach to Dα, 0 < α < 1, with m′ = α, based on a recursive pole/zero placement in the frequency domain. As mentioned in section 2, the Laplace definition for a derivative of order α ∈ C is a ‘direct’ generalization of the classical integer-order scheme with the multiplication of the signal transform by the s operator. Therefore, in what concerns automatic control theory this means that frequency-based analysis methods have a straightforward adaptation to their fractional-order counterparts. Nevertheless, the implementation based on the Laplace definition (adopting the frequency domain) requires an infinite number of poles and zeros obeying a recursive relationship [4]. In a real approximation the finite number of poles and zeros yields a ripple in the frequency response and a limited bandwidth. 20 log10 |Y(jω)|
log η
I +
I0
In
I1
log ε
Δdb
20m’ db/dec 20 db/dec
V
R
R/ε
R/εn
C
C/η
C/ηn
−
ω1 =
1 RC
ω2 =
ω1′ =
a)
η RC
log ω
εη RC ω ′2 =
εη2 RC
b)
Figure 1: a) Electrical circuit with a recursive association of resistances and capacitances; b) Bode diagram of amplitude of Y(jω) Based on the Grünwald-Letnikov definition of a derivative of fractional order α of the signal x(t), Dαx(t), leads to the expression:
43
MACHADO,BARBOSA,DUARTE,FERREIRA D
α
ª 1
x (t ) = lim « h→0
∞
Γ(α + 1)
º
(− 1)k x (t − kh )» α ¦ Γ(k + 1)Γ(α − k + 1) «h » ¬
(5)
¼
k =0
where Γ is the gamma function and h is the time increment. This formulation [5] inspired a discrete-time calculation algorithm, based on the approximation of the time increment h through the sampling period T, yielding the equation in the z domain:
{
}
1 Z D α x (t ) ≈ α X (z ) T
∞
(− 1)k Γ(α + 1) z −k ¦ k! Γ(α − k + 1) k =0
§ 1 − z −1 · ¸ =¨ ¨ T ¸ ¹ ©
α
(6)
An implementation of (6) corresponds to a r-term truncated series given by:
{
}
1 Z D α x (t ) ≈ α X (z ) T
(− 1)k Γ(α + 1) z −k ¦ k! Γ(α − k + 1) k =0 r
(7)
Clearly, in order to have good approximations, we must have a large r and a small T. An important aspect of fractional-order controllers can be illustrated through the elemental control system represented in Figure 2, with open-loop transfer function G(s) = Ks−α (1 < α < 2) in the forward path. The open-loop Bode diagrams (Figure 3) of amplitude and phase have a slope of −20α dB/dec and a constant phase of −απ/2 rad, respectively. Therefore, the closed-loop system has a constant phase margin of π(1 − α/2) rad, that is independent of the system gain K. Likewise, this important property is also revealed through the root-locus depicted in Figure 4.
R(s)
+
G (s ) = −
K
C(s)
sα
Figure 2: Block diagram for an elemental feedback control system of fractional order Į 20 log10 |G(jω)|
arg{G(jω)} −20α dB/dec
log ω
−
π 2
−α
π 2
−π
log ω
Figure 3: Open-loop Bode diagrams for a system of fractional order 1 < Į < 2
44
APLICATION OF FRACTIONAL CALCULUS IN MECHATRONICS +∞ ← K
Im(s)
s-plane
π−π/α
Re(s)
π−π/α
K=0
+∞ ← K
Figure 4: Root-locus for a feedback control system of fractional order 1 < Į < 2
4 Control of Mechanical Systems In this section we study the adoption of fractional-order algorithms in the dynamics and control of mechanical systems. 4.1 Describing Function of Systems with Backlash The standard approach to the backlash study is based on the adoption of a geometric model that neglects the dynamic phenomena involved during the impact process. Due to this reason often real results differ significantly from those predicted by that model. In this section, we use the describing function (DF) method to analyse systems with backlash and impact phenomena [6], usually called dynamic backlash. The proposed mechanical model consists on two masses (M1 and M2) with backlash and impacts as shown in Figure 5. A collision between the masses M1 and M2 occurs when x1 = x2 or x2 = h + x1. In this case, we can compute the velocities of masses M1 and M2 after the impact ( x1′ and x 2′ ) by relating them to the previous values ( x1 and x 2 ) through Newton’s rule:
(x´′1 − x´′2 ) = −ε (x1 − x 2 ),
0 ≤ ε ≤1
(8)
where ε is the coefficient of restitution. In the case of a fully plastic (inelastic) collision ε = 0, while in the ideal elastic case ε = 1. x1 , x1
x 2 , x 2
f(t)
M2 M1 Side A
h
Side B
Figure 5: System with two masses subjected to dynamic backlash
45
MACHADO,BARBOSA,DUARTE,FERREIRA By application of the principle of conservation of momentum M 1 x1′ + M 2 x 2′ = M 1 x1 + M 2 x 2 and of (8), we can find the sought velocities of both masses after an impact: x (M − εM 2 ) + x 2 (1 + ε)M 2 x1 (1 + ε)M 1 + x 2 (M 2 − εM 1 ) , x 2′ = (9) x1′ = 1 1 M1 + M 2 M1 + M 2 We can calculate numerically the Nyquist diagram of −1/N(F,ω) for an input force f(t) = F cos(ωt) applied to mass M2 and an output position x1(t) of mass M1. Figure 6 shows the Nyquist plots for F = 50 N and ε = {0.1,…,0.9} and for F = {10, 20, 30, 40, 50} N and ε = 0.5, respectively, considering M1 = M2 = 1 Kg and h = 10−1 m. The charts reveal the occurrence of a jumping phenomenon, which is a characteristic of nonlinear systems. This phenomenon is more visible around ε ≈ 0.5, while for the limiting cases (ε → 0 and ε → 1) the singularity disappears. Moreover, Figure 6b shows also that for a fixed value of ε the charts are proportional to the input amplitude F. The validity of the model is restricted to an input force f(t) with frequency higher than a lower-limit ωC ≈ [(2F/M2h)2(1−ε)5]1/4 and lower than an upper-limit ωL = 2(F/M2h)1/2, corresponding to an amplitude of x1(t) within the clearance h/2. In the middle-range occurs a jumping phenomena at frequency ωJ ~ (F/M2h)1/2. Figure 7 shows the log-log plots of Re{−1/N} and Im{−1/N} versus ω with F = 50 N and ε = {0.1, 0.3, 0.5, 0.7, 0.9}, for the cases of the static and dynamic backlash. The classical static backlash model corresponds to the DF of a linear system of a single mass M1+M2 followed by the geometric backlash having as input and as output the position variables. Comparing the results for the static and the dynamic backlash models we conclude that: − The charts of Re{−1/N} are similar for low frequencies (where they reveal a slope of +40 dB/dec) but differ significantly for high frequencies. − The charts of Im{−1/N} are different in all range of frequencies. Moreover, for low frequencies, the dynamic backlash has a fractional slope inferior to +80 dB/dec of the static model. 3000
1200 ε =0.1
2500
F=50
ε =0.5
1000 ε =0.2
F=40
ω=40
2000
800
ω=35
1500
Im (-1/N)
Im (-1/N)
ε =0.3 ε =0.4
ω = 25
ε =0.7
500 ω=20
F=10
200
ε =0.8
ω =20
ε =0.9
ω=15
0
ω =30
F=20 400
ε =0.6 ω=25
ω = 15
ε→1
500
1000
1500
ω = 35
600
ε =0.5
ω=30
1000
0 -500
F=30
ω = 40
0 0
2000
500
1000
1500
R e(-1/N)
Re(-1/N)
a)
b)
Figure 6: Nyquist plot of −1/N(F,ω) for a system with dynamic backlash, for: a) F = 50 N and ε = {0.1, …, 0.9}; b) F = {10, 20, 30, 40, 50} N and ε = 0.5
46
APLICATION OF FRACTIONAL CALCULUS IN MECHATRONICS 10
4
10
4
Static
Static 10
ε =0.7, 0.9 ε =0.5 ε =0.3
3
10
10
10
ε =0.1
1
10
10
Dynam ic 10
10
ε =0.9
Dynam ic
1
0
-1
0
10
10
ε =0.1 ε =0.3 ε =0.5 ε =0.7
2
2
Im (-1/N)
Re(-1/N)
10
3
-1
10
10 0
1
10 ω (rad/s)
10
2
-2
-3
10
0
10
1
10
2
ω (rad/s )
Figure 7: Plots of Re{−1/N(F,ω) } and Im{−1/N(F,ω) } for a system with dynamic backlash versus the exciting frequency ω, for F = 50 N and ε = {0.1, 0.3, 0.5, 0.7, 0.9} A careful analysis must be taken because it was not demonstrated that a DF fractional slope would imply a fractional-order model. In fact, in this study we adopt integer-order models for the system description but the fractional-order slope is due to continuous/discrete dynamic variation that results due to the mass collisions [6]. 4.2 Trajectory Control of Redundant Manipulators A redundant manipulator possess more degrees-of-freedom (dof) than those required to establish an arbitrary position and orientation of the gripper. We consider a manipulator with n dof whose joint variables are denoted by q = [q1,q2,...,qn]T and a class of operational tasks described by m variables x = [x1,x2,...,xm]T, m < n. The relation between the joint vector q and the manipulation vector x corresponds to the direct kinematics: x = f (q ) (10)
Differentiating (10) with respect to time yields: x = J (q )q
(11)
Hence, from (11) it is possible to calculate a q(t) path in terms of a prescribed trajectory x(t). A solution is:
q = J # (q )x
(12)
where J# is one of the generalized inverses of the J. The joint positions can be computed through the time integration of the velocities (12) according with the block diagram depicted in Figure 8. Δx
xref
+
Δq J#(q)
−
++
x
q Delay
Direct Kinematics
Figure 8: Diagram of the closed-loop inverse kinematics algorithm J#
47
MACHADO,BARBOSA,DUARTE,FERREIRA An important aspect is that repetitive trajectories in the operational space do not lead to periodic trajectories in the joint space. This is an obstacle for the solution of many tasks because the resultant robot configurations have similarities with those of a chaotic system. We consider a 3R planar manipulator and during the experiments it is adopted Δt = 10−3 s and l1 = l2 = l3 = 1 m. Figure 9 depicts the 3R-robot phase-plane joint trajectories, when repeating a circular motion with frequency ω0 = 3 rad/s, center at r = [x2+y2]½ =1 m and radius ρ = 0.1 m. Besides the position and velocity drifts, leading to different trajectory loops, we have points that are ‘avoided’. Such points correspond to arm configurations where several links are aligned. In order to capture information about the system during all the dynamic evolution we devised an experiment that addresses the frequency response for two alternative exciting signals: a doublet-like and a white noise distributed throughout the 500-cycle trajectories. Figure 10 depicts the resulting amplitude Bode diagrams of the type:
Q1 ( s ) (s α + z) =K α X ref ( s ) ( s + p)
(13)
where K is the gain, z and p are the zero and pole, respectively, and α is the zero/pole fractional-order. For the doublet excitation it results α ≈ 1.0 in contrast with the case of white noise excitation where we get a fractional value α ≈ 1.3. This is due to the memory-time property of fractional-order dynamics because they capture the dynamic phenomena involved during all the time-history of the experiment, in contrast with integer-order derivative that just capture a “local” dynamics [7]. 4 3
dq 1/dt
2 1 0
-1 -2 -3
-3
-2
-1
0 q1
1
2
3
Figure 9: Phase plane trajectory for the 3R- robot joint 1 at r = 1 m, ρ = 0.1 m, ω0 = 3 rad/s
48
APLICATION OF FRACTIONAL CALCULUS IN MECHATRONICS 100
20
90 15
70 ρ=0.1
60 1 ref dB
10 ρ=0.5
|q /x |
|q 1/xref| dB
ρ=0.3
80
ρ=0.3
5
50 ρ=0.5
40 30 20
ρ=0.1
0
10 0
-5 -3 10
10
-2
10
-1
10 ω (rad/s)
0
10
1
10
-10 -3 10
2
10
-2
10
-1
10 ω (rad/s)
0
10
1
10
2
a) b) Figure 10: Frequency response of the 3R robot ω0 = 3 rad/s, r = 2 m, ρ ∈ {0.10, 0.30, 0.50} m for: a) A doublet-like; b) A white noise perturbation during 500-cycle trajectories
4.3 Position/Force Control of Manipulators This section studies the position/force robot control, involving contact between the gripper and the environment, using fractional-order controllers in the hybrid algorithm proposed by Raibert and Craig [8]. The dynamical equation of an n dof robot interacting with the environment is given by: + C(q, q ) + G(q) − J T (q)F IJ = H(q)q
(14)
where τ and q are the n × 1 vectors of joint torques and positions, H(q) is the n × n inertia matrix, C(q, q ) and G(q) are the n × 1 vectors of centrifugal/Coriolis and gravitational terms and F is the m × 1 vector of the force that the environment exerts in the gripper. In this study we adopt the 2R robot (Fig. 11a) and we consider the schematic structure of the position/force hybrid control algorithm depicted in Fig. 11b. Yc
y
Kinematics
yc xc q2
qes
−
Yd
l2
+
S
Jc−1
I−S
JcT
Position controller
J2g
J1g
l1
J2m
q1
θ x
J1m
Fd
τff
+
τes
+
I−S
Jc
T
τP +
Robot and environment
τF Fc Force controller
−
a)
+
q
b)
Figure 11: a) 2R robot and constraint surface; b) Position/force hybrid controller
49
MACHADO,BARBOSA,DUARTE,FERREIRA The numerical values adopted for the 2R robot are m1 = 0.5 kg, m2 = 6.25 kg, r1 = 1.0 m, r2 = 0.8 m, J1m = J2m = 1.0 kgm2 and J1g = J2g = 4.0 kgm2. In this paper we consider the yC (xC) Cartesian coordinates to be position (force) controlled. The constraint plane is determined by the angle θ (Figure 11a) and the contact displacement xc of the robot gripper with the constraint surface is modelled through a linear system with a mass M, a damping B and a stiffness K with dynamics: Fc = Mxc + Bx c + Kxc (15) For comparison purposes we adopt fractional-order (FO) and PID algorithms for the position/force controllers. In our case, for implementing FO algorithms of the type C(s) = K sα, we adopt a 4th-order discrete-time Padé approximation (ai, bi, ci, di ∈ R, n = 4): C P (z ) ≈ K P C F (z ) ≈ K F
a 0 z n + a1 z n −1 + .. + a n
(16a)
b0 z n + b1 z n −1 + ... + bn c0 z n + c1 z n −1 + .. + cn
(16b)
d 0 z n + d1 z n −1 + ... + d n
where Kp/KF are the position/force loop gains. We analyze the system performance both for ideal transmissions and robots with backlash at the joints according with model (9). Moreover, we compare the response of FO and the PD: CP(s) = Kp + Kd s and PI: CF(s) = Kp + Ki s−1 controllers, in the position and force loops [9]. Both algorithms were tuned by trial and error having in mind getting a similar performance in the two cases. The resulting parameters were FO: {KP,αP}≡{105, 1/2}, {KF ,αF}≡{103,−1/5} and PD/PI: {Kp,Kd}≡{104,103}, {Kp,Ki}≡{103,102} for the position and force loops, respectively. Moreover, it is adopted the operating point {x,y}≡{1,1}, a constraint surface with parameters {θ,M,B,K}≡{π/2,103,1.0,102} and a controller sampling frequency fc = 1 kHz. In order to study the system dynamics we apply, separately, rectangular pulses, at the position and force references, that is, we perturb the references with {δycd,δFcd} = {10−1,0} and {δycd,δFcd} = {0,10−1}. The time responses (Figures 12 and 13) reveal that, although tuned for similar performances in the first case, the FO is superior to the PD/PI in the cases with dynamical phenomena at the robot joints [9].
5 Conclusions This paper presented the fundamental aspects of the FC calculus, the main approximation methods for the fractional-order derivatives calculation and the implication of the FC concepts on the extension of the classical automatic control theory. Bearing these ideas in mind, several motion control systems were described and their dynamics was analyzed in the perspective of fractional calculus. It was shown that fractional-order models capture phenomena and properties that classical integer-order simply neglect. In this line of thought, this article is a step towards the development of motion control systems based on the theory of FC.
50
APLICATION OF FRACTIONAL CALCULUS IN MECHATRONICS −4
15 dyc PID FO
dFc PID FO
10 dy(m)
dy(m)
0.1
x 10
0.05
5 0
0
0
0.2
0.4
−5 0
0.6
0.2
Time (s)
0.4
0.6
Time (s) 0.15 dyc PID FO
0.1
0.1 dFx(N)
dFx(N)
0.05
dFc PID FO
0 −0.05
0.05
−0.1
0
−0.15 −0.2 0
0.2
0.4
0.6
−0.05 0
0.2
Time (s)
0.4
0.6
Time (s)
Figure 12: Time response for the 2R ideal robot with FO and PD/PI controllers −3
12
−4
x 10
10 dFc PID FO
10
6
6 4
4 2
2
0
0 −2 0
dFc PID FO
8 dy(m)
dy(m)
8
x 10
0.2
0.4
−2 0
0.6
0.2
Time (s)
0.4
0.6
Time (s)
0.015 dyc PID FO
dyc PID FO
0.1
0.005
dFx(N)
dFx(N)
0.01
0
0.05
−0.005 −0.01 −0.015 0
0 0.2
0.4
0.6
Time (s)
0
0.2
0.4
0.6
Time (s)
Figure 13: Time response for the 2R robot with backlash for FO and PD/PI controllers
51
MACHADO,BARBOSA,DUARTE,FERREIRA
References [1]
K. B. Oldham and J. Spanier. The Fractional Calculus. Academic Press, New York, 1974.
[2]
K. S. Miller and B. Ross. An Introduction to the Fractional Calculus and Fractional Differential Equations. John Wiley and Sons, New York, 1993.
[3]
S. G. Samko, A. A. Kilbas and O. I. Marichev. Fractional Integrals and Derivatives. Gordon and Breach Science Publishers, Amsterdam, 1993.
[4]
A. Oustaloup. La Dérivation Non Entière: Théorie, Synthèse et Applications. Editions Hermes, Paris, 1995.
[5]
J. A. Tenreiro Machado. Analysis and Design of Fractional-Order Digital Control Systems. SAMS Journal Systems Analysis, Modelling, Simulation, 27:107−122, 1997.
[6]
Ramiro S. Barbosa and J. A. Tenreiro Machado. Describing Function Analysis of Systems with Impacts and Backlash. Nonlinear Dynamics, 29(1−4): 235−250, July 2002.
[7]
Fernando B. Duarte and J. A. Tenreiro Machado. Chaotic Phenomena and Fractional-Order Dynamics in the Trajectory Control of Redundant Manipulators. Nonlinear Dynamics, 29(1−4): 315−342, July 2002.
[8]
M. Raibert and J. Craig. Hybrid Position/Force Control of Manipulators. ASME Journal of Dynamic Systems, Measurement, and Control, 102(2): 126−133, 1981.
[9]
J. A. Tenreiro Machado, Ramiro S. Barbosa, and N. M. Fonseca Ferreira. Fractional-Order Position/Force Control of Mechanical Manipulators. In Proceedings of the CIFA’2002 Conférence Int. Francophone d'Automatique, pages 641−646, Nantes, France, July 2002.
About the Authors J. A. T. Machado was born in 1957. He graduated and received the Ph.D. degree in electrical and computer engineering from the Faculty of Engineering of the University of Porto, Portugal, in 1980 and 1989, respectively. Presently he is Coordinator Professor at the Institute of Engineering of the Polytechnic Institute of Porto, Dept. of Electrical Engineering. His main research interests are robotics, modeling, control, genetic algorithms, fractional-order systems and intelligent transportation systems. Ramiro Barbosa was born in 1971. He graduated in Electrical Engineering - Industrial Control from Institute of Engineering of Polytechnic Institute of Porto, Portugal, in 1994 and received the Master’s degree in Electrical and Computer Engineering from the Faculty of Engineering of the University of Porto, Portugal, in 2000. Presently he teaches at the Institute of Engineering of the Polytechnic Institute of Porto, Dept. of Electrical Engineering. His research interests include modelling, control, fractional-order systems, and nonlinear systems. Fernando Duarte was born in 1950. He graduated in Mathematics from University of Aveiro, Portugal, in 1982 and received the Ph.D. degree in Electrical and Computer Engineering from the Faculty of Engineering of the University of Porto, Portugal, in 2003. Presently he is Professor at the School of Technology, Polytechnic Institute of Viseu, Dept. of Mathematics. His main research interests are robotics, modeling, control, fractional-order systems. Nuno Ferreira graduated with the B.A. degree in the Institute of Engineering of the Polytechnic Institute of Coimbra, in 1994, the degree in Electrotechnical Engineering at the University of Porto, in 1996 and the Master’s degree in Electrotechnical and Computer Engineering in 1999. Presently he is Professor at the Institute of Engineering, Polytechnic Institute of Coimbra, Dept. of Electrotechnical Engineering. His main research interests are robotics and nonlinear systems.
52
Module Library for Rapid Prototyping and Hardware Implementation of Vector Control Systems József Vásárhelyi 1, Mária Imecs2, János J. Incze2 and Csaba Szabó2 1
Department of Automation, University of Miskolc, Miskolc, Hungary
[email protected] 2
Department of Electrical Drives and Robots, Technical University of Cluj, Cluj-Napoca, Hungary {imecs, Ioan.Incze, Csaba.Szabo}@edr.utcluj.ro
Abstract — The paper focuses on the implementation of the most common blocks for the field-oriented AC drives. With the created Module Library the rapid prototyping and fast implementation of their vector control systems becomes possible. The control system structures are implemented in configurable logic cells using FPGA design environment. The performances of some proposed control structures were compared with the simulation results based on Simulink models.
1 Introduction Most motor control applications are concerned with vector control for AC drives. Vector control systems for induction motors give the best dynamic behaviour. Analysing these systems some modularity can be observed, which help fast implementation of motor control applications in reconfigurable structures [2], [8]. Reconfigurable hardware was used in the last years for vector control system implementations. We speak about dynamic reconfiguration of a control system for AC drives, if the real-time application (software) changes the computing platform structure (hardware). In vector control systems, the reconfigurability was introduced by Imecs et all. in [1]. In this concept, each configuration is considered as a state of a logic state machine. When a reconfiguration condition occurs, the system will start the reconfiguration process in which it will switch the current configuration to the next corresponding one. This type of configuration procedure is the context switching and was developed by Sanders in [4]. While context switching is a reconfiguration technology for Field Programmable Gate Arrays (FPGA), the logic state machine with different control system structures in each state is a reconfiguration method for the control systems presented in Figure 1.
53
VÁSÁRHELYI, IMECS, INCZE, SZABÓ P o w e r-on I n it
STA TE1
STA TE2
C o n fig u r a tio n 1
C o n fig u r a tio n 2
STA TEn C o n fig u r a tio n „n”
Figure 1: State machine with different vector control structures for each state. In order to make possible the reconfiguration, there is a need for a profound analysis of the required control structures. Kelemen and Imecs in [3] have presented most of the basic control structures for AC drives. A part of the analysis is presented in the next section.
2 Analysis of Vector Control Scheme The dynamic behaviour of the AC machines is improved by vector control procedures based on the field-orientation principle. The necessity of reconfiguration is based on the observation that the performance of the drive is depending on the vector control structure correlated with the type of the supply power frequency converter [7], [8]. The analysis of the control schemes was performed based on the following criteria: -
Given two vector control structures where common modules exist: • Which are the common modules in the same position and with the same function? • Which are the common modules with different functionality? • Which are the particular modules of each reconfigurable structure? - When a reconfiguration condition occurs, is it possible the variable-value transfer for the modules on the same position or no parameter transfer allowed? - It is possible the variable-value transfer of the PI controllers of the different schemes? - It is possible to give a general mathematical form of all the modules? - As a result of the analysis, the Module Library should be universal for rapid prototyping of any vector control system and from the prototype the implementation should directly result. Let us analyse such a reconfigurable vector control structure with two configurable states. This vector control structure presents the generalities of the most common con-
54
MODULE LIBRARY FOR RAPID PROTOTYPING trol schemes and in the meantime contains some particular modules. The reconfigurable state machine presented in Figure 1 for the vector control structure presented in Figure 2 is working in State 1 as a tandem converter [5], [6] and [7]. The tandem converter is working with two inverters; they are: a Current Source Inverter (CSI), which is controlled in current, and the other a Voltage Source Inverter (VSI) controlled in voltage. AC line Ref iDC
ʌ Flux Controller
ΨrRef
+
Ref isd λr
Controller
ωrRef
Ref isq
Ref isq λr
-
Speed-1 Controller
-
+ -
isd isq
Ref isd λr Ref isq λr 2
+
CSI Current
usdȜr
CooT
Ref vsd
[D(-Ȝr)]
1 usqȜr VsC vRef sq Current Controllers
cosȜr
Mechanical Angular Speed
VA1
fs Synchronisation İ CSI
Ȍr
VA2
Diode Rectifier
Ld Cd
PAM-CSI
1
Ref xsd
Ref vsd
Ref xsq
Ref vsq
VsRef
PWM logic γsRef SVM
VA3
vsd vsq
[vs]
PhT [A]
isd isq
[D(Ȝr)]
Zp
Ȧr
εRef s
CooT isdȜr isqȜr
Identified Field
2
sinȜr
Ȧ
Thyristor Rectifier
DC-link current controller
Ref isd
Ref isq λr
Į
iDC
isRef
- Speed-2
+
+
2 3
ȥrd
ȥmd
ȥsd
ȥrq
ȥrCo ȥmq
ȥmCo ȥ sq
1
PWMVSI VsId
[vs] 2
PhT [A]
1
[is]
Phase Transformation
2
3xC
ȥsC
Stator-flux Rotor-flux Air-gap-flux Stator-flux Computation Compensation Compensation Computation
Induction motor
Figure 2: Reconfigurable vector control structure with two configuration states. The most part of the energy is converted by the CSI, controlled by Pulse Amplitude Modulation (PAM), operating with reduced number of commutation - in comparison with the VSI, controlled by Pulse-Width Modulation (PWM), which supplies only the reactive power required to improve the quality of the motor currents in order to compensate them into sine wave form. For the case of the logic state machine in State 2, only the CSI is working. Its currents are synchronized with respect to the control variables of the stator-current vector. The transition from State 1 to State 2 is made when the VSI fails and the control structure need to be reconfigured in order to be able to control the AC drive with the Current Source Inverter. State 3 (represented in Figure 1) could be another configuration of the vector control system when the CSI fails and only the VSI is able to control the motor (at reduced load conditions). A possible representation of the transition from one state to other, in fact, may be a demultiplexer and a multiplexer, but one should note that, these components might be carried out in reality, while they are intended to be abstract entities, which did not need any implementation at all [2].
55
VÁSÁRHELYI, IMECS, INCZE, SZABÓ One may observe in the module analysis, that the flux computation modules are common in both control schemes and so they will be one of the most used modules in the Module Library. As the three flux-computation modules can be computed in a single phasor equation, they will represent a single module, with the following equations: Ψrd = (1 + σ r ) (usd − Rsisd )dt − [(1 + σ r )Lσs + Lσr ]isd ;
³
³(
)
Ψrq = (1 + σ r ) usq − Rsisq dt − [(1 + σ r )Lσs + Lσr ]isq .
(1.a) (1.b)
In this way in the Module Library for the flux computation we will have one module, but if it is needed, can be created easily all the component modules for the partial flux computations (Ψsd,q, Ψmd,q, Ψrd,q) separating the stator-field computation (ΨsC) and the flux compensation modules (ΨmCo, ΨrCo). In addition, the library can handle both flux-oriented control schemes, such as rotor-flux-oriented and stator-fluxoriented one for any supplying mode of the induction motor. One of the most common modules (often-used one) is the Vector Analyser (VA), and as is illustrated in Figure 2, it is used to compute the module and position of different space-phasor variables. Its equations are given in the general form, as follows: g = g d2 + g q2 ; sin λ =
gq g
; cos λ =
gd g
.
(2.)
Other two modules, which are very common in all control structures, are the direct and reverse Coordinate Transformation blocks (CooT[D(Ȝ)], CooT[D(-Ȝ)]) described by the general equation: g sdλr = g sd cos λ r ± g sq sin λ r ;
(3.a) g sqλr = g sq cos λ r # g sd sin λ r ; (3.b) One should mention also other usual modules such as the direct and reverse Phase Transformation modules (PhT[A] and PhT[A]-1 - for currents and voltages). These modules have also general character. For all the above-mentioned modules, when reconfiguration occurs, there is no need for variable-value transfer because these modules make all computation operations using only the actual sampled values. The modules where one have to consider the variable-value transfer is for example the so called control strategy blocks, represented in this case by the PI controllers of speed, flux and currents. The actual variable value depends on the previous value of the PI controller output, for this reason the reconfiguration process should store these variable values in order to avoid oscillation at the PI controller outputs (i.e. initialising the new PI starting conditions). These modules are called together “control strategy block”, as they can be realised in many ways (i.e. using adaptive- or robust procedures, fuzzy logic, etc.). The variable-value transfer of the PI controllers in the case when (as in Figure 2) the output variables of the controllers are different in each state (in one case this is the current reference i sdRef,qλr and in the other case it is the voltage one v sdRef,qλr ), the parameter
56
MODULE LIBRARY FOR RAPID PROTOTYPING transfer cannot be solved. This justifies why the reconfiguration method applied here is context switching. From the analysis results, that a Module Library can be created for fast modelling. The modularity presents importance if the implementation target is based on reconfigurable hardware, such as Field Programmable Gate Arrays (FPGAs) or Configurable System on a Chip (CSoC) [8].
3 Module Library Characteristics The creation of a Module Library was motivated by the fact that the simulation of the reconfiguration process it is not possible or it is difficult while no tools exist for this kind of simulation. On the other hand recently it has become possible to implement digital signal processing algorithms on FPGAs directly from Matlab Simulink® environment. This above mentioned possibility gave the idea to implement the described Module Library, which is completely parametrical and any change on the structure of the vector control system can be applied very fast and easy in the implementation hardware. The elements of the library are the most common modules of a vector control system (as were described in the previous paragraph), and each of them presents a standalone unit in the library. Consequently, a vector control system can be synthesised in FPGA structures due to the independent character of the modules. Most of vector control system implementations use 16 bit two’s complement fixedpoint data format. Here this format was also adopted for the input variables of each module. Inside the module for constant representation it was adopted the same data format, but the binary point has variable position, depending on the motor variables. For an implementation targeted the major advantage of using the Module Library is: the computation speed increases. It results from the parallel algorithm computation of both components (d, q) and the parallel computation of each module. This would be a significant advantage compared to the DSP sequential implementations.
4 Simulation and Rapid Prototyping with Module Library With the created Module Library, theoretically any vector control system can be tested, simulated and implemented. Using the Module Library a vector control system based on reconfigurable hardware can be implemented in short time. The rated data of the motor used for simulation are: 5.5kW, 50Hz, 220Vrms, 14Arms, sleep 4% and 4 pole-pairs. The simulation was performed for the presented vector control system structures, as follows: -
First: It was simulated configuration of State 1 – CSI+VSI, i.e. the tandemfed induction motor and then State 2 – the CSI-fed one. Second: It was performed the reconfiguration process; the motor started in State 1 and after 0.5s its system was reconfigured to State 2.
57
VÁSÁRHELYI, IMECS, INCZE, SZABÓ The results of the library computing elements were compared with simulation results produced by the modelled system realized in Simulink environment. One can conclude that some variables are working better with the Module Library (for example the PI implementation), but in some cases, the quantisation error was not satisfactory against our expectancies.
VSI-C Current A]
200 150 100 50
60 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
40
1
Stator currend [A]
CSI Current [A]
Stator Current [A]
The following diagrams show the simulation results for the running motor and reconfiguration in the above mentioned conditions. Figure 3 shows the stator-current waveform resulting as the sum of the output currents of the CSI and of the VSI. Also the figure shows that after reconfiguration the stator current results as the sum of CSI output currents and the capacitor ones. Figure 4 to Figure 6 represents several spacephasors of the CSI and VSI output currents. Figure 7 and Figure 8 represents the computed rotor-flux and stator-flux space-phasors. While the resultant stator flux and computed rotor flux is represented in Figure 10. Figure 9 shows the resultant statorterminal-voltage space-phasor. The reconfiguration of the control structure (i.e when the VSI fails and the CSI will work alone) it is observable in all the figures. The reconfiguration effects are observable also in the motor parameters (speed and torque) as shown in Figure 11and Figure 12.
50 0 -50 -100
0
-20
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
-40 50
-50
1
-100
0.8
0
0.6 0.4
-150
0
0.1
0.2
0.3
0.4
0.5 time [s]
0.6
0.7
0.8
0.9
1
-50
Stator current q [A]
Figure 3: Current waveforms before and after reconfiguration.
60
0.2 0
time[s]
Figure 4: Stator-current space-phasor (simulated results).
VSI or Capacitor currentd [A]
100
40 Stator currend [A]
20
20 0
-20 -40 50
50
0
-50 50 1 0.8
0
0.8
-50
0.6
-50
0.4 Stator currentq [A]
1
0
0.6
0.4
0.2 0
VSI or Capacitor currentq[A]
time[s]
Figure 5: Current-Source Inverter output current space-phasor.
58
-100
0.2 0
time[s]
Figure 6: VSI or capacitor output-current space phasor.
1.5 Resulting stator-flux [Wb]
Computed rotor-flux [Wb]
1
1
d
d
0.5
0
-0.5
-1 1
0.5 0 -0.5 -1 1
0.5
1
0.5
0.8
0
1
0.6
Computed rotor-flux [W b]
-1
0.6 0.4
-0.5
0.2 0
time[s]
q
0.8
0
0.4
-0.5
Resulting stator-flux q [Wb]
Figure 7: Rotor-flux space-phasor.
0.2
-1
0
time[s]
Figure 8: Stator-flux space-phasor. Resultant Rotor-flux[Wb]
1
Computed Rotor-flux[Wb]
Stator terminal-voltage[V]
500
0
0.5
0
1 0.8
0
0.6 0.4
-200
0.2 -400
Stator terminal-voltageq [V]
0
Resultant Stator-flux[Wb]
200
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.1
0.2
0.3
0.4
0.5 time[s]
0.6
0.7
0.8
0.9
1
1 0.5 0
Figure 10: Computed rotor- and stator-flux.
100
100
50
80
0
60 -50
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Speed [rad/s]
Electric angular speed[rad/s]
0.2
1.5
time[s]
Figure 9: Stator-terminal-voltage spacephasor.
0.1
0.5
0 -500 400
0
1
1
Electromagnetique torque[Nm]
150
40
20
100 50
0 0
-50
0
0.1
0.2
0.3
0.4
0.5 time[s]
0.6
0.7
0.8
0.9
-20 -20
1
Figure 11: Electric angular speed and electromagnetic torque.
0
20
40
60 80 Torque [Nm]
100
120
140
Figure 12: Speed-torque dynamic mechanical diagram.
The method used for reconfiguration was the context switching method previously named ping-pong [1]. In this case, there is no need for parameter transfer at all, as both vector control systems are working in parallel and all the modules are working also in parallel. This allows us to exploit all the parallelism of the vector control algorithm and the implementation possibilities in FPGA.
59
VÁSÁRHELYI, IMECS, INCZE, SZABÓ
5 Implementation Possibilities For comparison the performance of the implemented modules with the simulation results obtained from the Simulink models, there one has to take into account the following aspects: the evolution of the module computation compared to the model, the quantisation error produced by the module, the time delay introduced by the module, the hardware resources occupied by the implemented module.
25
Saturated PI speed computed, implemented, and quatisation error at PI output 40 saturated and computed PI speed output
Simulated Output current of flux controller [A]
25
Quantisation error Computed of the computed Output current of output current flux controller[A]
In the followings, we will analyse some modules considering the above-mentioned criteria. For a simplified analysis of the modules, the simulation for the vector control scheme in Figure 2 was performed without reconfiguration and for the tandem converter structure, which corresponds for selection 1 of the multiplexer inputs. Figure 13 and Figure 14, represents the d-component evolution of the flux controller and reverse coordinate transformation CooT[D(-λ)], respectively. 20 15 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
15 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.1
0.2
0.3
0.4
0.5 time [s]
0.6
0.7
0.8
0.9
1
20 0 -20 -40
1
0.2 quantizastion error of PI speed
20
0.1
0
0
40
20
10
0 -20 -40
1 saturated and implemented PI speed output
10
20
0
0.1
0.2
0.3
0.4
0.5 time[s]
0.6
0.7
0.8
0.9
10 0 -10
1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
-2
10
0 -4 0.1 x 10
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
5 0
-5
Simulated Output Voltageq
0.1
0
0.1
0.2
0.3
0.4
0.5 time[s]
0.6
0.7
0.8
0.9
1
of the CooT[D(-l)]
0
Computed Output Voltageq
-2
of the CooT[D(-l)]
0
Quantisation error of the computed output voltage
2
Simulated Output Voltaged
of the CooT[D(-l)]
2
Quantisation error Computed Output Volatged of the computed otuput voltage of the CooT[D(-l)] [V]
Figure 13: Outputs of the modelled and implemented flux and speed PI controller and the resultant quantisation error. 2
0
-2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 -3 0.1 x 10
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0
0.2
0.3
0.4
0.5 time[s]
0.6
0.7
0.8
0.9
1
2
0
-2 1
0
-1
0.1
Figure 14: Voltage reference d-q component at the output of module reverse coordinate transformation CooT[D(-λ)]. The output q component of the block CooT[D(-λ)] is presented in Figure 15. As results from the diagrams in Figure 13 and Figure 15, there is no significant difference between the simulated motor variables and the computed ones obtained at the output of the corresponding library module. The quantisation error of the computed variables are minimal excepting the module CooT[D(-λ)], where the quantisation error of the reference voltage Usd is between –5 and +5. Even under these circumstances, the results are promising. The
60
MODULE LIBRARY FOR RAPID PROTOTYPING time delay and the hardware resource consumed by the analysed modules are presented in Table 1 and Table 2. Release 4.1.03i - Map E.33 Xilinx Mapping Report File for Design Design Information ----------------------------------------------------------------------------------------Target Device: x2v40 Target Speed: -6 Mapped Date: Tue Mar 26 15:16:39 2002 Design Summary ----------------------------------------------------------------------------------------Number of Slices: 24 out of 256 9% Number of Slices containing unrelated logic: 0 out of 24 0% Total Number 4 input LUTs: 24 out of 512 4% Number used as Shift registers: 24 Number of GCLKs: 1 out of 16 6% Total equivalent gate count for design: 5731 The Average Connection Delay for this design is: 1.283 ns The Maximum Pin Delay is: 4.126 ns The Average Connection Delay on the 10 Worst Nets is: 1.614 ns Listing Pin Delays by value: (ns) d < 1.00 < d < 2.00 < d < 3.00 < d < 4.00 < d < 5.00 d >= 5.00 178 68 22 9 1 0 Table 1: Hardware Resources Consumed and Time Delay Introduced by the Module Flux Controller. Time-space-phasor diagram of the PI reference Vsd,q
400
350
Output Voltage Vsd [V]
300
Reference Vsd [V]
250 200 150
200 0
-200
100 50
-400
0 -50
-600 1000
-100 -400
1
500
0.8
1
-200 0
0.4
0.6 0.4
200
Output Voltage Vsq [V]
0.2 Reference Vsq [V]
0.6
0
0.8
400
-500
0.2 0
time[s]
0 time [s]
Figure 15: Time-space-phasor diagram of the reference PI-Vsd,q modules.
61
Figure 16: Reference stator-terminalvoltage space-phasor computed in CooT[D(-λ)].
VÁSÁRHELYI, IMECS, INCZE, SZABÓ
Release 4.1.03i - Map E.33 Xilinx Mapping Report File for Design Design Information ----------------------------------------------------------------------------------------Number of Slices: 25 out of 3072 20% Number of Slices containing unrelated logic: 0 out of 625 0% Total Number 4 input LUTs: 1.222 out of 6144 19% Number used as LUTs: 1208 Number used as a route-thru: 14 Total equivalent gate count for design: 15579 The Delay Summary Report The Score for this design is: 5342 The Average Connection Delay for this design is: 1.969 ns The Maximum Pin Delay is: 10.256 ns The Average Connection Delay on the 10 Worst Nets is: 7.306 ns Listing Pin Delays by value: (ns) d<2.00< d<4.00 < d<6.00 < d< 8.00 < d < 11.00 d >=11.00 2432 1211 395 92 6 0 Table 2: Hardware Resources Consumed and Time Delay Introduced by the Module Coot[D(-λ)]. As observed from the tables the hardware resources consumed by the modules flux controller and reverse coordinate transformation are significant, and this may be a disadvantage of the developed Module Library, while the time delay introduced by the module is a positive result, which have to be considered when computation speed is important.
6 Conclusions The reconfigurable vector control system for tandem inverter (original contribution) is a new solution for AC drives. It improves the working conditions of the drive, also assures fail safe operation. Vector control systems for AC drives are characterised by high dynamic performance. For the reconfiguration of such a system yet it is technologically impossible to compile the next configuration in run-time. The reconfiguration is applicable only if the next configuration is known at compile time, while the duration of the actual configuration is unknown or can not be predicted. For implementation of reconfigurable vector control structures CSOC and FPGA chips are recommended. The created Module Library, like other Matlab® tools, helps the rapid prototyping and implementation of vector control systems for AC drives targeting FPGA chips. The module parameters are freely modifiable on demand. The Module Library allows the simulation of the reconfiguration process and the study of the reconfiguration effects upon the behaviour of the AC drives.
62
MODULE LIBRARY FOR RAPID PROTOTYPING Comparing with other existing FPGA implementations the Module Library presented in this paper allows the parallel implementation of any vector control system, in contrast with other implementations based on sequential computation. The advantage of parallel implementation is the increased computation speed and low sampling period. The disadvantage may be considered the high number of FPGA cell consumption, which implies the use of rich resource FPGA chips.
Acknowledgment A research project in the subject of the “tandem inverter” was realized at the Institute of Energy Technology, Aalborg University, Denmark. Special thanks to Prof. A. Trzynadlowski from Nevada University, Reno, USA for the collaboration in this theme, to Prof. F. Blaabjerg from the Aalborg University and to the Danfoss Drive A/S, Denmark for their generous support. The authors are grateful to Xilinx Inc. for donations, which made possible the research on some aspects of reconfigurable vector control framework. The research is part of the Hungarian-Romanian Cooperation Project TET 16/2003.
References [1] M. Imecs, P. Bikfalvi, S. Nedevschi, J. Vásárhelyi. Implementation of a Configurable Controller for an AC Drive Control a Case Study. In Proceedings of IEEE Symposium on FPGAs for Custom Computing Machines FCCM 2000, pages. 323-324 Napa, California, USA, 2000. [2] M. Imecs, J. J. Incze, J. Vásárhelyi, Cs. Szabó. Vector Control of Tandem Converter Fed Induction Motor Drive Using Configurable System on a Chip, In Proceedings of INES 2001 IEEE International Conference on Intelligent Engineering Systems, pages. 489-495 HelsinkiStockholm-Helsinki, Finland-Sweden September 16-18, 2001. [3] M. Imecs, J. Vásárhelyi, J. J. Incze, Cs. Szabó. Tandem Converter Fed Induction Motor Drive Controlled with Re-Configurable Vector Control System, In Proceedings of Power Electronics Intelligent Motion Power Quality Conference PCIM 2001, pages 341-346, Nürnberg, Germany. [4] Á. Kelemen., M. Imecs. Vector Control of AC Drives, Volume I: Vector Control of Induction Machine Drives. OMIKK Publisher Budapest, pages 304 ISBN 963-593-140-9, Budapest, 1991. [5] A. Sanders. The Design and Implementation of Context Switching FPGA. In Proceedings of IEEE Symposium on FPGAs for Custom Computing Machines FCCM 1998, pages 78-85, Los Alamitos California, USA, April 15-17, 1998. [6] M. Trzynadlowski, F. Blaabjerg, J. K. Pedersen, N. Patriciu. The Tandem Inverter: Combining the Advantages of Voltage-Source and Current-Source Inverters. In Proceedings of Applied Power Electronics Conference, pages 315-320 APEC’98, Anaheim, USA. [7] M. Trzynadlowski, M. Imecs, N. Patriciu. Modelling and Simulation of Inverter Topologies Used in AC Drives: Comparison and Validation of Models. In Proceedings of ELECTRIMACS’99, pages 47-52, Volume I/3, Lisboa, Portugal, 1999.
63
VÁSÁRHELYI, IMECS, INCZE, SZABÓ [8] J. Vásárhelyi, M. Imecs, J. J. Incze. Run-time Reconfiguration of Tandem Inverter used in Induction Motor Drives. In Proceedings of Symposium on Intelligent Systems in Control and Measurement, pages 138-143, Veszprém, Hungary, 2000. [9] J. Vásárhelyi. Run-Time Reconfiguration of AC Drive Controllers. Dagsthul Seminar 0261 on Dynamically Reconfigurable Architectures, June, 2000, Germany, http://www.ee.qub.ac.uk/dsp/HsD/fpl/. [10] M. Imecs, A. M. Trzynadlowski, N. Patriciu, M. Radian Kreiszer. About Performances of Current Controlled SVM-VSI and Tandem Inverter Used in Induction Motor Drives. In Proceedings of SPEEDAM 2000, pages C-4-7…C-4-12, Ischia, Italy. [11] M. Imecs, N. Patriciu, A. M. Trzynadlowski, M. Radian Kreiszer. Tandem Inverter with Space-Vector Modulation for Vector Control of Induction Motor. In Proceedings of PCIM 2000, pages 79-84, Nürnberg, Germany, CD-ROM and Vol. Intelligent Motion. [12] M. Imecs, I. I. Incze, Cs. Szabó. Control strategies of induction motor fed by a tandem DC link frequency converter. In Proceedings and CD-ROM of the 9th European Conference on Power Electronics and Applications EPE 2001, pages L1b-7-13 Graz, Austria. [13] J. Vásárhelyi, M. Imecs, J. J. Incze, Cs. Szabó. Reconfiguration Approach of Vector Control System for Tandem Converter Fed Induction Motor Drive. In Proceedings of EMES'01 6th International Conference on Engineering of Modern Electric Systems, pages 452-458, May 24-26 2001 Oradea, Romania.
About the Authors József Vásárhelyi received the MSc degree in Electrical Engineering in 1983 at the Technical University of Cluj-Napoca, Romania. He is lecturer at the University of Miskolc, Hungary. His field of interest is dynamically reconfigurable systems and control of electrical drives. He is PhD student at the Technical University of Cluj, supervisor Prof. Imecs Mária. Mária Imecs received the MSc in Electrical Engineering in 1970 from Technical University of Cluj-Napoca, Romania and the PhD in Electrical Engineering from the same university in 1989. Currently he is professor and Head of Department of Electrical Drives and Robots at Technical University of Cluj. Her current research interest includes power electronics, vector control of AC drives and stepping motors. János J. Incze received his MSc degree in Electrical Engineering in 1975 from Technical University of Cluj-Napoca, Romania. His research activity is focused on control of electrical drive systems, and power electronics. He is PhD student at the same University, supervisor Prof. Imecs Mária. Csaba Szabó received his Master's degree in Electrical Engineering in 1998 from Technical University of Cluj-Napoca, Romania. His research focuses on modelling, simulation and control of electrical drive systems. He is PhD student at the same University, supervisor Prof. Imecs Mária.
64
Chapter 2 Robotics
A Robust Certainty Grid Algorithm for Robotic Vision Wilfried Elmenreich and Raimund Kirner Institut f¨ur Technische Informatik, Technische Universit¨at Wien, Vienna, Austria wil,raimund @vmars.tuwien.ac.at
Abstract — In this paper we describe an algorithm for fault tolerant sensor mapping for robotic vision. Basically, we use a certainty grid algorithm to map distance measurements into a two-dimensional grid. The well-know certainty grid algorithm can tolerate occasional transient sensor errors and crash failures, but will fail when a sensor provides permanently faulty measurements. Therefore we extended the certainty grid algorithm by a sensor validation method that detects abnormal sensor measurements and adjusts a confidence value for each sensor. This robust certainty grid approach works with at least three sensors with an overlapping sensing range and needs fewer sensor inputs and less memory than other approaches. Our method supports also reintegration of recovered sensors and sensor maintenance by providing a measurement for the operability of a sensor. We also present a case study with an autonomous mobile robot that features the robust certainty grid algorithm in a time-triggered architecture.
1 Introduction A mobile robot must be able to notice surrounding objects in order to be able to interact with its environment. Sensors come in a great variety of types and each sensor is able to contribute to the task of environmental perception. However, given multiple sensory inputs, the task of modelling these data into a simple, comprehensible image of the environment can be arduous when problems of temporal accuracy [1], imprecise and faulty measurements, and sensor deprivation are considered. This paper describes an algorithm for mapping sensor information to a unified view of the environment based on the certainty grid approach. The first certainty grid method has been developed at Carnegie-Mellon University in the 1980ies [2]. However, the certainty grid suffers from faulty sensor measurements when they are not detected at the sensor level. It is the objective of this paper to propose an extension of the certainty grid algorithm by a sensor validation method at the sensor integration level. Comparing sensor measurements directly is difficult when their measurements are made at different time instants. As a result we used an approval method for calculating confi-
67
ELMENREICH, KIRNER
dence values for each sensor. Our algorithm is able to implicitly detect sensors with malfunctions followed by a reduction of the sensor’s input contribution to the certainty grid. Our approach supports inherently automatic integration of recovered sensors. Furthermore our approach facilitates sensor maintenance by assigning each sensor dynamically a confidence value which can be a measure for the reliability of the sensor. The robust certainty grid algorithm has been tested with simulated sensor faults. We have also implemented a demonstrator with an autonomous mobile robot that features the robust certainty grid algorithm. The remainder of the paper is organized as follows: Section 2 gives an overview on the original certainty grid algorithm. The following section discusses the influence of sensor faults on the certainty grid. Section 4 describes the robust certainty grid algorithm. Section 6 describes the functionality of our demonstrator. The paper is concluded in Section 7.
2 Certainty Grid Algorithm This section provides a brief overview of existing certainty grid algorithms. A certainty or occupancy grid is a multidimensional (typically 2D or 3D) representation of the robot’s environment. The observed space is subdivided into cells, where each cell stores information about the corresponding environment and an estimated probability for the correctness of this information. Typically, a cell state can be “free”, if the place appears to be void, or “occupied” if an object has been detected for that cell. Cells not reached by sensors reflect an “uncertain” state. The cell state and the probabilistic estimate of its correctness can be mapped into a single number reflecting the confidence of a cell to be free. Basically, it is assumed, that the application using the certainty grid has no a priori knowledge of the geometry of its environment and the objects in this environment are mostly static. The effect of occasional sensor errors can be neglected, because according to [3], they will have little effect on the grid. The calculation of new grid values is usually done by Bayesian inference. The English clergyman Thomas Bayes stated in a paper (published after his death in the Philosophical Transactions of the Royal Society of London [4]) the rule known today as Bayes’ theorem: (1) Bayes’ theorem quantifies the probability of hypothesis H, given that event has ocis the a priori probability of hypothesis , states the a posteriori curred. probability of hypothesis . is the probability that event E is observed given is true. If multiple events have to be considered using Bayes’ rule, the order of that processing does not influence the result. Hoover and Olsen present an application of a certainty grid where a set of video cameras is used to detect free space in the vicinity of a robot [5]. They use the multiple views from different angles to overcome the problem of occlusion and to increase performance, however they do not discuss the subject of sensors delivering faulty measurements. Sensor information usually is imperfect with respect to restricted temporal and spatial coverage, limited precision, and possible sensor malfunctions or ambiguous measure-
68
A ROBUST CERTAINTY GRID ALGORITHM FOR ROBOTIC VISION
ments. To maximize the capabilities and performance it is often necessary to use a variety of sensor devices that complement each other. Modelling such sensor measurements into the grid is an estimation problem [6]. Matthies and Elfes [7] propose a uniform method for integration of various sensor types. Each sensor is assigned a spatial interpretation model, developed for each kind of sensor, that maps the sensor measurement into corresponding cells. When sensor uncertainties are taken into account, we arrive at a probabilistic sensor model. Figure 1 depicts the data flow of a certainty grid implementation with three sensors. The sensor in the right position delivers faulty measurements which results in a deviation of the certainty grid from the real object positions.
left Sensor
middle Sensor
right Sensor
+ Local Sensor Validation
+ Local Sensor Validation
+ Local Sensor Validation
Probabilistic Sensor Model
Probabilistic Sensor Model
Probabilistic Sensor Model
+ Spatial Interpretation
+ Spatial Interpretation
+ Spatial Interpretation
local Sensor Observation
local Sensor Observation
local Sensor Observation
+ Sensor Integration Combined Certainty Grid Legend: real location of object free cell occupied cell undetermined
Figure 1: Certainty Grid Data Flow
69
ELMENREICH, KIRNER
3 Dealing With Sensor Faults Martin and Moravec [3] concluded that the effects of occasional sensor faults on the grid can be neglected. Furthermore, if a sensor input has crash failure semantics, i. e., it provides either a correct value or no value at all, the existing methods are sufficient to handle this situation if each important grid cell is served by more than one sensor. However, one problem of the certainty grid algorithm as found in the literature [2, 3, 6, 7] arrives when a sensor permanently provides faulty measurements. For example a distance sensor could refuse to detect any object and always report “no object nearby”. Such a fault would result in a significant deviation of the representation of the environment in the grid from the actual environment. There are two possible solutions to this problem: Replicated sensors: Making the sensors fault-tolerant by replication results in costs for extra sensors and voting nodes. For example each sensor could be extended to triplemodular redundant sensors, the basic idea of such fault-tolerant units has already been presented in [8]. However these extra sensors would not contribute to the grid resolution or improve the update frequency. In applications where weight, power consumption, and cost is an issue, this approach is not economical. Replicated certainty grids: The generation of multiple grids and the application of standard fault-tolerant algorithms among these grids does not need extra sensors. Each single certainty grid would represent a fault isolation area, e. g. supported by a single sensor. The final view will then be generated by majority voting among the separate grids. This approach, however, has the disadvantage of increased memory resource requirements. A system with sensors would need the -fold amount of memory to represent the grids. While the replicated sensors approach deals with the problems at sensor level, the second approach takes effect at the grid level. Because of hardware and wiring costs we decided for a grid level solution as described in the second approach. Since RAM memory is a critical resource in embedded systems like a mobile robot we aimed at sophisticated algorithm with low memory requirements, which is described in the following section.
4 Robust Certainty Grid Algorithm We assume, that a sensor node may have a failure mode where it permanently submits measurements with incorrect values. It is our goal to extend the existing certainty grid to tolerate such sensor faults. This goal will be achieved by analyzing the redundant parts of the certainty grid. Furthermore, we assume that we have no a priori knowledge about the redundant and noneredundant parts, thus we head for an automatic sensor validation. It is difficult to validate sensors directly by comparing their inputs, because measurements from different sensors for the certainty grid are often made from different angles and at different time instants - a deviation in sensor measurements may be caused by a sensor fault as well as by a change in the environment.
70
A ROBUST CERTAINTY GRID ALGORITHM FOR ROBOTIC VISION
Therefore, we use an approval method for maintaining a confidence measurement for each sensor. The confidence value will be a measurement for the correctness of a sensor. This confidence measurement conf may be a real value ranging from 0 to 1: sensor appears to be wrong sensor appears to be correct If we have a priori knowledge about the sensor reliabilities, an initial confidence value that reflects the respective reliability can be chosen at startup. If we have no knowledge about the reliability of sensors the respective confidence values are initialized with 1. As in the known certainty grid algorithms, each grid cell contains a probabilistic value ranging from 0 to 1 corresponding to the believe, that this cell is occupied by an object: free uncertain occupied Additionally we store the main contributor (e. g., the sensor that updated this cell most recently) of the value with the cell. This property of each cell will be named the current owner of the cell: unknown sensor 1 sensor n All grid cells are initialized with and . When a new measurement has to be added to the grid, the following AddToGrid algorithm is executed: (Fig. 2 lists the algorithm in pseudocode) If the particular grid cell has no contributor listed in its owner field, the measurement of the sensor is taken as is and the cell stores the index of the sensor as new owner. If there was a contributor, the measurement is first compared to the cell value . A value named comparison is calculated that means a confirmation of old cell value and new measurement, if the value is above a certain threshold, and means a contradiction of old cell value and new measurement, if the value is below a certain different threshold. In Figure 2 comparison is normalized to represent a value within . In case of a confirmation, the confidence values of the new sensor and the owner are both increased up to a maximal bound of confidence. In case of a contradiction, the confidence values of the new sensor and the owner are both decreased down to a lower bound of confidence. Since sensor faults are usually a rare event, we use a higher value for the degradation of the confidence value than for the increase. If is not significant, it does neither yield a confirmation nor a contradiction. The new occupancy value of the cell is calculated as a weighted average between old value and measurement. The weights are derived from the respective confidence values
71
ELMENREICH, KIRNER procedure AddToGrid( sensor, cell ) begin if (cell.owner = unknown) or (cell.owner = sensor) then cell.occ := sensor.measurement; cell.owner := sensor; else comparison := 4 (cell.occ-0.5) (sensor.measurement-0.5); weight1 := abs(cell.occ-0.5) cell.owner.conf; weight2 := abs(sensor.measurement-0.5) sensor.conf; cell.occ := (cell.occ weight1+sensor.measurement weight2) (weight1 + weight2); if comparison THRESHOLD then inc(cell.owner.conf); inc(sensor.conf); if comparison –THRESHOLD then dec(cell.owner.conf); dec(sensor.conf); contribution := 4 (cell.occ-0.5) (sensor.measurement-0.5); if contribution THRESHOLD then cell.owner := sensor; else cell.owner := unknown; end
Figure 2: Pseudocode of the AddToGrid algorithm and the significance of the measurement. A measurement is more significant if it has a greater absolute distance to the uncertain state (0.5). Thereafter, a new owner has to be selected. Therefore, a value contribution is derived. is calculated the same way as the comparison value, but it uses the new value. The is a measurement of the consistency of the sensor measurement with the new value. If the is above a certain threshold, the contributing value will be reset sensor becomes the new owner of the cell. Otherwise the to . Table 1 gives examples for updating grid cell values by sensor measurements. The value for THRESHOLD had been chosen with . In the first case, the sensor measurement and the grid cell value confirm each other. The result is an increased confidence for the sensor that originally contributed to this cell (the owner) and the sensor that produced the new measurement. In this example the sensor becomes also the new owner of the entry. In the second case, the sensor’s measurement does contradict the grid value – the sensor reports free space while the grid cell value is sure about an object. Thus, the confidences of the involved sensors are decreased. Case 3 shows a less severe contradiction, because the grid cell is not quite certain about its content. Hence mainly the new measurement influences the updated grid value. Case 4 shows again a measurement that confirms the grid value and leads to a rise of the sensors’ confidences. Thus, the sensors’ confidence
72
A ROBUST CERTAINTY GRID ALGORITHM FOR ROBOTIC VISION
increased decreased unchanged increased
cell.owner
contribution
confidences
comparison
new cell.occ
Intermediate results and state after update
sensor.conf
sensor.measurement
cell.owner.conf
cell.occ
Before update
unknown
Table 1: Examples for grid cell updates
values are dynamically updated according to the comparison of their measurements to the grid. A bad performing sensor will subsequently loose confidence and eventually drop out of the set of contributing sensors. However if the sensor recovers, it will gain confidence again by repeated confirming measurements. The approach works with at least three sensors whereof one sensor might be faulty at one time. In comparison to the node level approach discussed in Section 3, the proposed method gains extra sensor space, because the sensor views must overlap only partially. There must be at least one grid cell, which is served by all three sensors. The extra amount of memory for the grid representation is the storage for the owner values, thus
(2)
is the number of sensor contributing to the grid. more bytes of memory, where The memory requirements for the confidence values can usually be neglected, if the number of sensors is remarkably lower than the total number of cells in the grid. Thus, the memory requirements of the robust certainty grid algorithm are considerable less than the memory consumption of the fault-tolerant approach at grid level discussed in Section 3 In contrast to Bayes’ formula, the AddToGrid procedure is not commutative. Thus, when a grid cell is updated by subsequent measurements, the order of updates makes a difference in the result. This can be explained because we change the a priori probabilities for the sensors with each update. We overcome the disadvantage of sensitivity to message ordering by applying a time-triggered schedule. By avoiding race conditions, time-triggered communication and computation ensures a predictable order of message tasks.
73
ELMENREICH, KIRNER
5 Recovery of Sensor Confidence According to [9, 10], the probability of transient faults is much higher than the probability of permanent faults. The robust certainty grid algorithm cares for a decrease of the confidence value for a failing sensor. However, as soon as the failure has passed the sensor’s confidence rises again due to subsequent positive comparisons. This self-healing behavior is related to the concept of self-stabilization as introduced by Dijkstra in [11]. 15 14
Sensor Confidence
13 12 11 10 9 8 Sensor 1
7
Sensor 2
6
Sensor 3
5 0
20
40
60
80
100
120
140
160
180
200
Sensor Entries
Figure 3: Recovery of sensor confidence after a transient failure Figure 3 depicts the confidence values of a set of three sensors from a simulation of about 200 sensor readings using the robust certainty grid algorithm. All sensors had been initialized with the highest confidence, but sensor 1 suffered from a transient failure during its first 50 readings. The simulated failure added a noise signal of 20% of the sensor’s range to the output signal. While that failure persisted, the confidence of sensor 1 decreased. The confidence values of sensor 2 and 3 were also fluctuating due to inconsistencies in their readings and contradictions with sensor 1. As shown in the figure, the confidence value of sensor 1 recovered within about 30 sensor readings after removal of the transient failure.
6 Case Study We implemented the robust certainty grid in a mobile robot for demonstration purposes. The mobile robot comprises a model car (“smart car”) equipped with a suit of pivoted distance sensors, two ultrasonic sensors pointing straight forward, an electric drive, and a steering unit (see Figure 4). In [12] we showed that time-triggered communication networks are apt to implement real-time sensor fusing applications. Therefore, we used a time-triggered sensor fusion model [13] where all communication instants and computation tasks are a priori planned in a time-triggered schedule. We used a TTP/A network to interconnect distance sensors, servo motors for sensor pivoting, driving, and steering units. Each unit is a separate TTP/A node implemented on a low-cost microcontroller and equipped with a smart transducer interface [14]. The network also contains a master node and a data processing node. The distance
74
A ROBUST CERTAINTY GRID ALGORITHM FOR ROBOTIC VISION
Figure 4: Smart Car: Autonomous mobile robot with pivoting sensors sensors are swivelled around by servo motors enabling them to scan the area in front of the robot. The sensors generate a value that corresponds to the distance of the object they are aimed at. The data stream provided by the distance sensors is taken over by the data processing node that fuses the perceptions from the distance sensors with a model of the robot’s environment, using the robust certainty algorithm described in the previous section. Thus, the shapes of obstacles are stored and assigned with a probability value. We added a function that moves all values up to the uncertain state with the progression of time. So, an object has to be re-scanned periodically. We used 8-bit values to express the probability values between 0 and 1. Thus 0x00 corresponds to the state, 0x80 means the state while 0xFF is used to state of a grid cell. Fig. 5 depicts an example of a grid allocation. express the Movement decisions about direction and speed are made based on a vector field histogram derived from the certainty grid [15]. The vector field histogram is a method to determine the direction with the lowest obstacle density. The algorithm uses the grid representation of the environment which is provided at the cluster level. The vector field histogram approach divides the certainty grid into disjoint polar sectors (see Figure 6). For each cell in a given sector an obstacle vector is calculated. The magnitude depends on the certainty value of the cell and also on the distance between of the vehicle and the respective cell: (3) with . and are positive constants that define the sensitivity of the is the distance between the farthest cell and the algorithm to the object distance. vehicle.
75
ELMENREICH, KIRNER
Hence, the sum over all obstacle vectors entity :
in sector
forms an obstacle density
(4) are used to form a histogram (see Figure 7), At this point the entities which can be used for obstacle avoidance. High magnitudes in the histogram indicates regions with high obstacle density, while areas with low magnitudes indicate regions with low obstacle density. By applying a threshold to the histogram it is possible to localize regions with low obstacle density, which can be used for obstacle avoidance. The car will then be moved towards the most promising direction. Moving or turning of the car affords a correction of the grid values. Since the grid contains only values the shift and rotate operations can be applied to the grid in real-time. The smart car is able to move autonomously through its environment. Additionally, it has an interface to a service point for monitoring and configuration access. Via this monitoring interface it is possible to watch snapshots of the certainty grid or the sensor confidence values. The non time-critical service communication is routed concurrently to the real-time system that receives the sensor values and maintains the grid and confidence values. It is possible to route the service access over different networks, e. g. over a wireless link and CORBA to a service station somewhere connected to the internet.
7 Conclusion The class of certainty grid algorithms are qualified for mapping sensor information of mobile robots into a concise description of the environment. The previously published certainty grid algorithms can tolerate occasional transient sensor errors and crash failures but will fail for permanent sensor faults. We developed a method for sensor validation that detects abnormal sensor measurements and adjusts a weight value of the corresponding sensor. Recovered sensors are reintegrated automatically. This robust certainty grid approach supports also sensor maintenance, because it provides a measurement for the operability of a sensor. The robust certainty grid will be implemented in a mobile autonomous robot with a time-triggered communication architecture.
Acknowledgments This work was supported in part by the Austrian Ministry of Science, project TTSB and by the European IST project DSoS under contract No IST-1999-11585.
References [1] H. Kopetz. Real-Time Systems, Design Principles for Distributed Embedded Applications. Kluwer Academic Publishers, Boston, Dordrecht, London, 1997. [2] A. Elfes. A sonar-based mapping and navigation system. In Proceedings of the IEEE International Conference on Robotics and Automation, San Francisco, CA, USA, 1986. [3] M. C. Martin and H. P. Moravec. Robot evidence grids. Technical Report CMU-RI-TR-96-06, The Robotics Institute, Carneghie Mellon University, Pittsburgh, PA, USA, 1996.
76
A ROBUST CERTAINTY GRID ALGORITHM FOR ROBOTIC VISION
[4] T. Bayes. Essay towards solving a problem in the doctrine of chances. Philosophical Transactions of the Royal Society of London, 53:370–418, 1763. Reprinted in Biometrika, 45:293–315, 1958. [5] A. Hoover and B. D. Olsen. Sensor network perception for mobile robotics. In Proceedings of the IEEE International Conference on Robotics and Automation, San Francisco, CA, pages 342–347, April 2000. [6] A. Elfes. Using occupancy grids for mobile robot perception and navigation. IEEE Computer, 22(6):46–57, 1989. [7] L. Matthies and A. Elfes. Integration of sonar and stereo range data using a grid-based representation. In Proceedings of the IEEE International Conference on Robotics and Automation, volume 2, pages 727–733, Philadelphia, PA, USA, 1988. [8] J. von Neumann. Probabilistic logics and the synthesis of reliable organisms from unreliable components. In C. E. Shannon and J. McCarthy, editors, Automata Studies, pages 43–98. Princeton University Press, 1956. [9] T. J. O’Gorman. The effect of cosmic rays on the soft error rate of a DRAM at ground level. IEEE Transactions on Electron Devices, 41:553–557, 1994. [10] K. Ahlstr¨om and J. Torin. Next generation architecture for flight control systems. In Proceedings of the Real-Time in Sweden 2001 Conference, Halmstad, Sweden, August 2001. [11] E. W. Dijkstra. Self-stabilizing systems in spite of distributed control. Communications of the ACM, 17(11):643–644, 1974. [12] W. Elmenreich and S. Pitzek. Using sensor fusion in a time-triggered network. In Proceedings of the 27th Annual Conference of the IEEE Industrial Electronics Society, volume 1, pages 369–374, Denver, CO, USA, November–December 2001. [13] W. Elmenreich and S. Pitzek. The time-triggered sensor fusion model. In Proceedings of the 5th IEEE International Conference on Intelligent Engineering Systems, pages 297–300, Helsinki–Stockholm– Helsinki, Finland, September 2001. [14] H. Kopetz, M. Holzmann, and W. Elmenreich. A universal smart transducer interface: TTP/A. International Journal of Computer System Science & Engineering, 16(2):71–77, March 2001. [15] J. Borenstein and Y. Koren. The vector field histogram - fast obstacle avoidance for mobile robots. IEEE Journal of Robotics and Automation, 7(3):278–288, June 1991.
About the Authors Wilfried Elmenreich was born in 1973. Before going to the Vienna University of Technology, he studied at the Engineering School for Electrotechnics and Control in Weiz, Styria. In 1998, he received a Master’s degree in computer science and in 2002 a doctoral degree in technical sciences both from the Vienna University of Technology in Austria. His research interests include real-time and embedded systems, smart transducer networks, fieldbus communication, and sensor fusion. Raimund Kirner is a research assistant at the Institut f¨ur Technische Informatik, Real-Time Systems Group at the Vienna University of Technology. He has studied Computer Science at TU Vienna and received the Dipl.-Ing. (Master’s) degree in 2000. In June 2003, Raimund Kirner has finished his doctoral studies in Computer Science with Prof. Peter Puschner at the Vienna University of Technology as research advisor.
77
ELMENREICH, KIRNER
00 00 01 00 0B 0A 07 80 80 80 80 80 80 00 02 06 00 00 04 00 03 00 07 0A FF FF FF 80 80 01 00 03 05 00 06 00 01 01 00 00 07 02 0D 00 FF 00 00 09 00 00 00 00 01 00 00 00 03 00 04 00 02 00 01 00 07 01 01 08 00 00 02 02 00 00 06 00 08 02 09 00 03 00 00 00 00 00 00 04 05 00 02 00 00 02 00 00 05 00 0A 00 00 06 03 05 00 00 01 02 00 01 01 00 02 00 00 02 04 02 06 02 00 00 04 01 00 00 01 01 00 01 00 00 00 00 00 00
(a) Obstacle in front of car
00 00 02 00 00 02 00
00 01 02 01 05 01 02
00 06 00 00 00 00 02
01 00 00 00 00 01 00
80 80 80 80 80 80 80
80 80 80 80 80 80 80
(b) Representation in certainty grid
Figure 5: Fusion of measurements into the certainty grid Polar Sector
Certainty Vaule 00 00 01 00 0B 0A 07 80 80 80 80 80 80 00 02 06 00 00 04 00 03 00 07 0A FF FF FF 80 80 01 00 03 05 00 06 00 01 01 00 00 07 02 0D 00 FF 00 00 09 00 00 00 or 4
Sect
Sector 5
00 01 00 00 00 03 00 04 00 02 00 01 00 07 01 01 08
r3
cto
Sect
Se
02 00 00 02 00 00 05 00 0A 00 r2 02 00 01 01 00 02 00 00 cto 02 04 e S 00 00 01 01 00 01 00 00 00 r00 1 ecto 00 01 02S 01 05 02 00
r7
00 00 04 05 00 Se c 03 05 00 00 to01 r8 02 00 00 Sect04 01 or 9 00 00 02 00 00
or 6
cto
Se
00 00 02 02 00 00 06 00 08 02 09 00 03 00 00 00 00 00 06 02 06 00 00 01 02
00 0010 00 00 02 00 06 Sector
01 00 00 Sector 00 000 01 00
80 80 80 80 80 80 80
80 80 80 80 80 80 80
Figure 6: Dividing the certainty grid into polar sectors.
h
Threshold
0
1
2
3
4
5
6
7
8
Sector Index
Figure 7: Histogram of the obstacle density.
78
Force-feedback Tests for Medical Robots Iulian Iordachita1, Alexandru Patriciu2, Dumitru Mazilu2, Gheorghe Catrina1 and Dan Stoianovici2 1
Faculty of Mechanics, University of Craiova, Craiova, Romania {iord_ii, catrina}@mecanica.ucv.ro 2
The Johns Hopkins Medical Institutions, Johns Hopkins University, Baltimore, MD, USA {patriciu, mazilu}@urology.med.jhu.edu,
[email protected] Abstract - The introduction of robots in surgery provides improved dexterity and precision, enabling intricate and detailed procedures. However, prior to robots implementation it is essential to define performance criteria and establish methods for evaluating them. For force feedback enhanced manipulators the performance criteria is defined as the sensed force/ displayed force accuracy. In this paper, we present a testing method for the medical robot force feedback system. The test’s results are accurate and the method of evaluation accounts for human error.
1 Introduction Minimally invasive surgery is a relatively new technique in which a surgeon operates with specially designed surgical tools through access ports usually requiring 3 incisions. One allows the introduction of an endoscope and the two others the operation of surgical instruments. This type of surgery decreases the surgical trauma while improving the patient recovery time. It simplifies post-surgery care and reduces the aesthetic damage. This type of procedures requires skilled surgeons with excellent hand-eye coordination that can perform the task using only the two dimensional (2D) image provided by the laparoscopic camera. The introduction of robots into minimally invasive surgery provides improved dexterity and precision. Robots were first used to stabilize and maneuver laparoscopic cameras. Current robotic systems are capable of augmenting surgical dexterity and precision by electronically eliminating hand tremor and scaling down instrument movements. Some systems allow the surgeon to remain seated at an ergonomically designed console with arm supports, thereby reducing physical strain and fatigue. These advantages allow surgeon to develop intricate and detailed procedures, therefore, it is essential to establish methods for evaluating surgeon’s abilities and limitations in robot manipulation.
79
IORDACHITA, PATRICIU, MAZILU, CATRINA, STOIANOVICI Many studies report on the use of robotic systems in performing in vitro or in vivo experiments [1], [2], [3], [4]. Other studies compare the effect of different robotic control modes on operator performance. Das et al. present a pilot study comparing the performance of a new tele-manipulator system against manual instrument positioning [5]. Similar evaluations were used in a study comparing tele-robotic control of a laparoscopic camera using the AESOP system with manual control of the camera [6]. Garcia et al. presented a complex and multilevel method to evaluate a robotic system [7]. Doing minimally invasive surgery, two channels of feedback are important to the surgeon: visual feedback and haptic feedback. Haptic feedback is further divided into touchand force-feedback. Some studies present the role of force feedback in surgery, different haptic systems and methods to evaluate these systems [8], [9], [10], [11].
2 Materials and methods We have developed a method for quantitate surgeon’s dexterity as exhibited during the performance of simple tasks [12]. We applied this algorithm to compare the dexterity of a medical robotic system to manual laparoscopic instruments. In completion of dexterity tests we also performed some force-feedback tests. The purpose of the force feedback tests was to compare the capability of surgeons to “feel” the soft and hard tissues using manual graspers versus robot’s haptic interface. Also, the force displayed on the surgeon’s gripper was measured The tests were designed and carried out at the URobotics Lab at the Johns Hopkins School of Medicine. In our tests we used a system that was designed for laparoscopic surgery. It consists of two modified AESOP robots (Computer Motion, Inc., Goleta, CA) for the instruments, and a purpose-built bilateral haptic interface (Figure 1). The surgeon operates the system from a remote haptic interface that handles similarly to usual laparoscopic instruments. As the surgeon moves the haptic handles, the robotic manipulators move in a similar fashion. Concurrently, force-feedback is returned to the surgeon on the gripper. To perform the feedback tests we used a measurement and data-acquisition system (Figure 2) consisting of: two full bridge thin beam sensor TBS 2 (Transducer Techniques, Temecula CA) with 2 lbs. capacity range, two amplifier/conditioner module model TMO1 (Transducer Techniques, Temecula CA), a data-acquisition board CIO-DAS08/Jr-AO (Computer Boards, Inc. Mansfield, MA) and a PC Gateway 2000, Pentium II. For data processing we used dedicated software Labtech (Laboratory Technologies Corporation, Wilmington, MA). One sensor was placed between the gripers fingers of the robotic system through two custom made adapters (Figure 3) and the other on the handles of haptic interface (Figure 4). 2.1 Tests Performing Every subject was informed about the main features of the endoscopic tasks that will be performed and on how to operate the robotic system. In test one the subjects were asked to recognize four materials with different stiffness, first using a laparoscopic 5-mm curved graspers (Endo-dissect, US Surgical Corporation, Norwalk, CT) and second using the robotic specially constructed to operate with the robotic arms, similar to 5-mm needle drivers.
80
FORCE-FEEDBACK TESTS FOR MEDICAL ROBOTS
Figure 1: The medical robotic system
Figure 2: Setup used for feedback force test
Figure 3: The sensor and the adapters placed on the griper
81
IORDACHITA, PATRICIU, MAZILU, CATRINA, STOIANOVICI
Figure 4: The sensor placed on the handles of haptic interface Two types of materials were used in order to evaluate the robotic system force feedback performances: latex and silicone. The form of the four models used in our tests was a triangular prism (Figure 5). The tests were performed without visual feedback.
Figure 5: The test of a soft material
82
FORCE-FEEDBACK TESTS FOR MEDICAL ROBOTS Seven subjects completed this test. All the subjects recognized the materials when using the manual graspers but none identified the materials when using the robotic system. The second test measured the force applied on the handles of the robot haptic interfaces to hold the prismatic models in the griper. First, the transducer was calibrated using a known load. Then, a pulsatory load was manually applied on the handles through the transducer (Figure 4). The angular displacement of the handles during the tests was similar for each material. The variations of applied force on the handle was recorded and processed as showed above. The purpose of the last test was to evaluate the force that is returned to the surgeon on the haptic interface of the robot. First, the transducers were calibrated using a known load. Then, one sensor was placed between the handles of haptic interface and the other one between the fingers of the griper of the robotic system (Figure 3). Both transducers were preloaded using two rubber bends. Further on, a pulsatory load was manually applied on the finger of the griper. The variations of applied force on the griper and of the feedback force on the handle were recorded and processed as showed above.
3 Results The feedback force tests were performed several times with similar results. The purpose of the first force feedback test was to compare the capability of surgeons to “feel” the soft and hard materials using manual graspers and robotic haptic interface. As we showed above, all the subjects recognized the materials when using the manual graspers but none identified the materials when using the robotic system. In fact, this was the reason for the next two tests. To present and evaluate the results of the last two tests we processed the data using Microsoft Excel. In Figure 6 we present a part of a graph that shows the variation of the force on the handle during the test two for material A (the softest material in our tests). Similar results were obtained for materials B, C, and D. In Figure 7 we overlapped the graphs for test two. Two remarks are relevant for our test: 1. The force applied on the handle to hold the material A is similar with the necessary force to gripe the handle without any material. 2. The force applied on the handle to hold the material C is bigger than force for D, despite D is harder than C. In Figure 8 we present a part of a graph that shows the variation of the handle force and griper force and in Figure 9 the handle force depending on the griper force. These graphs show that for 2.5 N variation of the force applied on the griper we obtained only 0.2 N variation of the force on handle. We consider that this low feedback force level is insufficient to permit the surgeons to feel the differences between soft and hard materials. Therefore, this force feedback system needs to be improved in order to provide tactile information to surgeons during the robotically assisted surgical procedure.
83
IORDACHITA, PATRICIU, MAZILU, CATRINA, STOIANOVICI
Figure 6: The results of force feedback test 2 - material A
Figure 7: The results of force feedback test 2
Figure 8: The results of force feedback test 3
84
FORCE-FEEDBACK TESTS FOR MEDICAL ROBOTS
Figure 9: Handle force dependent on griper force
4 Conclusions We can underline some conclusions of this paper: 1. The introduction of robots into minimally invasive surgery potentially provides improved dexterity and precision. Prior to the implementation of robots, it is essential to establish methods for evaluating the surgeon’s abilities and limitations when manipulating the robot. 2. During a real operation it’s essential for surgeon to have a robotic system with a high realistic force feedback. 3. The feedback force tests presented in this paper permit an exact and easy evaluation of a robotic force-feedback system. 4. The results of the tests are accurate and the method of evaluation accounts for human error. 5. The studied robotic system has a low force feedback level. This force feedback system needs to be improved in order to provide tactile information to surgeons during the robotically assisted surgical procedure.
References [1] A. Garcia-Ruiz et al. Robotic surgical instruments for dexterity enhancement in thoracoscopic coronary artery bypass graft. J Laparoendosc Adv Surg Tech, 7(5): 277-83, October 1997. [2] E. Kobayashi et al. A New Safe Laparoscopic Manipulator System with a Five-Bar Linkage mechanism and an Optical Zoom. Computer Aided Surgery, 4: 182-192, 1999. [3] E.R.Jr. Stephenson et al. Robotically assisted microsurgery for endoscopic coronary artery bypass grafting. Ann Thorac Surg, 66 (3): 1064-7, September 1998. [4] H.A. Tabaie et al. Endoscopic Coronary Artery Bypass Graft (ECABG) Procedure with Robotic Assistance. H S F Journal # 1999-0552, 2 (4): 310-317, 1999. [5] H. Das et al. Evaluation of a Telerobotic System to Assist Surgeons in Microsurgery. Computer Aided Surgery, 4:15-25, 1999.
85
IORDACHITA, PATRICIU, MAZILU, CATRINA, STOIANOVICI [6] L.R. Kavoussi et al. Comparison of robotic versus human laparoscopic camera control. J Urol, 15(4): 21-34, 1995. [7] A. Garcia-Ruiz et al. Manual vs. Robotically Assisted Laparoscopic Surgery in the Performance of Basic Manipulation and Suturing Tasks. Arch. Surg. Vol. 133 (9). 957-961, September 1998. [8] Y. Bar-Cohen et al. Virtual reality robotic telesurgery simulations using MEMICA haptic system. In Proceedings of SPIE’s 8th Annual International Symposium on Smart Materials and Structures, Paper No. 4329-47, Newport Beach, CA, March 2001. [9] C. Mavroidis et al. Controlled Compliance haptic Interface using Electro-Rheological Fluids. In Proceedings of the 2000 SPIE Conference on Electro-Active Polymer Actuators and devices (EAPAD 2000), SPIE 7th Annual International Symposium on Smart Materials and Structures, Volume 3987, pages300-310, Newport Beach, CA, March 2000. [10] J. Rosen et al. Force Controlled and Teleoperated Endoscopic Grasper for Minimally Invasive Surgery - Experimental Performance Evaluation. IEEE Transactions on Biomedical Engineering, 46(10), 1212-1221, October 1999. [11] C.R. Wagner, N. Stylopoulos and R.D. Howe. The Role of Force Feedback in Surgery: Analysis of Blunt Dissection. In Proceedings of the 10th Annual Haptics Symposium, Orlando, March 24-25, 2000. [12] I. Iordachita, D. Stoianovici and L. Kavoussi. A Method to Evaluate Changes in Dexterity when using a robot in Laparoscopic Surgery. In Proceedings of the 10th International Workshop on Robotics in Alpe-Adria-Danube Region, RAADc01, 8 pages, Vienna University of Technology, Austria, 2001.
About the Authors Iulian Iordachita received a MS degree and a Ph.D. degree in Mechanical Engineering both from the University of Craiova, Romania in the years 1984 and 1996, respectively. His research interests include mechanisms and mechanical transmissions for industrial robots, mechanisms for locomotion based upon the study of locomotion in animal world and medical robotics. Alexandru Patriciu is a doctoral student at Johns Hopkins University, USA. He received his Master’s degree in Computer Science from the University of Craiova, Romania in 1995. His research interests include parallel and distributed algorithms, dynamic system control and simulation, algorithms analysis and object oriented design. Dumitru Mazilu received his Master’s degree and a doctoral degree in Mechanical Engineering both from the University of Craiova, Romania in the years 1984 and 1998, respectively. His research interests include materials cutting, computer aided design and medical robotics.
Gheorghe Catrina received a MS degree in Petroleum and Natural Gas Engineering from the University Petrol Gaze, Ploiesti, Romania in 1980 and a doctoral degree in Mechanical Engineering from Politehnica University, Bucharest, Romania in 1997. His research interests include design of machine elements, mechanical transmissions, tribology and industrial robots. Dan Stoianovici received a MS. degree from the University of Craiova, Romania in 1990, and a Ph.D. degree from Southern Methodist University, Dallas, Texas in 1996, both in the field of Mechanical Engineering. His specialty is Robotics, in particular Medical Robotics. Dr. Stoianovici's research is focussed on the design, construction, and control of medical robotics: surgical instrumentation and devices, image-guided robotic systems, teleoperation systems, and haptic interfaces.
86
Gait Analysis of Natural and Artificial Walking Systems Manuel F. Silva1, J. A. Tenreiro Machado1, and António M. Lopes2 1
Department of Electrical Engineering, Institute of Engineering of Porto, Porto, Portugal {mfsilva,jtm}@dee.isep.ipp.pt 2
Department of Mechanical Engineering, Faculty of Engineering of Porto, Porto, Portugal
[email protected]
Abstract — This paper studies periodic gaits of multi-legged locomotion systems based on dynamic models. The purpose is to determine the system performance during walking and the best set of locomotion variables. For that objective the prescribed motion of the robot is completely characterized in terms of several locomotion variables such as gait, duty factor, body height, step length, stroke pitch, foot clearance, legs link lengths, foot-hip offset, body and legs mass and cycle time. In this perspective, we formulate three performance measures of the walking robot namely, the mean absolute energy, the mean power dispersion and the mean power lost in the joint actuators per walking distance. A set of model-based experiments reveals the influence of the locomotion variables in the proposed indices.
1
Introduction
Walking machines allow locomotion in terrain inaccessible to other type of vehicles, since they do not need a continuous support surface [1]. On the other hand, the requirements for leg coordination and control impose difficulties beyond those encountered in wheeled robots [2]. Gait selection is a research area requiring an appreciable modeling effort for the improvement of mobility with legs in unstructured environments [3,4]. Previous studies mainly focused in the structure and selection of locomotion modes [5 – 9]. Nevertheless, there are different optimization criteria such as energy efficiency [10], stability [2], velocity [11,12], comfort, mobility [13] and environmental impact. With these facts in mind, a simulation model for multi-leg locomotion systems was developed, for several periodic gaits. This study intends to generalize previous work [14 – 16] through the formulation of several dynamic indices measuring the average energy during different walking trajectories, the mean power dispersion and the power lost in the joint actuators along the space-time walking cycle. The foot and body trajectories are analyzed in what concerns its variation with the gait, duty factor, step length, maximum foot clearance, body height, legs link lengths and foot trajectory offset. Several simulation experiments reveal the system configuration and the type of the movements that lead to a better mechanical implementation, for a given locomotion mode, from the viewpoint of the proposed indices. 87
SILVA, MACHADO, LOPES
Figure 1: Coordinate system and variables that characterize the motion trajectories of the multi-legged robot Bearing these facts in mind, the paper is organized as follows. Section two introduces the model for a multi-legged robot and the motion planning algorithms. Section three formulates the optimizing indices and section four develops a set of experiments that reveal the influence of the system parameters in the periodic gaits, respectively. Finally, section five presents the main conclusions and directions towards future developments.
2
A Model for Multi-legged Locomotion
We consider a longitudinal walking system with n legs (n 2 and n even), with the legs equally distributed along both sides of the robot body, having each one two rotational joints (Figure 1). Motion is described by means of a world coordinate system. The kinematic model comprises: the cycle time T, the duty factor β, the transference time tT = (1−β)T, the support time tS = βT, the step length LS, the stroke pitch SP, the body height HB, the maximum foot clearance FC, the ith leg lengths Li1 and Li2 and the foot trajectory offset Oi (i=1,…,n). Moreover, we consider a periodic trajectory for each foot, with body velocity VF = LS / T. The algorithm for the forward motion planning accepts the body and ith feet desired cartesian trajectories pFd(t) = [xiFd(t), yiFd(t)]T as inputs and, by means of an inverse kinematics algorithm, generates the related joint trajectories șd(t) = [și1d(t), și2d(t)]T, selecting the solution corresponding to a forward knee. The body of the robot, and by consequence the legs hips, is assumed to have a desired horizontal movement with a constant forward speed VF. Therefore, for leg i the cartesian coordinates of the hip of the legs are given by: ª xiHd ( t ) º ªVF t º p Hd ( t ) = « »=« » ¬ yiHd ( t ) ¼ ¬ H B ¼
(1)
Given a particular gait and duty factor β, it is possible to calculate for leg i the corresponding phase φi and the time instant where each leg leaves and returns to contact with the ground [2]. From these results, and knowing T, β and tS, the cartesian trajectories of the tip of the foots must be completed during tT. For each cycle the desired trajectory of the tip of the swing leg is computed through a cycloid function given by (considering, for example, that the transfer phase starts at 88
GAIT ANALYSIS OF NATURAL AND ARTIFICIAL WALKING SYSTEMS t = 0 s for leg 1), with f = 1/T: ⎯ during the transfer phase: ª º 1 x1Fd (t ) = VF «t − sin ( 2π ft ) » ¬ 2π f ¼ F y1Fd (t ) = C ª¬1 − cos ( 2π ft ) º¼ 2
(2a)
(2b)
⎯ during the stance phase: x1Fd (t ) = VF T y1Fd (t ) = 0
(3a) (3b)
From the coordinates of the hip and feet of the robot it is possible to obtain the leg joint positions and velocities using the inverse kinematics ψ−1 and the Jacobian J = ψ/ș yielding: ª xid ( t ) º pd ( t ) = « » = p Hd ( t ) − p Fd ( t ) ¬ yid ( t ) ¼ pd ( t ) = ȥ [șd (t ) ] șd (t ) = ȥ −1 ª¬p d ( t ) º¼
(4b)
ș d (t ) = J −1 ª¬p d ( t ) º¼
(4c)
(4a)
Based on this data, the trajectory generator is responsible for producing a motion that synchronises and co-ordinates the legs. In order to avoid the impact and friction effects, at the planning phase we estimate null velocities of the feet in the instants of landing and taking off, assuring also the velocity continuity. These joint trajectories can also be accomplished either with a step or a polynomial versus time acceleration profile. After planning the joint trajectories we calculate the inverse dynamics in order to ‘map’ the kinematics into power consumption. The robot inverse dynamic model is of the form:
( )
+ c ș,ș + g ( ș ) IJ = H (ș) ș
(5)
where τ = [fix, fiy, IJi1, IJi2]T (i=1,…,n) is the vector of forces/torques, θ = [xiH, yiH, și1, și2]T is the vector of position coordinates, H(θ) is the inertia matrix and c ș,ș and g(θ) are
( )
the vectors of centrifugal/Coriolis and gravitational forces/torques, respectively.
3
Measures for Performance Evaluation
In mathematical terms, we provide three global measures of the overall performance of the mechanism in an average sense.
3.1 Mean Absolute Energy A first measure in this analysis is the mean absolute energy per travelled distance. It is computed assuming that energy regeneration is not available by actuators doing negative work, that is, by taking the absolute value of the energy. At a given joint j (each leg has m = 2 joints) and leg i, the mechanical power is the product of the motor torque and angular velocity. The global index is obtained by averaging the mechanical 89
SILVA, MACHADO, LOPES absolute energy delivered over the step length LS:
Eav =
1 LS
n
m
¦¦ ³
T
0
i =1 j =1
IJ ij ( t ) ⋅ ș ij ( t ) dt
(6)
The average of the absolute energy consumption, per travelled distance, Eav, should be minimised.
3.2 Mean Power Dispersion Although minimising energy appears to be an important consideration, it may occur instantaneous, very high, power demands. In such cases, the average value can be small while the peaks are physically unrealisable. An alternative index is the standard deviation per meter that evaluates the dispersion around the mean absolute energy over a complete cycle T and step length LS: n
m
Pi ( t ) = ¦¦ IJ ij ( t ) ⋅ ș ij ( t )
(7a)
i =1 j =1
Dav =
1 1 ⋅ LS T
³
ª¬ Pi ( t ) − Eav º¼ dt
T
2
0
(7b)
where Pi is the total instantaneous absolute mechanical power. In this line of thought, the most suitable trajectory is the one that minimizes Dav.
3.2 Mean Power Lost Another alternative optimisation strategy addresses the power lost in the joint actuators per step length LS. From this point of view, the index mean power lost per meter can be defined as: TL =
1 LS
n
m
¦¦ ³ i =1 j =1
T
0
ª¬ IJ ij ( t ) º¼ dt 2
(8)
The most suitable trajectory is the one that minimizes TL.
4
Simulation Results
To illustrate the use of the preceding concepts, in this section we develop a set of simulation experiments to estimate the influence of several parameters during periodic gaits and to compare the performance measures. Consequently, the multi-legged locomotion was simulated, in order to examine the role of the walking gait versus β, LS, HB and FC, with n = 6, VF = 1 ms−1, SP = 1 m, Li1 = Li2 = 0.5 m, Oi = 0 m, Mb = 87.4 kg, Mi1 = Mi2 = 1.05 kg and Mif = 0 kg. Due to the high number of parameters and values, in the sequel we capture the optimal values by cross-relating several distinct combinations for the Wave Gait (WG): ⎯ Step Length vs. Body Height – Figures 2 – 4 show Eav, Dav and TL versus (LS, HB). We verify that all indices decrease slightly with HB and sharply with LS. ⎯ Step Length vs. Duty Factor – Figures 5 – 7 depict the three indices versus (LS, β). We conclude that Eav, Dav and TL increase monotonically with β and decrease with LS . 90
GAIT ANALYSIS OF NATURAL AND ARTIFICIAL WALKING SYSTEMS 1
100
log(Eav) 7
51 1.7
9 1.962
8 84 2 .0
60
B
β (%)
H (m)
0.6
log(Eav) 80
09 1. 6
0.8
0.4
40 1. 4
0.2
57
9
20 6 1.2
0 0
0.5
1
1.5 LS (m)
2
2.5
0 0
3
Figure 2: Plot of log(Eav) vs. (LS, HB) for β = 50%, FC = 0.01 m, VF = 1 ms−1, WG 1
0.5
1
1.5
2 2.5 LS (m)
5
3
4.5
100
log(Dav)
log(Dav) 80
33 29 0.9
1. 2
1.7441
9 1.
60
3 40
β (%)
H B (m)
724
0.6
0.4
40
0.2
20
2 396 0.9
0.27253
0.0 2
0.5
1
1.5 L (m)
2
2.5
0 0
3
0.5
1
1.5
S
2 2.5 L (m)
3
237 4
3.5
4
4.5
S
Figure 3: Plot of log(Dav) vs. (LS, HB) for β = 50%, FC = 0.01 m, VF = 1 ms−1, WG 1
Figure 6: Plot of log(Dav) vs. (LS, β) for FC = 0.01 m, HB = 0.7 m, VF = 1 ms−1, WG 100
log(TL) 80 5 1.
β (%)
1.0 83 2
60
B
H (m)
946
1.0183
1.2759
0.6
log(TL) 80
0. 88
0.8
0.4
40
0. 0.2
0 0
4
Figure 5: Plot of log(Eav) vs. (LS, β) for FC = 0.01 m, HB = 0.7 m, VF = 1 ms−1, WG
0.8
0 0
3.5
6 25 81
20
0.5
1
1.5 LS (m)
2
2.5
0 0
3
Figure 4: Plot of log(TL) vs. (LS, HB) for β = 50%, FC = 0.01 m, VF = 1 ms−1, WG
0.5
1
1.5
2 2.5 LS (m)
3
3.5
4
4.5
Figure 7: Plot of log(TL) vs. (LS, β) for FC = 0.01 m, HB = 0.7 m, VF = 1 ms−1, WG
⎯ Duty Factor vs. Body Height – Figure 8 depicts Eav(β, HB). We conclude that Eav increases monotonically with β and decreases slightly with HB. Although not presented Dav(β, HB) and TL(β, HB) show the same type of variation with β and HB. ⎯ Duty Factor vs. Foot Clearance – Figure 9 depicts Eav(β, FC) revealing that it increases with β and FC. The charts of Dav(β, FC) and TL(β, FC) show the same type of variation with β and FC.
91
SILVA, MACHADO, LOPES 1
log(Eav)
log(Eav)
1.1295
0.8 8 1.359
1. 5
1.
4 24
0.6
07 0.91414 37
0.4
0.2
0.2
1 .4
0.4
1.3436
1. 2 57 7
B
L1 (m)
H (m)
0.6
6
45 41
78
0 0
20
40
β (%)
60
80
0 -0.5
100
Figure 8: Plot of log(Eav) vs. (β, HB) for LS = 1.8 m, FC = 0.01 m, VF = 1 ms−1, WG
1.
1.1105
0 Ol (m)
0.5
Figure 10: Plot of log(Eav) vs. (Li1, Oi) for β = 2%, LS = 1.8 m, FC = 0.01 m, HB = 0.7 m, VF = 1 ms−1, WG
1
1
log(Eav)
log(Dav)
0.8
0.8
0.6
0.6 2.0
0.4
L1 (m)
FC (m)
0.18077
28 4
0.4 0. 98
68
0.2
6 19 62
0.
0.2 1.45
0 0
0.
3 29
1. 62
0. 78 239
7 32
83
0.67544
0.8
1
94
20
40
β (%)
60
80
0 -0.5
100
Figure 9: Plot of log(Eav) vs. (β, FC) for LS = 1.8 m, HB = 0.7 m, VF = 1 ms−1, WG
0 Ol (m)
0.5
Figure 11: Plot of log(Dav) vs. (Li1, Oi) for β = 2%, LS = 1.8 m, FC = 0.01 m, HB = 0.7 m, VF = 1 ms−1, WG
⎯ Foot Trajectory Offset vs. Leg Length – In the previous experiments we considered constant link lengths and masses, namely Li1 = Li2 = 0.5 m and Mi1 = Mi2 = 1 kg, for Oi = 0 m. Now we study the influence of these factors upon Eav, Dav and TL. Therefore, we establish a total constant leg length and mass of Lt = Li1 + Li2 = 1 m and MLt = Mi1 + Mi2 = 2 kg while varying the relation between the two links, yielding (i = 1, …, 6; j = 1, 2) Mij = (Lij / Lt).MLt. Figure 10 shows Eav(Oi, Li1) for legs link lengths 0.0 < Li1 < 1.0 and for hip–foot offset –0.5 < Oi < 0.5. We verify that Eav varies slightly with Li1 and Oi. Log(Dav) – Figure 11 – and log(TL) present a similar variation. Furthermore, it results that the locomotion is more efficient with Li1 ≈ 0.7 m (Li1+Li2 = 1 m) and Oi ≈ −0.2 m. In conclusion, comparing all the previous experiments, we can establish a compromise for optimising the Wave Gait, namely, that the best situation occurs for β ≈ 2%, 0.9 ≤ HB ≤ 0.95 m, 2.5 ≤ LS ≤ 3.0 m and FC ≈ 0 m, considering −1 Li1 = Li2 = 0.5 m, Oi = 0 m and VF = 1 ms (it should be noted that this value of β corresponds to the robot working on a running condition rather than just walking). Once established these optimal values we can study the effect of other parameters, namely:
92
GAIT ANALYSIS OF NATURAL AND ARTIFICIAL WALKING SYSTEMS ⎯ Body Forward Velocity – Figures 12 – 14 present the evolution of min[Eav(VF)], min[Dav(VF)] and min[TL(VF)], respectively. Figure 14 reveals that for low velocities we have Eav ∝ VF−0.01 while for high velocities Eav ∝ VF2.16. For medium velocities, this chart presents a transition area in the range 0.5 < VF < 3.0 ms−1. Concerning Dav we have a similar variation (Figure 15). For low velocities we have Dav ∝ VF−0.04 while for high velocities Dav ∝ VF3.32. For medium velocities, this chart presents a transition area in the range 0.2 < VF < 3.0 ms−1 with a minimum at VF ≈ 1.0 ms−1. The chart for TL (Figure 16) presents a slightly different variation, being TL ∝ VF−0.51 for low velocities and TL ∝ VF1.65 for high velocities. For this index, the transitions occur in the range 0.9 < VF < 3.0 ms−1 and, in this case, we have TL ∝ VF−0.01. ⎯ Body Height and Step Length vs. Body Forward Velocity – Figure 15 presents the evolution of LS(VF) and HB(VF) for the minimum values of Eav. We conclude that for VF ≤ 3 ms−1 LS / HB increases / decreases with VF from LS = 1.0 m / HB = 0.95 m up to LS = 4.5 m / HB = 0.6 m. Moreover, LS(VF) and HB(VF) present the same variation for the minimum values of Dav and TL. ⎯ Number of Legs – In this case we consider two alternatives. A first option is to establish that each leg mass is constant and, therefore, the total robot mass (MRt) varies with the number of legs (n): n
M Rt = M b + ¦ ( M i1 + M i 2 ) , M i1 = M i 2 = 1 kg i =1
(9)
where Mb is the mass of the body. Figure 16 shows that Eav increases proportionally with n. We get similar conclusions for Dav and TL (Figures 17 and 18). A second alternative is to have a robot with the total mass (MRt) constant: n
M Rt = M b + ¦ ( M i1 + M i 2 ) , M Rt =100 kg i =1
(10)
The legs mass varies with n, according to the expression [17 – 19]:
( M i1 + M i 2 ) = 0.35e−0.47 n , M M Rt
i1
= M i 2 , ∀i
(11)
Figure 19 shows that Eav decreases proportionally with n. We get similar conclusions for Dav and TL (Figures 20 and 21). Comparing these last experiments, we can establish a compromise for optimising the Wave Gait, namely, that the robot should walk (in fact, it should “run”, since β < 50%) with VF ≈ 1 ms−1 and the mass of the robot should be concentrated on the body, while the legs should be as light as possible. Finally, we compare the locomotion performance of several different animals (whose characteristics are presented in Appendix 1 [17 – 19]), based on the formulated indices. The results (Figures 22 – 24) of the indices min[Eav(VF)], min[Dav(VF)] and min[TL(VF)] agree with the previous conclusions.
93
SILVA, MACHADO, LOPES 1.E+04
1.E+02
min[Eav(VF)
TL (W)
Pav (W)
1.E+03
∝ VF1.65
∝ VF−0.51
∝ VF2.16
1.E+02
1.E+01
1.E+01
∝ VF−0.01 1.E+00 0.01
0.10
min[TL(VF)] 1.00 V F (m/s)
10.00
1.E+00 0.01
100.00
0.10
1.00
10.00
100.00
V F (m/s)
Figure 12: Plots of min[Eav(VF)] for FC = 0.01 m, WG
Figure 14: Plots of min[TL(VF)] for FC = 0.01 m, WG
1.E+04
5
min[Dav (VF)] 1.E+03
∝
VF3.32
1.E+01
1.E-01 0.01
∝
3
2
VF−0.04
HB
1
0
0.10
1.00 V F (m/s)
10.00
100.00
0
1
2
3
4
V F (m/s)
Figure 15: Plot of LS(VF) and HB(VF) for min(Eav) with FC = 0.01 m, WG
Figure 13: Plots of min[Dav(VF)] for FC = 0.01 m, WG
5
LS (m), HB (m)
Dav (J)
1.E+02
1.E+00
LS
4
Conclusions
In this paper we have compared various dynamic aspects of multi-legged robot locomotion gaits. By implementing different motion patterns, we estimated how the robot responds to a variety of locomotion variables such as duty factor, step length, body height, maximum foot clearance, foot trajectory offset and leg lengths. For analyzing the system performance three quantitative measures were defined: the average energy consumption, the mean power dispersion and the power expenditure in the actuators per walking distance. Analyzing the experiments we obtained the best set of locomotion variables and, also, we concluded that the results obtained through the different indices are compatible. While our focus has been on a dynamic analysis in periodic gaits, certain aspects of locomotion are not necessarily captured by the proposed measures. Consequently, future work in this area will address the refinement of our models to incorporate more unstructured terrains, namely with distinct trajectory planning concepts. Moreover, we will also address the effects of the foot – ground interaction and a model describing the ground characteristics. The contact and reaction forces at the robot feet will enable further insight towards the development of efficient multi-legged locomotion robots. 94
GAIT ANALYSIS OF NATURAL AND ARTIFICIAL WALKING SYSTEMS 1.E+04
1.E+04
n = 10
n=2
1.E+03
Eav (J)
Eav (J)
1.E+03
1.E+02
1.E+02
n = 10
n=2 1.E+01
1.E+00 0.01
1.E+01
0.10
1.00
10.00
1.E+00 0.01
100.00
0.10
V F (m/s)
1.00
10.00
100.00
V F (m/s)
Figure 16: Plots of min[Eav(VF)] vs. n for FC = 0.01 m, WG
Figure 19: Plots of min[Eav(VF)] vs. n for FC = 0.01 m, WG
1.E+04
1.E+05
n = 10
1.E+04
1.E+03
n=2
1.E+03
n=2 Dav (J)
Dav (J)
1.E+02
1.E+01
1.E+02
n = 10 1.E+01
1.E+00
1.E+00 1.E-01
1.E-02 0.01
1.E-01
0.10
1.00
10.00
1.E-02 0.01
100.00
0.10
V F (m/s)
1.00
10.00
100.00
V F (m/s)
Figure 17: Plots of min[Dav(VF)] vs. n for FC = 0.01 m, WG
Figure 20: Plots of min[Dav(VF)] vs. n for FC = 0.01 m, WG 1.E+03
1.E+02
n = 10 n=2
TL (W)
TL (W)
1.E+02
n=2
1.E+01
1.E+01
n = 10
1.E+00
1.E+00 0.01
0.10
1.00
10.00
100.00
1.E-01 0.01
0.10
1.00
10.00
100.00
V F (m/s)
V F (m/s)
Figure 18: Plots of min[TL(VF)] vs. n for FC = 0.01 m, WG
95
Figure 21: Plots of min[TL(VF)] vs. n for FC = 0.01 m, WG
SILVA, MACHADO, LOPES 1.E+04
I - horse H - human G – ostrich F – dog E – turkey
1.E+03 1.E+02
Eav (J)
D – squirrel 1.E+01
C – quail
1.E+00
B – cockroach A - stick-insect
1.E-01 1.E-02 1.E-03 1.E-04 1.E-05 0.01
0.1
1
10
100
V F (m/s)
Figure 22: Plots of min[Eav(VF)] vs. n for FC = 0.01 m, WG 1.E+05
I - horse H - human G – ostrich F – dog E – turkey D – squirrel C – quail B – cockroach A - stick-insect
1.E+04 1.E+03
D av (J)
1.E+02 1.E+01 1.E+00 1.E-01 1.E-02 1.E-03 1.E-04 0.01
0.1
1
10
100
V F (m/s)
Figure 23: Plots of min[Dav(VF)] vs. n for FC = 0.01 m, WG
TL (W)
1.E+03 1.E+02
I - horse H - human G – ostrich
1.E+01
F – dog E – turkey
1.E+00
D – squirrel C – quail
1.E-01 1.E-02
B – cockroach A - stick-insect
1.E-03 1.E-04 1.E-05 1.E-06 0.01
0.1
1
10
100
V F (m/s)
Figure 24: Plots of min[TL(VF)] vs. n for FC = 0.01 m, WG 96
GAIT ANALYSIS OF NATURAL AND ARTIFICIAL WALKING SYSTEMS
References [1] D. J. Manko. A General Model of Legged Locomotion on Natural Terrain, Kluwer, Westinghouse Electric Corporation, 1992. [2] S.-M. Song and K. J. Waldron. Machines that Walk: The Adaptive Suspension Vehicle, The MIT Press, 1989. [3] D. Wettergreen and C. Thorpe. Gait Generation for Legged Robots. In Proc. of the IEEE Int. Conf. on Intelligent Robots and Systems, 1992. [4] M. A. Jiménez and P. G. Santos. Terrain-Adaptive Gait for Walking Machines. The Int. J. of Robotics Research, 16 (3):320–339, 1997. [5] Celaya, E. and Porta, J. M. A Control Structure for the Locomotion of a Legged Robot on Difficult Terrain. IEEE Robotics & Automation Magazine, 5 (2):43–51, 1998. [6] Bai, S., Low, K. H. and Zielinska, T. Quadruped Free Gait Generation for Straight-Line and Circular Trajectories. Advanced Robotics. 13 (5):513–538, 1999. [7] Inagaki, K. A Gait Study for a One-Leg-Disabled Hexapod Robot. Advanced Robotics. 12 (5):593–604, 1999. [8] Tsukagoshi, H., Hirose, S. and Yoneda, K. Maneuvering Operations of a Quadruped Walking Robot on a Slope. Advanced Robotics. 11 (4):359–375, 1997. [9] Yoneda, K., Suzuki, K., Kanayama, Y., Takahashi, H. and Akizono, J. Gait and Foot Trajectory Planning for Versatile Motions of a Six-Legged Robot. Journal of Robotic Systems. 14 (2):121–133, 1997. [10] Marhefka, D. W. and Orin, D. E. Gait Planning for Energy Efficiency in Walking Machines. In Proc. of the IEEE Int. Conf. on Robotics and Automation, pages 474–480, USA, 1997. [11] Chen, C.-H., Kumar, V. and Luo, Y.-C. Motion Planning of Walking Robots Using Ordinal Optimization. IEEE Robotics & Automation Magazine. 5 (2):22–32, 1998. [12] Cho, D. J., Kim, J. H. and Gweon, D. G. Optimal Turning Gait of a Quadruped Walking Robot. Robotica. 13 (6):559–564, 1995. [13] Bai, S., Low, K. H. and Teo, M. Y. Path Generation of Walking Machines in 3D Terrain. In Proc. of the IEEE Int. Conf. on Robotics and Automation, pages 2216–2221, USA, 2002. [14] Silva, M. F., Machado, J. A. T. and Lopes, A. M. Energy Analysis of Multi-Legged Locomotion Systems. In Proc. of the 4th Int. Conf. on Climbing and Walking Robots, pages 143–150, Germany, 2001. [15] Silva, M. F., Machado, J. A. T. and Lopes, A. M. Performance Analysis of Multi-Legged Systems. In Proc. of the IEEE Int. Conf. on Robotics and Automation, pages 2234–2239, USA, 2002. [16] Silva, M. F., Machado, J. A. T. and Lopes, A. M. Power Analysis of Multi-Legged Systems. In Proc. of the b’02 – 15th IFAC World Congress on Automatic Control, Spain, 2002. [17] M. A. Fedak, N. C. Heglund and C. R. Taylor. Energetics and Mechanics of Terrestrial Locomotion. II. Kinetic Energy Changes of the Limbs and Body as a Function of Speed and Body Size in Birds and Mammals. Journal of Experimental Biology. 79:23–40, 1982. [18] R. Kram, B. Wong and R. J. Full. Three-Dimensional Kinematics and Limb Kinetic Energy of Running Cockroaches. Journal of Experimental Biology. 200:1919–1929, 1997. [19] David A. Winter. Biomechanics and Motor Control of Human Movement, John Wiley & Sons, 1990.
97
SILVA, MACHADO, LOPES
Appendix 1 Number of Legs
Animal Quail
Turkey
Total Mass (Kg) MRt = 0.0444
MRt = 5.69
Leg and Body Mass (kg) Mb = 0.036200 Mi1 = 0.003600, i = 1, 2 Mi2 = 0.000500, i = 1, 2
Leg lenghts (m) Li1 = 0.026, i = 1, 2 Li2 = 0.026, i = 1, 2
Mb = 4.220000 Mi1 = 0.649000, i = 1, 2 Mi2 = 0.086000, i = 1, 2
Li1 = 0.21, i = 1, 2 Li2 = 0.21, i = 1, 2
Mb = 47.936000 Mi1 = 18.271000, i = 1, 2 Mi2 = 2.515000, i = 1, 2
Li1 = 0.605, i = 1, 2 Li2 = 0.605, i = 1, 2
n = 2 (Bipeds) Ostrich
Human
Squirrel
Dog
MRt = 89.5
MRt = 80.0
MRt = 0.11538
MRt = 5.0372
n = 4 (Quadrupeds)
Horse
Cockroach
MRt = 97.904
MRt = 0.0026
Mb = 54.24 Mi1 = 8.00, i = 1, 2 Mi2 = 4.88, i = 1, 2 Mb = 0.089300 Mi1 = 0.002700, i = 1, 2 Mi2 = 0.001540, i = 1, 2 Mi1 = 0.006400, i = 3, 4 Mi2 = 0.002400, i = 3, 4 Mb = 3.705400 Mi1 = 0.256700, i = 1, 2 Mi2 = 0.081800, i = 1, 2 Mi1 = 0.294900, i = 3, 4 Mi2 = 0.032500, i = 3, 4 Mb = 79.500000 Mi1 = 3.571000, i = 1, 2 Mi2 = 1.887000, i = 1, 2 Mi1 = 2.720000, i = 3, 4 Mi2 = 1.024000, i = 3, 4 Mb = 0.002250 Mi1 = 0.000028, i = 1, 2 Mi2 = 0.000005, i = 1, 2 Mi1 = 0.000052, i = 3, 4 Mi2 = 0.000009, i = 3, 4 Mi1 = 0.000066, i = 5, 6 Mi2 = 0.000014, i = 5, 6
Li1 = 0.48, i = 1, 2 Li2 = 0.48, i = 1, 2 Li1 = 0.024, i = 1, 2 Li2 = 0.024, i = 1, 2 Li1 = 0.024, i = 3, 4 Li2 = 0.024, i = 3, 4 Li1 = 0.1025, i = 1, 2 Li2 = 0.1025, i = 1, 2 Li1 = 0.1025, i = 3, 4 Li2 = 0.1025, i = 3, 4 Li1 = 0.405, i = 1, 2 Li2 = 0.405, i = 1, 2 Li1 = 0.405, i = 3, 4 Li2 = 0.405, i = 3, 4 Li1 = 0.015305, i = 1, 2 Li2 = 0.015305, i = 1, 2 Li1 = 0.015305, i = 3, 4 Li2 = 0.015305, i = 3, 4 Li1 = 0.015305, i = 5, 6 Li2 = 0.015305, i = 5, 6
n = 6 (Hexapods) Stick-insect MRt = 0.0009
Mb = 0.000792 Mi1 = 0.000019, i = 1, 2 Mi2 = 0.000004, i = 1, 2 Mi1 = 0.000014, i = 3, 4 Mi2 = 0.000003, i = 3, 4 Mi1 = 0.000014, i = 5, 6 Mi2 = 0.000003, i = 5, 6
Li1 = 0.0146, i = 1, 2 Li2 = 0.0146, i = 1, 2 Li1 = 0.0146, i = 3, 4 Li2 = 0.0146, i = 3, 4 Li1 = 0.0146, i = 5, 6 Li2 = 0.0146, i = 5, 6
About the Authors Manuel F. Silva was born in April 11, 1970. He graduated and received the MSc. degree in electrical and computer engineering from the Faculty of Engineering of the University of Porto, Portugal, in 1993 and 1997, respectively. Presently he is Assistant Professor at the Institute of Engineering of the Polytechnic Institute of Porto, Department of Electrical Engineering. His research focuses on multi-legged walking robots. J. A. Tenreiro Machado was born in October 6, 1957. He graduated and received the Ph.D. degree in electrical and computer engineering from the Faculty of Engineering of the University of Porto, Portugal, in 1980 and 1989, respectively. Presently he is Coordinator Professor at the Institute of Engineering of the Polytechnic Institute of Porto, Department of Electrical Engineering. His main research interests are robotics, modeling, control, genetic algorithms, fractional-order systems and intelligent transportation systems. António M. Lopes received a Master’s degree in electrical engineering and a doctoral degree in mechanical engineering both from the Porto University in Portugal in the years 1995 and 2000, respectively. His research interests include robot modeling and control, force-impedance control and non-linear control systems.
98
Marker-Based Mobile Robot Positioning in Respect of Displacement of the Markers István Nagy1 1
Budapest Polytechnic Bánki Donát Faculty of Mechanical Engineering Department of Mechanical and System Engineering H-1081 Budapest, Népszínház u. 8.
[email protected] Abstract — The Automatic Guided Vehicles (AGV) in behalf of keeping the predetermined path has to verify its positions with the given frequency. This verification has to be as exact as possible, because the path correction -that is returning to the pre-programmed path- is based on this measurement. For the result of exact positioning we have to take into consideration the uncertainty of the mobile robot and the accuracy of the measuring. In the ideal case, when the mobile robot is not moving, the majority of the uncertainty can be neglected and we can focus to the accuracy of the measuring [4]. This paper will describe the inaccuracy and the mathematical model of the rotating compass-head, developed by our laboratory1. Further the measurement’s data analysis can be seen. The presentation is divided for several parts: 1. presentation of the projects 2. principal construction of the rotating head 3. devising of the mathematical models 4. looking for the optimal number of markers participating in measurement 5. measurements in real environment. 6. data analysis Our measuring instrument (LaBRaDOR) is a part of the more overall, SeNaTOR project, and is a developed modification of the well-known Laser-Eye measuring head. The mathematical model is based on the size of the fault-array, and on the other hand, on the diameter of the fault-array.
1 Introduction Nowadays and in the future, bigger and bigger place takes up the automatic guided vehicles in the industry. Its usage can be found in wide-range, begin from nanotechniques, used in genetic engineering; through the micro-robotics we get to the selfnavigating airplanes and the moon crafts traveling in unexplored areas respectively. In this way we got to the two significant divisions of the automatic guided vehicles: Mobile robots traveling in the known environment Mobile robots traveling in unknown environment.
1
Mobile & Micro-Robot Laboratory, at the BUTE, Department of Information Technology.
99
NAGY The known environment, for the mobile robots’ knowledge is not only the knowledge about the position and dimension of the obstacles, but –depending on the mobile robot’s sensors- this information could be expanded with additional: information about the material for e.g.: color, temperature, …etc of the obstacles. The mobile robots navigating in unknown environment firstly appoint the obstacles; determining the dimensions, and then making an environment’s map. It is several ways to collect the information about the environment. The information about the environment could be a camera picture, or noises, or information regarding to the medium of the environment; depend on what is the important for us. In this paper, the mobile robot’s positional accuracy will be analyzed, through the devised mathematical model. The mathematical model is based on the SeNaTOR project. Within the part of the SENATOR project - named LaBRaDOR, what is a rotary compass head – the practical measurements was realized.
2 The Projects The SeNaTOR (SElf-NAvigating TranspOrteR) project is a developing program of the AGV, what is summarizing the smaller projects regarding to the mobile robots. One of these is the LABRADOR project. The completed SENATOR project will provide the appropriate opportunity for the practical testing of the results of our researches. This paper will study the system of marker’s displacement, then the accuracy of the positioning of this AGV in respect of the amount of markers. The position error of the mobile robot will be analyzed in each position of the pre-determined trajectory. Fig.1 shows the AGV. Laser-beam
Rotating head
Mobile robot (AGV) Figure 1: Automatic Guided Vehicle
With full knowledge about the LABRADOR (LAndmark-Based RAndom-Deflected Optical Rangefinder) project we can realize the analyzing of the marker system. The aim of this project is developing of the complete onboard measuring device, which is located on the AGV on a rotating compass-head [2]. The measuring compass-head is made up from a special digital camera (video sensor) and a laser light source, located in the well-determined distance (l) from each other. The task of this measuring head, is determine the distance (d), from the given special marker. On Fig.2 the model of the measuring head can be seen. Further the process of measuring will be neglected; only the accuracy of the “d” distance will be analyzed. Normally this distance could be influenced with several factors, like for e.g.: distance (l) between video sensor (video camera) and laser light source, pixel resolution of the video sensor, displacement of the markers, etc. 100
MARKER-BASED MOBILE ROBOT POSITIONING…
Special marker
wall d Rotating-head (LABRADOR) Mobile-robot (SENATOR)
D l
Laser light source
Video sensor
Figure 2: The model of the measuring head
This presentation will study the influence of the marker’s displacement resp. amount of markers, to the accuracy of the distance measured between the markers and mobile robot. Firstly the number of markers, then the displacement will be analyzed.
3 The Mathematical Models It is practicable two mathematical models for the generating of distance error. One is study the size of the fault area (“fault-area size”), and the second will study only the diameter of the fault area [3]. The measurements were performed with both of them, but because the limited borders of this presentation the size of the fault area will be analyzed further. For modeling and the mathematical calculations such as for the graphical implementation of the fault area, the MATLAB 5.1 SW environment was used. Conditions of the model operation: The relative error of the measuring head could not be bigger as 1% (This condition, in case of our modified laser-eye method is maximally kept.) 0 0 The angle M(i)RM(i+1) have to be in interval D 5 ,120 !; because beyond that, the area model can’t be substituted with a parallelogram, and the size of the fault area is possible through the integral calculus only. Difference between the distances |d(i)-d(i+1)| should not be extremely big. The modeling was performed on the 5x5 units’ workspace, where the markers (M(i)) were displaced. The mobile robot (R), is determine its own position in each unit of the pre-determined path (with measuring its own distances “d(1), d(2)… d(i)” from the given markers “M(1), M(2)…M(i)”), then calculate the fault-function and represent its size (=fault array). The real accuracy of the developed LABRADOR measuring head is 1[mm] absolute error in 15[m] distance, and 0,1% relative error –in present2 - over 15[m]. In consideration of this fact was prepared the model with the given errors, and this model is named for the model in real environment.
2
This part of researching is under developing. The aims are to expand the absolute error borders to the 40-50[m], which are the typical sizes for the indoor applications.
101
NAGY Inasmuch the mobile robot will check its distance only from one markers, the position of the mobile robot can be everywhere on the circle around the marker, and the fault area is a strip with the widest of relative error of the system. In case, of measuring from two markers, the fault areas will form the intersections of two “circle-strips”. Perhaps, from these two intersections is valid only one, but we can easily exclude one of them if the mobile robot’s orientation and approximately position is already known. So, the fault area model can began with measuring the distances from two markers, and further the number of markers will be increased simultaneously the size of the fault-area will be analyzed. 3.1 The model of the “fault-area size” If the conditions of the model operation are observed the intersection of abovementioned two “circle-strips”, could be substituted with a parallelogram with sides a, b and highs m1, m2. The substituting and parallelogram see on Fig.3. R A R
d1
D1
Y
D d2 M2
M1 d1 d2 a D1
R b
m1 b’
M2 X M1
Figure 3: Modeling of the Fault Area
Calculation of the “fault-area size” (A) is performed with the following forms: a b A
m1 ; sin D m2 ; sin D b.m1
(1) m1 .m 2 ; sin D
Where, m1 and m2 are the highs, belonging to the markers M1 and M2, i.e. relative distance error. 3.2 Diameter of the fault- area Formulas required for the diameter’s (D) calculation: b' 2
a 2 m12 ;
b' a. cos D ;
102
MARKER-BASED MOBILE ROBOT POSITIONING… (2) d2
(b b' ) 2 m12 ;
D
[b (a. cos D )] 2 m12 ;
Where b’ is a sub-parameter, see Fig.3. The property of the calculations is proved with similarity of two fault arrays. In modeling the above-mentioned formulas was used in addition with others.
4 Looking for the Optimal Number of Markers The basic distance measurements were performed on the workspace with 5x5 units, from two, three, four, five and six markers separately. The fault- arrays were graphically represented, and the quality of the measurements was determined with the peak of the Gaussian-deviation. (In every case the Gaussian-deviation was prepared within interval <+3V, -3V>). The results and the parameters of the measurements are summarized in tables. 4.1 Measurements from two markers with given relative error These measurements are important to prove that the accuracy is not depend only on the distance. x 10
-5
x 105
3
3,7169 5
3.5
2.5
3
2 1.5
2.5 1
2
0.5 0 5
1.5
5 4
4 3
3 2
2 1
1 0
1
Markers
0
0.5 x 10-6
0 0
Figure 4a 2
6
5
4 i 4b
3
2
1
8
7
Figure 4b
x 10 -5
x 10 -5 1
1.5
0.8 0.6
1
0.4 0.5
0.2
0 5 5
0 5 4
3 Y - axis 2
1
1
0
2
3 X - axis
4
4
3
Y - axis
2
2
1
1
0
0
Figure 4c
Figure 4
5
4
0
Figure 4d
a: Fault-Array From 2 Markers, with Rel. Error (left) b: Gaussian-deviation of the Measurement (right) c: X=const. d: Y=const.
103
3 X - axis
NAGY The measurements were performed with the given relative error, i.e. 0,1%. The expectations are: when the mobile robot is closer to the markers the fault-array is smaller. Whereas on the Fig.4d, where the mobile robot is traveling on the same distance (y=const.) from the markers can be seen, that the location of the mobile robot between the markers have influence to the accuracy of measurements as well. In the middle, between the markers, is the fault-area smaller. The quality of the accuracy, on the axes and on the peak of the Gaussian-deviation (Fig.4b) can be seen. In Table 1, the parameters and dates of measurements can be seen. X
Y
1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
M 1M 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
d1
d2
1.4 2.2 3.1 4.1 5.0 2.2 2.8 3.6 4.4 5.3 3.1 3.6 4.2 5.0 5.8 4.1 4.4 5.0 5.6 6.4 5.0 5.3 5.8 6.4 7.0
4.1 4.4 5.0 5.6 6.4 3.1 3.6 4.2 5.0 5.8 2.2 2.8 3.6 4.4 5.3 1.4 2.2 3.1 4.1 5.0 1.0 2.0 3.0 4.0 5.0
D 59 90 71 59 49 45 78 78 63 52 45 78 78 63 52 59 90 71 59 49 78 68 59 51 45
7relat x10-6 3.4 5.0 8.3 13.6 21.3 5.0 5.2 7.8 12.5 19.7 5.0 5.2 7.8 12.5 19.7 3.4 5.0 8.3 13.6 21.3 2.6 5.8 10.2 16.4 25.0
Table 1: The Mobile Robot`s Positions, Distances and Fault Areas
The smaller fault-areas are highlighted with bold -where the M1RM2 is nearly isosceles or equilateral triangle-. In other hand where the angle D is between the 45-90 degrees the result of measurement is also sufficiently accurate. The sides of the triangle are consisting from the measured distances d1 and d2, and from the segment M1M2 (distance between the markers). Further is highlighted with gray, the smallest area belonging to the measurements in real environment with given relative error. 4.2 Measurements from two markers with LABRADOR measuring-head The real environment –see LABRADOR project in chapter 2-, in our case is an indoor environment consisting from a 50x50 units WS. For the comparing the quality of measurements in real/relative environment see, Table 4 in chapter 4.4.
104
MARKER-BASED MOBILE ROBOT POSITIONING…
Figure 5: The Fault-Array in Real-Environment Measured with LABRADOR Rotating-Head
On Fig.5 clearly can be seen the distance for absolute error, and the risk-area between the markers where the conditions for the measuring are not filled. 4.3 Measurements from three markers The markers are located on 5-5-5 units from each other. Because the limited borders of this presentation, only the fault-area’s sizes, accordingly to the mobile robot’s positions, will be summarized in Table 2. The fault-arrays, got as the result, on Fig. 6 can be seen. Positions [x / y]
1
1
0.0340
2
0.0500
3
0.0500
4
0.0340
5
0.0260
2 0.050 0 0.052 0 0.052 0 0.050 0 0.058 0
3
4
5
0.0500
0.0340
0.0260
0.0520
0.0500
0.0580
0.0704
0.0833
0.1020
0.0833
0.1360
0.1640
0.1020
0.1640
0.1250
Table 2: The Sizes of the Fault-Areas
The smallest fault areas are highlighted in mobile robot positions [x y] = [1 5] or [5 1]. The algorithm of the measuring is the following: - Firstly are measured the distances from the first marker-pair M(i)M(i+1), than the fault area is calculated (A(i)). - Secondly are measured the distances from the second marker-pair M(i+1)M(i+2), than the fault area is calculated (A(i+1)). - There are compared the fault areas and the smallest one will be chosen.
105
NAGY 2 -5
x 10
1.5 1 0.5 0 5
5 4 Y - axis
4
3
3 2
2 1
1
X - axis
0 0
Figure: 6a
Figure 6: The Fault-Array From 3 Markers, a.) Measured With Rel. Error b.) Measured With LABRADOR
Figure 6b
4.4 Measurements from 4, 5, 6 markers Generally the distances from every marker-pairs were measured in every [x, y] position of the mobile robot, and then the fault-areas were calculated. All together, the quantity of “FA” fault areas, where “N” is the number of markers. N 1
¦k;
FA
(3)
k 1
In case of 4 markers the minimal area can be chosen from 6 fault-areas. Further this minimal area is graphically represented in fault-array (see Fig.7). On Fig.7 the peak of the fault-array is in position [5 5], because the mobile robot is on the position of the fourth marker. In this case several results of the calculations are zeros (e.g. distance from the fourth marker) and the other hand, the remained distances, are the longest e.i., the relative error is bigger. The quality will be shown in Table 4 in this chapter.
1.5
x 10-5
1
0.5
0 5
4
3
3 2
Y - axis
Figure 7a
1
0 0
1
4
5
2 X - axis
Figure 7b
Figure 7: The Fault-Array Measured from 4 Markers a) With Rel. Error b) With LABRADOR Measuring-Head
For the results of measurements, see TABLE 3, where results of the fault-area’s size measured with LABRADOR are in (parentheses).
106
MARKER-BASED MOBILE ROBOT POSITIONING… positions [x/y]
1 0.0340 (0.0240) 0.0500 (0.5000) 0.0500 (0.5000) 0.0340 (0.0240) 0.0260 (0.1000)
1 2 3 4 5
2 0.0500 (0.5000) 0.0520 (0.5200) 0.0520 (0.5200) 0.0500 (0.5000) 0.0580 (0.8700)
3 0.0500 (0.5000) 0.0520 (0.5200) 0.0520 (0.5200) 0.0500 (0.5000) 0.0580 (0.8700)
4 0.0340 (0.0240) 0.0500 (0.5000) 0.0500 (0.5000) 0.0340 (0.0240) 0.0260 (0.1000)
5 0.0260 (0.0410) 0.0580 (0.6800) 0.0580 (0.5800) 0.0260 (0.0260) 0.1250 (0.1000)
Table 3: Measurements fom 4 Markers
Further the comparison of the qualities of measurements plotted against the number of markers is shown in Table 4. Measuring Nr. of markers 2 markers 3 markers 4 markers 5 markers 6 Markers
With Relative Error 3.7169e+005 3.2882e+005 3.0349e+005 9.4803e+005 1. Ver. 2.7788e+005 2. Ver. 1.3283e+006 1. Ver. 1.4635e+006 2. Ver.
With LABRADOR 2.6357e+003 3.7442e+003 3.9761e+003 3.9692e+003 1.0840e+006 8.3997e+005 9.6634e+005
Table 4: Comparison of the Quality of the Measurements
Figure 8a
Figure 8b
Figure 8: Fault-Arrays Measured With LABRADOR: a) 5 Markers 2nd Version b) 6 Markers 2nd Version
The difference between the 1st and 2nd version is in the displacing of the markers. In the 1st versions are the markers on the boundaries of the WS, however in the 2nd versions, the 5th and 6th markers are located within the WS.
5 Conclusion In this paper, the growing of the mobile robot’s position and localization errors were presented in respect of the displacement and number of markers. The shape of the fault-arrays shows, how the accuracy of measuring is changing with the position of the robot. It was proved; that not only the distances from the markers, but the angle enclosed between the markers and mobile robot is influences the accuracy of the posi107
NAGY tion estimation. The modeling was prepared in the real environment (see LABRADOR measuring head) also. Further in tables can be seen, how the increasing of the number of markers influences the accuracy.
Acknowledgment This model has been accomplished within a SENATOR research project, supported by the Budapest University of Technology and Economics.
References [1] I. Nagy, L. Vajta, Cs. Gürtler: "Vision based navigation for multi-agent mobile robot system in the transport domain" / Proc. INES 97, IEEE Int. Conf., Budapest, 1997. / [2] I. Nagy, L. Vajta: "Path planning algorithms for mobile robots equipped with navigation sensors" /Proc. INES 99., IEEE Int. Conf., Slovakia, 1999. / [3] I. Nagy, L. Vajta: „Trajectory Planning Based on Position Error Analysis and Fault Area Modelling” /Proc. ICAR2001, IEEE Int. Conf. Hungary, Budapest, 2001./ [4] Nagy I. : „Reflexív módszereken alapuló képfeldolgozó eljárások kutatása” / MAGYAR TUDOMÁNY NAPJA 1999, 14-15. old., Budapest, BDMF, 1999. Nov. 8./
About the Author István Nagy received his Master’s degrees in computer science in 1992 from Bratislava University of Technology in Slovakia, and in 1996 from Budapest University of Technology and Economics (BUTE) in Hungary. His PhD study began in 1997 and his absolutorium was received in 2001 from the BUTE. His main research area focuses on the mobile robot’s positioning and the multi-agent mobile robot’s systems.
108
A Real-Time Optimization for 2R Manipulators E. J. Solteiro Pires1 , J. A. Tenreiro Machado2 , and P. B. de Moura Oliveira1 1 Departamento
de Engenharias, Universidade de Tr´as-os-Montes e Alto Douro, Quinta de Prados, Vila Real, Portugal {epires,oliveira}@utad.pt 2 Departamento
de Engenharia Electrot´ecnica, Instituto Polit´ecnico do Porto, Rua de S. Tom´e, 4200 Porto, Portugal
[email protected]
Abstract — This work proposes a real-time algorithm to generate a trajectory for a 2 link planar robotic manipulator. The objective is to minimize the space/time ripple and the energy requirements or the time duration in the robot trajectories. The proposed method uses an off line genetic algorithm to calculate every possible trajectory between all cells of the workspace grid. The resultant trajectories are saved in several trees. Then any trajectory requested is constructed in real-time, from these trees. The article presents the results for several experiments.
1
Introduction
In the last decade, genetic algorithms (GAs) have been applied in a plethora of fields such as control, parameter and system identification, robotics, planning and scheduling, image processing, pattern recognition and speech recognition. This paper addresses the area of robotics, namely the trajectory planning for mechanical manipulators. Several methods for trajectory planning have been proposed. A possible approach consists in adopting the differential inverse kinematics, using the Jacobian matrix, for generating the manipulator trajectories [1, 2]. However, the algorithm must take into account the problem of kinematic singularities that may be hard to tackle. To avoid this problem, other algorithms for the trajectory generation are based on the direct kinematics [3, 4, 5, 6]. Chen and Zalzala [1] propose a GA method to generate the position and the configuration of a mobile manipulator. The authors study the optimization of the least torque norm, the manipulability, the torque distribution and the obstacle avoidance, through the inverse kinematics. Davidor [2] also applies GAs to the trajectory generation by searching the inverse kinematics solutions to pre-defined end-effector robot paths. Rana and Zalzala [4] develop a method to plan a near time-optimal, collision-free, motion in the case of multi-arm manipulators. The planning is carried out in the joint space and the path is represented as a string of via-points connected through cubic splines.
109
PIRES, MACHADO, OLIVEIRA
Doyle and Jones [5] propose a path-planning scheme that uses a GA to search the manipulator configuration space for the optimum path. The GA generates good path solutions. Kubota et al. [3] study a hierarchical trajectory planning method for a redundant manipulator using a virus-evolutionary GA. This method runs two processes simultaneously. One process calculates some manipulator collision-free positions and the other generates a collision free trajectory by combining these intermediate positions. Bearing these ideas in mind, this paper is organized as follows. Sections 2 to 6 introduce the problem, the solution representation, the GA operators, the optimization criteria, the trajectory storing and the calculation scheme, respectively. Based on this formulation, section 8 presents the results for several simulations involving different fitness functions and levels of workspace quantification. Finally, section 9 outlines the main conclusions.
2
Problem Formulation
In this work it is considered a 2-link manipulator that is required to move from an initial point up to a given final point. The trajectory-planning problem poses a high computational load and has to be processed off line. In this paper we develop a planning scheme capable a rendering an optimized trajectory in real-time. Therefore, we establish a grid that divides the robot workspace into several cells. After performing the discretization the trajectories between all cells are calculated, using a GA, and the results are kept in a group of trees. Each cell contributes with a tree that keeps the information about all trajectories that pass through it. Obviously, the higher the number of workspace cells give the better the accuracy and the closer we get to the continuous (i.e., the non-discretized) workspace.
3
Trajectory Representation
The off-line process consists on evaluate, using a GA, the trajectories between all the cells. Therefore, the path used by the GA is encoded, directly, as strings in the joint space as: Δt, (q11 , q21 ), . . . , (q1j , q2j ), . . . , (q1m , q2m )
(1)
The ith joint variable for a robot intermediate j th position is qij , the chromosome is constituted by m genes (configurations) and each gene if formed by 2 values. The values of qij are initialized in the range ] − π, +π]. It should be noted that the initial and final configurations have not been encoded into the string because these configurations remains unchanged throughout the trajectory search. An additional parameter Δt is introduced in the chromosome to specific the time between two consecutive configurations. Once the GA finds the most adequate trajectories, the results are discretized and inserted into the trees.
4
Operators in Genetic Algorithm
The initial populations of strings are generated at random. The search is then carried out among these populations. The three different operators used in the genetic planning are reproduction, crossover and mutation, as described in the sequel. In what concern the reproduction operator, the successive generations of new strings are reproduced based on their fitness function. In this case, it is used a 5-tournament selection [7] to choose the
110
A REAL-TIME OPTIMIZATION FOR 2R MANIPULATOR
strings from the old population, up to the new population. For the crossover operator, the strings in the new population are grouped together into pairs at random. Single crossover is then performed among pairs. The crossover point is only allowed between genes (i.e., the crossover operator may not disrupt genes). The mutation operator consists of several actions, namely modifying Δt and the joint angle. Therefore, the mutation operator reprobability pm . The new value xt+1 is obtained by places one gene value xt with a given √ the equation xt+1 = xt + N (0, 1/ 2π), where N is the Normal probability distribution.
5
Evolution Criteria
Two main criteria are used to decide the type of trajectory, namely the time duration T or the energy consumption Ea . Beyond these main criteria, others indices have been selected to qualify the evolving robotic manipulators. All indices are translated into penalty functions to be minimized. Each index is computed individually and then, is used in the fitness function evaluation. The fitness function f adopted to evaluate the candidate robots is defined as: f = β1 fM C + β2 q˙ + β3 q¨ + β4 p˙ + β5 p¨ + β6 fot
(2)
where the indices fM C , q, ˙ q¨ , p˙ , p¨ and fot are defined in the sequel. The optimization goal consists in finding a set of design parameters that minimize f according to the priorities given by the weighting factors βi (i = 1, .., 6). The index fM C gives a measurement of the trajectory duration T or the energy required Ea depending on the adopted criterion. The key measure of energy analysis is the average of the mechanical energy during the total trajectory time T [8]: T = n.Δt, for time optimization n 2 (3) fM C = j Ea = j=1 i=1 |τj Δqi |, for energy optimization The joint velocities q˙ are used to minimize the manipulator traveling distance yielding the criteria: 2 m j 2 q˙i q˙ =
(4)
j=1 i=1
This equation is used to optimize the traveling distance because if the curve length is minimized, then the ripple in the space trajectory is indirectly reduced. For a function y = g(x) the distance curve length is [1 + (dg/dt)2 ]dx and, consequently, to minimize the distance curve length it is adopted the simplified expression (dg/dt)2 dx. The joint accelerations q¨ are used to minimize the ripple in the time evolution of the robot trajectory through the criteria: 2 m j 2 q¨i q¨ =
(5)
j=1 i=1
The cartesian velocities p˙ are introduced in the fitness function f to minimize the total trajectory length, from the initial point up to the final point. This criterion is defined as:
111
PIRES, MACHADO, OLIVEIRA
m 2 p˙ = d pj , pj−1
(6)
j=2
where pw is the robot w intermediate arm Cartesian position and d(., .) is a function that gives the distance between the two arguments. The cartesian acceleration p¨ in the fitness functions is responsible for reducing the ripple in time evolution of the arm velocities. This index is formulated as: p¨ =
m
j j−1 2
d p , p − d pj−1 , pj−2
(7)
j=3
The fot index represents the amount of excessive driving, in relation to the maximum torque τi max , that is demanded for the ith joint motor for the trajectory under consideration. fot =
m
f1j + f2j
(8a)
j=1
if τij < τi max (8b) = otherwise max i The dynamic equations of a two link manipulator can be easily obtained from the Lagrangian yielding: fij
j 0
τ − τ i
τ1 = d1 q¨1 + dc q¨2 − cq˙22 − 2cq˙1 q˙2 + g1 cq˙12
τ2 = dc q¨1 + d2 q¨2 + + g2 d1 = m1 l12 + m2 l12 + l22 + 2l1 l2 cos (q2 ) m2 l22
6
(9a) (9b) (9c)
d2 = 2 dc = m2 l2 + 2l1 l2 cos (q2 )
(9d)
c = m2 l1 l2 sin (q2 )
(9f)
g1 = g (m1 + m2 ) l1 cos (q1 ) + g2
(9g)
g2 = gm2 l2 cos (q1 + q2 )
(9h)
(9e)
Trajectory Group of Trees
As mentioned previously the workspace is divided through a grid. For each resulting cell a tree is assigned that keeps all the information about every trajectory that passes through it. For example, figure 1 represents a 4 × 4 grid, the tree corresponding to the cell 0101 and the leaf information trajectory kept from the point (01, 00) up to the point (11, 10). Whose coordinate leaf, 01001110, is formed by [initial cell:final cell]. The next cell has reference number 1001. The information stored in the leaf is (i) the number of trajectory samples fallen upon the cell and (ii) the next trajectory cell. When all trajectories have been calculated and their samples saved in the group of tree, the pruning algorithm is called. If a node has two leaves with the same information, then just one substitutes them. In the example of figure 2 the l-leaf replaces the n-branch.
112
A REAL-TIME OPTIMIZATION FOR 2R MANIPULATOR
00 01 10 11 0
00
1
01 0
10
1
11 0 Trajectory Information Initial Point: 0100 Final Point: 1110 Coordenate Leaf: 01001110 Leaf Information {2, 1001} {2}: Two trajectories points follows in this cells {1001}: Next Trajectory Cell
1
1
0 1
0 0
1 0
1 0
1
{2, 1001}
Figure 1: The 4 × 4 - quantified workspace and the 0101-tree cell
0
1
n 0 l {3, 1001}
1
0
m
l
{3, 1001}
1
{3, 1001}
Figure 2: Pruning the tree at node n
7
Trajectory Reconstruction
The on-line phase consists on reconstructing the trajectory between the actual position and the desired goal. The algorithm follows the six steps: 1. Evaluates the leaf coordinate using the initial and final points; 2. Uses the tree corresponding to the initial point as the current tree to search; 3. In the current tree, follows the leaf coordinate until it reaches a leaf; 4. In the leaf, it returns the number of discrete points that defines the trajectory. This leaf indicates also what tree will be searched in the sequel; 5. Repeats steps 3 to 5 until the next tree to be searched is nil; 6. Finally, it rebuilds the trajectory from the corresponding configurations of the visited trees and number of points previously returned by the leaves.
113
PIRES, MACHADO, OLIVEIRA
8
Simulation Results
This section presents the results of several simulations. The experiments consist on moving a robotic arm from the starting point A up to the final point B, for two types of optimization, that is, for T or Ea . Table 1 shows the workspace and trajectory data where the first column indicates the number of cells nC of the quantified workspace and the other two columns show the initial and final points of the trajectories. These coordinates correspond to the discretization of the initial and final points of the continuous trajectory.
Cells (nC ) 4 16 64 256 (Continuous)
Initial point A (–1.00,–1.00) (–1.50,–0.50) (–1.25,–0.25) (–1.13,–0.13) (–1.00,–0.20)
Final point B (+1.00,+1.00) (+1.41,+1.41) (+1.25,+1.25) (+1.38,+1.38) (+1.40,+1.40)
Table 1: Workspace and trajectory data The algorithm adopts crossover and mutation probabilities of pc = 0.8 and pm = 0.05, respectively and a 100-string population for the intermediate arm configurations. In the experiment is adopted a string length of m = 7 and the selection operator is based on 5-tournament selection with elitism. In the simulations, the robot links have a length of 1 metro, the joints that are free to rotate 2π and the maximum allowed actuator torques are τ1 max = 16 Nm and τ2 max = 5 Nm, respectively. The time between two consecutive configurations is restricted to the interval 0.05 ≤ Δt ≤ 1.60 sec. 8.1
Trajectory with Time Optimization
This section presents the simulations for time T optimization. The resulting time interval is Δt = 0.05 sec and the fitness values are: {nC : f } ≡ {4: 200.6, 16: 117.4, 64: 40.3, 256: 25.0, 8: 21.2}. Figures 3 to 8 show the charts of the manipulator trajectories for the different levels of workspace discretization. For the different levels of quantification of the robot workspace, joint 1 has always the same type of trajectory, while the joint 2 trajectory is more sensitive, being the cases of nC = 64 and nC = 256 those that are closer to the continuous case. The time between two consecutives configurations obtained is the minimal allowed by the GA. After the workspace quantification, some cases do not meet the torque limits. In fact, we get {nC , τ1 , t} ≡ {4, 17.06, 0.30} and {nC , τ1 , t} ≡ {16, 16.60, 0}. Table 2 shows the resulting energy error criteria, namely the quadratic integral (QEIC), the time quadratic integral (TQEIC), the absolute integral (AIEC) and the time absolute (TAIEC). The error consists in the difference between the energy required by the quantified and the continuous trajectories, respectively. In all criteria the energy error decreases with increasing values of nC .
114
A REAL-TIME OPTIMIZATION FOR 2R MANIPULATOR
B
y [m]
1.5
1
0.5
0
A -1
0 x [m]
-0.5
1
0.5
Figure 3: Continuous trajectory in the {x,y} plane 20
2.5
15 2
Joint 2 Position [rad]
Joint 1 Torque [Nm]
10
5
0 Cont. 4 16 64 256
-5
-10
1.5
1
0.5 Cont. 4 16 64 256
0 -15
-20 -0.1
-0.5 0
0.1
0.2
0.3
0.4
0.5
0.6
t [s]
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
t [s]
Figure 4: Robot joint positions vs. time, nC = {∞, 4, 16, 64, 256}
8.2
Trajectory with Energy Optimization
This section presents the simulations for the energy Ea optimization. The resulting time interval is Δt = 0.22 sec and the fitness values are: {nC : f } ≡ {4: 93.1, 16: 63.2, 64: 33.0, 256: 13.6, 8: 12.3}. Figures 9 to 14 and Table 3 show the corresponding results. In this simulation only the experiments with nC = 256 and nC = 64 meet the torque limits. In fact, we get {nC , τ1 , t} ≡ {4, 17.1, 1.54} and {nC , τ1 , t} ≡ {16, −16.1, 0}. 8.3
Results Analysis
The robot trajectories are satisfactory because they have a smooth evolution, both in space and time, particularly for the continuous case. Moreover, for the different types of optimizations (i.e., T and Ea ) we get numerical values for the indices that seem close to global minima. On the other hand, as the number of workspace cells increases we get results closer to those of the continuous case. In fact, in practical terms we can say that for nC = 64 we have almost the continuous case. In what concerns the calculation time
115
PIRES, MACHADO, OLIVEIRA
20
4
15
3 2
10
Joint 2 Torque [Nm]
Joint 1 Torque [Nm]
1 5
0 Cont. 4 16 64 256
-5
-10
0 -1 -2 Cont. 4 16 64 256
-3
-15
-4
-20 -0.1
0
0.1
0.2
0.3
0.4
0.5
-5 -0.1
0.6
0
0.1
0.2
t [s]
0.3
0.4
0.5
0.6
t [s]
Figure 5: Robot joint torques vs. time, nC = {∞, 4, 16, 64, 256}
12
x 10
5
10 Cont. 4 16 64 256
Energy [J]
8
6
4
2
0 0
0.05
0.1
0.15
0.2
0.25 t [s]
0.3
0.35
0.4
0.45
0.5
Figure 6: Ea (t) vs. time for the T optimization, nC = {∞, 4, 16, 64, 256} we verify that it is negligible due to the on-line low computational burden posed by the tree scheme, making this approach well-suited for a real-time implementation.
9
Summary and Conclusions
A real-time trajectory planner, based on the manipulator kinematics and dynamics, was presented. Since the GA uses the direct kinematics, the singularities do not constitute a problem. The planner has two phases, an off-line phase where all possible trajectories were calculated, and a second one where any trajectory is constructed in real-time. The algorithm is able to reach a determined goal with a reduced ripple both in the space trajectory and in the time evolution. The obtained trajectories have a small duration or energy requirement depending of the selected optimization criteria.
Acknowledgments The first author is partially supported by a grant Prodep III (2/5.3/2001) from FSE.
116
A REAL-TIME OPTIMIZATION FOR 2R MANIPULATOR
nC = 4 nC = 8 1.81 0.11 1.12 0.17 1.98 0.50 1.33 0.66
Criteria QEIC (×1011 ) TQEIC (×1010 ) AIEC (×1005 ) TAIEC (×1004 )
nC = 16 nC = 256 0.01 0.01 0.01 0.01 0.17 0.15 0.10 0.10
Table 2: Performance vs quantification for the T optimization
y [m]
1.5
B
1
0.5
0
A -1
-0.5
0 x [m]
0.5
1
Figure 7: Continuous trajectory in the {x,y} plane
References [1] Mingwu Chen and Ali M. S. Zalzala. A genetic approach to motion planning of redundant mobile manipulator systems considering safety and configuration. Journal Robotic Systems, 14(7):529–544, 1997. [2] Yaval Davidor. Genetic Algorithms and Robotics, a Heuristic Strategy for Optimization. World Scientific, 1991. [3] Naoyuki Kubota, Takemasa Arakawa, and Toshio Fukuda. Trajectory generation for redundant manipulator using virus evolutionary genetic algorithm. pages 205–210, Albuquerque, New Mexico, April 1997. IEEE Int. Conf. on Robotics and Automation. [4] A. Rana and A. Zalzala. An evolutionary planner for near time-optimal collision-free motion of multi-arm robotic manipulators. volume 1, pages 29–35. UKACC International Confonference on Control, 1996. [5] A. B. Doyle and D.I Jones. Robot path planning with genetic algorithms. pages 312–218, Porto, Potugal, September 1996. 2nd Portuguese Conf. on Automatic Control.
Criteria QEIC (×107 ) TQEIC (×106 ) AIEC (×103 ) TAIEC
nC = 4 nC = 8 1.04 0.14 2.30 0.56 3.10 1.25 872.53 479.50
nC = 16 nC = 256 0.004 0.002 0.02 0.01 0.20 0.15 90.78 78.18
Table 3: Performance vs quantification for the Ea optimization
117
1
2
0
1
-1
0
-2
-1
Joint Velocities [rad/s]
Joint Velocities [rad/s]
PIRES, MACHADO, OLIVEIRA
-3 -4 -5 Cont. 4 16 64 256
-6 -7
-2 -3 -4 Cont. 4 16 64 256
-5 -6
-8
-7 0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
0
0.2
0.4
0.6
0.8
t [s]
1
1.2
1.4
1.6
1.8
t [s]
Figure 8: Robot joint velocities vs. time, nC = {∞, 4, 16, 64, 256}
20
15 10
4 3
Cont. 4 16 64 256
Cont. 4 16 64 256
2
Joint 2 Torque [Nm]
Joint 1 Torque [Nm]
1 5
0 -5
-10
-1 -2 -3
-15
-20 -0.5
0
-4
0
0.5
1
1.5
2
t [s]
-5 -0.5
0
0.5
1
1.5
2
t [s]
Figure 9: Robot joint torques vs. time, nC = {∞, 4, 16, 64, 256}
[6] Q. Wang and A. M. S. Zalzala. Genetic control of near time-optimal motion for an industrial robot arm. pages 2592–2597, Minneapolis, Minnesota, April 1996. IEEE Int. Conf. On Robotics and Automation. [7] Z. Michalewicz. Genetic Algorithms + Data Structures = Evolution Programs. Springer–Verlag, 1996. [8] Filipe Silva and J. A. Tenreiro Machado. Energy analysis during biped walking. pages 59–64, Detroit, Michigan, USA, August 1999. Proc. IEEE Int. Conf. Robotics and Automation. [9] Thomas B¨ack, Ulrich Hammel, and Hans-Paul Schwefel. Evolutionary computation: Comments on the history and current state. IEEE Trans. on Evolutionary Computation, 1(1):3–17, April 1997. [10] David E. Goldberg. Genetic Algorithms in Search, Optimization, and Machine Learning. Addison – Wesley, 1989. [11] E. J. Solteiro Pires, J. A. Tenreiro Machado, and P. B. de Moura Oliveira. An evolutionary approach to robot structure and trajectory optimization. pages 333–338, Budapest, Hungary, August 2001. ICAR’01-10th International Conference on Advanced Robotics.
118
A REAL-TIME OPTIMIZATION FOR 2R MANIPULATOR
4500 4000
Cont. 4 16 64 256
3500
Energy [J]
3000 2500 2000 1500 1000 500 0 0
0.2
0.4
0.6
0.8
1 t [s]
1.2
1.4
1.6
1.8
2
Figure 10: Ea (t) vs. time for Ea optimization, nC = {∞, 4, 16, 64, 256} [12] E. J. Solteiro Pires and J. A. Tenreiro Machado. A GA perspective of the energy requirements for manipulators maneuvering in a workspace with obstacles. pages 1110–1116, San Diego, California, USA, July 2000. CEC 2000 – Congress on Evolutionary Computation. [13] E. J. Solteiro Pires and J. A. Tenreiro Machado. Trajectory optimization for redundant robots using genetic algorithms. page 967, Las Vegas, Nevada, USA, July 2000. GECCO 2000 - Proceedings of the Genetic and Evolutionary Computation Conference.
About the Authors E. J. Solteiro Pires was born in July 22, 1970. He graduated in Electrical Engineering in 1994 from the Faculty of Sciences and Technologies of University of Coimbra, Portugal. He received his Master’s Degree in Electrotechnical and Computer Engineering, in 1999, from the Faculty of Engineering of University of Porto, Portugal. Presently he is working in his PHD at UTAD university, Portugal. His main research interests are evolutionary computation and robotic manipulation systems. J. A. Tenreiro Machado was born in October 6, 1957. He graduated and received the Ph.D. degree in electrical and computer engineering from the Faculty of Engineering of the University of Porto, Portugal, in 1980 and 1989, respectively. Presently he is Coordinator Professor at the Institute of Engineering of the Polytechnic Institute of Porto, Department of Electrical Engineering. His main research interests are robotics, modeling, control, genetic algorithms, fractional-order systems and intelligent transportation systems. P. B. de Moura Oliveira received a Master’s degree in Industrial Control Systems and a doctoral degree in Control Engineering both from the Salford University in England in the years 1994 and 1998, respectively. His research interests include evolutionary and meta-heuristic algorithms, neural networks and hybrid algorithms in the context of control engineering applications.
119
120
Forward Kinematics of a Stewart Platform Mechanism Domagoj Jakoboviü, Leo Budin Faculty of Electrical Engineering and Computing, University of Zagreb, Zagreb, Croatia {domagoj.jakobovic,leo.budin}@fer.hr
Abstract — Parallel kinematic manipulators posses some inherent advantages over their serial counterparts, such as rigidity, precision and higher workload. However, their movement control is restricted to inverse kinematics only, because of the complexity of the forward kinematics relations. The aim of this work is to combine different mathematical representations of the forward kinematics problem with various optimization algorithms and find a suitable combination that may be utilized in real-time environment. Additionally, we note the existence of equivalent trajectories of the mobile platform and suggest an adaptation to the solving method that, having satisfied certain assumptions, is able to successfully solve the forward kinematics problem in real-time conditions with very high precision.
1 Introduction The Stewart platform mechanism, mainly referred to as hexapod, is a parallel kinematic structure that can be used as a basis for controlled motion with 6 degrees of freedom (d.o.f.), such as manufacturing processes and precise manipulative tasks. The mechanism itself consists of a stationary platform (base platform, the base) and mobile platform that are connected via six struts mounted on universal joints. The struts have an in-built mechanism that allows changing the length of each individual strut. The desired position and orientation of the mobile platform is achieved by combining the lengths of the six struts, transforming the six transitional d.o.f. into three positional and three orientational ones. The lengths of the struts cannot, of course, be changed independently, but only in such a fashion that the hexapod construction allows. Parallel manipulators have received an increasing attention in the past two decades due to their inherent advantages over their conventional sequential counterparts. These include, among others, more robust mechanical structure and higher base frequencies. The strength – mass ratio is also in favour of parallel manipulators, which allows for relatively large workloads. While the positioning error in serial mechanisms is accumulated through a series of links, this is not the case with parallel manipulators, which are consequently capable of performing very precise tasks. On the other hand, these mechanisms have a relatively small workspace, limited with maximum strut lengths and angle values at the joints, as well as their dimensions. However, the main difficulty with parallel manipulators is the complexity of control121
JAKOBOVIû, BUDIN ling their movement. The problem of inverse kinematics for hexapod parallel manipulators can be defined as finding the strut lengths needed to position the mobile platform in a certain position with desired orientation. The solution to this problem is indeed not at all complex and can be computed in a very short time. Furthermore, the computation of length for each strut can be carried away independently in parallel, which can additionally speed up the process. This procedure is used to guide the mobile platform in controlling its movement. The forward kinematics of a parallel manipulator is finding the position and orientation of the mobile platform when the strut lengths are known. This problem has no known closed form solution for the most general 6-6 form of hexapod manipulator (with six joints on the base and six on the mobile platform). This procedure would be invaluable in controlling the force-feedback loop of the manipulator. It would also provide new application possibilities for a hexapod mechanism, such as a force-torque sensor, position-orientation sensor etc. In this work several mathematical representations of the forward kinematics problem, in the form of optimization functions, are combined with various optimization algorithms and adaptation methods in order to find an efficient procedure that would allow for precise forward kinematics solving in real-time conditions. In the next section we define the most promising representations of the problem. Optimization algorithms and some adaptations regarding the problem at hand are described in section 3. In section 4 the experimental results are presented and closing remarks are stated in section 5.
2 The forward kinematics problem The forward kinematics relations for a hexapod machine can be mathematically formulated in several ways. Every representation of the problem can have its advantages and disadvantages which become emphasized when a different optimization algorithm is applied. In this section the five mathematical representations used as an optimization target functions are described. 2.1 The position and orientation of the mobile platform In order to define a forward kinematics problem we have to represent the actual hexapod configuration, i.e. the actual position and orientation of the mobile platform. The most common approach utilizes the three positional coordinates of the center of the mobile platform and & three angles that define its orientation. The coordinates are represented by vector t : ªt x º & « » t «t y » (1) «¬t z »¼ and the three rotational angles are defined as roll-pitch-yaw angles D ` , E and J . The angle values represent the consecutive rotation about the x, y and z axis, respectively. The hexapod geometry is defined with six vectors for base and six vectors for mobile platform, which define the six joint coordinates on each platform:
122
FORWARD KINEMATICS OF A STEWART PLATFORM MECHANISM & bi
ªbix º «b », « iy » ¬« 0 ¼»
& pi
ª pix º « p », « iy » ¬« 0 ¼»
i 1,..,6 .
(2)
The above vectors are represented in local coordinate systems of the base and mobile platform and are of constant value. The base and mobile platform are presumed to be planar, which can be perceived from the z coordinate of the joint vectors. The strut & vectors li can then be expressed as & & & & li bi t R pi , i 1,..,6 , (3) where R is the rotational matrix, calculated from three rotational angles. If the position and orientation of the mobile platform is known, the length of each strut is & & & li D bi , t R pi , i 1,..,6 , (4) where D represents the Euclidean distance between the vector pairs. For an arbitrary solution to a forward kinematics problem, i.e. arbitrary position and orientation of the mobile, the error can be expressed as the sum of squares of differences between the calculated and actual length values: 6 2 & & & 2 2 f ¦ §¨ D bi , t R pi li ·¸ . (5) ¹ i 1 © Having stated the above relations, we can define the first optimization function and the related unknowns as 6 2 & & & 2 2 F1 ¦ ª D bi , t R pi li º »¼ . « i 1 ¬ (6) & T X1 tx t y tz D E J This function is highly non-linear due to the trigonometric functions included in the calculation of the rotation matrix. On the other hand, it is derivable and is the most commonly used one for the representation of the forward kinematics problem.
>
@
2.2 The canonical formulation of the forward kinematics The idea behind this approach [1] is to use the elements of the rotation matrix, rather than the angle values, to represent orientation: ªnx ox a x º & & & « B R >n o a @ «n y o y a y »» . (7) «¬ n z o z a z »¼
The elements of the rotation matrix are interdependent in the following fashion: & & 2 2 2 n n nx n y nz 1 , (8) & & 2 2 2 o o ox o y oz 1 , (9) & & n o nx ox n y o y nz oz 0 , (10) & & & a nuo . (11) Without loss of generality we can position the origins of the local coordinate systems of the base and mobile platform at the strut joints with index one, as shown in Figure 1, which gives us the following parameter values: b1x b1 y p1x p1 y b2 y p 2 y 0 . (12)
123
JAKOBOVIû, BUDIN Zp
p4
p5 Yp
p3 p2
p6
Xp p1
Zb b5
b6
b
Yb b3 b1
Xb
b2
Figure 1: Positioning of coordinate systems for base and mobile platform After extensive simplifications, the forward kinematics can be expressed as a system of 9 equations with 9 unknowns: 2 2 2 nx n y nz 1, (13) 2
2
ox o y oz 2
2
tx ty tz
2
2
(15) (16)
A1t x A2 n x A ,
(17)
B1t x B2 n x B3 o x B4 t y B5 n y B6 o y B ,
(18)
C 41t x C 42 n x C 43 o x C 44 t y C 45 n y C 46 o y
C4 ,
(19)
C 51t x C 52 n x C 53 o x C 54 t y C 55 n y C 56 o y
C5 ,
(20)
C 61t x C 62 n x C 63 o x C 64 t y C 65 n y C 66 o y
C6 ,
(21)
where the constants are A1 b2 x p 2 x , A2
B5
2
0,
nxt x n yt y nzt z
B1
(14)
l1 ,
nx ox n y o y nz oz oxt x o y t y oz t z
1,
b3 x p 2 x b2 x p 3 x , B2 p 2 x p3 y b3 y p 3 x p3 y
, B6
b2 x , A
b3 x b2 x p3 x p3 y
K 2 p2 x . , B3
b3 y , B
Ci 3
B3 piy bix piy , C i 4
B4 piy biy ,
Ci 5
B5 piy biy pix , C i 6
B6 piy biy piy ,
A2 pix B2 piy bix pix , (24)
K p K 2 p3 x K2 pix 3 2 x piy . p2 x p 2 x p3 y 2
Ki
b3 y p3 y ,
(23)
A1 pix B1 piy bix , C i 2
Ki
b3 x , B4
K 3 p 2 x K 2 p3 x . p 2 x p3 y
C i1
Ci
(22)
2
2
2
2
2
(l i bix biy p ix p iy l1 ) 2
124
.
(25)
FORWARD KINEMATICS OF A STEWART PLATFORM MECHANISM The optimization function F2 and the related variables vector X2 are then defined as
n
F2
2 x
2
2
2
2
2
2
2
2
2
n y n z 1 o x o y o z 1 t x t y t z l1
2 2
n x o x n y o y n z o z n x t x n y t y n z t z A1t x A2 n x A 2
2
2
· § oxt x o y t y oz t z 2 ¸ § C 41t x C 42 n x C 43 o x C 44 t y · ¨ ¸ ¨ B1t x B2 n x B3 o x ¸ ¨¨ ¸ C n C o C ¸ © ¨ 45 y 46 y 4 ¹ B t B n B o B 4 y 5 y 6 y ¹ © 2
(26)
2
§ C 51t x C 52 n x C 53 o x C 54 t y · § C 61t x C 62 n x C 63 o x C 64 t y · ¸ , ¸ ¨ ¨ ¸ ¨ C n C o C ¸ ¨ C n C o C 55 y 56 y 5 65 y 66 y 6 ¹ ¹ © © & T X 2 n x n y n z o x o y oz t x t y t z .
>
@
2.3 Reduced canonical formulation The equations (19)-(21) are of linear form which can be used to reduce the number of variables without introducing additional complexity in the system. Three of the six variables tx, nx, ox, ty, ny and oy can be replaced with linear combinations of the other three, which leaves us with only six unknowns. For instance, if we choose to eliminate the following variables t x D11 n x D12 o x D13 o y D1 ,
ty
D 21 n x D 22 o x D 23 o y D 2 ,
ny
D31 n x D32 o x D33 o y D3 ,
(27)
we can define another target function as
n
F3
2 x
2
2
2
2
2
2
2
2
2
2
n y n z 1 o x o y o z 1 t x t y t z l1
2 2
n x o x n y o y n z o z n x t x n y t y n z t z A1 t x A2 n x A 2
2
o x t x o y t y o z t z B1 t x B2 n x B3 o x B4 t y B5 n y B6 o y B & T X 3 nx nz o x o y oz t z .
2
>
(28)
@
It is possible to further reduce the number of unknowns to as low as three, but with inevitable increase in equation complexity [1]. That way the fourth optimization function can be defined as F4
>n o x
@
n y ox nx n y ox o y 1 2
x
2
2
2
2
2
ªn x t y n y t x 2 A1t x A2 n x A 2 « «¬2 A1t x A2 n x A n x t x n y t y t x 2 t y 2 l1 2 1 n x 2 n y 2
º ª2E1 n x E 2 o x E 3 o y E o x t x o y t y » « 2 2 « o x t y o y t x E1 n x E 2 o x E 3 o y E » » « 2 2 2 2 2 »¼ «¬ t x t y l1 1 o x o y & T X 4 nx ox o y ,
>
@
where the constant elements are
125
2
º » »¼
2
(29)
JAKOBOVIû, BUDIN E1
B 2 B1 D11 B 4 D 21 B5 D31 ,
E2
B3 B1 D12 B 4 D 22 B5 D32 ,
E3
B6 B1 D13 B 4 D 23 B5 D33 ,
E
(30)
B B1 D1 B 4 D 2 B5 D3 .
2.4 Vector defined rotation The arbitrary orientation can be described with a single rotation about a universal rota& tion vector [3]. If the rotation vector, whose length equals one, is denoted with k and the rotation angle with T , then we can use the components of their product & & (31) r T k to represent a potential solution to the forward kinematics problem [2]: & T X 5 t x t y t z rx ry rz . (32)
>
@
The conversion from roll-pitch-yaw angles to rotation vector and vice versa can be found in [3]. The optimization function F5 is defined in the same way as the function & F1, only the elements of the rotation matrix have to be calculated from vector r prior to function evaluation.
3 The optimization algorithms The forward kinematics problem is presented as five optimization functions for which the optimization algorithm has to find the minimum, the value of the functions being the error of the estimated solution. Several optimization methods have been applied to each of the functions in order to find an effective combination which would allow for real-time application. The algorithms applied in this work are Powell's method, Hooke-Jeeves', steepest descent search, Newton-Raphson's (NR) method, NR method with constant Jacobian and Fletcher-Powell algorithm. Each of the algorithms is found to be more suitable for some types of functions than for others, which can be perceived from experimental results later in this paper. 3.1 Estimating the initial solution by variable elimination The most reduced canonical formulation (function F4) of forward kinematics problem contains only three independent variables. The choice of those variables can be altered in the reduction process, so it is possible to have different variable triplets in threedimensional reduced form. However, a single solution in three-dimensional space represents not one, but a whole family of hexapod configurations, because a single configuration is fully described only in six-dimensional space. The form of the set of hexapod configurations included in a single solution is determined by the variables not present in the remaining three. For example, if the reduced form solution is represented with variables nx, ox and oy, then none of the variables which define the mobile position, i.e. variables tx, ty and tz, are not present in the solution. Hence, every hexapod configuration with mobile platform orientation matching the three values of nx, ox and oy, but with any arbitrary position, will be represented with the same solution in three-dimensional space. The exact position values are restored through constants' values once the transformation to six-dimensional space is undertaken. This property is used to effectively estimate the initial forward kinematics solution, presuming an orientation of the mobile platform from the previous last known position.
126
FORWARD KINEMATICS OF A STEWART PLATFORM MECHANISM
4 Experimental results Solving of forward kinematics was simulated in static and dynamic conditions. The static experiments included all the combinations of five optimization functions and six optimization algorithms applied to 20 test configurations. The goal was to find the combination which would yield the best results considering the convergence, speed and accuracy. The most promising combinations were then tested in dynamic conditions, where the algorithm had to track a preset trajectory of the mobile platform with as small error and as large sampling frequency as possible. Those combinations include Hooke-Jeeves' algorithm with function F1 and Fletcher-Powell method with functions F2 and F3, but the most successful optimization method was NewtonRaphson's algorithm applied to function F3. That combination has achieved the best results in dynamical testing as well. In dynamic simulation, the starting hexapod configuration is known and serves as an initial solution. During the sampling period T the algorithm has to find the new solution, which will become the initial solution in the next cycle. Several hexapod movements were defined as time dependant functions of the position and orientation of mobile platform. One of those trajectories, hereafter denoted as A, is defined with § S· § S· xt 2 sin ¨ t ¸, y t 2.2 cos¨ t ¸, z t 7 1.5 sin 2t , © 2¹ © 2¹ (33) §t· D t 25 sin 1.8t , E t 20 sin ¨ ¸ 5 cos4t , J t 15 arctan2t 4 , © 2¹ 0dt d 4. The results of the dynamic simulation are presented in the form of a graph where errors in the three rotation angles and three position coordinates of the mobile are pictured. The sampling period T was set to 1 ms, which equals to a 1000 Hz sampling frequency. The errors shown represent the absolute difference between the calculated and the actual hexapod configuration. Due to the large number of cycles, the error is defined as the biggest absolute error value in the last 100 ms, so the graphs in each point show the worst case in the last 100 ms of simulation. The errors are presented separately for angles, in degrees, and position coordinates. The errors for movement A and Newton-Raphson algorithm with function F3 are shown in Figure 2 and Figure 3.
Absolute error
1. u 1012 5. u 1013 1. u 1013 5. u 1014 1. u 1014 5. u 1015 1. u 1015
0
10
20 Cycle index
30
Figure 2: Absolute angle error (D = ,E= ,J= NR algorithm with F3, movement A
127
40
),
JAKOBOVIû, BUDIN
Absolute error
5. u 1014 2. u 1014 1. u 1014 5. u 1015
0
10
20 Cycle index
Figure 3: Absolute coordinate error (x = ,y= with F3, movement A
30
,z=
40
), NR algorithm
The achieved level of accuracy is very high as the absolute error is not higher than 10-12 both for angles and coordinates. Another trajectory is derived from the described one by enlarging some of the amplitudes in (33), which is denoted as movement B (the altered values are in boldface): § S· § S· xt 2 sin ¨ t ¸, y t 2.2 cos¨ t ¸, z t 8 3 sin 2t , © 2¹ © 2¹ (34) §t· D t 55 sin 1.8t , E t 30 sin ¨ ¸ 5 cos4t , J t 15 arctan2t 4 , © 2¹ 0dt d 4. The movement B errors are shown in Figure 4 and Figure 5. While still low, the error for movement B has two distinctive peaks at certain points in simulated motion. What is the cause of those peaks? Mathematical analysis has shown ([4], [5], [6]) that there may exist up to 40 distinctive solutions for forward kinematics problem for Stewart platform with planar base and mobile platform. Those 40 solutions are divided in two groups of 20 between which the only difference is the sign of the z coordinate. In another words, only one half of those mathematical solutions have a physical meaning, i.e. those with positive z axis value. But the existence of multiple solutions for the same set of strut lengths may prove as a problem for the solving method.
Absolute error
1. u 109 1. u 1010 1. u 1011 1. u 1012 1. u 1013 1. u 1014 0
10
20 Cycle index
30
Figure 4: Absolute angle error (D = ,E= ,J= NR algorithm with F3, movement B
128
40
),
FORWARD KINEMATICS OF A STEWART PLATFORM MECHANISM
Absolute error
1. u 1010 1. u 1011 1. u 1012 1. u 1013 1. u 1014 1. u 1015 0
10
20 Cycle index
Figure 5: Absolute coordinate error (x = ,y= with F3, movement B
30
,z=
40
), NR algorithm
Let us suppose that in one hexapod configuration there exists no other forward kinematics solution for actual set of strut lengths, but that in some other configuration there exist several of them. If hexapod in its movement passes through those two configurations, then at a certain point in between there has to be a division point where the number of solutions increases. In those division points the solving algorithm may, unfortunately, begin to follow any of the possible paths, because any of them represents a valid forward kinematics solution! That is exactly the problem that occurs in movement B: the algorithm may or may not follow the correct trajectory. If the latter is the case, than the absolute error looks like in Figure 6 and Figure 7.
Absolute error
1 0.001 1. u 106 1. u 109 1. u 1012 0
10
20 Cycle index
30
Figure 6: Absolute angle error (D = ,E= ,J= NR algorithm with F3, movement B - division
40
),
1 Absolute error
0.001 1. u 106 1. u 109 1. u 1012 0
10
20 Cycle index
30
Figure 7: Absolute coordinate error (x = ,y= ,z= with F3, movement B – division
40
), NR algorithm
The algorithm will randomly follow either the correct trajectory or the equivalent one. It is important to note that in both cases the optimization function remains very low (app. 10-30 to 10-20) during the whole process because both trajectories depict a 129
JAKOBOVIû, BUDIN valid solution to the forward kinematics problem. The problem is, only one of them represents the actual hexapod configuration in each point of time. The error between junction points in Figure 6 and Figure 7 actually shows the distance between the two equivalent trajectories. 4.1 The adaptation method Without any additional information about the hexapod configuration, such as may be obtained from extra transitional displacement sensors, there is unfortunately no way to determine which of the existent solutions to the forward kinematics problem for the same set of strut lengths describes the actual hexapod configuration. Nevertheless, with some assumptions we may devise a strategy that should keep the solving method on the right track. If the change of the direction of movement is relatively small during a single period, which is in this case only 1 ms, then we can try to predict the position of the mobile platform in the next cycle. We can use the solutions from the past cycles to construct a straight line and estimate the initial solution in the next iteration. Let the solution in & & & the current iteration be P0 and the solutions from the last two cycles P1 and P2 . Then we can calculate the new initial solution using one of the following methods: & & & X 0 2 P0 P1 , (35) & & & X 0 1.5 P0 0.5 P2 , (36) & & & T1 0.5 P0 P1 , ½ & & & °° T2 0.5 P1 P2 , ¾ . (37) & & &° X 0 2.5 T1 1.5 T2 ¿°
The above methods were tested in conjunction with NR algorithm and function F3 for all the simulated trajectories. The results are very good: the solving method was now able to track the correct solution during the whole simulation process for all three estimation methods. The number of conducted experiments was several hundred times and every time the algorithm's error margin was below 10-11 both for angles and coordinates. However, the described algorithm adaptation will only be successful if the assumption of a small direction change during a few iterations is valid. To test the algorithms behaviour, simulated movement B was accelerated by factor 2, 4 and 8, while maintaining the same cycle duration of 1 ms. Only by reaching the 8-fold acceleration, when the total movement time equals a very unrealistic half a second, did the algorithm produce significant errors, while still holding to the correct solution. In this case only some differences can be perceived between the three proposed estimation methods. If we set an error margin of 10-3 for angles (in degrees!) and 10-5 for coordinates, then the percentage of breaking those margins for the three adaptation methods will be approximately equal to those shown in Table 1. Adaptation method Error breaching percentage
As (35) 6%
As (36) 11 %
Table 1: The percentage of breaching error margins
130
As (37) 3.6 %
FORWARD KINEMATICS OF A STEWART PLATFORM MECHANISM There is no way of telling, without extensive mathematical analysis for every planned mobile platform movement, whether hexapod will pass any division points or hyperplains. That is why the sampling period must be kept as low as possible, to assure relatively small direction changes during a few cycles.
5 Conclusion Combining several representations of the forward kinematics problem with optimization techniques, an efficient method for solving the problem was found. For the purposes of real-time simulation, several mobile platform trajectories were mathematically predefined. The task of a forward kinematics solving method was then to track the position and orientation of the mobile platform, knowing the starting position. The solving method was able to determine the exact position and orientation of the mobile platform within insignificant error margins (less than 10 to the power of –12 of the minimum hexapod dimension) and with 1000 Hz sampling frequency. The problem of equivalent trajectories was noted: because of the existence of multiple solutions to forward kinematics, there may exist more than one path that mobile platform can follow while having exactly the same strut lengths in every point of the way. The solving algorithm may, under some circumstances, skip to an equivalent trajectory at certain division points. It has to be said that every such path represents an equal correct solution of the forward kinematics, but only one of them represents the true mobile platform trajectory. An empirical algorithm was devised which can increase the probability of finding the right solution, and it proved itself successful in every test case. Unfortunately, it cannot be proven that it will do so in every imaginable movement of the mobile platform. The solving method will always find the right solution if the change in the position or moving direction of the mobile platform is relatively small during a few sampling periods. If that condition is fulfilled, the described method can be used in realtime forward kinematics solving.
References [1] B. Dasgupta and T.S. Mruthyunjaya. A Canonical Formulation of the Direct Position Kinematics Problem for a General 6-6 Stewart Platform. Mech. Mach. Theory, 29(6):819827, 1994. [2] J. -P. Merlet. Direct Kinematics of Parallel Manipulators. IEEE Transactions on Robotics and Automation, 9(6):842-845, 1993. [3] R. P. Paul. Robot Manipulators. The MIT Press, Cambridge, 1981. [4] M. Raghavan. The Stewart Platform of General Geometry has 40 Configurations. Journal of Mechanical Design, 115:277-282, June 1993. [5] M Husty. An Algorithm for Solving the Direct Kinematic Of Stewart-Gough-Type Platforms. ftp://ftp.mcrcim.mcgill.edu/pub/techrep/1994/CIM-94-01.pdf, 1994. [6] F. Wen and C. Liang. Displacement Analysis of the 6-6 Stewart Platform Mechanisms. Mechanism and Machine Theory, 29(4):547-557, 1994.
About the Authors Domagoj Jakoboviü received B. Sc. degree (1996) and M. Sc. degree (2001) in electrical engineering from Faculty of Electrical Engineering and Computing, University of Zagreb. His
131
JAKOBOVIû, BUDIN interests include optimization, genetic algorithms, algorithm design and validation, knowledge representation and parallel kinematic structures. He is a student member of IEEE. Leo Budin received the BE, MS and doctoral degrees, all in electrical engineering, from the University of Zagreb, Croatia. His current research interests include distributed systems, realtime systems, soft computing and problem solving environment in engineering. He is a mem-
ber of IEEE and ACM.
132
Chapter 3 Intelligent Manufacturing Systems
Communication Issues in Multi-Agent-Based Plant Automation Scheduling Yoseba K. Penya, Thilo Sauter Institute of Computer Technology, Vienna University of Technology, Vienna, Austria {yoseba, sauter}@ict.tuwien.ac.at
Abstract — The current state of the art in production planning is still dominated by largely centralized solutions. More distributed approaches require a substantial increase in communication, and network load becomes an important factor. This paper presents a distributed plant automation approach based on mobile software agents and investigates the network load generated by the agents in terms of communication and migration. Particular emphasis is given to the impact of the planning horizon and prioritization, which leads to extensive rescheduling processes. It appears that scheduling approaches that plan several steps in advance need substantially more communication overhead, but can be made less susceptible to snowball effects associated with rescheduling.
1 Introduction As far as the production planning is concerned, the current state of the art in plant automation is still dominated by centralized solutions. Nevertheless, distributed approaches are the focus of much research work. The most obvious benefit of distributing functions of, e.g., the MES (manufacturing execution system) or the control level is a tremendous increase in flexibility, the ultimate goal being an autonomous self-organization of the entire production process. Another advantage less often addressed is scalability. Distributed approaches no longer need powerful central computers to execute the planning tasks, or at least they alleviate the performance requirements. This is beneficial especially in large plants. On the other hand, the reduction of local computing power in distributed systems comes at the price of an increased demand for communication. When the elements of such a system increase their flexibility, autonomy and intelligence, they need to exchange more information in order to successfully synchronize and coordinate themselves. The network constitutes a shared resource within the plant automation system. This is particularly important for distributed solutions (such as the one addressed by the EU-funded Project PABADIS, Plant Automation Based on Distributed Systems [1,2]) that make use of mobile software agents to enhance the control of the individual manufacturing process. In spite of their benefits, the necessary migration for every step of the production process increases the network traffic. Consequently, it is worthwhile to investigate the impact that a distributed approach has on the network load and where the limits of scalability are.
A shorter early version of this paper appeared in the Proceedings of the 6th IEEE International Conference on Intelligent Engineering Systems (INES), pages 339-343, Opatija, Croatia, May 2002.
135
PENYA, SAUTER The remainder of the paper is organized as follows: in the section 2 we introduce the main features of the multi-agent system used in PABADIS, section 3 describes the scheduling approach, section 4 explains the model used in the simulation, section 5 presents and discusses the results, and section 6 draws conclusions and outlines future work.
2 Plant Automation as an Information System The classical representation of Plant Automation is that of a three-layered pyramid, where the machinery is on the lowest (control) level and two layers of more complex plant-wide control, and planning functions are above it. This approach starts from the assumption that every production cell has a minimum degree of intelligence to provide some information that will be used by the upper layer for scheduling, dispatching, and other management tasks. In other words, the plant is conceived as a network of information points. Traditionally, the information stream flows to a central place, where it is processed by an ERP (enterprise resource planning) system that controls the plant as a whole, issues production orders and records the results. Unlike this approach of concentrating all the responsibility, intelligence, and production management in one point, latest trends tend to distribute these three tasks at least partly between several units that have smaller processing power but communicate and cooperate to enhance the overall plant automation functionalities. In PABADIS, a plant is composed of abstract entities called Cooperative Manufacturing Units (CMU) that comprise both an intelligence module and a production module, which can involve one or more machines. All the CMUs are connected to a common network, so they can cooperate in the manufacturing process. There are three types of CMUs (in [2], they are called BIIOs, Basic Intelligent Independent Objects, which is essentially the same): Logical CMUs for computational services such as complex scheduling algorithms, database search etc., Manufacturing CMUs for the physical processing of the products, SCADA CMUs providing an interface to the SCADA system that controls the plant. Basically, PABADIS can be seen as an enhancement of a MES, with a clear focus on a product-oriented view (this is why the approach is mainly targeted at single-piece production), rather than the more process-oriented approach of classical MES. According to [3], functions covered by the MES are the following: Resource allocation, scheduling, and dispatching: This most complicated function of the MES manages the resources of the plans and performs ERP order execution. On the one hand, the goal of this function is to optimize the usage of resources, such as machines, tools, labor skills, or materials. On the other hand, the product creation must be optimized as well. In PABADIS this functionality is distributed in the community of software agents which act individually with respect to their own tasks, such as product creation or machine optimization. Document control, data collection, product tracking and genealogy, process management and performance analysis: This function provides information to the ERP system regarding the current situation of the production and product processing.
136
COMMUNICATION ISSUES IN MULTI-AGENT-BASED… Maintenance management, which tracks and directs the activities to maintain the equipment and tools, in order to ensure their availability for manufacturing and to ensure scheduling for periodic or preventive maintenance.
3 Scheduling of a Multi-Agent-Based Plant As mentioned before, the CMUs in PABADIS are composed of a manufacturing module and an intelligence module. The latter is in fact a stationary agent called Residential Agent (RA) that represents the CMU in the network. It provides the network with an interface to the physical resources and functionalities the CMU offers. The interface is used by the Product Agents (PA), which are mobile software agents that guide the product through its manufacturing process. In the same way that the Residential Agents know everything about the CMU they represent, the Product Agents possess all the necessary data to optimize the development of the product they are in charge of. Therefore, when a PA arrives at a CMU, it exactly knows which parameters must be indicated to the RA, in order to get its work-piece processed. Product Agents are created in an entity called Agency, which is the interface of the PABADIS agent community to an ERP system. It processes the demand and transforms it into XML documents – one per work order. The Agency parses the documents and creates a product agent that will be responsible for the creation of the corresponding workpiece. The Agency also collects the reports of the product agents. Finally, there is another key element within PABADIS: the Look-up Service (LUS) [4]. It acts as white pages mechanism for the product agents, so they know where to migrate when they need a specific functionality. Every CMU notifies the LUS of its joining the network, and provides it with data about the functionalities it offers. The LUS periodically renews its data, so that when a PA requests some information, it is up to date. Figure 1 illustrates the main components of the PABADIS system.
PABADIS XML PA Doc.
XML PA Doc.
XML-Parser
XML-Parser
CMU
RA
CMU
RA
XML PA Doc. ...
XML-Parser CMU
RA
Agency
ERP
Figure 1: Components of the PABADIS System
3.1 Scheduling Much has been said, written, and discussed about constrained scheduling and the benefits of using software agents in planning processes in general [5, 6, 7] or for specific use cases that implement different solutions to tackle the problem [8, 9]. In PABADIS, the schedul-
137
PENYA, SAUTER ing is distributed (physically and operatively); the problem is divided into small bits, since it is carried out in local operations at CMU level between Product Agents and Residential Agents. On the one hand, PAs represent the resource consumers, on the other hand, RAs represent the resource owners. Consequently, they have to negotiate with each other to reach an agreement. Specifically, the scheduling is performed in two ways [10]: Horizontal fashion: The RAs collect the incoming requests for processing and generate a schedule of tasks from different PAs that need to be processed on the respective CMU. Vertical fashion: The PAs generate a list with all possible CMUs where their tasks could be carried out. The combination of both tables forms a matrix representing the whole schedule.
3.2 Depth of Scheduling and priorities The scheduling process is in its simplest form a kind of first-come first-serve model, which is easy to solve. Nevertheless, this simple schema does not fit the requirements imposed by current Plant Automation systems. There must be a mechanism to prioritize the manufacturing of special products to account for urgent demands. Therefore, PABADIS supports priority-based scheduling. When a PA requests a time slot that has been already reserved by a lower-priority PA, the RA arbitrates the conflict by assigning the time slot to the high-priority PA. Since the lower-priority PA must reallocate its resources, the RA notifies it of the new situation to let the PA start a rescheduling process. If the PA still has a higher priority than other PAs, this may lead to a rescheduling cascade effect [11] propagating through the whole agent community. The solution that PABADIS promotes to reduce this effect is the introduction of a “depth of scheduling” parameter. This variable gives the number of tasks a Product Agent plans before starting the manufacturing process. Depending on the value of this parameter, the scheduling can be classified in three categories: Advance scheduling: The PA allocates the resources for all tasks in the work order. Thus, the PA analyses the whole work order and chooses the best possible way of execution. The depth of scheduling parameter is equal to the number of tasks the work order comprises. Step-by-step scheduling: In this case a PA allocates a resource for the next task only when the current one is completed. In fact, real scheduling is not necessary for the RA, which makes the optimization of resource usage almost impossible. The depth of scheduling parameter is equal to 1. Hybrid approach: In this case a PA analyses a work order several steps in advance (the number specified by depth of scheduling parameter) and allocates resources for this certain number of tasks, but not for the whole work order. 3.3 Life Cycle of a Product Agent Figure 2 illustrates the program flow of a Product Agent. After parsing the XML document with the work order, it contacts the Look-up Service to find out about which CMUs provide the functionalities needed for the execution of the work order. The LUS returns a list of matching CMUs and also adds a rough estimate for the time required by each CMU to finish the task. This information is then used by the PA to outline a graph where all the possible paths for the accomplishment of the work order are represented and can be or-
138
COMMUNICATION ISSUES IN MULTI-AGENT-BASED… dered with respect to their overall processing time. Of course, other criteria for the decision might be used as well: workload of the CMU, cost, status of the stocks, etc. Subsequently, the PA selects the best path and starts allocating a “depth of scheduling” number of tasks on the CMUs that compose such path. This process includes the negotiation with the RAs about which time slot is available and which PA with lower priority can be forced to give way. Afterwards, the PA starts the migration and physical manufacturing of its associated work-piece. In case that the depth of scheduling was less than the total amount of tasks needed, it starts a new allocation procedure and so on, until the work piece is finished. parse XML work order ask LUS for needed CMU list depth of scheduling tasks allocation Yes Allocation error
Error? No Move to next CMU
Yes
Error?
Migration error
No Perform Task
All tasks finished?
No
Yes Move to Agency and report
Figure 2: Program flow of a Product Agent
139
PENYA, SAUTER
4 Model of the System The objective of the simulation is to evaluate the influence that the behavior of the agents has on the network load. For this purpose, a model representing a worst-case PABADIS environment with the following characteristics is investigated: The goal is to measure the migrations of the agents and the interchanged messages, as well as the time when they are performed or sent. All the parameters (number of agents, number of tasks that compose a work order, etc.) remain fixed, whereas the depth of scheduling and number of product agents with higher priority are the variables to be tuned and observed. Only one kind of product is manufactured, hence the work orders of all Product Agents are identical. Moreover, all Residential Agents represent similar CMUs, therefore each work order is composed of a fixed number of identical tasks. Migration time is supposed to be negligible. Hence, there is no need to include time slots for migrations in the scheduling. Furthermore, the migration is performed before the task but in the same time slot. Although all CMUs are alike, the PAs cannot reserve two time slots with the same RA. They must perform a task and then move to a different machine. Each PA starts its life cycle at the Agency and it must return there upon completion of the work order to report about the operation that was carried out. Thus, there is always an extra movement (not necessary for the manufacturing of the product) that must be done by the Product Agent. The simulation itself is not based on a real agent platform (like the Grasshopper platform used in the PABADIS project) and several machines, but for the sake of simplicity on a multi-threaded Java program running on a single PC. The flow of the program is as follows: a daemon thread starts four Residential Agent threads and afterwards ten Product Agent threads consecutively and with a small pause in between to have enough time to finish the allocation of resources. The agents allocate their required resources from the first time step on, so the first time interval is devoted to initial operations. Furthermore, all the high priority PAs are launched when the ordinary PAs have finished their respective allocation procedures. Since by that time the previous PAs have already reserved time slots in the CMUs, the highest possible number of rescheduling processes will happen (one per task and high priority PA). Identifier Depth of Scheduling A0 1 (step by step) A2 1 (step by step) A4 1 (step by step) B0 5 (50% of tasks) B2 5 (50% of tasks) B4 5 (50% of tasks) C0 10 (full advance) C2 10 (full advance) C4 10 (full advance)
high priority PAs 0 2 4 0 2 4 0 2 4
Table 1: Experiments performed in the simulation
140
COMMUNICATION ISSUES IN MULTI-AGENT-BASED… Table 1 shows the set-up details of the individual experiments. The work order length is set to ten tasks that require each one time step for execution. The daemon thread acts also as the clock of the system, so every time it ticks, all the PAs and RAs are notified. After simulation starts, the Product Agents contact the LUS and then begin to allocating a number of tasks defined by the “depth of scheduling” parameter. According to the program flow shown in Figure 2, they wait afterwards until they are able to move and perform an operation on a CMU. Moreover, if the task was the last to do, they quit and return to the Agency. If the task is the last allocated but they needed to allocate more (thus, the depth of scheduling is less than the total number of tasks), they restart the allocation process. To account for the network traffic, the daemon thread registers all messages sent and migrations performed upon notification of the entity that did it. Effectively, only the numbers are counted. The final value of the network traffic is then estimated. Taking into account that the maximum length of an Ethernet packet is 1500 bytes, a segmentation of the agent is indispensable. Furthermore, the header information for Ethernet (11 bytes), IP (20 bytes), and TCP (20 bytes) must also be included. The agent size assumed here is 3,000 bytes for the code and 1,200 bytes for the data of the work order. This makes three packets and in total 4123 bytes that need to be moved, each time the agent migrates from one CMU to another. The messages exchanged between the agents are very short, they are assumed to have just 10 bytes each, which is enough to convey information about CMU status, time slot availability, or schedule details. However, the header overhead is significant, and so a total of 61 bytes must be sent over the network. Concerning the rescheduling processes that can be initiated be Product Agents with a higher priority, an additional restriction was imposed on the timing. It is essential to avoid rescheduling when the affected agent is migrating or is about to migrate. Therefore, the time slot that is going to be reassigned must be at least one time step after the request from the high priority agent is received.
5 Results Table 2 shows the main results of the experiments. At first sight, it can be seen that migrations are not affected by the variation in the change of scheduling or the number of PAs with higher priority. They are always 11 per PA, this is, one for each task and one more for the return to the Agency (the high priority agents are not counted to ensure comparability). Figure 3 shows the average of the experiments (A for A0, A2 and A4; B for B0, B2 and B4, etc.). It illustrates the behaviors of the system over time. The number of rescheduling processes depends only on the number of high-priority PAs and the number of tasks to be performed. Thus, with 8 high-priority PAs and 10 tasks, 80 rescheduling processes happen. There is no snowball effect because there are only two different priorities, and the affected PAs are not able to cause more rescheduling processes (the other PAs have at least the same priority).
141
PENYA, SAUTER Identifier A0 A2 A4 B0 B2 B4 C0 C2 C4
Finishing Time Messages Migrations Bytes transmitted 26 1840 110 615270 28 1834 110 614904 27 1982 110 623932 27 4772 110 794122 28 3699 110 728699 28 2544 110 658214 30 6981 110 928871 30 5567 110 842617 30 4414 110 772284 Table 2: Results of the measurements
Another interesting effect regarding rescheduling is that if the PAs do some advance scheduling, a higher number of high priority agents results in a decrease of total messages needed in the experiment. The reason is the scheduling strategy of the agents. The PA aims to allocate all the tasks consecutively. If there is a gap in its schedule, this means that other PAs reserved the slots in between. Thus, when rescheduling, the PA assumes that earlier time slots are already reserved and therefore does not try to allocate them, which saves messages. For instance, if a PA has allocated the following resources: t = 10, t = 11, t = 13, and it receives a notification of rescheduling at t = 10, the PA will start rescheduling from t = 13 on. It supposes that if it previously did not succeed in allocating resources for t = 12, it will not succeed in the future. This effect is especially relevant with advanced planning, since the saving is bigger than in step-by-step or hybrid scheduling (see Table 2). Figure 3 shows the network load for each scheduling modality. Advance scheduling (type C) requires most of the network traffic at the beginning, where the PAs send all the messages. Afterwards, they migrate to the CMUs without any further exchange of information. The hybrid approach (type B) presents a diagram with pronounced peaks, corresponding to the moments where the allocation is performed. Data Transmitted (bytes)
100000 80000 A
60000
B
40000
C
20000 0 0
5
10
15
20
25
30
Time elapsed (seconds) Figure 3: Average behavior regarding the depth of scheduling
142
COMMUNICATION ISSUES IN MULTI-AGENT-BASED… Since the depth of scheduling is 5 and the PAs start allocating from t = 1, the time slots with higher network traffic are 6, 11, and then 16, 21, etc, but obviously the peaks are smaller since there are fewer agents. Finally, the type A experiments (step-by-step scheduling) do not show significant peaks (only when in the same time slot some PAs return to the Agency and others migrate to perform a task) and distribute the network load uniformly. Figure 4 shows the average of the results with the number of high priority PAs as parameter. It confirms what was exposed by Figure 3: experiments with a lower number of high priority PAs need to interchange a higher amount of data, due to the previously explained improvement in the allocation procedure. Data transmitted (bytes)
150000
0 high-p Pas
100000
2 high-p Pas 50000
4 high-p Pas
0 0
5
10 15 20 Time elapsed (seconds)
25
30
Figure 4: Average behavior regarding number of high priority Product Agents
6 Conclusion and future work The model presented in this paper illustrates the impact on the network load that different scheduling modalities for a plant automation system based on mobile software agents have. The simulation demonstrated that snowball effects due to rescheduling processes and extra migrations may be avoided by using only two different priority levels, and by ensuring that an agent to that is going to be rescheduled is not about to arrive at the target CMU. Evidently, the simulation model used was rather coarse. In the course of the project, however, it will be refined to account for, e.g., non-uniform task execution times per CMU, which will open new possibilities for optimization. The simulations seems to suggest that full-in-advance scheduling creates an extremely high network load at the beginning of the process and is therefore inferior to a step-bystep scheduling or an approach with a low depth of scheduling where the load is more balanced. From the viewpoint of network load, this is certainly true. However, the simulation cannot judge the benefits of a larger scheduling depth such as better optimization results that might outweigh the temporarily higher network traffic. Still, future investigations have to explore the impact the number of agents has on the load. Particularly during the negotiation phase, it is anticipated that the load will dramatically increase with the number of agents. The available network bandwidth may therefore easily put an upper limit to the practically achievable scheduling depth. Of course, it has to be noted that it is highly unlikely that all PAs start at the same time. In practice, they can be released with short delays in between. The only critical situation will be then a rescheduling process affecting a large number of agents.
143
PENYA, SAUTER
References [1]
PABADIS, IST-1999-60016, www.pabadis.org
[2]
T. Sauter and P. Palensky. Network Technology for Distributed Plant Automation. In Proceedings of the 5th IEEE International Conference on Intelligent Engineering Systems, pages 407-412, Helsinki, Finland, September 2001.
[3]
MES Association, www.mesa.org
[4]
Y. K. Penya, S. Detter, T. Sauter. Plug-and-Participate Functionality for Agent-Enabled Flexible Automation. In Proceedings of the 6th IEEE International Conference on Intelligent Engineering Systems, page 136, Assiut, Egypt, March 2002.
[5]
C. Le Pape. Classification of scheduling problems and selection of corresponding constraint-based techniques. In Proceedings of the 1993 IEE Colloquium on Advanced Software Technologies for Scheduling, pages 1/1-1/3, 1993
[6]
P. Prosser. The future of scheduling-DAI?. In Proceedings of the 1993 IEE Colloquium on Advanced Software Technologies for Scheduling, pages 8/1-8/2, 1993
[7]
T. Grant. Overview And Conclusions. In Proceedings of the 1996 IEE Colloquium on Intelligent Planning and Scheduling Solutions, pages 7/1-7/4, London, U.K., 1996
[8]
B. Drabble. Modern planning and scheduling technologies. In Proceedings of the 1996 IEE Colloquium on Intelligent Planning and Scheduling Solutions, pages 3/1-3/6, London, U.K., 1996
[9]
J. Reaidy, P. Massotte, L. Yingjiu and D. Diep. Product and process reconfiguration based on intelligent agents. In Proceedings of the 2001 IEEE International Conference on Systems, Man, and Cybernetics, pages 3397-3402, Tucson-Arizona, U.S.A., October 2001
[10] A. Bratoukhine, Y.K. Penya and T. Sauter. Intelligent Software Agents in Plant Automation. In Proceedings of the 3rd International NAISO Symposium on Engineering of Intelligent Systems, page 77, Malaga, Spain, September 2002 [11] M. Fletcher and S. M. Deen. Task rescheduling in multi-agent manufacturing. In Proceedings of the 10th International Workshop on Database and Expert Systems Applications, pages 689-694, Florence, Italy, September 1999
About the Authors Yoseba K. Penya received his Master’s degree in computer science in 2000 from the Deusto University in the Basque Country. Since July 2000 he is research assistant at the Vienna University of Technology and his area of expertise include multi-agent systems, scheduling in plant automation and e-commerce techniques applied to energy management. Thilo Sauter received his Dipl.-Ing. and doctorate degrees in electrical engineering from the Vienna University of Technology in 1992 and 1999, respectively. From 1992 to 1996 he was a research assistant at the Institute of General Electrical Engineering, working in the area of programmable logic and analog ASIC design. Since 1996, he has been with the Institute of Computer Technology, where he is head of the center of excellence for fieldbus systems and leading the factory communications group. He is member of the Austrian technical committee ÖVE MR65SC concerned with fieldbus standardization. His current research interests are integrated sensor systems and communication networks in automation, with a focus on interconnection issues of fieldbus systems and IP-based networks.
144
Advanced Factory Automation System for Deburring and Dressing of Automotive Engine Parts Ulrich Berger, Raffaello Lepratti Chair of Automation Technology, Brandenburg Technical University, Cottbus, Germany {berger.u,lepratti}@aut.tu-cottbus.de
Abstract — Today the automotive sector is dominated by high variety of types and increasing product diversification. Thus, OEM manufacturers reintegrate key technologies back in the enterprise, due to competitive reason and to stabilize leadership in innovation. As an example, state-of-the-art fuel and diesel engine cylinder heads achieve higher complexity and filigrane structure, therefore careful treatment of specimen as well as net-shape machining processes with high quality output are a major requirement in this sector. An advanced factory automation system, based on an industrial robot (6-axis joint coordinate), has been developed in order to obtain the described results. A graphical interactive programming system enables the shop-floor personal simple and user friendly corrections at deburring results for individual workpiece types. A possibility was given to the system user, with which deburring errors can be easily removed through short operator interaction. Thereby, each authorized robot cell operator can contribute to guaranty process quality without special technical training.
1 Introduction Cylinder heads of Diesel engines are usually made of aluminium alloys in a mold casting process. After the casting, solidification and down cooling phases the cylinder head shows air inclusions, micro cracks and pipes on its surfaces. Adjoin to the investment casting process, risers, gates and burr formations appear. Additionally more or less strongly minted burr forms in dependency of the wear state of the forming tool and at all components boundary by tolerance between the tool components (steel mould sections and sand core). As result: The form of the cylinder heads changes consistently up to some millimetres during the production time. In order to obtain functional and aesthetical quality grades, a deburring and dressing operation must apply. According to economical and safety requirements, this operation is mostly performed by industrial robot systems.
2 Project Goals Because of the described problems simple intervention possibilities have to be conceived and developed in accordance with the system user qualifications. Correction values are to be given at a central standard terminal for all workpiece outlines, which must be processed. If the central terminal is a standard PC, the input of correction value has to take place by
145
BERGER, LEPRATTI means of an appropriate software tool in a simple and self-describing way, for example by a visually interactive control surface. Thereby each authorized robot cell operator could insert correction values in extreme easily manner for removing all kinds of form deviations on all cylinder head types and, consequently, arrange a global adjustment of the production system. Furthermore a constantly high deburring and dressing quality could be guaranteed during the entire production period without additional investments or downtimes for robots reprogramming. Main goal of the planned project is therefore a quality and productivity increase of cylinder heads and, by lowering of reprogramming costs, to obtain a still more economical production.
3 State-of-the-Art 3.1 Robots in the automation For automation purposes industrial robots are used for difficult and monotonous working tasks under hazardous working conditions. The today’s main application fields are spot and arc welding, manipulation of tools and workpieces, coating, spray painting, commissioning, palletising and, with relevant increasing importance, also manufacturing in the automotive industrial sector. According to the system providers and robot end users very large progresses have also been achieved in the last years regarding geometric accuracy, trajectories exactness, task reproducibility, flexibility and individual task adaptation, so that a clear upgrade to earlier versions is now recognizable. Moreover the robot installation costs have been significantly dropped, due to theirs diffused employment. For this reasons, the use of industrial robots is getting more and more interesting also for other areas of applications. Two of these areas are deburring and dressing tasks. 3.2 Deburring with industrial robots The worker in a foundry is normally confronted with physical loads due to noise, dust, vibrations as well as psychological one by constantly repetitive activities. This requires a complete automation of deburring and dressing processes. Apart from quality and safety reasons, there are further arguments for automating such processes: An industrial robot omits no outline and guarantees a complete proceeding of all workpiece surfaces. On the contrary humans can forget a processing of section outlines by extensive tasks, particularly with outside distractions. In today’s production systems the robot takes up the workpiece with the grip arm and drives it for deburring along the tools. Its motion path is given by number and order of the Teach-In programmed space points and is normally the same by every flow cycle. In case of too large workpiece form deviations it is necessary to reprogramming a part of the stored space points. This procedure is very time as well as cost intensive and obstructs therefore significantly the production running. In order to avoid this incommodity and to obtain constantly good deburring and dressing results, it is necessarily to investigate fast reactions to all modifications and differences of individual workpieces. This is already possible by different methods [1]. 1) A flexibly stored robot tool is driven along the workpiece outlines and the distance tool-workpiece is estimated by a path measuring system. If the deflection oversteps a defined limit value this process is repeated until the given value does not be exceeded any more. The advantage of this procedure are optimal deburring results and an ensured process
146
ADVANCED FACTORY AUTOMATION SYSTEM …OF AUTOMOTIVE ENGINE PARTS security, also in the series production. The higher operating time due to repeated measurements of individual outlines has though an unwanted effect. 2) An other possibility consists in the use of alternative program routines for individual outline areas. If a deviation occurs an alternative program routine with corresponding shifted point values is selected and carried out in the main robot program [2]. Process safety and unchanged cycle running time are advantageous characteristics of this method. An extra alternative program however is necessary for each different outline. Thus program complexity is considerable raised. 3) In a further procedure the workpiece is measured by means of lasers before the handling process. Together with the measurement the robot path is calculated. The obtained results regarding quality and process security are very good and an application in a series production quite possible. A prerequisite for an application of this technique is a really good contours accessibility. In case of deburring and dressing of cylinder heads an application of this or a similar procedure with optical measurement cannot be easily employed.
4 Design of the Project The planned programming system can be divided into three main tasks: The automatic modification of robot path process, the data communication between PC and robot control and the execution of the correction value input at standard PC. For each focus it is important to find optimal technically and economically methods in order to develop a high quality global concept. During the concept development it has to be taken into consideration that all three solutions must be compatible to each other. 4.1 Automatic Correction In this project section it has to be developed, how to react to deviations for all workpiece types of every form and at any time through an automatic modification of the robot path process. This correction in the programming system must take place without influencing production and treatment processes and must be integrated in the series production without additional equipment technology and complex extra programming effort. The only additional admissible component is a standard PC. Furthermore waiting periods in the program running have to be prevented and the clarity of the program structure should remain protected. The corrections should be done at a selected cylinder head surface in form of entire, side or corner surface shifting and should take place for every individual area in several steps in positive direction for stronger deburring and in negative direction for weaker deburring. The solution previews a modification of the robot programs using simple “variable sentences”. The variable changes are effected inserting correction values at PC and from there these values are transferred to the robot control. For each robot, each workpiece type and form the entered values must be stored in a separate variable sentence and available any time. Afterwards only the appropriate variable sentence is called by robot control during the milling proceeding and processed in the robot program. Each workpiece surface has to be divided into areas, so that a single different variable can be assigned to each individual area. The path of the robot is shifted within the amount of the respective variable [4].
147
BERGER, LEPRATTI 4.1.1. Production of the shifting In order to produce a separate shifting of individual areas every workpiece surface has to divide ideally into nine parts (Figure 1). An accurate reproduction of the correction of the workpiece surfaces can be reached only if the area selection at PC is limited to: (i) one individual area (corresponding to the areas 1, 2, 3 and 4; called corner shifting), (ii) two neighbouring areas (corresponding to the areas 5, 6, 7 and 8; called side shifting) or (iii) all areas of the surface (corresponding to the area 9; called total shifting).
Figure 1. All nine workpiece surface areas, which can be shifted Corner shifting If the system user during the final inspection of a workpiece determines that the deburring result of a surface corner does not correspond to the required quality, he selects at PC the corresponding area from the nine areas, which are represented in Figure 1, and inputs the desired correction value. The user selects for example the area 1 and enters a correction value į. Referring to Figure1 the point p1 has to be shifted and the shifting must take place around the opposite diagonal point, that means in this case point p4. Figure 2 shows a detailed view of the surface movement in case of a p1 corner shifting. All surface points are shifted by the same angle (1) and the shifting result of point 1, 2 and 3 are shown in the equations (2), (3) and (4).
D
E
J
Figure 2: Detail view of corner shifting
148
(1)
ADVANCED FACTORY AUTOMATION SYSTEM …OF AUTOMOTIVE ENGINE PARTS p1 p1'
e
p 2 p 2' p 3 p 3'
D S
180 E S b 180 J S a 180
a 2 b2 b
D S 180
D S
(2),(3),(4)
180 D S a 180
On the assumption that a and b are perpendicular to each other, from the equations (2), (3) and (4) follows: p1 p1c
G
p 2 p 2c
G
p 3 p 3c
G
p 4 p 4c
0 A B
b 2
a b2 a a 2 b2
G B
(5),(6),(7),(8) G A
a 2
a b2 b
(9),(10)
a 2 b2
By shifting of point p1 the neighbouring points p2 and p3 are inevitably influenced and also shifted (6) (7). The coefficients A and B depend on cylinder head geometry and represent, how strongly the influence of the neighbouring points is. Referring to normally cylinder heads A and B amount between 20% and 50% and therefore the divergences from the desired deburring results can be neglected. Side shifting If now the program user ascertains that the deburring result at neighbouring areas (corners) does not correspond to the required quality, he can choose the appropriate corner pair (area 5, 6, 7 or 8 of Figure 1) at the PC display and input the necessary correction. The user selects for example the area 7 and then the areas 3 and 4 will be processed at the same time. The shifting occurs around the opposite axis p1p2. The shifting movement is represented in Figure 3 and the shifting results are shown in Table 1.
Figure 3: Side shifting
149
BERGER, LEPRATTI Total shifting A correction of all areas represents a linear shifting of the entire surface. All four points p1, p2, p3, p4 are shifted by the same value and direction. 4.1.2 Conversion of correction values The next step concerns with the interpretation of the correction values and their conversion for obtaining the right cylinder head positioning by means of the robot. The robot coordinate system refers to the robot flange and its origin is situated in the Tool Centre Point (TCP). This and the distances between programmed points and rotation axis, necessary for the conversion of the correction value, are also shown in Figure 4. Pair of points
Shifting
Rotation
p1 p 2
G
p2 p4
G
p3 p4
G
p1 p3
G
180 b S 180 G a S 180 G b S 180 G a S
G
Table. 1: Side shifting results
Corner shifting A correction shifting of a corner by the value į at p1 can be exactly positioned only if the following rotations take place at the robot: 1. Rotation around the z-axis in negative direction by the angle ȕ1. The resulting shifting are equations (11) and (12): x Positive shifting of p1 and p2 G 1c
E 1 a1
(11)
E1 a 2
(12)
x Negative shifting of p2 and p4 G 2c
2. Rotation around the y’-axis (already rotated y-axis through the 1st rotation) in negative direction by the angle ȕ2. Equation (13) and (14) represent the shifting of the four surface corners x Negative shifting of p1 and p2 G 1s
E 2 b1
(13)
G 2s E 2 b2
(14)
x Negative shifting of p2 and p4
150
ADVANCED FACTORY AUTOMATION SYSTEM …OF AUTOMOTIVE ENGINE PARTS
Figure 4: Orientation of the workpiece coordinate system The entire shifting of p1 is therefore the total of two linear shifting. These go however in two quite different directions and their addition should be regarded vectorially. Since a correction value may usually not be larger than 1mm, the total can be approximated to a linear addition. For p1 follows: G p1 G1c G1s
(15)
E1 a1 E 2 b1
The point p4 should remain in the same position. It is however influenced by both described rotations and is shifted unavoidable by the value įV. In order to reset the point p4 to the original position it is necessary to translate it backwards by įV. G p4
G 2c G 2s
E 1 a 2 E 2 b2
G V
(16)
For the other two points p2 and p3: G p2
G 2c G 1s
E1 a 2 E 2 b1
(17)
G p3
G 1c G 2 s
E 1 a1 E 2 b2
(18)
For reducing as much as possible the influences on the shifting of points p2 and p3, their amount must be equally. E1 a 2 E 2 b1
E1 a1 E 2 b2
E1 a1 a 2 E 2 b2 b1
E1 E2
b2 b1 a1 a 2
K
B A
(19) (20)
The coefficient K has a relevant meaning. It represents the proportionality between the height and width of the area, which has to be processed, and considers thereby the geometrical distinctions between the different workpiece types. In order to obtain a desired correction result the two rotation angles may be not free selected but their relation must correspond to the coefficient K. From equation (15), (16) and (20) a first order equations system with three variables ( ȕ1, ȕ2 and įV ) results (22). It must be paid attention to the position of the point p1, which shifting due to rotation and translation must correspond exactly by į. That means the value įV must be subtracted from the total shifting į (21).
151
BERGER, LEPRATTI GD
(21)
G GV
° G D E 1 a1 E 2 b1 ° ®G V E 1 a 2 E 2 b2 ° E1 B K ° A E ¯ 2
(22)
The solution of the upper system leads to the following equations: ° ° ° ® ° °G °¯ V
E1
G 2 A
E2
(23)
G
2B G § a 2 b2 · ¨ ¸ 2 © A B¹
These results could be applied partly to all four corner points p1, p2, p3 and p4. The only difference consists in the translation value įV, to which a different values has to be assigned depending on the selected area. The corresponding translation values are shown in Table 2.
GV
Selection
G § a2
b · ¨ 2¸ 2© A B¹ G § a1 b2 · ¨ ¸ 2© A B¹ G § a 2 b1 · ¨ ¸ 2© A B¹ G § a1 b1 · ¨ ¸ 2© A B¹
p1 p2 p3 p4
Table. 2: Assignment values for įV Side shifting A side shifting of the neighbouring points p1 and p3 involves a rotation around the z-axis (Figure 4). The other two points on the opposite edge (p2 and p4) are inevitably shifted too. Also in this case a translation in the opposite direction is therefore necessary in order to compensate for the workpiece position and obtain the desired corrections. Equations (11) and (12) could be applied and the equations system (22) can be shortened for the regarded case as follows: G T ® ¯ GV
E 1 a1 E1 a
G ° E ® 1 A °¯G V G a 2
(24)
Both quantities, i.e. the translation value įV and the rotation angle ȕ1, possess different values depending on the selected area. The following table (Table 3) shows how to adapt the equation system for each case of selection.
Total shifting For a total surface shifting by the correction value į the equation system (22) has the following form:
152
ADVANCED FACTORY AUTOMATION SYSTEM …OF AUTOMOTIVE ENGINE PARTS G
(25)
GT
An exactly reproduction of the entered correction values can only be obtained if the right axis orientation will be token into consideration. Neighbouring points
GV
E1
p1 p2
G
b2 B
G
p3 p4
G
b1 B
G
p1 p3
G
a2 A
G
p2 p4
G
a1 A
G
B
B A
A
Table. 3: Assignment values for įV and ȕ1 4.2 Communication PC/RC An important aspect in the development of this project is the test of possibilities for the data communication between computers and robotic control. Particularly the data transmition rate and its influence on the production process (process obstruction or even interruption) and on the robot program running are to be considered like most important selection criteria. Possible risks must be emphasized, measured and, if possible, minimized. Moreover, all data, which are necessary for the transfer of the correction value from PC to the robot control, should be stored before data sending for preventing a damage by overrun. A repeated storing on two independent protection media (e.g. two fixed disks) is suggested. For the integration of the data transport into the programming system is preferred the use of a factory LAN. Apart from the technical advantages and the simple handling, the data transfer over a Local Area Network is for the future a very developable technology, because further industrial robots and PCs can be connected to this network at any time. A possible connection form is represented in Fig 5. In order to avoid overrun, data misinterpretation and back-up in robotic control during the input of correction values at PC modules (files) with variable sentences may be transferred individually and only after proceeding the previous transferred corrections, it may receive new data. That can occur by using a flag (Boolean variable), which is set if the robot is busy and reset as soon as the operation phase is concluded. 4.3 Visualization of the Corrections The system user must have the possibility to execute all kinds of corrections into the system without competences in programming of robot. The input of the necessary values has to take place in a very simple and understandable manner. Therefore a program interface for the visualisation of workpieces with all individual outlines, which can be processed, has been developed. The system user executes the correction only by clicking on the corresponding outline area by means of PC mouse. The input is restricted to more or less-Button for removing material. Sequentially on the program interface background the necessary variables with the related values are calculated and transferred to the robot control [3].
153
BERGER, LEPRATTI For the development of the visualisation interface all restrictions, which have been mentioned in the previous chapters has been considered. Apart from the general boundary condition requests a specific file format and file content form are requested for the correctly data transfer to the robot control (see paragraph 4-A). The visualization surface consists of “formularies”, which can be called by the user partially in any order. An example of formulary for the selection of the surface area and for input of necessary correction values is represented in Figure 6.
5
Summary and Outlook
Casting operations for cylinder heads from aluminum alloys cause different geometric deviations. These can endanger the further machining and handling of the workpiece. It is necessary to maintain these deviations during automation solution based on industrial robot systems. The described system is designed for fast and reliable interaction between the human operator and the industrial robot controller. The interaction is based on an interactive programming system with which it is possible to realise simple and user-friendly corrections within deburring and dressing operations.
Figure 5: Communication between PC and robot control The structure of the programming system allows many possibilities of extension and further development. It allows also on-line data exchange of the PC-based modules to the robot controller and enables a mass storage. Likewise, the program protection of the robot controller can be managed within the network. By using a factory LAN, every robot can recall data from the network (e.g. number of items, down-time etc.). Further development is still necessary for recognition of deburring errors. Here it could be possible, if an optical recognition and monitoring of the deviation with automatic correction value transfer can take over this function. This additional station (separated from the deburring process) could monitor statistically the results and transmit necessary corrections of the system.
154
ADVANCED FACTORY AUTOMATION SYSTEM …OF AUTOMOTIVE ENGINE PARTS
Figure 6: Formulary for the selection of surface and values input
6
Acknowledgments
The project paper was a project collaboration with the DaimlerChrysler AG in Stuttgart (Germany). For the Project tests ABB Robots have been employed. The authors would like to thank the fruitful cooperation.
References [1] R. Wagner, Robotersysteme zum kraft-geführten Entgraten grobtolerierter Leichtmetallwerkstücke mit Fräswerkzeugen, Stuttgart University, Springer-Verlag, Berlin Heidelberg 1998. [2] D. Huck, Informationsverarbeitung in der Robotik, Springer-Verlag, 1997. [3] U. Berger, R. Lepratti, Intelligent PC-based User Control Interface for On-line Correction of Robot Programs in Proceedings of the 7th International Conference on Control, Automation, Robotics and Vision (ICRACV 2002), Singapore, December 2 - 5, 2002. [4] U. Berger, R. Lepratti, Intelligent Control System for the Automatic Correction of Deburring and Dressing Process with Industrial Robots, in Proceedings of 11th International Workshop on Robotics in Alpe-Adria-Danube, (Balatonfüred, Hungary), 2002, pp. 298-303.
About the Authors Ulrich Berger owns a Diploma degree of Mechanical Engineering from the University of Stuttgart and a Doctorate degree in Engineering Sciences (Dr.-Ing.) from the University of Bremen. His professional career embraces several responsible positions in the automotive sector and research institutions. Since 2001 he is full Professor at the University of Technology, Cottbus, Chair of Automation Engineering. His lecture topics cover innovative production automation technologies, control/automation theory and robot systems. Raffaello Lepratti studied at Politecnico di Milano in Italy and at the Brandenburg Technical University of Cottbus in Germany, where he obtains a Diploma degree of Electronic Engineering. Since 2001 he is scientific collaborator at the Brandenburg Technical University, Chair of Automation Technology. His research focuses on man-machine communication systems and new robot application systems in the automotive industry.
155
156
Petri Net-Based Optimization of Production Systems Szilvia Gyapay , Andr´as Pataricza , J´ozsef Sziray , Ferenc. Friedler Department of Measurement and Information Systems, Budapest University of Technology and Economics, Budapest, Hungary gyapay,pataric @mit.bme.hu Department of Informatics, Sz´echenyi University, Gy˜or, Hungary
[email protected] Department of Computer Science, University of Veszpr´em, Veszpr´em, Hungary
[email protected]
Abstract — Petri nets are widely used as an underlying framework for formalizing UML-based system models. Based on their precise semantics and easy-to-understand graphical representation, they are appropriate to model production systems together with their quantitative properties. The production of desired materials can be modeled as a reachability problem of its Petri net model. However, traditional reachability analysis techniques can result in a state space explosion, while numerical methods for invariant computations give either sufficient or necessary conditions. The current paper presents efficient semi-decision and optimization methods for the reachability problem based on Process Network Synthesis algorithms: Solution Structure Generation (SSG) and Accelerated Branch and Bound (ABB) algorithms. We show that the ABB algorithm can be used to solve scheduling problems efficiently and can be extended for other Petri net analysis. Obviously, the combined methodology can be used for a variety of application fields like IT systems, workflow optimization, etc., including production processes as a special case.
1 Introduction Due to the increasing complexity of IT systems, the formal verification and validation of system models are required. Petri nets provide one of the most efficient tools to model parallel processes and high-level abstraction. Petri nets as specification formalism are widely used to model systems, especially concurrent and distributed systems: by means of places and tokens within the places nets can specify concurrency, sequential composition, mutual exclusion and non-determinism. Since system models could be very large the traditional Petri nets analysis techniques such as reachability analysis based on the state graph can result in state space explosion.
157
GYAPAY, PATARICZA, SZIRAY, FRIEDLER
Frequently, the objective of the reachability analysis is only the proof of the nonexistence of an unwanted situation, for instance, a dangerous combination of the states. In such cases semidecisions try to prove the soundness of the system in an indirect way by showing that an unwanted situation would not fulfill a necessary condition at the system level. Obviously, if this proof is successful then it is an evidence of the non-existence of the unwanted case but if the proof is unsuccessful further analysis is needed. The main advantage of the semidecision-based techniques is that the necessary conditions are frequently easy to analyze abstractions of the original system behavior. Recently, a number of semidecision algorithms using the results of linear algebra and integer programming have been developed [1] [2] [3]. On the one hand, these numerical methods are much more efficient (often with polynomial runtime) than traditional reachability methods. On the other hand, sacrificing the preciness of analysis they provide only either sufficient or necessary conditions for the reachability problem [4]. In the related topic production optimization, efficient algorithms were elaborated for Process Network Synthesis problems based on the reformulation of the problem to produce desired products from given raw materials by resource allocation. Recently, first results of the process graph based algorithms have been exploited and applied in several fields of computer science (e.g., to the syndrome-decoding problem of diagnostics of multiprocessor systems [5]). Based on the state equation, a necessary condition for the reachability of a particular state in the state space of the Petri net is provided by linear algebraic techniques: a chord connecting the start and the end points of the required trajectory is computed without any details about the real trajectory. Thus the non-reachability of a system state could be decided: – if the state equation has no solution (there is no chord) then the state is not reachable – otherwise the state could be reachable. Formalizing the reachability problem of Petri nets as a mixed integer linear programming problem together with an appropriate target function (e.g., time or cost function), we propose a semidecision method based on Process Network Synthesis (PNS) algorithms. After a short introduction to Petri nets (Section 2) and Process Network Synthesis (Section 3), the theoretical relationship between Petri nets and P-graphs is discussed in Section 4. In Section 4.2, differences between Petri nets and PNS are described while Section 5 provides a Petri net example to demonstrate the adaptation of the Accelerated Branch and Bound algorithm. Finally, further research directions are discussed, i.e., the adaptability of PNS algorithms to other Petri net analysis.
2 Petri Nets and the Reachability Problem Before the introduction to the reachability problem, we give a short overview about Place/Transition nets. 2.1 Place/Transition nets where and are disjoint sets of defines the edges from places is a weight function on edges. Places
A P/T net (see Fig. 1) is a 4-tuple places and transitions, respectively. to transitions and conversely, while
158
PETRI NET-BASED OPTIMIZATION OF PRODUCTION SYSTEMS p5
p6
p7 tokens
place
transition
t3
t4
p3
p4
t1
t2
p1
p2
Figure 1: An example P/T net
can contain tokens and transitions can consume from and also produce tokens to places according to the weight function. are denoted by The input and output places or transitions of an element are and , respectively. In other words, a P/T net is a directed bipartite graph, where the two disjoint node types are places and transitions, respectively, connected by directed and weighted arcs. A marking is a -dimensional vector over naturals composed of the numbers of tokens in the corresponding places. A given marking represents the state of the net which can be changed by firing transitions. A transition can fire (is enabled) if each of its input places contains at least as many tokens as is specified by the weight function, i.e., . The firing of a transition removes the determined amount of tokens from the input places, and tokens are produced for the output places. 2.2 Reachability problem A sequence of firings describes the changes in the state of the Petri net along a particular trajectory. The reachability problem is to decide whether from an initial marking a given marking as a starting point there exists a legal trajectory to a target marking, i.e., whether there exists a firing sequence from the initial marking to the final marking denoted by . The transition vector of a firing sequence is a -dimensional vector over naturals composed of the number of the occurrences of each transition in the sequence. In case of a huge system model, the decision of the existence of such a trajectory by the construction of the state graph can result in state space explosion. The methods avoiding the state space explosion provide the transition vector describing the chord between the initial marking and the final marking. Thus these methods produce only semidecision methods because they deliver either the answer ’no’ or ’I do not know’ instead of a surely fireable trajectory. This way semideci-
159
GYAPAY, PATARICZA, SZIRAY, FRIEDLER
raw materials
E
F
3
operating units
C
4
D
materials
1
products
A
2
B
Figure 2: An example P-graph representing a PNS problem
sions are effective in excluding unwanted solutions. The main difference between the firing sequence completely describing trajectory and the transition vector generated by the semidecision algorithm is that the latter one describes only the number of occurrences of the individual transitions and neglects their order. The fireability of the resulted transition vectors is satisfied only in case of some specific Petri net subclasses, e.g., state machines. In case of general Petri nets, the output of the semidecision algorithms requires an additional filtering of the transition vectors.
3 Process Network Synthesis In chemical engineering, PNS algorithms are used to determine an optimal resource allocation and scheduling for the production of desired products from given raw materials. 3.1 Problem definition A PNS problem is represented by a so-called Process graph (shortly P-graph), which is a directed bipartite graph consisting of material containers and operating units. Operating units consume their input materials and produce their output materials while the directed arcs between materials and operating units symbolize the flow of materials in the network. In addition, costs are assigned to raw materials and operating units and balance equations for material production. The objective of a PNS problem is to find a solution structure of a minimal cost, i.e., a sub P–graph, which represents how final products can be efficiently synthesized from raw materials. In the P–graph of Fig. 2, products A and B are to be synthesized from raw materials E and F by the four operating units. 3.2 PNS algorithms By means of PNS algorithms, sufficient and necessary conditions for feasible solution structures are determined defining the entirely solution space. These requirements are given by five axioms [6] discussed shortly in the following describing the specific combinatorial properties required to have in order to be a feasible solution structure.
160
PETRI NET-BASED OPTIMIZATION OF PRODUCTION SYSTEMS
– if the state equation has no solution (there is no chord) then the state is not reachable – raw materials must not be produced – and all products have to be synthesized. The efficient algorithms for PNS problems [7] exploit these combinatorial properties. The solution space is reduced in polynomial time by the Maximal Structure Generation (MSG) algorithm removing the redundant operating units and materials surely not playing any role in a feasible solution. The Solution Structure Generation (SSG) algorithm generates all of the feasible shop recipes. Obviously, a combination of two shop recipes is a feasible solution as well. The subsequent Accelerated Branch and Bound algorithm (ABB) estimating the optimal solution can deal with combinations of complex shop recipes instead of individual operations thus drastically reducing the search space. This reduction can reach orders of magnitude even in the case of small scaled problems.
4 Unifying Concepts Obviously, the combination of the Petri net based paradigm of modeling complex systems with the efficiency of the PNS approach in resource allocation and scheduling optimization promises an important synergetic effect for a wide class of problems. Based on their semantic resemblance, a unified treatment can be defined for Petri nets and PNS problems. At first, the structural, then the semantic analogies are defined. 4.1 Joint features As it shown in the previous summary, the structural similarity between Petri nets and P–graphs is straightforward (Table 1). P–graph of a PNS problem material containers operating units raw materials final products cost of materials and products cost of operating units rate for operating units material quantities
Petri Nets places transitions corresponding places are marked at the initial marking corresponding places are marked at a final marking cost of places (time) e.g., firing time of transitions weight of incoming and outcoming edges of the corresponding transition number of tokens
Table 1: The assignment of PNS and Petri Nets elements In the Petri net terminology, the five axioms of the PNS problem define a partial reachability problem where the initial state corresponding to the marked states representing raw
161
GYAPAY, PATARICZA, SZIRAY, FRIEDLER
materials and the designated end state has to cover all and only the places corresponding to products. The restriction ‘partial reachability’ means that the final marking of all places except these specific output places does not care. Please note that in another interpretation if we use the notion of information and information processing steps instead of materials and physical operations the PNS problem can be applied for a large spectrum of partially observable IT systems. Our objective in merging Petri nets and PNS are the following ones. – On the one hand, if traditional Petri nets are enriched by numerical cost functions and their objective function to be optimized then we can use this methodology for searching the optimal solution of an arbitrary weighted reachability of the special structure described in Section 3.2. Please note, that for a wide class of Petri net related quantitative problems the solution complexity is a major limiting factor to build faithful models. For instance, stochastic Petri nets can be currently solved in state spaces roughly of the size of only while PNS can cope with essentially larger problems. – On the other hand, the extension of the traditional PNS approach by the feasible modeling power of Petri nets allows to model and solve highly complex production problems like those in logistics or in feasible manufacturing cells. The PNS algorithms can be used for Petri net reachability analysis in three steps. First, the non-existence of the maximal structure means that there exists no trajectory from the initial marking, i.e., the final marking is not reachable. Second, algorithm SSG provides every feasible solution structure as a set of their contained operating units, i.e., the results are represented as characteristic vectors of the contained transitions of the trajectories in Petri nets. Finally, algorithm ABB gives the optimal solution structure in form of a vector denoting the number of the use of the individual operating units, i.e., it provides the transition vector of a possible optimal trajectory of the corresponding Petri net. 4.2 Essential differences Thereupon its chemical use, PNS problems can contain some structures which are numerically untreatable in case of Petri nets. In the chemical production, a specific kind of materials is used: the catalyst. In Fig. 3, a P-graph and a Petri net of a catalyst are shown not carrying the same meaning. For instance, whenever the production of a compound requires a catalyst it can be produced and taken for the production where the cost of the catalyst container can be the cost of the catalyst production. Meanwhile, a token in the graphically identical Petri net can not be produced if it represents a state variable which is unmarked in the initial state. Obviously, cycles may frequentally contain siphons in Petri nets, i.e., such subnets, which remain unmarked if they do not contain a proper marking in the initial state. Therefore it is not assured that the optimal results determined by algorithm ABB are realizable, i.e., fireable from the initial marking. Due to the above facts, for an arbitrary Petri net the satisfaction of the five axioms is necessary but not sufficient to represent a feasible solution net for the (partial) reachability
162
PETRI NET-BASED OPTIMIZATION OF PRODUCTION SYSTEMS
raw raw
catalyst catalyst
op.unit
product
(a) Catalyst in Petri net
op. unit
product
(b) Catalyst in PNS
Figure 3: Catalyst in Petri net (left) and in PNS (right)
problem. For instance, a net containing a catalyst place that is not reachable from the initial marking can be contained by the result net computed by PNS algorithms. In the literature, some specific Petri net subclasses exist that always provide feasible solution nets in case of the satisfaction of the five axioms. Some of them are state machines and sound workflow nets [8]. In addition, a slight difference holds in the optimal solution computations. Algorithm ABB computes a solution represented by the contained operating units and it also defines the number of the produced materials that number can be even rational. On the contrary, transition vectors have to contain integers, i.e., the numbers of the firings. In the following, algorithm ABB is adapted to a scheduling problem represented by a Petri net.
5 An Example: Adaptation of ABB Algorithm Based on their similarity, algorithm ABB is adapted for an example Petri net. The model depicted in Fig. 4 shows the repair of computer types A and B. A mechanic can repair either one A or one B typed computer and even both of them AB at the same time. The task assignment and their repair take 1, 1, 2 and 2, 1, 3 time units, respectively. In the initial state (depicted in Fig. 4) there are three faulty A and three B typed computers, respectively. The objective is to find the optimal task allocation to the mechanics in order to repair the faulty computers (i.e., to reach the final state shown in Fig. 5). Thanks to a degree of freedom in the composition of the model we can introduce a constraint on the number of mechanics available to perform the repair job in a variety of forms. – In the traditional Petri net style of modeling we can represent the number of mechanics available by a proper initial marking of the net and the set of solutions can be estimated by changing this initial marking. Obviously, this approach suffers from the problem originating in the pure scalability of the model. This way, if the number of mechanics is changed then the reachability graph has to be repeatedly generated. (Its complexity can be slightly reduced only by identifying parts covered in the previous analysis. For instance, if we increase the number of the mechanics, all the
163
GYAPAY, PATARICZA, SZIRAY, FRIEDLER
faultyA
assign time=1
mech.
t4 under repair AB
under repairA
faultyB
assign time=1 t6
t5 assign time=2
under repairB
repair time=4 t2
repair time=2
t1
goodA
t3
repair time=1
goodB
Figure 4: An allocation problem: initial state
faultyA
assign time=1
t4 under repair AB
under repairA repair time=2
mech.
faultyB
t5 assign time=2
under repairB
repair time=4 t2
t1
goodA
assign time=1 t6
t3
repair time=1
goodB
Figure 5: An allocation problem: the state to reach
164
PETRI NET-BASED OPTIMIZATION OF PRODUCTION SYSTEMS
solutions estimated in the previous case remain feasible but the entire reachability graph has to be traversed in order to identify the new branches.) – In the pure Petri net styled modeling we can associate a cost to hiring a new mechanic. In this case, this associated cost will held to keep the number of mechanics involved low but their number will be still influenced by the cost factors assigned to the other parts operating on the production flow. – Finally, we can include a numeric constraint to the number of mechanics. This will confine the solution space in the optimization phase, moreover, it can be used to make cuts in the reachability graph. If these cuts are locked then the generation of the reachability tree for an increased number of mechanics can be done in an incremental way by extending the tree starting from the point where the cuts were made.
6 PNS algorithms in Other Petri Net Analysis Tools Based on their resemblance, PNS algorithms are appropriate not only for reachability analysis but can be also extended for other Petri net analysis problems. T-invariant In Petri net analysis, T-invariants play an important role. A T-invariant is a set of transitions (a transition vector) such that their firing do not change the state of the net. The invariants are determined by the solution of a linear equation system. The lack of such a method for T-invariant computing is that it does not assure the fireability of the result transition vector while the use of algorithm ABB can provide a fireable transition vector if the net is appropriate. Another point where the unified approach promises interesting results is the case when the production process underlies temporal constraints, i.e., if some production process has to precede another one. In Petri net domain, such problems occur frequently during validation and verification where the objective is to check the validity of a temporal constraint typically given in the form of a temporal logic expression. The typical approach discussed below is to construct such a product B u¨ chi net [9] automaton, which has as a solution space firing sequences satisfying both the logical constraints from the original structure and the temporal one. ¨ Buchi net In more details, B¨uchi net is a product automaton of a Petri net of the modeled system (it is required to be a 1-safe Petri net, i.e., for every place and reachable marking holds) and the B¨uchi automaton of the negation of an LTL formula to be checked for the system. If the constructed net accepts no words then the formula holds for the system. Since the automaton is a net itself having an initial state and accepting states it can be extended with source and sink transitions. If there is no T–invariant then the automaton is empty. T–invariant computation has a traditional solution algorithm introduced by Martinez and Silva [2]. The algorithm generates the basis containing the minimal T–invariants, i.e., other T–invariant can be easily computing from the basis elements. Since algorithm SSG generates every feasible solution network it is a redundant method. Based on the original method, algorithm SSG can be improved to provide the minimal feasible basis.
165
GYAPAY, PATARICZA, SZIRAY, FRIEDLER
7 UML-based Model Generation One main technical disadvantage of both the PNS approach and Petri nets that they require the construction of large or even extremely large models. This model construction is a main bottleneck both in the efficiency of the analysis end in the quality of the model. In order to avoid the troubles induced by the manual creation of large scale models, we plan to automatically generate these models from UML models [10, 11]. Our current analysis indicates that the standard UML profile intended to describe schedulability can be used without modifications for our problem field as well [12].
8 Conclusion The discussed combination of the efficient PNS algorithms with the modeling power of Petri nets provides an efficient tool to improve the analysis of UML models. Based on their graphical and semantical similarity, PNS algorithms can be adapted to Petri net analysis and evaluation. The current paper examined their unified treatment: joint and different features and further application possibilities of PNS methods to Petri net analysis problems.
Acknowledgement This work was supported by projects FKFP 0193/1999 and OTKA T038027.
References [1] J. Desel. Petrinetze, Lineare Algebra und lineare Programmierung, volume 26 of Teubner-Texte zur Informatik. B. G. Teubner Stuttgart-Leipzig, 1998. [2] M. Silva, E. Teurel, and J. M. Colom. Linear algebraic and linear programming techniques for the analysis of Place/Transition net systems. In G. Rozenberg W. Reisig, editor, Lectures on Petri Nets I:Basic Models, volume 1791 of LNCS, pages 309–373. Springer, 1998. [3] S. Melzer and J. Esparza. Checking system properties via integer programming. In European Symposium on Programming, pages 250–264, 1996. [4] A. Pataricza. Semi-decisions in the validation of dependable systems. In Proc. IEEE DSN’01, The IEEE International Conference on Dependable Systems and Networks, pages 114–115, 30.June– 4.July 2001. [5] B. Polg´ar, Sz. Nov´aki, A. Pataricza, and F.Friedler. A process-graph based formulation of the syndrome decoding problem. In IEEE DDECS, pages 267–272, 2001. [6] F. Friedler, K. Tarjan, Y. W. Huang, and L.T. Fan. Graph-theoretic approach to process synthesis: Axioms and theorems. Chemical Engineering Science, 47(8):1973–1988, 1992. [7] F. Friedler, J. B. Vajda, and L.T. Fan. Algorithmic approach to the integration of total flowsheet synthesis and waste minimization. In M. M. El-Halwagi and D. P. Petrides, editors, Pollution Prevention via Process and Product Modifications, volume 90 of AIChE Symposium Series, pages 86–87, 1995. [8] Wil van der Aalst. Structural characterizations of sound workflow nets. In Computing Science Reports 96/23, Eindhoven University of Technology, Eindhoven, 1996. http://citeseer.nj. nec.com/vanderaalst96structural.html. [9] J. Esparza and S. Melzer. Model checking LTL using constraint programming. In Proceedings of Application and Theory of Petri Nets, 1997. [10] A. Pataricza, G. Csert´an, G. Rom´an, V. Kereszt´ely, and J. Sziray. UML-based control of industrial processes. In IEEE International Conference on Intelligent Engineering Systems, pages 49–52, 2000.
166
PETRI NET-BASED OPTIMIZATION OF PRODUCTION SYSTEMS
[11] A. Pataricza, Gy. Csert´an, O. Dob´an, A. G´abor, and J. Sziray. Process modeling and optimization in UML. In IEEE International Conference on Intelligent Engineering Systems, 2001. [12] Real–Time UML Submission Consortium. Response to the OMG RFP for Schedulability, Performance, and Time, 1996. http://www.omg.org/cgi-bin/doc?ptc/2003-03-02.pdf.
About the Authors Szilvia Gyapay is a second year PhD student at the Department of Measurement and Information Systems, Budapest University of Technology and Economics. Her interests include operation research methods and Petri net reachability analysis. Andr´as Pataricza has a Diploma in Electrical Engineering from the Technical University of Budapest and Candidate of Technical Science from the Hungarian Academy of Sciences. His research interests include dependable systems and formal methods based verification and validation. J´ozsef Sziray has a Diploma in Electronic Engineering and PhD from the Technical University of Budapest. His research interests include test design for hardware and software systems, as well as verification and validation of software. Ferenc Friedler Ferenc Friedler, professor and head of Department of Computer Science, University of Veszpr´em. His research interests include process systems engineering and operations research.
167
168
Production Part Approval Process in Quality Management System Marianna Lendvay1, Attila L. Bencsik2 1
Institute of Microelectronic and Technology Budapest Polytechnic Faculty of Kandó Kálmán Electrical Engineering H-1084 Budapest, TavaszmezĘ u. 15-17.
[email protected] 2
Institute of Mechanical and System Engineering Budapest Polytechnic Faculty of Bánki Donát Mechanical Engineering H-1081 Budapest, Népszínház u. 8.
[email protected]
Abstract – The paper presents the Production Part Approval Process in the quality management system. It’s a system to acquire the purchaser’s approval, concerning certain item, production, material or service. The adoption of a quality management system should be a strategic decision of an organisation. The design and implementation of an organisation’s quality management system is influenced by varying needs, particular objectives, the products provided, the processes employed and the size and structure of the organisation. The quality management system requirement specified in the QS 9000 Requirement’s are complementary to requirements for products. The QS 9000 promotes the adoption of a process approach when developing, implementing and improving the effectiveness of a quality management system, to enhance customers satisfaction by meeting customer requirements.
1 Introduction Speaking about manufacturing and service, the word quality is frequently used. To satisfy their customers, the companies are trying to provide products and services conforming to the international standards of quality management and requirement system. In this paper we review the QS 9000 requirement system which is based on the ISO 9000 standard family. We give the details of one key document of the QS 9000, the production part of approval process. Approval of the means of production is indispensable for effective production, therefore this document is essential for every company using the QS 9000.
169
LENDVAY, BENCSIK
2 General Requirements Of Quality Management Systems To introduce the quality management system, the organisations should perform the following tasks: definitions of the processes required for implementation of the quality management system and that how these will be applied in the organisation, determination of the order and the interaction of these processes, definition of the criteria and methods which are essential for successful operation and control of these processes, procurement of resources and information sources needed for the processes and for their supervision, supervision, measurement, and analysis of these processes, as well as activities which are needed for the planned results and continuous development of the processes. The organisation should document its quality management system, therefore the documentation should contain a declaration of quality policy and of the quality aims, the handbook of quality management, the documented procedures required by the international standards, and the documents which the organisation needs for effective planning and control of its process. The top management should prove its commitments to the implementation and introduction of the quality control system as well as to the continuous development of the system by: calling the attention to the importance of compliance to the customer and law requirement defining the quality policy and quality aims evaluating the management providing the required resources The quality aims should define all related functions and levels of the organisation. They should be understandable and be in harmony with the quality policy. Resources needed for the quality aims should be defined and planned. Sphere of authorities and responsibilities as well as their functions with their functions should be defined and communicated. A quality management manual should be made including: application field of the quality management system, documented procedures formed in the system or their references description of the interactions between the processes of the quality management system. To ensure continuous readiness, operability and efficiency for the system, the top management should examine the quality management system at planned time intervals. The examination should include:
170
PRODUCTION PART APPROVAL PROCESS IN QUALITY MANAGEMENT SYSTEM
results of audits, customer indications, outcome of the process, product suitability, preventive and corrective activities, activities required by earlier examinations of the management, alterations which can influence the quality system
3 Elements of the QS 9000 Requirement System The QS 9000 is a system of quality requirements that aims customer needs in a more effective way than earlier. It keeps the requirements of the ISO 9000 standard series; at the same time it surpasses them. It has very definitive requirement to the internal system of sub-contractors of automotive industry. It demands a uniform internal organisation for all the sub-contractors and suppliers. In an independent outer audit system it suggests examination of the process of the quality management system. Based on the documentation system of the company and on the standard requirements, an authorised certification organisation controls the suitability of the process and the methods in the practice. In case of suitability, the organisation issues a certification and later it supervises the status of the system periodically. Because the quality improvement should be already ensured at the supplier systems, therefore the following groups are involved it: Suppliers providing base material or auxiliary material for manufacturing. Firms, as subcontractors, providing direct services to the manufacturer. The requirement system includes the following elements: 1. Top management responsibility 2. Quality management system 3. Contract review 4. Controlling technical planning 5. Processing documents and data 6. Procurement 7. Processing customer supplied product 8. Product identification and traceability 9. In-process control 10. Supervision and examination 11. Supervision of controlling, measuring and testing equipment 12. Inspection and test status 13. Processing non-conforming product 14. Corrective and preventive activity 15. Handling, storage, packaging, maintenance and delivery 16. Processing records of quality policy 17. Internal audits of quality policy 18. Training 19. Customer service
171
LENDVAY, BENCSIK 20. Statistical methods 21. PPAP - Production Part Approval Process 22. APQP - Advanced Product Quality Planning 23. QSA - Quality System Assessment 24. MSA Measurement System Analysis
4 Production Part Approval Process /PPAP/ The PPAP defines the general requirements needed for the part approval. It includes the production materials and materials in bulk. Its aim is to get the supplier to understand well all the planning and manufacturing regulations and specific requirements of the customer, and by this, making the process able to produce product suitable to the requirement at the given intensity of production. The method should be applied for outer and inner supplier of production materials in bulk and for production and service parts. For materials in bulk it is only needed if the customer requires it. Suppliers of production and service parts should follow the PPAP, unless the customer gives up his right to this in written form. I the following cases, from the product approval organisation of the customer, the supplier should get a total approval: 1. At introducing a new part or product (e.g. new part, material, colour) 2. At repair of an error of part delivered earlier. 3. At changes to the production, to the product, in the design record, specification or materials. 4. In all other cases required by the customer. 4.1 The PPAP requirements: For part approval, the parts should be sampled from a characteristic production cycle. Unless the customer orders another schedule, this cycle should be on an interval between one and eight hours and should result at least 300 pieces specific products in succession. Related to the production cycle, the tooling, product measurements, methods, operating personnel and the environment, this cycle should equal to the production cycle. Each discrete process of the production and each product coming from separate position should be measured and controlled. In case of materials in bulk, no material quantity is specified and the sample should be delivered in steady state. The supplier should meet all specified requirement. In case of any result out of specification, the supplier can not deliver the part. The supplier should do his best to fulfil the planning specification. It this is not possible, he should meet the customer to get the proper repair processes. In accordance wit the PPAP, the inspections and the examinations should be made by an approved laboratory. The lab report should include the name of the lab doing the examination, the dates of the examinations and the used system of standards. The test report should not contain statement of general validity. In case of special agreement, the examination can be made in the customer's lab. The supplier should have the required records and items for each part or part family, which should be accessible to the customer during the PPAP. In case of alteration to the PPAP requirement, the supplier should get a previous approval.
172
PRODUCTION PART APPROVAL PROCESS IN QUALITY MANAGEMENT SYSTEM 4.2 Needed documents: 1. Design records The supplier should have all the design records related to the products, its components and details. In case of electronic design record, hard copy of the design record is also needed. Only one design record is required to the products, parts or components. 2. Documents of changed manufacturing The supplier should have all approved documents of changed manufacturing approved and introduced to the manufacturing but not filed to the design record of changed manufacturing 3. Approval for manufacturing (if required) If the design record prescribes it, the supplier should have an customer's approval for manufacturing. 4. Design error, analysis of method and effect (DFMEA) – in the case of supplier responsibility for the design The supplier should have the DFMEA for the parts and materials. This analysis should conform to the requirements of QS 9000. 5. Process charts A process chart, made by the supplier, is required, in addition that it fulfils the demands of the customer, it describes clearly and properly the steps and succession of production processes. 6. Process error, method and effect analyses (PFMEA) The supplier should have a PFMEA fulfilling the requirement of the QS 9000. In case of processes producing similar parts of the same manufacture family, the same design or process design error, analysis of method and effect can be used. 7. Results of the dimension control The supplier should have made the dimension controls required in the control plan and should prove their suitability. The measurement should cover all processes of the production, the dates of the design records, the number of modifications and the documents of changed manufacturing. Moreover, as a pattern, an examined part should be provided. In addition, the number of modifications, the dates of drafting, the name of the supplier, the number of part should be fixed on all supplementary documents (e.g. on supplementary drawings). These should be enclosed to the quantitative results, in accordance to the quantitative results, in accordance with the table of preservation/filing requirement. The dimensions, characteristics given in the design record or in the control plan, together with the actual results, can be listed properly in the form of results of the dimension controls. 8. Results of the material examination and the compliance test I. Records of the material examination The supplier should have examined every base material listed in the design record or in the control plan with chemical, physical or metallurgical specifications. The examined quantity, the result of the examination, the modification number and the date of examination, from the list of approved subcontractors, the name and code of subcontractors supplying the material should be given.
173
LENDVAY, BENCSIK II. Records of output examinations. These should be done on every base material on which requirement of output or function is defined by the design record or the control plan. The report should contain the modification number and the date of the design record for the examined part, the approved document of changed manufacturing, and the date of examination. 9. Examination of the initial processes I. General requirements The ability of initial process should be defined in such a way that it can be acceptable for all special characteristics defined by the supplier or the customer. To reveal the effects of the measurement errors to the measurement, an analysis of the measurement system should be made. The aim of the requirement is to define whether the process is capable to output a product proper for the customer requirement. The examination of the initial process aims the variables and not the characteristic data. The examinations of the initial process are of short time and they can not foreshadow the changes of the work force, equipment, measurement system. With customer's approval, requirement of initial data can be replaced by the results of long time taken from same or similar processes. II. Quality indicators The examination of the initial process should be summarised by ability or output indicators. The Cpk – is an indicator of the ability for stable operation. The assessment of sigma depends on the spreading in the sub-group (R/d2, S/c4). The Ppk is an output indicator, and in this case the sigma assessment is based on total spreading. Short time examinations are: aim of the initial examination is to understand the operation changes and not to form an indicator. If sufficient data volume is available to assemble an control card (at least 100 unique samples), then the Cpk should be computed for a stabile operation. For unstable processes, in accordance with the specification, use of Ppk with predictable pattern is suggested. If the data volume is not sufficient for the examination, the customer's part approval organisation should be informed. III. Acceptance criteria for the initial examinations For the processes seemingly stabile, the following criteria should be applied: Indicator value > 1,67
The process conforms to the customer requirements, using the control plan, the process can be started
1,33 d Indicator value d1,67
The process can be acceptable at present, but may require corrections. It is useful to survey the results of the examinations and, if required, to change the control plan.
Indicator value < 1,33
The process fails to perform the acceptance criteria and needs modifications.
IV. Unstable processes If the customer-supplier does not accept the process, the causes of difference, if it is possible, are to be eliminated before filing the PPAP. The supplier should inform the customer about the unstable process and file a plan of corrective action.
174
PRODUCTION PART APPROVAL PROCESS IN QUALITY MANAGEMENT SYSTEM V. Operations with one-sided tolerance or with non-linear distribution For tolerances of this type, the possible acceptance criteria should be defined together with the customer. These criteria may be an indicator of other type or data processing method. It is worth attempting to find the causes of non-normal distribution and following the changes. VI. Strategy for the case of non-satisfied acceptance criteria For the cases of non-repairable process or no unperformable time limit of the PPAP filing date, the supplier should meet the customer for approval a corrective action and a modified control plan. The scattering should be lowering till the Ppk or the Cpk reaches or exceeds the value 1.33, or the customer gives his contribution. 10. Analysis of measurement system (MSA) examinations The analysis of measurement system examinations should have done at every new or modified measurement equipment. 11. Qualified laboratory documentation The supplier should prove that the employed laboratories conform with the QS 9000. 12. Control plan The supplier should have a control plan, in accordance with the QS 9000, containing every controls used for process control. 13. Part filing certificate (PSW) Without a customer's requirement, a distinct PSW should be filed for every part. The gained information from the required measurements and examinations should be given in these. If the parts come from more tools, the supplier has to evaluate of dimension in every category: The tools, templates should be identified in the series of PSW Form/Pattern/Production process or in a document enclosed to the PSW. The supplier should control the conformity to the requirements of every measurement and results of examination and whether all documents are available to the customer. If the customer requires that, and it is intelligible, the PSW can be filed electronically. Without a customer's requirement, the supplier should record the part weight, as it is written in the PSW in kg and with accuracy of four decades (ten thousandth part). The weight data is without the weight of transport protective material, auxiliary material and packaging. The product weight is defined by the average weight of ten products selected by chance. 14. Approval report of the outer appearance (AAR) If the design record needs appearance requirement, then filing of the approval report of the outer appearance is needed. This should give the required specification. To get the disposition, sample pieces should be filed to the organisations required by the customer. In general, the AAR can be drafted for parts having colour, granularity or surface quality. 15. Control list of requirement for material in bulk The control list of requirement for material in bulk should be approved together by the supplier and the customer. Without a specific request of the customer request (NR), all defined requirement should be fulfilled. The customer may define other requirements.
175
LENDVAY, BENCSIK Process chart
P C
V P
V
K
K U
V
D
V
K
V
V
D
V
D: Decide; V: Execution; K: Collaborate; I: Information;
PC: PPAP-Co-ordinate; VP: Product management; KU: Customet
176
I
I
D
PRODUCTION PART APPROVAL PROCESS IN QUALITY MANAGEMENT SYSTEM 16. Sample parts In accordance with the customer's needs and the file application, a sample product should be provided. 17. Master sample The supplier should store a master sample from the period of approval. This should be stored until a new master sample is approved by the customer, or the sample is used for design record or in the control plan. 18. Auxiliary instrument of control If required, at the time of PPAP filing, the supplier should provide the customer with an auxiliary instrument of control for the part specific assembling. It must be stated, that the auxiliary instrument conforms to the requirements of part dimensions. Every modification of auxiliary instrument of control should be recorded. These instruments should be treated as active parts, therefore maintenance of the full life span of the part should be provided. The auxiliary instrument of control can include the fixings, measurements, models, templates, which are specific to the product. 19. Customer specific requirements In connection with every customer specific requirements, records of suitability should be made.
5 Making PPAP for a Given Product The following process chart shows the application of PPAP method for a given product (cable strand). If the part approval report is approved by the customer, the product can be manufactured with the required quantity.
References [1] QS-9000 Quality System Requirements, - Third Edition, Chrysler Corporation, Ford Motor Company, General Motors Corporation, 1999. [2] Vincze, Pál: Production Part Approval Process for a Concrete Product, Diploma Work, BMF – KVK, Budapest, 2000. /Consultant: dr. Lendvay, Marianna/ [3] Quality Managament Systems. Requirements (ISO 9001 : 2001) [4] Kovács, Olivér: Production Part Approval Process for a Concrete Product, Diploma Work, BMF – KVK, Budapest, 2001. /Consultant: dr. Lendvay, Marianna/
About the Authors Marianna Lendvay received a Master’s degree in mechanical engineering and a doctorial degree in technical sciences both from Technical University of Budapest in the years 1977 and 1989, respectively. Her research interests include technical reliability, quality assurance, industrial design. Attila L. Bencsik received a Master’s degree in electrical engineering and a doctorial degree in technical sciences both from Technical University of Budapest in the years 1970 and 1990, respectively. His research fields are quality management systems, technical diagnostic for mechanical systems, robotics and mechatronics.
177
178
Application of Product Model in Internet Based Robot Control László Horváth, Imre. J. Rudas John von Neumann Faculty of Informatics Budapest Polytechnic, Budapest, Hungary
[email protected] [email protected]
Abstract – In this paper the authors provide a discussion on integration product modeling with robot control environments in order to enhance the utilization of geometric and other product and production equipment related model descriptions in robotics. Growing significance of robots in highly flexible manufacturing systems motivated research in the related methodology. Difficulties at reproduction of modeled product geometry at its applications resulted in growing importance of on line real time communication between a centralized product modeling and several model applications. The reported research concentrates on creation and application of model data information understandable by robot controls, on communication of model data with robot environments through the Internet, and finally on some related telerobotics issues. It covers one of the actual problem complexes in integration of engineering modeling with its shop floor level applications. Systems integration, data model, data communication and model processing have been investigated. Paper introduces the modeling environment considered taking into account the robot control aspect. Following this, key issues regarding robot tasks and their shape model based control are explained. Then an approach to interactive application of Internet based telerobotics for product model driven control of robots is outlined. Finally, possibilities for integration of remote robot control applications with product modeling environments are discussed.
1
Introduction
Concept of product model has been developed to establish models for description of all product-related aspects. Comprehensive, sophisticated, reference model based description of product information can serve any product related engineering activities including robotics. Advanced integrated product design and manufacturing rely upon this technology increasingly. Product modeling was developed into a sophisticated technology during last ten years. Application of robots and robot like equipment is growing in manufacturing and other product model related areas. Robotics is an inherently sophisticated technology.
179
HORVÁTH, RUDAS Control and programming of robots have become sophisticated but waiting for their integration with product modeling is still on. The authors would like to produce some contribution to advancements in this area of importance. The utmost purpose of research in this field is integration of three hi-tech areas, namely engineering modeling, teleoperation of robots and Internet technology in a single globalized system. Human ideas about products during design and development of a product are frequently changed even if the distance between sites of product modeling and robot intensive manufacturing is large. Application of a product model that has been created on a remote modeling system can be relied on one of the following three concepts. The first concept is the troublesome model data exchange. It requires a modeling system on the model application side that is able to understand and reconstruct the model according the original model information and design intent. The second concept is application of agents. This is an advanced and appropriate concept but it is uncomfortable to apply at the present day continuous development of products where product design changes frequently. The third concept is teleoperation of the robot from the original modeling system in which the model has been created. This is the trend for future model applications therefore the authors would like to contribute to implementations of this concept. Researchers are working on several aspects of the reported work. Recently, intelligent autonomous robots are based a lot of advanced methods for programming and motion control [1], [2]. Knowledge based intelligent methods as adaptive neurofuzzy inference [3] can be applied to assist control processes. Multiple armed and cooperating robots need intelligent methods for motion coordination [4], [5]. Previous activities of the authors in this area are modeling of manufacturing process and human intent [6]. The reported research is also connected to an earlier research on robot control [7]. This paper is about model creation, handling and communication aspects of application of advanced product modeling in robotics. Distinguished attention is devoted to shape models of mechanical parts but other partial model components of the product model defined by STEP, ISO 10303 are of equal importance. Paper introduces the modeling environment considered taking into account the robot control aspect. Following this key issues regarding robot tasks and their shape model based controls are explained. Then an approach to interactive application of Internet based telerobotics for product model driven control of robots is outlined. Finally, possibilities for integration of remote robot control applications with product modeling environments are discussed.
2
Product model information for robot control
Models for description of parts, form features, sequences of part shape modifications, assembly relationships and manufacturing processes are the most important structural units of models of mechanical systems from the point of view of robotics. The related models and their associativities can be followed in Figure 1. Figure 1 outlines an up-to-date product model where associativities connect model entities and other associativities can be defined to connect this modeling environment with robot modeling environments.
180
APPLICATION OF PRODUCT MODEL IN INTERNET BASED ROBOT CONTROL A part model involves curves and surfaces that carry useful geometric information for robot control. Topology describes place of these geometric entities in the modeled boundary structure of the part shape. Application oriented shape aspects are represented in this system as form features. An assembly model is created by topology driven relating geometric entities on the matched parts. Part model
Assembly model
Transformation
Structure
Geometry
Part model instances
Topology
Relationships
Form features
Fastening method
Attributes
Application oriented product model instance
Figure 1: Robotics related entities in typical product models Control of a robot is geometry centered and uses information described by part geometry. Topology can be used to know where a geometric entity is in the modeled boundary structure. Figure 2/a illustrates a part that is in the working envelope of a robot. Curve C1 that lies in surface S1 is to be followed by a robot trajectory. Following this Part V1 is placed in position on the base part by using of three relationships r1-r3. Avoiding obstruct V2 should be taken into account at the design of robot trajectory. These are two typical operations at applications of robots.
C1 S1
follow curve C1 on surface S1
V1 a)
b)
r3 r2
r1 V2
V2 V1
c)
pick V1 move V1, avoid obstruct V2 place V1 according to assembly relationships
d)
Figure 2: Part geometry for robot control
181
HORVÁTH, RUDAS Non-uniform rational B-spline curve and surface descriptions are appropriate to any shape, from the straight line to free form curve, and from the flat surface to the free form surface. It is often allowed to simplify the curve geometry to linear. Application of this concept result polyhedral part shape description where large quantity of small flat surfaces is applied to approximate of the shape. Robot operations need input information for the task of robot, form features on the part to be gripped, shape of obstacles in the working envelope and geometric information for path control depending on actual task of the robot. At the same time pick and place robots need not geometric information for the purpose of path control, painting or welding robots need not information about gripping of the part. Part geometry changes during machining operations so that actual shape of the part should be communicated using machining process model information for material removals. This information is defined by form feature driven modeling of shape modifications of the part by machining and allowance values. Despite their dedicated modules for planning of robot control, present day industrial modeling systems do not offer appropriate tools for integration of part modeling and manufacturing process modeling with robot control systems on a level necessary for a fully integrated system.
3
Robot process model
Software and human sources of product model information are within product design organizations, separate or remote from robot environments. The alternative of on-site reproduction of these capabilities is generally not available at the robot station so that they should be got by remote activity. Application of telerobotics must be considered. Advancements in Internet and other related technologies give a new possibility for cooperation of product modeling and robot control. Perhaps the most important feature of these systems is that human performance can be utilized through network. The authors investigated the modeling background of remote activities in the field of control of engineering devices.
Model of the robot process
Robot process
Part models Assembly models
Task 1
Robot model
Operation 1
Models of objects in the environment of the model
Action 1 Reflex 1
Related product models
Active robot system
Model of the application process (e.g. machining. welding, painting).
Figure 3: Structure of the robot process model and its product model connections
182
APPLICATION OF PRODUCT MODEL IN INTERNET BASED ROBOT CONTROL A multi-layered robot process model structure and its relationships with product model entities have been proposed by the authors (Figure 3). Tasks, operations, actions and reflexes are on the levels of this model. This follows the command structure described in [8]. A robot can manipulate different objects described together with the manipulation strategy within a task. Operation is related to a single object. Operation consists of independently executed actions. A reflex means direct transformation of current sensor data into motion.
4
Internet based solution for telerobotics
Future anticipated capacity of Internet makes it to be suitable as remote communications medium for robot teleoperation. Software at a host directs the motions of a robot connected to another host. A main drawback of this solution is that Internet produces non-deterministic communication time delay between hosts. Moreover, time delay varies with the amount of information to be transmitted. Considering Internet, there are two alternative solutions for product model based remote control. The host, from which remote operation is done, has direct access to all necessary model data. It can transmit model data for processing to a remote model application system or it processes the model information into machine independent form of robot control data. The authors prefer the second solution. Approach of the authors emphasizes geometric model driven nature of task, operation and action. A task is a sequence of object manipulations, for example, at assembly, part feeding or welding. Geometric model information is required for objects to be manipulated. This information can be used at recognition of type and shape of objects, programming grippers, calculation targets and trajectories, analysis of collision, etc. A tipical simple operation is pick and place of parts. This operation can involve actions involving positioning and orientation of parts, moving parts along paths and placing them in contact. Geometric model information is necessary for environmental objets such as parts to be welded and obstacles within the working envelope of the robot. Path to manipulate an object to a goal location can be predefined or real time generated by using of geometric model data. Mobile robots require geometric information about their environment. At the same time autonomous robots can process their own visual data about the environment around their path. Telerobotics is supposed to be coupled with autonomous robotics in the reported work. This means remote control of intelligent robots. According to the intelligence of the remotely operated system, operating mode of a telerobot can be [9] direct continuous control, shared continuous control, discrete command control, supervisory control and learning control. We share this idea at modeling of robot control. The main purpose of teleoperation is sending task-related information including product model data to intelligent remotely controlled robots. At the same time some results of human decisions are communicated too. Remote control uses information feedback from the robot control. Safe operation can be achieved following this approach. Application of product models is equally important at programming, teleoperation and teleinspection of robots. The robot control system considered by the authors can be followed on Figure 4. Because teleoperation is driven by geometry of parts both in the product and the robot station, the model complex has components on both sides.
183
HORVÁTH, RUDAS One could think that the objective is a fully automated system. Consequently, remote inspection and monitoring using a vision system as used in manually controlled teleoperation are not necessary. This is a misunderstanding the real world robot control tasks. Human communication can not be omitted because human interactions are necessary. Inspections and 'dry run' tests, for example, are interactive activities. Manually controlled robot operations are necessary during manufacturing operations. In the every day practice a mix of human and model driven controls is applied. Effective user interface and visual navigation are inevitable in order to establish effective interactivity. The second way of the communication between the product modeling and the robot control computer is about characteristic shape information gained from processing of video from the robot workspace. This information can be used for calculation of actual and real position information. Recognition of 3D curved and other objects is of basic importance. At the same time robot movements can be viewed using controls as zoom, image quality, and size. This requires appropriate speed of data transfer. Consequently, control is done by using of product model data, while a feedback is established on the basis of information on characteristic elements extracted from pictures. Teleoperation of robots is considered to establish over the World Wide Web. Telerobotics server processes requests of the teleoperating client. Appropriate configuration and operation of a Web server are basic requirements. Web users must be able to control the robot remotely. Experiments on telerobotics to reveal some basic characteristics of the control and the related communications under given circumstances can be conducted by using of telerobotics interface to simulated robots.
Human command driven control information to the robot
Product geometry driven control information to the robot Processing of product model
Processing of camera geometry
Robot control unit Control information
Autonomous intelligent robot
Internet connection Simplified work space geometry
Geometric processing
Camera
Robot station
Product model
Remote control station
Figure 4: The process of teleoperation of a robot
5
Product model driven remote control of robots
Part modeling, manufacturing process modeling, production equipment modeling, data and human communication modeling and robot control modeling use common framework, data base, user interface and other resources for these activities in integrated modeling systems. Remote elements of a complex system for the above outlined and other related activities as telerobotics are integrated by the application of Internet technology including appropriate protocols as TCP/IP.
184
APPLICATION OF PRODUCT MODEL IN INTERNET BASED ROBOT CONTROL Computer resources are distributed amongst product design sites, production planning sites, job shop level and outside robot control units. They may be installed in different buildings, in different cities, in different countries or even in different continents. Significance of teleoperation is growing because of the trend for enlarged distances between cooperating industrial organizations. Computing activities constituting an actual robot related complex task are distributed amongst these resources. The applied computer model can be considered as a special production model with a lot of associativity and constraint definitions. One of main benefits of the above outlined approach is processing model data in its original creating system. Reconstruction of the exchanged model by a modeling system other than the original modeling system, with lower modeling capabilities resulting deterioration of the computer descriptions is eliminated. This solution also eliminates problems associated with entity conversions of the conventional model data translation between different modeling systems. Another advantage of the method is that original human creator of the model can be present at its application. Finally, it is generally impossible to make available as highly flexible and enough sophisticated modeling system at normal robot applications as available at product development environments. The modeling environment handles all information and software tools for simulation including description and analysis of kinematics as well as advanced graphics.
6
Conclusions
Based on a discussion of the related problem complex, an approach and methodology have been outlined in this paper. The related research of the authors is motivated by advancements in technologies applied by Internet based telerobotics. These technologies have been developed to a level, where widespread industrial application is realty. The authors investigated some aspects of product model driven teleoperation of robots on the basis of their earlier researches in product and production modeling as well as robot control. The final objective is to establish a robot control that utilizes advancements in product modeling and information from product models existing in engineering design environments. The main contribution by the authors is about integration of different modeling processes. The authors offered a robot process model together with associative integration of robot control systems with product modeling systems. This paper outlined the problem complex and discussed some details of the related modeling. Intelligent autonomous robot system and mixed human and model driven control system with feedback are assumed. Wide range of potential applications of the method involve manufacturing such as machining, assembly, welding and painting, working in geometrically modeled hazardous environment as well as product development related robot experiments.
Acknowledgments The authors gratefully acknowledge the grant provided by the OTKA Fund for Research of the Hungarian Government. Project number is T 026090 and T 037304.
References [1] Jurgen Gulder, Vadim L. Utkin, Rudolf Bauer. A three Layered Hierarchical Path Control System for Mobile Robots, Algorithms and Experiments, Robotics and Autonomous Systems, No. 14, pp 133-147, 1995.
185
HORVÁTH, RUDAS [2] S. S. Lyengar, A. Elfes. Autonomous Mobile Robots: Perception, Mapping and navigation, IEEE Computer Society Press, 1991 [3] M. Onder Efe, Okyay Kaynak, Bogdan M. Wilamowski. Creating a Sliding Mode in a Motion Control System by Adopting a Dynamic Defuzzification Strategy in an Adaptive Neuro Fuzzy Inference System, In Proceedings of the 2000 26th Annual Conference of the IEEE Industrial Electronics Society, Nagoya, Aichi, Japan, IEEE, Nagoya, Aichi, Japan, pp. 894-899, 2000. [4] Antal K. Bejczy, Tzyh-Jong Tarn. Redundancy in Robotics: Connected Robot arms as Redundant Systems, In Proceedings of INES'2000, 2000 IEEE International Conference on Intelligent Engineering Systems, Ljubljana, Slovenia, 2000, pp 3-10, 2000. [5] Yasuhisa Hasegawa, Toshio Fukuda. Motion Coordination of Behavior-based Controller for Brachiation Robot, In Proceedings of the 1999 IEEE International Conference on Systems, Man, and Cybernetic, Human Communication and Cybernetics, IEEE, Tokyo, VolumeVol. 6, 896-901, 1999. [6] L. Horváth, I. J. Rudas. Intelligent Computer Methods for Modeling of Manufacturing Processes and Human Intent, In Journal of Advanced Computational Intelligence, Vol. 20, No. 3. pp. 111-119, 1998 [7] J. K. Tar, K. Kozlowski, I. J. Rudas, L. Horváth. The Use of Truncated Joint Velocities and Simple Uniformized Procedures in an Adaptive Control of Mechanical Devices, In Proceedings of the First Workshop on Robot Motion and Control (ROMOCO’99), Kiekrz, Poland, pp. 129-134, 1999. [8] Jörg Vogel, Bernhard Brunner, Klaus Landzettel, Gerd Hirzinger. Operate a Robot over the Internet!, http://www.robotic.dlr.de/VRML/Rotex/index.html, 2000. [9] Ken Taylor, Barney Dalton. Issues in Internet Telerobotics, In Proceedings of the International Conference on Field and Service Robotics, Canberra, Australia, 1997.
About the Authors László Horváth received his Master’s degree in Engineering from the Technical University of Budapest. He received his Ph.D. degree in Applied Intelligent Computing from the Hungarian Academy of Science in 1993. His research focuses on Modeling of Design Intent, Development of Highly Integrated and Environment Adaptive Objects for Engineering Modeling and Robot Modeling for Product Model Based Application of Industrial Robots. He is active as the Vice Dean for research of John von Neumann Faculty of Informatics, Budapest Polytechnic and as a professor in intelligent engineering modeling. He is a Senior Member of IEEE. Imre J. Rudas received his Master’s Degree in Mathematics from the Eötvös Loránd University, Budapest while the Ph.D. in Robotics from the Hungarian Academy of Sciences in 1987. His present areas of research activity are: Robot Control, Soft Computing, Computed Aided Process Planning, Fuzzy Control and Fuzzy Sets. He is active as the Vice President of Budapest Polytechnic and as a professor and Head of Department of Mathematical and Computational Sciences. He is a Fellow of IEEE, Administrative Committee member of the industrial Electronics Society, member of the International Board of the Robotics & Automation Society.
186
Chapter 4 Data Mining and Learning Systems
Representing Directed and Weighted Graphs and Their Properties in a Relational Spatial Database Model. Ágnes B. Novák1, Zsolt Tuza2 1
Department of Mathematics and Computer Sciences Budapest Polytechnic, Budapest, Hungary
[email protected] 2
Computer and Automation Institute Hungarian Academy of Sciences, Budapest, Hungary
[email protected]
Abstract — The spatial database model described here is a slightly modified version of the PLA database [3]. In this paper we extend the PLA model for the purpose of representing directed and weighted graphs. In this new model, named PLAX, first we give the constraints for a PLAX database, representing an Eulerian directed graph. Then we modify the algorithm for Eulerian circuits and path already worked out in [6], using the original PLA model. This new algortihm for PLAX is illustrated by a worked-out example.
1 Introduction In this paper we continue the systematic investigation we worked out in [7], [5], [6] and [8]. The PLA-Model was introduced by the US Bureau of the Census for representing topological properties of geographic data (maps) [1]. The redundancy, the necessary relations for describing the topology of a spatial object, and the reconstruction of the original object in the PLA model are investigated in [5]. In [7] we concentrated on checking the connectivity and 2-connectivity of the graph. Constraints for bipartite graph and Eulerian circuits were given in [6]. The results are reformulated in new algorithms in [8]. The conceptual model of the PLA-Database is the relational model. The structure of it is reviewed in the next section. Also there we introduce a possible extension for storing directed and weighted graphs. In Section 3. integrity constraints are given for the PLAX database representing an Eulerian graph. We give also the modified algorithm for checking Eulerian circuit and path. Finally, we summarize the results and mention some open questions in the Conclusion.
189
B. NOVÁK, TUZA
2 The spatial database model PLA and its extension, PLAX In this section we briefly review the PLA-Model. One can find a detailed explanation concerning the background of this and other spatial models in [3], [5] and [7]. The aim of this model is the representation of the topology of a „typical” map - or, equivalently, a plane graph together with its regions (faces) - in terms of relational databases. In the original context of the PLA-Model, the geometric entities are referred as kcells (k=0,1,2), naming the dimension k of the entity in question. Instead of these we shall refer to them simply by their original, geometric names. In order to unify terminology we shall use the terms point, line (for undirected, arc for directed) and area for a vertex, edge and face. 2.1 The PLA-Database In this section we give the scheme of the database. Here we omit the set of conditions, which restricts the type of graphs to the 2-connected planar graphs. There is a detailed discussion in [7]. Here we recall the necessary parts of the description of the PLA-Model. In this paper we allow any type of graphs. However, the model corresponds to the first four conditions in the sense that each condition determines a relation, so the scheme of the relational database is DB(R1, R2, R3, R4) where the schemes of the relations R1, R2, R3, R4 are as follows: (i) R1(LINE, FROM, TO) indicating the name, the „starting” point, and the „end” point of the line. The objects stored in the database are undirected, but in order to obtain a unique representation of the areas there is a need for some orientation. In the sequel, to avoid ambiguity, we suppose that the points are labelled with natural numbers, and the starting point of each line is always the vertex labelled with the smaller number. (ii) R2(LINE, LEFT, RIGHT), where the attributes correspond to the name of the line, the name of the area on left side and the name of the area on the right side of the line. The right and left sides are determined in accordance with the previous relation, that is, if the line e goes from point i to point j (i.e., i<j is assumed) and its bordering areas are x and y, as in Figure 1. below, then x is on the left and y is on the right side of the line e. x i
j
y
Figure 1: The left (x) and right (y) sides of an edge (iii) R3(AREA, POINT, LINE, LABEL), where the first attribute is the name of the area whose neighborhood is represented in this relation. It is assumed that every area is surrounded by an alternating cycle of lines and areas. So the second attribute means the name of the point, the third one is the name of the line on the border of the area (satisfying the condition given next), and the last attribute is the serial number with respect to the area named in the first attribute. The labels are consistent with the orientation, that is, the
190
REPRESENTING DIRECTED AND WEIGHTED GRAPHS... enumeration of points and lines in the cycle corresponds to the clockwise orientation, except for the infinite area Af . We propose to assume that, in case of the infinite area, the orientation is counterclockwise when viewed from the interior of the area - that is, clockwise with respect to the region surrounded by the boundary cycle. (This convention is necessary for recognising Af, it applies in the plane but not on the sphere.) In each row of the relation, the point and the line are incident and the line is the successor of the point in the corresponding orientation. (iv) R4(POINT, LINE, AREA, LABEL), where POINT means the name of the point whose neighborhood is stored in the relation, LINE is the name of the line, AREA is the name of the area in the neighborhood, and LABEL is a serial number. Similarly to the previous paragraph, the orientation is clockwise (but now for all points, without any exception), and of course the line is on the boundary of the area. Let us emphasize that, for describing spherical objects, the only difference is that the “infinite area” is not distinguished, i.e., the boundary of each area is listed clockwise when viewed from the interior of the area. 2.2 The Extended PLA-Database, PLAX We want to modify the PLA-Model in a way that also directed and weighted graphs can be stored in the model easily. Our idea on simple, directed and (edge) weighted graphs does not differ from the standard scientific and informal meaning. That is, in a directed graph each edge has an orientation, namely each has its head and tail. A weighted graph is one having directed or undirected edges with labels, these labels are the weights. In our research we restrict our investigation only to non-negative weights, which restriction leads to an appropriate model, hugging together directed and weighted graphs. In this model weighted graphs also are seen as directed graphs. An example for the practical use of this type of graph is a traffic network where the roads are oriented either in both direction or only in one way. The capacities of the roads may also be different, and can be modelled by weights. For our general purpose, which is; to represent graphs in a regular way in the extended PLA-Model, we give the formal definition of graphs. Formally, by a graph we mean an ordered quartet
. The first element is the set of vertices of the directed or weighted graph D. The second, L(D) is the set of edges (lines), disjoint from V(D). The last in this quartet is the incidence function <(D) associates each edge of D with an ordered/unordered pair of vertices. These three are the usual convention for defining directed/undirected graphs. There is a fourth element, function w(D) which is defined on the edges of the directed or weighted graph, and its range is the set of real numbers. This additional function describes the weights. The description would be more compact, if we handle directed graphs as special cases of weighted graphs. It is possible because we restrict the value of the weights to the non-negative numbers. So using this third element, the weight function also for unweighted directed graphs, the PLA-Model can be extended easily to correspond to this definition. As a consequence, we say, that the graph D is a directed graph or digraph, if each edge has the weight 1 or –1. Graph D is weighted otherwise, except for the case, when each functional value of w is 0. In this latter case the graph is simple, but instead of naming the corresponding object as a simple
191
B. NOVÁK, TUZA graph, in accordance with the widely accepted agreement, we simply call it a graph. If the graph is weighted, it may happen, that an edge has a weight 0. Because we must have the orientation also in this case, this type of edges supposed to have the value of one of +0, 0. In accordance with the explanation of the previous paragraph, a natural extension is offered by relation R1. Merging one more attribute to the scheme of R1, we can store directed and weighted graphs easily. This fourth attribute represents the weight function w, so the direction and weight. Abbreviating these two together, we can name this new attribute as DIW. The domain of attribute DIW (which corresponds to the range of the function w) is the set of real numbers, representing the type of edges below. The number in DIW is: - positive, if the direction of that edge coincides with the previously fixed orientation. That is, the tail of the edge is the point in the attribute FROM, and the head of the edge is the point in the attribute TO. - negative otherwise, which means that the tail of the edge is the point in the attribute TO, and the head of the edge is the point in the attribute FROM. For the fixed orientation see 2.1 (i) above. The (non-negative) value of the number in DIW is the same as its weight. Note that “zero” may appear with positive or negative sign. Thus, the scheme of relation R1 is the following: R1(LINE, FROM, TO, DIW). As an illustration see a digraph and its arcs representation in Figure 2 and Table 1 respectively. 4
1 3 2
5
Figure 2: A directed graph ARC e12 e13 e23 e34 e45
FROM 1 1 2 3 4
TO 2 3 3 4 5
DIW -1 +1 -1 +1 +1
Table 1: R1 for the digraph in Figure 2.
192
REPRESENTING DIRECTED AND WEIGHTED GRAPHS... Except for relation R1 we keep all the other relations of the PLA model. So the extended version of the PLA model, named as PLAX, also has 4 relations: 1. R1(ARC, FROM, TO, DIW) 2. R2(ARC, LEFT, RIGHT) 3. R3(AREA, POINT, ARC, LABEL) 4. R4(POINT, ARC, AREA, LABEL) In [8] we proved, that all of the relations can be obtained from R3. Thus, only the modified R1 and (original) R3 are needed in our database scheme for the PLAX-model to maintain complete information: 1. R1(ARC, FROM, TO, DIW) 2. R3(AREA, POINT, ARC, LABEL) Of course, for a directed but unweighted graph there is no need to introduce DIW, one can simply keep the order between the endpoints in R1 in accordance with the direction of the edges. Here we give a solution for the more general type of graphs, namely directed and weighted graphs.
3 Integrity constraints for Eulerian graphs in PLAX The basic ideas we used in the proofs in this paragraph came from [6] and [8]. As we already mentioned in 2.1 the PLA-Model represents 2-connected planar graphs. What we need here though is only connectivity. So the conditions can be weakened and the algorithm below still remains valid, i.e. working for all connected graphs. The constraints for connectivity can be found e.g. in [7] and [8]. Before we begin investigating Eulerian digraphs, we need some further definitions. The indegree of a vertex v, denoted by in(v) is the number of arcs with head v. The outdegree of a vertex v, denoted by out(v) is the number of arcs with tail v. These degrees can be got from relation R1, as Lemma 1 claims below. Let us denote by 3 LIST (R) the projection of relation R to the attributes listed in LIST, VCONDITION(R) is a selection of relation R with respect to CONDITION, and is the standard set-union. The number of elements in relation R is denoted by |R|. Lemma 1: The indegree of vertex v can be obtained by the following formula: in(v) =|VFROM=v, AND DIW<0(R) VTO=v, AND DIW>0(R)| An analogous formula is valid for the outdegree of vertex v: out(v) =|VFROM=v, AND DIW>0(R) VTO=v, AND DIW<0(R)| In other words, in(v) is equal to the sum of the number of instances in FROM with negative DIW, abbreviated by inst_no(v)[FROM, -] and the number of instances in TO with positive DIW in R1, abbreviated by inst_no(v)[TO, +]. Now we need the notion of an Eulerian path and circuit. A directed path is a sequence v1, a1, v2, a2, …vk, where the vi are vertices, the ai are arcs, such that the arc ai has head vi+1 and tail v i. An Eulerian path is a path which uses every arc of the digraph once and
193
B. NOVÁK, TUZA only once. An Eulerian circuit is a path having the same starting point and endpoint; v1= vk. The next theorem gives the test for the decision, whether the digraph has an Eulerian circuit or not. Theorem 3: The digraph stored in the PLAX-database has an Eulerian circuit if and only if for each vertex v the number of instances in R1 has the following property: inst_no(v)[FROM, -]+inst_no(v)[TO, +] = = inst_no(v)[FROM, +]+inst_no(v)[TO, -] Proof The left hand side of the equality above is the indegree of v, and the right hand side is the out degree of v. It is well known that a digraph has an Eulerian circuit if and only if in(v)=out(v) for every vertex v. A similar theorem can be stated for Eulerian path, with the difference that there is a pair of vertices v and v’, such that out(v)=in(v) +1 and in(v’)=out(v’) +1. This v is the starting point of the path, while v’ is the endpoint of the Eulerian path. If we already know that the digraph contains an Eulerian circuit, of course we want to find it. The next algorithm builds a list containing one Eulerian circuit of the stored graph. The very first step is to rearrange R1 for the algorithm. The resulting relation is R1’, having the same tuples as R1 in it in case the DIW of the tuple is positive. The tuple will be changed for negative DIW, the point in FROM will be swapped with the point in TO. This way the tuples in the relation reflect the real orientation of the edges in the digraph, that is, the orientation is identical to the FROM as a tail and TO as a head of that edge. Since we only want to find an Eulerian circuit, we do not need the DIW anymore, the DIW attribute can be dropped. We project the relation R1’ onto its attributes ARC, FROM, TO in step 2. (The whole preprocessing can be easily implemented as a simple embedded SQL program. Here we use the standard pseudocode instead.) In the next part of the algorithm we use Euler, which is a list containing vertices, Aux is a stack, and Last means the last element in the list Euler. Note that the preprocessing (Steps 1 and 2) can be avoided in case we have an unweighted directed graph whose arcs are represented in R1 without DIW, but putting the real tail into FROM and head into TO, corresponding to the real orientation. Algorithm 4 */ Preprocessing for generating R1’/* 1. FOR each row in R1 DO IF Signum(DIW)=-1 THEN INSERT row INTO R1’ AND SWAP(FROM, TO) ELSE INSERT row INTO R1’ 2. PROJECT R1’ ONTO ARC, FROM, TO.
194
REPRESENTING DIRECTED AND WEIGHTED GRAPHS... */For finding an Eulerian circuit/* 3. Put one (arbitrarily chosen) vertex p (in R’) into Euler, and Last:=p, Aux:= . 4. WHILE R1’z DO IF Last appears in R1’.FROM THEN find one tuple in R1’ which contains Last in in FROM, and append the other vertex q in this tuple into Euler. Remove this row from R1’, and Last := q. ELSE put Last into Aux, and delete it from the end of Euler. Redefine Last to be the last element of Euler. 5. Append the content of Aux to Euler. After the algorithm is terminated, the circuit can be got from the list Euler. The following theorem states that the algorithm above is correct. Theorem 5: Using Algorithm 2 the resulting sequence of vertices in list Euler gives an Eulerian circuit of the digraph. Example 6: Let us apply the second part of Algorithm 4. to the graph in Figure 2. After the Preprocess we get relation R1’ in Figure 3. below. ARC e12 e13 e23 e34 e45
FROM 2 1 3 3 4
TO 1 3 2 4 5
Figure 3: Relation R1’ after the Preprocess So, we continue the algorithm from Step 3. Step 3: Choose p=1, Euler=[1], Last=1. Step 4.1: There is a row in R1’ having 1 in FROM, the corresponding q=3, Euler=[1, 3], Last=3, and row e13 is deleted from R1’. Step 4.2: For 3 we find first q=2 in FROM, Euler=[1, 3, 2], Last=3, row e23 is deleted. Step 4.3: For 2 we find q=1 in FROM, Euler=[1, 3, 2, 1], Last=1, row e12 is deleted. Step 4.4: There is no 1 in the modified R1’ (since e13 is already deleted), so Euler is modified to [1, 3, 2] again, Last=2, Aux=1. Step 4.5: Again there is no 2 in FROM, so Euler=[1, 3], Last=3, Aux=2,1.
195
B. NOVÁK, TUZA Step 4.6: For 3 we get q=4, Euler=[1, 3, 4], Last=4, row e34 is deleted. Step 4.7: q=5, Euler=[1, 3, 4, 5], Last =5, row e45 is deleted. Step 4.8: q=3, Euler=[1, 3, 4, 5, 3], Last=3, row e53 is deleted. Step 4.9: R1’ is empty, so the cycle is ended. Step 5: Aux is appended to Euler, so the list Euler=[1, 3, 4, 5, 3, 2, 1] The algorithm can be easily altered for finding an Eulerian path. In this case first we need to find v from (the original) R1, which is the only point having one larger outdegree than indegree. Then in Step 3, point p must be chosen as this v, and no other modification is needed.
4 Conclusion In this paper the PLA-Model is extended for directed and weighted graphs. It turned out that with a minor alteration the model is appropriate for that purpose as well. We rewrote one of the existing algorithms in the PLA-Model, for finding an Eulerian circuit of the weighted digraph. Analogously, the other algorithms can be altered also for acting on a weighted digraph. It can be one direction of future research, which algorithms can be implemented more efficiently with the PLAX-Model.
References [1] J. P. Corbett. Topological Principles in Cartography. Technical paper 48, US Bureau of the Census, Washington DC, 1979. [2] B. Kuijpers, J. Paredaens and J. Van den Bussche. Lossless Representation of Topological Spatial Data. Lecture Notes in Computer Science 951, Advances in Spatial Databases, 4th International Symposium, pages 1 -13, Portland, Springer Verlag, 1995. [3] R. Laurini and D. Thomson. Fundamentals of Spatial Information Systems, Academic Press, APIC Series 37, 1992. [4] J. Paredaens. Spatial Databases. Lecture Notes in Computer Science 893, Database TheoryICDT'95, pages 14 -35, Springer Verlag, 1995. [5] Á. B. Novák, Zs. Tuza. Data retrieval, constrains and complexity in the spatial database PLA. In the Proceedings of 3rd IEEE International Conference on Intelligent Engineering Systems, pages 42-46, Stara Lesna, Slovakia,1999. [6] Á. B. Novák, Tamás Fehér. Constraints for Bipartite and Eulerian Graphs in a Spatial Relational Model. In the Proceedings of 4rd IEEE International Conference on Intelligent Engineering Systems, pages 40-44, Portoroz, Slovenia, 2000.
196
REPRESENTING DIRECTED AND WEIGHTED GRAPHS... [7] Á. B. Novák, Zs. Tuza. Representation, constraints and complexity of graphs in the PLA spatial database model. In the Proceedings of the Jubilee Conference of Banki Donat Polytechnic, Budapest, Hungary, pages 57-60, 1999. [8] Á. B. Novák, Zs. Tuza, Reconstruction Graphs and Testing Their Properties in a Relational Spatial Database, pages 1391-1406, Computers & Mathematics with Applications Volume 43, Issues 10-11 , May-June 2002.
About the Authors Ágnes Bércesné Novák received her Master’s degree in mathematics and physics in 1978, in computer science in 1993, and a Ph. D. degree in computer science in 1996 from Eötvös L. University of Sciences, in Budapest, Hungary. Her research focuses on database theory and knowledgebase systems. Zsolt Tuza received his Master’s degree in mathematics in 1978, and Ph.D degree in 1986 from Eötvös L. University of Sciences, in Budapest, Hungary. A Doctor of Science degree was awarded to him in 1992 from the Hungarian Academy of Sciences. His research interests include graph and hypergraph theory and theoretical computer science. He is the author of more than 200 research paper.
197
198
$Q,QWHJUDWHG,QWHOOLJHQW6\VWHPIRU'DWD0LQLQJ DQG'HFLVLRQ0DNLQJ )LOLS8MHYLFDQG1LNROD%RJXQRYLF
'HSDUWPHQWRI,QIRUPDWLRQ7HFKQRORJ\ &URDWLD,QVXUDQFH/WG=DJUHE&URDWLD [email protected]
)DFXOW\RI(OHFWULFDO(QJLQHHULQJDQG&RPSXWLQJ 8QLYHUVLW\RI=DJUHE=DJUHE&URDWLD [email protected]
$EVWUDFW ² $ ZLGHVSUHDG SUROLIHUDWLRQ RI GDWDEDVHV KDV FUHDWHG GHPDQG IRU SRZHUIXOWRROVIRUWXUQLQJVWRUHGGDWD LQWR XVHIXO NQRZOHGJH $QDO\WLFDO DQG SUH GLFWLYHFDSDELOLWLHVRIGDWDPLQLQJWRROVIRUPWKHEDVLVRIEXVLQHVVGHFLVLRQVXSSRUW V\VWHPV7KHSDSHUH[SOLFDWHVDQRYHOGDWDFODVVLILFDWLRQHQYLURQPHQWGHVLJQHGIRU UHDOZRUOGEXVLQHVVSUREOHPVWKDWH[KLELWDKLJKGHJUHHRIXQGHWHUPLQLVWLFEHKDY LRXU 7KH HQYLURQPHQW LV LPSOHPHQWHG LQ -DYD DQG XVHV 64/ TXHULHV IRU GLUHFW GDWDEDVHDFFHVV,WHPSOR\VDYDULDWLRQRI1DLYH%D\HVDOJRULWKPDXJPHQWHGZLWK DWWULEXWHVHOHFWLRQIRUHOLPLQDWLQJUHGXQGDQWDWWULEXWHV7DUJHWFRQFHSWLVGHVFULEHG XVLQJ & GHFLVLRQ WUHH JHQHUDWRU $Q HPEHGGHG YLVXDO SHUIRUPDQFH HYDOXDWLRQ WRROHQDEOHVVLJQLILFDQWO\IDVWHUFRQYHUJHQFHWRZDUGVWKHILQDOPRGHO 7KH SUHGLFWLYH SRZHU RI WKH FODVVLILFDWLRQ HQYLURQPHQW LV LOOXVWUDWHG RQ D W\SLFDO EXVLQHVVSUREOHP
,QWURGXFWLRQ 7UDGLWLRQDOO\ GDWD DQDO\VLV WHFKQLTXHV KDYH EHHQ SULPDULO\ RULHQWHG WRZDUG WKH H[WUDFWLRQRITXDQWLWDWLYHDQGVWDWLVWLFDOSURSHUWLHV 7KHVHWHFKQLTXHV KRZHYHU FDQQRW SURGXFHDTXDOLWDWLYHGHVFULSWLRQRIWKHUHJXODULWLHVDQGSDWWHUQVFODVVHV QRWH[SOLFLWO\ SURYLGHGLQ WKH GDWD QRU FDQ WKH\ K\SRWKHVL]H RQUHDVRQV IRU WKH HQWLWLHV EHLQJLQ WKH VDPHFDWHJRU\ 7R DGGUHVV WKHDERYHSUREOHPVDGDWDDQDO\VLVV\VWHPKDV WR HPERG\ FRPSXWDWLRQDO SURFHGXUHV ERUURZHG IURP WKH ILHOG RI PDFKLQH OHDUQLQJ DUHDV RI V\PEROLF GDWD PLQLQJ DQG NQRZOHGJH GLVFRYHU\ %XVLQHVV LQWHOOLJHQFH V\VWHPV DUH GHVLJQHG WR SURYLGH LQGHSWK NQRZOHGJH RI GLIIHUHQW DVSHFWV RI EXVLQHVV SURFHVVHV 5HYHDOLQJ XVHIXO NQRZOHGJH IURP UDZ GDWD GDWD PLQLQJ WRROV DUH HVVHQWLDO SDUW RI SUHVHQWEXVLQHVVGHFLVLRQVXSSRUWV\VWHPV>@ 7KH PDLQVWUHDP GDWD PLQLQJ WHFKQLTXHV DWWHPSW WR ILQG DQG GHVFULEH VWUXFWXUDO SDW WHUQVLQGDWD7ZREDVLFDOO\GLIIHUHQWVW\OHVDUHSUHYDOHQW>@,QFODVVLILFDWLRQOHDUQLQJ V\VWHP OHDUQV WR FODVVLI\ XQVHHQ H[DPSOHV E\ DQDO\VLQJ VHW RI DOUHDG\ FODVVLILHG H[DPSOHV,QDVVRFLDWLRQOHDUQLQJDQ\DVVRFLDWLRQVEHWZHHQGDWDSURSHUWLHVDUHVRXJKW %RWK DSSURDFKHV DUH LWHUDWLYH ± GLIIHUHQW PRGHOV DUH UHSHDWHGO\ EXLOW DQG HYDOXDWHG LQ RUGHU WR REWDLQ FUHGLWDEOH UHVXOWV 7KH SDSHU GHSLFWV DQ LQWHJUDWHG GDWD FODVVLILFDWLRQ 199
8-(9,&%2*8129,&
HQYLURQPHQW WKDW VXSSRUWV DOO WKH SKDVHV RI UHJXODU GDWD PLQLQJ SURFHVV LQFOXGLQJ LQWHJUDWHG SHUIRUPDQFH HYDOXDWLRQ WRRO ,W LV SULPDULO\ GHVLJQHG WR DGGUHVV UHDOZRUOG EXVLQHVVSUREOHPVFKDUDFWHUL]HGE\FRQVLGHUDEOHDPRXQWRIXQFHUWDLQW\DQGQRLVH7KH V\VWHPHPSOR\VDQXPEHURIUHILQHGDQGPRGLILHGGDWDPLQLQJDOJRULWKPVDQGLQWHUDF WLYHO\ PDQDJHV WKH FRXUVH RI NQRZOHGJH LQGXFWLRQ ,Q WKH IROORZLQJ VHFWLRQV DOO FRPSRQHQWVRIDQRYHOGDWDDQDO\VLVHQYLURQPHQWDUHHODERUDWHG7KHSUHGLFWLYHSRZHU RIWKHGHVFULEHGV\VWHPLVLOOXVWUDWHGRQDW\SLFDOUHDOZRUOGEXVLQHVVDSSOLFDWLRQ
3UREOHP'HVFULSWLRQ :KHQ GHVLJQLQJ GDWD DQDO\VLV HQYLURQPHQW WKH FKRLFH RI DQ DSSURSULDWH WHFKQLTXH DPRQJ QXPHURXV DYDLODEOH GDWD PLQLQJ PRGHOOLQJ WHFKQLTXHV LV WKH ILUVW GHFLVLRQ WKDW KDVWREHPDGH7KHQDWXUHRIGDWDPLQLQJSUREOHPDWKDQGVKRXOGKDYHPDLQLQIOXHQFH LQ PDNLQJ WKLV GHFLVLRQ 7KH PDLQ FKDUDFWHULVWLFV RI WKH GDWD PLQLQJ WDVN QHHG WR EH FDUHIXOO\ FRQVLGHUHG LQ UHODWLRQ WR GLIIHUHQW GDWD PLQLQJ VFKHPHV DQG WKHLU VSHFLILF IHDWXUHV 0DQ\PRGHOVRIEXVLQHVVSUREOHPVDUHSUREDELOLVWLFUDWKHUWKDQGHWHUPLQLVWLFHLWKHU E\ODFNRIFXUUHQWXQGHUVWDQGLQJRUE\QDWXUH)RUH[DPSOHLWLVXQUHDOLVWLFWRH[SHFWD PRGHOWKDWZLOOSUHGLFWDFFXUDWHO\ZKHWKHURUQRWDSRWHQWLDOFXVWRPHUZLOOUHVSRQGWRD SURPRWLRQDORIIHUPDLORXW,WLVPRUHDSSURSULDWHWRSHUFHLYHWKLVSUREOHPDVD%HUQRXOOL H[SHULPHQW ZLWK D SUREDELOLW\ DVVRFLDWHG WR WKH VXFFHVV RI HDFK WULDO 7KLV SHUVSHFWLYH VXJJHVWV D PRGHO WKDW \LHOGV D SUREDELOLW\ WKDW D JLYHQ SHUVRQ ZLOO UHVSRQG WR WKH SURPRWLRQDORIIHU,QDFFRUGDQFHZLWKWZRSRVVLEOHRXWFRPHVRID%HUQRXOOLH[SHULPHQW RXUGDWDPLQLQJHQYLURQPHQWLVSULPDULO\GHVLJQHGIRUWKHWZRFODVVFODVVLILFDWLRQDQG GHVFULSWLRQ SUREOHPV )XUWKHUPRUH WDUJHW SUREOHPV DUH UHDOZRUOG EXVLQHVV SUREOHPV WKDW H[KLELW D KLJK GHJUHH RI XQGHWHUPLQLVWLF EHKDYLRXU )RU H[DPSOH HYHQ IRU WKH WUDLQLQJ H[DPSOHV LW LV RIWHQ QRW SRVVLEOH WR UHVROYH FODVVLILFDWLRQ RI D SDUWLFXODU H[DPSOH7KHUHDVRQLVH[LVWHQFHRIH[DPSOHVZLWKWKHVDPHYDOXHVIRUDOODWWULEXWHVEXW ZLWKGLIIHUHQWFODVVLILFDWLRQ+RZHYHUWKLVLVQRWDIHDWXUHRIWKHFKRVHQDWWULEXWHVHWEXW UDWKHUDQLQKHUHQWFKDUDFWHULVWLFRIWKHSUREOHP 0RUHRYHUSUREOHPVZHDUHDGGUHVVLQJW\SLFDOO\LQYROYHLVRODWLQJDVPDOOIUDJPHQWRI LQWHUHVWLQJHQWLWLHVXVXDOO\QRWPRUHWKDQWRSHUFHQWRIWKHWRWDO WKDWDUHJURXSHG LQ D SUREDELOLVWLF PDQQHU 7KDW LV IRU HYHU\ HQWLW\ WKHUH LV FHUWDLQ SUREDELOLW\ RI EHORQJLQJWRWKHWDUJHWJURXS(QWLWLHVZLWKKLJKHUSUREDELOLWLHVDUHLQWHUHVWLQJRQHVZH DUHWU\LQJWRGHWDFKWKHPIURPRWKHUVZLWKORZHUSUREDELOLWLHV,QRWKHUZRUGVHQWLWLHV DUHVHSDUDWHGWDNLQJHVWLPDWHGSUREDELOLW\RIEHORQJLQJWRDWDUJHWFODVVDVDFULWHULRQ $Q LOOXVWUDWLYH H[DPSOH RI WKLV NLQG RI SUREOHPV FRPHV IURP LQVXUDQFH EXVLQHVV DVVHVVPHQW ZKHWKHU D JLYHQ SROLF\KROGHU ZLOO PDNH D GDPDJH FODLP RU QRW $Q LQVXU DQFH FRPSDQ\ VKRXOG EH DEOH WR LGHQWLI\ JURXSV RI FOLHQWV ZLWK KLJK SUREDELOLW\ RI PDNLQJ D GDPDJH FODLP LQ D JLYHQ \HDU 7KLV LQIRUPDWLRQ LV WKH EDVLV IRU SURILOLQJ SUHPLXP UDWHV IRU D FKRVHQ LQVXUDQFH W\SH 'HVFULEHG SUREOHP ILWV WKH W\SH RI WDUJHW SUREOHPVRXWOLQHGDERYH7KHVXEVHWRIWKHSROLF\KROGHUVWKDWDFWXDOO\PDNHDGDPDJH FODLP LV IDLUO\ VPDOO DQG WKH HYHQW LWVHOI LV KLJKO\ XQGHWHUPLQLVWLF 7KHUH DUH DOVR LQVXUDQWVZLWKWKHVDPHEDFNJURXQGLQIRUPDWLRQEXWVRPHRIWKHPILOHDGDPDJHFODLP ZKLOHRWKHUVGRQ¶W0RUHRYHUDQ\SROLF\KROGHUFDQSRWHQWLDOO\ILOHDGDPDJHFODLPEXW DSULRULSUREDELOLW\WKDWDJLYHQSROLF\KROGHUZLOOILOHRQHLVUDWKHUVPDOO
200
$1,17(*5$7(',17(//,*(176<67(0
$SSOLFDWLRQ$UFKLWHFWXUH 6WDQGDUG GDWD PLQLQJ SURFHVV LWHUDWHV RYHU VHYHUDO VXFFHVVLYH SKDVHV GDWD DFFHVV DQG SUHSDUDWLRQ DSSOLFDWLRQ RI PLQLQJ DOJRULWKP SUHVHQWDWLRQ RI WKH RXWSXW NQRZOHGJH HYDOXDWLRQRIWKHV\VWHPSHUIRUPDQFHDQGH[SORLWDWLRQRIWKHLQGXFHGNQRZOHGJH2XU LQWHJUDWHGGDWDPLQLQJHQYLURQPHQWVXSSRUWVDOORIWKHVHSKDVHVLQDFRQVLVWHQWPDQQHU HQDEOLQJ VHDPOHVV WUDQVLWLRQ IURP RQH SKDVH WR DQRWKHU 7KH HQYLURQPHQW HPSOR\V D QXPEHURIDXWRPDWHGWDVNVHJDXWRPDWHGDWWULEXWHVHOHFWLRQHVWLPDWLRQRISUREDELOLW\ GLVWULEXWLRQ KLGLQJXQQHFHVVDU\GHWDLOVIURPWKHXVHU0DQDJLQJWKHZKROHGDWDPLQLQJ SURFHVVWKURXJKLQWHUDFWLYHJUDSKLFDOXVHULQWHUIDFHJLYHVWKHXVHUPRUHFRQWURORYHUWKH SURFHVV LWVHOI $Q DFWLYH UROH LQ HYDOXDWLRQ RI V\VWHP SHUIRUPDQFH E\ DQDO\VLQJ PDQ\ GLIIHUHQWVFHQDULRVFRQWULEXWHVWRWKHHIILFLHQF\RIWKHILQDOPRGHO 'DWD PLQLQJ HQYLURQPHQW LV LPSOHPHQWHG XVLQJ -DYD DV D SURJUDPPLQJ ODQJXDJH ZKLFK SURYLGHV SODWIRUP LQGHSHQGHQFH ,QWHUQDO DUFKLWHFWXUH RI WKH V\VWHP FRQVLVWV RI WZR GLIIHUHQW OD\HUV FRUH OD\HU WKDW LPSOHPHQWV DOO GDWD DQDO\VLV SURFHGXUHV DQG SUHVHQWDWLRQOD\HUWKDWPDQDJHVXVHULQWHUDFWLRQDQG,2URXWLQHV 3UHVHQWDWLRQOD\HUFODVVHVVXSSRUWGDWDGRZQORDGDQGPDQLSXODWLRQDORQJZLWKYLVX DOLVDWLRQ RI WKH UHVXOWV WKH V\VWHP SURGXFHV 7KH GDWDVHW LV SUHVHQWHG WR WKH XVHU LQ D IRUPRIDWDEOHZKHUHKHFDQEURZVHDQGHGLWWKHGDWDRUH[DPLQHSUHGLFWLRQUHVXOWV 3HUIRUPDQFHRIWKHLQGXFHG1DLYH%D\HVFODVVLILHULVYLVXDOLVHGE\LQWHUDFWLYHOLIWFKDUW DOORZLQJXVHUWRLVRODWHLQWHUHVWLQJHQWLWLHVE\H[SORULQJDQXPEHURIGLIIHUHQWVFHQDULRV 7KH JHQHUDWHG GHFLVLRQ WUHH FODVVLILHU WKDW GHVFULEHV WKH WDUJHW FRQFHSW LV GLVSOD\HG DV H[SDQGDEOHFROODSVLEOHWUHHVWUXFWXUH &RUHOD\HUFODVVHVIRUPWKHGDWDPLQLQJIUDPHZRUNRIWKHFODVVLILFDWLRQHQYLURQPHQW 7KH\DUHUHVSRQVLEOHIRUILOWHULQJWKHLQSXWGDWDFRQVWUXFWLQJSUREDELOLVWLFDQGGHVFULS WLYH PRGHOV RI WKH GDWD HYDOXDWLQJ WKH SHUIRUPDQFH RI WKH PRGHOV DQG FODVVLI\LQJ XQVHHQGDWDE\DSSO\LQJWKHLQGXFHGPRGHOV)LJXUHVKRZVWKHPDLQFRUHFODVVHVDQG WKHLU UHODWLRQVKLSV $OO GDWD DQDO\VLV FODVVHV XVH LQWHUQDO GDWDVHW UHSUHVHQWDWLRQ DV WKH VRXUFH RI WKH GDWD 7KLV FODVV LV HVVHQWLDO IRU DFFHVVLQJ PDQLSXODWLQJ SURGXFLQJ DQG VWRULQJ DQDO\VHG GDWD $WWULEXWH VHOHFWLRQ FODVV SURGXFHV DWWULEXWH ILOWHU E\ HYDOXDWLQJ GLIIHUHQWDWWULEXWHVXEVHWVRIWKHGDWDVHW7KHFUHDWHGILOWHUFDQEHDSSOLHGWRDGDWDVHW SURGXFLQJ DQRWKHU ILOWHUHG GDWDVHW 1DLYH %D\HV FODVVLILHU FODVV EXLOGV SUREDELOLVWLF FODVVLILFDWLRQ PRGHO XVLQJ WUDLQLQJ GDWDVHW :KHQ DSSO\LQJ WKH LQGXFHG PRGHO WKH FODVVLILHURXWSXWVHVWLPDWHGSUREDELOLW\GLVWULEXWLRQIRUHDFKH[DPSOHLQWKHGDWDVHW7R HYDOXDWH WKH SHUIRUPDQFH RI 1DLYH %D\HV FODVVLILHU OLIW FKDUW HYDOXDWRU XVHV FODVVLILHG GDWDVHWDQGFRPSDUHVHVWLPDWHGSUREDELOLWLHVSURGXFHGE\WKHFODVVLILHUZLWKDFWXDOGDWD /LIWFKDUWHYDOXDWRU $WWULEXWHVHOHFWLRQ ILOWHU ,QWHUQDOGDWDVHW UHSUHVHQWDWLRQ
1DLYH%D\HV FODVVLILHU
'HFLVLRQWUHH FODVVLILHU 3UHGLFWLRQ JHQHUDWRU
)LJXUH5HODWLRQVKLSVDPRQJFRUHFODVVHV 201
8-(9,&%2*8129,&
FODVVLILFDWLRQ 3UHGLFWLRQ JHQHUDWRU FODVVLILHV D GDWDVHW ZLWK XQNQRZQ FODVVLILFDWLRQ E\ HPSOR\LQJ WKH LQGXFHG FODVVLILHU DQG SURGXFHV D GDWDVHW ZLWK SUHGLFWHG FODVVLILFDWLRQ 7KLVGDWDVHWLVXVHGE\WKHGHFLVLRQWUHHFODVVLILHUWRGHYLVHDGHVFULSWLRQRIWKHWDUJHW FODVV7KHGHFLVLRQWUHHFODVVLILHULVQRWXVHGIRUSUHGLFWLRQSXUSRVHV 7KHVFHQDULRRIFRPPXQLFDWLRQDPRQJFRUHOD\HUFODVVHVLVEHVWLOOXVWUDWHGE\DGDWD IORZGLDJUDP7KHGLDJUDPRQ)LJXUHVKRZVWKHWUDQVIRUPDWLRQRIWKHUDZGDWDWRWKH PRGHOVIRUGHVFULELQJDQGSUHGLFWLQJDQDO\VHGFRQFHSWV$FRS\RIWKHWUDLQLQJGDWDLV ILUVWDQDO\VHGE\WKHDWWULEXWHVHOHFWLRQDOJRULWKP7KHDOJRULWKPHYDOXDWHVWKHZRUWKRI VXEVHWRIDWWULEXWHVE\FRQVLGHULQJWKHGHJUHHRIUHGXQGDQF\EHWZHHQWKHPDORQJZLWK WKHLU SUHGLFWLYHDELOLW\7KHUHVXOWRIWKLV DQDO\VLV LVDQ DWWULEXWH VHOHFWLRQ ILOWHU WKDW LV DIWHUZDUGV DSSOLHG WR WKH WUDLQLQJ WHVWLQJ DQG SUHGLFWLRQ GDWD 7KH 1DLYH %D\HV FODVVLILFDWLRQDOJRULWKPWDNHVILOWHUHGWUDLQLQJGDWDDQGSURGXFHVDSUREDELOLVWLFFODVVLIL FDWLRQ PRGHO 6HQVLWLYLW\ RI WKH FODVVLILFDWLRQ VFKHPH WR WKH H[LVWHQFH RI UHGXQGDQW DWWULEXWHVLQWKHWUDLQLQJGDWDLVFRPSHQVDWHGE\WKHHOLPLQDWLRQRIUHGXQGDQWDWWULEXWHV LQ WKH SUHSURFHVVLQJ SKDVH WKXV LPSURYLQJ FODVVLILFDWLRQ DFFXUDF\ 7KH LQGXFHG SUREDELOLVWLF PRGHO LV HYDOXDWHG XVLQJ YLVXDO HYDOXDWLRQ WRRO $IWHU DFKLHYLQJ VDWLVIDF WRU\ UHVXOWV WKURXJK UHSHDWHG LWHUDWLRQV D SUREDELOLW\ WKUHVKROG LV FKRVHQ LQ RUGHU WR VHSDUDWH LQWHUHVWLQJ HQWLWLHV 8VLQJ WKLV WKUHVKROG DQG WKH LQGXFHG SUREDELOLVWLF PRGHO FODVVLILFDWLRQ SUHGLFWLRQV FDQ EH PDGH IRU SUHYLRXVO\ XQVHHQ H[DPSOHV $GGLWLRQDOO\ WKHLVRODWHGVXEVHWRILQWHUHVWLQJHQWLWLHVFDQEHGHVFULEHGLQDIRUPRIDGHFLVLRQWUHH JLYLQJYDOXDEOHLQVLJKWLQWKHVWUXFWXUHRILQGXFHGNQRZOHGJH 7KH IROORZLQJ VXEVHFWLRQV JLYH PRUH GHWDLOHG GHVFULSWLRQ RI WKH FRPSRQHQWV FRP SULVLQJWKHGDWDDQDO\VLVHQYLURQPHQW 'DWDEDVH$FFHVVDQG'DWD'RZQORDG 7KH ILUVW VWHS LQ D GDWD PLQLQJ SURFHVV LV WR GHWHUPLQH WKH REMHFWLYH RI D GDWD PLQLQJ HIIRUW$IWHUWKHREMHFWLYHKDVEHHQHVWDEOLVKHGDYDLODEOHDQGUHOHYDQWGDWDLVORRNHGXS IRUGDWDPLQLQJV\VWHPWRRSHUDWHRQ*DWKHULQJUHOHYDQWGDWDWKDWHPERG\UHJXODULWLHV EHLQJH[SORUHGPD\EHFUXFLDOWRWKHVXFFHVVRIWKHZKROHGDWDPLQLQJSURFHVV ,QEXVLQHVVDSSOLFDWLRQVPDMRULW\RIGDWDDQDO\VLVLVEHLQJSHUIRUPHGRQWUDQVDFWLRQDO GDWD7\SLFDOO\WUDQVDFWLRQDOGDWDRIEXVLQHVVV\VWHPVUHVLGHVLQGDWDEDVHV0DQ\ODUJH HQWHUSULVHV DOVR HVWDEOLVK D GDWD ZDUHKRXVH WKDW LQWHJUDWHV GDWD IURP YDULRXV VRXUFHV ZLWKLQ WKH RUJDQL]DWLRQ $V D VLQJOH FRQVLVWHQW SRLQW RI DFFHVV WR LQWHJUDWHG FRUSRUDWH GDWDGDWDZDUHKRXVHUHSUHVHQWVDYHU\XVHIXOSUHFXUVRUWRWKHGDWDPLQLQJSURFHVV $WWULEXWHVHOHFWLRQ $WWULEXWHILOWHU
1DLYH%D\HVVFKHPH
7HVWLQJGDWD
3UHGLFWLRQGDWD
'LPHQVLRQDOLW\ UHGXFWLRQ
)LOWHUHGGDWD 7UDLQLQJGDWD
3UREDELOLVWLFPRGHO 3UHGLFWLRQ
)LOWHUHGGDWD
3UREDELOLVWLFPRGHO HYDOXDWLRQ
3UHGLFWHG FODVVLILFDWLRQ
3UREDELOLW\ WKUHVKROG
)LOWHUHGGDWD 'HFLVLRQWUHH JHQHUDWRU
&ODVVGHVFULSWLRQ
)LJXUH'DWDIORZDQGSURFHVVGHFRPSRVLWLRQRXWOLQH 202
$1,17(*5$7(',17(//,*(176<67(0
&RQVLGHULQJ GDWDEDVHV DQG GDWD ZDUHKRXVHV DV SULPDU\ VRXUFHV RI GDWD LW LV QDWXUDO IRUGDWDPLQLQJV\VWHPWRKDYHGLUHFWDFFHVVWRWKHP3UHVHQWGD\VWDQGDUGIRUUHODWLRQDO GDWDEDVHDFFHVVLV64/6WUXFWXUHG4XHU\/DQJXDJH 7KHUHLVDQRWKHUFRQYHQLHQFHRI XVLQJ 64/ IRU GDWD GRZQORDG LQ GDWD PLQLQJ VRIWZDUH $OPRVW DOO GDWD PLQLQJ WHFK QLTXHV RSHUDWH XQGHU 8QLYHUVDO 5HODWLRQ $VVXPSWLRQ ± WKH\ H[SHFW DOO WKH GDWD WR EH FRQWDLQHGLQDVLQJOHUHODWLRQ7KHUHVXOWRIRQH64/TXHU\LVDOZD\VDVLQJOHUHODWLRQ QRPDWWHUKRZPDQ\GDWDEDVHUHODWLRQVWKHTXHU\FRPELQHV ,QRXUGDWDDQDO\VLVHQYLURQPHQWGDWDEDVHDFFHVVLVDFFRPSOLVKHGXVLQJ-'%&-DYD 'DWDEDVH &RQQHFWLYLW\ $ORQJ ZLWK WKH SODWIRUP LQGHSHQGHQFH SURYLGHG E\ -DYD ODQJXDJH -'%& HQVXUHV GDWDEDVH LQGHSHQGHQFH DV ZHOO 7KURXJK WKH -'%& GULYHU SURYLGHG E\ WKH GDWDEDVH YHQGRU WKH V\VWHP FDQ HVWDEOLVK D FRQQHFWLRQ WR GLIIHUHQW GDWDEDVHVHQDEOLQJXVHUWRH[WUDFWGDWDIURPWKHGDWDEDVHXVLQJ64/TXHU\7KHUHVXOW RIWKHTXHU\LVFRQYHUWHGLQWRDQLQWHUQDOUHSUHVHQWDWLRQRIWKHGDWDVHWWKDWLVVXLWDEOHIRU PDQLSXODWLRQ E\ GDWD PLQLQJ DOJRULWKPV 'DWD PLQLQJ HQYLURQPHQW LV DOVR FDSDEOH RI GRZQORDGLQJ GDWD ILOHV IURP WKH UHPRWH ILOH V\VWHP DQG FRQYHUWLQJ WKHP LQWR WKH LQWHUQDO UHSUHVHQWDWLRQ 2QFH GDWD LV FRQYHUWHG LQWR WKH LQWHUQDO UHSUHVHQWDWLRQ LW LV VKRZQRQWKHVFUHHQLQIRUPRIDWDEOHZKHUHLWFDQEHH[DPLQHGHGLWHGRUVDYHGWRWKH ILOHV\VWHPIRUODWHUXVH 'DWD3UHSURFHVVLQJ 7KH JRDO RI GDWD SUHSURFHVVLQJ RSHUDWLRQV LV WR HQKDQFH GDWD TXDOLW\ IRU IXWXUH PRGHOOLQJVWDJH7KHUHIRUHWKHIRUPRIWKHLUXVHLVRIWHQVXJJHVWHGE\NQRZQSURSHUWLHV RI WKH PDFKLQH OHDUQLQJ DOJRULWKP EHLQJ XVHG DIWHUZDUGV 2XU FODVVLILFDWLRQ HQYLURQPHQWXVHVDYDULDWLRQRI1DLYH%D\HVDOJRULWKPIRULQGXFWLRQRIWKHSUREDELOLVWLF PRGHO 1DLYH %D\HV FODVVLILHU RSHUDWHV XQGHU RQH VLPSOLI\LQJ DVVXPSWLRQ LW DVVXPHV WKDW WKH SUHGLFWLYH DWWULEXWHV DUH LQGHSHQGHQW JLYHQ WKH FODVV ([LVWHQFH RI KLJKO\ FRUUHODWHGDWWULEXWHVLQWKHWUDLQLQJVHWPD\FRQVLGHUDEO\VNHZWKHOHDUQLQJSURFHVV$V DQH[WUHPHH[DPSOHLIDQHZDWWULEXWHZLWKWKHVDPHYDOXHVDVDQH[LVWLQJRQHLVDGGHG WR WKH WUDLQLQJ GDWDVHW WKH HIIHFW RI WKDW DWWULEXWH ZRXOG EH PXOWLSOLHG DOO RI LWV SUREDELOLWLHVZRXOGEHVTXDUHGJLYLQJLWFRQVLGHUDEO\PRUHLQIOXHQFHRQWKHGHFLVLRQ ,QUHDOZRUOGSUREOHPVGHSHQGHQFLHVDPRQJDWWULEXWHVDUHYHU\FRPPRQ,QRUGHUWR LPSURYH SHUIRUPDQFH RQ WKHVH GDWDVHWV RXU FODVVLILFDWLRQ HQYLURQPHQW LQFOXGHV DXWRPDWHGDWWULEXWHVHOHFWLRQWRHOLPLQDWHUHGXQGDQWDWWULEXWHV7KHUHDUHWZRFRPPRQ DSSURDFKHVWRDWWULEXWHVHOHFWLRQDZUDSSHUXVHVWKHLQWHQGHGOHDUQLQJDOJRULWKPLWVHOI WR HYDOXDWH XVHIXOQHVV RI DWWULEXWHV ZKLOH D ILOWHU HYDOXDWHV DWWULEXWHV DFFRUGLQJ WR KHXULVWLFV EDVHG RQ JHQHUDO FKDUDFWHULVWLFV RI WKH GDWD :UDSSHUV DUH JHQHUDOO\ FRQVLG HUHG WR SURGXFH EHWWHU DWWULEXWH VXEVHWV EXW DUH YHU\ VORZ WR H[HFXWH EHFDXVH WKH OHDUQLQJ DOJRULWKP LV FDOOHG UHSHDWHGO\ 2Q WKH RWKHU KDQG ILOWHU DSSURDFK RSHUDWHV LQGHSHQGHQWO\RIDQ\OHDUQLQJDOJRULWKP±XQGHVLUDEOHDWWULEXWHVDUHILOWHUHGRXWEHIRUH WKHLQGXFWLRQVWDUWV)LOWHUDOJRULWKPVKDYHSURYHQWREHPXFKIDVWHUWKDQZUDSSHUVDQG KHQFHDPRUHSUDFWLFDOVROXWLRQIRUDSSOLFDWLRQRQODUJHGDWDVHWV 5HDOZRUOGEXVLQHVVSUREOHPVWKDWRXUFODVVLILFDWLRQHQYLURQPHQWGHDOVZLWKW\SLFDOO\ LQYROYHRSHUDWLQJRQODUJHFRUSRUDWHGDWDEDVHV7KHUHIRUHZHDGRSWHGDILOWHUDSSURDFK WRDWWULEXWHVHOHFWLRQ7KHLPSOHPHQWHGILOWHUXVHVFRUUHODWLRQEDVHGKHXULVWLFWRHYDOXDWH WKH ZRUWK RI DWWULEXWH VXEVHWV >@ 7KLV KHXULVWLF WDNHV LQWR DFFRXQW WKH XVHIXOQHVV RI
203
8-(9,&%2*8129,&
LQGLYLGXDOIHDWXUHVIRUSUHGLFWLQJWKHFODVVODEHODORQJZLWKWKHOHYHORILQWHUFRUUHODWLRQ DPRQJWKHP(TXDWLRQ IRUPDOL]HVWKHKHXULVWLF *6 =
N UFI
N + N N − U II
ZKHUH*6LVWKHKHXULVWLFPHULWRIDQDWWULEXWHVXEVHW6FRQWDLQLQJNDWWULEXWHVUFILVWKH PHDQDWWULEXWHFODVVFRUUHODWLRQIɽ6 DQGUIILVWKHDYHUDJHDWWULEXWHDWWULEXWHLQWHUFRU UHODWLRQ 7KH QXPHUDWRU JLYHV DQ LQGLFDWLRQ KRZ SUHGLFWLYH RI WKH FODVV D JURXS RI DWWULEXWHV LV ZKLOH WKH GHQRPLQDWRU VKRZV WKH OHYHO RI UHGXQGDQF\ DPRQJ DWWULEXWHV 7KHUHIRUH WKH GHILQHG TXDOLW\ IXQFWLRQ ZLOO VHHN IRU DWWULEXWH VXEVHWV WKDW DUH KLJKO\ FRUUHODWHGWRFODVVDWWULEXWHZKLOHKDYLQJDORZLQWHUFRUUHODWLRQ ,QRUGHUWRDSSO\ WRHVWLPDWHWKHPHULWRIDQDWWULEXWHVXEVHWZHQHHGWRFRPSXWH WKH FRUUHODWLRQ EHWZHHQ DWWULEXWHV 1XPHULF DWWULEXWHV DUH FRQYHUWHG WR QRPLQDO XVLQJ VXSHUYLVHG GLVFUHWL]DWLRQ SUHSURFHVVLQJ RSHUDWLRQ &RUUHODWLRQ OHYHO EHWZHHQ QRPLQDO DWWULEXWHVLVHVWLPDWHGXVLQJDPHDVXUHEDVHGRQLQIRUPDWLRQWKHRU\LI;DQG<DUHGLV FUHWHUDQGRPYDULDEOHV DQG JLYHWKHHQWURS\RI<EHIRUHDQGDIWHUREVHUYLQJ; + < = −å S \ ORJ S \
\∈<
+ < ; = − å S [ [∈;
å S \ [ ORJ \∈<
S \ [
7KHDPRXQWE\ZKLFKWKHHQWURS\RI<GHFUHDVHVDIWHUREVHUYLQJ;DQGYLFHYHUVD LV FDOOHGLQIRUPDWLRQJDLQDQGLVJLYHQE\ JDLQ = + < − + < ; = +; − +; <
= + < + + ; − + ; <
8QIRUWXQDWHO\ LQIRUPDWLRQ JDLQ LV ELDVHG LQ IDYRXU RI DWWULEXWHV ZLWK PDQ\ YDOXHV )XUWKHUPRUHWKHFRUUHODWLRQVLQ VKRXOGEHQRUPDOL]HG6\PPHWULFDOXQFHUWDLQW\ FRPSHQVDWHVIRULQIRUPDWLRQJDLQ¶VELDVDQGQRUPDOL]HVLWVYDOXHWRWKHUDQJH>@ é ù JDLQ 68 = × ê ú ë + < + + ; û
7KHYDOXHRILQGLFDWHVWKDW;DQG<KDYHQRDVVRFLDWLRQZKLOHWKHYDOXHRILQGLFDWHV WKDWNQRZOHGJHRI;FRPSOHWHO\SUHGLFWV< +DYLQJWKHTXDOLW\IXQFWLRQIRUHYDOXDWLQJDWWULEXWHVXEVHWVDWWULEXWHVHOHFWLRQQHHGV VHDUFK DOJRULWKP IRU WUDYHUVLQJ WKH VSDFH RI SRWHQWLDO VROXWLRQV 6LQFH WKH VL]H RI WKLV VSDFHLVH[SRQHQWLDOLQQXPEHURIDWWULEXWHVDQH[KDXVWLYHVHDUFKLVXVXDOO\LQWUDFWDEOH )URP WKH YDULHW\ RI KHXULVWLF VHDUFK VWUDWHJLHV ZH DGRSWHG EHVW ILUVW VHDUFK DV LW JDYH VOLJKWO\ EHWWHU UHVXOWV LQ VRPH FDVHV 7KH EHVW ILUVW VHDUFK VWDUWV ZLWK DQ HPSW\ VHW RI DWWULEXWHV DQG JHQHUDWHV DOO SRVVLEOH VLQJOH DWWULEXWH H[SDQVLRQV 7KH VXEVHW ZLWK WKH KLJKHVW HYDOXDWLRQ LV FKRVHQ DQG H[SDQGHG LQ WKH VDPH PDQQHU E\ DGGLQJ VLQJOH DWWULEXWHV,IH[SDQGLQJDVXEVHWUHVXOWVLQQRLPSURYHPHQWWKHVHDUFKGURSVEDFNWRWKH
204
$1,17(*5$7(',17(//,*(176<67(0
QH[W EHVW XQH[SDQGHG VXEVHW DQG FRQWLQXHV IURP WKHUH *LYHQ HQRXJK WLPH EHVW ILUVW VHDUFKZLOOH[SORUHWKHHQWLUHDWWULEXWHVXEVHWVSDFHVRLWLVFRPPRQWROLPLWWKHQXPEHU RI VXEVHWV H[SDQGHG WKDW UHVXOW LQ QR LPSURYHPHQW 7KH EHVW VXEVHW IRXQG LV UHWXUQHG ZKHQWKHVHDUFKWHUPLQDWHV &ODVVLILFDWLRQ3URFHGXUHV 'XHWRWKHHVVHQWLDOLPSDFWWKDWPRGHOOLQJWHFKQLTXHVKDYHRQWKHGDWDPLQLQJSURFHVV WKLV LV WKH PRVW FKDOOHQJLQJ SDUW RI WKH RSHUDWLRQ LWVHOI :H DGRSWHG GLIIHUHQW GDWD PLQLQJ VFKHPHV IRU SUREDELOLVWLF DQG GHVFULSWLYH PRGHOOLQJ KDYLQJ LQ PLQG W\SH RI WDUJHWSUREOHPV 7KH SUREDELOLVWLF FKDUDFWHU RI W\SLFDO EXVLQHVV SUREOHPV FDOOV IRU GDWD PLQLQJ WHFK QLTXH WKDW DVVRFLDWHV SUREDELOLW\ ZLWK HDFK SUHGLFWLRQ 0RUHRYHU UHODWLYHO\ VPDOO SURSRUWLRQ RI WKH WDUJHW FRQFHSW VXJJHVWV WKDW WKH PRGHOOLQJ WHFKQLTXH VKRXOG EH FRVW VHQVLWLYH 6DWLVI\LQJ ERWK UHTXLUHPHQWV 1DLYH %D\HV FODVVLILHUV SURYLGH D SURPLVLQJ VROXWLRQWRSUREDELOLVWLFNQRZOHGJHLQGXFWLRQWKH\DUHLQKHUHQWO\FRVWVHQVLWLYHDQGGHDO H[SOLFLWO\ ZLWK LVVXHV RI XQFHUWDLQW\ DQG QRLVH ZKLFK DUH FHQWUDO SUREOHPV RI DQ\ LQGXFWLRQWDVNLQWKHUHDOZRUOGDSSOLFDWLRQV>@,WLVWHUPHGQDLYHEHFDXVHLWUHOLHVRQ RQH LPSRUWDQW VLPSOLI\LQJ DVVXPSWLRQ LW DVVXPHV WKDW WKH SUHGLFWLYH DWWULEXWHV DUH FRQGLWLRQDOO\LQGHSHQGHQWJLYHQWKHFODVV1DLYH%D\HVVFKHPHXVHV%D\HV¶IRUPXOD WRFRPSXWHWKHSUREDELOLW\RIHDFKFODVVJLYHQWKHYHFWRURIREVHUYHGDWWULEXWHYDOXHV[ DQGWKHPRVWSUREDEOHFODVVFLVSUHGLFWHG S& = F ; = [ =
S& = F S ; = [ & = F S ; = [
,Q &VWDQGVIRUWKHUDQGRPYDULDEOHGHQRWLQJWKHFODVVRIDQLQVWDQFHDQG;UHSUH VHQWVDYHFWRURIUDQGRPYDULDEOHVGHQRWLQJWKHREVHUYHGDWWULEXWHYDOXHV $OWKRXJK PDQ\ RWKHU FODVVLILFDWLRQ WHFKQLTXHV FDQ RXWSXW SUREDELOLWLHV DQG PDQ\ RI WKHPFDQEHPDGHFRVWVHQVLWLYHH[SHULPHQWVRQUHDOZRUOGGDWDKDYHUHSHDWHGO\VKRZQ WKDW1DLYH%D\HVVFKHPHLVFRPSHWLWLYHZLWKPRUHVRSKLVWLFDWHGLQGXFWLRQDOJRULWKPV ,QRXURZQH[SHULPHQWZHHYDOXDWHGGLIIHUHQWFODVVLILHUVXVLQJTXDGUDWLFORVVIXQFWLRQ RQ VHYHUDO GDWDVHWV IRU W\SLFDO EXVLQHVV SUREOHPV ZLWK QRQGHWHUPLQLVWLF SURSHUWLHV 6WDWLVWLFDO WHVWLQJ XVLQJ SDLUHG WWHVW VKRZHG VLJQLILFDQW GLIIHUHQFH LQ SHUIRUPDQFH RI 1DLYH%D\HVFRPSDUHGWRRWKHUFODVVLILHUVLQPDQ\FDVHV 7KHVHHQFRXUDJLQJUHVXOWVFUHDWHGPRWLYDWLRQIRUH[SORULQJH[WHQVLRQVRI1DLYH%D\HV VFKHPHWKDWOHVVHQGHSHQGHQFHRQLWVDVVXPSWLRQVEXWUHWDLQLWVLQKHUHQWVLPSOLFLW\DQG FOHDUSUREDELOLVWLFVHPDQWLFV$WWULEXWHVHOHFWLRQSUHSURFHVVLQJRSHUDWLRQIRUHOLPLQDWLQJ UHGXQGDQW DWWULEXWHV PLWLJDWHV WKH LQGHSHQGHQFH DVVXPSWLRQ $QRWKHU DVVXPSWLRQ QRW LQWULQVLFWRWKH1DLYH%D\HVDSSURDFKEXWRIWHQPDGHQHYHUWKHOHVVLVWKDWZLWKLQHDFK FODVVWKHYDOXHVRIQXPHULFDWWULEXWHVKDYHQRUPDORU*DXVVLDQSUREDELOLW\GLVWULEXWLRQ 7KHUHIRUHIRUDQXPHULFDWWULEXWH;LSUREDELOLW\GHQVLW\IXQFWLRQIRUDQRUPDOGLVWULEX WLRQLVRIWHQXVHGWRHVWLPDWHS;L [L_& F ZKHUH
S ; L = [L & = F = J [L μ F σ F J [ μ σ =
πσ
205
−
H
[− μ σ
8-(9,&%2*8129,&
+RZHYHU LV QRW VWULFWO\ FRUUHFW WKH SUREDELOLW\ WKDW D FRQWLQXRXV UDQGRP YDULDEOH H[DFWO\HTXDOVDQ\YDOXHLV7KHUHIRUHWKHSUREDELOLW\RIDYDULDEOHO\LQJZLWKLQVRPH LQWHUYDOLVFRQVLGHUHG [+Δ S [ ≤ ; ≤ [ + Δ = J [ μ σ G[
ò
[
'HILQLWLRQRIWKHGHULYDWLYHJLYHV OLP Δ →
S [ ≤ ; ≤ [ + Δ = J [ μ σ Δ
7KXVIRUVRPHYHU\VPDOOFRQVWDQWΔZHKDYHS; [ ≈J[μσ ×Δ7KHIDFWRUΔWKHQ DSSHDUVLQWKHQXPHUDWRURI IRUHDFKFODVV7KH\FDQFHORXWZKHQQRUPDOL]DWLRQLV SHUIRUPHGVR PD\EHHPSOR\HG $OWKRXJKDSSO\LQJDVLQJOH*DXVVLDQZKHQPRGHOOLQJQXPHULFDWWULEXWHVPD\SURYLGH DUHDVRQDEOHDSSUR[LPDWLRQWRPDQ\UHDOZRUGSUREOHPVLWLVFHUWDLQO\QRWDOZD\VWKH EHVWDSSUR[LPDWLRQ2XUFODVVLILFDWLRQHQYLURQPHQWDEDQGRQVQRUPDOLW\DVVXPSWLRQDQG XVHV DQ H[WHQVLRQ RI WKH 1DLYH %D\HV DOJRULWKP WKDW H[SORLWV VWDWLVWLFDO PHWKRGV IRU QRQSDUDPHWULF GHQVLW\ HVWLPDWLRQ RI QXPHULF DWWULEXWHV )URP D ZLGH YDULHW\ RI VXFK PHWKRGV ZH WRRN NHUQHO GHQVLW\ HVWLPDWLRQ XVLQJ *DXVVLDQ NHUQHOV >@ 7KHUHIRUH ZKHQHVWLPDWLQJS;L [L_& F IRUDQXPHULFDWWULEXWH;LZHXVH S ; L = [L & = F =
å J [L μ N σ F Q N
ZKHUH N UDQJHV RYHU WKH WUDLQLQJ SRLQWV RI DWWULEXWH ;L LQ FODVV F DQG μN [N 7KLV DSSHDUVYHU\VLPLODUWR H[FHSWWKDWWKHHVWLPDWHGGHQVLW\LVDYHUDJHGRYHUDODUJHVHW RINHUQHOV7KHWKLQOLQHLQ)LJXUHVKRZVWKHGHQVLW\IXQFWLRQHVWLPDWHGXVLQJQRUPDO SUREDELOLW\ GLVWULEXWLRQ ZKLOH WKH EROG OLQH VKRZV GHQVLW\ HVWLPDWLRQ XVLQJ *DXVVLDQ NHUQHOV%RWKHVWLPDWLRQVDUHEDVHGRQWKHVDPHGDWDVHWFRQWDLQLQJVDPSOHGSRLQWV ([SHULPHQWV KDYH VKRZQ WKDW WKLV H[WHQVLRQ WR 1DLYH %D\HV DOJRULWKP ZDV YHU\ XVHIXODOWKRXJKLWOHGWRVRPHLQFUHDVHLQVWRUDJHDQGFRPSXWDWLRQDOFRPSOH[LW\ )RU GDWDVHW GHVFULSWLRQ SXUSRVHV ZH KDYH LPSOHPHQWHG D YDULDWLRQ RI ZHOONQRZQ &DOJRULWKPIRUFRQVWUXFWLQJGHFLVLRQWUHHV>@'HFLVLRQWUHHJHQHUDWRULVHPSOR\HG DIWHULVRODWLQJLQWHUHVWLQJLQVWDQFHVLQWKHSURFHVVRIHYDOXDWLQJSUREDELOLVWLFPRGHO7KH LQWHUQDO VWUXFWXUH RI DQ LQWHUHVWLQJ VXEVHW RI LQVWDQFHV LV H[SOLFDWHG LQ D IRUP RI D 6DPSOH 1RUPDOGLV WULEXWLRQHVWLPDWLRQ .HUQHOGHQV LW\ HVWLPDWLRQ
)LJXUH1RUPDOGLVWULEXWLRQYHUVXVNHUQHOGHQVLW\HVWLPDWLRQ 206
$1,17(*5$7(',17(//,*(176<67(0
GHFLVLRQWUHHWKDWUHODWHVLQVWDQFHSURSHUWLHVWRWKHFODVVLILFDWLRQRXWFRPH7KHREWDLQHG GHVFULSWLRQ UHYHDOV YDOXDEOH EXVLQHVV LQIRUPDWLRQ WKDW FDQ LQIOXHQFH WKH RXWFRPH RI D GHFLVLRQPDNLQJSURFHVV*DLQLQJLQVLJKWLQWRWKHQDWXUHRIWKHLQYHVWLJDWHGSUREOHPE\ GLVFRYHULQJLQIRUPDWLRQVXSSRUWHGE\WKHGDWDFDQEHPRUHLPSRUWDQWWKDQWKHDELOLW\WR PDNHSUHGLFWLRQIRUQHZH[DPSOHV :LWK QRLV\ GDWD GHFLVLRQ WUHH LQGXFWLRQ SURFHGXUHV DUH VXVFHSWLEOH WR RYHUILWWLQJ SUREOHP 'HFLVLRQ WUHH SUXQLQJ WHFKQLTXHV DUH FRPPRQ VROXWLRQ WR WKLV SUREOHP :H DGRSWHGWZRGLIIHUHQWSUXQLQJRSHUDWLRQVLQRUGHUWRDYRLGRYHUILWWLQJVXEWUHHUHSODFH PHQWDQGVXEWUHHUDLVLQJ%RWKRIWKHPWU\WRUHDUUDQJHWKHVWUXFWXUHRIVXLWDEOHVXEWUHHV E\UHPRYLQJXQQHFHVVDU\QRGHVSURGXFLQJVPDOOHUDQGVLPSOHUWUHHV7KHDPSOLWXGHRI ERWKSUXQLQJRSHUDWLRQVPD\EHFRQWUROOHGE\VHWWLQJSDUDPHWHUVZLWKLQWKHDSSOLFDWLRQ 9LVXDO(YDOXDWLRQRIWKH&ODVVLILFDWLRQ3URFHGXUHV 7\SLFDOO\GDWDPLQLQJSURFHVVRSHUDWHVLQF\FOHVWKDWHQFRPSDVVGHFLVLRQRQWKHLQSXW GDWD OHDUQLQJ VXEVHW GDWD FOHDQLQJ DQG ILOWHULQJ DSSOLFDWLRQ RI PLQLQJ DOJRULWKP SUHVHQWDWLRQRIWKHRXWSXWNQRZOHGJHDQGHYDOXDWLRQRIWKHV\VWHPSHUIRUPDQFHRQWKH XQVHHQ WHVW GDWD VXEVHW $ VLQJOH SDVV WKURXJK WKH DERYH SKDVHV FDQQRW DFKLHYH DQ DSSUHFLDEOH UHVXOW 5DWKHU GDWD PLQLQJ SURFHVV VKRXOG UHSHDWHGO\ EXLOG DQG HYDOXDWH PDQ\HOLFLWHGPRGHOVDVZRXOGVHYHUDOH[SHUWVDQDO\VHGDWDVHWIURPGLIIHUHQWSHUVSHF WLYHV DQG ZLWK GLIIHUHQW FULWHULD ,Q RUGHU WR DFKLHYH VLJQLILFDQW LPSURYHPHQW LQ GDWD PLQLQJ SURFHVV GDWD PLQLQJ WRROV VKRXOG LPSOHPHQW D SHUIRUPDQFH HYDOXDWLRQ WHFK QLTXH 7KLV HYDOXDWLRQ IDFLOLW\ ZRXOG DVVLVW LQ WXQLQJ V\VWHPV SDUDPHWHUV GXULQJ HDFK LWHUDWLRQDQGHQDEOHVLJQLILFDQWO\IDVWHUFRQYHUJHQFHWRZDUGVWKHILQDOPRGHO 7KH1DLYH%D\HVFODVVLILHURXWSXWVSUREDELOLWLHVDVWKHUHVXOWRIFODVVLILFDWLRQ8VLQJ WKHVHSUREDELOLWLHVWRIRUPDFUHGLEOHFDWHJRULFDOSUHGLFWLRQLVQRWWKHULJKWIRUPXODWLRQ RI WKH SUHGLFWLRQ WDVN ZKHQ GHDOLQJ ZLWK W\SHV RI SUREOHPV GHVFULEHG DERYH 0RUH UHDOLVWLF IRUPXODWLRQ LV WR ILQG D VXEVHW RI WKH H[DPSOHV ZLWK D KLJK SURSRUWLRQ RI WKH WDUJHW FRQFHSW RUHTXLYDOHQWO\WRILQGDVXEVHWRIWKHH[DPSOHVZLWK D SUREDELOLW\ RI EHORQJLQJ WR WKH WDUJHW FRQFHSW DERYH VRPH ERXQGDU\ SUREDELOLW\ &DUGLQDOLW\ RI WKH VXEVHWRUWKHSUREDELOLW\ERXQGDU\ XVXDOO\GHSHQGVRQWKHFRVWVDQGEHQHILWVLQYROYHG LQ EXVLQHVV GRPDLQ RI WKH SUREOHP 5HJXODUO\ PDQ\ GLIIHUHQW VXEVHW VL]HV ZLOO EH FRQVLGHUHGEHIRUHWKHRSWLPDOFDUGLQDOLW\LVHVWDEOLVKHG 7KHDELOLW\RIDGDWDPLQLQJWRROWRLVRODWHVXEVHWVRIH[DPSOHVZLWKKLJKSURSRUWLRQ RIWDUJHWFRQFHSWGHSHQGVRQWKHVL]HRIWKHVXEVHW&OHDUO\WKHKLJKHUWKHSURSRUWLRQLV IRU WKH JLYHQ VXEVHW FDUGLQDOLW\ WKH EHWWHU SHUIRUPDQFH GDWD PLQLQJ WRRO LV H[SRVLQJ 'HSHQGHQFH EHWZHHQ WKH WDUJHW FRQFHSW SURSRUWLRQ DQG WKH VXEVHW FDUGLQDOLW\ FDQ EH JUDSKLFDOO\GHSLFWHGDVDWZRGLPHQVLRQDOFKDUW7KHKRUL]RQWDOD[LVRIWKHFKDUWVKRZV WKH VDPSOH VL]H H[SUHVVHG DV WKH SHUFHQWDJH RI WKH WRWDO QXPEHU RI H[DPSOHV 7KH YHUWLFDOD[LVSORWVWKHFRUUHVSRQGLQJQXPEHURIWDUJHWFRQFHSWVLQFOXGHGLQWKHVDPSOH RIWHQH[SUHVVHGDVSHUFHQWDJHRIWKHWRWDOQXPEHURIWKHWDUJHWFRQFHSWV 7KLVNLQGRI FKDUWLVFDOOHGDOLIWFKDUWDQGLWUHSUHVHQWVDYDOXDEOHYLVXDOHYDOXDWLRQWRROZLGHO\XVHG LQ PDQ\ EXVLQHVV DUHDV HVSHFLDOO\ LQ PDUNHWLQJ >@ %HLQJ DFFHSWHG DQG XQGHUVWRRG DPRQJ EXVLQHVV GRPDLQ H[SHUWV OLIW FKDUWV HQDEOH IDVWHU HYDOXDWLRQ DQG WXQLQJ RI WKH V\VWHPSDUDPHWHUVUHVXOWLQJLQEHWWHUFODVVLILFDWLRQSHUIRUPDQFH 2XU GDWD PLQLQJ HQYLURQPHQW LQFOXGHV OLIW FKDUW JHQHUDWRU XVHG WR HYDOXDWH WKH SHU IRUPDQFH RI WKH LQGXFHG 1DLYH %D\HV FODVVLILHU %\ WDNLQJ LQWR DFFRXQW WKH FRVWV DQG
207
8-(9,&%2*8129,&
EHQHILWV RI D QXPEHU RI GLIIHUHQW VFHQDULRV WKH XVHU FDQ VHW GHVLUHG H[DPSOHV VXEVHW FDUGLQDOLW\ ,Q WKLV ZD\ WKH PRVW SURPLVLQJ VXEVHW LV FKRVHQ DQG WKH VXSSOHPHQWDU\ EXLOWLQGHFLVLRQWUHHJHQHUDWRUFDQGHVFULEHLW )LJXUH VKRZV D VDPSOH OLIW FKDUW JHQHUDWHG E\ RXU FODVVLILFDWLRQ HQYLURQPHQW 7KH GLDJRQDOOLQHUHSUHVHQWVWKHH[SHFWHGUHVXOWIRUGLIIHUHQWO\VL]HGUDQGRPVDPSOHV8SSHU OLQHLVGHULYHGE\XVLQJVDPSOHVZLWKKLJKSURSRUWLRQRIWDUJHWFRQFHSWDFFRUGLQJWRWKH GDWDPLQLQJWRROLQGLFDWLQJWKHSHUIRUPDQFHRILQGXFHGFODVVLILHU2EYLRXVO\RSHUDWLQJ SDUWRIDOLIWFKDUWLVWKHXSSHUWULDQJOHIDUWKHUWRWKHXSSHUOHIWFRUQHUWKHEHWWHU2QHRI SRVVLEOHVFHQDULRVLVPDUNHGFODVVLILHULVDEOHWR LGHQWLI\ DVXEVHW RI RI WKH WRWDO QXPEHURILQVWDQFHVWKDWLQFOXGHVRIDOOSRVLWLYHLQVWDQFHV
([SHULPHQWDO9DOXDWLRQRIWKH,QWHJUDWHG'DWD0LQLQJ(QYLURQPHQW ,Q RUGHU WR LOOXVWUDWHWKH SUHGLFWLYH SRZHU RI WKH GHVFULEHG GDWD FODVVLILFDWLRQ HQYLURQ PHQW ZH KDYH SUHVHQWHG WKH FRQFOXVLYH UHVXOWV RI DQ LQVXUDQFH EXVLQHVV SUREOHP 2ULJLQDOO\WKHSUREOHPZDVIRUPXODWHGDVDGDWDPLQLQJFRPSHWLWLRQRUJDQL]HGE\WKH &RPSXWDWLRQDO ,QWHOOLJHQFH DQG /HDUQLQJ &OXVWHU &R,/ D QHWZRUN RI H[FHOOHQFH VSRQVRUHGE\(8>@7KHFRPSHWLWLRQZDVKHOGLQ\HDUEXWKHUHZHKDYHDGRSWHG LWRQO\DVDEHQFKPDUNRIRXUGDWDFODVVLILFDWLRQHQYLURQPHQW 7KHWDVNZDVEDVHGRQDUHDOZRUOGSUREOHPRIGLUHFWPDLODGYHUWLVLQJLQWKHLQVXUDQFH EXVLQHVV'LUHFWPDLOLQJWRFRPSDQ\¶VSRWHQWLDOFXVWRPHUVLVHIIHFWLYHZD\RIPDUNHWLQJ DSURGXFW+RZHYHUPRVWRIWKLVPDLOHQGVXSWKURZQDZD\EHFDXVHLW¶VRIQRLQWHUHVW WR PDMRULW\ RI SHRSOH WKDW UHFHLYH LW 7KHUHIRUH EHWWHU WDUJHWLQJ RI SURVSHFWLYH FOLHQWV SOD\VLPSRUWDQWUROHLQVHWWLQJXSPRUHHIIHFWLYHGLUHFWPDUNHWLQJFDPSDLJQVUHVWULFWLQJ WKH PDLORXW WR WKH FOLHQWV VXVFHSWLEOH IRU EX\LQJ D VSHFLILF SURGXFW FDQ LQFUHDVH WKH FDPSDLJQUHVSRQVHZKLOHUHGXFLQJWKHFRVWVDQGYROXPHRIWKHFDPSDLJQLWVHOI 7KHJRDORIWKHFKDOOHQJHZDVWRSUHGLFWZKRZRXOGEHLQWHUHVWHGLQEX\LQJDFDUDYDQ LQVXUDQFH SROLF\ DQG WR H[SODLQ ZK\ ,QIRUPDWLRQ DERXW FXVWRPHUV FRQVLVWHG RI DWWULEXWHV FRQWDLQLQJ VRFLRGHPRJUDSKLF GDWD DWWULEXWHV HJ QXPEHU RI KRXVHV
)LJXUH,QWHJUDWLRQRIDOLIWFKDUWLQWRWKHGDWDPLQLQJHQYLURQPHQW 208
$1,17(*5$7(',17(//,*(176<67(0
SXUFKDVLQJSRZHUFODVVHWF DQGSURGXFWRZQHUVKLSGDWDDWWULEXWHVHJQXPEHURI ERDWSROLFLHVFRQWULEXWLRQFDUSROLFLHVHWF 7KHWUDLQLQJVHWFRQVLVWHGRIGHVFULS WLRQV RIFXVWRPHUVZLWKNQRZQ FODVVLILFDWLRQDQG WKHWHVW VHW RI GHVFULSWLRQV IRU ZKLFKRQO\WKHRUJDQL]HUVNQHZWKHFODVVLILFDWLRQ 7KH XQGHUO\LQJ SUREOHP ZDV WR ILQG WKH VXEVHW RI FXVWRPHUV ZLWK WKH SUREDELOLW\ RI KDYLQJ D FDUDYDQ LQVXUDQFH SROLF\ DERYH VRPH ERXQGDU\ SUREDELOLW\ 7KH ERXQGDU\ GHSHQGV RQ WKH FRVWV DQG EHQHILWV VXFK DV WKH FRVWV RI PDLOLQJ DQG EHQHILW RI VHOOLQJ LQVXUDQFH SROLFLHV 7R VLPSOLI\ WKH SUREOHP WKH WDVN ZDV WR LVRODWH WKH VHW RI FXVWRPHUVLQWKHWHVWVHWWKDWFRQWDLQVWKHPRVWFDUDYDQSROLF\RZQHUV7KHQXPEHURI DFWXDO SROLF\KROGHUV DPRQJ WKHP JDYH WKH VFRUH RI D VROXWLRQ 2I WKH UHJLVWHUHG SDUWLFLSDQWV KDYH VHQW WKH VROXWLRQ 7KH PD[LPXP QXPEHU RI SROLF\ RZQHUV WKDW FRXOGEHIRXQGZDV7KHZLQQLQJPRGHOVHOHFWHGSROLF\RZQHUVILUVWUXQQHUXS VHOHFWHGDQGVHFRQGUXQQHU XS SROLF\RZQHUV 2XU FODVVLILFDWLRQ HQYLURQPHQW ZDVDEOHWRVHOHFWSROLF\RZQHUVLQWKHILUVWPRGHOOLQJLWHUDWLRQ7KLVZRXOGTXDOLI\ EHWZHHQ ILUVW DQG VHFRQG UHVXOW RI WKH FRPSHWLWLRQ ZKLFK LV DQ DSSUHFLDEOH VXFFHVV FRQFHUQLQJWKHDFDGHPLFDQGLQGXVWU\EDFNJURXQGRIWKHSDUWLFLSDQWV $QLQWHUHVWLQJSURSHUW\RIRXUPRGHOZDVWKDWRQO\RIDYDLODEOHDWWULEXWHVZHUH XVHG WR IRUP WKH SUHGLFWLRQ $WWULEXWH VHOHFWLRQ DOJRULWKP SLFNHG RQO\ RQH VRFLR GHPRJUDSKLF DWWULEXWH DQG VHYHQ SURGXFW RZQHUVKLS DWWULEXWHV 8VLQJ WKLV H[WHQVLYHO\ UHGXFHG DWWULEXWH VHW RXU GDWD DQDO\VLV HQYLURQPHQW SURGXFHG SRZHUIXO SUREDELOLVWLF PRGHO IRU SUHGLFWLQJ SRWHQWLDO FXVWRPHUV 0RUHRYHU DWWULEXWH VHOHFWLRQ DOVR LPSURYHG LQGXFHGGHVFULSWLRQTXDOLW\± UHGXFHG QXPEHU RI DWWULEXWHV UHVXOWHG LQ UHODWLYHO\ VPDOO DQGFRPSUHKHQVLEOHGHFLVLRQWUHHGHVFULELQJSRWHQWLDOFXVWRPHUV
&RQFOXVLRQ 'HVSLWHWKHVLPSOLI\LQJDVVXPSWLRQVWKDWXQGHUOLHWKH1DLYH%D\HVFODVVLILHUVWKH\KDYH HPHUJHGDVPDMRUDOWHUQDWLYHWRPRUHHVWDEOLVKHGGDWDPLQLQJDSSURDFKHVZKHQGHDOLQJ ZLWK UHDO ZRUOG EXVLQHVV SUREOHPV 7KHRUHWLFDOO\ VRXQG DSSURDFK WR XQFHUWDLQW\ DQG QRLVHLVUHJDUGHGDVFUXFLDOWRUHVSHFWDEOHSHUIRUPDQFHRQUHDOZRUOGGDWD:HH[SORUHG H[WHQVLRQV DQG UHILQHPHQWV RI 1DLYH %D\HV VFKHPH WKDW GLPLQLVK WKH LQIOXHQFH RI WKH DVVXPSWLRQV WKH DOJRULWKP RSHUDWHV XQGHU 7KH DWWULEXWH LQGHSHQGHQFH DVVXPSWLRQ LV FRPSHQVDWHGE\WKHDWWULEXWHVHOHFWLRQDOJRULWKPDQGQRUPDOLW\DVVXPSWLRQIRUQXPHULF DWWULEXWHVLVDEDQGRQHGLQIDYRXURINHUQHOGHQVLW\HVWLPDWLRQ ([SHULPHQWV KDYH VKRZQ WKDW WKH HPSOR\HG DWWULEXWH VHOHFWLRQ PHWKRG FRPSDUHV IDYRXUDEO\ZLWKWKHZUDSSHUZKHQXVHGZLWKFRPPRQPDFKLQHOHDUQLQJDOJRULWKPVEXW UHTXLUHV PXFK OHVV FRPSXWDWLRQ0RUHRYHUDGRSWHG KHXULVWLF DJJUHVVLYHO\ UHGXFHV WKH GLPHQVLRQDOLW\ RI WKH GDWD HQDEOLQJ OHDUQLQJ DOJRULWKP WR RSHUDWH IDVWHU DQG PRUH HIIHFWLYHO\7KHLPSDFWRIXVLQJDWWULEXWHVHOHFWLRQLQRXUFODVVLILFDWLRQHQYLURQPHQWZDV EHQHILFLDOIRUERWKLPSOHPHQWHGOHDUQLQJVFKHPHV$VH[SHFWHGFODVVLILFDWLRQDFFXUDF\ IRU 1DLYH %D\HV LPSURYHG EHFDXVH UHGXQGDQW DWWULEXWHV ZHUH HOLPLQDWHG IURP WKH WUDLQLQJ GDWD 2Q WKH RWKHU VLGH & W\SH GHFLVLRQ WUHH JHQHUDWRU H[SOLFLWO\ WULHV WR IRFXV RQ UHOHYDQW DWWULEXWHV &RQVHTXHQWO\ DWWULEXWH VHOHFWLRQ VKRZHG RQO\ PLQRU LQIOXHQFHRQFODVVLILFDWLRQDFFXUDF\1HYHUWKHOHVVJHQHUDWHGGHFLVLRQWUHHV ZHUH RIWHQ VPDOOHUDQGPRUHFRPSDFWDQGWKHUHIRUHHDVLHUWRXQGHUVWDQG ,QVWHDG RI D QRUPDOLW\ DVVXPSWLRQ ZH DGRSWHG WKH NHUQHO GHQVLW\ HVWLPDWLRQ XVLQJ *DXVVLDQ NHUQHOV ZKHQ PRGHOOLQJ SUREDELOLW\ GLVWULEXWLRQ IRU QXPHULF DWWULEXWHV
209
8-(9,&%2*8129,&
([SHULPHQWVKDYHVKRZQWKDWWKLVH[WHQVLRQWR1DLYH%D\HVDOJRULWKPZDVYHU\XVHIXO DOWKRXJKLWOHGWRVRPHLQFUHDVHLQVWRUDJHDQGFRPSXWDWLRQDOFRPSOH[LW\,QDQXPEHU RI FDVHV ZKHUH QRUPDOLW\ DVVXPSWLRQ ZDV YLRODWHG LW SHUIRUPHG VLJQLILFDQWO\ EHWWHU ZKLOHKDYLQJOLWWOHFRVWLQWKHFDVHVZKHUHWKHDVVXPSWLRQKHOG 0RUHRYHULQWHJUDWLRQRIDOOWKHSKDVHVRIGDWDPLQLQJSURFHVVZLWKLQDVLQJOHDSSOL FDWLRQ HQYLURQPHQW SURYLGHV PRUH FRQWURO RYHU WKH SURFHVV LWVHOI PDNLQJ LW PRUH LQWHUDFWLYHDQGFRQVHTXHQWO\PRUHHIILFLHQW7KLVSDUWLFXODUO\SHUWDLQVWRWKHHPEHGGHG SHUIRUPDQFH HYDOXDWLRQ WRRO ZKLFK SURYLGHV LQVWDQW FODVVLILFDWLRQ DFFXUDF\ IHHGEDFN DQGLPSURYHVWKHFRQYHUJHQFHWRZDUGVWKHILQDOPRGHO )LQDOO\SUHVHQWHGHYDOXDWLRQUHVXOWVLQGLFDWHWKDWRXUFODVVLILFDWLRQHQYLURQPHQWXVHV HIILFLHQW DQG UREXVW FRPELQDWLRQ RI GDWD PLQLQJ WHFKQLTXHV IRU DGGUHVVLQJ UHDOZRUOG EXVLQHVVSUREOHPVZKHUHWKHLQWHUHVWLQJSDWWHUQVDUHRIWHQPDVNHGE\KXJHDPRXQWVRI LUUHOHYDQWLQIRUPDWLRQ
5HIHUHQFHV >@ 6&KDXGKXUL 8'D\DO DQG 9*DQWL 'DWDEDVH 7HFKQRORJ\ IRU 'HFLVLRQ 6XSSRUW 6\VWHPV ,(((&RPSXWHUSDJHV'HFHPEHU >@ -+DQ 0.DPEHU 'DWD 0LQLQJ &RQFHSWV DQG 7HFKQLTXHV 0RUJDQ .DXIPDQQ 6DQ )UDQFLVFR&$ >@ 0$ +DOO DQG /$ 6PLWK 3UDFWLFDO )HDWXUH 6XEVHW 6HOHFWLRQ IRU 0DFKLQH /HDUQLQJ ,Q 3URFHHGLQJV RI WKH VW $XVWUDODVLDQ &RPSXWHU 6FLHQFH &RQIHUHQFH SDJHV 6SULQJHU >@ 3/DQJOH\:,EDDQG.7KRPSVRQ$Q$QDO\VLVRI%D\HVLDQFODVVLILHUV,Q3URFHHGLQJV RIWKHWK1DWLRQDO&RQIHUHQFHRQ$UWLILFLDO,QWHOOLJHQFHSDJHV >@ *+-RKQDQG3/DQJOH\(VWLPDWLQJ&RQWLQXRXV'LVWULEXWLRQVLQ%D\HVLDQ&ODVVLILHUV,Q 3URFHHGLQJV RI WKH WK &RQIHUHQFH RQ 8QFHUWDLQW\ LQ $UWLILFLDO ,QWHOOLJHQFH 0RUJDQ .DXIPDQQ6DQ0DWHR >@ -54XLQODQ & 3URJUDPV IRU 0DFKLQH /HDUQLQJ 0RUJDQ .DXIPDQQ 6DQ )UDQFLVFR &$ >@ ,+:LWWHQDQG()UDQN'DWD0LQLQJ0RUJDQ.DXIPDQQ6DQ)UDQFLVFR&$ >@ 3 YDQ GHU 3XWWHQ DQG 0 YDQ 6RPHUHQ &R,/ &KDOOHQJH 7KH ,QVXUDQFH &RPSDQ\ &DVH /HLGHQ ,QVWLWXWH RI $GYDQFHG &RPSXWHU 6FLHQFH 7HFKQLFDO 5HSRUW 1HWKHUODQGV-XQH >@ :(.$3URMHFWKWWSZZZFVZDLNDWRDFQ]POZHND
$ERXWWKH$XWKRUV )LOLS 8MHYLF LV SRVWJUDGXDWH VWXGHQW RI $SSOLHG &RPSXWHU 6FLHQFH DW )DFXOW\ RI (OHFWULFDO (QJLQHHULQJDQG&RPSXWLQJ8QLYHUVLW\RI=DJUHE+LV06FWKHVLVH[SORUHVDSSOLFDWLRQRIGDWD PLQLQJ WHFKQLTXHV LQ EXVLQHVV HQYLURQPHQWV +H LV DXWKRU RI VHYHUDO SDSHUV IURP WKH DUHD RI GDWDPLQLQJDQGNQRZOHGJHGLVFRYHU\ 1LNROD %RJXQRYLF LV D IXOO SURIHVVRU DW )DFXOW\ RI (OHFWULFDO (QJLQHHULQJ DQG &RPSXWLQJ 8QLYHUVLW\ RI =DJUHE &URDWLD +LV UHVHDUFK LQWHUHVWV HQFRPSDVV WKHRU\ DQG DSSOLFDWLRQ RI DUWLILFLDOLQWHOOLJHQFHPHWKRGVDQGWHFKQLTXHVWRUHDOZRUOGSUREOHPV
210
Business Rules Modeling by Means of F-logic, UML and Ontologies (problems and possible solutions) Mirko ýubrilo1, Mirko Malekoviü1 1
Faculty of Organization and Informatics Zagreb University, Zagreb, Croatia {mcubrilo,mmalekov}@foi.hr
Abstract — The application framework, supporting the modern way of doing business, especially e–business, increasingly adopts the formal tools and techniques developed in symbolic logic framework. One of the most recent examples are agent theories and tools, used as computational models of economies, modeled as evolving systems of autonomous interacting agents (Tesfatsion, [12]), sometimes accompanied with the simulating software, such as Trade Network Game Laboratory (McFadzean and all, [8]). An appropriate formalization, however, does not yet exist in the domain of "classical" business rules. In this paper we shall analyze the questions and problems concernig the proper formalization of the R. G. Ross's business rule system and argue that the F-logic system of Kifer and all ([4]), as implemented through Flora-2 system ([13]), being a part of the XSB Prolog development environment (including the second order logic programming language HiLog), could serve as such symbolic logic framework.
1 Introduction Business rules are the backbone of business transactions between enterprises. Because of the great organizational disparity, law legislature and the ways of doing business, business rules are very difficult to formalize appropriately. The first, up to a considerably high level consistent catalogization (or systematization, but not a formalization!) of the business rules was developed by R. G. Ross in [10]. His ideas were incorporated through the implementation of the so-called business rules handling systems (such as the Rule Track). Despite of that, such catalogization of business rules system missed an appropriate formalization in the sense of a logic system. R. G. Ross, being aware of that problem, attracted some very famous scientists from the data bases theory domain to it, as a result of which they tried to formalize the business rules systems with the aid of the relational database theory and some rudiments of constraints handling theory, but without considerable success. The main goal of this paper is to analyze difficulties on the way towards appropriate business rules formalization and to suggest the proper theoretical and programming tools for the solution to that problem. There are two aspects which have to be unified here. On one side, the business subjects, systems and transactions (incorporating
211
ýUBRILO, MALEKOVIû business rules), are objects in a sense of object-oriented programming paradigm. On the other side, the business rules also display some features of logic calculi (consistency, completeness, soundness, context dependency, nonmonotonicity, etc.). Having all this in mind, and for reasons we shall explain later in this paper, we see F-Logic of Kifer and all ([4]) as the appropriate framework, capable of formalizing business rule systems. F-logic also represents the logic calculus, which combines the advantages of deductive databases with rich modeling capabilities (objects, methods, class hierarchy, nonmonotonic inheritance, signatures) of the object-oriented data model.
2 R. G. ROSS's business rules system In his book ([8]), R. G. Ross explained one rather complete catalogization of the business rules. He started with the question "What are rules?" ([10], p. 11). We quote his answer (ibid.): A rule may be defined as a constraint or a test exercised for the purpose of maintaining integrity (i.e., correctness) of data. The purpose of a rule generally is to control the updating of persistent (i.e., stored) data – in other words, the results that the execution of actions (processes) are permited to leave behind. Such control reflects desired patterns for business behavior. A rule thus embodies a formal, implementable expression of some "user requirement", usually stated in textual form using a natural language (e. g., English). This textual form is called a business rule statement. Two paragraphs later Ross says: Unfortunately, business rule statements often are ambiguos, and cannot be translated directly into an actual implementation, (i.e., into running code). The task of the rule analyst thus is to translate business rule statements into formal, precise (and implementable) rules. R. G. Ross's approach to the business rules handling is really precise, a bit less formal, but hardly directly implementable. It gives natural and sound catalogization of business rules and that represents its most valuable feature. In his method of cataloguing business rules R. G. Ross has used a kind of graphical language. On the following two pictures we can see a few of its most elementary building elements. On the picture corresponding to the Rule 14 ([10], p. 21) we can see the integrity constraint on some data. Rule 14 has an anchor, the source data type (but it could be another rule too), providing the point of reference for interpretation of the rule (here it is a customer data type) and the rule correspondent, the "target" of the rule. Rule correspondent may also be another rule. What differs rule 15 from rule 14 is symbol p instead of r. The first one always yields the value true (or undefined) (every instance of the customer anchor must have an address). The second presents a test (does the given instance of the customer anchor have an address?).
212
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES
A customer must have an address
Figure 1: Rule 14 – integrity constraint ([10], p. 21)
If a customer has an address, then…
Figure 2: Rule 15 – test, ([10], p. 21) Business rules in Ross's catalogization are divided in seven atomic types. These are: − − − − − − −
Instance verifiers Type verifiers Position verifiers Functional verifiers Comparative evaluators Mathematical evaluators Projection controllers
213
ýUBRILO, MALEKOVIû The core idea here is that the rules of each given type compute something. For example, the rules of the subtype FLUCTUATING of the rule type FUNCTIONAL VERIFIERS (type IV in Ross's classification) check if all instances of a type are different from one to the next. Each business rule class consists of many rule subtypes. On the following two pictures we can see one sample rule of the Type verifiers and Comparative evaluators types. The last rule yields a sample rule of the MUTUALLY-INCLUSIVE (MI) rule subtype, which prescribes a test to determine whether one or more correspondent types are true. In addition to seven atomic business rule classes, Ross's catalogization knows of twelve derivative rule types. They are simply composite rule types, but not from anywhere, so that they are worth of additional catalogization. For example, subtype F consists of derivatives for testing recursion in composition structures.
A team must have either a manager or a budget (or both) at all times.
Figure 3: Rule 224 – Type verifiers type, ([10], p. 96)
An employee must not manage himself, even indirectly.
Figure 4: Rule 653 – Comparative evaluators type, ([10], p. 163)
214
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES It is irrefutable that R. Ross's business rule catalogization possesses many good features, like the following ones: − Catalogization parameters are reasonably natural, combining some object-oriented and logic features of its constituents (primarily data types, their values and some simple constraints on values). − The whole catalogization possesses a high level of granularity, resulting in the possibility of precise and detailed decomposition of every (we don't know of any counterexample!) business rule statement. But, from the theoretical, and partly implementational point of view, Ross's business rule catalogization has some disadvantages, such as: − Nonexistence of a unique (minimal) canonical structure for every business rule type and its subtypes (insufficient level of uniformity in rule abstraction) − A lack of an explicitly stated inheritance mechanism between business rule types and their subtypes − Nonexistence of the business rule equivalence checking mechanism, or on a higher level, nonexistence of the business rule deduction mechanism (perhaps the composition of several complex rules could be reduced to one simple rule), or on the highest level, the nonexistence of the mechanism for reasoning about the business rules. In the rest of the paper we consider the mentioned disadvantages in the light of F-logic and point out the possible solutions in that framework. The explanation of F-Logic is given according to [3], and its implementation of Flora-2 according to [13]. For the full explanation of F-logic the reader is referred to [4]. We shall also mention another, very good implementation of F-Logic, namely the FLORID system ( [6] and [7]).
3 F-logic and its implementations 3.1 F-logic syntax The alphabet of an F-Logic language consists of a set of object constructors, playing the role of function symbols, a set of variables, several auxiliary symbols like ), (, j, J, 1, S,l,L, :, :: and the usual first-order logic connectives 5, 6 and 7. For convention, object constructors start with lowercase letters whereas variables start with uppercase letters. Object constructors play the role of F-logic function symbols. Each function symbol has an arity-a nonnegative integer that determines the number of arguments this symbol can take. Symbols of arity 0 are also called constants; symbols of arity > 1 are used to construct larger terms out of simpler ones. An id-term is a usual first-order term composed of function symbols and variables, as in first order predicate calculus. The set
215
ýUBRILO, MALEKOVIû of all ground (i.e., variable-free) id-terms is commonly known as F-logic Herbrand Universe.. Conceptually, ground id-terms play the role of logical object identifiers – which are the logical abstraction of the implementational concept of physical object identity. They serve as names of objects, classes and methods. In the sequel, let o, c, c1, c2, m, p1, . . . , pn and r be id-terms for n > 0. − An is-a atom is an expression of the form o:c (o is a member of class c) or c1 :: c2 ( c1 is a subclass of c2). The following expressions are data atoms: − jo(m@( p1, . . . , pn) 1 rJ: applying the scalar method m with parameters p1, . . . , pn to o - as an object - results in r, − jo(m@( p1, . . . , pn ) S rJ: o - as a class - provides the inheritable scalar method m to its members, which, if called with parameters p1, . . . , pn, results in r, − jo(m@( p1, . . . , pn ) l rJ and jo(m@( p1, . . . , pn ) L rJ as 1 and S above for a multivalued method m. − An eq-atom is an expression of the form p1 = p2 with the meaning that p1 and p2 denote the same object. − A rule h :- b1, . . . , bk, with k ≥ 1, is a logic rule over atoms h, b1, . . . , bk. A fact is a formula h. for an atom h. − A query is a formula ?- b1, . . . , bk. for atoms b1, . . . , bk, k ≥ 1. − A program is just a set of facts and rules (like in Prolog). Many sample F-logic programs one can find in [3], [4], [5], [6] and [13]. 3.2 F-logic semantics According to the well known result of J. Herbrand, questioning the logical consequences of the given set of first order sentences can be reduced to questioning Herbrand interpretations on Herbrand Universe of that set of sentences. Therefore, in considering semantics of F-logic one can restrict herself/himself to Herbrand interpretations, where the universe consists of all ground id-terms. An H-structure is a set of ground atoms describing an object world, which means that it has to satisfy several closure axioms, related to general object-oriented properties. Let H be a (possibly infinite) set of ground atoms. Then H is an H-structure if the following conditions hold for arbitrary ground id-terms u, uo,. . . , un, ur, ur', and um:
216
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES − u :: u ∈H (subclass reflexivity), − If u1 :: u2 ∈H and u2 :: u3 ∈H then u1 :: u3∈H (subclass transitivity), − If u1 :: u2 ∈H and u2 :: u1 ∈H then u1= u2 ∈H (subclass acyclicity), − If u1 : u2 ∈H and u2 :: u3 ∈H then u1 : u3∈H (instance-subclass dependency), − If [uo(um@(u1, ..., un„)1ur]∈H and [uo(um@(u1, ..., un)1ur']∈H, then ur = ur'∈H. The same holds for S (uniqueness of scalar methods). On the ground of F-logic H-structure, the meaning of atoms and formulas is given in the usual way. Furthermore, the well known free equality axioms for = have to hold. In reasoning about knowledge in general, and in reasoning about the business rules in particular, one cannot avoid the problem of handling inheritance. The axioms above describe the so called structural inheritance (inheritance in the context of classes, subclasses and their elements). But F-logic knows of another kind of inheritance, the so called behavioral inheritance. The problem with behavioral inheritance is that it is non-monotonic, meaning that adding new facts might obviate previously established inference. Behavioral inheritance in F-logic is discussed at length in [4]. One shorter, but very interesting explanation could be found in [3]. In general, behavioral inheritance is handled through some kind of trigger semantic, which itself is implemented through socalled inheritance-canonic models [4]. The idea is to derive a minimal model of a program (as an intersection of all of its models) first, without considering inheritance at all, and then to decompose each inheritance step into a pair of steps: 1) a "pure" inheritance step, which may introduce new facts but whose output may no longer be a model of the program; and 2) a new fixpoint derivation (as a model of F-logic program) which extends the result of the previous step to a model. These operations are repeated until no more inheritance can be done. As already mentioned, a detailed explanation, including some interesting nontrivial examples, could be found in [4]. In a very recent time, Guizhen Yang, in his dissertation [14] completely solved multiple value and code inheritance problem in object-oriented knowledge bases, the Ross's business rules system shurely is a kind of. 3.3 F-logic as a programming language There are two main implementations of F-logic, the Flora-2 system ([13]) and FLORID ([7]). Flora-2 is a part of the XSB Prolog system ([11]), now in version 2.5, which also includes the higher order logic programming language HiLog. Moreover, the Flora-2 system uses the HiLog syntax as its default syntax. The whole XSB system is still in a developing process. On the Windows platform the XSB Prolog could be compiled as a DLL library and connected with other programming languages and development environments, such as that of Visual Basic, which has very good means of implementing R. G. Ross's business rule graphical language. FLORID is another very good implementation of F-logic, constantly competing on a friendly basis of exchanging ideas and programming solutions, etc. with Flora-2 (earlier it was just Flora). The FLORID system is primarily designed for UNIX operating system.
217
ýUBRILO, MALEKOVIû Here you can see the sample program in F-Logic, coming from the official Flora-2 distribution and consisting of main F-Logic program constructs and modeling persons from German TV serial The Fallers and their relationships. Here we cannot comment the program in detail. /* File: family_obj.flp ** Author(s): Bertram Ludaescher ** Contact: [email protected] ** ** Copyright (C) Bertram Ludaescher, 1998 %%%=================================================================== %%% QUERYING THE PEDIGREE OF ``THE FALLERS'' %%% (German TV serial; see: www.swf.de/diefallers/stammbaum/index.html) %%% An OBJECT-ORIENTED version of family_rel.flp %%%=================================================================== %%%=================================================================== %%% SCHEMA DATA: CLASSES & SIGNATURES %%%=================================================================== male :: person. % subclass relation female :: person. % subclass relation person[ mother=>person; father=>person; spouse=>person; husband=>person; son=>>person; daughter=>>person; brother=>>person; sister=>>person; uncle=>>person; aunt=>>person; ancestor=>>person; parent=>>person].
% some SINGLE-valued... % ... methods % some MULTI-valued... % ... methods...
%%%=================================================================== %%% INSTANCE DATA (aka EDB/BASE FACTS) %%% (partially) define mother, father, spouse, (fe)male info %%%=================================================================== wilhelm:male[spouse->rita]. rita:female. franz:male[mother->rita;father->wilhelm]. heinz:male[mother->rita;father->wilhelm]. hermann:male[mother->rita;father->wilhelm;spouse->johanna]. johanna:female. monique:female. bernhard:male[mother->johanna;father->hermann]. karl:male[mother->johanna;father->hermann;spouse->christina]. christina:female. kati:female[mother->johanna;father->hermann]. albert:male[mother->monique;father->bernhard]. eva:female[mother->kati]. %%%=================================================================== %%% RULES (aka IDB/DERIVED RELATIONS) %%%=================================================================== X[spouse->Y] :- Y[spouse->X]. % spouse is symmetric!
218
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES X[parent->>{Y}] :- X[father->Y]. X[parent->>{Y}] :- X[mother->Y]. X[son->>{Y}] :- Y[parent->>{X}], Y:male. X[daughter->>{Y}] :- Y[parent->>{X}], Y:female. X[brother->>{Y}] :- X..parent[son->>{Y}], not X=Y. X[sister->>{Y}] :- X..parent[daughter->>{Y}], not X=Y. X[brother_in_law->>{Y}] :- X..sister[spouse->Y]. X[brother_in_law->>{Y}] :- X.spouse[brother->>{Y}]. X[sister_in_law->>{Y}] :- X..brother[spouse->Y]. X[sister_in_law->>{Y}] :- X.spouse[sister->>{Y}]. X[uncle->>{Y}] X[uncle->>{Y}] X[aunt->>{Y}] X[aunt->>{Y}]
::::-
X..parent[brother->>{Y}]. X..parent[brother_in_law->>{Y}]. X..parent[sister->>{Y}]. X..parent[sister_in_law->>{Y}].
X[ancestor->>{Y}] :- X[parent->>{Y}]. X[ancestor->>{Y}] :- X..ancestor[ancestor->>{Y}]. X:illegitimate :- X[father->F; mother->M], M[spouse -> S], S\=F. %%%=================================================================== %%% QUERIES %%%=================================================================== ?- albert:C. ?- albert[M->X]. ?- albert[M->>{X}]. ?- _.S[]. ?- _..M[]. ?- _:C[].
% which classes... % ... and methods... % ... are known for Albert?
% show SINGLE-valued and... % ... MULTI-valued methods... % ... and classes
?- albert..parent..uncle[sister_in_law ->> {Y}]. % a path expression ?- X[sister_in_law->>{Y}].
4 Business Rules Modeling in F-Logic After the relatively simplified descriptions of the R.G.Ross business rule system and F-logic have been presented, we may state the main question here: What can F-logic offer to the modeling of business rules? Modeling the individual business rules in F-logic is a rather simple task. Here we formalize (already mentioned) Rule 224 in a Flora-2 notation: team:teams. % object team is an element of the class teams manager:managers. % object manager is an element of the class managers team[mustHave -> manager]. team[mustHave -> budget].
219
ýUBRILO, MALEKOVIû But, modeling the individual business rules by far is not a main point here. It is a necessary, but by no means a sufficient task to do. The main point is reasoning about business rules. Here we propose an answer to the question stated above in a form of a scenario for the systematical analysis of the Ross’s business rule system and its reduction into canonic form using the means of F-logic and its respective programming tools. After that we discuss some existing software which can be used for rapid development of such a system. The proposed scenario consists of the following steps: STEP 0 (visual, object-oriented implementation of the module for the purpose of designing, editing and manipulating Ross's business rules). Although STEP 0 is not a necessity, it could be very useful. It would consist of implementing a graphical language for the purpose of designing, editing and manipulating Ross's business rules in one of the "visual" programming languages (environments), such as Microsoft Visual C++, Microsoft Visual Basic, Borland Delphi, PDC Visual Prolog,...). All these languages support object oriented programming (using a paradigm of objects, events and object's reactions to the events), so that they could, without any doubt, serve well for the purpose of modeling every aspect of Ross's business rules. STEP 1 (modeling the busines rules in Flora -2) Supposing the STEP 0 is realized successfully, a module should be developed (in XSB Prolog), which shall call Flora-2 and transform the visual (graphical) implementation of a single business rule into its Flora-2 implementation. In the case of Step 0 being skipped, it would be necessary to execute Step 1 directly. STEP 2 (developing the programming environment for reasoning about business rules) In the programming environment of XSB Prolog, HiLog and Flora-2, the modules serving the following purposes should be developed: − Composition and decomposition of complex rules − Business rules equivalence check − Reasoning on business rules The final goal of the realization of the proposed scenario, which is a subject of further research and development, would be a generative grammar of business rules, implemented using the means and the tools of F-logic. A possibility of its complete realization is, however, in a certain measure disputable. What can be achieved beyond any doubt, is a reconstruction of the extant Ross business rule type and subtype classification, which could potentially result in a reformulation of the present structure of Ross business rule system. The proposed scenario gives us some general plan for implementing the system almost from scratch. The question is what of existing (commercial or academic) software someone
220
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES could use to accelerate the development of the system. Generally speaking, we see the two main possibilities for that. The first one is to use some implementation of the UML (Unified Modeling Language), such as Visual UML, or Rational Rose, or any other UML modeling software, for the purpose of mapping the Ross’s business rules model into the UML model. The newest specification of the UML modeling language (version 1.5 of March 2003, as presented in [2]), gives us a complete set of tools for modeling the Ross's business rules (and much more). For example, the stereotype construct from UML could immediately model (at static level) the anchor type as a construct from the domain of Ross’s business rules. Further, the Object Constraint Language as a part of the UML specification, can be used for a number of different purposes, such as: − to specify invariants on classes and types in the class model − to describe pre- and post conditions on operations and methods − to specify constraints on operations which, beyond the shadow of doubt, should be more than enough for formal specification of behavioral aspects of Ross’s business rules. An executable LL(1) version of this grammar is available on the OCL web site. (See http://www.software.ibm.com/ad/ocl) and could easily be implemented as F-Logic (Flora, FLORID) program. The benefits of using the F-Logic formalism in tandem with UML should reflect itself in the possibility of reasoning about the Ross’s business rules, stating queries about theirs properties, methods, structural components, etc.). Second possibility, which does not express such a rich set of modeling capabilities, but would satisfy all the modeling needs, consists of using some kind of ontology modeling software, such as Protege-2000 (http://protege.stanford.edu/index.shtml).
Figure 5: Protege-2000 Window
221
ýUBRILO, MALEKOVIû Ontology is a model of a particular field of knowledge - the concepts and their attributes, as well as the relationships between the concepts. In Protégé-2000 ([9]), an ontology is represented as a set of classes with their associated slots. Besides classes, the other building elements of an ontology are slots, forms, instances and queries. Slots represent class attributes, while instances model the real data. In general, ontologies are capable of modeling the static aspect of business rules (anchors, constraints, etc.) but are pretty short in doing deduction for the purpose of reasoning about them. For that purpose Protege is strengthen with a plug-in, called Flora tab, which implements the fragment of F-logic, used for reasoning needs of Protege itself. In that environment Protege knowledge base can be exported as F-Logic program (including axioms), queries can be executed in an XSB/Flora “sub-process”, list of answers to queries are shown in Protégé (if answers are instances). Further, F-Logic tab can also be used to model constraints (queries must/must not fail if knowledge base is consistent/inconsistent) and views can be defined in a pretty powerful way.
Acknowledgments We would like to thank our reviewer for many valuable suggestions.
References [1] M. ýubrilo. Formalization of the Business Rules Systems, scientific project proposal to Ministry of Science and Technology Republic of Croatia, October, 2001. [2] G. Booch, I. Jacobson, J. Rumbaugh: OMG Unified Modeling Language Specification, http://www.omg.org/cgi-bin/apps/doc?formal/03 -03-01.pdf). [3] P. T. Kandzia. Nonmonotonic Reasoning in Florid, 4th International Workshop on Logic Programming and Nonmonotonic Reasonong (LPNMR'97), July 1997, Dagstuhl Castle, Germany. [4] M. Kifer, G. Lausen and J. Wu. Logical Foundations of Object-Oriented and Frame Languages, Journal of the ACM, 42(4):741-843, July, 1995. [5] W. May, P.T. Kandzia. Nonmonotonic Inheritance in Object-Oriented Deductive Database Languages, Technical Report 1843-1998., Technical University Vienna. [6] W. May. FLORID, How to Write F-logic Programs in Florid. A Tutorial for the Database Language F-Logic, Version 3.0 (FLOXML), Institut fur Informatik, Universitat Freiburg, Germany, October, 2000. [7] W. May, W. FLORID, User Manual, Version 3.0 Informatik, Universitat Freiburg, Germany, October, 2000.
(FLOXML), Institut fur
[8] D. McFadzean, D. Stewart and L. Tefatsion. A Computational Laboratory for Evolutionary Trade Networks", IEEE Transactions on Evolutionary Computation, vol. XX, 2001. [9] N. F. Noy, R. W. Fergerson and M. A. Musen. The knowledge model of Protege2000: Combining interoperability and flexibility. 2th International Conference on
222
BUSINESS RULES MODELING IN F-LOGIC, UML AND ONTOLOGIES Knowledge Engineering and Knowledge Management (EKAW'2000), Juan-les-Pins, France, 2000. [10] R. G. Ross. The Business Rules Book: Classyfying, Defining and Modeling Rules, second edition, Database Research Group, Inc., Boston, Massachusetts, 1996. [11] K. Sagonas and all. The XSB System, Version 2.5, Volume 1: Programmer's Manual. [12] L. Tesfatsion. Agent-Based Computational Economies: Growing Economies from the Bottom Up, Iowa State University Economics Working Paper No. 1., March 2002. [13] G. Yang and M. Kifer. Flora-2: User's Manual, Department of Computer Science, State University of New York at Stony brook, 2001. [14] G. Yang. A Model Theory for Nonmonotonic Multiple Value and Code Inheritance in Object-Oriented Knowledge Bases, Ph. D. Thesis, State University of New York at Stoni Brook, 2002.
223
224
Document Clustering Using Concept Set Representation László Kovács1, Péter Baranyi 2 1
Department of Information Technology, University of Miskolc, Miskolc, Hungary [email protected]
2
Dep. of Telecommunication and Telematics, Budapest University of Technology and Economics, Budapest, Hungary baranyi@ ttt-202.ttt.bme.hu
Abstract — There is in our days an increasing interest on application of concept lattices for data mining, for representation of the concept hierarchy generated from the underlying data set. The paper presents a document query system that clusters the documents into groups using a generated concept lattice. To reduce the computational costs, the word set is reduced using frequency filtering and clustering. The concepts are calculated from the reduced word set. The users can use the reduced concept lattice to perform queries with relevance feedback. The users start the query by entering a set of keywords. The system returns the concepts closest to the query vector. The users get a list of neighboring concepts too, thus they can select the way to navigate to reach the result document set.
1 Introduction Concept lattices are used in many application areas to represent conceptual hierarchies stored in a hidden form in the underlying data. The field of Formal Concept Analysis [1] introduced in the early 80ies has grown to a powerful theory for data analysis, information retrieval and knowledge discovery. There is nowdays an increasing interest on application of concept lattice for data mining especially for generating association rules [8]. One of the main characteristics of this application area is the large amount of structured data to be analyzed. Beside this area another important application field is the program analysis inside a compiler using concept lattices of very large size. A technical oriented application field of Formal Concept Analysis is the area of production planning where the concept lattices are used to partition the products into disjoint groups yielding an optimal processing cost [6]. As the cost of building concept lattice is a super-linear function of the corresponding context size, the efficient computing of concept lattices is a very important issue investigated for long years [5]. In the information systems, the data can be stored in structured databases, in semistructured documents or in some kind of un-structured text documents. Although, the storage in databases provides a very secure and flexible way, it requires additional costs including hardware, software and organizational costs. Due to these extra costs, most of the information is stored in non-structured or in semi-structured data sources. 225
KOVACS, BARANYI The importance of this kind of data storage is unbroken increasing. The data management and the query of the non-structured documents means a large challenge to develop new efficient, human oriented methods. The most important purpose of the document or text database is to provide an efficient and flexible query system for the non-technical users. The query operation usually includes some kinds of filtering or selection. The query systems based on relevance feedback, start the query process using a list of initial keywords. Next, the system returns the documents close enough to the keyword set. The users give feedback with the relevance value for each resulted document. Based on the feedback, the system alters the query condition and performs a new query phase. The new result set is presented to the user who can make a new refinement feedback to improve the accuracy of the query. One of the key problems of this approach is that the result set can be very large, and so requires a large amount of work from the users too. Considering these problems, it seems reasonable to offer a more flexible query interface for document processing. The new method can perform the grouping of documents automatically, and provides a flexible way for the users to refine their query conditions and the users should not process a large amount of document sets during the navigation steps. In our approach, the concept lattice provides a tool to perform an automatic clustering. The users can navigate among the document sets traversing along the edges of the concept lattice. The users can select based on the neighboring concepts which way to proceed next. The proposed method is independent from the actual problem area. The paper presents first the basic notations of Formal Concept Analysis and then the most known methods proposed in the literature so far will be introduced. The next chapters introduce the algorithms for generating the concept sets and for building the concept lattice including some optimization methods for better efficiency. The paper contains the detailed description for the query algorithm with comments on the efficiency considerations.
2 Formal Concept Analysis This section gives only a brief overview of the main basic notations of theory for Formal Concept Analysis. For a more detailed description, we refer to [1]. A K context is a triple K(G,M,I) where G and M are sets and I is a relation between G and M. The G is called as set of objects and M is the set of attributes. The cross table T of a context K(G,M,I) is a matrix form description of the I relation: tij = 1 , if giIaj and (1) 0 otherwise where gi G, aj M. For every A G is defined a derivation operator: (2) A' = { a M | g I a for g A } and for every B M (3) B' = { g G | g I a for a B } The pair C(A,B) is a concept of the K context if (4) - A G, B M, - A' = B, B' = A hold. In this case, the A is called as the extent and B is the intent of the C concept. Considering the ) set of all concepts for the K context, an ordering relation can be introduced for the concept set on the following way:
226
DOCUMENT CLUSTERING USING CONCEPT SET REPRESENTATION C1 d C2
(5)
if A 1 A2 where C1 and C2 are arbitrary concepts. It can be shown that for every (C1,C2) pairs of concepts, the following rules hold: (6) C 1 C2 ) C1 C2 ). Based on this properties, the (), d) is a lattice, called as concept lattice. According to the Basic Theorem of concept lattices, the (), d) is a complete lattice, i.e., the infinum and suprenum exist for every set of concepts. The following rules hold for every concept: (7) i (Ai, Bi) = (iAi,(iBi)'') i (Ai, Bi) = ((iAi) '',iBi) where A'' denotes the closure of the set A and it is defined as derivation of the derivated set: A'' = (A')' (8) The structure of concept lattice can be used not only to describe the concepts hidden in the underlying data system, but it shows the generalisation relation among the objects and it can be used for clustering purposes too. A good description on the related chapters of the lattice theory can be found among others in the [1].
3 Algorithms for Generating the Concept Set and Concept Lattice As for every concept, the extend part is determined unambiguously by the intent part, we will investigate the generation of the intent parts only. In most data mining applications, the intent parts are enough to generate the rules. The rules define a relation, an implication among the attributes, i.e. on the intent part. The actual support set for the rules are usually not important. Among the sophisticated concept set generation algorithms is the Ganter's next closure algorithm [1] probably the most widely known method. It is widely accepted by the experts, that this algorithm is not only the best known but the most effective one, too [4]. The concepts are generated according to an ordering relation. This method calculates the extent part first; the intent part is generated from the intent part. The key function element, the next extent routine, tests several extent variants until it finds an appropriate one. The total asymptotic cost of the algorithm is equal to O(CN2o + CN2M) (9) where C is the number of concepts in the concept set. Considering our objectives, we may have some concerns regarding the efficiency of this algorithm: 1. The disk IO cost may be very high if N is high 2. The total cost is proportional with N2, so it will be resulted in high cost for contexts of large number of objects, as it is assumed in our investigation. A different kind of approach is presented by Godin[2]. His proposal is an incremental concept formation method, where the concept set is updated in incremental manner, i.e. the set is updated when the context table is extended by a new object instance. In this kind of methods, every context table element is accessed only once, yielding a minimal IO cost. The building the concept set in incremental mode is based on the following rule: Every new concept intent after inserting a new 227
KOVACS, BARANYI object into the context, will be the result of intersecting the new objects' attribute set with some intent set already present in the concept set. The Godin's method can be used for updating the concept set after insertion a new object into the context. The algorithm consists of the following main steps. First, the concepts are partitioned into buckets based on the cardinality. Next, the buckets are processed in ascending cardinality order. All the intents in the current bucket are intersected with the intent set of the new object. If the result set is not present in the concept set, it will be added. The cost estimation for the algorithm can be given by O(No + CNDM) (10) This formula assumes a linear existence testing. The linear testing was implemented in the algorithm as the testing can be reduced to the subset of so-called marked elements. The marking test can be performed only in linear mode. In the cost estimation formula the D denotes the number of element with mark. The mark is assigned to the elements generated in the current phase. Comparing this cost function with the cost estimation of the next closure method, we can see, that incremental method will be more efficient if 1. The o cost unit is high 2. or N is high. On the other hand, the cost of Godin's method is more sensitive to the C size of the concept set. In our proposal, the concept set generation phase is based on an optimized incremental method presented in [10]. To implement the cost reduction elements into the concept set building algorithm, the following modifications of the basic incremental method were developed: 1. Before the testing loop for the new incoming object, it is tested whether is equal with an already existing intent part. The test for existence checking is performed using a B-tree structure, resulting in a test cost of O(log(C)) 2. Before the intersects of the elements would be inserted into the concept set, the candidate elements (the results of the intersections) are stored in a hash table, so the sets generated repeatedly can be detected in a cost effective way. 3. To reduce the redundant intersection tests, the elements of the concept set are stored in a special pointer list where the elements containing a given attribute value are connected to each other. The intersection operation should be performed only for elements having at least one common attribute. Thus the intersection test for disjoint elements can be eliminated. 4. To eliminate the insertion testing for intents already present in the concept set, during the intersection phase, a special marker is used in the hash table. In most of the cases, the existence can be detected in the hash table-building phase, before the insertion phase. The total cost of the new algorithm can be given by O(No + NmlogC + N'MlogC + N’C''MlogC) (11) One of the benefits of this algorithm is that it can reduce the computation cost if the new object has an attribute set contained in the context yet. A brief comparison of the new method with the basic methods is given in Table 1. In the concept lattice, the neighbor concepts are connected to each other by an edge. The main task of the concept lattice-building phase is to determine the neighboring concepts. An L ) is a lower neighbor of C if 228
DOCUMENT CLUSTERING USING CONCEPT SET REPRESENTATION (12) L < C and X ) : L < X < C The upper neighbor can be defined on the similar way. In a lattice an element may have several upper and lower neighbor elements. We denote the set of lower (upper) neighbors for C by Low(C) and Upp(C). For building the lattice the Low(C) and Upp(C) must be known for every C. Method Elapsed time Size of concept set naive 245 3865 Ganter 14 Godin 6 proposed 3 naive 796 37344 Ganter 170 Godin 83 proposed 42 Table 1: Comparison of lattice building methods In the literature, we can find several approaches addressing this problem. We will describe here only the most recent ones. The proposal of Ky Hu [3] was published in 1999. The first phase of this method is based on the Godin's incremental lattice generation method. The algorithm generates the concepts in increasing cardinality order of the intent part. According to this principle, the parents are generated first, and only after that the children. The lower neighbors will be determined during the insertion of the children elements. The cost estimation of the algorithm can be given by O(CCnCaM) (13) where Ca is number of ancestor nodes and Cn is the number of neighbor nodes Another current approach is the algorithm of Lindig presented in [4]. The proposed concept set and lattice-building algorithm is related to the Ganter's method in many aspects. The concepts from the concept set are processed in total order to make sure all concepts that are inserted into the lattice are also considered for their neighbors. The lexical order used in Ganter's method is an appropriate ordering. Due to this processing order only the upper neighbor set is needed to build here too. The test for upper neighbor is based on extending the extent part with a new element and performing a closure operation. The cost estimation for this algorithm can be given by O(CN2M) (14) i.e. it has the same asymptotic cost value as the next closure method has. In our tests, we implemented an optimized concept lattice-building algorithm that is described in detail in [9]. This algorithm is strongly related to the Godin’s incremental concept set generation method. The key element of the optimization is that in a search processes for upper or lower neighbor elements, the cost of lattice traversing depends on the number of nodes to be processed and not on the number of ancestors or descendants. The number of tested nodes is more than the number of ancestors or descendants as there are a large number of nodes with negative test results. These nodes are located on the border of the ancestor or descendants sub-lattice. According to our test results, the cost to process these border elements can be very high and it depends dominantly on the position and insertion ordering of the X nodes. The aim of our investigation was to find an optimal order of concept insertion yielding a low computational cost.
229
KOVACS, BARANYI
4 Overview of Existing Approaches in Document Categorization Traditionally, the document categorization tasks are performed manually. The main limitations of this approach are the cost and efficiency. To cope with a larger number of documents, some automatic categorization methods are applied. If the available classes are known, the categorization can be regarded as a classification process. If no classes are known in advance, the groups are determined during the categorization process. This process is called clustering. The document categorization can be performed from different viewpoints regarding from the volume and type of information included into the categorization process. The following levels can be defined: - statistical - semantical - ontological. In the simplest case, the documents can be regarded as set of words. The words are simple character strings, without any semantic or meaning. In this case, only the statistical behavior of the words is used to create the different groups of the documents. The documents containing the same words will belong to the same group. In the next level, the semantic similarity between the words is also considered during the categorization process. In our communication, we use different words for the same or similar meaning. The best-known relationship among the words is the generalization link. The words can be organized into thesauri based on the generalization relationship. A thesaurus is a tree or lattice where the nodes are the words or terms and the sub-tree or sub-lattice of a node are the specialization of the given node. Using the thesauri, the original documents representation can be converted into a reduced representation where the words are replaced by the more general terms. An important characteristic of the human speech and of human thinking is that the same words may be used for different meanings in different situations. Another aspect is that sometimes a given chain of words may carry a new meaning. In this case, the whole context of the document should be understood and the special word sequences should be located and transformed into meaningful unit. In our investigation, we were focusing on the simplest method that can be carried out without any additional information; we selected the statistical way for categorization. The main directions in the statistical classification methods are summarized in the followings. The Bayes-classification [11] method calculates the conditional probabilities for the different class memberships. The class probability value depends on the attribute values of the documents. The main restriction of this method is, that the different attributes are supposed to be independent from each other. In the real word, this assumption is very rarely met. Thus, the yielded result can be treated as an approximation of the real probability values. In the case of a decision tree [12] method, every node in the tree is assigned to an attribute. This attribute may have several values for the different documents. Every possible attribute values have an edge starting from this node. Every document traverses along the path, corresponding the attribute values. If each documents moving to a given node, belong to the same class, the node becomes a leaf assigned to the current class. 230
DOCUMENT CLUSTERING USING CONCEPT SET REPRESENTATION The K-nearest neighbor method [13] uses a metric function to measure the distance or similarity between the different documents. It assumed that the documents lying close to each other belong to the same class. A new document is assigned to the class of its neighbor documents. The main efficiency problem of this method is the large number of comparison during the classification phase. To improve the efficiency, the selected codebook vectors are structured into a hierarchy.
5 Application of Concept Lattices in Document Clustering Our investigation focuses on the clustering problem of documents. There are lots of application areas like new agencies or discussion forums, custom services where there are a lot of documents collected during the normal operation activities. The elements of this large pool of documents may belong to different topics. Due to efficiency considerations, it is desirable to use an automatic clustering method instead of a manual clustering. The automatic clustering method should apply an appropriate reduction algorithm to convert the document description into a manageable size. In our approach, we combine different reduction methods to provide a better and more compact representation form. The reduction process includes the following techniques: stop word elimination, clustering and relevance based filtering. The proposed clustering algorithm contains the following modules in execution order: - Stop word elimination - Word elimination based on word frequency - Word reduction based on correlation of words - Creating document description using codebook words - Performing concept generation - Selection of characteristic concepts for documents categorization The first step is the usual attribute elimination method. The complexity of this step depends on the current language. In the initial phase the root (the dictionary form) of the words are determined. The un-important words are contained in a dictionary. Every words found in this dictionary are removed from the document description. The complexity of this step is (15) O(D L log(W)) where D : number of documents L : average length of a document W : length of the dictionary. In the next step, the words with too low or too high frequency are eliminated. The frequency of a word is equal to the number of documents containing the word. The reason of this step is that these words are not appropriate words to determine the grouping of the documents. The cost of frequency filtering is equal to (16) O(D L) In the next step the remaining words are clustered. The clustering is based on the distances between the words. The distance between two words is calculated as the correlation value. The correlation value id high if the words occur in the same documents and low if they occur in different documents. (17) Dis(w1,w2) = (|W1\W2| + |W2\W1|) / |W1 U W2|
231
KOVACS, BARANYI The distance value lies in the [0,1] interval. Calculating these distance values, we get a distance of correlation matrix. The cost of generating the correlation matrix is (18) O(D2 L’2 G) where L’ denotes the average length of documents after the previous reduction step. The G denotes average number of documents a word occurs in. Due to the high value of D and L’, this step is the most costly one. The clustering of the words is performed using a simple hierarchical method. At beginning, every word is considered as a cluster. In every iteration step, the word pair having the smallest distance value, are merged together to cerate a common cluster. So, in every iteration step, the total number of clusters decreases by one. The termination conditions are the followings - the total number of clusters sink below a threshold or - the minimal distance value is greater than a threshold. The cost of this step is not dominant if we assume, that the pairs are ordered by the distance value (19) O(L) In the next step, every cluster is denoted by a representing word. The words are then replaced with the corresponding representing word. As a result, the number of attributes to describe the documents can be reduced drastically. In the next step, the concept lattice is generated. The context matrix contains the documents as objects and the representing words as attributes. Using a simple lattice generation algorithm, the cost value is equal to (20) O(C N2 M) After generating the concept lattice, the lattice will be reduced by eliminating the concepts with low support values. The support value is equal to the number of documents supporting this concept. This value is equal to the size of the extension of the concept. At the end, a reduced concept lattice is generated. This reduced lattice can be used in the information retrieval component. Every concept denotes a group of documents. Every group can be described by a set of representing words. The accuracy of the lattice generation is tested by comparison of the manual and the statistical categorization results. As all of the training Reuters documents are manually classified, the accuracy of the statistical categorization can be tested directly with the training data.
6 Experimental Results For test purposes, the Reuter Corpus Volume 1 (English Language, 1996-08-20 to 1997-08-1)[14] was selected as training document pool. The Reuters Corpus is an archive of more than 800000 news stories. All of the stories are fully annotated using category or class codes for topic, region and industry sector. The stories cover a range of content typical of an English language newswire and can vary from a few hundred to several thousand words in length. The number of used topic codes is about 100; the number of industry codes is about 380. The number of region codes is about 370. The main benefits of the Reuters Corpus can be summarized in the following points: - standard set of documents, - large amount of training documents, - standard XML format, - accurately classified documents. 232
DOCUMENT CLUSTERING USING CONCEPT SET REPRESENTATION In our first investigation, we have selected only a subset of the full corpus (see Table 2). The frequency distribution of the words is shown in Figure 1. Number of documents Number of words Number of different words Min. frequency Max. frequency
2586 288 139 24527 1 814
Table 2: Statistical parameters of the selected training set 1000 900 800 700 600 500 400 300 200 100 0 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Figure 1: Word frequency distribution Based on the frequency distribution, the words with too low or with to high frequencies are eliminated from the word pool. The main characteristics of the first selection phase are given in Table 3. Number of selected words 2258 Min. frequency 20 Max. frequency 793 Average frequency 77 Table 3: Statistical parameters of the word frequency data In the next step, the correlation between the words is calculated. The distance value depends on the count of common documents and of different documents. The average distance value is 0.98. The distance distribution function is given in Figure 2. 2500000
count
2000000 1500000 1000000 500000 0 0
0.1
0.2
0.2
0.2
0.3
0.3
0.4
0.4
0.5
0.5
0.6
0.6
0.7
0.7
0.8
0.8
0.9
1.0
1.0
intervall
Figure 2: Distance distribution After calculating the distance matrix, the clustering of the words is preformed. The number of generated clusters depends on the maximum connection distance. The resulting cluster distribution for maximum distance value of 0.8 can be characterized by the following data. The number of clusters is equal to 1500, the smallest cluster
233
KOVACS, BARANYI contains only one word, the largest cluster has 228 words. The average cluster size is 3. The population distribution function is shown in Figure 3. 250 200 150 100 50 0 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Figure 3: Cluster size distribution The next step of processing is the generation of the concepts. To reduce the lattice size, the concepts with low support values are eliminated from the concept set. After the reduction step, the resulted set contains only X concepts. These concepts will be presented to the users during the information retrieval procedure. In the last step, the resulted categorization was compared with the manual classification. From the available classification systems, the topic classification was selected. This classification seems the most suitable for statistical categorization as to a topic belongs a larger pool of words. In the case region, it has very little possibility that two city names belonging to the same region, occur in the same document. Analyzing the clusters, we can see, that every cluster contained words having similar meanings. Thus the statistical clustering provides a real and correct categorization of the words. Regarding the second larger cluster, the contained words have meaning close to war and fighting. Comparing the manual Reuters classification with our grouping, we can see a good correlation between the two categorizations method. For example, the dominating part of the documents containing words from cluster ‘war’, the Reuters classification also uses a similar category notation: Government 1508 War 746 Domestic Politics 397 International Relations 273 Corporate 265 Markets 220 Economy 167 Table 4: Dominating classification codes for cluster No 2. Testing the other clusters, we can find a similar good correlation between the Reuters classification and our statistical test results. These results are on the other hand, only the first steps to implement an efficient automatic categorization system. In the next phases of the research project, the clustering method should be extended with other statistical and heuristic methods to involve more outlier words into the clustering than in the current version. The current results shows that it is useful to develop a document categorization method based on the proposed methods.
Acknowledgement This research is supported by FKFP 180/2001.
234
DOCUMENT CLUSTERING USING CONCEPT SET REPRESENTATION
References [1]
B. Ganter and R. Wille: Formal Concept Analysis, Mathematical Foundations, Springer Verlag, 1999
[2]
R. Godin and R. Missaoui and H. Alaoui: Incremental concept formation algorithms based on Galois lattices, Computational Intelligence, 11(2), 1995, 246-267
[3]
K. Hu and Y. Lu and C Shi: Incremental Discovering Association Rules: A Concept Lattice Approach, Proceedings of PAKDD99, Beijing, 1999, 109-113
[4]
C. Lindig: Fast Concept Analysis, Proceedings of the 8th ICCS, Darmstadt, 2000
[5]
L. Nourine and O. Raynaud: A Fast Algorithm for Building Lattices, Information Processing Letters, 71, 1999, 197-210
[6]
S. Radeleczki and T. Tóth, Fogalomhálók alkalmazása a csoporttechnológiában, Kutatási jelentés, OTKA kutatási jelentés, Miskolc, Hungary, 2001.
[7]
G. Stumme and R. Taouil and Y. Bastide and N. Pasquier and L. Lakhal: Fast Computation of Concept Lattices Using Data Mining Techniques, 7th International Workshop on Knowlegde Representation meets Databases (KRDB 2000), Berlin, 2000
[8]
M. Zaki and M. Ogihara: Theoretical Foundations of Association Rules, Proceedings of 3 rd SIGMOD'98 Workshop on Research Issues in Data Mining and Knowledge Discovery (DMKD'98), Seattle, Washington, USA, June 1998.
[9]
L. Kovacs: Efficiency Analysis of Building Concept Lattice, Proceedings of 2nd ISHR on Computational Intelligence, Budapest, 2001
[10]
L. Kovacs: A Fast Algorithm for Building Concept Set, Proceedings of MicroCAD2002, Miskolc, Hungary 2002
[11]
D. Lewis and M. Ringuette. A comparison of two learning algorithms for text classification, In Third Annual Symposium on Document Analysis and Information Retrieval, pp. 81-93, 1994
[12]
S. Weiss and C. Apte, F. Damerau, D. Johnson, F. Oles, T. Goetz, T. Hampp. Maximizing text-mining performance. IEEE Intelligent Systems, 14(4):2-8, July/august 1999
[13]
Y. Yang. An evaluation of statistical approaches top text categorization. Information retrieval 1(1-2):69-90, 1999
[14]
Reuters Corpus Vol. 1, English Language, 1996-08-20 http://about.reutres.com/researchandstandards/corpus/
to
1997-08-19,
About the Authors László Kovács received M S. degree in natural sciences in 1985 and the PhD. degree in mechanical sciences in 1998. His meain research areas are intelligent database systems, document classification, nearest neighbor queries. Péter Baranyi received M. S. degree in electrical engineering in 1994 and the PhD. degree in electrical sciences in 1999. His main research areas are fuzzy controlling, information retrieval systems, neural networks.
235
236
Text Mining for Documents Annotation and Ontology Support Jan Paralic and Peter Bednar Department of Cybernetics and Artificial Intelligence, Technical University of Kosice, Letná 9, 041 20 Kosice, Slovakia {Jan.Paralic,Peter.Bednar}@tuke.sk
Abstract — This paper presents a survey of basic concepts in the area of text data mining and some of the methods used in order to elicit useful knowledge from collections of textual data. Three different text data mining techniques (clustering/visualisation, association rules and classification models) are analysed and its exploitation possibilities within the Webocracy project1 are showed. Clustering and association rules discovery are well suited as supporting tools for ontology management. Classification models are used for automatic documents annotation.
1 Introduction In order to get some new, useful information (or knowledge) from (possibly large) collection of textual documents, text data mining methods can be applied. As the concept of knowledge discovery in texts (KDT) is quite new, in the following section 2 the basic process of KDT and its particular steps are described. The process of KDT can be divided into two main phases. Within the first phase, (free-form) text documents are transformed into an internal or intermediate form, which presents already structured data suitable for text data mining, i.e. the second phase of the whole process. Internal representation forms of a text document collection as well as some important pre-processing steps necessary to achieve an efficient and useful internal representation are described in section 3. Different text data mining approaches and algorithms supporting them are analysed in section 4. As first, clustering/visualisation and association rules as unsupervised text mining approaches are presented. Next, supervised approaches used for building classification models are described. In section 5 the possible use of some of the described text mining methods within the WEBOCRAT system is sketched.
2 Knowledge Discovery in Texts Knowledge discovery in texts (KDT) or text data mining can be defined in the same way as knowledge discovery in databases (KDD), though here the data are textual. This implies significant difference in comparison to KDD, which uses as a source of data well 1
IST-1999-20364 Webocracy: “Web Technologies Supporting Direct Participation in Democratic Processes”
237
PARALIC, BEDNAR structured databases. In KDT usually plain textual documents are used. There are also some minor attempts to use (partially or fully) structured textual documents as HTML or XML documents in order to make use not only of plain textual parts but also of additional structural information. Despite this simple approximation of the KDD definition, there is quite a lot of confusion, what KDT really is. For example, Marti Hearst [2] claims that it is important to distinguish between text data mining and information retrieval. The goal of information retrieval is to help users find documents that satisfy their information needs. Marti Hearst describes information retrieval as “a way to pull out the documents you are interested in and push away the others“. Which means, that information retrieval is the process of finding information that is already known and has been inserted into document by an author. In text data mining in contrast, a collection of documents is examined with the aim to discover information (knowledge) not contained in any individual document in the collection. Yves Kodratoff [1] distinguishes between inductive and deductive text mining. The better-known deductive text mining is called Information Extraction, and amounts to finding instances of a predefined pattern in a set of texts. On the other hand, inductive text mining looks for unknown patterns or rules to discover inside a set of texts. We further on refer always to inductive text mining, when we are speaking about text data mining. 2.1 Particular steps of the KDT process Text data mining is much more complex task than data mining [7], because it involves text data that is inherently unstructured and fuzzy. KDT process can be divided into two main phases. 1. Transformation of (free-form) text documents into an internal or intermediate form (this is an analogy of data pre-processing techniques in KDD process. 2. Text mining itself (A. H. Tan in [7] calls it knowledge distillation) that deduces patterns or knowledge from the intermediate form. In greater detail we can compare the KDT approach and its particular steps against the KDD process steps [8]. 1. Understanding the application domain and the goals of the KDT process: user must define which concepts are interesting. 2. Acquiring or selecting a target data set: texts must be gathered using information retrieval tools or in manual way. 3. Data cleaning, pre-processing and transformation: concepts must be described and texts need to be analyzed and stored in the internal representation form, usually after eliminating stop-words and possibly after stemming and exclusion of too frequent. 4. Model development and hypothesis building: identifying concepts in the collection 5. Choosing and execution of suitable data mining algorithms: e.g. the application of the statistical techniques (text data mining task). 6. Result interpretation and visualisation: human must interpret the results. 2.2 Text Data Mining Tasks Mining internal representation form of a document collection induces patterns and relationship across documents [7]. Some examples of unsupervised text mining tasks are:
238
TEXT MINING FOR DOCUMENTS ANNOTATION AND ONTOLOGY SUPPORT Clustering/visualisation of documents Association rules Typical example of supervised text mining task is Predictive modelling (classification models)
3 Representation of Textual Documents For internal representation of textual documents we can use some information retrieval model (see formal definition in [2]). The classic models in information retrieval consider that each document is described by a set of representative keywords called index terms. An index term is simply a (document) word whose semantics helps in remembering the documents’ main themes [2]. It is quite obvious that different index terms have varying relevance when used to describe document contents in particular document collection. This effect is captured through the assignment of numerical weights to each index term of a document. Let tj be an index term, di be a document, and wij 0 be a weight associated with the pair (di, tj). This weight quantifies the importance of the index term tj describing the document di semantic contents. Based on how these weights are calculated and treated, there are three classic information retrieval models, namely the Boolean, the vector [5], and the probabilistic models [2]. 3.1 Classical information retrieval models The Boolean model is a simple retrieval model based on set theory and Boolean algebra. This model considers that index terms are present or absent in a document. As a result, the index term weights are assumed to be binary, i.e. wij {0,1}. A query is composed of index terms linked by three logical connectives: not, and, or. Thus a query is essentially a Boolean expression with precise semantics. As a result this model is unable to recognise partial matches, which frequently leads to poor performance. Another weakness is that by considering only the presence or absence of term, the binary weighting scheme ignores information inherent in the frequencies of terms. A related problem concerns document length. As a document gets longer, the number of distinct terms used will in general increase. Many of these terms usages in very long documents will be unrelated to the core content of the document, but are treated as being of the same significance as similar occurrences in short documents. The vector model removes this disadvantages by assigning non-binary weights to index terms in queries and in documents. The term frequency of occurrence (tf) [5] [6] in document is a common weighting scheme here and is generally used as the basis of the weighted document vector. Document frequency can be combined with the collection frequency factor, which is used to discriminate one document from the other. Most of the used schemes for this factor, e.g. the inverse document frequency (idf), assume that the importance of a term is proportional to the number of documents the terms appear in. As a combination of these two factors we can obtain tfidf scheme, which is the most widely used weighting scheme, defined as: C (1) w(i, j ) tfidf (d i , t j ) Nd i , t j . log Nt j
239
PARALIC, BEDNAR where Ndi,tj denotes the number the term tj occurs in the document di (term frequency factor), Ntj denotes the number of documents in collection C in which tj occurs at least once (document frequency of the term tj) and |C| denotes the number of the documents in collection C. This weighting scheme includes intuitive presumption that: the more often a term occurs in a document, the more it is representative of the content of the document, and the more documents the term occurs in, less discriminating it is. In order to fit weights into the interval ¢0, 1² and documents be represented by vectors of equal length, the document vector resulting from tfidf weighting are often normalized to length equal to 1, so final normalized term weight can be computed as: w(i, j )
tfidf (d i , t j ) norm
tfidf (d i , t j )
¦ tfidf (d , t i
j
(2) )
2
iT
where T is the set of terms used for the vector representation of the document i. The probabilistic model attempts to capture the IR problem within a probabilistic framework [2]. The index term weights are all binary and a query is a subset of index terms. Given a user query, there is a set of documents which contains exactly relevant documents and no other (so called ideal answer set). The querying process can be seen as a process of specifying the properties of an ideal answer set. Since these properties are not known at query time, an effort has to be made at initially guessing what they could be. This initial guess allows then to generate a preliminary probabilistic description of the ideal answer set which is used to retrieve a first set of documents. An interaction with the user is then initiated with the purpose of improving the probabilistic description of the ideal answer set. Through several different measures, Salton and Buckley in [6] showed that the vector space model is expected to outperform the probabilistic model with general collections. This also seems to be dominant thought among researchers, practitioners, and the Web community, where popularity of the vector model runs high [2]. 3.2 Term selection/reduction Documents can be described by thousands of terms and this high dimensionality of document space can cause problem with efficiency. Terms that do not describe content of documents induce noise, which can degrade performance of created text mining model. For these reasons, selection of relevant terms is very important text processing. Appropriate method for term selection is generally dependent on used text mining algorithm. Either it will be a supervised text data mining algorithm (i.e. the information about classes of particular documents is available), or an unsupervised one (i.e. no information about classes of particular documents is available). Main difference is that methods for supervised learning can use information about document category, and relevance of the term can be determined by how it separates documents into categories. The classification accuracy of the generated model (classifier) estimated on the testing examples can be used as a guide to find optimal set of terms. Note that unsupervised term selection methods can be generally used also for the supervised learning.
240
TEXT MINING FOR DOCUMENTS ANNOTATION AND ONTOLOGY SUPPORT From unsupervised term selection methods two can be mentioned: Document frequency threshold [7] is the simplest technique for term selection. In this method, document frequency for all terms on training collection is computed and terms, which have document frequency lower than specified threshold, are removed from the resulting set of terms used for document representation. Over years, alternative modelling paradigms for each type of classic model have been proposed. Regarding vector model, as a representative of algebraic models, a very interesting extension the latent semantic indexing (LSI) has been proposed in [13]. From supervised term selection methods, e.g. Information gain is frequently employed. Other approach uses F2 statistic measures.
4 Text Mining Methods 4.1 Clustering/visualization For clustering of textual documents in vector representation the self-organizing map (SOM) [9] is used very often. SOM is an unsupervised neural network, which provides a mapping from high-dimensional feature spaces onto a two-dimensional space such that similar data are mapped close to each other. This allows a very intuitive cluster representation and analysis. A comparison of the SOM approach with a statistical one, on one particular domain can be found in [12]. The comparison has shown that statistical approach was not powerful enough to deal with larger text collections and the interpretation of results has been quite difficult. Very interesting for text mining purposes is the combination of the basic SOM algorithm with the LabelSOM method to automatically extract classification from the trained SOM [10]. This method has been used e.g. within the SOMLib system [11]. The SOMLib Digital Library System provides methods for organizing of large collections of electronic documents to allow topic-oriented browsing and orientation. SOM provides only flat, i.e. two-dimensional representation of documents’ clusters, which might be blind for interpretation when document collection is very large. Moreover, this representation of clusters has usually very irregular coverage with documents due to unbalanced topic distribution. To overcome these limitations the Growing Hierarchical SOM (GHSOM) [11], which automatically creates a hierarchical organization of a set of documents has been developed. This allows the network architecture to determine the topical structure of the given document repository during the training process, creating a hierarchy of self-organizing maps, each of which provides a topologically sorted representation of a topical subset. Starting from a rather small high-level SOM, which provides a coarse overview of the various topics present in the collection, subsequent layers are added where necessary to display a finer subdivision of topics. Each map in turn grows in size until it represents its topic in sufficient degree of granularity. Since usually not all topics are present equally strongly in a collection, this leads to an unbalanced hierarchy, assigning more “mapspace” to topics that are more prominent in a given collection. This allows the user to approach and intuitively browse a document collection in a way similar to conventional libraries.
241
PARALIC, BEDNAR Visualization by this system is provided by means of web interface. An HTML page represents each map with links to lower level (expanded) maps, or particular documents associated with a cell at the lowest –leaves level (see Figure 1).
Figure 1: A partial view of the 2nd layer map for a text collection from Austrian newsletter Standard 4.2 Association Rules This text data mining task discovers associations between concepts and expresses these findings as rules in the format B H [support, confidence], where B as well as H may be a set of concepts or a unique concept [8]. The rule means, “if B is present in a text, then H is present with a certain confidence and a certain support”. Following the usual definition (e.g. in [4]), confidence is the proportion of texts that have B AND H in relation to number of texts that have only B and support is the proportion of texts that have B AND H in relation to number of all texts in the collection. Such rules allow predicting the presence of (a) concept(s) according to the presence of another one(s). Moreover, complex rules may be discovered, when combination of concepts and/or words is allowed in discovered rules. E.g. WORD_1 AND WORD_2 AND CONCEPT_1 AND CONCEPT_2 CONCEPT_3. This kind of rule can be used to select sub-collections of text documents where some words are present.
242
TEXT MINING FOR DOCUMENTS ANNOTATION AND ONTOLOGY SUPPORT The most often used approach to mine associations is Apriori algorithm [4], which is running in two steps. 1. Finds all frequent itemsets (i.e. tuples of concepts or terms). Each of these itemsets must occur at least as frequently as a pre-defined minimum support count. 2. Generates strong association rules from the frequent itemsets. These rules must satisfy pre-defined minimum support and minimum confidence. The name of the Apriori algorithm is based on the fact, that the algorithm uses prior knowledge of frequent itemset properties in the following way. It employs an iterative approach known as level-wise search, where k-itemsets are used to explore (k+1)itemsets, starting with k=1 until no more frequent k-itemsets can be found. For each new k one full scan of the database is needed. To improve the efficiency of Apriori algorithm, anti-monotone property is applied which means that all subsets of a frequent itemset must be frequent itemsets. This reduces the number of candidate itemsets generated for k+1 (from already identified frequent itemsets of size k and less). Even so the performance of Apriori algorithm does not scale well for large databases, which is the case of document collections as well. An interesting method that generates the set of frequent itemsets without candidate generation is called frequent-pattern growth, or simply FP-growth [4], which adopts a divide-and-conquer strategy. 4.3 Classification Models The term classification can cover any procedure in which some decision or forecast is made on the basis of currently available information. In the context of data mining a more restrictive interpretation is considered. At first, we may aim of establishing existence of classes (or clusters) in the data according to a set of observations. Or we may know for certain that there are some classes, and the aim is to establish a rule by use of which we can classify a new observation into one (or more) of the existing class(es). The first case is known as unsupervised learning (clustering). In this chapter we use the term classification for the second case - supervised learning. Rule induction algorithms. Any form of inference in which the premises do not imply deductively the conclusions, can be thought of as an induction. In the case of the text categorisation, it is one special form of the inductive inference, supervised concept learning or classification learning. To learn a concept means to infer its general definition from a number of specific examples of it. A concept can be formally considered as a function from the set of all examples (in our case from the set of all documents) to the Boolean set {true, false} or equivalently to the set {document is assigned to category; document is not assigned to category}. For text categorization, the concept is equivalent to some category, so the problem is to find a definition of this category from a number of documents. Rules induction algorithms are characterized by representing the target category as a set of "if-then" rules. These rules have the form "if then predict where is the conjunction of the attribute tests (selectors). Rule induction algorithms have several advantages; the most noteworthy one is that these rules are best understandable for humans from all representations currently in use in concept learning.
243
PARALIC, BEDNAR Examples of rule induction algorithms are CN2 [15] (see Figure 2 with visualisation of the results in KDD Package* [12]), REP, IREP [16], RIPPER [17]. Other possibility is to mine decision trees, e.g. using Quinlan’s algorithm C4.5
Figure 2: Example of a visual representation of decision rules produced by the CN2 implementation within the KDD package.
5 Exploitation of KDT in Webocracy Webocracy project responds to an urgent need for establishment of efficient systems providing effective and secure user-friendly tools, working methods, and support mechanisms to ensure the efficient exchange of information between citizens and the administrations. The project addresses the problem of providing new types of communication flows and services from public institutions to citizens, and improves the access of citizens to public administration services and information. The new types of services will increase the efficiency, transparency and accountability of public administration institutions and their policies toward citizens. Within this project a WEBOCRAT system is being designed and developed. WEBOCRAT system is a Web-based system comprising Web publishing, computer-mediated discussion, virtual communities, discussion forums, organizational memories, text data mining, and knowledge modeling. The WEBOCRAT system will support communication and discussion, publication of documents on the Internet, browsing and navigation, opinion polling on questions of public interest, intelligent retrieval, analytical tool, alerting services, and convenient access to information based on individual needs. 5.1 Clustering/visualisation We think, that clustering/visualisation does not fit the functionality of the WEBOCRAT system as defined in [3], because documents in WEBOCRAT system are primarily organ*
We have developed KDD Package within the EU funded INCO Copernicus project No. 977091 GOAL Geographic Information On-Line Analysis (GIS – Data Warehouse Integration)
244
TEXT MINING FOR DOCUMENTS ANNOTATION AND ONTOLOGY SUPPORT ized by their links to knowledge model so that primarily knowledge model is used for document retrieval and topic-oriented browsing On the other hand, it could be useful to use techniques like GHSOM, because of its hierarchical structure that is tailored to the actual text data collection, as a supporting tool within the initial phase, when the knowledge model of a local authority is being constructed. This is true in such a case when local authority has a representative set of text documents in electronic form available for this purpose. It is assumed that these documents will be later on published using the WEBOCRAT system and linked to the knowledge model for intelligent retrieval purposes. But users must be aware of the fact, that GHSOM does not produce any ontology. It is just a hierarchical structure, where documents are organized in such a way that documents about similar topics should be topologically close to each other, and documents with different topics should be topologically far away from each other. Particular node in this hierarchical structure is labelled by (stemmed) words – terms, which occur most often in cluster of documents presented by this node. This list of terms can provide some idea about concept(s), which can be (possibly) represented in the designed knowledge model. Finally, particular documents represent leave nodes of this hierarchical structure. It is in our opinion necessary to look carefully through the whole structure, including particular documents in order to make reasonable conclusions about particular concepts proposed for the knowledge model and relations among them. 5.2 Association rules Association rules as presented in previous section have been used e.g. in [8] in two different experiments. The first one tried to analyse political newspaper articles from two different periods in order to analyse what there are saying about a mayor in a big Brazil city (first period was before corruption scandal and the other one after it). The second experiment tried to analyse articles about various text mining tools as competitive intelligence analysis. In both experiments firstly, concepts were defined by different approaches. To identify concept terms, natural language processing is commonly required. Instead of that, ontology provides this information in the WEBOCRAT system, and we can represent documents directly as a binary vector. This vector has one element for each concept, equal to 1 if document is linked to the particular concept. Another advantage is, that within the WEBOCRAT system a hierarchy of concepts from particular domain (local authority’s area of work) is available. We can make use of it for mining of associations, not only at the level of leaves concepts, but also at the higher levels of the hierarchy, getting so called multi-dimensional association rules [4]. Association rules can be exploited e.g. for automatic improvements of the knowledge model in the following way. When we use as input attributes for association rules mining algorithm only concepts to which documents are linked that means that we are looking for frequently occurring linking patterns. These patterns can be confronted with the actual ontology. When e.g. our algorithm finds association between concepts X, Y, and Z and in our ontology no relation between concepts X, Y and Z is presented, we can expect a missing relation between them. This approach is suitable mainly for documents that were not linked automatically, using a pre-defined template.
245
PARALIC, BEDNAR 5.3 Classification models In the WEBOCRAT system, ontology is used as a knowledge model of the domain, which is composed from concepts occurring in this domain and relationships between these concepts. Information is stored in the system in the form of text documents, which are annotated by set of concepts relevant to the document content. One strategy for document retrieval is based on concepts. User selects interesting concepts and asks for information related to them, is used for information retrieval. The decision about document relevance to the user query is based on a similarity between set of query concepts and a set of concepts, which are annotated to the document. This task of document retrieval can be viewed as a classification task when the decision is made, whether the document is relevant for the user or not. With appropriate ontology which models domain well, use of this knowledge model can yield better results than e.g. retrieval based on vector representation of documents. Retrieval accuracy depends on the quality of documents annotation. Data mining methods can be very useful to guide user at annotating new document. Annotation of the new document is the classification task (text categorization task) when we need to make decision which concept (concept represents category) is relevant to the content of the document. The system must propose relevant concepts for new document in real time, so important requirement to used algorithm is execution time efficiency. User can add or delete some link between new document and concepts, and these changes can be immediately integrated into classifier. This requires ability of incremental learning. Relevance weighting of the concepts to the new document is better than simple binary decision. Concepts can be ordered by weight of the relevance to the new document and user can search for additional relevant concept according to this ordering.
Acknowledgments This work is done within the Webocracy project, which is supported by European Commission DG INFSO under the IST program, contract No. IST-1999-20364; within the TEXAS Project supported by Austrian Institute for East- and Southeast Europe and within the VEGA project 1/8131/01 ”Knowledge Technologies for Information Acquisition and Retrieval” of Scientific Grant Agency of Ministry of Education of the Slovak Republic. The content of this publication is the sole responsibility of the authors, and in no way represents the view of the European Commission or its services.
References [1] Kodratoff, Y. (2001) Rating the Interest of Rules Induced from Data and within Texts. In Proc. of the 12th IEEE - International Conference on Database and Expert Systems Applications DEXA 2001, Munich. (Long version of the paper, submitted for publication in Knowledge and Information Systems: An International Journal). [2] Baeza-Yates, R. and Ribeiro-Neto, B. (1999) Modern Information Retrieval. Addison-Wesley Longman Publishing Company [3] Mach, M., Furdik K. (2001) Webocrat system architecture and functionality. Webocracy deliverable R2.4, Technical University of Kosice, April 2001
246
TEXT MINING FOR DOCUMENTS ANNOTATION AND ONTOLOGY SUPPORT [4] Han, J., Kamber, M. (2000) Data Mining – Concepts and Techniques. Morgan Kaufmann Publishers [5] Salton, G., Wong, A., Yang, C. (1975) A Vector Space Model for Automatic Indexing. Communications of the ACM, 18(11), 613-620. [6] Salton, G.,Buckley, C. (1988) Term Weighting Approaches in Automatic Text Retrieval. Information Processing & Management, 24(5), 513-523. [7] Ah-Hwee Tan (1999) Text Mining: The state of the art and the challenges. In Proc. of the PAKDD'99 workshop on Knowledge Disocovery from Advanced Databases, Beijing, pp. 65-70 [8] Loh, S., Wives, L. K., and Palazzo, J. (2000) Concept-Based Knowledge Discovery in Texts Extracted from the Web. SIGKDD Explorations, Vol. 2, Issue 1, July 2000, pp. 29-39 [9] Kohonen, T. Self-organized formation of topologically correct feature maps. Biological Cybernetics, 43, 1982. Springer Verlag, Berlin, Heidelberg, New York. [10] Rauber, A. (1999) On the labeling of self-organizing maps. In Proc. of the International Joint Conference on Neural Networks, Washington, DC [11] Rauber, A., Dittenbach, M. and Merkl, D. (2000) Automatically Detecting and Organizing Documents into Topic Hierarchies: A Neural Network Based Approach to Bookshelf Creation and Arrangement. In: Proc. of the 4th European Conference on Research and Advanced Technologies for Digital Libraries (ECDL2000), Springer LNCS 1923, Lisboa, Portugal [12] Rauber, A., and Paralic, J. (2000) Cluster Analysis as a First Step in the Knowledge Discovery Process. In Journal of Advanced Computational Intelligence, Fuji Technology Press Ltd., ISSN 1343-0130, Vol. 4, No. 4, pp. 258 – 262 [13] Deerwester, S., Dumais, S. T., Landauer, T. K., Furnas, G. W. Harshman, R. A. (1990) Indexing by latent semantic analysis. Journal of the Society for Information Science 41(6), 391-407. [14] Lewis, D. D. (1998) Naive (Bayes) at Forty: The Independence Assumption in Information Retrieval. In Proceedings of ECML-98, 10th European Conference on Machine Learning, 415, Chemnitz. [15] Clark, P., Niblett, T. (1989) The CN2 induction algorithm. Machine Learning Journal, 3(4), 261-283. [16] Fürnkranz, J., Widmer, G. (1994) Incremental Reduced Error Prunning. Machine Learning: Proceedings of the 11th Annual Conference, New Brunswick, New Jersey. [17] Cohen, W. W. (1995) Fast effective rule induction. Proceedings of the 12th International Conference (ML95), Morgan Kaufmann, San Mateo, California.
About the Authors Jan Paralic received his Master’s degree in technical cybernetics in 1992 and PhD’s degree in artificial intelligence in 1998 from Technical University of Kosice. His research currently focuses mainly on knowledge discovery (from databases as well as from texts) and knowledge management. Peter Bednar received a Master’s degree in cybernetics 2001 from Technical University of Kosice. His research interests include text categorisation, data and text mining.
247
248
Fuzzy Relational Thesauri in Information Retrieval: Automatic Knowledge Base Expansion by Means of Classified Textual Data∗ Domonkos Tikk1,2,3 , Jae Dong Yang3 , P´eter Baranyi1,2 , and Anik´o Szak´al4 1 Dept.
of Telecommunications & Telematics Budapest University of Technology and Economics, Budapest, Hungary [email protected], [email protected] 2 Intelligent
Integrated Systems Japanese–Hungarian Laboratory Budapest, Hungary 3 Department
of Computer Science Chonbuk National University Chonju, Korea [email protected] 4 Budapest
Polytechnic Budapest, Hungary [email protected]
Abstract — In our ongoing project we develop a tool which provides domain engineers with a facility to create fuzzy relational thesauri (FRT) describing subject domains. The created fuzzy relational thesauri can be used as knowledge base for an intelligent information agent when answering user queries relevant to the described domains, or for textual searching on the web. However, the manual creation of (fuzzy) thesauri is quite tedious process if the source of data from which the domain engineer may select concepts and instances for the thesaurus is not well organized or structured. That is the typical case of textual data bases. In order to ease FRT creation process we make use of a small starting FRT and our text categorization technique that temporarily expands FRT while doing the supervised learning part of text categorization. This by-product of categorization is then used for enlarging automatically or semi-automatically the final FRT. ∗
Research supported by the National Scientific Research Foundation (OTKA) Grant No. D034614, and by the Hungarian Ministry of Education Grant No. FKFP 0180/2001. A part of this work was done while D. Tikk was visiting at Department of Computer Science, Chonbuk National University.
249
´ TIKK, YANG, BARANYI, SZAKAL
1 Introduction Information agent technology emerged as a major field of interest among practitioners and researchers of various fields with the immense grow of available information on the internet since the early 90s. The vast amount of heterogeneous information source available on the internet demands advanced solutions for acquiring, mediating, and maintaining relevant information on behalf of users or other agents. In general, intelligent information agents are autonomous computational software entities that are developed to provide proactive resource discovery, create a link between information consumers and providers, and offer value-added information services and products [1]. The agents are assumed to deal with difficulty associated with the enormous amount of information overload of users, preferably in real-time. There are different approaches to build information agents including user programming, machine learning, and knowledge engineering. When using knowledge engineering for the construction, the agent is set out a large deal of domain specific knowledge about the application and the user. However, a significant drawback of this method is that it requires substantial efforts from the knowledge engineer to build up and maintain knowledge bases. Moreover, the agent is highly domain-specific and its knowledge is relatively fixed [1]. In order to facilitate the construction and maintenance of the agent’s knowledge our project aims to assist domain experts (and possible users) with a useful tool. This tool helps to create fuzzy relational thesauri which describe the subject domain by means of its major concepts/instances and the various kind of relationship between these concepts/instances. In our approach the concepts in the fuzzy relational thesauri are represented by keywords of the subject domain. The build-up of a fuzzy relational thesaurus (FRT) is considerably tedious process when the knowledge engineer has to take into account all the important concepts (in our approach: keywords) of the actual domain, together with their possible synonyms and associated words. In order to facilitate this procedure we retrieve the keywords from a sample text archive, and then apply text categorization in this text retrieval method. he text archive can be the collection of documents selected by a domain expert, or obtained as the result of web searches. The next step is the categorization of the archive by means of our FRT based hierarchical (or structured) text categorization method [2]. This approach requires – a small starting FRT typically consisting of the major concepts of the subject domain; – labelling the documents for the supervised learning with category names corresponding to the concepts of the starting FRT; – one-to-one correspondence between category names and FRT terms. he categorization process uses FRT as the implementation of the hierarchical category system (often called taxonomy), i.e. the categories are represented by terms (concepts) in FRT. In order to prevent FRT from being incoherent and far from the view of its creator, categorization is proceeded on a copy of the starting FRT. The approach assigns to every category a set of terms, so-called local dictionaries, which contains words being typical for the category in the text corpus and are stored in FRT. From the aspect of categorization local dictionaries are useful to discriminate documents belonging to different categories.
250
FUZZY RELATIONAL THESAURI IN INFORMATION RETRIEVAL
From the aspect of FRT creation, local dictionaries, being in fact a by-product of the categorization approach, collect the most frequent words of categories and so describe them efficiently. The size, contents and the preparation technique of the local dictionaries vary depending on various parameters of the categorization. For the final expansion of the starting FRT, elements of local dictionaries can be inserted permanently to FRT. We provide an option for the knowledge engineer (maintaining the FRT) to supervise, filter and modify elements of local dictionaries before added to the thesaurus. In such a way the FRT is maintained in accordance with the knowledge of the domain expert and reflects his/her view on the subject domain the best. This paper is organized as follows. Section 2 describes the role of FRT in information retrieval systems. Section 3 describes the FRT management system developed we utilize in next. Section 4 provides a brief description of our FRT based text categorization approach with special emphasize on the creation of local dictionaries. In section 5 we present the utilization of the local dictionaries, and finally section 6 summarizes the paper.
2 Fuzzy relational thesaurus in information retrieval A thesaurus in an information retrieval system (IRS) can be considered as a knowledge base that represents the conceptual model of certain subject domain [3]. The thesaurus has similar role in an IRS as a knowledge base in expert systems. In IRS’s the query may be seen as a concept, and documents as objects. An object is in the answer to the query to the degree it is an instance of the concept. With the above terminology, a document satisfies a query to the degree to which it is classified as that query. In what follows we assume that the knowledge base represented by the thesaurus is in term-centered form which is maintained by the domain expert. A fuzzy relational thesaurus (FRT) [3], is a particular representation form, which is an extension of traditional thesauri schemes enriched by the strength of the term relationships and a richer set of binary relations. In FRT every term relation has a strength represented by a number of the unit interval. Formally: Definition 2.1 [3] Let X be the set of all terms, and R(X, X) is an arbitrary fuzzy term relation. Then for an ordered pair of terms, (x, y) ∈ X 2 , R(x, y) ∈ [0, 1] is the belief (or certainty) that x implies y. This strength can be considered as the membership degree of (x, y) in the fuzzy term relation R(X, X). Note that since (x, y) is an ordered pair, the symmetry of the relation is not a necessary condition. The term relation may comprise the following possibilities: – General relations: RT – related term; ST – synonym term; BT – broader term; N T – narrower term. – Abstraction relations: KO – kind of (specialization of, subclass of); IO – instance of; F O – has feature object (e.g. F O(IA, CM)) where IA = information agent, CM = construction method. – Domain specific relations of the form f o(x, y), where f o is the name of the feature object associated with x, and y is the concepts f o-feature object of y, e.g. CM (IA1 , knowledge engineering).
251
´ TIKK, YANG, BARANYI, SZAKAL
These relations are organized in a partial ordering based on their specificity (see Figure 1). The ordering is exploited in the construction of the FRT and in query answering. The strength of actual term relations is determined by the domain engineer, but a default value is assigned for each relation type in order to ease and reduce the engineer’s work (for details see section 3). RT BT KO
FO
ST
F ON T = (BT ) IO
IO
KO
Figure 1: Partial ordering of relations. means inverse. The lower a relation in the tree, the more specific it is (redrawn from [3]). The answer to a query is determined by the relation of the query terms and the document terms. In order to calculate the strength of relation between an arbitrary pair of terms, the transitive closure [4] of the term relations are computed using the partial ordering of the relations depicted on Figure 1. The transitive closure is computed with respect to a specified t-norm, e.g. the minimum or the algebraic product. In [3] the authors proposed an effective way for this computation, with time complexity of order O(m log m), where m is the pairs of terms being in relation in the knowledge base.
3 Project description In [3] the authors assumed that the domain expert is assisted by a software tool, a kind of “FRT management system” which help him in the construction task. In the next we describe one of our ongoing project which aims at developing this software. Because of the lack of space for this description is relatively brief. For further details we refer to our paper [5], which is available also on the internet. We propose a new approach for managing domain specific thesauri, where objectoriented paradigm is applied to thesaurus construction and query-based browsing. This approach provides an object-oriented mechanism to assist domain experts in constructing thesauri; it determines a considerable part of relationship degrees between terms by inheritance and supplies domain experts with information available from a thesaurus being constructed. It enables domain experts to incrementally construct the thesaurus as well, since the automatically determined degree of relationships can be refined whenever a more sophisticated thesaurus is needed. It may minimize domain expert’s burden caused from the exhaustive specification of individual relationship. This approach also provides a query-based browsing, which allows users to easily verify thesaurus terms before they are used in usual boolean queries. Our thesaurus is called object-based thesaurus. All its relationships are represented in terms of two levels: concept level and instance level. The former defines the relationships between concepts, and the latter specifies the relationships between instances. The relationships in the object-oriented paradigm are employed to directly implement the object-based thesaurus, providing a formal specification in the construction of the thesaurus. For example, BT/NT relationship is redefined as a generalization hierarchy, while
252
FUZZY RELATIONAL THESAURI IN INFORMATION RETRIEVAL
a vague relationship, RT is refined into aggregation and association which have more concrete semantics. The aggregation and association of a concept acts here as a property in the generalization hierarchy that its sub-concept inherits. Such an inheritance of the relationship turns out to be a useful mechanism to structurally specify semantics between concepts. We assign a default strength to each relationship type. For example we assign 0.7 as to every association relation, 0.8 to every part-of relation, and 0.9 to every sub-concept-of relation. We worked out a mechanism to calculate the strength of a relationship between any arbitrary pair of concepts based on object-oriented paradigm. We also have a technique to resolve multiple inheritance situation. For more details we refer to [5].
4 Text categorization for fuzzy thesaurus creation Without any facility for preprocessing the domain engineer should create the domain descriptive FRT based on raw textual data and/or his/her experience. Our goal is to facilitate this work thereby providing categorized textual data and the set of frequent keywords assigned to each category. Automated text categorization is a thriving research topic in the area of information retrieval. The objective is to assign a document to an appropriate category selected from a finite set. This task was traditionally made manually by domain expert, but in last decades the exponential increase of online available textual data various stimulated developments of automated approaches. For a survey see [6]. These methods are usually based on a probabilistic model or various kind of learning strategies. For learning purpose a set of training documents with manually assigned class labels is assumed to be available. As we mentioned earlier, our FRT based approach is applicable if categories are organized in topic hierarchy, also called taxonomy. Document categorization in taxonomy is a recently emerged field of text mining (see also [7, 8, 9]. On the internet topics are often organized in hierarchy (see, e.g., www.yahoo.com, www.ibm.com/patents), because it improves the perspicuity of the subject domain if the number of categories at a level is kept under a certain threshold. This is also the principle when inserting e-mails in a prescribed folder system. Now we describe shortly our FRT based text categorization method [2]. The FRT is basically the implementation of the taxonomy which stores and maintains adaptive local dictionary for each category. For categorization the type relationship is uniform, but their strength has importance when learning. In graph theory, term hierarchy of FRT and taxonomy can be represented by digraphs. An FRT can be applied to categorize documents belonging to the topic hierarchy of a taxonomy, if there exist a subgraph of the FRT which is isomorphic with the digraph of the taxonomy. Therefore each category is represented by an FRT term. We use the most common representation framework, the vector space model, where a document D is described by a vector of word frequency values, W D , and vector of FRT terms appearing in the document TD , respectively: WD = (w1D , · · · , wpD );
D TD = (tD 1 , . . . , tq ),
(1)
where p is the total number of unique terms appearing in the document collection, and q is the number of terms in the FRT.
253
´ TIKK, YANG, BARANYI, SZAKAL
The set of unique terms is determined automatically by removing the function words from the total term set (like e.g. “the” in English) and then applying stemming on the remaining set. There are numerous possible weighting schemes in the literature to determine the values of weights wiD and tD i . The best and most sophisticated method is the entropy weighting, which was found to outmatch 6 others in [10], but perhaps the most popular is the tf×idf weighting [11] and its versions, which defines w iD in proportion to the number of occurrence of the term i in the document, fiD , and in inverse proportion to the number of documents in the collection for which the term occurs at least once: wiD
=
fiD
N · log . ni
For tj , we use the number of appearance of jth FRT-term in the document D. The vectors in (1) are normalized before any further processing is done. We remark that the available raw text can also be processed by other approaches for FRT refinement. The set up of association relationship can be supported by measuring the cooccurrence of keywords in training documents [12]. This may overcome the creation of erroneous relations between term and also helps to discover the synonyms terms. The categorization is done in iteratively, alternating two phases. First, the vector T D is used to infer the category (or categories) of D (see [2]). In the beginning of the categorization process FRT contains only few terms, therefore the categorization is usually not efficient. In order to endow FRT with good categorizing ability, in the second (learning) phase terms being typical for the category/ies of D are added to the FRT. These two phases are proceed alternatively, while the performance of categorization achieves a certain level or cannot be improved significantly. For the purpose of FRT expansion one of the most important issue of the categorization is the determination of terms assigned to a category of a document, called local dictionary LD (C), inserted to FRT in the learning phase. The selection employs the K-nearest neighbour technique. First, the K nearest neighbours of D is selected in the sense of a similarity measure (usually cosine). Let then J denote the index set of documents among the neighbours of D being classified also in C, and containing common words with C. LD (C) is an importance ordered set of words appearing in D and in the documents of J, DJ . The importance value of the ith word is determined as the sum of frequency value in D and in DJ : j∈DJ ∪D wij . The size of LD (C) can be controlled by two parameters, p1 the maximum number of words, and α1 the minimum (cumulated) frequency value of a word (p1 ∈ N, α1 ∈ [0, 1]). Thus, the final LD (C) is an ordered set with cardinality at most |p1 |, where every word has at least α1 weight. The performance of the categorization focusing on a single category is usually measured by two quantities: recall and precision. Let a and b be the number of documents correctly or incorrectly assigned to the given category, respectively, while c be the number of documents incorrectly rejected from the given category. With this terminology: recall =
a ; a+c
precision =
a a+b
Usually only one of these measures does not give realistic result about the performance,
254
FUZZY RELATIONAL THESAURI IN INFORMATION RETRIEVAL
therefore the F-measure, their combination is usually applied: Fβ =
(β 2 + 1)precision · recall (β 2 · precision) + recall
where the parameter β is commonly set to 1. The classifier can commit two kinds of mistake. It can incorrectly assign a category to a document and hence reduce the precision, or it can reject incorrectly a category and hence degrade the recall of the classifier. The performance of the categorization depends on the above two quantities to be maximized. In the first case our approach decreases the relationship wait along the topic path, i.e. between the erroneously selected category C and the terms in TD which supported C. In the latter case new terms are inserted to FRT in order to enhance the classification performance. The insertion is proceeded in such a way that the new terms are forced to be as deep in the taxonomy as possible. This is because a term deep in the hierarchy supports all the categories along the path between the term and the root. For more details see [2].
5 Expansion of the FRT The text categorization helps the knowledge engineers to create an FRT describing the subject domain efficiently in two ways. First, local dictionaries are provided to each category. The user is offered options to filter the words, modify the weight and to specify the kind of relationship according to his/her view about the subject domain. Second, new documents can be classified and thus new data are provided for further investigation and consideration. We illustrate the described method on a simple example. We collected documents in the domain of electronic appliances from the web. The created a 211 and a 327 element document sets. We proceeded tests on both document sets. The unique term set (p in Eq. (1)) consisted of 3731, and 5793 words, respectively. The FRT was created by a semi-automatic thesaurus construction software [5]. In our application the depth of the taxonomy is three. The collected documents were classified into the following six top level topic: Audio, Computer, Computer Components, Computer Peripheral Device, House-Hold Appliances, Office Communications Appliances. We had 30 (31) 2nd level, and 40 (58) 3rd level topics in the case of 211 (327) document set. Each category had at least two training examples. The size of the total number of inserted terms depends on the parameter p 1 and α1 . The content of the local dictionaries can be modified if the stemming is omitted, or if other preprocession is performed on the corpus. The classifier applies different methods assigning categories which may also influence the size and contents of the local dictionaries. Table 1 shows the total number of inserted words in terms of the above parameters. The starting FRT contains 584, and 1779 terms in case of 211 and 327 element document set, resp. The total number of inserted words is comparable with these quantities. When stemming is proceeded in the preparation phase, a list of original versions is also provided to the user as synonyms of stemmed words. This option allows the user to select the best possible term to be inserted. The presented facility greatly reduces the required time for FRT creation even at the final insertion the user is prompted at each word.
255
´ TIKK, YANG, BARANYI, SZAKAL
327 element document set p1 α1 inserted words it 5 0.1 1069∼1198 10 5 0.25 630 3 5 0.2 796 15 7 0.05 1139∼1204 12
211 element document set p1 α1 inserted words it 7 0.05 766∼769 12 5 0.1 708∼723 10 10 0.02 860 10 7 0.05 1139∼1204 12
Table 1: Total number of inserted words in terms of p1 , α1 and the number of iteration it
6 Conclusion We develop a fuzzy relational thesaurus management system. The aim of the system is to create a knowledge base for intelligent agent. FRT creation is a tedious process, which may be ease if the majority of data for the construction is supplied in a structured form. Therefore, we provide categorized textual data and local dictionaries assigned to categories to help the knowledge engineer in the build-up. The information is retrieved by means of an FRT based text categorization approach, that classifies documents into hierarchical topic taxonomies. The categorization process creates local dictionaries as a by-product while improving its classification performance.
References [1] M. Klusch. Information agent technology for the Internet: A survey. Data & Knowledge Engineering, 36:337–372, 2001. [2] D. Tikk, J. D. Yang, and S. L. Bang. Hierarchical text categorization using fuzzy relational thesaurus. Submitted to Kybernetika. [3] H. L. Larsen and R. R. Yager. The use of fuzzy relational thesaurus for classificatory problem solving in information retrieval and expert systems. IEEE Trans. on Systems, Man, and Cybernetics, 23(1), 1993. [4] L. A. Zadeh. Similarity relations and fuzzy orderings. Inform. Sci., pages 171–200, 1971. [5] J. H. Choi, J. J. Park, J. D. Yang, and D. K. Lee. An object-based approach to managing domain specific thesauri: semiautomatic thesaurus construction and query-based browsing. Technical Report TR 98/11, Dept. of Computer Science, Chonbuk National University, 1998. http://cs.chonbuk.ac.kr/∼jdyang/publication/techpaper.html. [6] L. Aas and L. Eikvil. Text categorisation: A survey. Raport NR 941, Norwegian Computing Center, 1999. [7] S. Chakrabarti, B. Dom, R. Agrawal, and P. Raghavan. Scalable feature selection, classification and signature generation for organizing large text databases into hierarchical topic taxonomies. The VLDB Journal, 7(3):163–178, 1998. [8] A. McCallum, R. Rosenfeld, T. Mitchell, and A. Ng. Improving text classification by shrinkage in a hierarchy of classes. In Proc. of the ICML-98, 1998. http://www2.cs.cmu.edu/∼mccallum/papers/hier-icml98.ps.gz. [9] W. Chuang, A. Tiyyagura, J. Yang, and G. Giuffrida. A fast algorithm for hierarchical text classification. In Proc. of the 2nd Int. Conf. on Data Warehousing and Knowledge Discovery (DaWaK’00), pages 409–418, London–Greenwich, UK, 2000. [10] S. T. Dumais. Improving the retrieval information from external soures. Behaviour Research Methods, Instruments and Computers, 23(2):229–236, 1991.
256
FUZZY RELATIONAL THESAURI IN INFORMATION RETRIEVAL
[11] G. Salton and M. J. McGill. An Introduction to Modern Information Retrieval. McGraw-Hill, 1983. [12] L. T. K´oczy and T. D. Gedeon. Fuzzy tolerance relations based on hierarchical co-occurrence of words for intelligent information retrieval. Technical Report, University of New South Wales, 2000.
About the Authors Domonkos Tikk received his B.Sc. and M.Sc. degree in computer science both from E o¨ tv¨os L´or´and Science University in Hungary in the years 1993 and 1995, respectively. He received his doctoral degree in engineering in 2000 from Budapest University of Technology and Economics in Hungary. His research interests include data mining, text mining, automatical categorization methods, fuzzy systems, and soft computing techniques. Jae Dong Yang received the B.E. degree in computer engineering from Seoul National University, Seoul, Korea, and the M.S. and Ph.D. degrees in computer science from the Korea Advanced Institute of Science and Technology (KAIST) in 1985 and 1991, respectively. His research area includes fuzzy information retrieval, fuzzy reasoning, automatic document categorization, and databases. P´eter Baranyi received degrees M.Sc. in electrical engineering (1994), M.Sc. in Education of Engineering Sciences (1995) and Ph. D. (1999) from the Technical University of Budapest. His research focuses on fuzzy and neural network techniques. Anik´o Szak´al received her B.Sc. degree in information technology from Budapest Polytechnic, Hungary in 2000, and she is doing her M.Sc. studies at E o¨ tv¨os L´orand University, Budapest. She has twelve publications at proceedings of international conferences and workshops on the field of soft computing.
257
258
How to Combine Various Factors to Select Appropriate Knowledge Elicitation Technique? Sandra Lovrenþiü Faculty of organization and informatics, University of Zagreb, Varaždin, Croatia [email protected]
Abstract — This paper presents well-known factors that influence the knowledge elicitation (KEL) technique selection combined with psychological factors. Those factors can be considered as crisp or fuzzy. Also, additional elements that influence on the determination of factors are proposed. This approach to the KEL technique selection, using elements, is implemented in a rule-based application with fuzzy reasoning that gives a list of ranked techniques as a result. Application research results were evaluated against research results obtained according to prior knowledge of research subjects in this field. The aim was to see whether there is a need to develop more complex and systematic methods for the KEL technique selection or simpler ones that can be easily made using excerpts from literature can give the same results quality. Proposals for other methods of the KEL technique selection are made.
1 Introduction There are many different approaches for solving the bottleneck problem of knowledge acquisition (KA) and knowledge elicitation (KEL), as its part. Nowadays, most of authors are occupied with automated knowledge acquisition and data mining. Those approaches solved many problems of acquiring and representing knowledge. Still, there is always a certain amount of knowledge that needs to be elicited from a domain expert. In that part of the knowledge elicitation still exists a problem of psychological factors that are involved on expert and knowledge engineer's side. Most of books regarding a KEL were published in late 1980’s and early 1990’s [1,2,3,4,5]. They covered the subject generally, mostly concentrating on interview and giving common guidelines about the elicitation process and when to use a certain technique. Articles published in last 15 years covered different aspects of KEL: a KEL technique classification [6,7], a comparison of KEL techniques [8,9,10,11,12] and various KEL tools [13,6,14,15,16,17,18,19]. Over years, different authors covered different techniques and different factors that influence on the technique selection. This article tries to unite the most often used techniques (sixteen of them) with eleven influence factors and additional elements that determine values of factors. Most factors are well known, as knowledge type, and they are combined with psychological factors, as expert’s verbal expression. It is obvious that in
259
LOVRENýIû the real world each factor can have more than one value at a time, but with a different degree of confidence. Furthermore, it is obvious that the determination of values of those factors represents a subjective and uncertain estimation of a knowledge engineer (KE). The same can be applied to elements, so both factors and elements can be considered as fuzzy. As such, they are implemented in an application, where factors and technique values are obtained using fuzzy rules. Usage of both fuzzy factors and fuzzy elements is aimed precisely at overcoming the mentioned subjectivity of a KE’s judgement. To this proposed approach is opposed a classic way, mostly used in books that give guidelines about the selection process, which uses knowledge engineer’s knowledge, mostly without explicitly specifying factors.
2 Factors and Elements Ten influence factors that the author gave in [20] are now divided into eleven factors and each of them can obtain three possible values. Values of those factors can be determined: directly, when a KE determines a value of a certain factor, or indirectly, when a KE determines values of intermediary elements which then deter-mine factor values. For reasons of a KE’s uncertainty and subjectivity, for each factor two or three elements that should characterize a particular factor are proposed. 2.1 Factors Factors that influence on the KEL technique selection are divided into three groups. With each influence factor references that mention all or some parts of that factor are given: Factors related to the problem domain x
knowledge type (procedural, declarative, combination) [2,6,7,8,9,10,15,21,22],
x
domain width (narrow, medium, broad) [6,21],
x
knowledge scope (common or special knowledge, or combination) [2,4,6,15 ];
Factors related to participants in the elicitation process x expert type (verbal, non-verbal, in between) [2,4,6,7], x expert’s availability (good, medium, bad) [6], x relations between KE and expert (good, medium, bad) [6], x KE’s experience (good, medium, bad) [6], x KE’s knowledge of the problem domain (good, medium, bad) [2,6,10]; Factors related to elicitation techniques (short, medium, long) x preparation time [6], x training time[6],
260
HOW TO COMBINE VARIOUS FACTORS TO SELECT APPROPRIATE ... x elicitation realization time [2,6,21]. 2.2 Elements Additionally to fuzzy factors, fuzzy elements for each factor, according to assumption of their influence on factor values, are proposed. Those elements for individual factors are as follows: Knowledge type x procedures – the percentage of procedures in domain knowledge that a KE is ac-quainted with: the low percentage means that required knowledge will be more procedural, x concepts – the percentage of concepts in domain knowledge that a KE is acquainted with, x strategies, decisions, goals (SDG) - the percentage of strategies, decisions and goals in domain knowledge that a KE is acquainted with: the low percentage means that required knowledge will be more conceptual; Domain width x subdomains – the number of subdomains of a problem domain, x solutions – the number of solutions that are required as an output from the system; Knowledge scope x common knowledge - the percentage of common knowledge in domain knowledge that a KE is acquainted with: the low percentage means that required knowledge will be more common, x special knowledge - the percentage of special knowledge in domain knowledge that a KE is acquainted with; Expert type x eloquence – a grade from one to ten that designates expert’s eloquence when he expounds his domain knowledge, x making conclusions - a grade from one to ten that designates expert’s explicitness when he expounds his conclusions and problem solving strategies, x prop-words - a grade from one to ten that designates expert’s stammer and usage of prop-words; Expert’s availability x meetings – the number of KEL meetings that an expert has time for, x hours – the number of hours per one meeting that an expert has time for; Relations between KE and expert
261
LOVRENýIû x cooperation – a grade from one to ten that designates expert’s readiness to cooper-ate in a KEL, x complaisance – a grade from one to ten that designates expert’s complaisance when a KE solves knowledge problems that occurred during the knowledgebased system (KBS) development; KE’s experience x the number of techniques - the number of KEL techniques that a KE has practical experience with, x gathered knowledge - the percentage of success that a KE had in prior KEL cases; KE’s knowledge of the problem domain x common knowledge - the percentage of common knowledge in domain knowledge that a KE is acquainted with (the same as for knowledge scope), x procedures knowledge – a grade from one to ten that designates a KE’s knowledge of characteristic domain procedures independently of the current problem, x concepts knowledge - a grade from one to ten that designates KE’s knowledge of characteristic domain concepts independently of the current problem; Preparation time x the number of hours – the number of hours that a KE can spend to prepare himself for the elicitation; Training time x the number of hours - the number of hours that an expert can spend to get acquainted with the technique and to prepare himself for the KEL; Elicitation realization time x the number of hours - the number of hours that an expert and a KE can spend on the KEL process itself.
3 Selection Method Fifteen techniques used in this selection method are mentioned in [20]. The only difference is that real-time protocols are now divided into verbal and non-verbal. All sixteen techniques are: unstructured interview, semi-structured interview, structured interview, focused discussion, laddering, 20 questions, teach back, critique, construct elicitation (Repertory Grid Analysis), card sorting, matrices, verbal real-time protocols, non-verbal real-time protocols, retrospective protocols, role playing and simulation. The application, using only factors without elements, is also described in [20]. The final application is made in XpertRule tool [23], where each element and each factor is fuzzified using graphs on which functions for confidence degrees, or membership values (MV) are denoted for all element and factor values.
262
HOW TO COMBINE VARIOUS FACTORS TO SELECT APPROPRIATE ... A classic way of the technique selection is, of course, used without an application. 3.1 Determining Factor Values To determine membership values for all factor values, a KE must estimate grades for all elements. Those grades are then fuzzified and used in fuzzy rules. For each factor exist three rules for each influence element (since each factor can have three different values). The process of fuzzy inference is made according to the MAX-MIN composition [23,24] described in [20] and the process of defuzzification is made according to the Centre-ofgravity (COG) method [23,24], also described in [20]. Obtained defuzzified factor values are then used as input for determining technique ranks. 3.2 Determining Technique Ranks The process of determining technique grades is the same as for factor values. A final solution is a list of ranked KEL techniques, as shown in Figure 1. The application offers the following knowledge elicitation technique list: Technique Semi-structured interview Focused discussion Structured interview Unstructured interview 20 questions Teach back Laddering Critique Simulation Role playing Construct elicitation Matrices Retrospective protocol Card sorting Non-verbal real-time protocol Verbal real-time protocol
Points 7,26 7,24 7,18 6,54 6,31 6,29 6,23 5,97 5,59 5,46 5,39 5,28 5,28 5,23 5,03 4,91
Figure 1: Application results Factor values obtained in the prior step are again fuzzified and used in fuzzy rules for each of sixteen techniques. Each technique has 33 rules (eleven factors with three possible values). Rules for determining technique grades are developed from textual descriptions in various literatures [2,4,6,7,8,9,10,15,21,22,25]. As a final solution is taken a result from COG formula, rounded on two decimal places for better distinction among technique ranks.
4 Research The aim of the evaluation was to prove the hypothesis that results of fuzzy rule-based approach (using the application) are better than those gained by a KE according to his/her
263
LOVRENýIû prior knowledge in this field. The research was conducted at University of Zagreb, Faculty of organization and informatics in Varaždin, among third year students. 4.1 Knowledge Engineer Subjects Fourteen students and former students that already had a course in knowledge-based systems and developed demo-versions of KBS represented KE-s. Materials about techniques and influence factors were given to those KE subjects to study for a week. After that they had a short ten-question test about influence factors. Ten of them had 50% or more accurate answers and were included in further research. Six of them were female and four of them male. The year in which they took course in KBS is shown in Table 1. The average grade that subjects achieved on test was 6,10 out of 10. Course Year 1996/1997 1997/1998 1998/1999 1999/2000 2000/2001
Number of KE subjects 1 1 2 3 3
Table 1: The year of a KE subjects’ KBS course KE subjects were also asked to read two KEL problems and to rank KEL techniques from 1 to 16, where rank 1 denotes the most appropriate technique. The first problem was the appropriate wine selection for a certain meal and the second one was a cardiac infarct diagnosis. In both problem descriptions information about all factors was incorporated. Technique ranks were transformed into 1 to 10 grades, where the best technique obtained grade 10 and the worst 0,625. After that, pondered arithmetic mean was calculated from each technique grades, where ponders were grades that students gained on test. This mean was considered as final technique grade. According to those final grades, techniques were ranked so that a technique with the highest grade was put on the first place. 4.2 Evaluation Subjects 73 third grade students had lesson in knowledge elicitation as a normal part of their course in KBS and after that they received additional materials to study for a week. During the research, they were divided into two groups of 36 and 37 subjects. One group was the test group and the other the control group. They were tested with two tenquestion tests, one for influence factors and one for factor elements. They were also asked to read two KEL problems, the same as KE subjects. After that, lists of techniques and their grades for both problems, which were obtained by KE subjects, as described previously, were presented to the test group. Also, lists of techniques and their grades for both problems, which were obtained by application, were presented to the control group. Groups had to grade those lists according to seven criteria that will be described in the next section. The process of the hypothesis evaluation is shown in Figure 2. Only 30 students in each group had 50% or more accurate answers on test (28 in test group, so two students with 45% accurate answers were added) and their list grades were
264
HOW TO COMBINE VARIOUS FACTORS TO SELECT APPROPRIATE ... taken into consideration. In the first group were 24 male and 6 female subjects. The second group consisted of 23 male and 7 female subjects. The average test grade was 6,43 for the first group and 6,08 for the second. Problem
Knowledge
Elements & Factors
10 students
Fuzzy rules
Technique list
Technique list
Test group
Control group
Figure 2: The hypothesis evaluation 4.3 Evaluation Criteria The application evaluation involved seven different criteria that comprised all eleven influence factors: knowledge type, domain width, knowledge scope (with KE’s knowledge of the problem domain), expert type, relations and KE’s experience, time limits (expert’s availability, preparation, training and elicitation realization time), combination of all criteria. Evaluation subjects had to grade both problems technique lists for each criterion on one-to-five Likert-type scale. The grading form is shown in Figure 3.
265
LOVRENýIû Please grade proposed solution with grades from 1 to 5 (1 - it doesn’t satisfy at all, 5 - completely satisfies) according to how it satisfies following characteristics of the problem (circle only 1 number): Characteristics 1. knowledge type (concepts, procedures, strategies) 2. domain width (subdomains, solutions) 3. knowledge scope (general, special, concepts, procedures) 4. expert type (eloquence, prop-words, stammer) 5. relations and experience (cooperation, successfully used techniques) 6. time limits (preparation, training, KEL) 7. all characteristics together
Solution 1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
1
2
3
4
5
Figure 3: The grading form 4.4 Results The research hypothesis was that the combination of eleven factors along with elements and implementation of fuzzines in the appropriate KEL technique determination would give better results than the determination of techniques by KE subjects’. To prove the hypothesis, for each criterion should have been proven the same. If we denote the average grade of the list obtained by KE subjects as X KE and the average grade of the list obtained by the application as X A , following hypotheses can be made: H 0 ... X A d X KE
H 1 ... X A ! X KE Hypotheses testing were made at 5% (Į.05) confidence level with one-tailed t-test. Results for the problem one are shown in Table 2 and for the problem two in Table 3. As it can be seen in results, the average grade for the technique list obtained by the application is significantly greater than the average grade of the technique list obtained by KE subjects according to all seven criteria and for both problems. Therefore, H0 should be rejected and H1 accepted. The proposed hypothesis is fully proven. According to the results, it is obvious that a systematic way of using relevant factors can give more satisfying proposal of a KEL technique that should be used in the KEL process than mostly non-systematic direct proposal of a knowledge engineer.
266
HOW TO COMBINE VARIOUS FACTORS TO SELECT APPROPRIATE ... Criteria Knowledge Solution 1 type Solution 2 Domain Solution 1 width Solution 2 Knowledge Solution 1 scope Solution 2 Solution 1 Expert type Solution 2 Relations & Solution 1 experience Solution 2 Solution 1 Time Solution 2 Solution 1 All criteria Solution 2
X
3,100 3,700 3,133 3,633 3,367 3,767 3,500 4,000 3,433 4,033 2,900 3,733 3,367 3,733
į 0,978 0,737 0,763 0,482 0,752 0,844 1,057 1,183 0,920 0,795 0,746 0,964 0,605 0,573
t-test
p
2,683 p<0.05 3,035 p<0.05 1,938 p<0.05 1,726 p<0.05 2,703 p<0.05 3,745 p<0.05 2,410 p<0.05
Table 2: Results for the problem one Criteria Knowledge Solution 1 type Solution 2 Domain Solution 1 width Solution 2 Knowledge Solution 1 scope Solution 2 Solution 1 Expert type Solution 2 Relations & Solution 1 experience Solution 2 Solution 1 Time Solution 2 Solution 1 All criteria Solution 2
X
3,000 3,733 3,033 3,400 3,033 3,467 2,533 3,200 2,900 3,600 2,967 3,667 3,100 3,400
į 0,966 0,854 0,657 0,757 0,875 0,884 1,056 1,222 0,746 0,879 0,836 0,650 0,700 0,490
t-test
P
3,115 p<0.05 2,003 p<0.05 1,908 p<0.05 2,261 p<0.05 3,325 p<0.05 3,621 p<0.05 1,923 p<0.05
Table 3: Results for the problem two
5 Other Methods for Combining Factors The method proposed above is a result of author’s experiment to apply fuzziness as a means to obtain a list of ranked KEL techniques. There are simpler methods that can be used with the same goal and the research should be conducted to show whether more complex and systematic determination of a technique is justified. Of course, one may add new factors or elements or develop different methods for KEL technique selection and conduct a research to prove that the problem solution is even more complex.
267
LOVRENýIû The simplest way to combine factors is simple points system, where points are given to techniques according to factors relevance to them. This means that rules for determining technique grades, mentioned above, can be also used in a simpler way. The value of each factor can add points between 1 and 10 to each technique, depending on technique applicability according to that value. The final sum should be divided by ten so that it can be easily comparable with fuzzy rule-based application results. Other possibility, one step simpler than method proposed in this article, is to use only rules, without fuzziness. Those can be simple rules, almost like the points system, or multilevel rules that use only factors or factors and elements together. Also, to give simpler results to a knowledge engineer, so that his decision can be easier, techniques can be grouped or only first few can be presented as a result. Moreover, one can try a different ways of factors and elements input (for example, directly or through description) to make determination of factor values easier for a KE, since it is important that it is done correctly. Those approaches the author also implemented in XpertRule application. A simple application that uses points system was evaluated against multilevel rule-based application. The second application, because of the possibility that a KE isn’t experienced enough, at the beginning offers a description of the meaning of each factor value instead of values itself. Also, the possibility that a KE can’t estimate values of some factors is added (for example, he/she doesn’t know the expert). Moreover, this application includes a two-level knowledge-based reasoning according to factor values. First, for each group of factors is obtained a list of techniques that satisfy factor values. The second group of factors is divided into two groups, one more related to an expert (expert type and availability), and the other more related to a KE. Lists doesn’t have to contain all techniques. After that, each appearance of a certain technique in one of output lists is counted and represents a grade for that technique. Therefore, each technique can at the most have four points. Techniques are grouped according to points into three groups: techniques that best satisfy a certain KEL problem (four points), those that satisfy it very well (three points) and those that are good for it (two points). It is possible that some group doesn’t contain any technique. The research has shown that more complex and systematic second application gives better results. More detail description of the applications and the research the author gave in [26]. A possible future evaluation of the rule-based against the fuzzy rule-based application should tell whether there is any difference between application results and which method is better, in what parts and where it should be improved. As it can be seen, various modes of the selection process can be changed with a goal to improve the whole process. And improving the process is important, since the technique chosen has influence on which and how many knowledge will be gathered from a domain expert.
6 Conclusion The aim of this work was to improve the KEL technique selection in KBS development by adding the fuzziness to this process. It is known for years that the KEL has been the critical bottleneck of the KBS development. The KEL technique selection, as its part, has influence on the success of the elicitation process. Gaining correct and complete knowledge at the beginning of the KBS development is one of the factors that ensure that time and cost limits given will be respected.
268
HOW TO COMBINE VARIOUS FACTORS TO SELECT APPROPRIATE ... The testing has shown that the proposed method of the KEL technique selection gives better results than the solution that would be obtained by KE-s according to their prior knowledge and studied literature. Furthermore, obvious fact is that the proposed method lasts much shorter and doesn’t burden a KE as much as self-selection of the appropriate KEL technique. Therefore, the application for the KEL technique selection represents a valuable contribution to the KBS development process and opens different possibilities for a further research.
References [1] M.A. Carrico, J.E. Girard, J.P. Jones and J. Ranade. Building knowledge systems. Developing & managing rule-based applications. McGraw-Hill Book Company, New York, 1989. [2] D. Diaper, ed. Knowledge Elicitation: principles, techniques and applications. Ellis Horwood Limited, Chichester, UK, 1989. [3] A. Hart. Knowledge Acquisition for Expert Systems. Kogan Page, London, UK, 1989. [4] M. Firlej and D. Hellens. Knowledge elicitation: a practical handbook. Prentice Hall, Hemel Hempstead, UK, 1991. [5] A.C. Scott, J.E. Clayton and E.L. Gibson. A Practical Guide to Knowledge Acquisition. Addison-Wesley Publishing Company, Reading, Massachusetts, 1991. [6] N.J. Cooke. Varietes of knowledge elicitation techniques. International Journal of HumanComputer Studies, 41(6):801-849, 1994. [7] J.E. Burge. Knowledge elicitation for design task sequencing knowledge. M.S. Thesis, December 1998., http://www.wpi.edu/Pubs/ETD/Available/etd-101399123113/unrestricted/ jburge.pdf, 31.05.2001. [8] G. Wright and P. Ayton. Eliciting and Modelling Expert Knowledge. Decision Support Systems, 3(1):13-26 , 1987. [9] P.B. McCloskey, J. Geiwitz and J. Kornell. Empirical comparisons of knowledge acquisition techniques, In Proceedings of the Human Factors Society 35th annual meeting, pages 268272, 1991. [10] P. McGeorge and G. Rugg. The uses of ’contrived’ knowledge elicitation techniques. Expert systems, 9(3):149-154 , 1992. [11] C.-J. Chao and G. Salvendy. Impact of cognitive abilities of experts on the effectiveness of elicited knowledge. Behaviour & Information Technology, 14(3):174-182 , 1995. [12] S.R. Jones and J.C. Miles. The use of a prototype system for evaluating knowledge elicitation techniques. Expert Systems, 15(2):83-97, 1998. [13] B.R. Gaines and M.L.G. Shaw. Eliciting knowledge and transferring it effectively to a knowledge-based system. IEEE Transactions on Knowledge and Data Engineering, 5(1):4-14, 1993., http://repgrid.com/reports/KBS/KSS0/KSS0.pdf, 24.05.2001. [14] B. Le Roux. Knowledge acquisition as a constructive process. A methodological issue. Decision Support Systems, 18(1):33-42, 1996. [15] G.I. Webb. Integrating machine learning with knowledge acquisition through direct interaction with domain experts. Knowledge-Based Systems, 9(4):253-266, 1996.
269
LOVRENýIû [16] B.R. Gaines and M.L.G. Shaw. Knowledge Acquisition, Modeling and Inference through the World Wide Web. International Journal of Human-Computer Studies, 46(4):729-759, 1997., http://repgrid.com/reports/KBS/KAWeb/ KAWeb.pdf, 24.05.2001. [17] F. Alonso-Amo, N. Juristo, L. Maté, P.L. Muñoz and J. Pazos. How much can you learn? A new learning metric. Expert Systems, 15(4):256-261, 1998. [18] C.-H. Wu, S.-C. Kao and K. Srihari. GDKAT: a goal-driven knowledge acquisition tool for knowledge base development. Expert Systems, 17(2):90-105, 2000. [19] D. Richards and P. Busch. Acquiring and Applying Contextualised Tacit Knowledge. Presented on Australian Conference for Knowledge Management & Intelligent Decision Support (ACKMIDS' 2001), Melbourne, Australia, December 2001., http://www.comp.mq.edu.au /~richards/papers/RichBuschACKMIDS01.pdf, 10.01.2002. [20] S. Medenjak. Fuzzy rule-based selection of the elicitation technique in the expert systems development. In Proceedings of the 2001 IEEE International Conference on Intelligent Engineering Systems, pages 47-51, Helsinki, Finland, September 2001. [21] J. Liebowitz, ed. The handbook of applied expert systems. CRC Press, Boca Raton, Florida, 1998. [22] D.R. Newman. Knowledge elicitation. 05.11.2000., http://www.qub.ac.uk/mgt/intsys/ kelict.html, 28.05.2001. [23] … XpertRule Help, Attar Software Ltd., 1997. [24] N.K. Kasabov. Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering. MIT Press, Cambridge, Massachusetts, 1996. [25] M.R. Klein and L.B. Methile. Knowledge-based Decision Support Systems with Applications in Business. John Wiley & Sons, Chichester, UK, 1995. [26] S. Medenjak and B. Kliþek. Which technique to use when eliciting knowledge from an expert? In Proceedings of the13th International Conference on Information and Intelligent Systems, pages 33-43, Varaždin, Croatia, September 2002.
About the Author Sandra Lovrenþiü received her Master’s degree in information science in 2002 from Faculty of organization and informatics of Zagreb University in Croatia. Her research focuses on recognizing, acquiring and formulating knowledge that is needed for intelligent systems development.
270
Personal Agents in Distance Learning Systems Marko Rosiü1, Slavomir Stankov1, and Vlado Glaviniü2 1
Faculty of Natural Sciences, Mathematics and Education University of Split, Split, Croatia {marko.rosic, slavomir.stankov}@pmfst.hr 2
Faculty of Electrical Engineering and Computing University of Zagreb, Zagreb, Croatia [email protected]
Abstract — Personal agents are proactive and adaptable intelligent agents that meet the demands of individuals. This kind of agents develops a user's profile and, basing on that profile, performs tasks instead of the user. The usage of personal agents can be a high quality solution for solving the problem of heterogeneity of information systems users and for avoiding information overload, and hence offers itself as an appropriate paradigm for distant learning systems conceptualization and implementation. This paper describes one possible direction in the development of distance learning systems based on personal agents.
1 Introduction Research in the field of intelligent agents is presently a hot topic since their application seems to bring quite a number of benefits in various areas like business (e.g. Ecommerce), cooperative work (e.g. cooperative authoring and office automation), communication (e.g. teleconferencing and interactive live broadcasting), education (e.g. distance learning systems), entertainment (e.g. gaming), and manufacture (e.g. process control and workflow automation). This paper describes one possible direction in the development of distance learning systems based on the use of a special kind of intelligent agents, which are denoted personal agents. Distance learning systems form a class of important distributed applications, which base their operation on a number of services provided by information infrastructures like access to information, electronic transactions and communication [1]. Regarding the teaching process, by using distance learning systems new paradigms can be enforced that enable distribution of educational content, interaction among classes of users (instructor-student, student-student and student-educational institution), testing, evaluation and eventually advice in different domain knowledge areas [2]. Recent developments in information and communication technology (ICT) has enabled the conceptualization of modern distance learning systems possessing the following characteristics: 1. Distribution. Knowledge to which distance learning systems enable access is not to be found in one place but is conversely distributed into a number of
271
ROSIû, STANKOV, GLAVINIû places thus which allowing for a faster system operation and simultaneously enabling access to system resources for a large number of users. 2. Adaptability. Systems support adaptation to different users habits and needs. 3. Multimedia orientation. They provide the users a multimedia presentation of domain knowledge. 4. Cooperation. Different systems support common elements, which are available to all users (e.g. different systems can use common domain knowledge databases). It is foreseen that distance learning systems will in the near future keep all of these characteristics and will additionally develop adaptability as well as cooperation. Future distance learning systems will certainly have a dynamic life cycle where there will not be a clear line between the development phase and system usage. The system itself and its environment is expected to be frequently updated in response to changes in information, services, hardware, software and user requirements, and will enable diversity in information formats and execution platforms. Furthermore, users of future distance learning systems will range from experts to novices with a wide variety of purposes. It is hence necessary to provide in a quality way appropriate services for all these groups. However, no matter to which group the user belongs, increase in the amount of available information and services offered via the information infrastructure often puts her/him in a state of information overload, where user productivity decreases due to processing too a large amount of received data [3]. Thus individuals who are recipients of distance education services should be allowed to concentrate on the educational contents and not on the search and classification of respective educational materials. Additionally, when representing the teaching contents it is usually necessary to adjust to users' needs and habits. In our research we concentrate on intelligent tutoring systems [4], which form a distinctive class of systems delivering distance education that base their operation on a particular educational model in which the role of human teacher is replaced with a computer tutor. Intelligent tutoring systems (ITSs) basically consist of a domain knowledge base as well as of both a student module with an appropriate student model and a teacher strategy guiding the learning and teaching process [5]. Within such a framework we attempt to solve the above mentioned open issues in distant learning systems through the use of personal agents.
2 Personal agents Personal agents are proactive and adaptable intelligent agents that meet the demands of individuals; their use thus appears to be a high quality solution for the problem of heterogeneity of information systems users and for avoiding information overload [6]. This kind of agents develops a user profile and, basing on that profile, perform tasks instead of the user. In this way the user spends less time and is spared from performing possibly complex actions, which her/his personal agents perform instead. Personal agents will be described through a number of pertinent issues like creation of user personal profiles, security and alternatives for mutual interaction within multiagent systems. Some methods of using personal agents for information space search will also be analyzed.
272
PERSONAL AGENTS IN DISTANCE LEARNING SYSTEMS 2.1 Personal profiles The personal profile of the user of a distance learning system may contain information that includes: keywords relative to the domain the user is interested in, her/his level of previous knowledge of the domain to be taught, the level of knowledge to be reached by using the system, the means used by the system to present the teaching contents and similar data. This profile can be created by using one of the following methods: 1. directly asking the user a set of questions; 2. starting the interaction with an "empty" personal profile to be filled up "on-thefly" by observing the users' habits when performing the tasks to be assigned to personal agents; 3. inheriting a default personal profile that is afterwards updated. It is possible to change the personal profile during its use. Moreover, it can be expected that the personal profile has to change more often at the beginning of a session while in the continuation changes will occur less often since the system will gain enough information about the user. This process of filling in the required information is denoted stabilization of the personal profile. Profile Top level section
Profile section A Name1=Value1 Name 2=Value2
Profile attributes
SubSection A1 Name3=Value3
Subsection Profile section B
Figure 1: Structure of personal profile as defined by Open Profiling Standard In order to avoid manifold creations of personal profiles for different needs, the structure of personal profiles has been standardized. The proposed Open Profiling Standard (OPS) [7] is intended to provide a uniform architecture for using personal profile information in Internet applications, which would offer individuals tailored contents, goods and services that match their personal preferences while at the same time protecting their privacy. The implementation of the standard is expected to open a range of new market opportunities on the Internet and especially provide support for keeping individualized and customized personal contents. In accordance with OPS, a personal profile consists of hierarchically grouped sections with user data represented by a set of attributes. Each section contains information specific for a particular use of the profile and can also contain subsections. Such personal profiles can be stored in the user's computer or, alternatively, in a corporatewide or global directory. The rights for usage by individual agents are separately defined for each section. Figure 1 shows the high-level structure of the personal profile as defined by OPS.
273
ROSIû, STANKOV, GLAVINIû 2.2 Security Assigning tasks to a personal agent by the user opens a lot of issues related to her/his security. According to Feldman [8], the following questions concern personal agents secure usage: 1. Will the personal agent really perform those tasks that the user asked it to, in other words is there a possibility that the agent may misinterpret the user's instructions? 2. Is it possible that the personal agent could distribute the user's personal data to unauthorized people? 3. Will it act effectively or will the limited agent capabilities be exceeded, resulting in poorly negotiated bargains or poorly retrieved information? 4. In complex, high-pressure situations, can we trust an agent-based system to offer the best potential solutions or will it miss something important? 5. How much can we trust an agent-based system to automate our actions? Do we want it to check with us for every initiative it takes? Can we delegate authority little by little, so that we edge into a partnership with it? 6. Do we trust someone else’s agent to be who it says it is? Can we develop widely accepted and secure authentication mechanisms? A multiagent architecture including personal agents as well as the respective environment in which they are meant to perform their tasks should ensure appropriate security mechanisms that will act preventively with respect to the above problems. 2.3 Multiagent systems It is well possible to organize the execution of personal agents within a multiagent system environment, which usually have the following characteristics [9, 10]: 1. Each agent may have different knowledge, capabilities, reliability, resources, responsibilities or authority. 2. System global control does not exist. 3. Different agents may perceive the same event or object differently. 4. The agents may specialize in or focus on different problems and sub-problems. 5. An important goal is the convergence of solutions despite the incomplete or inconsistent knowledge or data. 6. Data is not centralized, hence agents must share data. 7. System execution is asynchronous: an agent can be running while receiving queries.
user
user
agent
agent
agent
databases
Figure 2: Multiagent system 274
PERSONAL AGENTS IN DISTANCE LEARNING SYSTEMS It is clear from the above mentioned characteristics that the realization of a multiagent system is a complex endeavor for a number of reasons. Namely, it is usually not possible to enforce a global supervision of the system in question, each and every agent has the access to only a limited set of data, and each and every agent need not be able to independently solve a given problem. Supplied data is distributed and the agents have to communicate with each other while solving the given problem. Additionally, a number of cooperating personal agents would be assigned to solve a user's problem, possibly cooperating with agents assigned to other users, see Figure 2. It is possible to realize multiagent systems either through competition among groups of agents with periodical evaluations of results thus achieved or through their cooperation. The realization based on multiagent interaction opens in turn new problems, hence answers to some fundamental questions are needed [10]: 1. What are appropriate agent architectures for different classes of problem solving? 2. How does an agent acquire its knowledge and how should it be represented? 3. How does a complex task get decomposed and assigned to different agents? 4. How should agents cooperate and communicate with each other? Answers to these questions also need to be provided when defining the environment in which the agents will perform their tasks. The inherent functional complexity of distance learning systems along with the great number of potential users grants additional motivation for exploring such multiagent environments. 2.4 Search in the information space Search in the assigned information space is a common job for the user of a distance learning system. The effect of information overload has created the need for automating it, i.e. for delegating information space search to personal agents. Available methods of automatic search of the information space can be grouped as follows [11]: 1. Search based on fixed user setting of keywords, selecting documents and sorting selected documents according to an estimate of document importance to the user. Comparison of the importance of the contents of two documents is performed by evaluating a function whose parameters are the number of occurrence of keywords in the document as well as weight factors for the keywords. For each document satisfying a threshold set by the user, a vector is formed whose coordinates correspond to the product of the number of occurrence of the respective keyword and the weight factor for that word. The comparison function calculates the distance of the vectors thus generated. 2. Search based on adaptable modeling of user needs. Systems based on this method dynamically change the user profile according to the contents of documents that the user selects from a given set. In addition to the search based on the above described document evaluation, it is also possible to perform information space searches based on previous searches that need not necessarily have to be performed on request of the same user. Methods that belong to the former class are usually applied in single searches, while those belonging to the latter are used in continuous searches. When considering Web searches it should be noted that search agents must not rely exclusively on results of previous searches when servicing new requests because of a number of reasons [12]: 275
ROSIû, STANKOV, GLAVINIû
1. The Web continuously grows. 2. Links that the agent classified as interesting to the user in some previous searches can be already "dead"; i.e. there exists the possibility that documents no longer existing on the Web are addressed. 3. Documents in previous searches classified to be interesting to the user can in the meantime also be altered thus becoming worthless.
3 Web based intelligent tutoring systems The present day approach to ensuring the users access to ITSs is based on employing Web services, what provides a number of advantages. General arguments include the following ones: (i) the Web is a commonly accepted service, (ii) Web browsers are software products that can be procured for free and (iii) support platform independence as well. Specifically, when considering distant learning, it should be noted that (iv) the Web allows an extremely easy two-way communication between students and teachers as well as among students themselves, and that (v) Web browsers provide an appropriate interactive hypermedia learning environment. ITSs with such a Web enabled access are denoted Web oriented ITSs [13]. A typical ITS structure is shown in Figure 3. The expert module is the repository for storing and structuring information. The teacher module resembles a human tutor; this module selects and sequences instruction and teaching styles, and the learning scenario (e.g. guided free play, learning-by-doing, discovery learning, mixed initiative dialogue [14]). The student module represents two major kinds of information: the student personal data and predicted capability for that particular course as well as her/his current domain knowledge standing. student module user interface
teacher module expert module
Figure 3: ITS structure Distributed Tutor-Expert System (DTEx-Sys) is a Web oriented intelligent tutoring system, which has been developed for asynchronous distance education purposes [15]. It is designed as a 3-tier client-server architecture, ensuring separation of intelligent tutoring functions from the user interface and the domain knowledge base(s). System functionality encompasses knowledge base access for arbitrary domain knowledge, along with testing, diagnosing and evaluation of students' work, as shown in Figure 4. The original system module functions are transferred to a number of personal agents in charge of the process of learning and teaching, which include the following intelligent agents classes:
276
PERSONAL AGENTS IN DISTANCE LEARNING SYSTEMS
Access login
Registration
Access to domain knowledge bases
Main menu
Testing
Evaluating
Recommendation for further work
Consultation
Help
Monitoring
Figure 4: DTEx-Sys functional structure 1. mentor agent 2. teacher agent 3. explorer agent The mentor agent is in charge of obtaining information for the user on the contents furnished by the system, creating the user's profile, arranging with the user the individual learning plan and driving the educational process. The user profile includes the following elements: 1. user's level of previous knowledge of the domain to be taught; 2. user's age; 3. information on the level that the user wants to reach in the domain knowledge and time that the user can spare for mastering a teaching material granule; 4. time that the user can spare for mastering a teaching material granule. The mentor agent writes the user profile in the student base. The user profile is essential for making an individual learning plan. The learning plan thus created represents a specific contract between the user and the mentor agent. It includes all the actions that will be applied in the "agreed" educational process, as well as the knowledge at user disposal at the end of the successfully finished tutoring. Of course, it is possible to change the learning plan during the tutoring session, either on the user or mentor initiative. The mentor agent, however, is not in charge of the teaching process, that being the task of the teacher agent that teaches according to the individual learning plan the user "negotiated" with it. The teacher agent performs its tasks by providing the users a number of services like teaching materials distribution, testing the users, evaluation and issuing recommendations for further work in the domain of the tutored teaching unit. This agent builds upon the user profile in order to adapt to individual user needs. Additionally, after each finished teaching chapter it informs the mentor agent on the result of the educational process (i.e. on the student performance). On the basis of this report the mentor agent follows the user progress and can take the initiative for changing the learning plan in any of its segments and correct possible mistakes. The teacher agent
277
ROSIû, STANKOV, GLAVINIû has the possibility of using different teaching paradigms that are written in a courseware base. The teacher agent forms lessons in collaboration with the explorer agent, which is an intelligent agent in charge of searching the contents of domain knowledge bases. Using this agent decreases the need for client-server communication hence the overload of the underlying computer network. A lesson thus created requests execution of related queries in the domain knowledge base. Without using agents for searching the domain knowledge bases, creating the lesson would need a cyclic client-server communication, where the teacher agent would send a query to the server, the server would execute it and return the results. This would, of course, unnecessary overload the network resources.
Knowledge base
Teacher agent 4.results 1.activate
3.executing queries
Explorer agent
2.migrate
Explorer agent
Server
Figure 5: Lesson generation using explorer agent The solution using the explorer agent enables the teacher agent to delegate to the explorer agent the task of migrating the execution to servers containing the information necessary for creating the lesson (Figure 5). Figure 6 shows the interaction among the various agent classes and the databases supporting the teaching process in DTexSys.
Knowledge base Explorer agent
Courseware Teacher agent
Students' base
Mentor agent
User
Figure 6: Agent-databases interaction in DTEx-Sys The agents perform their roles in a Semantic Web environment, which enables personal agents to collect information from different sources and process it, exchange data with other agents and use services of Web based information systems, thus improving job execution and at the same time solving many problems of present Web users [16]. Generally speaking, the Semantic Web appears as a promising technology 278
PERSONAL AGENTS IN DISTANCE LEARNING SYSTEMS for implementing distance learning system. Learning materials can be easily organized into customized learning courses and delivered on demand to the user, according to her/his profile [17]. The Semantic Web concept supplies to Web oriented ITSs the following features: Sharing the contents of different Web oriented ITS knowledge bases no matter on the knowledge representation. By sharing the content of knowledge bases all ITSs offering their services through the Semantic Web could be considered as a unique system that would provide the largest possible amount of stored knowledge. Users could access this knowledge through a unique interface of a chosen ITS by using its agents and those of the ITS possessing the requested knowledge. Accessing all the services of other information systems offering their services through the Semantic Web, thus enriching the set of services to be provided to the users. Different structuring of domain knowledge terms in the same knowledge base, thus enabling reuse of already stored knowledge without need to learn relations and terms of the knowledge base creator. In this way it is possible to offer the users different approaches to the same domain knowledge while sharing the common elements. These are only but a few possibilities that Semantic Web technology provides to intelligent tutoring systems. However, it should be noted that there are also many common problems pertinent both to intelligent tutoring systems and the Semantic Web like those related to knowledge representation, knowledge access and the like.
4
Conclusion
The increase of capabilities of computer systems, offered services, available information amount as well as number of users have all hindered a more efficient usage of information infrastructures. The first problem to be solved is certainly information overload, which leads to reduction of user productivity. The next one is providing an access to information system resources by groups of users differing in their previous knowledge, capabilities and needs for services and information. It is possible to avoid information overload by providing automatic search of the information space, as well as a proper selection of the material thus found. On the other hand, adapting information systems to the needs and habits of different users can ensure access to system resources by different groups of users. Personal agents can be applied in implementing both of these. Web oriented intelligent tutoring systems, as a special kind of information resources to be provided in information infrastructures also benefit from applying personal agents in supporting their operation. In the paper a novel approach in Web oriented intelligent tutoring system conceptualization and development is described, which relies on the interaction among users, interaction with the advisors/teachers and with personal agents. The agents interplay in realizing their functionality, collaborating especially in domain knowledge base search.
Acknowledgments The work described in this paper has been carried out within projects 0036033 Semantic Web as Information Infrastructure Enabler, and 0177110 Computational and Didactical Aspects of Intelligent Authoring Tools in Education, both funded by the Ministry for Science and Technology of the Republic of Croatia.
279
ROSIû, STANKOV, GLAVINIû
References [1]
NRENAISSANCE Committee – Computer Science and Telecommunications Board – Commission on Physical Sciences, Mathematics, and Applications – National Research Council, Realizing the Information Future. The Internet and Beyond, National Academy Press, Washington, DC, 1994
[2]
M. Rosiü, V. Glaviniü, S. Stankov, DTEx-Sys – A Web Oriented Intelligent Tutoring System, Proceedings of the IEEE International Conference on Trends in Communications – EUROCON'2001, Vol. 2/2, Bratislava, Slovakia, 2001, pp. 255-258
[3]
P. Maes, Agents that Reduce Work and Information Overload, http://pattie.www.media.mit.edu/people/pattie/CACM-94/CACM-94.p1.html
[4]
B. P. Woolf, AI in Education, in I. Shapiro, C. Stuart, Eds., Artificial Intelligence Encyclopedias, John Wiley & Sons, Inc, 1992
[5]
H. Burns, C. Capps, Foundations of Intelligent Tutoring Systems: An Introduction, in M. C. Polson, J. J. Richardson, Eds., Foundations of Intelligent Tutoring Systems, Lawrence Erlbaum Associates Publishers, 1988, pp. 1-18
[6]
S. Case, N. Azarmi, M. Thint, T. Ohtani, Enhancing E-Communities with Agent-Based Systems, IEEE Computer, July 2001, pp. 64-69
[7]
Proposal for an Open Profiling Standard, http://developer.netscape.com/ops/proposal.html
[8]
S. Feldman, Intelligent Agents: A Primer, Searcher, Volume 7, No. 9, October 1999, http://www.infotoday.com/searcher/oct99/feldman+yu.htm
[9]
W. Brenner, R. Zarnekow, H. Wittig, Intelligent Software Agents. Foundations and Applications, Springer-Verlag, 1998
Document
Version
1994,
1.0,
[10] F. Farhoodi, P. Fingar, Competing for the Future with Intelligent Agents, Distributed Object Computing Magazine, The Endorsed Publication of the Object Management Group, Part 1: October 1997 [11] B. Shapira, P. Shoval, U. Hanani, Stereotypes in Information Filtering Systems, Information Processing and Management, 33 (3), 1997, pp. 273- 287 [12] D. Camacho, J. Molina, D. Borrajo, A Multiagent Approach for Electronic Travel Planning, Proceedings of the Second International Bi-Conference Workshop on AgentOriented Information Systems (AOIS-2000), AAA, Austin, TX, USA, 2000 [13] P. Brusilovsky, Adaptive Educational Systems on the World Wide Web: A Review of Available Technologies, Proceedings of the 4th International Conference on Web-based Intelligent Tutoring Systems, San Antonio, TX, USA, 1998, pp. 74-78 [14] R. Carbonell, AI in CAI: An Artificial-Intelligence Approach to Computer-Assisted Instruction, IEEE Transaction on Man-Machine Systems, Vol. MMS-11, No. 4, 1970, pp. 190-202 [15] M. Rosiü, Establishing of Distance Education Systems within the Information Infrastructure, MSc Thesis, Faculty of Electrical Engineering and Computing, University of Zagreb, Zagreb, Croatia, 2000 (in Croatian) [16] T. Berners-Lee, J. Hendler, O. Lassila, The Semantic Web, Scientific American, May 2001, www.scientificamerican.com/2001/0501issue/0501berners-lee.html [17] Lj. Stojanovic, S. Staab, R. Studer, eLearning based on the Sematic Web, Proceedings of WebNet2001 – World Conference on the WWW and Internet, Orlando, FL, USA, 2001
280
PERSONAL AGENTS IN DISTANCE LEARNING SYSTEMS
About the Authors Marko Rosiü is an assistant at the Faculty of Natural Sciences, Mathematics and Education, University of Split, Croatia, where he has been since 1996. He holds the MSc degree in Computer Science, from the University of Zagreb, and the Prof. degree in Mathematics and Informatics, from the University of Split. His main research interests are in the area of educational systems and Semantic Web. Slavomir Stankov is an Assistant Professor of Computer Engineering at the Faculty of Natural Sciences, Mathematics and Education, University of Split, Croatia, where he has been since 1991. He received the Dipl.-Ing., MSc and Doctorate degrees from the University of Split. His research interests include educational systems and knowledge based authoring shells. Vlado Glaviniü is a Professor of Computer Engineering at the Faculty of Electrical Engineering and Computing, University of Zagreb, Croatia, where he has been since 1974. He holds the Doctorate and MSc degrees in Computer Science and the Dipl.-Ing. degree in Electrical Engineering, all from the University of Zagreb. His main research interests are in the areas of computer networks, office systems and user interfaces. He is member of IEEE and ACM.
281
282
Forgetfulness in Multi-Agent Systems Mirko Malekoviü1, Mirko ýubrilo1 1
Faculty of Organization and Informatics, University of Zagreb, Varaždin, Croatia [email protected] [email protected]
Abstract ⎯ In this paper we describe forgetfulness in multi-agent systems. Some properties of forgetfulness operator F in multi-agent systems are characterized. These properties cover good enough our intuition of what forgetfulness is, or at least what it needs to be. We can even say that some of them go a little bit ahead of our intuition (usefulness of theory, of course). It is worth saying that our notion of forgetfulness, as also our notion of knowledge, is external forgetfulness, ascribed to the agents by someone reasoning about the system being modeled. It is well known that incorporating knowledge in multi-agent system can be useful when analyzing the system. Therefore, it is not surprising that forgetfulness (in some sense 'no knowledge', that is, forgetfulness and knowledge are complementary) in multi-agent systems can be useful, too.
1 Introduction The theory of reasoning about knowledge is described in [2], where a good introduction to the theory of multi-agent systems can be found, too. Incorporating knowledge and time in multi-agent systems is given in [3]. A notion of forgetfulness in multi-agent systems is introduced in [5]. In this paper, we consider forgetfulness operator for agent i, denoted Fi, in multiagent systems. We focus on some important properties of the operator Fi (useful forgetfulness, rationalization, distribution over implication, distribution over conjunction, and distribution over disjunction). We also consider a graphic method for modeling knowledge operators Ki and forgetfulness operators Fi. In addition, we explore the possibility of an application of knowledge and forgetfulness operators when analyzing and modeling the inteligent organization. The paper consists of five sections and an Appendix containing the proofs of all the propositions stated in Section 3. In Section 2, we introduce the basic notions of multi-agent systems; PLKF language is described. We give our main results in Section 3 and Section 4. The following propositions are stated in Section 3. Proposition (useful forgetfulness) If G does not hold, then agent i forgets G , under the condition that G holds at all the states in S[i, r](m - 1) and ki is reflexive; Proposition (rationalization) If agent i forgets G , then G does not hold, under the condition that the only point in S[i, r](m) is just r(m); 283
MALEKOVIû, ýUBRILO Proposition (distribution Fi over implication) The operator Fi distributes over implication; Proposition (distribution Fi over conjunction) The operator Fi distributes over conjunction; and Proposition (distribution Fi over disjunction) The operator Fi distributes over disjunction G1 ∨ G2 under the condition that G1 ∧ G2 holds at all the states in S[i, r](m - 1). In Section 4 we firstly introduce a graphic method, called GPLKF, for PLKF representation. After that we describe how some properties of an intelligent organization can be modeled in the framework of a multi-agent system. Namely, we show that the properties of the intelligent organization, [1] and [6], such as the relationships between the states of an organization's knowledge about what it knows or does not know can be described by using an appropriate combination of the knowledge operator and the forgetfulness operator. Conclusions are given in Section 5.
2 Basic Notions In this section, we introduce, following [3] and [5], some basic concepts and notations. Suppose we have a group consisting of n agents, named 1, 2,.., n . We assume these agents wish to reason about a world that can be described in terms of a nonempty set P of primitive propositions. A language is just a set of formulas, where the set of formulas PLK of interest to us is defined as follows. (1) The primitive propositions in P are formulas; G), (F ⇔ G), (2) If F and G are formulas, then so are ¬F, (F ∧ G), (F ∨ G), (F and Ki(F) for all i ∈ {1, 2, .., n}, where Ki is a modal operator. A Kripke structure M for an agent group {1, 2,.., n} over P is a (n + 2)-tuple M = (S, I, k1, k2,.., kn), where S is a set of possible worlds (states), I is an interpretation that associates with each world in S a truth assignment to the primitive propositions in P, and k1, k2,.., km are binary relation on S, called the possibility relations for agents 1, 2,.., n, respectively. Given p ∈ P, the expression I[w](p) = true means that p is true in a world w in a structure M. The fact that p is false, in a world v of a structure M, is indicated by the exspression I[v](p) = false . The expression (u, v) ∈ ki means that an agent i considers a world v possible, given his information in a world u. Since ki defines what worlds an agent i considers possible in any given world, ki will be called the possibility relation of the agent i. We now define what it means for a formula to be true at a given world in a structure. is as Let (M, w) F mean that F holds or is true at (M, w). Definition of follows: (a) (M, w) p iff I[w](p) = true, where p ∈ P; (b) (M, w) F ∧ G iff (M, w) F and (M, w) G; (c) (M, w) F ∨ G iff (M, w) F or (M, w) G; G iff (M, w) F implies (M, w) G; (d) (M, w) F (e) (M, w) F ⇔ G iff (M, w) F G and (M, w) G F; (f) (M, w) ¬F iff (M,w) F, that is, (M, w) F does not hold; (g) M F iff (M, w) F for all w ∈ S . 284
FORGETFULNESS IN MULTI-AGENT SYSTEMS Finally, we shall define a modal operator Ki, where Ki(F) is read: Agent i knows F. (h) (M, w) Ki(F) iff (M, t) F for all t ∈ S such that (w, t) ∈ ki . In (h) we have that agent i knows F in a world w of a structure M exactly if F holds at all worlds t that the agent i considers possible in w . 2.1 Multi-agent systems A multi-agent system is any collection of interacting agents. Our key assumption is that if we look at the system at any point in time, each of the agents is in some state. We refer to this as the agent’s local state. We assume that an agent’s local state encapsulates all the information to which the agent has access. As each agent has a local state, it is very naturally to think of the whole system as being in some (global) state. The global state includes the local states of the agents and the local state of an environment. Accordingly, we divide a system into two components: the environment and the agents, where we view the environment as everything else that is relevant. Also, the environment can be viewed as just another agent. Let Le be a set of possible local states for the environment and let Li be a set of possible local states for agent i , i = 1, .., n . We define G = Le × L1 × .. × Ln to be the set of global states. A global state describes the system at a given point in time. Since a system constantly changes (it is not a static entity), we are interested in how systems change over time. We take time to range over the natural numbers, that is, the time domain is the set of the natural numbers, N . A run over G is a function r : N → G. Thus, a run over G can be identified with a sequence of global states in G . The run r represents a complete description of how the system’s global state evolves over time. Thus, r(0) describes the initial global state of the system in a possible execution, r(1) describes the next global state, and so on. If r(m) = (se, s1,.., sn), then we define r[e](m) = se and r[i](m) = si , for i = 1,.., n . A pair (r, m), where r is a run and m is time, will be called a point. We shall say that a global state r(m) = (se, s1,.., sn) is the global state at the point (r, m). We shall also identified the point (r, m) with the global state r(m) . Note that r[i](m) = si is the local state of the agent i at the (global) state r(m) . A system R over G is a set of runs over G. The system R models the possible behaviors of the system being modeled. 2.2 Knowledge in multi-agent systems We assume that we have a set P of primitive propositions, which we can think of as describing basic facts about a system R. Let I be an interpretation for the propositions in P over G , which assigns truth values to the primitive propositions at the global states. Thus, for every p ∈ P and s ∈ G, I[s](p) ∈ {true, false}. An interpreted system IS is a pair (R, I). Now, we define knowledge in an interpreted system IS. Let IS = (R, I) be an interpreted system. A Kripke structure for IS, denoted M(IS) = (S, I, k1, .., kn), is defined in a straightforward way. S = {r(m) | r ∈ R, m ∈ N}, that is, S is the set of the global states at the points (r, m) in the system R. The possibility relations k1, k2,.., kn are defined as follows. Let r(m) = (se, s1,.., sn), r’(m’) = (se’, s1’,.., sn’) be two global states in S. We say that r(m) and r’(m’) are indistinguishable to an agent i iff si = si’. 285
MALEKOVIû, ýUBRILO Thus, the agent i has the same local state in both r(m) and r’(m’). We define ki = {(r(m), r’(m’)) ∈ S × S | r(m) and r’(m’) are indistinguishable to the agent i}, i = 1, 2,.., n. Accordingly, (r(m), r’(m’)) ∈ ki iff si = si’, i = 1, 2,.., n . There is no possibility relation ke for the environment because we are not usually interested in what the environment knows. Now, it is evident what it means for a formula F in PLK to be true at a state r(m) in an interpreted system IS. For instance, we have (IS, r(m)) p iff I[r(m)](p) = true, where p ∈ P. (IS, r(m)) Ki(F) iff (IS, r’(m’)) F for all r’(m’) ∈ S such that (r(m), r’(m’)) ∈ ki. We say that a formula F in PLK is valid in an interpreted system IS, denoted IS F , iff (IS, r(m)) F for all r(m) ∈ S. In order to be able to make statements about forgetfulness in multi-agent systems, we extend our language PLK by adding new modal operators, forgetfulness operators Fi , i = 1, .., n , where Fi (G) means that agent i forgets a fact G). This language will be denoted by PLKF, and will be used for reasoning about events that happen along a single run r in the system R.
3 Some Properties of Forgetfulness Operator Fi in Multi-Agent Systems The forgetfulness operator Fi is defined as follows. If G ∈ PLKF, then so is Fi(G), read agent i forgets G. Its semantic is defined by (IS, r(m)) Fi (G) iff (IS, r(m - 1)) Ki(G) and (IS, r(m)) ¬Ki(G), where m 1. Particularly, we define that (IS, r(0)) Fi (G). Thus, agent i forgets G at state r(m) , where m > 0, iff agent i knew G at state r(m - 1) and does not know G now (at state r(m)). Especially, agent i does not forget at r(0). Here for brevity, we say 'at state r(m) instead of 'at state r(m) in an interpreted system IS'. From now on we will make use of that shortness. Let S[i, r](m) be the set of the states in S that agent i considers possible in state r(m), that is, S[i, r](m) = {rj(mj) ∈ S | (r(m), rj(mj)) ∈ ki}. Our main results are now given in the following propositions. Proposition ( useful forgetfulness) If (for all rj(mj) S[i, r](m - 1))[(IS, rj(mj) ¬G Fi(G)) .
G] and ki is reflexive, then (IS, r(m)
Proposition (useful forgetfulness) says that at state r(m) we have: if G does not hold, then agent i forgets G , under the condition that G holds at all the states in S[i, r](m - 1) and ki is reflexive. Proposition (rationalization) If S[i, r](m ) = {r(m)}, then (IS, r(m))
Fi(G)
¬G .
This proposition states that at state r(m) if agent i forgets G , then G does not hold, under the condition that the only point in S[i, r](m) is just r(m). We can put it this way: if our agent forgot something, he would say that just that something does not hold (a kind of a bad argument). 286
FORGETFULNESS IN MULTI-AGENT SYSTEMS Proposition(distribution of Fi over implication) H), then (IS, r(m)) If (IS, r(m)) Fi(G) and (IS, r(m)) Fi(G
Fi(H) .
Here we have that the operator Fi distributes over implication . It seems to suggest that our agent is a very powerful ignorancer. Analogous result for the knowledge operator Ki is well known as the Distribution Axiom. Proposition (distribution of Fi over conjunction) If (IS, r(m)) Fi(G1 ∧ G2), then (IS, r(m)) Fi(G1) ∨ Fi(G2) . In this proposition we have at state r(m): if agent i forgets G1 ∧ G2 , then the agent i forgets G1 or the agent i forgets G1 . Proposition (distribution of Fi over disjunction) If (for all rj(mj) S[i, r](m - 1))[(IS, rj(mj) G1 ∧ G2 ] and G2) , then (IS, r(m)) Fi(G1) ∧ Fi(G2) .
(IS, r(m))
Fi(G1 ∨
This proposition states that at state r(m) we have that if agent i forgets G1 ∨ G2 , then the agent i forgets G1 and the agent i forgets G2 , under the condition that G1 ∧ G2 holds at all the states in S[i, r](m - 1).
4 GPLKF: A Graphic Method for Multi-Agent Systems Because the PLKF language (Propositional logic + Knowledge operators + Forgetfulness operators) has a very complex semantics, we describe in this section a graphic method, called GPLKF , to make easy the understanding of PLKF-formulas about agent properties. In [4] we have defined a graphic method, called GPLKT, for expressing PLKT-formulas about multi-agent systems, where PLKT language is Propositional logic + Knowledge operators + Temporal operators. The connection between GPLKF and GPLKT is given by the following equality GPLKF = GPLKT – Temporal operators + Forgetfulness operators, that is, the temporal operators are not included in our method. Of course we could have included them by defining an extention of GPLKT, denoted GPLKFT, where GPLKFT = GPLKT + Forgetfulness operators, but it is not necessary for the purpose of this paper. At the heart of GPLK is the list of some basic elements. These basic elements are formed easily into powerful compounds to represent more complex agent properties in multi-agent systems. Now we describe for every basic graphic element, GEi, the respective meaning of the element, Mi.
287
MALEKOVIû, ýUBRILO 4.1
Basic graphic elements and their meaning
(GE1)
F
(M1)
(GE2)
r(m)
(M2) State r(m)
(GE3)
ki
(M3) The possibility relation ki for agent i
(GE4)
r(0)
..
(GE4)
r(m)
(M4)
Formula F
Run r
(M4) r(m)
At state r(m) , agent i considers states r1(m1),.., rk(mk) are possible, that is, (r(m), r1(m1)) ∈ ki ,.., (r(m), rk(mk)) ∈ ki .
ki
r1(m1) . . rk(mk)
(GE5)
(M5) r(m)
F holds at state r(m) (of an interpreted system IS = (R, I)), that is, (IS, r(m)) F.
F
(GE5.1)
(M5.1) r(m)
¬F holds at state r(m), that is, (IS, r(m))
¬F
288
¬F
FORGETFULNESS IN MULTI-AGENT SYSTEMS (GE5.2)
(M5.2) r(m)
OR
F
r(m)
F ∨ G holds at state r(m), that is, (IS, r(m)) F ∨ G.
G
(GE5.3)
(M5.3) r(m)
AND
F
r(m)
F ∧ G holds at state r(m), that is, (IS, r(m)) F ∧ G.
G
(GE5.4)
(M5.4)
IF
r(m)
THEN
r(m)
F
G holds at state r(m), F that is, (IS, r(m)) F G.
G
(GE5.5)
(M5.5) r(m)
F
IFF
r(m)
F ⇔ G holds at state r(m), that is, (IS, r(m)) F ⇔ G .
G
4.2 Examples(GPLKF modeling) In this subsection, we show how to express in GPLKF more complex agent properties. All examples have the same structure: (A) PLKF-formula and its reading, (B) The definition (semantics) of the PLKF-formula, and (C) The GPLKFrepresentation of the PLKF-formula.
289
MALEKOVIû, ýUBRILO Example(agent knows) (A) (IS, r(m)) Ki(F) Agent i knows F at state r(m). (B) The definition of (A) (IS, r’(m’)) F for all r’(m’) ∈ S such that (r(m), r’(m’)) ∈ ki. (C)
r(0)
..
r(m)
ki
r1(m1)
..
F
rk(mk)
F
Figure 1: GPLKF representation of (IS, r(m)) Example(agent does not know) (A) (IS, r(m)) Ki(F), that is, (IS, r(m)) (B)
Ki(F)
¬Ki(F)
The definition of (A) (for some rj(mj) ∈ S)[(r(m), rj(mj)) ∈ ki and (IS, rj(mj))
(C)
¬F]
r(m)
ki
...
rj(mj)
...
¬F Figure 2: GPLKF representation of (IS, r(m))
290
Ki(F)
FORGETFULNESS IN MULTI-AGENT SYSTEMS Example(agent forgets) (A) (IS, r(m)) Fi(F) Agent i forgets F at state r(m). (B) The definition of (A) (IS, r(m)) Fi (G) iff (IS, r(m - 1)) Ki(G) and (IS, r(m)) m 1. Particularly, we define that (IS, r(0)) Fi (G).
(C)
r(0)
..
r(m -1)
r(m)
ki
r1(m1) ..
..
ki
rk(mk)
F
¬Ki(G), where
...
sj(tj)
....
¬F
F
Figure 3: GPLKF representation of (IS, r(m))
Fi(F)
Example(Ki, Kj, Fi combination) [Fi(H)]. (A) (IS, r(m)) [Kj(G)] At state r(m) we have that if agent j knows G, then agent i forgets H. (B) The definition of (A) If (IS, r(m)) Kj(G), then (IS, r(m))
(C) IF
r(0)
..
Fi(H).
r(m)
kj
r1(m1)
..
G
rk(mk)
G 291
MALEKOVIû, ýUBRILO THEN
r(0)
..
r(m -1)
r(m)
ki
r1(m1) ..
F
..
ki
rk(mk)
...
sj(tj)
....
¬F
F
Figure 4: GPLKF representation of (IS, r(m))
[Kj(G)]
[Fi(H)].
Example(organization's knowledge about what it knows) Suppose that an organization O is modeled as an multi-agent system MAS(O) = {1, 2, .., m}. Additionally, let M = (S, I, k1, k2,.., km) be a Kripke structure for the MAS(O). The integrated agent for the MAS(O), denoted ia(MAS(O)), is defined by kia(MAS(O)) = k1 k2 .. km. We say that an organization O knows (forgets) something if and only if ia(MAS(O)) knows (forgets) something, respectively. Formally, (IS, r(m)) KO(G) iff (IS, r(m)) Kia(MAS(O))(G). In addition, (IS, r(m)) FO(G) iff (IS, r(m)) Fia(MAS(O))(G). Regarding an organization's knowledge about what it knows, four situations may be distinguished depending on which of the following four statements are true for the organization: S1: O knows what O knows; S2: O knows what O does not know; S3: O does not know what O knows; S4: O does not know what O does not know. The transition from S1 to S3 means that O forgets what O knows, and the transition from S2 to S4 states that O forgets what O does not know. Therefore , the forgetfulness operator FO comes into play here. Graphically, the transitions can be depicted as follows.
292
FORGETFULNESS IN MULTI-AGENT SYSTEMS (S1S3) The transition from S1 to S3 : (IS, r(m))
r(0)
..
r(m -1)
r(m)
kO
r1(m1) ..
KO(G)
FO(KO(G)).
..
kO
rk(mk)
...
sj(tj)
....
¬KO(G)
KO(G)
Figure 5: GPLKF representation of S1S3 transition (IS, r(m)) (S2S4) The transition from S2 to S4 : (IS, r(m))
r(0)
..
r(m -1)
r1(m1) ..
¬KO(G)
rk(mk)
FO(¬KO(G)).
r(m)
kO
FO(KO(G))
..
kO
...
¬KO(G)
sj(tj)
....
KO(G)
Figure 6: GPLKF representation of S2S4 transition (IS, r(m))
293
FO(¬KO(G))
MALEKOVIû, ýUBRILO
5 Conclusions We have considered the forgetfulness operator Fi in multi-agent systems. Firstly, we have stated Proposition( useful forgetfulness), where we have characterized the condition under which agent i forgets something that does not hold. After that, we have given Proposition (rationalization), where we have defined the condition for agent's rationalization. Finally, in Proposition (distribution of Fi over implication), we have stated that the Distribution Axiom for the knowledge operator Ki holds for the forgetfulness operator Fi , too. In addition, we have characterized Proposition (distribution of Fi over conjunction) and Proposition (distribution of Fi over disjunction).The proofs of all the propositions are given in Appendix. We have described a graphic method, called GPLKF, for PLKF representation. GPLKF makes easy the understanding of PLKF-formulas (with a very complex semantics) about agent properties. Finally, we have shown how to apply the theory of multi-agent systems in modeling some properties ( knowledge state transitions) of the intelligent organization.
Appendix Proof (Proposition (useful forgetfulness)) Fi(G)) holds if U1: (for all rj(mj) S[i, We have to show that U: (IS, r(m) ¬G r](m - 1))[(IS, rj(mj) G] and ki is reflexive holds. Suppose U2: (IS, r(m) ¬G . We need to show U3: (IS, r(m) Fi(G)), that is, U4: (IS, r(m - 1) Ki(G)) and U5: (IS, r(m) ¬Ki(G)). It follows from U1 that U4 holds. Now, because of U1 and U2, we obtain U5. Therefore, we have that U3 holds, as we wanted to show. Proof (Proposition (rationalization)) Assume R: S[i, r](m ) = {r(m)}. We would like to show ¬G . R1: (IS, r(m)) Fi(G) Suppose R2: (IS, r(m)) Fi(G). We need to show R3: (IS, r(m)) ¬G . We obtain from R2 that R4: (IS, r(m)) ¬Ki(G). R4 implies R5: (for some rj(mj) ∈ S[i, r](m))[(IS, rj(mj)) ¬G . Now, from R and R5 it follows that R3 holds, as desired. Proof (Proposition (distribution of Fi over implication)) H) We would like to show Assume D: (IS, r(m)) Fi(G) and (IS, r(m)) Fi(G D1: (IS, r(m)) Fi(H) . In order to show D1, we need to show D2: (IS, r(m - 1)) Ki(H) and D3: (IS, r(m)) ¬Ki(H). It follows from D that D4: (IS, r(m - 1)) Ki(G) and D5: (IS, r(m)) ¬Ki(G) and D6: (IS, r(m - 1)) Ki(G H) and D7: (IS, r(m)) ¬Ki(G H). From D4 and D6, we obtain, by the Distribution Axiom for the knowledge operator Ki , that D2 holds. In addition, from D7 we can easily conclude that D3 holds, that is, D1 holds, as we wanted to show.
294
FORGETFULNESS IN MULTI-AGENT SYSTEMS Proof(Proposition (distribution of Fi over conjunction)) Fi(G1 ∧ G2). We would like to show C1: (IS, r(m)) Assume C: (IS, r(m)) Fi(G1) ∨ Fi(G2) . ¬Ki From C it follows that C2: (IS, r(m - 1)) Ki(G1 ∧ G2) and C3: (IS, r(m)) (G1 ∧ G2) hold. We obtain from C2 that C4: (IS, r(m - 1)) Ki(G1) ∧ Ki G2) ¬Ki (G1) ∨ ¬Ki( G2). hold. In addition, from C3 we obtain C5: (IS, r(m)) Finally, from C4 and C5 it follows that C1 holds, as desired. Proof(Proposition (distribution of Fi over disjunction)) Assume O: (for all rj(mj) S[i, r](m - 1))[(IS, rj(mj) G1 ∧ G2 ] and O1: IS, r(m)) Fi(G1 ∨ G2) . We would like to show O2: (IS, r(m)) Fi(G1) ∧ Fi(G2) . ¬Ki From O1 it follows O3: (IS, r(m - 1)) Ki(G1 ∨ G2) and O4: (IS, r(m)) (G1 ∨ G2). Because O4 implies O5: (IS, r(m)) ¬Ki (G1) ∧ ¬Ki G2) and O implies O6: (IS, r(m - 1)) Ki(G1) ∧ Ki(G2), we can conclude that O2 holds, as we wanted to show.
Acknowledgments The authors are grateful to the referees for their careful reading and useful comments.
References [1] C. W. Choo. Information Management for the Intelligent Organization. Information Today, Inc., Medford, New Jersey, 2002. [2] R. Fagin et al. Reasoning about Knowledge. The MIT Press, London, 1995. [3] M. Malekovic. Agent Properties in Multi-Agent Systems. Informatica, An International Journal of Computing and Informatics, Vol. 23, No. 2, pp. 283-288, 1999. [4] M. Malekovic. GPLKT: A Graphic Method for Multi-Agent Systems. Informatologia,
33, 2000, 3-4, 161-169. [5] M. Malekovic and M. Cubrilo. Some Properties of Agents in Multi-Agent Systems: Incorporating Forgetfulness. IEEE Int. Conf. on Intelligent Engineering Systems, INES2001, pp. 181 - 184, 2001. [6] T. K. Srikantaiah and M. E. D. Koening. Knowledge Management for the Information Profesional. Information Today, Inc., Medford, New Jersey, 2001.
About the Authors Mirko Malekovi is a Full Professor of Information Science at University of Zagreb, Faculty of Organization and Informatics, Varaždin, Croatia. He received his B. Sc. degree in Mathematics, M. Sc. and Ph. D. degrees in Information Science, all from University of Zagreb in Croatia. His research interests include data bases, knowledge bases, knowledge management, multi-agent systems, and semantic modeling. Mirko ubrilo is an Associate Professor at University of Zagreb, Faculty of Organization and Informatics, Varaždin, Croatia. He received his B. Sc. and M. Sc. degrees in Mathematics, Ph. D. degree in Computer Science, all from University of Zagreb in Croatia. His research interests include mathematical logic and its applications (logic programming, agent theory,...), as well as algorithm theory in a broader sense. He is an author of two books and several papers.
295
296
Chapter 5 Algorithms and Methods
Multi-Head Rules in Equivalent Transformation Takahiko Ishikawa1 Kiyoshi Akama2 , Hiroshi Mabuchi3 and Yuichi Yamamoto2 1 Division
2 Center
3 Faculty
of System and Information Engineering, Hokkaido University, Kita11, Nishi5, Kita-ku, Sapporo, Japan [email protected]
for Information and Multimedia Studies, Hokkaido University, Kita11, Nishi5, Kita-ku, Sapporo, Japan {akama, sierra}@cims.hokudai.ac.jp
of Software and Information Science, Iwate Prefectural University, 152-52, Sugo, Takizawa, Japan [email protected]
Abstract — To solve a problem, we often transform the problem into a simpler one using rules of the form [Head ⇒ Body]. Many rules have only one atom in the head. However, rules with more than one atom in the head are often useful. Such rules are called multi-head rules (MHRs). The purpose of this paper is to discuss the usefulness of MHRs in the computation model of equivalent transformation through some examples and comparison with other rules. MHRs increase expressive power and application cost at the same time. To reduce the application cost, we propose three methods for removing MHRs to achieve efficient processing.
1 Introduction When we try to solve simultaneous equations, we apply additions, subtractions and substitutions to make the simultaneous equations progressively simpler. Finally, the simultaneous equation becomes the simplest form, X = number, Y = number, which is the answer of the problem. In the programming by the computation model of equivalent transformation, we can solve a problem using correct rewriting rules which transform the problem into a simpler one [1]. These correct rewriting rules are called equivalent transformation rules (ETRs). By using this model, we can discuss correctness of programs, and provide various algorithms and flexible computation order. A program for problem-solving is a set of ETRs, and is made by accumulating ETRs [2]. This model guarantees independence of individual rules. We can say that this point is also an outstanding characteristic of this model.
299
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
The syntax of an ETR is of the form: H, {C1 , · · · , Cj } ⇒ {E11 , · · · , E1k }, B11 , · · · , B1m ; ··· ⇒ {En1 , · · · , Enk }, Bn1 , · · · , Bnm . (j ≥ 0, k ≥ 0, m ≥ 0, n ≥ 0.) The leftmost atom (H), which is the atom to be replaced, is called a head. The left atoms (C1 ... Cj ) enclosed with curly braces {} are a condition part of the rule. The atoms on the right of the arrow are called a body. The body consists of an execution part and replacement atoms. Multiple bodies are permitted in a rule. The right atoms (Ei1 ... Eik ) enclosed with curly braces {} are an execution part of the rule. The execution part consists of zero or more atoms. Atoms (Bi1 ... Bim ) without curly braces are replacement atoms. The replacement atoms consist of zero or more atoms. ETRs are used to rewrite atoms in a query clause. Basically, a rewriting rule with execution parts specifies, in its left-hand side, a pattern of an atom to which it can be applied, and defines the result of its application by specifying, in its right-hand side, deterministic procedures (an execution part), along with patterns of replacement atoms. The rule is applicable to a definite clause when the pattern in its left-hand side matches some atom in the body of the clause, (i.e., when some atom in the clause body is an instance of the specified pattern). When applied, the rule rewrites the clause into a number of clauses, resulting from replacing the matched body atom with corresponding instances of the patterns in the rule right-hand side and from the effect caused by the operations of the execution part. However, we sometimes need to transform two or more atoms at a stroke and to express some desirable processing. For this purpose, we introduced rules which can transform two or more atoms at the same time. These rules are called multi-head rules (MHRs). On the other hand, a rule that transforms only one atom is called a single-head rule (SHR). Computation systems with multi-head rules include production systems [3], constraint handling rules [4] [5], and so on. MHRs can expand the expressive power beyond what is possible by only SHRs. In this paper, we construct a new framework for program generation by the introduction of MHRs, and discuss the effect of MHRs in the computation model of equivalent transformation using some examples and comparing them to other rules.
2
Framework for Construction of Programs
Our framework for construction of programs is shown in Figure 1. The program construction process begins with production of an initial program consisting of SHRs, MHRs, and multi-body rules (MBRs) from a declarative problem description. If possible, some MHRs and MBRs may be eliminated during program transformation. In this framework, we can make and improve programs by the following process. 1. Atoms in the head and body of rules of an initial program are taken from clauses in the given declarative problem description.
300
MULTI-HEAD RULES IN EQUIVALENT TRANSFORMATION Program Construct
Problem
Easy
Single-head rules
Low
Solve
Multi-body rules
Introducing Multi-head rules Construct
Single-head rules Multi-head rules
Problem
Solve
Program Computation construction speed
Multi-body rules Changing a data structure, etc
Problem
Construct
Single-head rules
Solve
Difficult
High
Figure 1: Framework for construction of programs
2. SHRs and MBRs are written based on the clauses of the problem description. 3. The initial program is made by accumulating these rules, and is used to solve the problem. 4. We introduce MHRs, and construct an efficient program with MHRs. Branching of MBRs will be reduced. 5. We try to make more efficient program by changing the data structure into a new data structure. 6. We can construct a new program which consists of only SHRs, and the matching cost of MHRs will be reduced. MHRs expand the expressive power of SHRs. If we use MHRs, we can make it easier to write a program. However, MHRs are less efficient since they have to search for a set of atoms in clauses, which often takes a lot of time. When we want to obtain more efficient programs, we can change a data structure, then a rule set containing MHRs is replaced by a new rule set consisting of only SHRs. Of course, there are many ways for program construction in the equivalent transformation model.
3 Multi-Head Rules 3.1 Syntax and semantics of MHRs The syntax of MHRs is of the form: H1 , · · · , Hi , {C1 , · · · , Cj } ⇒ {E11 , · · · , E1k }, B11 , · · · , B1m ; ··· ⇒ {En1 , · · · , Enk }, Bn1 , · · · , Bnm . (i > 1, j ≥ 0, k ≥ 0, m ≥ 0, n ≥ 0.)
301
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
An application of rules does not depend on the order of head atoms H1 ,..., Hi and replacement atoms Bj1 ,..., Bjm . At any point in computation, if a query clause contains some atoms that can be matched by the head atoms of the rule and the condition part is satisfied, then an execution part is executed and these head atoms can be replaced with the replacement atoms in the body. If a rule contains more than one body, the computation path branches. By branching, a query clause which contained head atoms is replaced into individual new query clause. 3.2
Number-line puzzle
To explain how we can use MHRs, we take a number-line puzzle. A number-line puzzle consists of a board with several digits. The purpose of this puzzle is to find a loop that takes the same number of sides as a digit shows in each occurrence of digits. Figure 2 shows a problem and an answer of the puzzle.
Answer
Problem 0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
1
3
0 1 2 3 4 5 6 7 8 9 10
3 2
3
2
0 1
1
3 3
0 1 2 3 4 5 6 7 8 9 10
1
3
3 2
3
2
0 1
1
3 3
Figure 2: Number-line puzzle
Definitions of this puzzle can be written by three descriptions that explain: – Digits on a board are identical to the number of lines, i.e., there are N lines around a digit N. – Each line can not cross at any point on the board, i.e., the number of line segments linking to each intersection is 0 or 2. – The lines on the board form a single loop. The first requirement can be expressed using sum atom. sum ([P, Q], N, A, B, C, D) This atom is explained in (1) of Figure 3. The sum atom means that lines are drawn at A, B, C and D around the digit N on (P, Q). The digit N is the sum of lines at A, B, C, and D. Next, the second requirement is expressed by cross atom. cross([P, Q], A, B, C, D)
302
MULTI-HEAD RULES IN EQUIVALENT TRANSFORMATION
(1)
A
C
N
(2)
(P, Q) D
B
C
Illustration of sum atom
(P, Q)
A B
D
Illustration of cross atom
Figure 3: Illustration of atoms
This atom shows in (2) of Figure 3. The cross atom means that lines are drawn at A, B, C and D located on the intersection (P, Q), The following rules can be written by using these atoms. Figure 4 illustrates some examples of sum and cross rules. sum([P, Q], 0, A, B, C, D) ⇒ {A = 0, B = 0, C = 0, D = 0}. cross([P, Q], A, 0, 0, 0) ⇒ {A = 0}. (1) sum A C
0
(2) cross A
D
0
B
Figure 4: Illustration of SHRs The sum rule means that the sum of four lines around 0 on a board is 0. The cross rule means that when the other three lines linking to an intersection are 0 (no line is found), the line above the intersection is also 0. In the application of SHRs, searching and matching cost is low. Hence, SHRs are the most efficient rules. 3.3 Multi-head rules in the number line puzzle There is a problem that can not solve by SHRs. MHRs are very useful rules to overcome the difficulty. In this paper, we use single-body rules for MHRs. Some examples of MHRs are shown: sum([P, Q], 3, A, B, C, D), sum([X, Y ], 3, B, E, F, G), {or([A, E]), Y = Q + 2} ⇒ {A = 1, E = 1}, sum([P, Q], 3, A, B, C, D), sum([X, Y ], 3, B, E, F, G). sum([P, Q], 1, A, B, C, D),
303
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
cross([X, Y ], 0, C, 0, A), {or([A, C]), X = P − 1, Y = Q − 1} ⇒ {A = 0, C = 0}, sum([P, Q], 1, A, B, C, D), cross([X, Y ], 0, C, 0, A). Above rules have or atom in each condition part. Or rule is defined as follows. or([A|X]), {pvar(A)} ⇒ . or([A|X]), ⇒ or(X).
The pvar atom is a built-in atom on ETRs. It means that A is pure variable. First rule means that if head atoms sum([P, Q], 3, A, B, C, D) and sum([X, Y ], 3, B, E, F, G) match two atoms in a query clause and the conditions or([A, E]), Y = Q + 2 are satisfied, then A = 1 and E = 1 are executed, and these head atoms can be replaced with the replacement atoms sum([P, Q], 3, A, B, C, D) and sum([X, Y ], 3, B, E, F, G). Second rule means that if head atoms sum([P, Q], 1, A, B, C, D) and cross([X, Y ], 0, C, 0, A) match two atoms and the conditions or([A, C]), X = P − 1, and Y = Q − 1 are satisfied, then A = 0, C = 0 are executed, and these head atoms can be replaced with the replacement atoms sum([P, Q], 1, A, B, C, D) and cross([X, Y ], 0, C, 0, A). Figure 5 illustrates above rules. (1) sum & sum A C
3
D
3
G
C
3
D
3
G
A
B
B
F
(2) sum & cross A
E
F
C
1
D
B
E
1
D
B
Figure 5: Illustration of MHRs
By using MHRs, we can express rules without branching cost, and can obtain more efficient rules. 3.4
Multi-body rules
Since there are many ways of combining head atoms, it is difficult to find all possible useful rules from problem descriptions. Consequently, we write all bodies which are considered from a head atom. Rules which contain more than one body are called multibody rules (MBRs). All computation paths are written using them. We assume that all MBRs in this paper have only one head. This rule causes branching but it does not require searching the multiple query atoms. Using MBRs is an easy way to solve many problems. The following rule is an example of MBRs.
304
MULTI-HEAD RULES IN EQUIVALENT TRANSFORMATION
cross ([P, Q], A, B, 0, 0), {or([A, B])} ⇒ {A = 0, B = 0}, cross([P, Q], A, B, 0, 0); ⇒ {A = 1, B = 1}, cross([P, Q], A, B, 0, 0). Above rule means that if head atom cross([P, Q], A, B, 0, 0) matches one atom in a query clause and the condition or([A, B]) is satisfied, then, for the first body, A = 0, C = 0 are executed, and these head atoms can be replaced with the replacement atom cross([P, Q], A, B, 0, 0), and then, for the second body, A = 1, C = 1 are executed, and these head atoms can be replaced with the replacement atom cross([P, Q], A, B, 0, 0). This rule is well illustrated in Figure 6.
A B
Figure 6: Illustration of MBRs Generally, the application of MHRs will increase the time required to search for matching atoms.
4 Comparison between MHRs and Other Rules 4.1 The comparison with MHRs and SHRs We conducted experiments to solve several number-line puzzles using SHRs and MHRs. In the ET framework, we can control application of rules by giving priority. In this paper, we gave priority to SHRs (1st) and MHRs (2nd). If these rules can not solve the puzzles, then we use MBRs (3rd) to complete the solution. We used the Equivalent Transformation rule Interpreter (ETI) [6] in this experiment, and measured solution rates. The solution rate is defined by the total of remains of variables before using MBRs. If all variables are grounded, the solution rate is 100 percent. When we solved puzzles using MBRs, the solution rates of them have been found to be 100 percent. The size of each puzzle is 10 by 10 squares, and all puzzles have 220 occurrences of variables. Figure 7 shows the solution rate of each problem. When we solved the problems using MHRs, the solution rate was greater than that of using only SHRs on every problem. Since MHRs have higher expressive power, we can find various rules using MHRs, and the application of MBRs is reduced. Since MBRs have multiple bodies and compute many patterns, it is easy to write these rules but often not possible to solve a problem quickly using them. In these branching, there is only one answer, and other computation paths fail halfway. Therefore, it is important to solve a problem with as little branching as possible. If we can write many MHRs in a given problem, the application of MBRs will be reduced more.
305
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
Solutio n rate (%)
100 80 60
SHRs SHRs+MHRs
40 20
0
2
1
3 4 6 5 Problem No.
7
8
Figure 7: Comparison of solution rate
4.2
Measurement of execution time
We compared the execution time using SHRs, MHRs, and MBRs. Figure 8 shows the total execution time for completely solving the problems using only SHRs and MBRs (S-B), in comparison with using SHRs, MHRs, and MBRs (S-M-B). Execut ion time (msec)
250000 200000 150000
SHRs+MBRs (S-B)
100000
SHRs+MHRs +MBRs (S-M-B)
50000
0
1
2
3 4 6 5 Problem No.
7
8
Figure 8: Execution time
In this experiment, we confirmed that the execution of S-M-B is faster than that of S-B, except problem 7. In the case of problem 7, since the query atoms are searched to match the multiple head atoms, matching cost of MHRs is greater than that of MBRs. 4.3
Classification of problems
In these experimental results, we can classify the problems into two groups. The problems 1 through 6 and 8 were characterized by having only few unknown parts and they were mostly solved by the MHRs and did not take much total execution time. In this type of problems, since matching of MHRs is performed easily and branching cost is low, these problems are solved quickly. In the problem 7, the number of possible matching is small. In case of this problem, MHRs are considerably slower than MBRs. Furthermore, since many unknown portions
306
MULTI-HEAD RULES IN EQUIVALENT TRANSFORMATION
remain after the application of MBRs, branching cost is also increased. If matching cost increased using MHRs, it will turn into an inefficient rule conversely.
5 Three Methods for Reduction of Matching Cost Since MHRs have higher expressive power, it is possible to obtain a diversity of algorithm construction. Many problems were mostly solved by the MHRs and reduced the total execution time. However, we confirmed from an experiment that matching cost may increase depending on the kind of problem being solved. To reduce the matching cost, we have to consider programs using SHRs instead of MHRs. Of course, there is a problem which cannot be solved unless it introduces MHRs. In this section, we propose three methods for reduction of matching cost. – Using a new head which contains multiple head atoms in a MHR. – Introducing a new data structure. – Changing a data structure. 5.1 Introduction of a new head We can combine two or more head atoms of what was formerly a MHR into a single new head atom and replace the MHR with a SHR.(Figure 9) By introducing a new head, MHRs are removed.
SHRs
Head atom A
MHRs
New head atom C
Head atom B
Figure 9: Introduction of a new head There are two atoms A and B. A MHR could be written as A,B ⇒ X. In this section, we combine the head patterns of atom A and atom B into C, and write the rule as a SHR C ⇒ X. For example, in the number-line puzzle, the following MHR can be changed into a SHR by introducing a new atom which includes two sum atoms. sum([P, Q], 3, A, B, C, D), sum([X, Y ], 3, B, E, F, G), {or([A, B, E]), Y = Q + 2} ⇒ {A = 1, B = 1, E = 1}, sum([P, Q], 3, A, B, C, D), sum([X, Y ], 3, B, E, F, G). This MHR can be replaced into the following SHR, using a new predicate topbot. topbot([P, Q], [X, Y ], 3, A, B, C, D, E, F, G), {or([A, B, E]), Y = Q + 2} ⇒ {A = 1, B = 1, E = 1}, topbot([P, Q], [X, Y ], A, B, C, D, E, F, G).
307
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
5.2 Adding a new data structure This method is addition of a new data structure which preserve expressive power of MHRs. A part of expressions of MHRs are handled as SHRs in the new data structure. (Figure 10). MHRs SHRs
SHRs Adding a data structure (i-var)
SHRs
Figure 10: Adding a new data structure
This process is achieved by information bound variables (i-vars). The i-vars are a data structure which can express variables of the form (variable):(information). For example, when we find a variable X is 1 or 2 or 3, an i-var is expressed as X:(1, 2, 3). If an element 2 on X:(1, 2, 3) is removed, the i-var is replaced with X:(1, 3). By adding such data structure, MHRs can be replaced with SHRs with i-vars. Since i-vars can preserve the identity of variables, the corresponding atom can rewrite information simultaneously. Therefore, several SHRs become a substitute for MHRs. The following rule is an example. notEqual(A, N ), member(A, X), {number(N )} ⇒ {delete(N, X, X1)}, member(A, X1) The meaning of this rule is if A is not equal to N and A is an element of X, and satisfies that A is number, A becomes the element of X1 which is obtained by removing N from X. Since this rule can be written by introduction of i-vars, above rule is changed into SHRs. notEqual(A : X, N ), {number (N )} ⇒ delete(N, A : X). 5.3
Changing a data structure
This method is alteration of a data structure which has allowed MHRs. We change a data structure of terms into that of strings. A part of expressions of MHRs are handled as SHRs in the string data structure. (Figure 11). For example, we consider the problem to answer whether there is no palindrome that starts from ”a” and ends with ”b”. To solve this problem, the following program can be expressed on the data structure with terms. pal(X) ⇒ rev(X, X). rev([A|X], Y ) ⇒ rev(X, W ), app(W, [A], Y ). app([A|X], Y, Z) ⇒ {Z = [A|Z1]}, app(X, Y, Z1).
308
MULTI-HEAD RULES IN EQUIVALENT TRANSFORMATION Data structure of terms
Data structure of strings
MHRs SHRs
SHRs
Figure 11: Changing a data structure
app(X, [A], Z),app(Y, [B], Z) ⇒ {X = Y, A = B}, app(X, [A], Z). app(X, Y, [ ]) ⇒ {X = [ ], Y = [ ]}. app(X, Y, [C|Z]) ⇒ {X = [C|X1]}, app(X1, Y, Z); ⇒ {X = [ ], Y = [C|Z]}. The forth rule (underlined) in the above program is a MHR. By changing terms into strings, the first and the last elements are directly expressed. This palindrome program can be expressed using only SHRs. pal(X) ⇒ rev(X, X). rev(X, Y ) ⇒ {X = AV, Y = W A}, rev(V, W ); ⇒ {X = , Y = }. Since app(X, Y, Z) is equal to XY = Z, if we use a data structure with strings instead of terms, app(X, [A], Z) can be expressed by X[A] = Z and app(Y, [B], Z) can be expressed by Y[B] = Z. Since X[A] = Y[B] = Z, this formula can be rewritten by X = Y, [A] = [B], and Y[B] = Z. As a result, the append rules are expressed using only unification. Therefore, MHRs can be removed, and the matching cost of MHRs is also reduced. A detailed execution process is found in [7] and [8].
6 Conclusion In this paper, we explained a framework for construction of programs by introduction of MHRs, and discussed the effect of MHRs through some examples and comparison of other rules. MHRs provide many useful rules. We can write rules with higher expressive power, and construct various and efficient algorithms. Many problems were mostly solved by the MHRs and its computation speed was faster than that of MBRs. However, matching cost may increase depending on the kind of problem being solved. To reduce the matching cost of search for multiple head atoms, we introduced three methods. 1. Writing a new head atom which contains multiple head atoms in a MHR. To put it concretely, we wrote a new rule which combine two head atoms in a MHR of number-line puzzle into one. 2. Adding a new data structure using information bound variables (i-vars). Processing of MHRs is replaced by processing of SHRs.
309
ISHIKAWA, AKAMA, MABUCHI, YAMAMOTO
3. Changing a data structure from terms into strings. Since the first and the last elements are directly expressed, a palindrome program can be written using only SHRs.
References [1] K.Akama, Y.Shigeta and E.Miyamoto: ”Solving Problems by Equivalent Transformation of Logic Programs”, Journal of Japanese Society for Artificial Intelligence, Vol.12, No.2, pp.90-99, 1997. [2] K.Akama, H.Koike, and H.Mabuchi: “A Foundation of Program Synthesis based on Separated Descriptions”, IEEE International Conference on Intelligent Engineering Systems (INES 2001), pp143-148, 2001. [3] S.A.Vere : “Relational Production Systems”, Artificial intelligence 8 pp 47-68, 1977 [4] T.Fruhwirth : “Constraint Handling Rules”, Constraint Programming, LNCS 910, Springer, 1995. [5] S.Abdennadher :“Operational semantics and confluence of constraint propagation rules”, Third International Conference on Principles and Practice of Constraint Programming,LNCS 1330, pp252266, 1997. [6] H.Koike, K.Akama, and H.Mabuchi: “Equivalent Transformation Language Interpreter ETI”, IEEE International Conference on Intelligent Engineering Systems (INES 2001), pp149-154, 2001. [7] H.Koike, K.Akama, H.Mabuchi, K.Okada: “Correct Computation for Negation in Equivalent Transformation Paradigm”, World Multi conference on Systemics, Cybernetics and Informatics pp23-28, 2001. [8] H.Koike, K.Akama, H.Mabuchi, K.Okada, Y.Shigeta: “A Theoretical Foundation of Problem Solving by Equivalent Transformation of Negative Constraints”, Japanese Society for Artificial intelligence, 2002.
About the Authors Takahiko Ishikawa received a Master’s degree in technology education in 2001 from Hokkaido University of Education in Japan. His research focuses on problem-solving in equivalent transformation paradigm, technology education and information education. Kiyoshi Akama received a Master’s degree in control engineering and a Doctoral degree in computer science both from Tokyo Institute of Technology in Japan in the years 1975 and 1989, respectively. His research interests include artificial intelligence, computer science and programming languages. Hiroshi Mabuchi received the M.E. and D.E. degrees from Hokkaido University, Sapporo, Japan, in 1992 and 1995, respectively. His research interests include artificial intelligence, problemsolving and learning. Yuichi Yamamoto received his Doctor’s degree in Physical chemistry in 1991 from Hokkaido University in Japan. His research focuses on computer supported collaborative learning.
310
Genetic Scheduling Algorithm for High-Level Synthesis Péter Arató , Zoltán Ádám Mann , András Orbán Department of Control Engineering and Information Technology Budapest University of Technology and Economics Budapest, Hungary {arato,mann,inti}@iit.bme.hu
Abstract — High-level synthesis (HLS) aims at constructing the optimal hardware or software structure from a given high-level specification. This process involves a number of optimization steps, from which scheduling is the most crucial one, concerning both the running time of the process and the quality of the found solution. In this paper, we present a genetic algorithm for the scheduling problem in HLS. We describe in detail how this general heuristic could be applied to the particular engineering problem at hand. It is demonstrated with several measurements on industry benchmarks that the new algorithm performs better than previous methods.
1 Introduction The goal of High-Level Synthesis (HLS, [1, 2, 3]) is to automatically design the optimal hardware or software structure from the high-level (yet formal) specification of a system. A high-level specification may be for instance the description in a third-generation programming language such as C or some kind of pseudo-code. The optimality criteria may differ according to the particular application. In the case of hardware synthesis, the most important aspects are: the number of required processing units, chip size, heat dissipation, and energy consumption. Note that although HLS originally emerged from the field of hardware design, it raises similar problems as software design and synthesis. Therefore, similar methods may be used for hardware and software systems, and it becomes even possible to design hardware and software simultaneously (hardware-software co-design, system-level synthesis, [4]). The main data structure of HLS is the elementary operation graph (EOG), which is an attributed data-flow graph. Its nodes represent elementary operations (EOs). An EO might be e.g. a simple addition but it might also be a complex function block. The edges of the EOG represent data flow—and consequently precedences—between the operations. The system is assumed to work synchronously; each operation has a duration ( ), determined by its type, and a starting time ( ). Therefore, node works in the clock cycles from to . The correct operation of the system is defined by the following four axioms:
311
ARATÓ, MANN, ORBÁN
– Node cannot start its operation until all nodes , for which there is an (i.e. the predecessors of ), have ended their operation;
edge
– The inputs of node must be constant during the total time of its operation ( ); – Node may change its output during the total time of its operation ( ); – The output of node invocation.
remains constant from the end of its operation until its next
The process of HLS starts by building the EOG from the specification, then some transformations are made on the graph in order to meet timing and consistency requirements. Finally, the elementary operations are scheduled—i.e. their starting times are determined—and allocated in real processing units. The actual optimization is carried out in these last two steps. Both are computationally hard, but the big difference is that while there exist some quite effective approximation algorithms for allocation, this is not the case with scheduling. The output of the whole HLS process is the set of structural and control information that is needed to implement the resulting system. At the Department of Control Engineering and Information Technology at Budapest University of Technology and Economics, a software called PIPE [2] has been developed, which realizes the HLS procedure. The unique feature of PIPE which distinguishes it from other HLS tools is that it can also handle pipeline systems, which are of great importance because pipeline processing can boost the performance of systems that are otherwise difficult to parallelize. A pipeline system is characterized by two numbers: latency (denoted by ) is the time needed to process one data item, while restart time (denoted by ) is the . period of time before a new data item is introduced into the system. Generally Thus, non-pipeline systems can be regarded as a marginal case of pipeline systems, with . If a large amount of data has to be processed, then minimizing at the cost of a reasonable increase in or hardware price is an important objective of HLS. PIPE contains a so-called force-directed scheduler, which belongs to best known scheduling algorithms. Since scheduling is the most crucial phase of HLS, and the results of currently known scheduling algorithms are often not satisfying, new scheduling algorithms have to be invented. In this paper a new genetic scheduling algorithm is presented. We describe in detail how this general heuristic could be applied to the scheduling problem of HLS. The results of the empirical tests on industrial benchmarks show that this new scheduler almost always produces better results (and often even in shorter running time) than the state-of-the-art force-directed scheduler. The paper is organized as follows. Section 2 defines the scheduling problem and explains its most important characteristics. Section 3 presents the new algorithm. In Section 4 the empirical evaluation of the new algorithm is described. Section 5 concludes the paper.
2 The scheduling problem 2.1 Problem definition The input of scheduling consists of: the restart time ; the latency ; and an EOG, in which each node is associated with an operation type that also determines its duration, as
312
GENETIC SCHEDULING ALGORITHM FOR HLS
well as with an ASAP (As Soon As Possible) and ALAP (As Late As Possible) value for its starting time. (The [ASAP,ALAP] interval is often referred to as the mobility domain of the node.) The task of the scheduler is to find an optimal valid scheduling in the given EOG between ASAP and ALAP. The output is the vector of the determined starting times. In this definition, the terms ’optimal’ and ’valid’ need further clarification. Valid means in this context that the precedence rules defined by the EOG are not violated. It is guaranteed that the ASAP and ALAP schedules are valid, but this does not necessarily hold for all schedulings between them. Therefore, the precedences must be assured explicitly. Optimality should be measured in terms of hardware costs, i.e. the number of necessary processing units. However, it is known to be an -hard problem to calculate the number of processing units for a given schedule (this is exactly the task of allocation) [2]. Therefore, the chosen objective is the number of compatible pairs instead. A pair of nodes is called compatible if they may be allocated in the same processing units; otherwise they are called concurrent. If the number of compatible pairs is high, this usually results in a low number of necessary processing units. Calculation of the number of compatible pairs is not straight-forward, since—as a consequence of pipeline operation—also nodes that are far from each other in the EOG can become concurrent. However, the C ONCHECK algorithm [2] can determine the compatibility of two EOs in steps. This is why the number of compatible pairs was chosen as objective instead of the number of processing units. This completes the definition of the scheduling problem. This slightly modified problem is also -hard, which motivates the application of heuristic algorithms. 2.2 Known scheduling algorithms There are three major groups of scheduling algorithms: those built on integer linear programming (ILP), list schedulers and force-directed schedulers. In ILP-based schedulers, the scheduling problem is converted into a system of integer inequalities. The optimum of some linear function can then be found using standard linear programming techniques, e.g. the simplex method [5]. There are two major drawbacks to this approach. First, it is hard to give an estimate on the running time of the algorithm. Second, domain-specific knowledge cannot be built into the algorithm. List schedulers are usually simple and fast because they process only once the time domain or the set of operations, trying to guarantee the optimal number of operations for each time cycle. This means a series of local, greedy decisions. Usually, some heuristic is used to define the order in which operations are selected. The problem with this approach is that a bad choice cannot be undone later. Thus, the result given by list schedulers is usually not good enough. ALso, the performance of list schedulers depends significantly on the order of the nodes. The force-directed scheduler [6] tries to schedule approximately the same number of concurrent nodes for each time cycle, using a probabilistic approach. It is called forcedirected because it always makes modifications proportional to the deviation from the optimum, resembling the law of Hooke in mechanics. This seems to be the best known scheduling algorithm, but its running time is proportional to the third power of the size of the input graph, so it can be slow for big EOGs. The performance of force-directed schedulers also depends heavily on the order of the nodes.
313
ARATÓ, MANN, ORBÁN
PIPE contains a force-directed scheduler. Since the actual optimization is done at this level of the HLS process, it is the most critical component concerning both the running time of the process and the quality of the found solution. For big input graphs, the running time of PIPE is essentially the same as that of the scheduler. This motivates the search for better and better scheduling algorithms.
3 Genetic scheduler For the given -hard optimization problem, we needed a general, high-performance search heuristic. This lead us to genetic algorithms (GA). 3.1 GA in general Since there are very good surveys on genetic algorithms (see, for instance, [7, 8] and references therein), we will only give here a very brief, rather practical introduction only. In order to implement a genetic algorithm, one has to do the following. First, an initial population must be set up somehow. After that, in each iteration a new population is generated from the previous one using the genetic operations: recombination, mutation and selection. So in each step there are two populations. The new population is first partially filled using recombination (usually there is a predefined recombination rate), then the rest using selection. Mutation is then used on some individuals of the new population (their number is defined by the mutation rate). The order of the operations is important because this way individuals created by recombination and mutation surely get into the new population, even if they are not very fit, so they have the chance to propagate their possibly good properties. Mutation is important because it guarantees variety and thus helps leaving local optima. Its implementation is simple: a randomly chosen gene of a randomly chosen individual is altered randomly. Of course there can be variants: one can alter one gene at a time or maybe more genes at once, one can allow only slight modifications of a gene or any modification etc. The aim of recombination is to mix good properties of the individuals so that a sequence of genes corresponding to a good property can spread across the whole population. It is implemented by generating one or more (usually two) new individuals by the crossover of two individuals. Individuals are usually not chosen with uniform probability for recombination (as for mutation for instance), since it is more probable to get good genes from individuals having high fitness values. Selection is also necessary, it is used to propagate good individuals and to eliminate bad ones. It is implemented by simply copying the best individuals into the new population. In some variants it is not necessarily the best ones who survive, but they are selected with a higher probability. 3.2 Application for the scheduling problem In this section we present the way that the above general scheme could be used for the scheduling problem. That is, we describe what are individuals, the population, genetic operations and the fitness function.
314
GENETIC SCHEDULING ALGORITHM FOR HLS
3.2.1 Individual Actually, the scheduling problem is fortunate from the point of view of a genetic algorithm. The applicability of genetic algorithms requires that the solutions of the optimization problem can be represented by means of a vector with meaningful components: this is the condition for the recombination to work on the actual features of a solution. Fortunately, there is an obvious vector representation in the case of the scheduling problem: genes are the starting times of the elementary operations. The order of the genes is not indifferent either: for the efficiency of recombination it is vital that genes next to each other do represent correlative pieces of information. It can be assumed though that the elementary operation graph was specified in a logical order (e.g. top-down, from left to right), so that the order of the nodes is suitable for genetic representation. 3.2.2 Population Choosing the population is not as straight-forward as was the case with individuals. The question to answer is whether non-valid schedulings should be permitted. Since non-valid schedulings have no real physical meaning, it seems to be logical at first glance to work with valid schedulings only. Unfortunately, there are two major drawbacks to this approach. First, this may constrain efficiency severely. Namely, it may be possible to get from a valid individual to a much better valid individual by genetic operations through a couple of non-valid individuals, whereas it may not be possible (or perhaps only in hundreds of steps) to get to it through valid ones only. In such a case, if non-valid individuals are not permitted, one would hardly arrive to the good solution. The other problem is that it is hard to guarantee that genetic operations do not generate non-valid individuals even from valid ones. This holds for both mutation and recombination. Thus, if non-valid individuals are not permitted, the recombination operation cannot be used in the form of cross-over. Rather, it should be defined as averaging. But this method does not help to maintain variety in the population so it can cause degeneration. In the case of mutation it seems that the only way to guarantee validity is to immediately get rid of occasional invalid mutants. However, this would contradict the principle of giving every individual the possibility to propagate its characteristics. For these reasons we decided to permit any individual in the population, not only valid ones. Of course the scheduler must produce a valid scheduling at the end. In order to guarantee this, there must be valid individuals in the initial population (see Section 3.3.1) and the fitness function must be chosen in such a way that on one hand valid individuals do not become extinct, on the other hand it punishes invalidity (see Sections 3.2.4 and 3.3.3). 3.2.3 Genetic operations Mutation, recombination and selection are used. Mutation is done in the new population; each individual is chosen with the same probability. Recombination is realized as crossover: from two individuals of the old population two new individuals are generated as illustrated in Figure 1. The roulette method is used for choosing the individuals to recombinate. Selection is realized as filling some part of the new population with the best
315
ARATÓ, MANN, ORBÁN
Figure 1: Recombination of two individuals individuals of the old population. This is done by first sorting the individuals according to their fitness with QSort and then simply taking the first ones. 3.2.4 Fitness function The fitness has two components: the first one is the actual objective function, namely the number of compatible pairs. If only valid individuals were allowed, the fitness would be equal to the objective function. But non-valid individuals are also allowed; however, they should have lower fitness values. This is why a second component of the fitness is needed. Since these individuals should be motivated to be less and less invalid, the second component of the fitness is a measure of the invalidity, namely the number of collisions, i. e. the number of precedence rules (edges of the EOG) that are corrupted. So the fitness is monotonously increasing in the number of compatible pairs and monotonously decreasing in the number of collisions. (For more details, see Section 3.3.3.) 3.2.5 The output of the scheduler Optimization can be made more efficient by means of a large population, but the scheduler must give only one solution at the end. However, there may be dozens of valid individuals with a high objective value in the last population. So we choose the best valid individuals and run the allocation process for all of them. Then the best one is chosen (in terms of used processors and not compatible pairs anymore) as output. 3.3 Implementation In this section we take a closer look at our genetic implementation and describe some interesting details. 3.3.1 Initial population In order to be sure that we get a valid scheduling at the end, some valid individuals must be placed into the initial population. (The fitness function will make sure that they will not be replaced by invalid ones.) It seems to be a good idea to have several valid individuals in the initial population so that computational power is not wasted on individuals with many collisions. Now the question is how to generate those valid individuals? Well, two valid schedulings are known in advance: ASAP and ALAP. It can be proven that any weighted average of two valid schedulings is also valid. This way, additional valid individuals can be generated. In our program, the ratio of valid individuals in the initial population can be specified in the sched.ini file. Suppose that valid individuals are needed. Then individual
316
GENETIC SCHEDULING ALGORITHM FOR HLS
(
) has the form:
Of course this method will not always generate different individuals. It has the advantage though that it is very simple and the generated individuals are homogeneously varied between the two extremes ASAP and ALAP. So it is likely that subsequent mutations and recombinations will generate very different valid individuals from these. 3.3.2 Roulette method The aim of the roulette method is to choose an individual with a probability distribution proportional to the fitness values. It is realized as follows. Assume that the fitness is always positive and the individuals are ordered somehow, numbered from 0 to . Denote the sum of the fitness values of the individuals by . This means that , is the sum of the fitness values of all the individuals and is monotonously increasing. Choose an arbitrary number . Suppose that lies in the interval . Then the chosen individual is the one numbered . interval is equal to the fitness of the individual numSince the length of the ber , individuals are indeed chosen with probabilities proportional to their fitness. The method is called roulette because the intervals may be visualized on a roulette wheel, the roulette ball finishing in them with probabilities proportional to their sizes. Building the values requires time, but this has to be done only once in an iteration. The last step, namely finding the interval containing , can be accelerated significantly as compared to the obvious linear search. Since the values are monotonously steps. Since individuals increasing, binary search can be used, requiring only time. are chosen, the whole process requires 3.3.3 Tuning the fitness function The actual fitness function has great impact on the performance and efficiency of the system. As mentioned earlier (Section 3.2.4), the fitness function has two components: the number of compatible pairs (call it ) and the number of collisions (call it ). After trying several functions, the following two proved suitable:
In both cases, if the number of collisions is greater than a predefined value, the fitness is 0. Otherwise, the fitness is positive, which is necessary for the roulette method. ( is set accordingly.) The first function is based on the idea that the fitness function creates ’stairs’ for the individuals, on which they can ’climb up’ to better and better characteristics. There are small stairs and big stairs: decreasing the number of collisions corresponds to a big stair because it increases the fitness by 1. Increasing the number of compatible pairs corresponds to a small stair: it increases the fitness by . This means that decreasing
317
ARATÓ, MANN, ORBÁN
the number of collisions by 1 is worth more than any increase in the number of compatible pairs. This guarantees that the valid individuals do not die out and their number even increases. The second solution is not so strict. In this case it is not claimed categorically that decreasing the number of collisions by one is worth more than any increase in the number of compatible pairs. Rather, a slight increase in the number of collisions is permitted if there is a sufficient increase in the number of compatible pairs. Now it must be defined what the ’sufficient increase’ means. We found that this should depend on the value of . Namely, if is small compared to , then there are lots of incompatible pairs and decreasing their number tends to increase the number of collisions. In order to avoid this, an increase in the number of collisions is only acceptable if there is a significant increase in the number of compatible pairs. On the other hand, if is not much less than , then it is not necessary to be that strict. Also, the increase in the number of compatible pairs that is needed to compensate an increase of 1 in the number of collisions should depend on the current number of collisions. For example, the increase of the number of collisions from 0 to 1 is much more costly than an increase from, say, 7 to 8.
3.3.4 Parameter handling As can be seen from the above, our program has lots of parameters. This may be regarded as an advantage since it provides great flexibility. On the other hand, it makes evaluation and testing really hard. More on this in Section 4. The most important parameters are the following: population size, number of iterations, recombination rate, mutation rate and the ratio of valid individuals in the initial population. There are also some non-genetic parameters, such as the name of the input file, and . There could be other parameters as well, e.g. bounds on where to cut the individuals in the case of recombination or the maximum change allowed in a mutation etc. But as described in the chapter about testing, evaluation was awkward enough without them. Actually, the tests provided values for these parameters that seem to work well in most cases. So these are default values now but they can be overridden by means of commandline options or in the sched.ini file.
4 Empirical results At the beginning of the research our goal was to achieve better results than the existing force-directed scheduler of PIPE. Since PIPE consists of separable modules communicating only through text files, it is possible to replace the force-directed scheduler with ours without changing the code of other modules. The algorithms have been tested on three benchmarks: – Fast Fourier Transformation (FFT), 25 nodes – IDEA cryptographic algorithm, 116 nodes – RC6 cryptographic algorithm, 328 nodes
318
GENETIC SCHEDULING ALGORITHM FOR HLS
4.1 Aims of testing The genetic algorithm can be configured with seven initial parameters. These settings have great influence on the efficiency and speed of the algorithm. The user cannot be expected to know the internal parameters of the genetic scheduler, so we had to find the best combination of these parameters during testing and fix these values. Some parameters (like the size of the population, the number of steps) affect the solution in a more or less predictable way, while for others (recombination rate, mutation rate) we only have assumptions. By increasing the size of the initial population we expect to find better scheduling, but of course the algorithm becomes slower. Allowing more steps provides significantly better results at first, but after reaching a certain point it has practically no more effect. By increasing the number of valid individuals in the initial population the algorithm does not have to ’waste power’ to find valid solutions, but on the other hand, the initial population becomes less diversified, which can have negative influence on the quality of the result. To determine the appropriate recombination and mutation rate we can only use the trial and error way or rely on former experiences that can be found in the literature. Another important task of testing is to decide which of the two objective functions produces better results. 4.2 Procedure of testing Assuming that we only try 3 values for each parameter on the 3 benchmark problems with the two versions of the objective function, results in about 15000 executions. We used 4-8 computers simultaneously and thus we managed to complete the tests in two weeks. Most computers were working with Pentium II processors on Debian GNU/Linux platform. We implemented a TCL script to coordinate the test cases. The script has the following functions: 1. Runs PIPE with the given benchmark until the scheduling phase. This step provides the input for scheduling. 2. Runs the force-directed scheduler. 3. Runs the allocation on the output of the force-directed scheduler. 4. Runs both versions of the genetic scheduler with all the possible parameter-configurations. 5. Runs the allocation on each best individual of all the configurations of both versions. allocation runs for every benchmark! This means about 6. Writes the duration and the required number of processors of every scheduling to a file in an appropriate format for later analysis. 4.3 Comparison of the results The summary of the results concerning the number of required processors in the best configuration for each test case can be seen in Table 1. It can be seen that the new algorithms have reached the previous results in every case, moreover, in most tests they could improve them. This improvement is often remarkable, , test case the genetic algorithm could reduce for example in the FFT
319
ARATÓ, MANN, ORBÁN
Problem FFT R=20 L=20 FFT R=20 L=30 IDEA R=100 L=268 IDEA R=100 L=278 IDEA R=200 L=268 IDEA R=268 L=268 IDEA R=278 L=278 IDEA R=50 L=268 IDEA R=50 L=278 RC6 R=10 L=201 RC6 R=10 L=211 RC6 R=100 L=201 RC6 R=201 L=201
ForceDirected 9 11 17 16 13 6 8 25 29 210 23 25 13
Gen. v1 9 6 15 15 10 6 7 25 23 207 15 23 11
Gen. v2 9 15 16 11 6 7 25 23 207 15 23 11
Table 1: The required number of processors the number of allocated processors to almost 50%. Apparently the genetic algorithm can cope with bigger tests as well, since it could lessen the required number of processors from 23 to 15 in the RC6 , case. Another interesting observation is that test we could reduce the by increasing the latency from 201 to 211 in the RC6 number of processors to 10 percent of its previous value. Figure 2 illustrates the influence of changing the parameters in the test case RC6 , (the configurations are in the form: size_of_population mutation_rate recombination_rate number_of_steps valid_rate). Obviously, the two versions show quite different behavior, so selecting the appropriate objective function has the biggest effect on the quality of the result. Generally the first version had better results, but there were exceptions too. Concerning only the number of steps, it can be derived from the diagram that after 100 steps we generally get the same results as after 300 or 500 steps. Another interesting observation is that increasing the size of the population from 150 to 300 leads sometimes to even worse results, however, the best result has been reached with a population of 300 individuals. It can be seen that changing the mutation and recombination rate affects rather irregularly the number of used processors. It is of course only a tiny fraction of all the parameter combinations, but it clearly illustrates the difficulty of configuring the genetic algorithm. It is almost impossible to give the absolute best configuration, but some useful observations resulted from the tests. In the majority of test cases it was enough to allow 100 iterations. The size of the population should not be higher than 300. Producing 10 percent initial valid individuals also resulted in better figures. The best recombination rate was 1 around , the mutation rate was in the range of . 1
In our implementation this means that 60-70 percent of the new population will be generated by recombination.
320
GENETIC SCHEDULING ALGORITHM FOR HLS
Figure 2: The number of required processors of the two versions of the genetic scheduler in different configurations
It is important to note that in most practical cases the number of required processors is critical, not the running time. It is acceptable if the algorithm can finish in a couple of hours. Our algorithm is far below this limit. Since the algorithms were implemented in different programming languages and tested on different machines, the running times can hardly be compared, but it can be stated that the genetic algorithm was surprisingly fast, in most cases faster than the force-directed scheduler. Moreover, we experienced that by stopping the genetic algorithm earlier, we can find a fairly good solution very fast, an order of magnitude faster than the forcedirected scheduler.
5 Conclusion In our research we focused on the most critical problem of HLS: scheduling. We presented in this paper a new genetic scheduling algorithm. The identification of individuals with schedulings was quite straight-forward; however, it was by far not obvious whether or not non-valid schedulings should also be allowed. We chose to allow non-valid schedulings as well, therefore, we had to make sure that the initial population contains valid schedulings and we had to choose the fitness function so that it encourages schedulings to be valid.
321
ARATÓ, MANN, ORBÁN
The empirical results on industry benchmarks show that this algorithm could effectively minimize the number of required processors and so it is able to reduce the cost of the planned system compared to the best previously known scheduler. Currently, we are working on transferring these results of HLS to hardware-software co-synthesis.
Acknowledgments The work of the authors was supported by the grant OTKA T 030178 as well as a grant by Timber Hill LLC.
References [1] D. Gajski. High-Level Synthesis. Kluwer Academic Publishers, 1992. [2] Péter Arató, Tamás Visegrády, and István Jankovits. High-Level Synthesis of Pipelined Datapaths. John Wiley & Sons, Chichester, United Kingdom, first edition, 2001. [3] R. Camposano. From behaviour to structure: high-level synthesis. IEEE Design and Test of Computers, 10:8–19, 1990. [4] Ahmed A. Jerraya, M. Romdhani, C. Valderrama, Ph. Le Marrec, F. Hessel, G. Marchioro, and J. Daveau. Models and languages for system-level specification and design. In NATO ASI on System-Level Synthesis, Proceedings, 1998. [5] A. Schrijver. Theory of linear and integer programming. Wiley, 1998. [6] P. G. Paulin and J. P. Knight. Force-directed scheduling for the behavioural synthesis of ASICs. IEEE Transations on Computer Aided Design, 1989. [7] L. Davis. Handbook of genetic algorithms. Van Nostran Reinhold, 1991. [8] W. Kinnebrock. Optimierung mit genetischen und selektiven Algorithmen. Oldenburg, 1994.
About the Authors Péter Arató is professor and Head of the Department of Control Engineering and Information Technology at Budapest University of Technology and Economics. He is a corresponding member of the Hungarian Academy of Sciences. His research interests include high-level synthesis and hardware-software codesign. Zoltán Ádám Mann is a PhD student in computer science at Budapest University of Technology and Economics, Department of Control Engineering and Information Technology. His research focuses on algorithmic aspects of system-level synthesis. András Orbán is a PhD student in computer science at Budapest University of Technology and Economics, Department of Control Engineering and Information Technology. His research focuses on algorithmic aspects of system-level synthesis.
322
Parameterization Through Null Space— A New Redundancy Resolution Method for Differential Kinematic Problems in Comparison to Other Methods Zsolt Kem´eny Department of Control Engineering and Information Technology, Budapest University of Technology and Economics, H-1117 Budapest, Magyar Tud´osok K¨or´utja 2, Hungary [email protected]
Abstract — This paper deals with the solution of the inverse kinematic problem for kinematically redundant robots. After an introduction to the problem, the most widespread methods currently used are briefly described. In further parts of the paper, a new method is proposed which finds the solution in the resolved motion framework with a constrained optimization, using a parameterized form of the kinematic equation’s null space. The derivation of the new algorithm is then augmented with further extension possibilities (e. g. singularity handling), while a comparison shows the relation between gradient projection and optimization methods through a special case. Finally, application examples are presented for a mobile manipulator with an 8 degree-of-freedom arm.
1 Introduction A focus on cluttered environments—where the conventional 6 degrees of freedom (DOF) may prove insufficient for collision-free operation—has increased the research efforts concerning robots with redundant DOF while the increase in computing performance available allows more and more demanding motion planning and control algorithms to be implemented in real time. Kinematic redundancy (i. e. when the workspace dimensionality is exceeded by the robot’s number of kinematic DOF) implies that an entire solution space belongs to a given position and orientation of the end point. Does this occur, a redundancy resolution method should pick the “most suitable” element from the solution space, e. g. which optimizes a given criterion and/or complies with one or more constraints. Kinematic redundancy can be represented in all three possible modeling approaches of robots, and solution methods exist for all three models. The Lagrange-multiplier-based method presented by Sezgin [1] is a pure “position algorithm;” the desired position is taken for an optimization constraint (a nonlinear equality) while a secondary criterion is
323
´ KEMENY
optimized. Dahm et al. [2] propose a solution method for a specific 7-DOF manipulator, where a given end point position is prescribed again. This approach does not directly resolve redundancy but transfers it into one separate DOF, to be parameterized later by other means. In the differential kinematic case, most authors rely on gradient projection, as introduced by Liegeois [3]. Other known possibilities for resolved motion algorithms are workspace augmentation, as proposed by Sciavicco et al. [4], and the optimization-based “FSP” (full space parameterization) by Pin et al. [5, 6]. This paper focuses on the differential kinematic level, therefore, these approaches will be described in detail in further parts of this paper. Nowadays, the dynamic model is still rarely included in redundancy resolution methods; at least for “local” approaches which solve only for one given step in ˇ a possible motion sequence. As an example, force-control methods of Zlajpah [7] should be mentioned. As opposed to local methods, a variety of planning procedures exists for redundant robots as well. Schlemmer et al. [8] depart from a local perspective and employ redundancy resolution in a planning framework for the entire motion sequence. Here, corner points of an interpolated motion are determined by semi-infinite optimization using the dynamic model. Another significant approach are the “elastic band” and related methods developed by Khatib et al. [9], also applied for the “Stanford assistant,” a mobile manipulator with an omnidirectional mobile base.
2 Differential kinematics—previous work Differential kinematics is often regarded as a local linearization of the nonlinear kinematic model [10], expressing the relation between the end point velocity and the joint velocities: (1) is the Jacobian where is the end point velocity, is the vector of joint velocities and matrix for the current configuration . Given an -dimensional workspace and a robot with kinematic DOF, is an column vector, is an column vector and is an matrix. In the non-redundant case, and for redundant DOF, . The inverse kinematic problem is the determination of a solution which ensures the desired end point motion . For non-redundant systems, a simple inversion of is sufficient to obtain a unique solution to (1), while for the redundant case, (1) represents an underdetermined set of equations and—assuming a maximal rank Jacobian matrix—results in an -dimensional solution space. Does this occur, one can either add further dimensions to the workspace, as shown by Sciavicco et al. [4], or a most preferred element can be selected from the solution space. Usually, the Moore-Penrose pseudoinverse is considered the most basic approach [10], which locally minimizes the transients in a uniform way by selecting the joint space motion with the smallest Euclidean norm : (2) is the Moore-Penrose pseudoinverse of . The minimal-norm does, however, where rarely suit the needs a manipulator with redundant DOF is applied for (e. g. collision avoidance) and other criteria should be introduced.
324
PARAMETERIZATION THROUGH NULL SPACE
Currently, the most widespread method of redundancy resolution for the inverse kinematic problem is gradient projection, as introduced by Liegeois [3]: (3) is the particular part of the solution, ensuring Using the naming conventions of [1], the desired end point motion with a minimal . A homogeneous term is added vector into the null space of with an which is obtained by projecting an projection matrix ; therefore, does not change the end point velocity determined by . The projection matrix can be obtained e. g. using the pseudoinverse already available: (4) of an objective function For , a preferred joint velocity vector or the gradient can be used; hence the name “gradient projection.” In the latter case, a scaling factor minimizes during the motion sequence while maximizes it. The function is often referred to as the secondary criterion, the primary goal being the correct execution of the desired end point velocity with minimal transients. Gradient projection may be a relatively fast and simple method, yet it exposes several drawbacks, one of them being its lack of strict enforcement of motion preferences. This problem was addressed by Pin et al. [5, 6] who proposed a new method, FSP (full space parameterization). As opposed to the previous approach, FSP uses constrained optimization to obtain a solution. The method consists of two main parts; first, the generation of base vectors spanning the solution space, then the optimization within this space. For the first part, Pin et al. suggest the selection of linearly independent solutions of (1), from which the final can be composed as a linear combination:
(5) where is a weight vector which thus gives as a weighted sum of all solution vectors. . Partly to save computing A variety of methods can be used to obtain the necessary time, Pin et al. computed each by selecting a non-redundant subsystem and solving the corresponding fully determined inverse problem:
(6) “filling up” with 0’s
In this scheme, components of the configuration space are picked to compose a square from whose inverse is then used to calculate a “reduced joint velocity vector” (or renamed to to consider it a “candidate base vector”). This is then filled up with
325
´ KEMENY
“ ” elements for the components of the original configuration space whose corresponding columns were removed from . The insertion of zero elements does not change the ; thus, the vector obtained by filling up workspace velocity resulting from is a valid solution of the original underdetermined problem. According to Pin et al. [5], it can be shown that the necessary set of linearly independent solutions always full-rank Jacobian matrix and a suitable combinatoric search algorithm exists for an can select a full set of . After obtaining a solution space according to (5), a unique is determined by optimizaand fulfilling optional constraints tion, minimizing a criterion of the general form of the general form . A quadratic criterion (7) and constraints of the linear equality type (8) is a full rank matrix and is an are preferred by Pin et al., where vector. The latter can be mapped onto the joint velocity preference formulated in (3) . Enforcing a constraint of the linear equality type would mean that a by component of or a linear combination of several components is set to a given value, thus, the optimization space is decreased by one dimension for each constraint. Using the Lagrange multiplier rule, it can be shown that the optimization problem defined by (7–8) can be solved with a closed formula; it is thus a good candidate for real-time application and a suitable alternative to gradient projection. Joint space preferences such as virtual forces can be applied in a sense similar to (3), although optimization allows further weighting of the preferred motion’s components. The vital advantage, however, is the application of constraints which was not possible with gradient projection. These have a significant practical meaning for such cases as emergencies in collision avoidance and encountering joint limits.
3 Parameterization through null space With all these advantages, however, FSP may still bring some difficulties. Since the base vectors are obtained by selecting non-redundant subsystems, problems may arise when, selecting a nearly singular subsystem, badly scaled solution vectors appear even for a system far from global singularities, and the optimization eventually fails. A suitable rescaling prior to optimization can be a “symptomatic treatment” for this case. Another drawback is the fact that in (6), a nonzero end point velocity is assumed. For , would be all zero vectors, making an optimization impossible. A remedy could be the assumption of a fictitious workspace velocity together with the constraint instead of the usual in (5), i. e. solving in the null space instead of the solution space. This workaround would then only require a zero/nonzero threshold for . In practical applications, however, care should be taken when the algorithm is switched over to the other mode of operation, since acceleration discontinuities could occur with improper scaling.
326
PARAMETERIZATION THROUGH NULL SPACE
The last mentionable shortcoming is the “black box”-like nature of the method; primarily a consequence of the base vector selection algorithm. This makes it inconvenient to add some extensions for practical use, such as manipulability diagnostics or singularity handling. Partly to overcome these difficulties, a new method, PNS (parameterization through null space) was developed. PNS is based on an optimization technique analogous to FSP, yet it uses a different optimization space. The modular concept, as shown in Fig. 1, calculates a minimum norm particular term as and then adds a homogeneous part which is obtained by the actual optimization.
Figure 1: Schematic structure of the PNS-method The “interface” of the algorithm is identical to that of FSP, i. e. the inputs are the Jacobian matrix and the desired end point velocity , the usual quadratic criterion and optional linear equality type constraints . However, the optimization space differs from that of FSP and apparently returns to the concept of gradient projection, as PNS also separates the null space from a minimal norm particular term, even if criteria and constraints are still formulated for the entire solution. The first part of PNS is, as was the case with FSP, the generation of the optimization space in form of base vectors. For this purpose, a singular value decomposition is performed on . SVD delivers the base vectors of the null space of in an orthonormal form, thus providing a numerically convenient optimization space. By inverting the singular values not belonging to the null space, the minimal norm particular term can be calculated, and as a by-product, the examination of allows additional manipulability diagnostics and singularity handling. The first steps of PNS are thus as follows1: (9) (10) (11) contains the where the columns of and are orthonormal and singular values in its main diagonal. The complete solution is then calculated as the sum of a particular term and a linear combination of the null space base vectors: (12) The optimization uses the same criteria and constraints as does FSP, yet the optimization in PNS is only performed in the null space; this separation of homogeneous and particular 1
Note that the null space matrix of (10) contains the null space base vectors found in used in gradient projection (3)! not identical to the null space projection matrix
327
and is thus
´ KEMENY
parts showing some resemblance to gradient projection. However, as opposed to (3), PNS also takes the particular part into consideration when the homogeneous term is computed, the criteria (and the optional constraints as well) being defined for the entire solution. Thus, the criterion introduced with FSP could be expressed for PNS as follows: (13) The symbolic form of the constraints remains the same as in (7), since they only include the weight vector : (14) where, in case of constraints, is of size and is . The coefficients in differ from that in FSP, since in PNS, the already given particular term is taken into account as well. As was the case with FSP, one constraint reduces the optimization space by one dimension ( constraints would completely exhaust the dimensional reserve). As in FSP, the optimum of a quadratic criterion with linear equality type constraints allows a closed formula for PNS as well. For a proof, let us take the Lagrangian function (15) and the gradient (16) For easier handling, let us introduce following definitions: (17)
With these, the optimality conditions would be a)
(18) (19)
b)
(20) (21)
Now, a substitution from (19) gives (22) (23) and with the definition (24) we obtain (25) From these results, the final algorithm can be compiled. Further examination shows that the optimization formula can be split into two parts, i. e. a solution with no further constraints applied, and a correction term whose addition then enforces the constraints while
328
PARAMETERIZATION THROUGH NULL SPACE
still optimizing (13) to the best possible degree. The relevance of this split-constraint approach (applicable to FSP as well in a similar way) will be illustrated in further parts of this paper. Since our final goal is the calculation of , computing the weight vector plays the key role. Therefore, the algorithm below is aimed at finding for the two aforementioned cases. First, the weight vector for the unconstrained solution is obtained: (26) (27) (28) and for constraints, the correction term
has to be added which is given as (29) (30) (31) (32)
The final solution is then comprised of the two terms as (33) Thus, PNS delivers the optimum of a quadratic criterion with optional constraints and matches the abilities of the FSP method in this concern. However, PNS allows easier enhancement, e. g. with respect to the particular term . As it could be seen in (26–28), is calculated and allows us the optimization itself is largely independent of the way when needed. The latter may occur, for example, to depart from the original if the mainpulator is moving through a singularity and instead of a true pseudoinverse, a substitute is used, giving a “safe approximation” of the desired workspace motion. The open arrangement of PNS also allows the examination of numeric properties; the singular values provided by the SVD of are best fit for manipulability diagnostics. Another possibility is further development towards the dynamic model, where the dynamically consistent pseudoinverse [11] may be utilized instead of the usual Moore-Penrose pseudoinverse and criteria may be weighted according to inertia parameters.
4 Comparison of optimization and gradient projection The optimization of a quadratic criterion—be it FSP or PNS—is certain to have advantages over gradient projection; it is enough to consider the possibility of constraints. However, the orthogonality of any null space vector and a minimum norm solution suggests that gradient projection is also optimal in its own context. Indeed, the original gradient projection, though not directly defined as an optimum, corresponds to a special case of unconstrained optimization; namely to the case of being an identity matrix. For PNS, this statement can be easily proved. If (34)
329
´ KEMENY
then the criterion is simplified to (35) and as a consequence, the calculation steps (26–28) for the case
become (36) (37) (38)
Substituting (38) into (12) would result in (39) and recalling that here, the columns of are orthonormal base vectors for the null space performs a projection into the null space of just as its of , it is easy to see that equivalent in gradient projection (3) does. Thus, if no constraints are applied in and (to comply with the naming PNS and the criterion is set up with conventions of (3)), the result is identical to that of gradient projection. The same applies to FSP, too, although the proof is more demanding. First, let us choose a “convenient” set of solution vectors, assuming that the optimum is independent of the actual choice of base vectors if the space spanned out remains the same. A possible set complying with (5) could be derived from the minimum norm solution (40) and a full set of orthonormal null space base vectors value decomposition of :
as delivered e. g. by the singular
(41)
From this, we may compose the solution vectors
as
(42) .. .
These can be substituted into the FSP optimization algorithm given in [12] where, similarly to the PNS formulae, the special choice of the criterion allows simplification. Choosing the solution vectors as in (42) facilitates the symbolic handling of the problem, as the solution-specific matrix to be inverted in the FSP algorithm becomes a sum of dyads for
330
PARAMETERIZATION THROUGH NULL SPACE
which the Sherman-Morrison inversion formula [13] can be applied. The detailed documentation of the proof would reach beyond the scope of this paper, yet the criterion (35) and the solution vectors (42) would suffice for the reproduction of the proof with the FSP algorithm in [12], therefore only the final result will be shown: (43) which, because
is given as
, is only a different representation of (44)
where substituting back for would return (39), as originally assumed. Thus, it can now be seen that gradient projection is a special case of the optimization of a quadratic criterion as given by (7), where is set to an identity matrix, representing evenly weighted preferences for all components. Taking an arbitrary diagonal matrix for in FSP or PNS would correspond to varying weights for the component-wise motion preferences, while a generalization to linear combinations of the joint space components can be realized by arbitrary full-rank matrices.
5 A case study for practical application Finally, the use of the optimization-based methods, especially PNS, should be illustrated by an application example. In the framework of the MORPHA project sponsored by the Federal Ministry of Education and Research of Germany, an experimental mobile manipulator was built at Siemens Corporate Technology in Munich, Germany for experiments in service robotics [14]. The mobile manipulator consists of an 8-DOF RTR6 arm and a mobile platform with unicycle kinematics. As a member of the research team, the author of this paper implemented both FSP and PNS for the low-level motion planning of the robot in 2000–2001 [15, 16]. The methods were applied for “stationary” manipulation (no platform movement) and for the coordinated motion of arm and mobile base as well. The primary goal of the criterion layout in the underlying kinematic algorithm was to keep the arm near a preferable configuration during motion which intends to avoid singularities during “arm only” manipulation, and as a part of a “natural” arm and base coordination strategy, provides sufficient motion reserve for the manipulator during the simultaneous use of arm and mobile platform. 5.1 Application of criteria Steering the robot towards a preferable configuration is a typical example for the use of optimization criteria, since here, the configuration deemed advantageous is only a preference and not a “hard” requirement. Therefore, the difference of actual and preferred configuration was taken as a control difference. Considering the robot an array of (coupled) integrators, a suitable set of controllers can produce velocity preferences for an output which then becomes the parameter in the criterion. In the setup implemented, position preferences can be set for the eight arm joints and the mobile base orientation. The P-controllers, saturated with a sigmoid function each, can be adjusted through the sigmoid’s width and height parameters; zero height means
331
´ KEMENY
that for the given component, the velocity preference is set to zero. To ensure smooth robot motion ( should be continuous), the output of the controllers is scaled down by a window function in the beginning of a motion sequence, and similarly, the end of a motion series is not defined by zero end point motion alone. 5.2 Use of constraints Optimization constraints in FSP or PNS can be used to meet “hard” requirements, i. e. configuration space velocities that should be guaranteed during motion. The handling of joint limits could be a natural candidate for constraints, yet some aspects deserve to be examined in detail. “Exceptions” for the robot motion are usually associated with a danger zone drawn around the actual hindrance of the motion. In such a layout, an exception handling mechanism is triggered if the robot enters this zone, which either keeps it on the border of the undesired configuration set or applies a gradual deceleration so that the robot’s velocity in the critical direction becomes zero before reaching the obstacle or joint limit. However— and this applies especially to redundant DOF—the robot may depart from the safety zone during later phases of the motion sequence. Therefore, it is not enough to detect the robot entering the zone; it should also be noticed if the robot intends to leave it, since then, the corresponding motion constraint has to be switched off again. Especially for the latter purpose, it would be good to know what the robot would do without the constraint; this raises the question if there is an efficient way to separate the unconstrained solution from a correction term which enforces the constraint. As shown before, PNS can be separated into an unconstrained part (26–28) and a correction term (29–32) without a rise in computing costs and although not shown by Pin et al. [6, 5, 12], a similar scheme can be applied to FSP as well. Thus, we can now first compute an unconstrained solution, i. e. what the robot would do, then check the motion and the robot’s configuration for “exceptions” and if there are any necessary, the suitable constraints can be assembled and enforced with a correction term. This approach, however, is still not flawless in all respects, since we can not directly detect whether the application of a given set of constraints necessitates further ones. While this bears the risk of failure, it must be noted that in the specific application implemented for the tests, this case did not occur. In the case of the mobile manipulator, a gradual deceleration is realized before encountering a joint limit. First, the unconstrained joint velocities and joint values of each component are checked for the following condition: (45) denotes the beginning of the safety zone around the lower limit of joint ; where similarly, applies for the upper safety zone of the same joint. If (45) occurs, the unconstrained velocity of the given joint is scaled down—with a quadratic function to ensure a continuous —and a constraint is set to ensure this scaled-down velocity for . The joint limit surveillance can thus be implemented with a “rule base.” On the mobile manipulator, both FSP and PNS were implemented, primarily for applications where the TCP motion is set as a Cartesian velocity command. The numeric
332
PARAMETERIZATION THROUGH NULL SPACE
methods were also embedded in an algorithm for the coordinated motion of arm and mobile base [16]. To demonstrate the latter application, the benchmark task of sensor-guided door opening is shown in Fig. 2, during which the arm and base coodination relied on the end effector’s tactile sensors instead of the self-localization of the mobile base.
Figure 2: A benchmark task: sensor-guided door opening
6 Conclusion In this paper, possibilities of redundancy resolution were shown for the inverse kinematic problem of manipulators with redundant DOF. The main contribution of this paper is the development of PNS (parameterization through null space), a new redundancy resolution method, and its comparison to other already existing approaches (gradient projection, FSP). The redundancy resolution problem gives an underdetermined set of linear equations, therefore the methods presented use linear algebra techniques to select a preferable element from the solution space. As an alternative to the widespread gradient projection, the optimization technique FSP (full space parameterization) of Pin et al. was shown. To overcome some difficulties of FSP, a closely related new method, PNS (parameterization through null space) was introduced in further parts of the paper. It was shown that PNS may offer a numerically more robust optimization space and its modular structure allows further enhancement as singularity surveillance and handling. To facilitate the applicability check of motion constraints, a split-up algorithm computes an unconstrained optimum and a separate correction term without raising the computational costs. It was also proved that gradient projection corresponds to a special case of unconstrained optimization. Finally, application examples were shown on an experimental mobile manipulator.
Acknowledgments Support for the research was provided by the Hungarian National Research Programs under grant No. OTKA T 029072 and OTKA T 042634. Furthermore, I would like to express my thanks to Dr. Gisbert Lawitzky and Siemens Corporate Technology IC6 in Munich, Germany, for the opportunity of a practical application and the help provided during my work on the mobile manipulator.
References [1] U. Sezgin. Utilisation of Manipulator Redundancies for Collision Avoidance Strategies. PhD thesis, King’s College, London, 1995. [2] P. Dahm and F. Joublin. Closed Form Solution for the Inverse Kinematics of a Redundant Robot Arm. Technical Report IR-INI 97-08, Ruhr-Univ. Bochum, Inst. f. Neuroinformatik, 1997.
333
´ KEMENY
[3] A. Liegeois. Automatic Supervisory Control of Configurations and Behavior of Multibody Mechanisms. IEEE Transactions on Systems, Man and Cybernetics, SMC-7(12):868–871, December 1977. [4] L. Sciavicco and B. Siciliano. A Solution Algorithm to the Inverse Kinematic Problem for Redundant Manipulators. IEEE Journal of Robotics and Automation, 4(4):403–410, 1988. [5] K. A. Morgansen and F. G. Pin. Enhanced Code for the Full Space Parameterization Approach to Solving Underspecified Systems of Algebraic Equations, Version 1.0. Technical Report ORNL/TM12816, Oak Ridge National Laboratory, 1995. [6] G. A Fries, C. J. Hacker, and F. G. Pin. FSP (Full Space Parameterization), Version 2.0. Technical Report ORNL/TM-13021, Oak Ridge National Laboratory, 1995. ˇ [7] L. Zlajpah. Experiments with Force Control of Redundant Robots in Unstructured Environment Using Minimal Null Space Formulation. In Proceedings of the 2000 International Conference on Intelligent Engineering Systems INES’2000, pages 117–120, September 2000. [8] M. Schlemmer and G. Gruebel. Real-Time Collision-Free Trajectory Generation of Robot Manipulators via Semi-Infinite Optimization. The International Journal of Robotics Research, 17(9):1013– 1021, September 1998. [9] O. Khatib, S. Quinlan, and D. Williams. Robot Planning and Control. Robotics and Autonomous Systems, 21(3):249–261, September 1997. [10] C. Canudas De Wit, B. Siciliano, and G. Bastin, editors. Theory of Robot Control. Springer-Verlag London Ltd., 1996. ˇ [11] L. Zlajpah and B. Nemec. Control Algorithms for On-Line Obstacle Avoidance for Redundant Robots. In Proceedings of the 10th International Workshop on Robotics in the Alpe-Adria-Danube Region RAAD2001, number RD-042, May 2001. [12] F. G. Pin and F. A. Tulloch. Resolving Kinematic Redundancy with Constraints Using the FSP (Full Space Parameterization) Approach. In Proceedings of the 1996 IEEE International Conference on Robotics and Automation ICRA’96, pages 468–473, April 1996. [13] J. Sherman and W. J. Morrison. Adjustment of an Inverse Matrix Corresponding to Changes in a Given Column or a Given Row of the Original Matrix. The Annals of Mathematical Statistics, 21:124, 1949. [14] G. v. Wichert, T. W¨osch, S. Gutmann, and G. Lawitzky. Mobman – Ein mobiler Manipulator f¨ur Alltagsumgebungen. In Autonome Mobile Systeme 2000, pages 55–62, November 2000. [15] Zs. Kem´eny. Aufbau und kinematische Bewegungsplanung von mobilen Manipulatoren. In Autonome Mobile Systeme 2000, Springer-Verlag, pages 72–79, November 2000. [16] Zs. Kem´eny. Construction, Manipulability and Motion Planning of Mobile Manipulators. In Proc. of the 10th International Workshop on Robotics in the Alpe-Adria-Danube Region RAAD 2001, Vienna, Austria, number RD-049, May 2001.
About the Author Zsolt Kem´eny received his M. Sc. degree degree in Computer Science in 1998 at the Budapest University of Technology and Economics. He began postgraduate studies for the Ph. D. degree at the Budapest University of Technology and Economics, Dept. of Control Engineering and Information Technology, under supervision of Prof. Dr. B´ela Lantos. In 1999–2001, he took part in research activities at Siemens Corporate Technology in Munich, Germany, as a part of the MORPHA project for an anthropomorphic robotic assistant. His Ph. D. degree is expected in 2004, a Ph. D. thesis titled “Kinematic Modeling and Low-Level Motion Planning for Redundant and Mobile Robots” is in preparation. His research interests include mobile manipulators, arm and base coordination and redundant robots.
334
Distributed Sensor Fusion Networks Wilfried Elmenreich and Philipp Peti Institut f¨ur Technische Informatik, Technische Universit¨at Wien, Vienna, Austria wil,pp @vmars.tuwien.ac.at
Abstract — This paper introduces a framework for processing sensor measurements with respect to their dependability. Each measurement is represented as an observation, i. e., a compound of a name, a measurement instant, the measured value, and a confidence marker indicating the dependability of value and instant. Sensor observations are processed by a network of fusion nodes in order to produce data with higher confidence. The confidence of each measurement is attached to the transmitted data by the confidence marker. The sensor fusion algorithms use a probabilistic model for sensor readings where the expected variance of a measurement corresponds directly to its confidence. The presented approach supports a modular system development, because the fusion algorithms are implemented only with respect to the interface specification and thus are independent of the actual control application. Second, it is possible to extend existing sensor applications with fusion tasks. Given that the necessary timing constraints can be satisfied, the modified application will show the same temporal behavior as the original application.
1 Introduction Reactive computer systems interacting with their environment via sensors and actuators require a certain degree of reliability regarding the sensor information. However, since there is no such thing as a perfect sensor [1], such systems need to employ means of improving the data quality. To achieve this goal, different, and often redundant, information sources are fused to form a dependable perception of the environment. Several reasons apply for a distributed design. First, the sensors of the application likely will be placed spatially apart from each other, so that a centralized approach will suffer from noise picked up by transmission of analog signals over long wires. Second, for a dependable systems it is unacceptable that a failure of a single component implies the failure of the whole system. Therefore, a fault-tolerant design with redundant components is desirable. A further issue arising for reactive systems are real-time requirements. Real-time implies that the time instant, when a value was measured is of similar importance as the measurement value itself [2]. A measurement from a fast-changing property, for example, is of limited use, if the exact instant of the measurement is unknown.
335
ELMENREICH, PETI
It is the objective of this paper to present an approach for building distributed real-time sensor fusion networks. All data is generically modeled as a compound of a name, a measurement instant, the measured value, and a confidence marker indicating the quality of the data.These data is processed by fusion operators in order to produce a reduced set of data with higher quality. The presented framework supports the implementation of distributed small, controllable subsystems that interact with each other via a timetriggered communication system. The remainder of the paper is organized as follows: The following Section 2 describes existing approaches found in the literature. Section 3 describes the architectural framework supporting operations with selective dependability. Section 4 examines some algorithms for the proposed operations. Section 5 sketches the integration of the proposed functions into the time-triggered fieldbus network TTP/A. The paper is concluded in Section 6.
2 Related Work A scheme for confidence markers in digital systems is presented by Parhami in [3]. The proposed approach attaches so-called dependability tags to each data object and updates these tags according to operations performed on these data objects. Another idea that contributed to the work in this paper is given by sensor validation for fieldbus nodes. So-called self-validating sensors are able to provide a standardized digital signal and generate diagnostic information. In the Oxford SEVA system [4], each measurement is delivered as a validated value together with the validated uncertainty and a measurement value status. Finally, if there are multiple measurements of a property in a technical process, the question arises, how to further process these measurements until the data supports the required level of dependability. We assume that the taken measurements will have some degree of redundancy. Thus, it is possible to apply voting or competitive fusion algorithms [5] to refine the data.
3 Generic Sensor Fusion Framework This section presents a generic framework for building sensor fusion networks. First we identify the relevant properties of a sensor observation and introduce so-called fusion operators, which act as a black box that consumes and produces observations. Subsequently, we will discuss the implementation of fusion operators with a weighted averaging and a selection algorithm. 3.1 Sensor Properties A sensor can be seen as a small window providing a view of a property of a technical process. When modelling this view, often only the measured value is considered. We require a more comprehensive view of a sensor measurement that takes the following properties into account: Value: Value denotes the result of a measurement. Generally, such a value can be discrete or continuous. We assume that all values are given in a digital representation.
336
DISTRIBUTED SENSOR FUSION NETWORKS
Feedback for Gate Confidence Values
Gate
Gate
Sensor Fusion
Input Observations
Output Observation
Gate
Gate
Figure 1: Structure of fusion operator Description: Which property of the process has been measured? Which units are used? Which sensor has provided the measurement? In many systems the description of a sensor is not stored explicitly but defined implicitly in the way the system processes the sensor value. Usually, a description is static. Description properties can be multifaceted and therefore are difficult to model. There exist approaches using selfdescribing XML (Extensible Markup Language) data to provide efficient modelling and tool support for transducer networks [6]. Instant: The time when the value was observed. In a distributed system it is required that different nodes share a common notion of time in order to agree on the semantics of a given instant. Confidence: The confidence is a dynamic property that annotates the quality of a value and instant. Quality, in this context, can denote uncertainty, precision, or jitter. Confidence values can be created in self-validating sensors or be derived by comparing multiple measurements of the same property. The confidence is influenced by static properties such as the accuracy of a sensor given in it data sheet as well as by dynamic properties, e. g., switching of metering ranges, sensor deprivation in a multi-sensor system, aging effects, etc. 3.2 Fusion of Observations Based on the concept of an observation defined by Kopetz in [2], we extended the notion of observation by a confidence part in order to get a compound of entity name, instant , value , confidence The entity name is a key to the description, the instant defines the point in time when the respective measurement was made, represents the measured value, and is a confidence value that expresses the estimated dependability of instant and value. Since each
337
ELMENREICH, PETI
Control Application
F
F
F
Fusion Operator F
F
F
Sensors
Figure 2: Structure of sensor fusion layer
observation has assigned a measurement instant, an observation is valid regardless of the time when it is processed. When a new measurement is performed, the confidence value is introduced by the smart sensor. A self-validating sensor derives this confidence value as a result of a self-diagnosis function. If a sensor does not support self-validation, the confidence value is set to a standard value according to the a priori estimated average reliability of the sensor. A fusion operator (depicted in figure 1) processes at least one observation as input and produces an observation as output. Several fusion operators can be clustered in an abstract network. Such fusion networks can be hosted on one or several physical fieldbus nodes. Besides the confidence value in the input observations, each input is assigned a gate confidence value. While the assignment of the observation confidence value is in the sphere of control of the data producer, the gate confidence value is in the sphere of control of the fusion operator for the purpose of feedback provision. Both, the gate confidence values and the observation confidence values, are combined in a gate to form a new confidence measurement for each observation. The resulting observations are then combined by sensor fusion algorithms. These algorithms can either produce an enhanced observation of the properties observed by the individual sensors or produce a derived property, e. g., an acceleration value from speed measurements or the slippage by comparing rotation speed measurements of different wheels of a car (Anti-lock braking). Generally, the output observation of a fusion operator can differ in value, instant, and confidence from the input observations. The output observation is always assigned to a virtual sensor, which has an entity name that is different from the entities of the input observation. Fusion operators can be cascaded in a network as depicted in figure 2.
338
DISTRIBUTED SENSOR FUSION NETWORKS
Confidence Marker
max conf
min conf
Variance of Measurement
Figure 3: Conversion function for confidence/variance values (based on a logarithmic scale) Since we assume an underlying digital network communication system, it is possible to copy the information of one observation and use the same sensor observation several times in different fusion operators. The control application uses at least one observation as input. It depends on the implementation of the control application if it uses the assigned confidence value when making control decisions. 3.3 Meaning of Confidence Values The confidence measure will be introduced as an integer value between and , is the highest confidence. where is defined to be the lowest confidence and of The confidence marker is interpreted as an estimator of the statistical variance the measurement error.1 The variance is the second moment of an arbitrary probability density function. Using a linear transformation between confidence values and variance is not expedient, since the variances that indicate exact measurements are of greater interest than measurements with large variance. Therefore, we use a logarithmic scale to define the confidence and as depicted in Figure 3. Due to the expected comvalues between putational load when doing logarithmic and exponential operations on embedded systems, we suggest the implementation of look-up tables for the conversion from confidence value to variance.
4 Fusion Algorithms This section presents a set of fusion algorithms that can be used in a fusion operator. Since the presented architecture is open to custom implementations of fusion operators, it is easily possible to integrate other fusion methods (e. g., Kalman filter [8]) into the 1
The Guide to the Expression of Uncertainty in Measurement [7] suggested statistical variance as a measure for uncertainty.
339
ELMENREICH, PETI
framework. 4.1 Confidence-Weighted Averaging Averaging is one of the simplest forms of fusion. It comes with the advantages of noise reduction and simple implementation. We assume the incoming observations to be taken from a continuous entity. All observations under consideration must be made at approximately the same instant. The error functions of the incoming sensors are considered to be independent. The measurement values are fused by using a weighted average with the reciprocal variance values as weights:
(1) is the number of input observations, represents the measurement values and is the estimated variance for that measurement. The variance values are derived from the confidence marker using the conversion function depicted in Figure 3. The confidence value for the fused value is calculated according to equation 1 yielding the statistical variance of the output observation:
where
(2) The resulting variance is then converted to a confidence marker. The variance of the output values is always lower or equal than the variance of the best input observation. If the error independence condition is not true, the fused value is still correct, but its assigned confidence is overestimated. The error independence condition is difficult to fulfill when identical sensors or sensors of the same type of construction are fused. Thus, usually the best performance is achieved, when all input observations have the same confidence value, but stem from heterogeneous sensors. A possible extension to confidence-weighted averaging is the application of a faulttolerant averaging algorithm. This algorithm removes the largest and the smallest data values and then performs the weighted average as described above. Thus, at least faulty observations. measurements can be tolerated. The input set must consist of at least Finding the most distorting values among the variance-weighted values affords the following steps: First, the weighted average value over all input observations has to be calculated according to equation 1. The values to be removed can be determined by find. After removing ing the observations with the largest and the smallest values for observations, the weighted average value and its corresponding confidence value can be derived. The complexity of such an algorithm is , or, when regarding the number of faults, . This complexity still allows fast and efficient implementations even for great and , but the fault-tolerant averaging has a disadvantage in our application context. The confidence-weighted averaging algorithm performs better with an increasing number of inputs. Thus, removing input values affects the gain of the fusion operation,
340
DISTRIBUTED SENSOR FUSION NETWORKS
so that there is a tradeoff between the number of faults to be tolerated and the performance of the sensor fusion algorithm. 4.2 Selection Some applications (e. g., classification) need to select one input out of a set of input observations. Usually, voting algorithms [9] are a good means to choose an appropriate output with improved dependability compared to the input observations. A simple algorithm for exact voting using observations is described in the following. First, the reciprocal variance values of observations with identical values are added together in order to form a single variation value for each alternative. Then we select the first alternative (i. e., the one corresponding to the lowest value) with minimum variation. This selection method fulfills the following fairness criteria [10] for voting methods and has the property of replica determinism [11]: Condorcet criterion: 2 If there exists an alternative A that wins in pairwise votes against each other alternative, then A should be the winner of the election [10, page 1]. Sketch of proof: An alternative A will only win against a different alternative B, if its variation is smaller than the variation of B or its variation is equal to the variation of B and the value of alternative A is smaller than the value of B. Since two alternatives will always differ at least in their values and “smaller than” is a transitive proposition, the Condorcet criterion will be fulfilled for all winning alternatives A. Monotonicity criterion: If alternative A is declared the winner under a voting method, and one or more voters change their preferences in a way to favor A (making no other changes), then A should still win [10, page 1]. Sketch of proof: If an input that initially proposes an alternative B switches to the winner alternative A, then the variation of A will decrease, while B’s variation will either increase or B will drop out of the set of proposed alternatives. Thus, A will still win over B. Since the variations of all the other alternatives remain unchanged, alternative A will also win over all other alternatives. Replica determinism criterion: Every pair of two voters that get the same input data will elect the same winner consistently. Sketch of proof: Provided that all voters are using the same look-up table and arithmetics, all voters will calculate identical variations for every alternative in all voters. Since the algorithm itself is deterministic, it is thus guaranteed that replica determinism is maintained among multiple voters. All three criteria are fulfilled by the proposed selection algorithm with the ancillary condition that all voters are provided with exactly the same input data. Hence, the fulfillment of the above criteria relies on a digital communication system that has to provide a reliable broadcast mechanism. 2
Marquis de Condorcet, French mathematician of the eighteenth century
341
ELMENREICH, PETI
4.3 Fusing Observations from Different Instants Synchronizing measurements and performing measurements at periodically a priori defined instants is an inherent capability of a time-triggered architecture as proposed in the following section. Thus, the -th observation on an entity is guaranteed to be taken at the where is the first instant of measurement, is the interval instant between two consecutive measurements and is the time jitter. The jitter is comparatively ). Therefore, we can ensure that a set of small in time-triggered systems ( observations delivered by different sensor nodes are taken at the same instant. However, in case of omission faults, we have to deal with a set of observations with differing instants: some observations may have been updated to instant and some observations which failed to be transmitted are only available as an older version . If the redundancy in the system is high enough, a convenient method to solve this problem is to keep only the most recent observations and discard the others. The fusion algorithms are then performed as described before with a reduced set of observations. This method is principally applicable if the periodical measurements happen on a sparse time set. Otherwise, if observations can take place at any instant of a fine-grained time line it is likely that only one observation remains as input for the fusion algorithm. As an alternative to dropping old observations, a history of observations can be used to extrapolate the state of the real-time entity for the desired instant. Thus, all missing observations can be compensated with respective estimated values. The confidence of an extrapolated value should be respectively low due to the high expected deviation between real value and estimated value. Moreover, such practise can be critical if the output observation is used in feedback loops.
5 Application in a Fieldbus Network A fieldbus network connects transducers (sensors and actuators) to a control system. While in former approaches transducers where point-to-point connected and instrumented by analog signals, actual fieldbus systems use a digital communication medium to interconnect the transducers with the control system. We decided to insert the sensor fusion processing between the transducer nodes and the control system. Since future fieldbus nodes are equipped with a local microcontroller for signal conditioning, it would be possible to implement the local sensor signal processing directly at the sensor. Conceptually, the sensor fusion will be strictly separated from the control application in order to avoid increasing complexity for the control application [12]. As a case study we used the time-triggered master-slave fieldbus protocol TTP/A. TTP/A is designed for predictable real-time communication in non-critical applications in the automotive and automation sector. The protocol [13] uses a time division multiple access (TDMA) bus arbitration scheme, which meets timing requirements for typical sensor fusion algorithms [14]. It is possible to address up to 254 nodes on a bus. One single node is the active master. This master provides the time base for a synchronized global time among all slave nodes. The communication is organized into rounds. A round consists of several slots. A slot is a unit for transmission of one byte of data. Data bytes are transmitted in a standard UART format. Each communication round is started by the master with a so-called fireworks
342
DISTRIBUTED SENSOR FUSION NETWORKS
byte. The fireworks byte defines the type of round. A TTP/A round (see Figure 4) consists of a configuration dependent number of slots and an assigned sender node for each slot. The configuration of a round is defined in the RODL (ROund Descriptor List). The RODL defines which node transmits in a certain slot, the semantics of each individual slot, and the receiving nodes of a slot. RODLs must be configured in the slave nodes prior to the execution of the corresponding round. The TTP/A protocol offers a unique addressing scheme for all relevant data of a node like communication schedules, calibration data, and I/O properties. This addressing scheme is called Interface File System (IFS) [15]. The IFS provides a universal interface to the TTP/A network for configuration and maintenance tools as well as for applications running local on a node. The IFS is structured in a record-oriented format. The smallest addressable unit is a record of 4 bytes. All nodes contain several files with a number of records that can contain information for automatic configuration. TTP/A supports data types for 8 bit and 12 bit digitized analogue data. It is possible to assign a measurement a four-bit confidence marker referring to the quality of the sensor observation. These confidence markers will be used to represent the quality of an observation as described in Section 3. Due to the fact, that the whole communication and computation is time-triggered with respect to a global time, the observation instant of each observation is known a priori to all nodes and may not be transmitted. The observation context is defined by its address in the IFS. Figure 5 depicts a sample communication in TTP/A. Node A contains a sensor and a local IFS, node B contains the control application. The IFS acts as a temporal firewall [16] between communicating entities as follows: The sensor performs a measurement at instant . At time the protocol transports the data from the local IFS of node A to the local IFS of node B. The data arrives at time at node B. The control application can now use the sensor data until it is overwritten with a new value at time . Usually to output a control signal. The output of the control application has to hold a deadline the control application is also written to the IFS and further transported at time by the time-triggered protocol to the actuators of the system. Figure 7 shows the instants of communication in a timing diagram. The establishment of the temporal firewall is, that the task of the control application may be scheduled any time between and as long as the result is written to the IFS until the end of this duration. By using knowledge about the timing behavior, it is possible to introduce sensor fusion into an existing TTP/A application. In our implementation, the fusion algorithms will be implemented on the same fieldbus node as the control application. Cluster Period Slot 0
Slot 1
Slot 2
Slot 3
FB (Master)
DataByte
DataByte
DataByte
Slot n
...
DataByte
Slot 0
...
Last slot of round
FB.................. Fireworks Byte, sent by master DataByte ...... sent either by master or slave
Figure 4: TTP/A Communication
343
FB (Master)
... t
ELMENREICH, PETI
Sensor
local IFS
local IFS
Control Application C
S Time-Triggered Communication
Fieldbus Node A
Fieldbus Node B
Figure 5: Data Processing in TTP/A Figure 6 depicts an extension of the above described application with a fusion node. The fusion node is a virtual node implemented together with the control application in fieldbus node B. The incoming data is preprocessed by a fusion node until it is fed into the control application. Taking the timing constraints from the above example we now arrive at the constraint in equation 3: (3) where is the worst case execution time of the fusion process and is the worst case execution time of the control application. Given that the necessary timing constraints can be satisfied, the sensor fusion process is transparent to the control application process. The main advantages of this architecture are: No changing of the network configuration: Existing TTP/A networks can be used to host sensor fusion algorithms. The system behavior will thus be improved without adding extra nodes. This eases the installation of sensor fusion methods significantly since no adaption of existing configuration data (RODL files) is needed. Reuse of existing control applications: The presented approach can be used to transform an application that does not tolerate sensor faults into one that does. If the WCET analysis guarantees the timing constraint (Eq. 3) the modified application will show the same temporal behavior as the original application.
local IFS Control Application Sensor
local IFS C
S Time-Triggered Communication
F
Fieldbus Node A
Fusion Node
Fieldbus Node B
Figure 6: Data processing with fusion processor inserted
344
DISTRIBUTED SENSOR FUSION NETWORKS
Cluster Period local IFS
Node A (Sensor)
local IFS
Measure
t m1
Measure
t t1
t m2
t t2
t
local IFS
Node B (Controller)
Fusion
local IFS Fusion
Process data
t a1
t c1
Process data
t a2
t
local IFS
Node C (Actuator)
Actuate
t r1
t
Figure 7: Communication and computation instants among three nodes Fusion algorithm is independent of control application: The strict separation of the fusion process and the control application allows a modular system development. Thus small, controllable subsystems can be implemented and tested separately and finally joined together to form the final system. Use of generic algorithms: The fusion algorithm is independent of the application, thus generic fusion algorithms can be used for a variety of applications. There is still a possibility to enhance existing network without extensions to hardware and under reuse of existing software. However, this property cannot be guaranteed generally. If a system is already so compact, that there is no redundancy in sensor measurements and no space on the fieldbus controller to host the sensor fusion task, extensions are necessary anyway. Many applications, however, provide some redundancy or free resources. For those cases, our approach allows a smooth integration of the additional functionality.
6 Conclusion We presented an architecture for processing sensor measurements with respect to their dependability. Each measurement is represented as a compound of a name, a measurement instant, the measured value, and a confidence marker indicating the reliability and preciseness. Sensor observations are processed by a network of fusion nodes in order to get data with higher confidence. The confidence of each measurement is attached to the transmitted data in form of the confidence marker. The sensor fusion uses a probability model of sensor readings where the expected variance of a measurement corresponds directly to its confidence. Besides the fusion of different values taken at approximately the same instant the paper presents also approaches for fusion observations of different instants. We examined methods for integration of the presented sensor fusion algorithm into ex-
345
ELMENREICH, PETI
isting application in order to transform a real-time application that does not tolerate sensor faults into one that does. An important point is the stability of the timing behavior after the integration which is supported by a time-triggered communication system featuring a temporal firewall at each communication action. An analysis of the worst-case execution time of the resulting application is used to verify the timing constraints of the original application. When the necessary timing constraints can be satisfied, the modified application will show the same temporal behavior as the original application. Since our approach allows the joining of fusion nodes with existing tasks into existing hardware nodes, resources in existing TTP/A networks can be used to host systems with improved behavior.
Acknowledgments We would like to give special thanks to our colleague Wolfgang Haidinger who acted as mathematical advisor when we were at our wits’ end. This work was supported in part by the Austrian Ministry of Science, project TTSB and by the European IST project DSoS under contract No IST-1999-11585.
References [1] B. Liptak. OEM insight: Get serious about accuracy. Control Design for Machine Builders, May 2001. [2] H. Kopetz. Real-Time Systems, Design Principles for Distributed Embedded Applications. Kluwer Academic Publishers, Boston, Dordrecht, London, 1997. [3] B. Parhami. A data-driven dependability assurance scheme with applications to data and design diversity. In A. Avizienis and J. C. Laprie, editors, Dependable Computing for Critical Applications, volume 4, pages 257–282. Springer Verlag, Vienna, 1991. [4] M. Henry. Sensor validation and fieldbus. Computing & Control Engineering Journal, 6(6):263–269, December 1995. [5] A. Visser and F. C. A. Groen. Organisation and design of autonomous systems. Textbook, Faculty of Mathematics, Computer Science, Physics and Astronomy, University of Amsterdam, Kruislaan 403, NL-1098 SJ Amsterdam, August 1999. [6] S. Pitzek. Description mechanisms supporting the configuration and management of TTP/A fieldbus systems. Master’s thesis, Technische Universit¨at Wien, Institut f¨ur Technische Informatik, Vienna, Austria, 2002. [7] International Organization for Standardization (ISO), Gen`eve, Switzerland. Guide to the Expression of Uncertainty in Measurement, 1st edition, 1993. [8] R. E. Kalman. A new approach to linear filtering and prediction problems. Transaction of the ASME, Series D, Journal of Basic Engineering, 82:35–45, March 1960. [9] B. Parhami. Voting networks. IEEE Transactions on Reliability, 40:380–394, August 1991. [10] M. Corks. Evaluating voting methods. Survey paper, University of Waterloo, 1997. [11] S. Poledna. Replica Determinism in Fault-Tolerant Real-Time Systems. PhD thesis, Technische Universit¨at Wien, Institut f¨ur Technische Informatik, Vienna, Austria, 1994. [12] W. Elmenreich and S. Pitzek. The time-triggered sensor fusion model. In Proceedings of the 5th IEEE International Conference on Intelligent Engineering Systems, pages 297–300, Helsinki–Stockholm– Helsinki, Finland, September 2001.
346
DISTRIBUTED SENSOR FUSION NETWORKS
[13] H. Kopetz et al. Specification of the TTP/A protocol. Technical report, Technische Universit¨at Wien, Institut f¨ur Technische Informatik, Vienna, Austria, March 2000. Available at http: www.ttpforum.org. [14] W. Elmenreich and S. Pitzek. Using sensor fusion in a time-triggered network. In Proceedings of the 27th Annual Conference of the IEEE Industrial Electronics Society, volume 1, pages 369–374, Denver, CO, USA, November–December 2001. [15] H. Kopetz, M. Holzmann, and W. Elmenreich. A universal smart transducer interface: TTP/A. International Journal of Computer System Science & Engineering, 16(2):71–77, March 2001. [16] H. Kopetz and R. Nossal. Temporal firewalls in large distributed real-time systems. Proceedings of the 6th IEEE Workshop on Future Trends of Distributed Computing Systems (FTDCS ’97), pages 310–315, 1997.
About the Authors Wilfried Elmenreich was born in 1973. Before going to the Vienna University of Technology, he studied at the Engineering School for Electrotechnics and Control in Weiz, Styria. In 1998, he received a Master’s degree in computer science and in 2002 a doctoral degree in technical sciences both from the Vienna University of Technology in Austria. His research interests include real-time and embedded systems, smart transducer networks, fieldbus communication, and sensor fusion. Philipp Peti received his Master’s degree in computer science in 2001 from Vienna University of Technology in Austria. His research focuses on networked embedded systems, fault-tolerant systems and real-time systems. Currently, he is working on his PhD thesis on diagnosis in distributed embedded real-time systems.
347
348
Implementation of VLSI Routing Algorithms Bence Golda , Bálint Laczay , Zoltán Ádám Mann , Csaba Megyeri , András Recski Department of Computer Science and Information Theory, Budapest University of Technology and Economics, Budapest, Hungary {gbence,blac,csabesz,recski}@cs.bme.hu Department of Control Engineering and Information Technology, Budapest University of Technology and Economics, Budapest, Hungary [email protected]
Abstract — In this paper we introduce a flexible software framework for the easy implementation and evaluation of VLSI routing algorithms and the visualization of routing results. This software framework provides rapid prototyping, evaluation and testing of algorithms, and has support for both 2-dimensional and 3-dimensional visualization. We attached some well known routing models and algorithms to this framework, and made some performance tests of the concrete implementations. Moreover, we present some new results in the theory of VLSI routing algorithms. For rectangular grids, we present two new lower bounds on the number of necessary layers. We also considered a less widespread routing model, the triangular grid. We present the reformulation of some classical algorithms for this model.
1 Introduction In the last decades, with the amazing spread of electrical devices, the need for Very Large Scale Integrated (VLSI) circuits has grown rapidly. This required the construction of new algorithms and methodologies in all phases of VLSI circuit design and realization [1, 2, 3, 4]. As a result, a variety of routing algorithms, mathematic models, heuristics and automation tools have been developed [5, 6, 7, 8, 9]. In this paper, we consider the problem of detailed routing. That is, the placement of the units is already known, as well as the terminals to be interconnected. The aim is to determine if such an interconnection is possible, and in the case of a positive answer, an optimal interconnection is to be found [10, 11]. Optimality is usually measured in terms of chip size, but other factors (such as wire length, number of bends, speed, energy consumption etc.) can also be considered. As the complexity of the circuits to be designed has grown significantly, it has become increasingly difficult to create suitable algorithms. First, the algorithms have to be fast and scalable in order to cope with huge and complex problem instances. A second problem is that because of the complexity of the routings—especially in the case of 3-dimensional
349
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
routing—it is increasingly hard for the algorithm designer to visualize the operation of his or her algorithm. There has been little tool support for this [12]. One of the main contributions of the presented work is a flexible software framework, which enables rapid prototyping, evaluation and testing of routing algorithms. An important feature of the software is its support for both 2-dimensional and 3-dimensional visualization of routings. We also implemented some of the ’classic’ routing algorithms using the software. This enabled us to perform certain experiments and measurements, which gave interesting results about the practical effectiveness of the algorithms. Another contribution of the paper is connected with a less wide-spread routing model based on a triangular grid instead of a rectangular one. We managed to transfer some known routing algorithms to this new model, yielding in some cases better results than in the original rectangular model. The software could also be easily extended to support the new model, which proved its flexibility. The paper is organized as follows. Section 2 gives an overview of the formal mathematic model of detailed routing, as well as the main results in the field. This section also includes two previously unpublished results. Section 3 introduces the triangular model and describes routing algorithms for it. Section 4 presents the software framework, while Section 5 describes some empirical results. Section 6 concludes the paper.
2 VLSI routing theory 2.1 Basic definitions In VLSI routing problems we are given a rectangular area and we have to interconnect some points of the boundary by wires. For this purpose we use a square grid or usually a three dimensional cubic grid containing levels of square grids. These levels are called layers. The points at the bounds of the grid connecting to the devices are called terminals. A set of terminals to be interconnected is called a net. A routing problem is a collection of nets. To solve this problem we have to find a collection of vertex-disjoint connected subgraphs of the grid so that the terminals belonging to the same net are in the same subgraph. In the multilayer model, where , a wire can leave a layer for another using a via-hole and the subgraphs may leave the terminals at any layer, so via-holes are at the boundary as well. If terminals appear only at one side of the boundary, we speak about a single row routing problem. If they arise on two parallel sides then it is a channel routing problem. If terminals are on all the four sides, the problem is called switchbox routing. Beside these important cases it is possible that terminals are on two adjacent sides when we say gamma routing or on three sides when we speak about open switchbox routing. In case of a single row routing or a channel routing the width is not determined, and we have to minimize the width of the solution, while in case of switchbox routings and gamma routings the size of the area is determined so we have to decide whether a solution exists. In this case an optimization problem can be to minimize the number of layers. Although we defined a solution as a collection of vertex-disjoint subgraphs, some authors studied solutions where the subgraphs have to be edge-disjoint. This is called edge-disjoint routing. If , we speak about planar routing. If there are several layers,
350
VLSI ROUTING ALGORITHMS
we can consider certain models where restrictions are introduced. The most frequently used model is called Manhattan model where consecutive layers may contain wire segments of different directions (horizontal or vertical) only. If no restriction is defined, the model is called unconstrained. The following figures show an example switchbox routing problem (Figure 1(a)) and its solution in a two-layer unconstrained model (Figure 1(b)).
(a)
(b)
Figure 1: A routing problem and its solution
2.2 Algorithms and theoretical bounds In this section we mention some results in different models. At first we consider the single , one can easily verify that not every problem can be row routing problem. In case of then every specification can be solved in the Manhattan model by Gallai’s solved. If algorithm based on a greedy interval packing. Similarly, single row routing problem can be solved in case of . The width of the solution is , where is the density and is the number of horizontal layers. In Manhattan model this is the best possible. , but this can slightly be The theoretical lower bound in the unconstrained model is improved: there exists a routing specification with density Theorem 1 For every and which cannot be solved in width on layers. In other words, the theoretical is not tight. bound , Proof: One can immediately see that not every specification can be solved if since at a position where the density is equal to , all rows are occupied by a wire of a net and only the wires next to the terminals’ side can be reached. Hence for example, the routing problem remains unsolvable. For example, let , and (see Figure 2). At the vertices marked by circles, the rows are occupied by wires of the net 1, 2, and 3. Because of the density, the position of the wires must be kept until the vertices marked by squares. Hence, only one of the fourth, fifth and sixth terminal can be accessed. Even in case of there must be an unsolvable problem. Suppose the problem has nets and starts and ends with . Consider the problem only between these
351
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
Figure 2: Example problem parts, let us say, of terminals. We have only one free row and at one step at most the four neighboring wires can leave to this row, and at most wires can be reached from the terminal side. This means that the number of different routing realizations is at most . The number of all routing problems is and since , there must be unsolvable problems. First we mention that it is NP-complete to decide whether a channel routing problem can be solved with given width in the Manhattan model on two layers [8]. Certain specifications are not solvable at all in this model. On the other hand, every specification can be solved in the unconstrained model on two layers, for example, by the algorithm of A. Recski and F. Strzyzewski [13]. A disadvantage of their algorithm is, however, that the width of the channel in the resulting routing can be as large as , though this upper bound can be improved with some heuristics. In case of channel routing in the multilayer Manhattan model the theoretical lower bound is . The greedy interval packing algorithm solves the problem width , where is the number of vertical layers. For odd in the VHV. . . V model the two bounds are the same. For even it is NP-complete to decide whether a solution with exists in the multilayer Manhattan model with horizontal layers. Now consider the switchbox routing. Here we suppose that terminals cannot appear at the corner of the switchbox. There is no fixed number of layers that is sufficient for every specification, see an example of S. E. Hambrusch in [9]. This example shows that the number of layers depends on the shape of the rectangle. Szeszlér’s algorithm [11] solves the switchbox routing problem in linear time in the Manhattan model on layers, , and are the height and width of the switchbox. where In the switchbox routing the basic lower bound of the number of layers, obtained by the example of Hambrusch, is in the unconstrained model and in the Manhattan model. Due to the algorithm of D. Szeszlér, we have an upper bound of in both cases. For square shape box in the Manhattan model this means . Theorem 2 The construction of Hambrusch with size (see [9]) cannot be solved on 5 layers. This means that the lower bound for square boxes in the Manhattan model is 6. Proof: Note that it is still possible that for larger boxes less than 6 layers are sufficient. But in this case, every net uses at least 5 vertices of the grid because the shortest path between the endpoints is of length 3, but every wire has to turn at least twice and in Manhattan model this needs a via hole. The four nets use at least 20 vertices, thus the number of layers is at least five.
352
VLSI ROUTING ALGORITHMS
In case of five layers every vertex is occupied. We can suppose that there are two layers for horizontal wires. Then the horizontal wires fill these layers. At the top layer only the Southern or Northern terminals can connect to the grid because this layer is for vertical wires. But the wires on the second layer cut these terminals from the wires of the fourth layer, hence the wires on the second layer are for the Southern and Northern terminals. This can be repeated for the wires of the fourth layer, so Western and Eastern terminals do not have horizontal wires, leading to a contradiction. Like channel routing, the two-layer switchbox routing in the Manhattan model is also NP-hard.
3 The triangular routing model VLSI routings are usually based on the square lattice. It is an interesting question whether other types of lattices like the triangular or the hexagonal lattice are also useful for solving routing problems. Since on these lattices we can use one more direction for wires, one can expect that the number of necessary layers may decrease. In technology, the use of a new direction causes no problem, while via holes remain the same as before. One can immediately see that the triangular lattice is a better candidate than the hexagonal lattice, because on the latter wires have to turn at every vertex of the lattice. This is the main reason why we focus on the triangular lattice. In this case, it is natural to define the routing area as a triangle rather than a rectangle. Similarly to the original model, we call a problem single row routing problem, if terminals are only on one side of the triangle. If terminals appear on two sides, we speak about a lambda routing problem while the general case, when terminals can be everywhere, is called triangle routing problem. Note that the lambda routing problem differs from the original gamma routing problem in the fact that it can use three directions instead of two on the half of the area (see Figure 3).
Figure 3: The connection between lambda and gamma routing We call a routing Manhattan type if layers contain wires of the same direction and these directions change from layer to layer. Now we will show some algorithms on the triangular model. The sides of the triangle will be called South, East and West, while the nonhorizontal directions of the lattice will be called Eastern and Western. Terminals in
353
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
single row problems will always occupy the South side, while in lambda routing the East and West side. The single row routing problem can be solved in this model like in the original one: Theorem 3 A single row routing can be solved on one layer in the triangular model if and only if it can be solved on one layer in the original model. Moreover, similarly to the original model, every single row routing can be solved on two layers in the triangular model. A Manhattan type solution can be realized in linear time. Proof: A single row routing can be solved on one layer if and only if no two nets are crossing and this is independent of the type of the lattice. On two layers choose the leftmost terminal of every net. Give a wire segment from this terminal on the first layer in the Eastern direction and connect every other terminal on the second layer using a West-directed segment. Theorem 4 Every lambda routing problem can be solved Manhattan-like on 5 layers in linear time. Proof: The first and fifth layer will be for Eastern, the second and fourth layer will be for horizontal and the third layer will be for Western segments. Choose a net that has terminal on the West side and give a wire segment on the second and third layer from the lowest terminal of this net. Now every other terminal of the Western side can be connected on the third layer, while terminals on the Eastern side on either the first or on the fourth layer. Nets having Eastern terminals only, will be given a segment on the fifth layer from the topmost terminal. Other Eastern terminals can be connected on the fourth layer. Theorem 5 The number of layers needed in the triangle routing is at least 4, while at least 5 layers are needed for a Manhattan type solution. There is a linear time algorithm that uses 12 layers to provide a Manhattan type soulution. Proof: One can find small specifications needing 4 or 5 layers in the Manhattan type routing. By using the lambda routing algorithm we get a 12-layer-algorithm for triangle routing. We have to use the above algorithm to connect nets on the first four layers, having only Western terminals, and nets having both Western and Eastern terminals. We do not need the fifth layer. Now repeat this for nets having Eastern terminals only, and for nets having both Eastern and Southern terminals on the next four layers. Finally, do the same with nets having Southern terminals only, and for nets having both Western and Southern terminals on the last four layers. In the original model, gamma routing can be solved by Szeszlér’s switchbox algorithm on 4 layers. However, it is possible to solve the gamma routing problems on 3 layers, if we use the triangular lattice: Theorem 6 Every square-shape gamma routing problem can be solved in linear time on 3 layers in Manhattan way on the triangular lattice. Proof: Note that now we have a square box on the square lattice extended by a North-East diagonal direction, terminals are on the Northern and Western side. The first layer is for vertical, the second is for horizontal and the third is for diagonal wires. Suppose that the square has size , that is, there are at most terminals and
354
VLSI ROUTING ALGORITHMS
nets. We give a wire segment for every net on the second layer. This is possible because we have rows and at most nets. Nets having at least two terminals on the West side get a wire on the horizontal layer from their topmost terminal. Next the nets that have exactly one terminal on the West side get a wire on the horizontal layer from this Western terminal. On the rest of the rows of the second layer we give one wire segment for every net that has Northern terminals only. Now every Northern terminal can be connected on the first layer and every Western terminal can be connected on the third layer. This algorithm works also in the general rectangular case. Suppose that width is no greater than height, . If we have nets then layers suffice, since horizontal tracks can be placed on layers. As , the routing uses at most layers. layers. That is at most
4 The software framework After having described briefly the theory of detailed routing algorithms as well as triangular routing, the second part of the paper focuses on more practical issues. This section presents our software implementation. The aim was to create a software that helps in designing and evaluating routing algorithms. Correspondingly, the main design goals were the following: – Portability; – Both 2-dimensional and 3-dimensional visualization; – The implementation of routing algorithms should be as easy as possible; – Also heuristic algorithms have to be supported; – Flexibility to incorporate new routing models; – Persistent storage of problem instances and routings with a suitable file format, which is easy to generate and to process; – Automatic generation of figures for presentation and educational purposes. The software was implemented in Java, using object-oriented methodology, and UML as modelling language. For 3-dimensional visualization, Java3D was used. For the persistent storage of routings, we defined a special format using XML [13]. Routings can also be exported in FIG format, so that they can be edited using the drawing tool XFig, converted to PostScript and embedded in LATEX documents. The software was mainly tested on Pentium III workstations running Debian Linux. It can be downloaded from the website of the project [14]. It needs JDK 1.3, Java3D and the XML parser JAXP. The software consists of three major modules: the graphical user interface (GUI), the backend library, and the implemented algorithms. Figure 4 shows a simplified UML diagram of the system. 4.1 The backend library The backend library is a set of classes modelling the important elements of routing problems and thus supporting the implementation of routing algorithms. These classes include Net, Wire, ViaHole, Routing, etc.
355
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
algorithm.channel
ChannelAlgorithm framework «interface»
Algorithm model.multilayer
MultilayerModel
gui
«interface»
Model
Routing
RoutingView
«interface»
Wire
ViaHole
Layer
Segment «interface»
Side Rectangle
GuiCore
Net NetView «interface»
Terminal Row
Figure 4: Simplified UML diagram of the software
Other elements of the routing problems are modelled as interfaces. The implementation of these depends on the actual routing model: Terminal, Side, etc. The most important principle in the design of the backend library was flexibility. In particular, the geometric properties of the routing problem (i.e. the routing model) are separated from the logic of the routing problem (interconnection of terminals belonging to the same net by wires). This way, new routing models can be defined easily; they only have to implement certain interfaces. The flexibility of this approach has been proven by the uncomplicated implementation of the triangular routing model after the development of the system was already completed. Currently, two routing models are implemented: the traditional rectangular grid (MultiLayerModel) and the new triangular grid (TriangularModel). Additional models can also be realized; however, each model needs a corresponding graphical user interface. 4.2 The choice of Java First, we stress that the object-oriented concept is glittering clear in Java, and this has proven to be really suitable for constructing the backend library. But the same could be a drawback, or at least unfitting, for implementing routing algorithms. Certainly, when coding the algorithms, you are free to choose between the object oriented view and the traditional C-like view. But this is not an easy decision. Both ways have pros and cons. We could stick to objects, although they are harder to deal with. For example, consider a simple construction, like summing the elements in an array. In traditional C, this is a simple for() cycle. But if you would like to retain the object-oriented model, you have to instantiate an Iterator object, and each time you retrieve an element, you have to use the Iterator.next() method and apply an explicit type cast. Another problem emerges when you need various data structures in the algorithms. In the simplest case just consider terminals. Usually, for each net, the corresponding
356
VLSI ROUTING ALGORITHMS
terminals are given. But sometimes you need to somehow “invert” this representation to get the corresponding net for each terminal. This is easy to code efficiently if you have a simple array of integers. But problems like this seem complicated to solve in a conceptually clear object-oriented manner. It is even harder for a beginner to code them efficiently. You need a deep view into the object-oriented programming, to be able to carry out algorithmic tasks in an efficient way. It would be more straightforward to use simple C-like constructs regarding the technique of programming and the readability of the code, as well as the difficulty to retain efficiency. Moreover, most of the engineers and mathematicians already have a quite good ability to code these algorithmic tasks without objects. Why not use then simply C-like code in algorithms? First, because then you have to make a conversion from the objects of the backend library to C-like structures and back. Second, in same cases, you have to carry out the same operation on different data structures, but you do not know it in advance. To be able to reuse your code in these cases, you should rigorously use objects along the implementation. 4.3 Algorithms To demonstrate the operation of the system, we implemented the following algorithms (all of them are realized as separate classes implementing the Algorithm interface): – Gallai’s algorithm for the single row routing problem [11]; – The algorithm of Recski and Strzyzewski for the channel routing problem [15]; – Szeszlér’s algorithm for the switchbox routing problem [11]. The implementation of the algorithms was significantly simplified by the services of the backend library. The implementation of Gallai’s algorithm revealed an interesting fact: although the literature states that it is a linear-time algorithm, this is not true for its description in most sources. So extra care had to be taken to implement it in a more efficient way. 4.4 GUI The graphical user interface is mostly made up of standard Swing elements. The key design patterns used in the GUI are model-view and listener [16]. On the other hand, the design of the user interface also required the application of more user-focused principles such as similarity and symmetry. The main control window contains two lists: one for algorithms and one for routings. Both lists can be edited by adding and removing elements. The user can select an algorithm and a corresponding routing problem and let the algorithm solve the given problem. View windows (2D and 3D) showing the solution automatically show up. Creating a new routing problem is supported by a “wizard”. The user can first either define a set of constraints or use a predefined one and fill in its preferences (e.g. the length in the case of a single row routing problem). After that, terminals and nets can be added to the routing problem in a special window. Alternatively, a previously saved problem instance can be loaded from the disk.
357
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
5 Empirical results The implementation of the routing algorithms described in Section 4.3 enabled us to test their runtime properties. The main purpose of the testing methods in this section is the evaluation of heuristic algorithms; however, they also yielded interesting results in the case of the implemented exact and deterministic algorithms. Even if these algorithms are claimed to be linear-time in the literature, we saw in Section 4.3 that it may still be problematic to construct a linear-time implementation. Moreover, it is important to know the constants of the linear augmentation, as well as the impact of technical influences, such as memory management, on the running time. 5.1 Functional tests The aim of the first tests was to check the correctness of the implementation. For this purpose, we chose problem instances that were small enough to verify the operation of the algorithms manually. These test cases also covered special cases, such as empty nets, no nets at all etc. The verification process consisted of three steps: 1. We checked first whether the algorithm ran without errors, and terminated; 2. It was checked whether the output of the algorithm was a correct solution of the original problem; 3. The algorithm was also performed manually, and the results were compared. Besides finding a couple of minor bugs, which were fixed right away, an interesting behaviour of the switchbox routing algorithm was recorded. Namely, in some cases the algorithm produces routings with loops. This does not affect the correctness of the output; however, in an industrial application, such loops should be eliminated. 5.2 Performance tests In the performance tests, the average running time of the algorithms was measured as a function of problem size. The problem size was characterized by the number of terminal positions. The test cases were generated randomly, based on two different distributions. In the first case the number of terminals in a given net was determined by a binomial distribution, in the second case this number was constant for all nets. In both cases the terminals were selected according to a uniform distribution. Since we wanted to measure the performance of the algorithms, extra care had to be taken to exclude the starting time of the Java virtual machine as well as the time required by test case generation and garbage collection from the measurements. Particularly, garbage collection has to be forced before starting the tests to avoid compromising the measurements with the deferred clean-up of memory that had been reserved before the algorithm was started. Moreover, in the case of big problem instances, the first invocation of the algorithm was significantly slowed down by the fact that the Java virtual machine had to reserve huge memory blocks from the operating system, while the second invocation already started with more memory available. So, we let the algorithm solve a fix-sized problem before each measurement.
358
VLSI ROUTING ALGORITHMS
We found that the two considered distributions gave very similar results. Therefore we mostly focused only on the case when the number of terminals in a net is constant. The case when this constant is 2 is particularly important, because this is the situation in many practical applications. In the case of Gallai’s algorithm for the single row routing problem, we found that for small and medium size problems the running time of the algorithm is indeed linear, with a slant of about ms/terminal. However, on very large problem instances ( terminals, which is not typical for detailed routing problems in practice) it was superlinear with an exponent of about 1.22. In the case of the channel routing algorithm, the slant for normal problems was in the range , and the exponent for huge problem instances was about 1.08. For , the switchbox routing algorithm, the slant for normal-size problems was and the exponent for very large problem instances was about 1.13. The superlinear behaviour of the algorithms in the range of huge problem instances is probably caused by the effects of virtual memory management. Operations that are assumed to require constant time (such as, for instance, referencing an element of an array) require an increasing amount of time if the amount of data becomes large because of the page and segment access overhead. This also explains why the level of superlinearity was the highest in the case of Gallai’s algorithm, since it makes heavy use of memory for optimization.
6 Conclusion This paper has presented both theoretical and practical results in the field of VLSI detailed routing algorithms. As theoretical contributions, we gave two new theorems which improve some lower bounds on the number of necessary layers: we have proven that the previously known lower bound for the number of necessary layers to solve the single row routing problem in the unconstrained model is not tight; and that the lower bound for square-shaped switchbox routing problems in Manhattan model is 6 instead of 5. Moreover, we investigated a less widespread model, the triangular model, and managed to transfer some algorithms for it. In some cases these algorithms yield even better results in the triangular model than in the rectangular one. As a practical contribution, we presented our software framework for the easy implementation and evaluation of routing algorithms. This framework was flexible enough to enable the implementation of the triangular model as well. Also, the software posesses excellent visualization capabilities. Finally, we performed a series of tests on the implemented routing algorithms. Both the functional and the non-functional tests gave interesting results that could not have been discovered without the help of the presented software.
Acknowledgements The work of the group was partially supported by grant No. OTKA 30122 of the Hungarian National Science Fund and that of Zoltán Ádám Mann by a grant by Timber Hill LLC.
359
GOLDA, LACZAY, MANN, MEGYERI, RECSKI
References [1] R. N. Noyce. Microelectronics. Sci. Amer., 237, 1977. [2] T. C. Hu and Ernest S. Kuh. VLSI Circuit Layout: Theory and Design, chapter “Theory and Concepts of Circuit Layout”, pages 3–19. IEEE Press, New York, NY 10017, 1985. [3] Otto G. Folberth and Warren D. Grobman, editors. VLSI: Technology and Design, chapter “Device, Circuit, and Technology Scaling to Micron and Submicron Dimensions”, pages 3–18. IEEE Press, New York, NY 10017, 1984. [4] Otto G. Folberth and Warren D. Grobman, editors. VLSI: Technology and Design, chapter “VLSI Design Automation: An Introduction”, pages 19–23. IEEE Press, New York, NY 10017, 1984. [5] A. Frank. Disjoint paths in a rectilinear grid. Combinatorica, 2:361–371, 1982. [6] M. L. Brady and D. J. Brown. VLSI routing: Four layer’s suffi ce. Advances in Computing Research, 2:245–258, 1984. [7] M. Koebe and P. Dupont. Single-layer channel routing. J. Inf. Process. Cybern., 7/8:339–354, 1988. [8] A. S. LaPaugh. A polynomial time algorithm for optimal routing around a rectangle. Proc. 21st FOCS Symp., pages 282–293, 1980. [9] S. E. Hambrusch. Channel routing in overlap models. IEEE Trans. Computer-Aided Design of Integrated Circ. Syst. CAD-4, 1985. [10] A. Recski. Minimax results and polynomial algorithms in VLSI routing. Ann. Discrete Math, pages 261–273, 1992. [11] D. Szeszlér. Routing VLSI circuits (Nagy bonyolultságú hálózatok huzalozása). Manuscript, 2000. [12] Dorothea Wagner and Karsten Weihe. An animated library of combinatorial VLSI-routing algorithms. In Symposium on Computational Geometry, pages C28–C29, 1995. [13] Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler. Extensible Markup Language (XML) 1.0 Recommendation. World Wide Web Consortium, second edition, 2000. [14] VLSI project homepage. http://www.cs.bme.hu/vlsi. [15] Recski A. and F. Strzyzewski. Integer programming and combinatorial optimization, chapter “Vertex-disjoint channel routing on two layers”, pages 397–405. University Waterloo Press, 1990. [16] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Massachusetts, 1994.
About the Authors András Recski is professor of mathematics and computer science (Budapest University of Technology and L. Eötvös University). Formerly he was with the Research Institute for Telecommunication and visiting professor at Yale and Cornell. Bence Golda is graduate student in computer science at Budapest University of Technology and Economics. Bálint Laczay is PhD student in computer science at the Department of Computer Science and Information Theory (Budapest University of Technology and Economics). Zoltán Ádám Mann is PhD student in computer science at the Department of Control Engineering and Information Technology (Budapest University of Technology and Economics). Csaba Megyeri is graduate student in mathematics at Eötvös Loránd University.
360
Chapter 6 System Modeling
Intelligent Engineering Modeling by Active Models László Horváth, Imre J. Rudas John von Neumann Faculty of Informatics Budapest Polytechnic, Budapest, Hungary [email protected] [email protected]
Abstract – Conventional models of mechanical systems in recent industrial CAD/CAM environments have outstanding passive features. The authors make efforts to define modeling methods that are capable of creating active features of the related models. This aim demands more information about nature and characteristics of feature and associativity driven product modeling. Feature approach is followed by the authors and extended by active modeling approach. Generic or instance model objects and model related knowledge are included in the model on a way that allows for their active application. Recent modeling of mechanical systems has the capability necessary to accommodate the proposed model extension. The paper is organized as follows. It starts with an outline and explanation of purpose and objectives of the reported research. Following this main characteristics of the proposed approach and method of active modeling are emphasized. Finally, new aspects of the proposed modeling and potential applications in every day CAD/CAM environments are concluded.
1
Introduction
Shape modification based part modeling, part relationships based assembly and kinematics modeling are basic issues in modeling of mechanical systems. This complex model is applied among others for analyses to enhance understanding and evaluation of functionality and manufacturability of the mechanical system. Modeling technology has developed to a sophisticated level where comprehensive and integrated descriptions of modeled objects are created in clear structures. At the same time knowledge technology has developed to a level where it is appropriate for the application in mechanical products related engineering including planning of manufacturing processes. A third trend is development of active models where not only modeling procedures but also models are able to contribute to engineering decisions. The authors are motivated to integrate the three above trends in a research aimed to contribute modeling methods that are capable for creating active features of the related models. Present advanced feature and associativity driven modeling is considered as an appropriate starting point for the reported research by the authors. The first stage of the research is getting more information about nature and characteristics of feature and
363
HORVÁTH, RUDAS associativity driven models to reveal points where active model features can be included in the model. An active model entity has correctly defined behaviors [5]. Moreover it has environment adaptive features to communicate own behaviors with its environment and understand behaviors in the considered affect zone. Affect zone can be defined as an area that a model can modify and also that can modify the model. Environment is constituted by entities in the model structure in which the active model entity has been defined and entities in other model systems with which the active model entity can communicate. In the author's proposal the feature approach is extended with the active modeling approach. Generic or instance model objects and model related knowledge are included in the model on a way that allows for their active application. Research by the authors in integrated product modeling [1], in application of intelligent technologies in computer-aided engineering [2], in human-computer interaction modeling [3] and in design intent modeling [4] are preliminaries of the reported research. The paper is organized as follows. It starts with an outline and explanation of purpose and objectives of the reported research. Following this, main characteristics of the proposed approach and method of active modeling are emphasized. Finally, new aspects of the proposed modeling and its potential applications in every day CAD/CAM environments are concluded.
2
Active model objects for mechanical systems
The reported research is aimed as an establishment of methodological background of active model objects for mechanical systems. The resulted model is to be integrated in conventional model systems. The conceptualized model objects include behavior definitions for modeled objects to assist modeled object related decisions. Moreover, they can have self-adaptivity and mutual adaptivity with their environment. They are able to work autonomously in different model, modeling system and engineer group environments. They also can work in a global environment using Internet or other telecommunication media complexes. Model of a mechanical system considered by the authors is outlined in Fig. 1. Conventional models applied by present day practice consist of model entities and structural descriptions. Entities carry information about modeled objects and basic level knowledge descriptions are involved in the form of rules and checks. Structure descriptions place entities in lists or trees as well as define relationships between them. As an example, a volume adding form feature is placed in the list of shape modifications in the part model and is defined starting from a datum plane on an existing shape. A part is included in a structure comprising sub-assemblies and parts and is positioned relative to other parts in the assembly model space. Possible movements between parts are defined in the kinematics model. The above outlined complex model is to be extended to have active characteristics.
Behavior and adaptivity features are applied as active model features extending the feature approach to active modeling. A behavior feature describes reaction for a change in parameters inside and outside of an entity and is based on product and domain related knowledge. Adaptivities control modification of parameters of the modeled object by the outside world and also modification of the outside world by the modeled object.
364
INTELLIGENT ENGINEERING MODELING BY ACTIVE MODELS
The proposed modeling is in compliance with classical prevailing objectives of engineering around mechanical systems such as high performance of parts, wellengineered shape, performance assessment of modeled objects primarily by using of finite element analysis and advanced surface model driven and computer controlled manufacturing of parts. Conventional method of protection against unauthorized changes of model data representing results of decisions is definition of shapes, dimensions and associativities as constraints. Passive model describes values of these parameters and the fact of their constraining. An active model can distinguish allowable and not allowable modifications of the constrained parameters so that the above outlined protection is realized in a more flexible and intelligent way. In some cases an active model defines new constrained values or constraints or cancel earlier defined constraints in accordance with a new situation. By application of active model description, some decisions can be modified by active contribution of the model during its development, modification and application. A modified decision is considered as an establishment of a modified state of related entities, entity parameters and associativities. Prerequisite of this activity is availability of the related behaviors in the model. Model entities
Structural descriptions
Active model features
Knowledge representation
Structure of features
Behaviors
Information description
Relationships of features Datum Position Movement
Adaptivities
Figure 1: Model of a mechanical system
Engineering activities during development and manufacturing planning of a mechanical system are considered as a set of interrelated decisions. Conventional models describe results of decisions in the form of shape, dimension and associativity constraints (Figure 2). In the example of Figure 2 value of lengths L1 and L2 must be the same. This is a dimensional associativity constraint. Shape of arch A is to be circular (shape constraint) and its center must coincidence with the center of circle C (position constraint). Parts P1 and P2 are in contact (physical associativity constraint CR). The main essence of the approach by the authors is support of this conventional decision environment by using of active model features. However, there is an other main difference between the present CAD/CAM practice the method proposed by the author's. The generally accepted modeling method defines form features and attaches attributes and representations to them. In the author's approach, generic or instance part related knowledge features are included in the model. This is also an additional extension of the feature approach.
365
HORVÁTH, RUDAS Decisions of engineers
Dimension constraints
Associativity constraints Dimensions Tolerances Positions Physical Materials Manufacturing
Shape constraints CU
L2
A C
P1
CR P2 L1
Figure 2: Description of results of decisions in conventional models
3
Knowledge based active modeling
Presently applied models of mechanical systems are passive ones. Their elements are placed in structures and describe results of decisions as simple facts. These models do not recognize new or modified decisions of engineers or any other changes in the world outside of the modeled object. The only possible answer is a restriction when changes are not prohibited by constraints defined in the model. This model requires engineers making evaluation of all new situations to do new decisions or leave original decisions unmodified. The proposed active modeling has the potential to do most of these activities automatically using easy to represent knowledge. There is not any use of a question like „The outside diameter of a bearing had to be changed to cope with loads. What is the new diameter of the boring in the part mating the outside ring of the bearing?” Active model entity includes knowledge to prepare itself to react inside and outside effects. These effects result changes of decisions about model parameters or associativities within and outside of the model entity (Fig. 3). Sometimes individual entities or complete sets of entities must be replaced by new ones or reordered even deleted. Built in knowledge is related to modeled object or model. A model entity normally is an instance of a generic entity. In this case, instance entity related knowledge is merged from the generic entity, the engineering task and the actual modeling procedures into the active model entity. Engineers who are responsible for the related design activities also place knowledge in the model in some ways of direct and indirect definition. Domain and general knowledge is considered to be more economical to store in modeling systems and access by link. Knowledge of this category should be included in active model when active model is applied in a not eligible modeling environment. Going to communication intensive worldwide computer systems, it is obvious that knowledge content of active model entities is more and more often linked from outside sources rather than included in the model entity. The above outlined method allows engineers to concentrate for key decisions that really require human consideration of new circumstances. The active model activities are based on the recognition that any alteration of a model affect a well defined set of model entities and entity parameter values.
366
INTELLIGENT ENGINEERING MODELING BY ACTIVE MODELS
Conventional model elements Parameters
Modeled object related Entities
Model related Associativities
Inside effects and reaction
Affect zone
Outside effects and reaction
Domain knowledge General knowledge Knowledge
Behaviors
Figure 3: Knowledge in active model entity Effect of a model change is propagated through chains of knowledge supported associativity definitions. New or modified decisions are made on the basis of behaviors. Behaviors are defined for a set of entities representing a purposeful set of modeled objects and allow active model entities to self-evaluate actual circumstances of model. Well-defined sets of circumstances support evaluation of the proposed model. Active model suggests modified or new decision to accept or reject by the engineer or it is waiting for decision of engineer. Figure 4 outlines the decision-making environment and shows active modification of constraints as a consequence of changed circumstances. Creating behavioral model requires correct and purposeful description of modeled objects. Following this, an analysis about the modeled object is necessary in order to extract and describe behaviors. Behaviors are defined by using of human knowledge, computer described knowledge, field tests, etc. Behavior of the described engineering objects must be in accordance with human thinking for design intent conform automatic decisions by active model entities. Activities of an active model entity have been defined on four levels by the authors (Figure 5). On the first level an active model evaluates then reports actual behaviors of the modeled object. On the second level, active model modifies its own status. On the third level active model modifies model entities with which its associativities are defined and accepts or rejects attempt for its modification by outside entities. On the forth level active model entity defines new associativities. Combined active and adaptive characteristics of model entity is relied upon analyses on modeled object and other objects in its affect zone. Simulation environments are configured for this purpose [6]. Generalization of simulation results is one of the numerous tools that can be applied at creation of model objects for active modeling. The proposed active model objects are structured by using of the feature principle. Features modify an existing model. Behavior and adaptivity features modify parameters and associativities of the modeled object. On Figure 6, entity Ai is placed in a model structure description. It can be, for example, a form feature described by its parameters. Parameter PjAi is associative with parameter PlBk of the entity Bk by the associativity
367
HORVÁTH, RUDAS definition ASm. Behavior feature BFn is in connection with several entity parameters and associativities that are in the scope of that behavior. Decision of engineer Active model entity
Creating behavioral model
Constrained parameter
Description of the modeled object
Related behavior Analysis to extract behavior
Behavior specific knowledge Included in model
Creating behavior model
Linked from outside
Changes in the environment
Figure 4: Description of results of decisions in active models Behavior feature suggests modifications and communicates adaptivity features through setting special status for the affected parameters and associativities. Knowledge features govern activity of both behavior and adaptivity features. Adaptivity feature creates a map of the actual affect zone, generates modifications and makes attempts for changes of the affected entities. Broken constraint can occur only when a behavior feature places new knowledge feature instance in the model that generates change of constraint. Consequently, the third group of features that modify parameters and associativities is the group of knowledge features
Level one: Report on behavior of the modeled object at defined circumstances. Level two: Self modification of status of an active model entity
Modeling procedures
Humans
Model entities
Level three: Modification of associative entities Level four: Establishing new associativities
Within the same model structure In other model structures
Figure 5: Levels of activities of active models
368
INTELLIGENT ENGINEERING MODELING BY ACTIVE MODELS
A less or more complex entity, that can work autonomously by using of adaptivity, behavior and knowledge features modifies feature based passive model of engineering objects. The actual model object is considered one of the possible states of a generic object. Entities, parameters and associativities exist and active accordingly. Adaptive actions are initiated by modeling procedures and engineers. Processing is done in two directions. One of the directions is processing information about changed parameters and associativities. The other direction is changing parameters and associativities as a consequence of evaluation by behavior.
4
New aspect of the reported work
The proposed method of modeling is intended as a contribution to solve the problem caused by lack of design object related considerations on the basis of modeled object and model instance specific knowledge at development, modification and application of engineering models. Increasing demand for customer specific characteristics of products is anticipated for the forthcoming years. Generic model object makes possible application of different approaches to fulfill customer demands at creating product variants, custom tailored products and custom designed products. Adaptivity feature AFk
Structure description Entity A i
Behavior feature BFn
Entity A i Parameter PjAi
Associativity definition
other associativities and parameters
AS m
Entity B k Parameter PlBk
Figure 6: Application of the feature principle Implementation of the proposed method is to be based on the principle of application oriented reference model. In compliance with product model standard STEP (Standard for Exchange of Product Model Data, ISO 10303) [7], models can be written in the object oriented EXPRESS language. It is important to establish libraries for sets of generic model objects, features and associativities in accordance with needs of welldefined domains and applications. Launch of a new or modified feature definition in a model environment requires some environment-related information as predefined and related features, restriction definitions for prospective features and production resources. Receiving this
369
HORVÁTH, RUDAS information, the related features react the new or modified feature definitions before it first applied.
5
Summary
The reported research focuses on giving active characteristics for engineering models in mechanical systems. A method has been proposed by the authors that uses behavior, adaptivity and knowledge features. The purpose of these features is modification of parameters and their associativities in model descriptions of engineering objects. The proposed method is applied to create active characteristics as an extension of passive feature based product models. Activities of an active model entity have been defined by the authors on four levels from behavior analysis of modeled objects to redefinition of associativities. Paper discusses key issues of principle, structure and mechanism of the proposed active modeling.
Acknowledgments The authors gratefully acknowledge the grant provided by the OTKA Fund for Research of the Hungarian Government. Project number is T 037304.
References [1] L. Horvath, I. J. Rudas. Integrated Associative Modeling of Parts and their Machining Process by Features, In Proceedings of the ICMT 2001 conference, Singapore, pp. 316-321. [2] László Horváth, Imre J. Rudas. Emerging Intelligent Technologies in Computer Aided Engineering, Journal of Advanced Computational Intelligence, Vol 4, No. 4 2000, pp. 268278. [3] Horváth, I. J.Rudas. Modeling Human Computer Interactions in Collaborative Design and Planning. In Proceeding of the 1995 IEEE International Conference on Systems, Man and Cybernetics. Vancouver, Canada, 1995, October. Volume 2, pp. 1899-1903. [4] László Horváth, Imre J. Rudas. Modeling of the Background of Human Activities in Engineering Modeling, In Proceedings of the IECON' 01, 27th Annual Conference of the IEEE Industrial Electronics Society, Denver, Colorado, USA, pp. 273-278. [5] Yasuhisa Hasegawa, Toshio Fukuda. Motion Coordination of Behavior-based Controller for Brachiation Robot, In Proceedings of the 1999 IEEE International Conference on Systems, Man, and Cybernetic, Human Communication and Cybernetics, IEEE, Tokyo, VolumeVol. 6, 896-901, 1999. [6] M. Tambe, W. L. Johnson, R. Jones, F. Koss, J. Laird, P. Rosenbloom, and K. Schwamb. Intelligent agents for interactive simulation environments, AI Magazine, v. 16, n. 1, 1995. [7] Mannistö, T., Peltonen, H., Martio, A. Sulonen, R. Modeling generic product structures in STEP, Computer-Aided Design, Vol. 30, No. 14, 1998, pp. 1111-1118
370
INTELLIGENT ENGINEERING MODELING BY ACTIVE MODELS
About the Authors László Horváth received his Master’s degree in Engineering from the Technical University of Budapest. He received his Ph.D. degree in applied intelligent computing from the Hungarian Academy of Science in 1993. His research focuses on Modeling of Design Intent, Development of Highly Integrated and Environment Adaptive Objects for Engineering Modeling and Robot Modeling for Product Model Based Application of Industrial Robots. He is active as the Vice Dean for research of the John von Neumann Faculty of Informatics, Budapest Polytechnic and as a professor in intelligent engineering modeling. He is a Senior Member of IEEE. Imre J. Rudas received his Master’s Degree in Mathematics from the Eötvös Loránd University, Budapest while the Ph.D. in Robotics from the Hungarian Academy of Sciences in 1987. His present areas of research activity are: Robot Control, Soft Computing, Computed Aided Process Planning, Fuzzy Control and Fuzzy Sets. He is active as the Vice President of Budapest Polytechnic and as a professor and Head of Department of Mathematical and Computational Sciences. He is a Fellow of IEEE, Administrative Committee member of the Industrial Electronics Society and member of the International Board of the Robotics & Automation Society.
371
372
Optimizing Algorithms for System Level Synthesis P´eter Arat´o , Tibor Kand´ar , and Bence Cs´ak Department of Control Engineering and Information Technology, Budapest University of Technology and Economics, Budapest, Hungary arato,tibor @iit.bme.hu Department of Control Engineering and Information Technology, Budapest University of Technology and Economics, Budapest, Hungary [email protected]
Abstract — This paper presents algorithms starting from behavioural specification and high-level synthesis results for applying them for optimization in system level synthesis. The first algorithm helps the systematic conversion from the flow chart of a program to the data-flow graph. In this way, the behavioural specification in a high-level language can easily be transformed into a proper graph representation for designing a mixed hardware/software architecture. The second algorithm extends the high-level synthesis methodology for handling complex behavioural operations besides the usual elementary operations. This extension simplifies the design of complex systems and makes it faster due to the hierarchical execution of high-level synthesis tasks. The third algorithm simplifies the structure of data connection between the functional units obtained by high level synthesis. By introducing a compatibility relation between data buses, this algorithm merges them and reduces the number and size of multiplexers and demultiplexers.
1 Introduction This paper introduces a method aiming at systematic flow-chart to data-flow conversion. These conversion tasks are necessary e.g. when a software-implemented algorithm reaches its speed limits and a hardware implementation (ASIC1 , FPGA2 ) is the way out. In industrial applications it is very usual, that there is no time and manpower to re-understand all aspects of a software module, which is often the result of several years of continuous development and improvement. In such cases a method is needed that grants, that its output (data-flow description) corresponds totally to its input (the description of the software or software module). There are off-the-shelf products on the market offering FPGA or ASIC ”programming” in C. [1], [2], [3], [4]. Their problem is their own advantage, that the user gets directly to a hardware solution, without having the possibility to make decisive influence on operation 1 2
Application-Specific Integrated Circuit Field-Programmable Gate-Array
373
´ KANDAR, ´ CSAK ´ ARATO,
scheduling and resource allocation. Scheduling and allocation are always very essential where trade-off between economy and performance have to be fine-tuned. Support of other languages than C is not solved satisfactorily. Different assembly languages are missing from the palette, though there are big amounts of old, but still used applications, which are a potential to be migrated to hardware. The approach followed by the method uses the flow-chart diagram of the application written on any language and helps generate a text description of the corresponding dataflow graph. Scheduling and allocation of the resulting elementary operation graph will then be done with another CAD3 tool. Due to the given application that required computer aid during conversion, focus is held on processing of assembly codes. The latest development in system level synthesis [5], [6], [7] involves the need for methodologies using beneficial complex functional units as building blocks [8]. In this paper, a new method is presented for expanding the elementary operations into hierarchical functional units. The goal of this procedure is the realization of hierarchical design. It is beneficial for the practice that the hierarchical operations are assumed to operate in pipeline mode. It is shown that a pipeline operation can be handled formally as a multiple operation. Adaptation of traditional synchronization, scheduling and allocation algorithms have to be investigated. Allocation algorithms applied in the high-level synthesis places every behavioural operation to a physical processor. Since several operations may be allocated into the same processor, the data dependency is very complex between them. To establish all the required data paths, large number of multiplexers and demultiplexers needs to be applied. The large number of multiplexers and demultiplexers is a disadvantage, and so it makes the high-level synthesis methods inefficient. The aim of the allocation of operations in a common processor is to reduce the chip area, but the extra multiplexers and demultiplexers increase the area requirements of the solution. Additionally, these components need extra control. In this paper algorithms are introduced, which decrease the number of multiplexers and demultiplexers in the data path obtained by applying the high-level synthesis methods.
2 Systematic conversion of flow-charts to data-flow descriptions Conversion of software to hardware is done in several steps. First the flow-chart has to be enhanced with additional data. Then, with the help of the enhanced flow-chart, the dataflow diagram can be drawn or directly a data-flow description can be formulated. Dataflow diagram is created only for the sake of visualization, primary output of the conversion is the data-flow description. The description list then has to be optimized, since most boolean expressions of multiplexers’ control will involve a higher level of redundancy. Having the optimized data-flow description, the so-defined elementary operation graph has to be scheduled and allocated. The result of the scheduling and the allocation is the input of a mostly formal conversion that outputs manufacturing files for hardware programming. 3
Computer-Aided Design
374
OPTIMIZING ALGORITHMS FOR SYSTEM LEVEL SYNTHESIS
2.1 Preprocessing of the Flow-Chart It is very usual in software that a variable or a register gets new values several times. Because of the strict sequentiality, this does not lead to data corruption. In a data-flow representation – where there is a high level of parallelism and operation mobility – the results of operations has to be distinguished explicitly. This can be achieved by using interim variables that represent software variables at any given occurrence or controlrelated behaviour. Figure 1 shows an example for preprocessing a flow-chart. S05:
AX:=VAR_01+1 @s05_ui16_01 AX > #CONST_02
@s05_bit_01 yes
BX:=VAR_02+1 @s05_ui16_03
@s05_ui16_02 BX:=AX*2 VAR_01 = #CONST_08
~VAR_01
@s05_bit_02 yes VAR_01:=#CONST_07
LABEL_18: @s05_ui16_04 @s05_ui16_05
VAR_02:=#CONST_11 ~VAR_02
VAR_02:=AX + BX ~VAR_02 S06
@s05_ui16_06
Figure 1: Preprocessed flow-chart An interim variable name consists of three parts. @s05 ui16 07 reflects that it deals with entry point 5, it is a 16 bit unsigned integer variable with occurrence number seven. Original software variable names are kept with indexed by the number at their occurrence and their final values are distinguished by a ’ ’ sign. This is advantageous when only a cyclic executed software part will be converted and output variables then have to get back to a microprocessor. Interim bit variables are used to help conversion of conditional branches. These branches define, which parts of the software run and so, which calculations have to be executed. In the data-flow diagram and finally in its description list, multiplexers are used controlled by logical functions of the same conditions. An interim bit variable is assigned to each conditional branch like @s05 bit 01 that is 1 if the checked condition holds. In the dataflow description, conditional check operations are be used (like CGT001, compare greater than), which produce the values of these interim bit variables. As the original software can run on different paths depending on different conditions, the data-flow has to follow this characteristic. Whether a certain part of the code is executed or not, it depends on the
375
´ KANDAR, ´ CSAK ´ ARATO,
conditions influencing the control-flow. By the present approach, all paths of the resulting data-flow are processed, but then multiplexers are applied for selecting the right outputs defined by the conditions. In this sense, it has to be followed-up, which software part runs under the given circumstances and the defining logic equations have to be used as the selector inputs of the corresponding multiplexers. 2.2 Flow-chart Conversion After pre-processing the flow-chart, the operations can be written in the following form: Result Operation Param1 Param2 . . . where Result is the result of the operation, Operation is the required operation, ParamX are the parameters of the operation like the two operands of an addition. Regarding Figure 1 possible lines are: @s05 @s05 @s05 @s05 @s05
ui16 01 bit 01 ui16 03 ui16 02 bit 02
ADD001 CGT001 MUL001 ADD002 CEQ001
VAR 01 1 @s05 ui16 01 #CONST 02 @s05 ui16 01 2 VAR 02 1 VAR 01 #CONST 08
The conversion of a conditional calculation is illustrated for
VAR 01:
VAR 01 = VAR 01 if -@s05 bit 01 (@s05 bit 01 && -@s05 bit 02) VAR 01 = #CONST 07 if @s05 bit 01 && @s05 bit 02 This conditional behaviour will be written as follows: r r r r r
NEG001 NEG002 A2D001 O2R001 A2D002 VAR 01
NEG001 NEG002 A2D001 O2R001 A2D002 M2X001
@s05 bit 01 @s05 bit 02 @s05 bit 01 r NEG002 r NEG001 r A2D001 s05 bit 01 s05 bit 02 VAR 01 #CONST 07 r O2R001
r A2D002
where ”r ” means the result of the corresponding operation, NEG is a bit invert operation, A2D is a two input logical AND, O2R is a two input logical OR, M2X is a two-input multiplexer with the two possible inputs and the two (mutually exclusive) selector inputs. The data-flow description of the flow-chart in Figure 1 consists of 20 lines after resolving of the redundancy of the logic operations controlling the multiplexers. The elementary operation graph, described by the above list, has to be scheduled and allocated according to the constraints of the given application. This is done by software tool ”PIPE” [9]. The result obtained by PIPE needs a commercial tool starting from RTL level and providing the hardware programming files.
376
OPTIMIZING ALGORITHMS FOR SYSTEM LEVEL SYNTHESIS
3 Hierarchical design 3.1 Definitions The problem to be solved may be considered as a sequence of pipeline and non-pipeline (elementary) operations between the input and the output data. Data connections and operations represent a principal data path for the problem to be solved. To differentiate pipeline operation from elementary operation the following notations are initiated. – An elementary operation ( ) is not able to receive new input data before the end of its activity with the actual input data, i.e., the end of its busy time [9]. – A pipeline operation ( ) is able to receive new input data before ending its activity with the actual input data. – An operation ( ) is a common, generic name of elementary and pipeline operations. A pipeline operation has two important features: the pipeline restarting period ( ) and the latency ( ) as shown in Figure 2. The execution time of is denoted by and stands for its busy time according to [9]. In this way, the cyclic restarting of a pipeline operation with new input data occurs more frequently than the period determined by . The pipeline mode means that the pipeline restarting period is shorter than latency. There is a correspondence between the parameters as follows:
For elementary operations, the busy time depends on the execution time ( , ). In contrary, the value of a pipeline operation does not depend on the parameters of the successor operations. pi Ri
ej
i Li
qj
j tj
Figure 2: Pipeline operation and elementary operation For the sake of simplicity, a pipeline operation can be handled formally as a multiple elementary operation. Each copy has a time interval of between its two subsequent data. The value of this time interval must be at least equal to the busy time of the input buffers of the copies. This condition can be expressed as follows:
where +1 stands for an extra clock cycle to properly work without appearing any transient errors and hazards.Thus, the behaviour of a pipeline operation can be considered an elementary operation multiplied in
copies. It can receive input data with a frequency of processing a data is .
377
and the required time interval for
´ KANDAR, ´ CSAK ´ ARATO,
3.2 Reducing the restarting period The shortest restarting period is determined by the maximal busy time value. In the case of an EOG4 containing only elementary operations ( ), the minimal restarting period ( ) can be expressed: To reduce the minimal restarting period, the busy time of some elementary operations : has to be decreased, if it is necessary. There are two methods for reducing – inserting additional buffer registers, – applying multiple copies of some operations [9]. It is beneficial to insert a buffer register before and after a pipeline operation because the efficiency of scheduling and allocation algorithms can be improved in this way. Unfortunately, the latency will be longer in this case. Inserting buffers because of its fixed value cannot reduce the busy time of a pipeline operation. In this particular case the pipeline operation having maximal busy time must be considered for achieving the minimal restarting period. Therefore, the pipeline operation having the maximal busy time (i.e., ) may be relevant for :
3.3 Synchronization It is a requirement for this dataflow-like representation that an operation is started only after having all its input data. Another constraint is that all its input data has to be stable during the whole duration time. These conditions are not satisfied automatically for an initial EOG. If an operation has more than one input, the synchronization problem may always exist. Inserting synchronization buffers as delay units may be required for satisfying the data stability constraints [9]. 3.4 Scheduling The goal of scheduling methods is to fix the exact starting time of operations within their mobility interval (i.e., between their ASAP (As Soon As Possible) and ALAP (As Late As Possible) times. These methods attempt to minimize the number of the real resources, the overall idle time, and maximize the throughput at the same time. There are several algorithms for solving this problem. One of the most popular scheduling methods is the force-directed scheduling [10]. This algorithm minimizes a force-like function based on processor utilization and it can be extended for pipeline operations. The force function depends on the load of the operations. The load of an operation having a non-zero mobility should be approximated by considering its mobility and the timing of its successors. The efficiency of this scheduling algorithm depends on the above approximation. 3.5 Allocation The resource allocation algorithm determines which operations share the same real processors. If two operations are concurrent, then they cannot share a common processor. 4
Elementary Operation Graph
378
OPTIMIZING ALGORITHMS FOR SYSTEM LEVEL SYNTHESIS
3.6 Benchmark problem The MDCT5 is a lapped orthogonal transformation used in signal processing. More traditional block transformations for signal processing (such as the DCT 6 or FFT7 ) suffer from blocking artefacts arising because of the independent processing of each block. Lapped transformations, however, have a 50% overlap between successive blocks which results in a much reduced number of artefacts. In MPEG8 audio encoding (layer III) the MDCT uses 18 consecutive values of one granule and 18 output values of the granule before. These two value-blocks are assembled to one block of 36 samples. From these 36 input samples 18 output values are produced. The original algorithm requires about 1300 multiplications and 650 additions. First of all, the building blocks were designed. The Table 1 illustrates 4 variations for the number of multiplications and additions belonging to common complex hierarchical building blocks. Block name Additions Multiplications bb18 18 36 bb9 9 18 bb6 6 12 bb4 4 8 Table 1: Number of adders and multipliers for hierarchical blocks The results of without applying hierarchical design and by applying it using the 4 variations of complex building blocks can be compared. In Figure 3, 4 and 5 the results of the design strategies are illustrated. 1200
non-hierarchical bb18 bb9 bb6 bb4
Number of processors
1000 800 600 400 200 0 5
10
15
20
25
30
35
40
Restarting period
Figure 3: Number of processors (additions and multiplication) 5
Modified Discrete Cosine Transformation Discrete Cosine Transformation 7 Fast Fourier Transformation 8 Moving Picture Experts Group 6
379
´ KANDAR, ´ CSAK ´ ARATO,
In Figure 4, the diagrams of the cost functions are shown for the different solutions. The cost function is a weighted sum of the number of processors and the synchronization buffers. 14000
non-hierarchical bb18 bb9 bb6 bb4
12000
Cost
10000 8000 6000 4000 2000 0 5
10
15
20 25 Restarting period
30
35
40
Figure 4: Cost function It is beneficial that the calculation time is significantly shorter (Figure 5) in case of hierarchical design, because the handling of the problem is much easier. 100000
non-hierarchical bb18 bb9 bb6 bb4
Execution time [s]
10000
1000
100
10
1 5
10
15
20
25
30
35
40
Restarting period
Figure 5: Required time for calculations
4 Algorithmic implementing of data links High-level synthesis methods reduce the necessary chip area of a system by allocating more functionality (multiple operations) into one common processor [9]. Based on the data dependencies of the operations, a processor has to receive or provide data to many other processors. The complexity of the connections between the processors is growing, if many operations are allocated in one processor.
380
OPTIMIZING ALGORITHMS FOR SYSTEM LEVEL SYNTHESIS
The complex data lines require many multiplexers, and demultiplexers, which increase the chip area (Figure 6). If more data can be transferred on the same connection, then less wiring is required at the inputs of processors, so the number or size of multiplexers are reduced. In this case, less wiring can connect the outputs of processors, so the size or number of demultiplexers is reduced, as well. These common data paths are called buses. a
b
x
0 0,12
0
5
12
cos0 c4 15
5 mul0 m1 8
m3 8
20
8
sbff0 21
sbff2 12
add0 a5 3
a6 3
15 bff0 16
mul1 m2 8
13
24
sbff1 21
15
24
m7 8
sub0 s8 3
sbff3 16
Figure 6: EOG after scheduling and allocation Data links can be characterized by the following parameters: – name: Identifier of the data link. – starting time: The point of time (clock cycle) in which the data transfer is started. – busy time: The required data hold time (expressed by clock cycles), on the data link. As elementary operations need their all inputs during the execution, therefore, the busy time of data links are equal to the execution time of the drain processor. – source: The processor (or EOG input), which provides the data. – drain: The processor (or EOG output), which receives the data. A bus allocation is an assignment of each data link to a bus. Summing up the above considerations, two data link can be allocated to the same bus, if they do not overlap each other in time, or they overlap each other in time but they have the same source processor and different drain processor. Notations of the algorithms: ,
, ...
data links number of data links bus
proc succ
381
source processor of drain processor of subset of data links allocated to bus
´ KANDAR, ´ CSAK ´ ARATO,
The algorithm assumes that there are as many buses as data links, and every are allocated to a different bus. Based on the EOG topology, the merging of these buses is attempted if the compatibility permits it. Buses and can be merged, if every elements is a compatible pair of data links. of set The selection value is calculated for each pair of buses ( and ). Two buses should be merged in each step, if their allocated data links supply the most common drains. If there are more maximal numbers of common drains, then decision is made by considering the common sources. In this case is incremented by 1 if the source is incremented by a number which is is common. In the case of common drains, ). greater than the sum values representing the common sources (for example Two buses are merged, if the value of is maximal (and the compatibility conditions are not hurt). if if otherwise
where
while exists compatible buses calculate D matrix while not compatible with find maximal end while mark as allocated end while
The efficiency of the algorithm is based on the applicability of common buses. In this case, the number of inputs of the multiplexers (or outputs of the demultiplexers) is not greater than the number of buses. In Figure 7, the result of algorithm is shown for the EOG illustrated in Figure 6.
5 Conclusion A systematic method has been shown for the conversion of software to hardware. It is based on the flow-chart of the given application and makes possible, that the hardware equivalent of a software algorithm runs significantly faster. Besides that, it allows designers with software background to define hardware and provides a link between hardware and software for system level synthesis. The output of the conversion is a data-flow description, which can be post-processed by existing tools, performing behavioural optimization (scheduling and allocation). The post-processed output can be transformed into hardware programming files by applying commercial synthesis tools.
382
OPTIMIZING ALGORITHMS FOR SYSTEM LEVEL SYNTHESIS
sbff2
x
cos0 c4 15
sbff0
add0 a5 3
a6 3
mul0 m1 8
m3 8
sub0 s8 3
sbff1
a ibff2
bff0
ibff3
sbff3
b
mul1 m2 8
m7 8
ibff0
ibff1
Figure 7: Processors connected to buses By extending the traditional high-level synthesis algorithms, more complex functional units can be used, which can operate in pipeline mode. They are used as building blocks to design more complex systems. This methodology supports the hierarchical design and the reuse and so it can be applied in system level synthesis. The common principles are summarized and a benchmark problem is presented to illustrate the application of the system-level synthesis concept. It is beneficial that the calculation time is significantly shorter in case of using complex building blocks, because the handling of the problem is much easier. The cost of the system designed by the above hierarchical methodology is not increased too much, but the designing time is reduced extremely. By reducing the number or size of multiplexers and demultiplexers and using buses may result in a smaller chip area, or less CLBs, simplier control, and less wiring. A bus allocation algorithm is presented, which provides the minimal cost by reducing the number and size of the multiplexers.
Acknowledgments The research work has been supported by the grant OTKA T030178 and T043329, at the Department of Control Engineering and Information Technology, Budapest University of Technology and Economics.
References [1] A. Gerstlauer, R. D¨omer, J. Peng, and D. Gajski. System Design - A Practical Guide with SpecC. Kluwer, May 2001. [2] D. Ku and G. De Micheli. Hardwarec - a language for hardware design. Technical report, Stanford University, Apr 1990. CSL-TR-90-419.
383
´ KANDAR, ´ CSAK ´ ARATO,
[3] M. Aubury, I. Page, G. Randall, J. Saul, and R. Watts. Handel-C Language Reference Guide. Oxford University Computing Laboratory, Aug 1996. [4] R. D¨omer, D. Gajski, and A. Gerstlauer. Specc methodology for high-level modeling. In EDP2002, 9th IEEE/DATC Electronic Design Processes Workshop, 2002. [5] A. A. Jerraya. Multilanguage specification for system design. In System-Level Synthesis, NATO Science Series. Kluwer Academic Publisher, 1999. [6] E. Rolf. Emdedded system architectures. In System-Level Synthesis, NATO Science Series. Kluwer Academic Publisher, 1999. [7] J. Teich, T. Blickle, and L. Thiele. An evolutionary approach to system-level synthesis. In Proceedings of the 5th International Workshop on Hardware/Software Codesign, 1997. [8] P. Arat´o, B. Cs´ak, T. Kand´ar, and Z. Mohr. Some components of a new methodology in system-level synthesis. In Proceedings of the 6th International Conference on Intelligent Engineering Systems, 2002. [9] P. Arat´o, T. Visegr´ady, and I. Jankovits. High-level synthesis of pipelined datapaths. John Wiley & Sons, Chichester, United Kingdom, first edition, 2001. [10] P. G. Paulin and J. P. Knight. Force-directed scheduling for the behavioural synthesis of asics. IEEE Transations on Computer Aided Design, 6:661–679, 1989.
About the Authors P´eter Arat´o is a Professor of Electrical Engineering and Computer Science at the Budapest University of Technology and Economics. He has been the head of Department of Control Engineering and Information Technology since 1988. He is the dean of the Faculty of Electrical Engineering and Informatics. He is a senior member of IEEE and the past Chairman of the Hungary Section. He has a long career in digital design, logic synthesis and system level synthesis. He has been elected to corresponding member of the Hungarian Academy of Sciences in 2001. Recent works are focusing on methods of special approaches to system level synthesis. Tibor Kand´ar received a Master’s degree in electrical engineering from the Budapest University of Technology and Economics in Hungary in the year 1999, and finished his PhD program in the year 2002. His research interests include the system-level synthesis, the high-level logical synthesis, the VHDL programming and Intellectual Properties. Bence Cs´ak received his Master’s degree in electrical engineering in 1993 from Technical University of Budapest in Hungary. His research focuses on hardware/software co-design, high reliability systems and embedded solutions.
384
A Verification and Validation Model for Software Systems József Sziray Department of Informatics Széchenyi University, GyĘr, Hungary [email protected]
Abstract — The paper is concerned with the general aspects of testing complex software systems. First a mapping scheme as a test model is presented for an arbitrary given software. This scheme serves for describing the one-to-one correspondence between the input and output domains of the software system, where the test inputs and fault classes are also involved. The presented test model incorporates both the verification and the validation schemes for the software. The significance of the model is that it alleviates the clear differentiation between verification and validation tests, which is important and useful in the process of test design and evaluation. The second part of the paper examines the case when the software is designed by using formal specification. Here the consequences and problems of formal methods, and their impacts on verification and validation are discussed.
1 Introduction As it is known, reliable operation and application of complex software systems impose rigorous requirements for their development. It involves quality assurance accompanying the entire development cycle, from the specification up to the installation [1-3]. The fulfillment of the quality and reliability requirements necessitate that the software undergo some specific verification and validation procedures [1-7]. The task of verification is to check the consistence between the individual development phases. Validation is meant for the checking of the software whether it conforms to the user requirements. Adequate performance of verification and validation implies the following advantages: It helps in deciding whether the next development phase can be started. It may reveal errors in an early period of the development. It provides data and information for the software quality and reliability in any of the phases. It may point out at an early state that the software does not meet the requirements. All this has to involve previously planned checking, as well as intensive testing of the software in each phase. This short study deals with the methods that are related to verifying and validating software, where testing is an integral part of both activities. Here em-
385
SZIRAY phasis is placed on the so-called safety-critical computer systems [3], [7]-[9], where the most important criterion is safe operation, without endangering life and great values. This type of computing system is taken into account here, since it needs the most thoroughly planned and performed procedures, in comparison with other systems. The paper presents a test model which is a mapping scheme for describing the one-toone correspondence between the input and output domains of a given software system. Here the test inputs and the fault classes of software are also involved. The test model incorporates both the verification and the validation schemes for the software. The significance of the model is that it alleviates the clear differentiation between verification and validation tests, which is important and useful in the process of test design and evaluation. Finally, the consequences and problems of using formal methods in the software design are discussed.
2 Fault model and basic notions The fundamental feature of software faults is that they are present all the time during operation. The question is how their effect manifests itself in various situations. Two basic classes of software faults can be defined: a) Specification faults: Faults which occur at the beginning of the development cycle, and manifest themselves in the malfunctioning of the software, by not meeting the real user requirements. Here the term malfunction is meant in a broad sense: It may be the consequence of both erroneous and incomplete specification. This category can also be referred to as external or user faults. b) Programming faults: It involves the wide group of faults that originate from the mistakes made by the programmers in the course of design and coding of the previously specified software. Other synonyms for this category: internal or development faults. A few possible types of these faults are listed below: Erroneous performance of a function. Missing functions. Data-management errors in accessing the data base. Starting and termination faults. Faults in the user interface. Violation of types. Underflow or overflow of boundary values. Coding error. Algorithmic error. Initialization error. Error in the control flow. Data transmission error. Input-Output errors Race among program blocks. Workload error. The selected fault model determines to a great extent the efforts that have to be exercised in designing and performing the test procedures [10]-[13]. The main trade-offs are:
386
A VERIFICATION AND VALIDATION MODEL FOR SOFTWARE SYSTEMS Opportunities for realizing the test design, and the possible costs. Previous knowledge about the fault phenomena connected to the given development technique. Services and performance provided by the available hardware and software tools. On the basis of practical experiences it can be stated that about 50 % of the overall development costs are constituted of testing cost. This involves both design and execution of the testing procedures. With the development of software engineering the size and complexity of the systems are permanently growing. As a consequence, it is continually desired to elaborate newer and more efficient methods and tools for testing. In the development of software it is a fundamental requirement to keep the whole process in a strictly consistent progression. Here the various stages have their own representations of realization. The correct performance of the process requires the proof of consistency among the individual representations. After all, it should be proved that the final software product conforms by 100 % to the starting specification. The realization of the proving process is done in a way where the consistency between two consecutive development phases is proved, step-by-step. If a discrepancy is observed at a phase then it must be modified until it will harmonize with the previous phase. The described activity of proving the equivalence between two consecutive phases is called verification. The more exact definition is as follows: Verification: The process of determining whether the software at a phase meets the requirements which have been specified in a previous phase in the course of the development cycle. In principle, step-by-step verification is sufficient for proving the equivalence between the starting and terminating phases. However, since the whole process is not exact in general, i. e., it does not yield an absolute proof at any step, a separate and self-contained final verification is still necessary to be carried out between the specification and the final product. On the other hand, at this point it should be noted that the perfect realization of the verification process does not guarantee the perfect usability of the final product. All that can be guaranteed is the fulfillment of equivalence with the starting specification. In case if there had been mistakes or imperfections in the specification, the final product will not meet the user requirements. It is necessary therefore to examine the product from the viewpoint of its original destination. The extra observation process which results in the desired proof is called validation. It is defined in the following way: Validation: The examination and evaluation of the software with the aim of determining whether it meets the user requirements in every respect. In case of a safety-critical system the following items have to be proved: Functionally adequate operation. Proper performance. Fulfillment of the safety requirements.
387
SZIRAY As a consequence of imperfect specification, most of all safety is jeopardized. After all, in the final validation procedure it is to be decided whether the entire system is safe or not. If some problem is found then it will be necessary to return to the initial specification itself and modify it. The modification implies redesign of the system, and performing the required changes in it, where repetition of each verification phase and a new validation will also be demanded. Verification and validation are to be handled together in full harmony. This fact is expressed by the wide-spread short term of “V & V” procedure [3]. Nevertheless, the two notions are sometimes confused. They are, in fact, different activities. Verification involves checking that the program conforms to its specification. Validation involves checking that the program as implemented meets the expectations of the software customer or user.
3 The verification and validation model As we have declared, software faults are derived from programming errors, as well as erroneous or incomplete specification. The first category of fault is a result of inadequate development or implementation process, whereas the second one does not conform to the ultimate user requirements. In the following we will refer to these categories as development faults and user faults, respectively. Software faults manifest themselves in program malfunction when the faulty code segment is executed with a set of inputs which expose the actual fault. At the same time, the rest of the code may work properly for the other inputs. A software system can be considered as an entity which maps an input set to an output set. A system has many possible inputs. For simplicity, combinations and sequences of inputs will be considered as a single input. The response to these inputs is made by producing an output or a set of outputs. It should be added that by using this simplification there will be no loss in generality, since any separate group of input data or controlling commands may be viewed as a single element of the input set belonging to the software. Let the set of all possible inputs to the software under consideration be denoted by INPD (input domain), and the set of all possible output responses by OUTD (output domain). Now the one-to-one mapping of INPD into OUTD by the software system will be defined in the following form: SWM (INPD) = OUTD.
(1)
Relation (1) means that the properties of the system, i. e., the mapping SWM, determine the correspondence between the elements of INPD and the elements of OUTD. This relation will be considered to be valid at any particular phase of the software development cycle, i. e., we will use the same notation SWM, independently of the changes performed on the software itself. Furthermore, we denote the set of inputs which cause malfunction by INER, while the set of erroneous outputs by OUTER, which is produced as a response to INER. For these sets the following mapping relation holds true: SWM (INER) = OUTER.
388
(2)
A VERIFICATION AND VALIDATION MODEL FOR SOFTWARE SYSTEMS The scheme for the above two mappings is depicted in Figure 1.
INPD
Input domain INER
Software system: Mapping
SWM
OUTD
Output domain OUTER
Figure 1: Software mapping scheme with faults If we involve tests for fault detection in our mapping model, it will result in the modification of sets INER and OUTER. The reason is as follows: Suppose a test set INERT is capable of detecting a subset of yet undetected faults. In this case INERT and INER necessarily have to possess common elements, namely those which represent inputs detecting existent faults. As a usual consequence, this test must result in fault removal. It means that the corrected software will produce a modified output domain with subsets INER and OUTER which do not represent the detected and so deleted faults any longer. After this, the new mapping relation for the corrected software is SWM (INER INERT) = OUTER
(3)
where the minus sign stands for subtraction between sets. The corresponding scheme is seen in Figure 2. At this point we can turn to examining the question of verification and validation. Here the following notations are introduced: The set of inputs which manifest themselves in development faults: DEFI. The output mapping of this set is DEFO.
389
SZIRAY
Input domain
INERT
INPD
INER
Software system: Mapping
SWM
Output domain OUTER
OUTD
Figure 2: Mapping scheme after testing The set of inputs which manifest themselves in user faults: USFI. The output mapping of this set is USFO. The set of test inputs which have been devised to detect development faults, i. e., the set of verification tests: VERT. The set of test inputs which have been devised to detect user faults, i. e., the set of validation tests: VALT. Now that we have a way of mapping various input sets into output sets, we can give a general model to describe the mapping scheme of verification and validation related to a specific software system. The mapping relations are as follows: SWM (INPD) = OUTD.
(4)
SWM (DEFI (VERT VALT)) = DEFO.
(5)
SWM (USFI (VERT VALT)) = USFO.
(6)
Here relation (5) expresses the verification mapping, while relation (6) expresses the validation mapping. From these relations it can be seen that (5) represents the unde-
390
A VERIFICATION AND VALIDATION MODEL FOR SOFTWARE SYSTEMS tected development faults, whereas (6) represents the undetected user faults. The above three relations are shown in the composite scheme of Figure 3.
VERT
VALT USFI
Input domain INPD
DEFI
Software system: Mapping
SWM
Output domain
DEFO USFO
OUTD
Figure 3: Mapping scheme for verification and validation
4 The use of formal methods The term formal methods describes the use of mathematical techniques in the specification, design, and analysis of computer hardware and software [7], [14]-[15]. It is well known that many of the problems associated with the development of safety-critical systems are related to deficiencies in their specification [3]. A specification must be unambiguous, complete, consistent and correct. Documents written in natural languages are always susceptible to misunderstanding. It is also difficult to ensure that such documents represent full and correct description of the required system, or even to demonstrate that they are consistent. Formal methods are based on the use of formal languages which have very precise and strict rules. This feature enables the specifications to be defined in a manner that can be
391
SZIRAY interpreted unambiguously. It also makes possible the automatic checking of the specifications in order to find omissions and inconsistencies, i. e., to prove the completeness and consistency. Languages intended for this purpose are called system specification languages, or formal specification languages. Their use offers many potential advantages in all phases of the development cycle [7], [14]-[21]. One of the greatest advantages of describing a system in a formal manner is that automated tests may then be performed on this description. This allows software tools to check for certain classes of error, but also allows different descriptions to be compared to decide if they are equivalent. The various phases of the design are all descriptions of the same system, and thus should be functionally equivalent. If each of these representations is prepared in a suitable form, it should be possible to prove the equivalence, one by one. As it can be seen, this process is nothing else then the verification itself. Figure 4 shows that each step of transformation is followed by the task of confirming that the task has been carried out correctly. This involves demonstrating that the description which forms the input to a given phase is functionally equivalent to that produced at its output. In an ideal case, the transformation procedures in the above outlined process are completely automated, having no human interaction, and are performed without any faults at any phase. If so, the external test input sequences for verification can be completely omitted. In our test model it means that DEFI = ,
VERT = ,
where the symbol represents the empty set. From this it follows that DEFO = .
On the other hand, the initial formal specification of the software is always carried out by a manual way, and therefore design errors may never be excluded here, even if there is an automated consistency checking available. The reason for this is that a consistent design in itself does not guarantee the perfect fulfillment of the user requirements. Also, there is no guarantee for meeting the safety requirements either. As a consequence, the external validation testing is always necessary to apply, i. e., by taking into consideration the above ideal case, the following relation will hold true: SWM (USFI VALT) = USFO.
(7)
Eventually, it should be emphasized that the outlined technique cannot be taken to be a panacea. Although offering several important advantages, the use of formal methods also imposes a considerable number of constraints on the development methods used. Since the strength of a chain is determined by its weakest link, it becomes necessary to perform formal proofs for each phase of the development to achieve maximum benefit. This has great implications for the design methods that can be applied within a project. In most cases, fully automatic performance is yet not applicable, that is, close cooperation and interaction of the skilled designers are further required. At present, the main advantage of formal methods is that they enable to perform the design and verification processes with greater reliability.
392
A VERIFICATION AND VALIDATION MODEL FOR SOFTWARE SYSTEMS
Formal specification
Transformation and checking
Verification
1. Design phase
Transformation and checking
Verification
2. Design phase x x
x x
x x
Transformation and checking
Verification
Final design phase
Figure 4: Application process of formal methods Next, some concrete problems concerning the formal approach will be outlined. 1) In the area of practical applications of formal methods in software design there has been collected little experience so far. The major concern is computational complexity which is very difficult to be determined in advance. In conjunction with complexity, it can be expected that some algorithmic computations will belong to the class of NP-complete problems. As known, NP-complete problems have a computational complexity for which there exists no upper bound by a finite-degree polynomial of the problem size. It means actually that the number of the computational steps is finite, but unpredictable. 2) The total process of proving safety for safety-critical systems, i. e., the total validation process cannot be automated in principle. This is because in this case the testing has always to have elements that fall outside the system specification, i. e., these complementary elements are independent of the specification. The basic reason is that safety problems originated from incomplete specification can be re-
393
SZIRAY vealed this way only. Of course, this statement applies not only to classical methods, but also to formal methods. 3) At present, there are no exact formal specification methods available which could take into account the principle of safety itself. In other words, formal specification methods for safety purposes have not yet been elaborated. The present situation and the ever-increasing demand imply that further considerable research and development efforts are to be invested in order to make formal methods more efficient in practice. Just to mention a few tentative problems that need to be solved: To formalize the safety level that has to be achieved in the design process. To determine the safety of a fault-tolerant system solution in a quantitative manner. To establish a direct connection between a fault-tolerant structure and the formal design.
5 Conclusion In this paper a general model for software testing has been proposed. The model is based on a mapping scheme which involves input and output domains, as well as domains of various test and fault conditions. The final goal within the outlined principle has been to clearly differentiate the tests for verification and validation, which is useful especially in the case of safety-critical systems. As we have seen, the established model is also applicable to software development based on the use of formal methods. Finally, as known, the hardware component of the information systems also requires a strict and precise development and manufacturing technology. This guiding principle applies most of all to safety-critical systems where hardware-software co-design is a widely used approach [3], [5]. The safe and reliable operation of a hardware system also requires verification and validation, both in the design and the manufacturing cycles [16]. As far as the above presented test model is concerned, it is easy to see that it can be extended to treating hardware systems as well.
References [1] I. Sommerville. Software Engineering, Sixth Edition, Addison-Wesley Publishing Company, Inc., USA, 2001. [2] R. S. Pressman. Software Engineering, Fifth Edition, McGraw-Hill Book Company, USA, 2001. [3] N. Storey. Safety-Critical Computer Systems, Addison-Wesley-Longman, Inc., New York, 1996. [4] M. V. Zelkowitz. Role of Verification in the Software Specification Process, Advances in Computers (Editor: Marshall C. Yovits), Vol. 36, pp. 43-109, Academic Press, Inc., San Diego, 1993. [5] J.-M. Bergé, O. Levia, J. Rouillard. Hardware/Software Co-Design and Co-Verification, Kluwer Academic Publishers, Dordrecht, The Netherlands, 1997.
394
A VERIFICATION AND VALIDATION MODEL FOR SOFTWARE SYSTEMS [6] N. Halbwachs, Doron Peled (Editors). Computer Aided Verification, Lecture Notes in Computer Science, Vol. 1633, Springer-Verlag, Berlin, 1999. [7] J. Sziray, B. Benyó, I. Majzik, A. Pataricza, J. Góth, L. Kalotai, T. Heckenast. Quality Assurance and Verification of Software Systems, (In Hungarian), Széchenyi College, Budapest Technical University, University of Veszprém, 2000. [8] N. G. Leveson. Safeware: System Safety and Computers, Addison-Wesley Publishing Company Inc., USA, 1995. [9] D.j K. Pradhan. Fault-Tolerant Computer System Design, Prentice-Hall, Inc., USA, 1996. [10] G. J. Myers. The Art of Software Testing, John Wiley & Sons, Inc., New York, 1979. [11] C. Kaner, J. Falk, H. Quoc Nguyen. Testing Computer Software, Van Nostrand Reinhold, Inc., New York, 1993. [12] B. Beizer. Black-Box Testing, Techniques for Functional Testing of Software and Systems, John Wiley & Sons, Inc., New York, 1995. [13] P. Várady, B. Benyó. A Systematic Method for the Behavioural Test and Analysis of Embedded Systems, IEEE International Conference on Intelligent Engineering Systems, Proceedings, pp.177-180, Portoroz, Slovenia, September 17-19, 2000. [14] M. J. C. Gordon. Programming Language Theory and its Implementation, Prentice Hall International Ltd, Great Britain, 1988. [15] C. Heitmeyer, D. Mandrioli (Editors). Formal Methods for Real-Time Computing, John Wiley & Sons, Inc., New York, 1996. [16] B. Benyó, J. Sziray. The Use of VHDL Models for Design Verification, IEEE European Test Workshop, Proceedings, pp. 289-290, Cascais, Portugal, May 23-26, 2000. [17] M. Fowler, K. Scott. UML Distilled: Applying the Standard Object Modeling Language, Addison-Wesley-Longman, Inc., USA, 1997. [18] M. Priestley. Practical Object-Oriented Design with UML, McGraw-Hill Publishing Company, Great Britain, 2000. [19] C. Szász, J. Sziray. Run-Time Verification of UML State-Chart Implementations, IEEE International Conference on Intelligent Engineering Systems, Proceedings, pp.355-358, Portoroz, Slovenia, September 17-19, 2000. [20] Z. Pap, I. Majzik, A. Pataricza, A. Szegi. Completeness Analysis of UML Statechart Specifications, IEEE Design and Diagnostics of Electronic Circuits and Systems Workshop, Proceedings, pp.83-90, GyĘr, Hungary, April 18-20, 2001. [21] E. J. Braude. Software Engineering, An Object-Oriented Perspective, John Wiley & Sons, Inc., New York, 2001.
About the Author József Sziray received the Diploma of Electronic Engineering (MS degree) and the PhD degree from the Technical University of Budapest. His main areas of research are computer-aided test design for digital systems, software engineering, software quality assurance, as well as verification and validation of software.
395
396
Modelling Communication Requirements and Network Services in Distributed Systems with UML Antun Brumnic Faculty of Organization and Informatics Varazdin University of Zagreb, Croatia [email protected] Abstract — In order to design properly a communication system, requirements about what is expected from it must be specified. Till now little attention has been paid to formal or semiformal languages that could describe communication requirements in distributed systems from the user and the network designer point of view. Many methods that use modelling techniques to resolve complex problems of software design and implementation may be used to help design information system software. Analogy with this approach is explored and some results are described in this article. A communication model for communication network design is proposed and some of its characteristics are describe. UML – as a standard, well documented and in widespread use among the users and designers of application (software) component of information systems – was chosen for model description. Preliminary results indicate its adequacy for modelling logical view and physical view of the distributed system. Introduction of a general model of a network, as a mean for speed up the network design process is also proposed, and its structure and usefulness by some illustrative examples sketched.
1 Introduction Communication systems play important role in everyday life, in business, technical, information and many other systems. They must be designed, constructed, maintained, analysed, improved. To design properly a communication system, the requirements of what is expected from it must be specified. The user of a system and its designer use different languages when describing the same system, what often results in misunderstanding and inadequately realized system. In order to resolve complex communication requirements and problems, it is essential to make a simplified view of reality – a model of communication. It enables one to eliminate irrelevant details and focus on one or more important aspects at a time. Formal or semiformal languages may describe models. Today there are many formal languages that describe communication systems very well on the technical level (LOTOS, SDL, ESTELLE) [1] [2]. They are used to describe communication processes and protocols and to analyse their properties, but not for network design. Till now little attention has been paid to formal or semiformal languages that could:
397
BRUMNIC Describe communication requirements in distributed systems from the user and the network designer point of view, Could capture and define requirements so that all stakeholders (analyst, designers, customers, managers, users, operators) may understand and agree on them, Could be used to design the system and to explore multiple solutions economically. Many methods that use modelling techniques to resolve complex problems of software design and implementation may be used to help design information system software. In analogy with this approach a communication model for communication network design is proposed. For its description Unified Modelling Language (UML) is used. The generalization of this model may lead to better understanding of the design process and may speed up it. A proposal for the introduction of a general model of network is sketched in forth section.
2 Introducing Communication Model for Network Design A communication model for network design is an abstraction of how communication system operates. Its details differ according to the perspective of the person that creates the model. The evolving models also help the developers of communication systems to structure and focus their thinking. Working with the models increases the understanding of communication systems and creates new opportunities for improving them. A communication model for network design is illustrated with a number of different views. A view is «a projection of a model, which is seen from one perspective or vantage point and omits entities that are not relevant to this perspective» [3]. Each view consists of a number of diagrams. Each diagram shows a specific part of the communication structure or a specific communication situation. A diagram can show a structure (e.g. the organization of the communication system) or some dynamic collaboration (a number of objects and their interaction to demonstrate a specific process). The diagrams contain and express the objects, processes, rules, goals, and visions defined in the communication situation. In a communication system there are physical things such as nodes, lines, buffers, processors, and abstract "things" such as links, messages, services. In a model we represent them with the objects. We have also the functions that use objects to affect or produce other objects. We call them processes. A communication model for network design is laid out using modelling language. For defining application requirements (for software design and implementation) many languages were developed and successfully used. To bridge the gap between the user who specifies his communication requirements, and a system analyst or designer, who must realize them, the unique language, understandable to both sides, should be used. One of the most widely used semiformal languages is the Unified Modelling Language. It was chosen for communication model description, because it is a standard, well documented and in widespread use among the users and designers of application (software) component of information systems. A detailed description of UML is done in [3]. The UML consists of nine different diagram types, and each diagram shows a specific static or dynamic aspect of a system. For more advanced modeller are available very
398
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML powerful constructs, such as stereotypes or powertypes [4]. These diagrams capture the three important aspects of systems: structure, behaviour, and functionality. The research is currently under way to determine whether using UML to describe and define communication requirements in distributed systems and modelling communication network can be appropriate. Some preliminary results indicate its adequacy for modelling logical view and physical view of the distributed system [5].
3 How to use UML in Describing Communication Requirements (An Example) Several development processes that use UML advocate that the system development should start with use-case modelling to define the functional requirements on the system. For communication modelling used for network design such approach will be appropriate. The use-case diagram is the basis for other diagrams that describe the properties and the behaviour of the system from different views more precisely. When designing network following steps must be followed: Get its functional requirements, Confirm that the functional requirements are well understood, and Give the solution(s) (i.e. design a network). Each use case in the use-case diagram describes a part of the total system functionality. It is usually defined in plain text On the ground of functional requirements the communication analyst will model a usercentred logical view of communication network. This model is the basis for mutually understanding of communication requirements. A physical view, which is implementation centred, is derived from a logical view. Both views (logical and physical) exist also in a software (application) development oriented method. The difference is in the context: in a software development environment both views will define requirements necessary to produce software, and in a communication-oriented environment they will be oriented towards definition of communication requirements. Class diagrams and object diagrams are appropriate means to express logical views and physical views of the communication in distributed systems. The classes and objects defined in a logical view result from requested functionality of the required system and are connected with the description of the system that is shown in use-case diagram. Some classes and objects in a physical view are obtained from classes and objects in a logical view by processes. For example a process of transfer (or delivery) creates a message (an object in a physical view) from a transaction (an object in a logical view), and a process of association an address (or a location) to a service object (an object in logical view), creates a service point object (or point of service object) (an object in a physical view). The use of UML for description of communication requirements in distributed systems will be illustrated in modelling a simple network of terminals that enable their users to get cash or use money to pay bills or to transfer money from one account to the other ac-
399
BRUMNIC counts using plastic cards (credit and debit cards). We will call that network Money Access Network (MAN). The use case is described in Appendix and in [6]. The purpose of the diagrams of the business example that is described in Appendix is not to illustrate UML syntax, but to demonstrate how UML may be used to describe communication requirements in a distributed system. They are made in a very simplified manner without strict obeyed UML syntax rules. Use-Case diagram is shown in Figure 1. It defines the business view (the user view) and shows functional requirements for the money access network (MAN). There are two types of the users (actors) of the system: a card user and a supervisor.
Pay Goods
Withdraw Cash
Transfer Money
Dispose with Money
Monitor System
SUPERVISOR
Get Accounts Balance
Monitor Devices
CARD USER
Monitor Network
Change PIN Monitor Amount of Money
Figure 1: Use–Case Diagram (Business View) Figure 2 expresses the structure of the system (classes and relationships) from a logical view. There is a difference between a logical model for application design and a logical model for network design. In a displayed class diagram (Figure 2) a class important for network design is a class Transaction.
400
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML
CARD
ID ENTITY
PIN
ACCOUNT
SERVICE
TRANSACTION
DISPOSE WITH MONEY
GET ACCOUNTS BALANCE
CHANGE PIN
Figure 2: Class Diagram (Logical View)
SERVICE POINT
MESSAGE
NETWORK
NODE
LINK
PROTOCOL
Figure 3: Class Diagram (Physical View)
401
BRUMNIC Figure 3 displays a class diagram of the described system in a physical view. The main classes are: Service Point (derived by the process of association the location to the entity Service), Message (obtained by the process of transfer of the Transaction) and Network (entity which with its components: nodes, links and protocols enables transfer of Transactions). A card user gets services via transactions. A supervisor is also serviced by some kind of transactions (if we name a transaction a call – response sequence). Transaction is a class in a logical view. Class properties are described by attributes. The attributes of transaction are: type of transaction (connected with a type of service), response time, type of security (for example secrecy, integrity, non repudiation) and reliability. The values of them should be agreed between the user and the network designer. Figure 4 displays a class Transaction with its attributes.
MESSAGE TRANSACTION Attributes: Type of Message Delivery Time Latency Rate Length Residual Bit Error Rate Security Mechanism Price of Delivery
Attributes (class properties): Type of Transaction Response Time Type of Security Reliability
Operation: Access to the Service
Operation: Transaction Transfer
Figure 4: Class Transaction
Figure 5: Class Message
Operation connected with a transaction is an access to a service. A process of delivery creates from a transaction class (logical view) a message class (physical view). Attributes of a message are length, rate, delivery time, correctness level, security type and security level, and price of delivery. Operation connected with a message is a transfer of a transaction.
402
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML
TYPE OF TRANSACTION Cash Withdrawal Enquiry PIN Change
TYPE OF SECURITY Secrecy Integrity Non Repudiation
RESPONSE TIME T1: 1 to 3 sec T2: 10 to 30 sec T3: 5 min
RELIABILITY High Medium Low
Table1: Example of Values of Attributes of Class Transaction
Figure 5 displays a class Message with its attributes. Most of message attributes are derived from transaction attributes. Message attributes determine security mechanisms, error control mechanisms, flow control mechanisms, link throughput (capacity), network configuration and other communication parameters. On a lower level security mechanisms will be realized by security services of security devices, flow control mechanisms and error control mechanisms by protocols, and protocols by pieces of software and hardware, capacity will be realized by a bandwidth of analog lines or communication services of digital lines. Message attributes for different communication services may be different. For example, a message as an object (instance of class) of a real time communication service (transfer of voice or live picture) will have as an attribute latency, which a message in the presented example does not have. It will require on a lower level of abstraction a type of delivery service with timing relationship and connection oriented type of delivery, what may be realized on the lowest physical level (implementation level) by an ATM (asynchronous transfer mode) network. The constructs on the lower level are derived from the values of constructs on the higher level. In that way, connecting higher abstraction levels with the lower, it could be possible to establish the generalized model of the network with a set of defined communication services on the highest abstraction level, oriented towards end users with predefined links to lower levels, where low level communication services, facilities and devices are available. Such model could be used to speed up the network design.
403
BRUMNIC
TYPE OF MESSAGE
DELIVERY TIME
Service Message (state of device, state of nw, available cash...)
T1= 0,1 sec
Application Message (cash withdrawal, inquiry, PIN change)
T2= 1 sec T3= 1 min
Information Message (promotion of banking services, advertising)
LATENCY
RESIDUAL BIT ERROR RATE 0 Low (10-14) Medium (10-6) High (10-3)
Low (0,1 ms) Medium (1 ms) High (> 1 ms)
RATE
LENGTH
1 message per minute 6 message per hour 12 messages per day
20 bytes 100 bytes 10 Kbytes
SECURITY MECHANISM
PRICE OF DELIVERY
Encryption Digital Signature
0,1 cent per message 1 cent per message
Table 2: Example of Values of Attributes of Class Message (Figure 5)
4 A Proposal for the Introduction a General Model of Network In the beginning of computer networking age the providers of telecommunication services offered only services of the first (physical) layer of the Open Systems Interconnection Reference Model [7] [8] (ISO/OSI model): permanent baseband and broadband channels and permanent or switched voiceband and telegraph channels. Users’ requirements were simple: the network should connect a number of locations and enable file transfers, inquiries and transaction collection or processing within prescribed time limits (response time). In specific cases there were also some security requirements. The task of the network designer was to define the topology of the network and the type of nodes, to calculate the capacity of links and the throughput of the nodes and eventually to propose communication protocols and encryption devices. Today network services providers and network equipment producers offer much more, and a network designer can chose different kinds of services on all layers of ISO/OSI
404
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML model. A big part of network design process may often be: association (mapping) of network services to the users' requirements.
Description 1st transformation process Business View (specific)
Business View (general) 2nd transformation process
Business View (general)
Logical View 3rd transformation process
Logical View ….. …..
Physical View Nth transformation process Implementation
Implementation
Figure 6: Connections between higher and lower Levels of Abstraction The process of users' requirements definition as well as mapping users' requirements to different kinds of network services - i.e. the network design - can be greatly simplified, if we have on one side a list of all possible user requirements, on the other side a list of all network services which could solve users' requirements, and functional dependency (simple or multiple) between users' requirements and their solutions - i.e. a general model of network. Phrase general means that all aspects (views) of network, necessary for the network design, are included. In each view the model may be represented with different levels of abstraction. The connections between different views (different levels of abstraction) are sketched in Figure 6. Standardization and classification of objects and their attributes, as well as values of attributes are necessary for building a consistent and usable model. As a description language UML will be appropriate as a standard and widely accepted mean of communication between computer professionals. The presentation of the realization of the user's request for information or processing (defined in the business view) in a logical view we can call application. In this sense an application can be a banking transaction, like cash withdrawal, but can also be an inquiry or PIN change in the previously described example, or a request for a web page, or file transfer, or sending or receiving an e-mail. An illustration of the class Application with the list of its attributes is done in Figure 7. Examples of attribute values are in Table 3. Network services are illustrated with their class and class attributes in Figure 8. In Table 4 is presented an example of some values of attributes of the class Network Services.
405
BRUMNIC The presented values of the attribute Type of Service are related to ATM network, which we will use in our next illustrative example.
APPLICATION
Attributes: Type of Application Data Loss Sensitive Type of Capacity (Bandwidth) Time Sensitive Response Time Security Availability Data Volume (Rate) Price of the Service
Operation: Access to the Service
Figure 7: Class Application with Attributes The attributes and their values on the lower level of abstraction are derived from the attributes and their values on the higher levels of abstraction. For example, the attributes of the class Link (Figure 9) are functionally dependent on the attributes of the class Message (Figure 5): Capacity and Flow Control depend on Delivery Time, Rate, Latency, Error Control depends on a tolerable Residual Bit Error Rate, Security Control depends on Security, tolerable Residual Bit Error Rate and tolerable Price of Delivery, and so on. The connections may be simple or multiple. During the model establishment all functional connections between the higher and lower levels of abstraction should be considered, so that after their explicit definition, the user of the model (the designer) could quickly proceed from the user’s request defined in a logical view to the lowest level of abstraction of the physical view (implementation).
406
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML
TIME SENSITIVE
TYPE OF APPLICATION 1. Inquiry 2. Transaction processing 3. Remote terminal access 4. Remote file server 5. Instant messaging 6. Real time audio 7. Real time video 8. Stored audio 9. Stored video 10. Internet telephony 11. File transfer 12. Web documents 13. E-mail 14. Videoconferencing 15. Interactive games 16. Streaming multimedia 17. ….
1. 2. 3. 4. 5.
No Yes: 20 ms Yes: 100 ms Yes: ….. Yes:….
DATA LOSS SENSITIVE 1. No 2. Yes
TYPE OF CAPACITY (BANDWIDTH) 1. Elastic 2. Fixed
RESPONSE TIME 1. Very low (N1 ms) 2. Low (N2 sec) 3. Medium (N3 min) 4. High (N4 hours)
AVAILABILITY 1. Very high (> 99,99 %) 2. High (> 99,9 %) 3. Medium (> 99 %) 4. Low (> 90%)
SECURITY 1. Type of security 2. Security level
DATA RATE 1. Very high (N1 Mbps) 2. …………. 3. ………….
PRICE OF THE SERVICE -------------------------------------------------------------------
-------------------------------------------------------------------
Table 3: Example of Values of Attributes of Class Application
407
BRUMNIC
LINK
NETWORK SERVICE Attributes: Type of Service Transit Delay Level of Protection Cost Limit Priority Expected Residual Error Probability Specified Route
Attributes: Type of Link Capacity (Bandwidth) Flow Control Error Control Security Control -------------
Operation:
Operation:
End-to-end message delivery
Data transfer
Figure 8: Class Network Service
Figure 9: Class Link
During the model establishment phase, one must be aware, that values of attributes of the classes may be related. For example, if the Type of Application attribute has the value “Internet telephony” (see Table 3), then the value of the Data Loss Sensitive attribute will have the value “no”, the value of the Time Sensitive attribute will have the value “yes: 20 ms” and so on.
QUALITY OF SERVICE
TYPE OF SERVICE 1. 2. 3. 4.
1. 2. 3. 4. 5.
Constant bit rate Variable bit rate Available bit rate Unspecified bit rate
Transit delay Priority Residual error probability Specific route Cost of the call
Table 4: Example of some Values of Attributes of Class Network Services Due to the shortage of space we will illustrate the use of a general network model for network design on one very simple example. The management of a worldwide enterprise would like to have virtual meetings realized by a network (user request – business view). Type of Application will be videoconferencing between many persons (item 14 in Table 3) (logical view). On the lower level of abstraction videoconferencing will be the class with its attributes, and attributes’ values, which will point out (by functional relations) to the constant bit rate type of network service, and low transit delay, high priority and me-
408
MODELLING COMMUNICATION REQUIREMENTS AND SERVICES WITH UML dium residual error probability. The later will point out to the ATM or ISDN network as a possible solution (ISDN for connection between two persons, and ATM network for connection between many persons). (Transit delay, priority and residual error probability are values of the class Quality of Service. On the lower level of abstraction they will be classes with their attributes and attributes' values, which will point out to possible solutions on the implementation level.) The establishment of a general model of a network will require definition of: 1. The types of users’ requirements and their properties, 2. The types of network services and their properties, 3. The functional dependencies between higher and lower levels of abstraction, 4. The functional dependencies between entities on the same abstraction level. The maintenance of the model would require permanent updates with new users’ requirements and new network services. The establishment of the model will not solve all problems of network design, but could help in better understanding between the user and the network designer, could speed up the network design and partially help to automate it. 5 Conclusions In communication network design a problem of understanding communication requirements may lead to an inadequately designed communication network. A communication model for a network design may be a tool to overcome this problem. The use of UML as a standard and established semiformal language for modelling the application oriented view of information systems may be appropriate for modelling the logical view and the physical view of the communication in a distributed system. Further research should go in next directions: 1. Generalization the logical view model and the physical view model for designing networks and finding functional links between classes, their attributes, and the values of the attributes (i.e. establishing general model of the network), what could help in automating some steps in network design, 2. Exploration of the UML adequacy for the description of communication protocols, 3. Necessary extensions of UML for its using in modelling all important aspects of communications and communication systems in distributed systems. The maintenance of the model would require permanent updates with new users’ requirements and new network services. 6 Appendix - Description of the Use Case: Money Access Network The money access network is composed of service points with service machines for card users: self-service automated teller machines (ATM's), POS terminals, front office banking terminals and home computers. The primary function of ATM's is cash dispensing, of POS terminals paying bills for goods and services and for front office banking terminals processing different kinds of financial transactions. Home computers are used for many different jobs, and in MAN they can be used as self-service banking terminals (home banking). All devices (service points) can allow the user of the system:
409
BRUMNIC To dispose with the money (to get cash on ATM or to pay bills or transfer money between accounts on all types of service devices), To retrieve information on the account balance, and To change PIN (personal identification number - identifies the user). The service machines, which can be installed all over the world, are connected through the communication system (network) to the one or more authorization centres. Authorization centre is a central service point for one or more card issuers (banks) whose main role is to process all requests coming from peripheral service points (service machines). It verifies identity of a card user, who requests service, checking his (her) PIN and data records on cards, authorize his (her) requests and realize some of them (some requests will be realized on peripheral service points, and some on central – but all of them must be authorized by the central service point). The central service point monitors the peripheral service points and the network, and informs principal supervisor on their status and possible problems. An authorization centre can serve users of one bank (or credit card company) or a group of banks. Central points of different banks or bank groups are connected together through the networks of specialized card companies such as VISA, Europay, American Express and others so that they can allow the services also outside their networks (all over the world). The MAN system, especially its network, must be reliable, secure, error free. Its users must get required service in a short time (the response time must be low). When the transaction travels through networks, its latency must not be to long: the time out mechanism in the service device will disable execution of transactions with long latency. The importance of transaction messages is very high, and they must arrive to the destination in short time, must not be lost, must be error free, must not be corrupted by invaders, and a part of their content must be hidden to potential invaders. The requirements on the systems messages that are used for system monitoring are much weaker: if some of them are corrupted or even lost, nothing important will happen.
References [1] K. J. Turner, editor. Formal Description Techniques. North-Holland, Amsterdam, 2000. [2] J. Odell, et al. Representing Agent Interaction Protocols in UML. In Proceedings of the Fourth International Conference on Autonomous Agents (Agents 2000). Barcelona, Spain, 2000. [3] J. Rumbaugh, et al. Modeling Language Reference Manual. Addison-Wesley, 1999. [4] H. E. Eriksson and M. Penker. Business patterns at work. John Wiley and Sons, New York, 2000. [5] A. Brumnic, Using UML in Describing Communication Requirements in Distributed Systems. In Proceedings of the 2002 International IEEE Conference on Inteligent Engineering Systems, pages 557-561. FOI, Varazdin, Croatia, 2002. [6] On-Line ATM Network Guide, Europay International, Bruxelles, Belgium, 1993. [7] ISO 7498: Information Processing Systems - Open Systems Interconnection - Basic Reference Model. International Standardisation Organisation (ISO), Geneva, 1984. [8] F. Halsall. Data Communications, Computer Networks and Open Systems, Addison-Wesley, 4th edition, Harlow, England, 1997.
410
Analysis of Systems with Backlash and Impacts through the Describing Function Ramiro S. Barbosa and J. A. Tenreiro Machado Institute of Engineering, Polytechnic Institute of Porto, Porto, Portugal {rbarbosa,jtm}@dee.isep.ipp.pt
Abstract — This paper analyses the dynamical properties of systems with backlash and impact phenomena based on the describing function method. The dynamics is illustrated using the Nyquist and Bode plots and the results are compared with those of standard models.
1 Introduction The area of Fractional Calculus (FC) deals with the operators of integration and differentiation to an arbitrary (including noninteger) order and is as old as the theory of classical differential calculus. The theory of FC is a well-adapted tool to the modelling of many physical phenomena, allowing the description to take into account some peculiarities that classical integer-order models simply neglect. For this reason, the first studies and applications involving FC had been developed in the domain of fundamental sciences, namely in physics [5] and chemistry [23]. Besides the intensive research carried out in the area of pure and applied mathematics [1−5], FC has found applications in various fields such as viscoelasticity/damping [6−12], chaos/fractals [13−16], biology [17], signal processing [18], system identification [19], diffusion and wave propagation [20−21], electromagnetism [22] and automatic control [24−29]. Nevertheless, in spite of the work that has been done in the area, the application of these concepts has been scarce until recently. In the last years, the advances in the theory of fractals and chaos revealed subtle relationships with FC, motivating a renewed interest in this field. The phenomenon of vibration with impacts occurs in many branches of technology where it plays a very useful role. On the other hand, its occurrence is often undesirable, because it causes additional dynamic loads, as well as faulty operation of machines and devices. Despite many investigations that have been carried out so far, this phenomenon is not yet fully understood, mainly due to the considerable randomness and diversity of reasons underlying the energy dissipation involving the dynamic effects [32−38]. In this paper we investigate the dynamics of systems that contain backlash and impacts. Bearing these ideas in mind, the article is organized as follows. Section 2 introduces the fundamental aspects of the describing function method. Section 3 studies the describing function of systems with backlash and impact phenomena. Finally, section 4 draws the main conclusions and addresses perspectives towards future developments.
411
BARBOSA, MACHADO
2 Describing Function Analysis The describing function (DF) is one of the possible methods that can be adopted for the analysis of nonlinear systems [31]. The basic idea is to apply a sinusoidal signal in the input of the nonlinear element and to consider only the fundamental component of the signal appearing at the output of the nonlinear system. Then, the ratio of the corresponding phasors (output/input) of the two sinusoidal signals represents the DF of the nonlinear element. The use of this concept allows the adaptation of the Nyquist stability test to a nonlinear system detection of a limit cycle, namely the prediction of its approximate amplitude and frequency. In this line of thought, we consider the controlloop with one nonlinear element N and a linear system G(s) depicted in Fig. 1. We start by applying a sinusoid x(t) = X sin(ωt) to the nonlinearity input. At steadystate the output of the nonlinear characteristic, y(t), is periodic and, in general, it is nonsinusoidal. If we assume that the nonlinearity is symmetric with respect to the variation around zero, the Fourier series becomes:
y (t ) =
∞
¦Yk cos(kωt + φk )
(1)
k =1
where Yk and φk are the amplidude and the phase shift of the kth-harmonic component of the output y(t), respectively. In the DF analysis, we assume that only the fundamental harmonic component of y(t), Y1, is significant. Such assumption is often valid since the higher-harmonics in y(t), Yk for k = 2, 3, …, are usually of smaller amplitude than the amplitude of the fundamental component Y1. Moreover, most systems are “low-pass filters” with the result that the higherharmonics are further attenuated. Thus the DF of a nonlinear element, N(X,ω), is defined as the complex ratio of the fundamental harmonic component of output y(t) with the input x(t): Y (2) N ( X , ω) = 1 e jφ1 X where X is the amplitude of the input sinusoid x(t) and Y1 and φ1 are the amplitude and the phase shift of the fundamental harmonic component of the output y(t), respectively. In general, N(X,ω) is a function of both the amplitude X and the frequency ω of the input sinusoid. For nonlinear systems that do not involve energy storage, the DF is merely amplitude-dependent, that is N = N(X). If it is not the case, we may have to adopt a numerical approach because, usually, it is impossible to find a closed-form solution.
Nonlinearity r(t) = 0 + −
x(t)
N
Linear system y(t)
G(s)
z(t)
Figure 1: Basic nonlinear feedback system for describing function analysis
412
ANALYSIS OF SYSTEMS WITH BACKLASH AND IMPACTS... For the nonlinear control system of Figure 1, we have a limit cycle if the sinusoid at the nonlinearity input regenerates itself in the loop, that is: 1 (3) G ( jω) = − N ( X , ω) Note that (3) can be viewed as the characteristic equation of the nonlinear feedback system of Figure 1. If (3) can be satisfied for some value of X and ω, a limit cycle is predicted for the nonlinear system. Moreover, since (3) applies only if the nonlinear system is in a steady-state limit cycle, the DF analysis predicts only the presence or the absence of a limit cycle and cannot be applied to analysis for other types of time responses.
3 Analysis of Systems with Backlash and Impacts In this section, we use the DF method to analyse systems with backlash and impacts. We start by considering the standard static model and afterwards we study the case with the impact phenomena. Finally, we compare the results of the two types of approximations.
3.1 Static Backlash Here we consider the phenomena of clearance without the effect of the impacts, which is usually called static backlash. The describing function for X > h/2 is given by [30]: N(X ) =
kª 2kh( X − h / 2) § X / h ·º 1− Ns¨ ¸» − j « 2¬ © 1 − X / h ¹¼ πX 2
(4a)
N s ( z) =
2 ª −1 1 1 § −1 1 ·º sin + cos¨ sin ¸ z z z ¹»¼ 𠫬 ©
(4b)
The classical backlash model corresponds to the DF of a linear system of a single mass M1+M2 followed by the geometric backlash having as input and as output the position variables x(t) and y(t), respectively, as depicted in Figure 2. For a sinusoidal input force f(t) = F cos(ωt) the condition X = h/2 leads to the limit frequency ωL applicable to this system: 1
ª2 º2 F ωL = « » ¬ h (M 1 + M 2 ) ¼
(5)
Figure 3 shows the Nyquist plot of –1/N(F,ω) = –1/[G(jω)N(X)] for several values of the input force F. Linear system
Backlash y
f(t)
1 (M1 + M 2 )s 2
x(t)
slope k
-h/2 h/2
G(s)
N(X)
Figure 2: Classical backlash model
413
x
y(t)
BARBOSA, MACHADO 6000
ω
F=10
L
F=50 19
ω
5000
21
Im (-1/N)
4000
3000 16
18
20
2000 13
1000 9
16
12 14
8
18
16
0 0
500
1000
1500 Re(-1/N)
2000
2500
3000
Figure 3: Nyquist plot of −1/N(F,ω) for the system of Figure 2, F = {10, 20, 30, 40, 50} N, 0 < ω < ωL, M1 = M2 = 1 kg and h = 10−1 m This approach to the backlash study is based on the adoption of a geometric model that neglects the dynamic phenomena involved during the impact process. Due to this reason often real results differ significantly from those predicted by that model. 3.1 Dynamic Backlash In this section we use the DF method to analyse systems with backlash and impact phenomena, usually called dynamic backlash [33−34]. The proposed mechanical model consists on two masses (M1 and M2) subjected to backlash and impact phenomenon as shown in Figure 4. A collision between the masses M1 and M2 occurs when x1 = x2 or x2 = h+x1. In this case, we can compute the velocities of masses M1 and M2 after the impact ( x1′ and x 2′ ) by relating them to the previous values ( x1 and x 2 ) through Newton’s rule:
(x´′1 − x´′2 ) = −ε (x1 − x 2 ),
0 ≤ ε ≤1
(6)
where ε is the coefficient of restitution. In the case of a fully plastic (inelastic) collision ε = 0, while in the ideal elastic case ε = 1. x1 , x1
x 2 , x 2
f(t)
M2 M1 Side A
h
Side B
Figure 4: System with two masses subjected to dynamic backlash
414
ANALYSIS OF SYSTEMS WITH BACKLASH AND IMPACTS... By application of the principle of conservation of momentum M 1 x1′ + M 2 x 2′ = M 1 x1 + M 2 x 2 and of expression (6) we can find the sought velocities ( x1′ and x 2′ ) of both masses after an impact, given by: x1 (M 1 − εM 2 ) + x 2 (1 + ε)M 2 x1 (1 + ε)M 1 + x 2 (M 2 − εM 1 ) , x 2′ = M1 + M 2 M1 + M 2
x1′ =
(7)
For the system of Figure 4 we calculate numerically the Nyquist diagram of −1/N(F,ω) for an input force f(t) = F cos(ωt) applied to mass M2 and considering the output position x1(t) of mass M1. The values of the parameters adopted in the subsequent simulations are M1 = M2 = 1 kg and h = 10−1 m. Figures 5 and 6 show the Nyquist plots for F = 50 N and ε = {0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9} and for F = {10, 20, 30, 40, 50} N and ε = {0.2, 0.5, 0.8}. The Nyquist charts of Figures 5−6 reveal the occurrence of a jumping phenomenon, which is a characteristic of nonlinear systems. This phenomenon is more visible around ε ≈ 0.5, while for the limiting cases (ε → 0 and ε → 1) the singularity disappears. Moreover, shows also that for a fixed value of ε the charts are proportional to the input amplitude F. 3000
2500
ε =0.1
F=50
ε =0.2
2500 2000
ε =0.2
ω=35
1500 Im (-1/N)
Im (-1/N)
ε =0.3
1500
ω =40
F=40
ω=40
2000
ε =0.4 ε =0.5
ω=30
1000
ω =35
F=30
1000
ω =30
F=20
ε =0.6 ε =0.7
ω=25
500
0
ω =25
F=10
ε =0.9
ω=15
0 -500
500
ε =0.8
ω=20
ω =20 ω =15
ε→1
500
1000
1500
0
2000
0
100
200
300
400
Re(-1/N)
500 600 Re(-1/N)
700
800
900
1000 1100
Figure 5: Nyquist plot of −1/N(F,ω) for a system with dynamic backlash, for F = 50 N and ε = {0.1, .., 0.9} and F = {10, 20, 30, 40, 50} N and ε = 0.2 1200
400
F=50
ε =0.5
1000
F= 40 800
F=50
ε =0.8
350
300
F=40
ω = 40
F= 30
ω =35
Im (-1/N)
Im (-1/N)
250
600 ω = 30
F= 20 ω =25
ω =25
F=10
ω = 20
ω =20
50
ω =15
ω =15
0 0
ω =30
F=20
100
F=10
200
ω =35
F=30 200
150
400
ω =40
500
1000
1500
R e(-1/N)
0 0
200
400
600
800 1000 Re(-1/N)
1200
1400
1600
1800
Figure 6: Nyquist plot of −1/N(F,ω) for a system with dynamic backlash, for F = {10, 20, 30, 40, 50} N and ε = {0.5,0.8}
415
BARBOSA, MACHADO The validity of the proposed model is restricted to frequencies of the exciting input force f(t) higher than a lower-limit frequency ωC. On the other hand, there is also an upper-limit frequency ωL determined by application of Newton’s law to mass M2 and considering that the amplitude of the displacement is within the clearance h/2. In the middlerange frequency, ωC < ω < ωL, the jumping phenomena occurs at frequency ωJ. These frequencies are given by the following expressions: 1
1
1
2 ª§ º4 § F ·2 § F ·2 F · ¸¸ ¸¸ ⋅ (1 − ε)5 » , ω L = 2 ⋅ ¨¨ ¸¸ , ω J ~ ¨¨ ωc ≈ «¨¨ 2 «¬© M 2 ⋅ h ¹ »¼ © h ⋅ M2 ¹ © h⋅ M2 ¹
(8)
Figures 7 and 8 illustrate the variation of the Nyquist plots of −1/N(F,ω) for the cases of the static and dynamic backlash and shows the log-log plots of Re{−1/N} and Im{−1/N} versus ω for a coefficient of restitution ε = 0.5 and F = {10, 20, 30, 40, 50} N and for an input force F = 50 N and ε = {0.1, 0.3, 0.5, 0.7, 0.9}, respectively. 4
4
10
10
20
50 Static
3
40 50 40
10
F=10
Dynamic 1
F=10
Im (-1/N)
Re(-1/N)
Static
2
10
30 20
2
10
40 50
F=10
10
30 20
3
30
20
10
30
40
50 Dynamic
F=10 0
10
-1
10
1
10
-2
10 0
10 0 10
-3
1
10 ω (rad/s)
10
10
2
10
0
1
10
10
2
ω (rad/s)
Figure 7: Log-log plots of Re{−1/N} and Im{−1/N} versus the exciting frequency ω, for ε = 0.5 and F = {10, 20, 30, 40, 50} N 10
4
10
4
Static
Static 10
3
ε =0.7, 0.9 ε =0.5 ε =0.3
10
10
10
ε =0.1
1
10
10
Dynam ic 10
10
Dynam ic
1
0
-1
0
10
10
ε =0.1 ε =0.3 ε =0.5 ε =0.7 ε =0.9
2
2
Im (-1/N)
Re(-1/N)
10
3
-1
10
10 0
1
10 ω (rad/s)
10
2
-2
-3
10
0
10
1
10
2
ω (rad/s )
Figure 8: Log-log plots of Re{−1/N} and Im{−1/N} versus the exciting frequency ω, for F = 50 N and ε = {0.1, 0.3, 0.5, 0.7, 0.9}
416
ANALYSIS OF SYSTEMS WITH BACKLASH AND IMPACTS... Comparing the results for the static and the dynamic backlash models we conclude that: − The charts of Re{−1/N} are similar for low frequencies (where they reveal a slope of +40 dB/dec) but differ significantly for high frequencies. − The charts of Im{−1/N} are different in all range of frequencies. Moreover, for low frequencies, the dynamic backlash has a fractional slope inferior to +80 dB/dec of the static model. A careful analysis must be taken because it was not demonstrated that a DF fractional slope would imply a fractional-order model. In fact, in this study we adopt integer-order models for the system description but the fractional-order slope is due to continuous/discrete dynamic variation that results due to the mass collisions. Figure 9 presents the Fourier transform of the output displacement of mass M1, F{x1(t)}, namely the amplitude of the harmonic content of x1(t) for an input force f(t) = 50 cos(ωt), ωC < ω < ωL, and ε = {0.2, 0.8}. The charts reveal that the fundamental harmonic of the output has a much higher magnitude than the other higher-harmonic components. This fact enables the application of the describing function in the prediction of limit cycles for this system. Nevertheless, for high values of ε, there is a significant high-order harmonic content, and by consequence, a lower precision of the limit cycle prediction. Figures 10−14 show the time response of the output velocity x1 (t ) of a system with dynamic backlash for ω = {15, 20, 25, 35, 40} rad/s and ε = {0.2, 0.5, 0.8}. The charts reveal that we can have chaotic or periodic responses according with the values of ω and ε. A complementary perspective is revealed by Figure 15 that depicts the number of consecutive collisions on side A (or B), nA (or nB), versus the exciting frequency ω and the coefficient of restitution ε for an input force f(t) = 50 cos(ωt). From Figure 15 we can distinguish two kinds of regions. The first, for ωC < ω < ωJ, where the system is characterized by an irregular number of impacts and a chaotic dynamics. The second, for ωJ < ω < ωL, where the motion is characterized by a regular behaviour corresponding to one alternate collision on each side of M1. The conclusions are similar to those obtained from Figures 10−14. ε=0.2
ε=0.8
Log(|F(x (t))|)
0
1
1
Log(|F(x (t))|)
2 0
−5
−10
−2 −4 −6
40
−8 30
ω (rad/s)
50 20 10 0
0
1
2
3
4
5
6
7
8
9
10
40 ω (rad/s)
30 20
harmonic index k
10 0
0
1
2
3
4
5
6
7
8
9
10
harmonic index k
Figure 9: Fourier transform of the output displacement x1(t), F{x1(t)}, over 20 cycles, versus the exciting frequency ω and the harmonic index k, for ε = {0.2, 0.8}
417
BARBOSA, MACHADO ε =0 .5 2
1.5
1.5
1
1
0.5
0.5 dx /dt
0
0
1
1
dx /dt
Model not applicable. For ε = 0.2 it results a lower-limit frequency ωC = 23.9 rad/s.
ε =0 .8
2
-0.5
-0.5
-1
-1
-1.5
-1.5
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
Figure 10: Plot of the output velocity x1 (t ) for ω = 15 rad/s and ε = {0.2, 0.5, 0.8} ε =0 .8 2
1.5
1.5
1
1
0.5
0.5 dx /dt
0
0
1
1
Model not applicable. For ε = 0.2 it results a lower-limit frequency ωC = 23.9 rad/s.
dx /dt
ε =0.5 2
-0.5
-0.5
-1
-1
-1.5
-1.5
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
Figure 11: Plot of the output velocity x1 (t ) for ω = 20 rad/s and ε = {0.2, 0.5, 0.8} ε =0.5
ε =0.8 2
1.5
1.5
1.5
1
1
1
0.5
0.5
0.5
0
1
1
0
-0.5
dx /dt
2
dx /dt
1
dx /dt
ε =0 .2 2
-0.5
0
-0.5
-1
-1
-1
-1.5
-1.5
-1.5
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
Figure 12: Plot of the output velocity x1 (t ) for ω = 25 rad/s and ε = {0.2, 0.5, 0.8} ε =0.5
ε =0.8 2
1.5
1.5
1.5
1
1
1
0.5
0.5
0.5
0
1
1
0
-0.5
dx /dt
2
dx /dt
1
dx /dt
ε =0 .2 2
-0.5
0
-0.5
-1
-1
-1
-1.5
-1.5
-1.5
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
-2 1.65
2.05
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
Figure 13: Plot of the output velocity x1 (t ) for ω = 35 rad/s and ε = {0.2, 0.5, 0.8} ε =0.5
ε =0.8 2
1.5
1.5
1.5
1
1
1
0.5
0.5
0.5
0
1
1
0
-0.5
dx /dt
2
dx /dt
1
dx /dt
ε =0 .2 2
-0.5
0
-0.5
-1
-1
-1
-1.5
-1.5
-1.5
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
-2 1.65
1.7
1.75
1.8
1.85 1.9 time (s)
1.95
2
2.05
Figure 14: Plot of the output velocity x1 (t ) for ω = 40 rad/s and ε = {0.2, 0.5, 0.8}
418
ANALYSIS OF SYSTEMS WITH BACKLASH AND IMPACTS...
Figure 15: Number of consecutive collisions on side A (nA ) versus the exciting frequency ω and the coefficient of restitution ε, for an input force f(t) = 50 cos(ωt). For the side B (nB ) the chart is of the same type
4 Conclusions This paper addressed several aspects of the phenomena involved in systems with backlash and impacts. The dynamics of a two mass system was analysed through the describing function method and compared with standard models. The results revealed that these systems might lead to chaos and to fractional order dynamics. These conclusions encourage further studies of nonlinear systems in the perspective of the fractional calculus since integer order dynamical models are not capable to take into account many phenomena that occur.
References [1]
K. B. Oldham and J. Spanier. The Fractional Calculus. Academic Press, New York, 1974.
[2]
S. G. Samko, A. A. Kilbas and O. I. Marichev. Fractional Integrals and Derivatives. Gordon and Breach Science Publishers, Amsterdam, 1993.
[3]
K. S. Miller and B. Ross. An Introduction to the Fractional Calculus and Fractional Differential Equations. John Wiley & Sons, New York, 1993.
[4]
I. Podlubny. Fractional Differential Equations. Academic Press, San Diego, 1999.
[5]
R. Hilfer. Applications of Fractional Calculus in Physics. World Scientific, Singapore, 2000.
[6]
A. Gemant. A Method of Analyzing Experimental Results Obtained from Elasto-Viscous Bodies. Physics, 7: 311−317, 1936.
[7]
R. L. Bagley and P. J. Torvik. Fractional Calculus-A Different Approach to the Analysis of Viscoelastically Damped Structures. AIAA Journal, 21(5): 741−748, 1983.
419
BARBOSA, MACHADO [8]
L. Rogers. Operators and Fractional Derivatves for Viscoelastic Constitutive Equations. Journal of Rheology, 27(4): 351−372, 1983.
[9]
R. C. Koeller. Applications of Fractional Calculus to the Theory of Viscoelasticity. ASME Journal of Applied Mechanics, 51: 299−307, 1984.
[10] N. Makris and M. C. Constantinou. Fractional-Derivative Maxwell Model for Viscous Dampers. Journal of Structural Engineering, 117(9): 2708−2724, 1991. [11] L. Gaul and M. Schanz. Dynamics of Viscoelastic Solids Treated by Boundary Element Approaches in Time Domain. European Journal of Mechanics, A/Solids, 13(4) – suppl.: 43−59, 1994. [12] Åsa Fenander. Modal Synthesis when Modeling Damping by Use of Fractional Derivatives. AIAA Journal, 34(5): 1051−1058, 1996. [13] T. T. Hartley, C. F. Lorenzo and H. K. Qammer. Chaos in Fractional Order Chua’s System. IEEE Transactions on Circuits and Systems-I: Fundamental Theory and Applications, 42(8): 485−490, 1995. [14] B. Mandelbrot. The Fractal Geometry of Nature. W. H. Freeman and Company, New York, 1983. [15] A. Méhauté. Fractal Geometries: Theory and Applications. Penton Press, London, 1991. [16] Fernando B. Duarte and J. A. Tenreiro Machado. Chaotic Phenomena and Fractional-Order Dynamics in the Trajectory Control of Redundant Manipulators. Nonlinear Dynamics, 29(1−4): 315−342, July 2002. [17] T. J. Anastasio. The Fractional-Order Dynamics of Brainstem Vestibulo-oculomotor Neurons. Biological Cybernetics, 72: 69−79, 1994. [18] H. M. Ozaktas, Z. Zalevsky and M. A. Kutay. The Fractional Fourier Transform. John Wiley & Sons, Chichester, 2001. [19] B. Mathieu, L. Le Lay and A. Oustaloup. Identification of Non Integer Order Systems in the Time Domain. In Proceedings of the IEEE SMC/IMACS Symposium on Control, Optimization and Supervision, pages 952−956, Lille, France, 1996. [20] F. Mainardi. Fractional Relaxation-Oscillation and Fractional Diffusion-Wave Phenomena. Chaos, Solitons & Fractals, 7(9): 1461−1477, 1996. [21] R. Gorenflo and F. Mainardi. Random Walk Models for Space-Fractional Diffusion Processes. FCAA Fractional Calculus and Applied Analysis, 1(2): 167−191, 1998. [22] N. Engheta. On the Role of Fractional Calculus in Electromagnetic Theory. IEEE Antennas and Propagation Magazine, 39(4): 35−46, 1997. [23] A. Méhauté. From Dissipative and to Non-dissipative Processes in Fractal Geometry: The Janals. New Journal of Chemistry, 14(3): 207−215, 1990. [24] A. Oustaloup. La Commande CRONE: Commande Robuste d’Ordre Non Entier. Hermes, Paris, 1991. [25] J. A. Tenreiro Machado. Analysis and Design of Fractional-Order Digital Control Systems. SAMS Journal Systems Analysis, Modelling, Simulation, 27: 107−122, 1997. [26] J. A. Tenreiro Machado. Discrete-Time Fractional-Order Controllers. FCAA Fractional Calculus and Applied Analysis, 4(1): 47−66, 2001.
420
ANALYSIS OF SYSTEMS WITH BACKLASH AND IMPACTS... [27] B. M. Vinagre, I. Podlubny, A. Hernández and V. Feliu. Some Approximations of Fractional Order Operators Used in Control Theory and Applications. FCAA Fractional Calculus and Applied Analysis, 3(3): 231−248, 2000. [28] I. Podlubny. Fractional-Order Systems and PIλDμ-Controllers. IEEE Transactions on Automatic Control, 44(1): 208−213, 1999. [29] J. A. Tenreiro Machado, Ramiro S. Barbosa, and N. M. Fonseca Ferreira. Fractional-Order Position/Force Control of Mechanical Manipulators. In Proceedings of the CIFA’2002 Conférence Int. Francophone d'Automatique, pages 641−646, Nantes, France, July 2002. [30] C. L. Phillips and R. D. Harbor. Feedback Control Systems. Prentice-Hall, New Jersey, 2000. [31] J. E. Slotine and W. Li. Applied Nonlinear Control. Prentice-Hall, New Jersey, 1991. [32] M. Nordin and P. Gutman. Controlling Mechanical Systems with Backlash−a Survey. Automatica, 38: 1633−1649, 2002. [33] Ramiro S. Barbosa and J. A. Tenreiro Machado. Describing Function Analysis of Systems with Impacts and Backlash. Nonlinear Dynamics, 29(1−4): 235−250, July 2002. [34] A. Azenha and J. A. T. Machado. On the Describing Function Method and the Prediction of limit Cycles in Nonlinear Dynamical Systems. SAMS Journal of Systems analysis, Modelling and Simulation, 33: 307−320, 1998. [35] G. Tao and P. V. Kokotovic. Adaptive Control of Systems with Unknown Output Backlash. IEEE Transactions on Automatic Control, 40(2): 326−330, 1995. [36] Y. S. Choi and S. T. Noah. Periodic Response of a Link Coupling with Clearance. ASME Journal of Dynamic Systems, Measurement and Control, 111(2): 253−259, 1989. [37] S. Dubowsky, J. F. Deck and H. Costello. The Dynamic Modelling of Flexible Spatial Machine Systems with Clearance Connections. ASME Journal of Mechanisms, Transmissions and Automation in Design, 109(1): 87−94, 1987. [38] Y. Stepanenko and T. S. Sankar. Vibro-Impact Analysis of Control Systems with Mechanical Clearance and Its Application to Robotic Actuators. ASME Journal of Dynamic Systems, Measurement and Control, 108(1): 9−16, 1986.
About the Authors Ramiro S. Barbosa was born in January 7, 1971. He graduated in Electrical Engineering - Industrial Control from Institute of Engineering of Polytechnic Institute of Porto, Portugal, in 1994 and received the Master’s degree in Electrical and Computer Engineering from the Faculty of Engineering of the University of Porto, Portugal, in 2000. Presently he teaches at the Institute of Engineering of the Polytechnic Institute of Porto, Department of Electrical Engineering. His research interests include modelling, control, fractional-order systems, and nonlinear systems. J. A. Tenreiro Machado was born in October 6, 1957. He graduated and received the Ph.D. degree in electrical and computer engineering from the Faculty of Engineering of the University of Porto, Portugal, in 1980 and 1989, respectively. Presently he is Coordinator Professor at the Institute of Engineering of the Polytechnic Institute of Porto, Department of Electrical Engineering. His main research interests are robotics, modelling, control, genetic algorithms, fractional-order systems and intelligent transportation systems.
421
422
Mathematical Model of the Half Bridge Resonant Converter Zoltán Puklus Széchenyi István University GyĘr Hungary [email protected] Abstract - The paper shows the topology of the symmetrical half bridge resonant converter (HBRC) which has been developed in our laboratory. Typical wave forms, simulation and measuring results are also presented. Operation boundaries are analyzed using energy considerations as well. The mathematical model (transfer function) of HBRC was developed. The obtained results point out that the same transfer function can be used for both the continuous and the discontinuous conduction modes.
1 Introduction Symmetrical resonant buck, boost and buck-boost converters are known from [1, 2, 3, 4, 9]. Transformer isolated belonging to this converter family has recently been developed in laboratories [6, 7, 8, 10]. The paper shows the topology of the symmetrical half bridge resonant converter (HBRC) (Fig.1)
Figure 1: Half bridge resonant converter (with D3) The important advantage of the resonant topology is the fact, that the switch on time of the switching elements (transistors) is determined by the operation of the main circuit part of the converter and not by the control circuit. The main task of the control circuit is the alternative switching of the two switches in the primary side with a duty factor of ca. 50%. 423
PUKLUS It is typical for the circuit that a transformer having a turn ratio of N1/N2 is connected in series with the resonant L and C elements. The turn ratio of this transformer changes the natural resonant frequency of the original L-C resonant circuit, but in this case, the value of the output voltage is not influenced by the turn ratio. The constant power operation is also characteristic for the circuit at a given frequency, which means that the power transferred is independent of the load resistor R0. The results obtained involve that the same transfer function belongs to both the continuous, and the discontinuous conduction modes.
2 Circuit analysis The half bridge resonant converter (Fig. 1) contains two voltage supplies (V1=V2=Vi) and 2 controlled switching elements (T1 and T2) in the primary part, furthermore a transformer with one primary and 2 secondary windings (L1 and L2= L3 ) as well as 2 (or 3) output diodes D1, D2 (D3) and a current choke (L=L4). Capacitor C=C1 and current choke L determine the resonant frequency, however it is modified by transformer winding ratio.
3 Operation of the converter This type of converters has two operation modes: the discontinuous conduction mode (DCM) and the continuous conduction mode (CCM) depending on the currentless condition of the current choke L. 3.1 DCM operation Investigating the steady state condition it can be supposed that at the beginning of the switching period the capacitor C is charged on the voltage (-Vi ) and the current choke L has no energy. Switching on T1, a sinusoidal current will flow through the elements Vi -T1-Tr-D1L-Vo-Tr-C-Vi. Taking into consideration the turn ratio of the transformer (N1:N2), the maximum value of this current is: I p max
2Vi V 0 N1
N2
Z 0 L N1 N 2
(1)
where Ȧ0=(LC)-1/2 is the natural resonant angular frequency of the transformerless L-C circuit. The current increases the voltage of the capacitor C, then the capacitor charges to opposite polarity (+Vi ). The natural angular frequency of the sinusoidal current is as follows: Z 0tr
N2 Z 0 L 2 L1 Z 0 N1
the instantaneous primary current
424
(2)
MATHEMATICAL MODEL OF THE HALF BRIDGE RESONANT CONVERTER N1 N 2 sin § Z N 2 t · ¸ ¨ 0 N1 N1 ¹ © Z0L N2
2Vi V0 ip
(3)
the secondary current is
N1 ip N2
(4)
the instantaneous voltage of current choke L is vL
N1 · § N2 · N2 § t¸ ¨ 2Vi V0 ¸ cos¨ Z 0 N1 © N2¹ © N1 ¹
(5)
The process of charging to opposite polarity will finish at (t=tD), when the voltage of the capacitor C is equal to (+Vi ). When t = tD, then vC = Vi , vp = vsec = 0, vL= -V0 by using (5) we obtain V0
N2 § N1 · § N2 · tD ¸ ¨ 2Vi V0 ¸ cos¨ Z 0 N2¹ N1 ¹ N1 © ©
(5)
and N1 V0 N2 N1 2Vi V0 N2
N2 · § cos¨ Z 0 tD ¸ N1 ¹ ©
(6)
where cos D
V0 N2 V0 2 Vi N1
(7)
N2 tD N1
(8)
D Z0
The energy stored in the current choke L (W LI D2 / 2 ) dippers at the output. The current iL will decrease linearly, the slope is (-V0 /L). The current iL will commutate to the diode D1, D2 and D3 and the resonant process will be cut. The magnetizing current of the transformer flows through the diodes D1 and D2 to the output (via current choke L). The current iL decreasing linearly will reach zero before switching on the transistor T2. The circuit can operate without the diode D3, in this case the role of it is taken over by the diodes D1 and D2 in the ratio of 50 - 50%. It is normal that the diode D3 can not be used. In this cause get a practical half bridge resonant converter (Fig. 4) Using ultrafast rectifiers, the diode D3 will increase the efficiency by 1 or 1.5% based on our measurements (V1 = 20 - 30V, V0 = 2 - 5V). The current components (Fig. 3) of current choke L in Ts/2 period can be seen in Fig. 2 (two diode configuration).
425
PUKLUS
Figure 2: The currents of the L coil (DCM) In the second half period of the switching period Ts, the transistor T2 will be switched ON and the whole process will be repeated in the circuit containing the diode D2. 3.1.1 Energy considerations In the first half period of the switching period Ts, the voltage of the capacitor C changed from (-Vi) to (+Vi). This fact can be interpreted in such a way that the transferred amount of energy (energy parcel) to the output is: C 2Vi 2
2
W Ts i
2
2CVi 2
(9)
In the next half period the same amount of energy comes to the output, thus WiTs
4CVi 2
(10)
which shows, that the energy drawn by the converter does not depend on the value of the load resistor R0. Supposing constant output voltage V0 during the period Ts the output energy during the period Ts is as follows: W0Ts
Ts
V02 R0
1 V02 f s R0
(11)
Relation (10) show that the converter provides constant power at a given switching frequency and the output voltage can be determined using (10) and (11). V0
2Vi CR0 f s
(12)
4CVi 2 f s
(13)
The output power is P0
substituting (12) into (1) the maximum current will be I p max
2Vi § N1 · CR0 f s ¸ ¨1 N1 © N 2 ¹ Z0 L N2
426
(14)
MATHEMATICAL MODEL OF THE HALF BRIDGE RESONANT CONVERTER sinusoidal current will only be developed, when Ip max > 0 1!
N1 CR0 f s N2
(15)
i.e. energy transfer can only be developed, when the primary current ip exists, thus for R0,max R0,max
1 2
§ N1 · ¨ ¸ Cf s © N2¹
(16)
using (12) and (16) V0
2Vi
N2 N1
R0 R0,max
(17)
N2 N1
(18)
obtain V0 max
2Vi
if the parameters are R0 and fs we’ll obtain the V0-I0 characteristic of the converter (Fig. 3)
Figure 3: V0-I0 characteristic 3.2 CCM operation It has been proved that P=const. in DCM. Though in CCM the charge current of the capacitor C has two components (19), the transferred energy amount will be constant during a switching period. This holds true because the voltage change on the capacitor C will be the same in both cases (2 Vi). In CCM the primary current can be given by (19), where IL0 is the value of iL when the transistor turns ON. N1 V0 N 2 sin Z N 2 t I N1 cos Z N 2 t 0 L0 0 N1 N2 N1 N1 Z0 L N2
2Vi ip
Figure 5 shows the iL current and the iD2 current.
427
(19)
PUKLUS
Figure 4: Half bridge resonant converter
Figure 5: Current iL in CCM
4 Mathematical Model The injected-absorbed current method [11] will be used to the identification of the HBRC’s transfer function. For this we have to determine the average current which is injected to the output. The general case (DCM or CCM): In case of the lossless converter we can write WiTs
W0
V0 Q0
(20)
where Q0 is the output charge on the V0 output voltage. By using (10) it is true that Q0
4CVi 2 V0
I 0 Ts
(21)
where I0 is the average injected current in general case. It is
I0
4Cf s
Vi 2 V0
(22)
The partial differentiation of the injected current is GI 0
GI 0 GI GI Gv i 0 Gv 0 0 f s v Gv i Gf s
428
(23)
MATHEMATICAL MODEL OF THE HALF BRIDGE RESONANT CONVERTER V GI 0 8Cf s i V0 Gv i GI 0 V 2i 4Cf s 2 Gv 0 V0
GI 0 Gf s
(24) (25)
2
4C
Vi V0
(26)
The total differential of the injected current GI0 is then 2
GI 0
8Cf s
Vi V V 2i Gvi 4Cf s 2 Gv0 4C i Gf s V0 V0 V0
(27)
After taking the Laplace transform of (27), we obtain an equation for the injected current I0(s). The s model of the R0-C0 output is V0 ( s ) I 0 ( s)
R0 1 sR0 C 0
(28)
The complete transfer function model of HBRC is shown in Fig5.
Figure 5: The transfer function model of a HBRC (the same as in DCM and CCM) Fig. 6 illustrates the control block diagram for closed loop control of the converter (VFO - Variable Frequency Oscillator )
Figure 6: Converter with closed loop control
429
PUKLUS
5 Conclusions A lot of HBRC equations were determined. The possible modes of operation of the converter were identified. Boundary conditions for critical mode (R0,max) were found. The converter designed by the above mentioned procedure was built and tested. All timing information, currents and voltages can be read from the attached waveforms, and compared to simulated values. The designed and the measured parameters are rather close to each other. P=const. operation is also characteristic for the circuit at a given frequency which means that the power transferred is not depending on the value of resistor R0 . It has been pointed at that the transfer function model of the converter is identical in the DCM and CCM. The PSpice simulation and the laboratory measurements confirm the viability of this topology.
References >1@ Nagy I.: Resonant DC-DC Configurations. 3rd European conference on Power Electronics and Applications, 1989 pp.1495-1500. vol. III. Aachen, Germany
[2] Z. Puklus: The Resonant flyback converter -PEMC'98 8th International Power Electronics & Motion Control Conference 8-10 September 1998 Prague Proceedings volume Last minute papers pp. 2.229-2.234 and CD-ROM 2.229-2.234 >3@ Z. Puklus, L. Hodossy, P. Cs. Szilagyi: Contribution to the Development of a New Type of DC/DC Converters-IECON'97- The 23rd Annual International Conference of the IEEE Industrial Electronics Society, New Orleans, Louisiana USA November 9-14, 1997, Proceedings Volume 2 of 4 pp 581-586 >4@ Z. Puklus, L. Hodossy, P. Cs. Szilagyi,: Analysis and test results of double buck and buck/boost quasi-resonant converters-EPE'97-7th Europen Conference on Power Electronics and Applications 8-10 September 1997, Trondheim, Norway Proceedings volume 2 pp. 2.196-2.201 >5@ M. Kazmierczuk,D. Czarkowski: Resonant Power Converters, John Wiley & Sons Inc. New York 1995 >6@ Z. Puklus, P. Cs. Szilagyi L. Hodossy, L. Gyimesi : Resonant flyback converter, PECIM'98 Power Electronics,- Automation, Motion,- Drives & Control Power QualityInternational Conference-, May 26-28 1998, Nuremberg, Germany Proceedings volume 38 pp 495-500 >7@ Z. Puklus: The (quasi) Resonant flyback converter, IECON'98- The 24th Annual International Conference of the IEEE Industrial Electronics Society, Aachen, Germany August 31-Sept. 4, 1998 Proceedings volume 2 pp. 1066-1071 >8@ J. Hamar, I. Nagy: New Topologys of a Resonant Converter Family Electromotion’01 June 2001 Bologna, Italy >9@ Z. Puklus, P. Cs. Szilagyi, P. Korondi: Sliding Mode Controlled Dual-buck Resonant Converter- INES’2000 IEEE International Conference on Intelligent Engineering Systems, 17-19 September, 2000, Portoroz, Slovenia, Proceedings pp.345-349. >10@ Z. Puklus, L. Hodossy, Z. Szikál, T. Szaif: Synchronous Half Brige Resonant Converter. Proceedings of the 5th IEEE International Conference on Intelligent Engineering Systems (INES 2001), Helsinki, Finland, September 16-18, 2001, pp. 501-505, ISBN 952-15-0689-X >11@ A.S.Kislovski, R. Redl, N.O. Sokal: Dynamic Analysis of Switching-Mode DC/DC Converters Design Automation Inc. Lexington, MA, U.S.A. 1996
430
MATHEMATICAL MODEL OF THE HALF BRIDGE RESONANT CONVERTER
About the Author Zoltán Puklus received doctoral degree in technical sciences in 1998 from the Technical University of Cluj.Napoca in Romania. His research includes switch mode power supplies and its controls, motion control, and EC motor control.
Appendix: Laboratory and Pspice Results The half bridge resonant converter from fig 1 was built and its Pspice and laboratory results are as follows: Vo-Io With D3 Diode
Vi=40 V C=47nF L=210μH
20
100
18
70
50
40
16
30
14 Vo [V]
12
35 KHz
20
50 KHz
10
62,5 KHz 8
83,3 KHz
6
10
4 2 0 0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
Io [A]
(measurement) Vo-Io output characteristic
With & without D3 Diode 80 78
? [%]
76 74
With Diode
72
Without Diode
70 68 66 0
0,1
0,2
0,3
0,4
0,5
Io [A]
(measurement) Efficiency
431
0,6
PUKLUS
(measurement) A1 – D3 diode current; A2- D1 diode current
(Pspice) H1-D1+D2+D3=L current; H2-D1 current; H3-D3 current
(PSpice) E1– D3 diode current; E2- D1 diode current
432
UML Statechart-Based Verification and Testing of Embedded Systems Balázs Benyó Department of Informatics Széchenyi István University, GyĘr, Hungary [email protected]
Abstract This paper introduces the use of statechart models for the verification of the design and implementation process of embedded software systems. The proposed system verification process includes automated design verification and automated testing phases to encourage the development of fault-free systems. All the phases of the statechart-based verification are fully integrated into the development process which allows the automated execution of the verification and testing steps. This paper presents the proposed verification and testing algorithms. The algorithms have been implemented in a common development environment. This environment combines both self-developed and off-the-shelf components. The environment works with standard UML models shared with the system under development. The paper deals with the details of the proposed design and development process and also introduces an application example.
1 Introduction Validation and verification are essential phases of the development of computer-based systems. With the enlargement of the size and complexity of the systems under development the importance of these tasks has increased. The system development process, regardless of the applied methodology, can be divided into two main phases (Figure 1): analysis & design implementation. The system development process is typically accompanied by the occurrence of design and implementation faults. To avoid these faults the different phases of the system development are supplemented by verification and validation steps. These steps are intended to discover the faults that may arise in the design and implementation by finding any differences between the requirements and the design or the requirements and the implemented system.
433
BENYÓ The verification and validation are very time-consuming parts of system development. The time consumption of these phases can run up to 40% of the total development time, depending on the size and complexity of the system under development.
Requirements
1. Analysis & Design verification
Design (statechart model)
2. Design Verification Verified Design (statechart model)
3. Implementation
Implemented System (C code) 4. Testing
Tested System
Figure 1: Main phases of the development process The verification and validation can be done by testing. Testing is the process when the behaviour of the system is compared with the requirements when the system is activated by a given input stimulus. Testing includes different activities: test case definition (the definition of the input data to use and other conditions of the testing) test case execution and the evaluation of the results. In order to accelerate the otherwise time-consuming verification of large systems, the automation of these activities is essential. In modern software development environments, system development is supported by CASE tools. The CASE tools allow the use of formal or semi–formal models of the system under development to accelerate the design and implementation. These design models can be efficiently used for the acceleration of testing activities as well. The definition of test cases and the evaluation of the test results can be easier when they are based on the
434
UML STATECHART-BASED VERIFICATION AND TESTING OF EMBEDDED … design models. In the case of formal design models these activities can even be automated [1]. Implementation faults can be discovered by testing the implemented system. However, design faults may remain undiscovered. In order to recognize these faults, the development process has to be completed by the design verification step. The goal of design verification is to find faults in the design itself. The design faults may be instantiated as an inconsistent design (i.e. there are contradictions in the design itself) or as contradictions between the design and the original requirements. In the case when the requirements are not defined formally, the consistency between the requirements and the design can be verified only manually. However, as mentioned above, in the modern software development environments (supported by CASE tools) the design can be generated in the form of a formal description. This allows us to verify the consistency of the design itself by automated tools [2]. 1.1 Goal of the research The goal of our research work was to develop a system development process that includes automated design verification and automated testing steps. In our work the UML statechart diagram has been selected as a common formal description format of the system under development. Statecharts are a widely used modeling language of embedded systems containing digital hardware and software components [3]. Statechart diagrams are frequently used in the field of embedded system design [4] and in process automation [5]. The designers of communication systems traditionally use statecharts (e.g. in protocol design) for the description of the behavior of communicating objects.
2 Integrated Development Environment 2.1 Design Verification Subsystem The design verification in the proposed development process is implemented by the design verification subsystem [2]. The design verification subsystem includes the SPIN model checker [6], and a self-developed intelligent data converter unit. The verification subsystem is able to recognize design faults in the statechart models, e.g. inaccessible or deadlock states. The internal structure of the design verification system is introduced in Figure 2. The UML statechart diagrams are transformed to a model checker compatible format in two steps. In the first step the XML representation of the diagrams is extracted and then the models are converted to a model checker specific description. The format of this description is defined by a formal modeling language called Promela (Process Meta Language) [6]. Promela is the input format of the SPIN model checker used in the design verification subsystem. The Promela language allows the description of concurrent objects and the communication between them. The details of the conversion and the model checker are described in detail in [7] and [8].
435
BENYÓ Design statechart model
2. Design verification 2.1 XML converter
occurrent corrections
XML description
model checker specific description
2.2 Of-the-shelf model checker
Verified Design statechart model
Figure 2: Automated design verification 2.2 Testing Subsystem The automated testing of the system under verification is implemented by the integration of a previously developed testing system [1], [9].The integrated system is a state diagram based automated testing system. It is able to execute test cases with the implemented system and compare the behavior of the system under test with the behavior defined by state diagrams in the design. The system is able to derive different metrics (e.g. state coverage) to control the testing process. The testing system uses state diagrams to describe the behavior of the system under test. The mapping between the model elements of UML statecharts and state diagrams had to be defined in order to integrate the state diagram based testing to the UML-based development process [10]. The UML statechart model allows several sophisticated description opportunities to describe the system behavior [11]. The equivalent state diagram representation of many of these constructs results in a complicated state diagram model. Because of this, the set of UML constructs allowed for use in the statechart model is limited in order to simplify the model conversion. The allowed modeling constructs are as follows: states, events (without guard conditions), actions. This subset will be the subject of extension in a further phase of the research. The steps of the testing process are shown in Figure 3. The testing process will be introduced in detail by an example in the following section.
436
UML STATECHART-BASED VERIFICATION AND TESTING OF EMBEDDED …
Implemented System C code
Verified Design statechart model
4. Test 4.2 State diagram converter
4.1 Code annotation
state diagram
annotated C code occ. corrections 4.3 Test case execution
Tested System
Figure 3: Automated testing 2.3 Example The system under development in the introduced example is the controller software of an ASI Master card. The ASI is a fieldbus standard widely used in process automation. The software was designed to control the Master node of the fieldbus network. The ASI Master Firmware is an interrupt driven system. In the example, the behavior of its interrupt controller is verified (together with the behavior of the environment that generates the signals). The statechart diagram of the core behavior of the interrupt controller is presented in Figure 4. The state transitions are initiated by one or more events and could result in the generation of other events. The dependencies are modeled by statechart diagrams as well. In Figure 5 an example of this conditional event generation is presented. The condition for the generation of the event Interrupt_AnyError_NoRes is the occurrence of all of the following three events: NoResetInterruptReceivePointer, AnyError, and Interrupt. The model of the full system consists of 7 statechart diagrams containing 39 states and 82 transitions.
437
BENYÓ
Interrupt_AnyError_NoRes / PointerIs1_AnyError0
Interrupt_FatalError_NoRes / PointerIs1_FatalError0
Interrupt_AnyError_NoRes / PointerIs2_AnyError1
Interrupt_GeneralError_NoRes / PointerIs1_GeneralError0
Interrupt_FatalError_NoRes / PointerIs2_FatalError1
Interrupt_NoError_NoRes / PointerIs1_NoError0
Interrupt_GeneralError_NoRes / PointerIs2_GeneralError1
Interrupt_AnyError_NoRes / PointerIs3_AnyError2 Interrupt_FatalError_NoRes / PointerIs3_FatalError2 Interrupt_GeneralError_NoRes / PointerIs3_GeneralError2
ResetInterruptReceivePointer ISRBuffer2
ISRBuffer1
ISRBuffer0
Interrupt_NoError_NoRes / PointerIs2_NoError1
ISRBuffer3
Interrupt_NoError_NoRes / PointerIs3_NoError2
ResetInterruptReceivePointer ResetInterruptReceivePointer ResetInterruptReceivePointer
Interrupt_AnyError_NoRes / PointerIs0_AnyError3
Interrupt_FatalError_NoRes / PointerIs0_FatalError3
Interrupt_GeneralError_NoRes / PointerIs0_GeneralError3
Interrupt_NoError_NoRes / PointerIs0_NoError3
Figure 4: Statechart of the interrupt controller of the ASI Master A nyE rror
IT
IT +Error
N oRese tInterrup tRecei vePoi nte r Interrupt
I nterrupt
AnyE rror
N oR es etI nterrupt Rec eiv ePoin ter ^ISR _Ev entQueue. Int errupt_Any Error_NoRes
N oR es et I nterrupt Rec eiv ePoin ter
Error
NoRes et Int errupt Rec eiv ePointer
Erro r+N RI RP
I nterrupt ^I SR_Ev ent Queue.I nterrupt _A ny Error_N oR es
End
AnyE rror Any Error ^I SR_Ev e nt Queue.I nt erru pt _Any Error_NoRes
NR IR P
Interru pt
IT +NRIRP
Figure 5: Statechart of the event generation The description of the state diagram model of the interrupt controller of the ASI Master is shown in Figure 6. The state diagram model is described by a formal language defined in [12]. In order to generate this description, the state diagram converter extracts the XML representation of the state chart model, and then translates the state chart model elements to the corresponding state diagram construct. The mapping between the state chart elements and the state diagram constructs is defined in [10].
438
UML STATECHART-BASED VERIFICATION AND TESTING OF EMBEDDED … BEHAVIOUR ISR; AUTOMATON ControlISR: ISRBuffer0, ISRBuffer1, ISRBuffer2, ISRBuffer3; FROM FROM FROM FROM FROM
ISRBuffer0 ISRBuffer0 ISRBuffer0 ISRBuffer0 ISRBuffer0
ON ON ON ON ON
ResetInterruptReceivePointer Interrupt_AnyError_NoRes Interrupt_FatalError_NoRes Interrupt_GeneralError_NoRes Interrupt_NoError_NoRes
TO TO TO TO TO
ISRBuffer0; ISRBuffer1 ISRBuffer1 ISRBuffer1 ISRBuffer1
WITH WITH WITH WITH
PointerIs1_AnyError0; PointerIs1_FatalError0; PointerIs1_GeneralError0; PointerIs1_NoError0;
FROM FROM FROM FROM FROM
ISRBuffer1 ISRBuffer1 ISRBuffer1 ISRBuffer1 ISRBuffer1
ON ON ON ON ON
ResetInterruptReceivePointer Interrupt_AnyError_NoRes Interrupt_FatalError_NoRes Interrupt_GeneralError_NoRes Interrupt_NoError_NoRes
TO TO TO TO TO
ISRBuffer0; ISRBuffer2 ISRBuffer2 ISRBuffer2 ISRBuffer2
WITH WITH WITH WITH
PointerIs2_AnyError1; PointerIs2_FatalError1; PointerIs2_GeneralError1; PointerIs2_NoError1;
FROM FROM FROM FROM FROM
ISRBuffer2 ISRBuffer2 ISRBuffer2 ISRBuffer2 ISRBuffer2
ON ON ON ON ON
ResetInterruptReceivePointer Interrupt_AnyError_NoRes Interrupt_FatalError_NoRes Interrupt_GeneralError_NoRes Interrupt_NoError_NoRes
TO TO TO TO TO
ISRBuffer0; ISRBuffer3 ISRBuffer3 ISRBuffer3 ISRBuffer3
WITH WITH WITH WITH
PointerIs3_AnyError2; PointerIs3_FatalError2; PointerIs3_GeneralError2; PointerIs3_NoError2;
FROM FROM FROM FROM FROM
ISRBuffer3 ISRBuffer3 ISRBuffer3 ISRBuffer3 ISRBuffer3
ON ON ON ON ON
ResetInterruptReceivePointer Interrupt_AnyError_NoRes Interrupt_FatalError_NoRes Interrupt_GeneralError_NoRes Interrupt_NoError_NoRes
TO TO TO TO TO
ISRBuffer0; ISRBuffer0 ISRBuffer0 ISRBuffer0 ISRBuffer0
WITH WITH WITH WITH
PointerIs0_AnyError3; PointerIs0_FatalError3; PointerIs0_GeneralError3; PointerIs0_NoError3;
Figure 6: State diagram of the interrupt controller During the test execution, the testing subsystem traces the state of the system based on the annotation inserted to the original code. In the current system setup the annotation is done manually, however theoretically it can be automated. The code annotations are special comments in the source code as can be seen in Figure 7. These comments are valid C statements separated by comment symbols from the original code.
/*@ ISR_InterruptReceivePointer */ // BTH_OnPoint("ISR: ISR_InterruptReceivePointer", // 12, __FILE__, __LINE__,0, 4, // (MDS->p_uee_receive == 0), // (MDS->p_uee_receive == 1), // (MDS->p_uee_receive == 2), // (MDS->p_uee_receive == 3) );
Figure 7: Code annotation example
439
BENYÓ In the release version of the system these comments are discarded by the compiler but during the test phase the test environment processes these comments as well. During the execution of the test cases, based on the annotation statements, the test environment can trace the current state of the system. In each test case the actual state transitions of the system are compared to the state transitions defined by the state diagram. Based on the comparison, the behaviour of the implemented system can be verified. More detailed description of the automated test case execution is described in [9].
3 Conclusion The process of statechart model based design and implementation of embedded systems has been introduced. The main benefits of the proposed process are fast and fault-free system development. The avoidance of faults is supported by including design verification and testing steps in the development process. In order to reduce the time demand of these otherwise time-consuming phases of the system development the verification and testing steps are automated. The proposed development process is implemented in a common software development environment. The environment efficiently integrates self-developed and off-the-self components. The proposed development and verification process uses the same standard UML statechart model as used for the development of the system.
4 Further Work The primary goal of further research work is the development of the fully- or semiautomated code annotation algorithm. We are also targeting the integration of an automated test case generator to the development environment. This test case generator will traverse the paths in the state chart model and generate test cases for each traversed path.
Acknowledgments This research was supported by the Hungarian National Research Fund (grant No. OTKA F029739, T029830) and by the Hungarian Ministry of Education (grant No. FKFP 0200/2001). The research work of Balázs Benyó is supported by the Hungarian Ministry of Education (Békésy György Scholarship).
References [1]
B. Benyó. Verification of complex object oriented systems. In Proceedings of the 4th IEEE International Workshop on Design and Diagnostics of Electronic Circuits and Systems 2001, pp. 289-290, GyĘr, Hungary, April 18-20, 2001
[2]
Á. Darvas, I Majzik, and B. Benyó. Verification of UML Statechart Models of Embedded Systems. In Proceedings of the 5th IEEE International Workshop on Design and Diagnostics of Electronic Circuits and Systems 2002, pp.70-77, Brno, Czech Republic, April 16-19, 2002, ISBN 80-214-2094-4
440
UML STATECHART-BASED VERIFICATION AND TESTING OF EMBEDDED … [3]
Cs. Szász and J. Sziray. Run-Time Verification of UML State-Chart Implementations. In Proceedings of the 4th IEEE International Conference on Intelligent Engineering Systems, pp. 355-358, Portoroz, Slovenia, Sept 17-19, 2000, ISBN 961-6303-23-6
[4]
D. Bursky: Embedded-Controller Architectures Suit All Needs. Electronic Design, pp. 5364, January 8, 1996
[5]
P. Várady, Z. Benyó, and B. Benyó. An Open Architecture Patient Monitoring System Using Standard Technologies. IEEE Transaction on Information Technology in Biomedicine, Vol. 6, No. 1, pp. 95-98, March 2002, ISSN 1089-7771
[6]
G. J. Holzmann: The Model Checker SPIN. IEEE Trans. on Software Eng, pp. 279-295, Vol. 23, No. 5, 1997
[7]
D. Latella, I. Majzik, and M. Massink. Automatic Verification of UML Statechart Diagrams using the SPIN Model-Checker. Formal Aspects of Computing, pp. 637-664, Vol. 11, No. 6, Springer Verlag, Berlin, 1999
[8]
J. K. Tar, I. J. Rudas, and J. F. Bitó. Group Theoretical Approach in Using Canonical Transformations and Symplectic Geometry in the Control of Approximately Modeled Mechanical Systems Interacting with Unmodelled Environment, Robotica, pp. 163-179, Vol.15, 1997
[9]
P. Várady and B. Benyó. A Systematic Method for the Behavioural Test and Analysis of Embedded Systems. In Proceedings of the 4th IEEE International Conference on Intelligent Engineering Systems, pp.177-180, Portoroz, Slovenia, Sept 17-19 2000, ISBN 961-630323-6
[10] V. Lévai. Verification of software systems based on state transition diagrams. BSc Thesis (in Hungarian), Széchenyi István University, GyĘr, 2000 [11] Zs. Pap, I. Majzik, A. Pataricza, and A. Szegi. Completeness Analysis of UML Statechart Specifications. In Proceedings of the 4th IEEE International Workshop on Design and Diagnostics of Electronic Circuits and Systems 2001, pp. 83-90, GyĘr, Hungary, April 18-20, 2001 [12] P. Várady: Konzeption und Entwicklung einer Analysebibliothek zum Test des Verhaltens eingebetteter Software, MSc Thesis (in German), FZI-MRT, Karlsruhe, 1997
441
442
Author’s Index Akama, Kiyoshi, 299 Arat´o, P´eter, 311, 373
Ishikawa, Takahiko, 299 Jakobovi´c, Domagoj, 121
Baranyi, P´eter, 15, 225, 249 Barbosa, Ramiro S., 41, 411 Bednar, Peter, 237 Bencsik, Attila L., 169 Beny´o, Bal´azs, 433 Berger, Ulrich, 145 Bit´o, Jan´os F., 3 Bogunovic, Nikola, 199 Brumnic, Antun, 397 Budin, Leo, 121
Kand´ar, Tibor, 373 Kem´eny, Zsolt, 323 Kirner, Raimund, 67 Kov´acs, L´aszl´o, 225 Laczay, B´alint, 349 Lendvay, Marianna, 169 Lepratti, Raffaello, 145 Lopes, Ant´onio, 87 Lovrenˇci´c, Sandra, 259
Catrina, Gheorghe, 79 Cs´ak, Bence, 373 ˇ Cubrilo, Mirko, 211, 283
Mabuchi, Hiroshi, 299 Machado, J. A. Tenreiro, 41, 87, 109, 411 Malekovi´c, Mirko, 211, 283 ´ am, 311, 349 Mann, Zolt´an Ad´ Martins, J. F., 29 Mazilu, Dumitru, 79 Megyeri, Csaba, 349 Mendes, R. Vilela, 29 Michelberger, P´al, 15
Dente, J. A., 29 Dong Yang, Jae, 249 Duarte, Fernando, 41 Elmenreich, Wilfried, 67, 335 Ferreira, Nuno, 41 Friedler, Ferenc, 157
Nagy, Istv´an, 99 ´ Nov´ak, Agnes B., 189
Glavinic, Vlado, 271 Golda, Bence, 349 Gyapay, Szilvia, 157
Oliveira, P. B. de Moura, 109 Orb´an, Andr´as, 311 Paralic, Jan, 237 Pataricza, Andr´as, 157 Patriciu, Alexandru, 79 Penya, Yoseba K., 135 Peti, Philipp, 335
Horv´ath, L´aszl´o, 179, 363 Imecs, M´aria, 53 Incze, J´anos J., 53 Iordachita, Iulian, 79
443
Pires, A. J., 29 Pires, E. J. Solteiro, 109 Puklus, Zolt´an, 423 Recski, Andr´as, 349 Rosic, Marko, 271 Rudas, Imre J., 3, 179, 363 Sauter, Thilo, 135 Silva, Manuel F., 87 Stankov, Slavomir, 271 Stoianovici, Dan, 79 Szab´o, Csaba, 53 Szak´al, Anik´o, 249 Sziray, J´ozsef, 157, 385 Tar, J´ozsef, 3 Tikk, Domonkos, 15, 249 Tuza, Zsolt, 189 Ujevic, Filip, 199 V´as´arhelyi, J´ozsef, 53 Yam, Yeung, 15 Yamamoto, Yuichi, 299
444