Physical Modeling of Hybrid Systems with Rand Model Designer

Similar documents
Metrics for Data Uniformity of User Scenarios through User Interaction Diagrams

Reactor Design within Excel Enabled by Rigorous Physical Properties and an Advanced Numerical Computation Package

A GUI FOR EVOLVE ZAMS

NUMERICAL COMPUTATION IN SCIENCE AND ENGINEERING

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

Simulation of Vehicle Drivetrain with Modelica

Study the Numerical Methods for Solving System of Equation

The Conjugate Gradient Method

A Stand Alone Quantized State System Solver. Part I

Numerical Methods in Matrix Computations

Finite-choice algorithm optimization in Conjugate Gradients

Fuzzy Limits of Functions

Algorithm for Sparse Approximate Inverse Preconditioners in the Conjugate Gradient Method

Assignment on iterative solution methods and preconditioning

Modelica An Object-Oriented Language for Physical System Modeling

Solving of logic functions systems using genetic algorithm

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

OUTLINE 1. Introduction 1.1 Notation 1.2 Special matrices 2. Gaussian Elimination 2.1 Vector and matrix norms 2.2 Finite precision arithmetic 2.3 Fact

Towards Mechanical Derivation of Krylov Solver Libraries

Black Box Linear Algebra

Maple in Differential Equations

USING SINGULAR VALUE DECOMPOSITION (SVD) AS A SOLUTION FOR SEARCH RESULT CLUSTERING

Adjoint Orbits, Principal Components, and Neural Nets

MATLAB TOOL FOR IDENTIFICATION OF NONLINEAR SYSTEMS

A New Simulation Technique for Periodic Small-Signal Analysis

Causal Block Diagrams: Compiler to LaTeX and DEVS

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

A Modular NMF Matching Algorithm for Radiation Spectra

Poisson Equation in 2D

Contents. Preface... xi. Introduction...

Mathematical Models with Maple

2 Computing complex square roots of a real matrix

Towards a Mechanised Denotational Semantics for Modelica

Algebraic Equations. 2.0 Introduction. Nonsingular versus Singular Sets of Equations. A set of linear algebraic equations looks like this:

Information System Desig

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

Agent-Based HOL Reasoning 1

From Stationary Methods to Krylov Subspaces

SYMBOLIC AND NUMERICAL COMPUTING FOR CHEMICAL KINETIC REACTION SCHEMES

A Note on Backward Dual Resolution and Its Application to Proving Completeness of Rule-Based Systems*

Automated Checking of Integrity Constraints for a Model- and Pattern-Based Requirements Engineering Method (Technical Report)

Newton s Method and Efficient, Robust Variants

6. Iterative Methods for Linear Systems. The stepwise approach to the solution...

EET 3212 Control Systems. Control Systems Engineering, 6th Edition, Norman S. Nise December 2010, A. Goykadosh and M.

Computation of a canonical form for linear differential-algebraic equations

M.Burgin Department of Mathematics University of California, Los Angeles Los Angeles, CA 90095

9. Numerical linear algebra background

AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 23: GMRES and Other Krylov Subspace Methods; Preconditioning

Partial Differential Equations

1. Fast Iterative Solvers of SLE

Linear Solvers. Andrew Hazel

Numerical Programming I (for CSE)

Generalized AOR Method for Solving System of Linear Equations. Davod Khojasteh Salkuyeh. Department of Mathematics, University of Mohaghegh Ardabili,

MODELING OF ELASTO-PLASTIC MATERIALS IN FINITE ELEMENT METHOD

Physical Modelling with Simscape Rick Hyde

OBEUS. (Object-Based Environment for Urban Simulation) Shareware Version. Itzhak Benenson 1,2, Slava Birfur 1, Vlad Kharbash 1

GIS TECHNICIAN I GIS TECHNICIAN II

Self-Tuning Spectral Clustering

Matrix Eigensystem Tutorial For Parallel Computation

14 Singular Value Decomposition

Introduction to Iterative Solvers of Linear Systems

arxiv: v2 [math.na] 21 May 2018

Spreadsheet Solution of Systems of Nonlinear Differential Equations

DonnishJournals

Notes on Some Methods for Solving Linear Systems

IMPLEMENTATION OF CONTINUOUS-TIME DYNAMICS IN SCICOS. Masoud Najafi Azzedine Azil Ramine Nikoukhah

EXISTENCE VERIFICATION FOR SINGULAR ZEROS OF REAL NONLINEAR SYSTEMS

EXAMPLES OF CLASSICAL ITERATIVE METHODS

STUDY ON METHODS FOR COMPUTER-AIDED TOOTH SHADE DETERMINATION

An Asynchronous Algorithm on NetSolve Global Computing System

Numerical Integration of Equations of Motion

Enabling Advanced Problem Solving in Spreadsheets with Access to Physical Property Data

DESIGN AND ANALYSIS OF ALGORITHMS. Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

Unit 6 Chapter 17 TRACTABLE AND NON-TRACTABLE PROBLEMS

c 1995 Society for Industrial and Applied Mathematics Vol. 37, No. 1, pp , March

Designing Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

An Adaptive Finite-State Automata Application to the problem of Reducing the Number of States in Approximate String Matching

Vector Spaces. 9.1 Opening Remarks. Week Solvable or not solvable, that s the question. View at edx. Consider the picture

Chabot College Fall Course Outline for Mathematics 25 COMPUTATIONAL METHODS FOR ENGINEERS AND SCIENTISTS

9.1 Preconditioned Krylov Subspace Methods

Factor Analysis (10/2/13)

GENERALIZATION IN THE NEW GENERATION OF GIS. Dan Lee ESRI, Inc. 380 New York Street Redlands, CA USA Fax:

Preconditioning Techniques Analysis for CG Method

NUMERICAL MATHEMATICS & COMPUTING 7th Edition

CHAPTER 11. A Revision. 1. The Computers and Numbers therein

Nonlinear Support Vector Machines through Iterative Majorization and I-Splines

3.2 Iterative Solution Methods for Solving Linear

Index Reduction and Discontinuity Handling using Substitute Equations

M.A. Botchev. September 5, 2014

SE-5101: Foundations of Physical Systems Modeling

Lagrangian Description for Particle Interpretations of Quantum Mechanics Single-Particle Case

Arnoldi Methods in SLEPc

Iterative Methods for Solving A x = b

The antitriangular factorisation of saddle point matrices

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016

Transactions on Information and Communications Technologies vol 18, 1998 WIT Press, ISSN

A Domain Decomposition Based Jacobi-Davidson Algorithm for Quantum Dot Simulation

In this work is used the version of the Mathematica software for Windows environment. The examples which are treated are "generic" and should ex

Hybrid Control and Switched Systems. Lecture #11 Stability of switched system: Arbitrary switching

Fundamental of Electrical circuits

Transcription:

Physical Modeling of Hybrid Systems with Rand Model Designer D. Inihov,* Y. Kolesov,** Y. Senichenkov*** *MvSoft, Moscow, Russia, (e-mail: inihov@mail.ru) **R F C A, Moscow, Russia (e-mail: ybk2@mail.ru) *** St. Petersburg State Polytechnic University, Russia, (e-mail: senyb@dcn.ftk.spbstu.ru) Abstract: New visual environment Rand Model Designer developed by MvStudium Group for modeling and simulation of complex dynamical system is presented. Modeling language of the tool is based on object-oriented approach and maintains component modeling with oriented ( causal modeling) and nonoriented ( physical modeling) components with hybrid (event-driven) behavior. Problems of performing current final systems of algebraic-differential equations for physical hybrid models, using structural analysis for modeling (identification of «unsolvable» systems) and simulation (computation speed) are considered. Keywords: complex dynamical systems, hybrid systems, visual modeling languages, numerical software, structural analysis, differential-algebraic equations, direct and iterative methods for solving large systems of linear algebraic equations. 1. INTRODUCTION Modern tools for modeling and simulation of complex dynamical systems are based on object-oriented modeling and maintain component modeling with oriented ( causal modeling) and non-oriented ( physical modeling) components. Using state machine as a specification of event-driven component behaviour makes changes in algorithm of building current final system of algebraic-differential equations for physical modeling in comparison with causal modeling. For physical modeling this algorithm has greater time complexity. In spite of this we suggest performing a current final system during execution. It allows modeling hybrid systems without any limitation on type and structure of a local system of algebraic-differential equations. For embedded systems it is very important providing breakneck computation speed. A possible way of decreasing model run-time is updating numerical methods. One of the basic auxiliary operations of numerical methods for solving algebraic-differential equations is solving linear system of algebraic equations. Modern solvers of algebraic-differential equations based on direct methods for solving linear algebraic systems of equations deal with general, band and sparse matrices. The list of practically important equation structures is bigger. It is possible to modify numerical methods for solving algebraic-differential equations taking in account different types of equation structure. Modern industrial projects require special technology for debugging and testing. Jumbo size of whole model hybrid automation allows analysing separate trajectories only. Therefor information about separate trajectory should be manifold. It may be a list of visited states of total hybrid automation on trajectory and sequence of final systems, type and structure of final systems, Jacoby matrices values, sequence and results of discrete actions, etc. Rand Model Designer (www.rand-service.com) developed by MvStudium Group (www.mvstudium.com) is industrial visual environment for designing complex dynamical systems. In comparison with Model Vision Studium it maintains causal modeling event-driven systems, suitable for designing embedded systems, allows taking in count structure of solved systems, and has powerful instruments for testing and debagging large-scale models. 2. RAND MODEL DESIGNER Rand Model Designer (for short RMD - www.randservice.com) is a commercial version of Model Vision Studium (Breitenecker, 2009) (www.mvstudium.com). RMD is an equation based graphical environment for objectoriented modeling and simulation of complex real world or technical systems. It is adjusted to special mathematical models called hybrid systems. Hybrid systems are the best for modeling multiple-mode or event-driven systems. So RMD s model component usually contains hybrid system. A visual form of hybrid system is called hybrid automation. RMD s hybrid automation (Fig. 1-2) is an extended UML state-machine and called Behaviour- Chart (B-Chart).

Fig. 3. RMD s component diagram of a large-scale system (http://www.transas.com/). Fig. 1. RMD s hierarchical B-Chart. MVL supports component modeling with oriented and notoriented components. A RMD component is an open hybrid system. Open hybrid system has a set of special different kind variables (oriented: inputs, outputs, non-oriented: contacts, flows) that may be used in coupling equations. A RMD s component diagram is a set of components and couples between them. A final system of equations to be solved for simulation contains component equations and coupling equations. B-Chart generates a sequence of current final systems of equations on a trajectory. RMD forms, analyses and reduces a current final system on run-time. To form, analyse and reduce means to build automatically equations set using B-chart, analyse its structure, decrease its dimension, reduce them in compliance with chosen for solution numerical or symbolic method. RMD builds two sorts of executable models: A visual model that is Windows stand along application stands for testing, visual debugging, carrying out computational experiments, and processing results; A hidden model that is Windows dynamical linked library (dll), which may be used as an embedded interactive application. Fig. 2. «State_opened» is submachine state. A continuous behaviour in RMD B-Hart is described by algebraic-differential equations written in usual (symbolic) mathematical form. Discreet behaviour or algorithms are written in the tool modeling language named Model Vision Language (MVL). RMD has its own distinguishing characteristics: 1. It is oriented on well-defined mathematical models, which are event-driven set of algebraic-differential equations. A dimension, type, and numerical properties of such systems depend on current model mode. 2. Hierarchical component diagrams and B-Charts allow to user design complex large-scale models. 3. MVL maintains technologies for causal and noncausal modelling simultaneously. RMD is used for scientific research and teamwork computer-aided design of large-scale systems (Fig. 3). In both cases object-oriented modeling renders assistance. Working out or library classes are used as building material for a complex model. Their instances may have parameters for customization, inherit properties of parents, and demonstrate polymorphous. RMD numerical library contains different variants of numerical methods. It allows taking in account specific forms of a model equations what usually leads to increasing calculation accuracy and acceleration of calculating speed. RMD has a special visual language for planning computational experiments, a set of instruments for analysing model numerical properties and comparison experimental results. RMD has easy-to-use instruments for debugging, testing, and contrastive analysis of different model modifications as well.

3. PHYSICAL MODELING It is possible to build multi-component physical models using a lot of tools (Breitenecker, 2009). Most of them have data type Record in their modeling languages used for constructing «Connectors». User s defined «Connectors» make physical models expressive and really physical. Models with complex «Connectors» inherit not only real word object structure but and its bond nature. algebraic-differential equations) may be considered as extension of UML activity. Passive classes are used for discrete actions as usual. Thereby UML semantic may be used as a standard for modeling complex dynamical systems. Fig. 4. Physical modeling with RMD: an electrical circuit. Designing RMD we have based on Modelica experience in the field of physical modeling (Fritzson, 2006; Tiller, 2001) and our own MvStudium s way of modeling hybrid systems. Used in RMD B-Chart is UML state machine (Rumbauth, 2005) without orthogonal and history states specifically. Fig. 5. Physical modeling with RMD: B-Chart for an Jumper. UML reference is no coincidence here. We want to underline that RMD s version of Model Vision Language (MVL) is an UML based language. We consider UML as appropriate standard for object-oriented modeling of complex (multicomponent, large-scale, event-driven) dynamical systems. Modern tools for modeling and simulation complex systems obviously use special forms of class, object, component, structure, state machine diagrams, and other UML graphical elements in their modeling languages. Active classes and active objects play special role in describing component s continuous behaviour. Continuous behaviour of complex dynamical systems (piecewise continuous solutions of Fig. 6. Physical modeling with RMD: run-time visual representation of the electrical circuit specification. Physical modeling for components with B-Charts has its own characteristics. It is well known that time of building current final system depends on types of components. Solvability of any possible current final system of equations generated by B-Chart for oriented components (blocks in Simulink notation) may be checked while compiling. It is impossible to do so for oriented components with hybrid behaviour in general case. Component equations for oriented components are usually underdetermined. We are obliged analysing solvability of current configuration of component equations on run-time period if we want examine local behaviour of hybrid system as an arbitrary dynamical system. Component s equations in RMD ds f ( i, s, y, t) = 0, i = 1, N; i dt i i were N is number of components, respect to vectors of component state variables s i and vectors of component external variables y together with coupling equations form a current final system i dx F (, x, t) = 0. dt Type and structure of final system are analysed, and it transforms to semi-explicit form of algebraic-differential equations if necessary. dx = z dt F( z, x, t) = 0

4. STRUCTURAL ANALYSIS In RMD structural matrix is used for building a current final system. Lines of structural matrix correspond to components equations. Colons correspond to current model variables. Coefficients of structural matrix have {0, 1} values. Value one in the position of colon and line crossing says that an appropriate variable is used in equation under consideration. A system be called structural nonsingular (formally solvable) if it has square structural matrix with full transversal (all diagonal elements are equal to one ). RMD s Analyser inspects the current structural matrix for full transversal, and tries to reorder colons and lines for building matrix with full transversal if necessary (mode realize structural analysis ). If reordering is impossible Analyser tries determining problem by itself. In this case user gets a warring and the list the variables obtained forced values. Tabular procedure of building current final system of equations based on structural matrix is used in RMD. Nonlinear component equations are complemented by topological equations, that are systems of linear algebraic equations with {0, +1, -1} coefficients. Analyser reorders equations if necessary. Special structure of topological equations allows decreasing dimension of a final system. RMD s Analyser first of all divides a final system on non-linear and linear part and analyse their specific where there is much to gain from it. Fig. 6. Structural analysis: a block-diagonal matrix with band blocks. 5. STRUCTURE OF SOLVED SYSTEM Modern numerical methods for solving algebraic-differential equations (Ascher, 1998; Hairer 1996) are based on auxiliary operations: calculating Jacoby matrix and solving systems of linear algebraic equations. Calculation of Jacoby matrix and solving systems of linear algebraic equations may be done numerically or symbolically. Numerical methods for solving systems of linear algebraic equations may be direct or iterative. Preconditioned Krylov methods for solving linear algebraic systems are used in DASPK (Brown, 1998; Li, 1999). A rate of convergence of preconditioned Krylov methods depends on preconditioner matrix. A regular way of building preconditioner matrix automatically for component models is unknown now. We are doing our first steps in this direction. Direct methods for solving large systems of linear algebraic equations try taking into account matrix structure. RMD s methods for solving large systems of linear algebraic equations distinguish band, block-diagonal, block-triangular, sparse and general matrices (Fig. 6-9). Fig. 7. Structural analysis: a block-diagonal matrix with series of even blocks (all except the first). Fig. 8. Structural analysis: a block-triangular matrix.

Fig. 9. Structural analysis: a sparse matrix. Matrix structure may be known beforehand or it is possible determining it automatically. It is permissible to try reordering matrix colons and lines for transforming matrix to matrix with wanted structure (Pissanetzky, 1984). All this should be used for increasing computation speed. RMD s user can inform Analyser about a final system structure with the help of special operators. For example user can place operator «block name. end block» among component equations (Fig. 10, fragment block NLB ) and Analyser would inspecting if final system composed from such blocks has block-diagonal structure or it hasn t. 5. DEBUGING AND TESTING Behaviour of a hybrid system is a set of trajectories generated by hybrid automation in state variables domain of definition. Final (aggregate) hybrid automation for a large-scale multicomponent system is beyond RMD s user. Thereby user can debug and test separate trajectories only. There are three levels of debugging in RMD. User can get information about trajectory for given initial conditions as the sequence of visited states of component s hybrid automata with names of activated transitions. In this case for each visited state of final hybrid automation short description of current final system is available: type (algebraic equations, differential equations, algebraic-differential equations), initial vector (plus a vector of consistent initial conditions for algebraic-differential equations) and the solution in final point. If you need more information about continuous behaviour you may request output of a procedure for equation s residual calculation called by numerical method and intermediate values of the solution on interval. All this information may be associated with internal variables used for calculations by numerical method and with user defined names of variables. All debugging information is saved as a text file. Additionally user can get some information about a model in graphical form during model execution. First of all it is possible to watch and print current final system in mathematical form. There are special windows for Jacoby matrix and its eigenvalues onto solution. 6. CONCLUSIONS Rand Model Designer (under the name MvStudium Professional) is used now for designing shipping cargo operations simulators (Kiptiliy, 2011). Sea cargo operations simulators are hierarchical multi-component systems with oriented and non-oriented components. Theirs training purpose assumes using hybrid systems with a lot of hierarchical states and local behaviors as mathematical model for supporting active learning process (play behavior). Program realization of mathematical model has to run very fast (it should take no more than 10% of simulation total time in our case study). Rand Model Designer object-oriented approach ensures designing large-scale models. The Structural Analyzer allowed not passing unsolvable systems to program realization of numerical methods and raised calculating speed. Fig. 10. User s specification of system of equation structure (non-linear and linear blocks) in MVL. More interesting is operator linear block name end block. It says that we deal with so called series of linear blocks Aw j = b, j =1, m j where A is matrix with constant coefficients (see Fig. 10, fragment linear block VLB and take in account that X,Y,Z are m-dimensional vectors and aij are constants). REFERENCES Ascher U.M., Petzold L.R. (1998). Computer methods for ordinary differential equations and differential-algebraic equations, SIAM. Breitenecker F., Proper N. (2009). Classification and evaluation of features in advanced simulators. Proceedings MATHMOD 09 Vienna, Full papers CD Volume. Brown P.N., Hindmarsh A.G., Petzold L.R. (1993). Using Krylov methods in solution of large-scale differentialalgebraic systems. Technical report. Numerical Mathematics Group, UCRL-JC-113507 (https://computation.llnl.gov/casc/nsde/pubs/221215.pdf)

Fritzson P. (2006). Principles of Object-Oriented Modeling and Simulation with Modelica 2.1. Wiley-IEEE Press. Hairer E., G. Waner. (1991,1996). Solving ordinary differential equations II. Springer-Verlag. Kiptiliy D. B., Kolesov Yu. B., Lebedev D. V., Senichenkov Yu. B.,Tarasov S. V.. Object-oriented approach to designing cargo shipping operations simulator. Proceedings of SCM MEMTS 2011, Saint-Petersburg. Li S., Petzold L. (1999) Design of new DASPK for sensitivity analysis. S. Technical Report, Department of Computer Science, University of California Santa Barbara, (www.cs.ucsb.edu/~cse/files/lipetz99.ps) Pissanetzky S. (1984). Sparse matrix technology. Academic Press Inc. Rumbauth J., Jacobson I., Booch G. (2005). The unified modeling language. Reference manual. Second edition. Addison-Wesley. Tiller M. (2001). Introduction to physical modeling with Modelica. The Springer international series in engineering and computer science.