Start of Presentation Maple soft Conference 2006 The Need for Formulae Manipulation in the Object-oriented Modeling of Physical Systems François E. Cellier,

Slides:



Advertisements
Similar presentations
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier September 20, D Mechanical Systems In this lecture,
Advertisements

Lect.3 Modeling in The Time Domain Basil Hamed
Start Presentation October 11, rd Homework Solution In this homework problem, we wish to exercise the application of the algorithms by Pantelides.
Start Presentation November 8, 2012 Bond Graphs for Mechanical Systems We shall look today in a bit more detail at the modeling of 1D mechanical systems.
Start Presentation September 27, 2012 The Structural Singularity Removal Algorithm by Pantelides This lecture deals with a procedure that can be used to.
Start Presentation Conference 2008 © Prof. Dr. François E. Cellier March 4, 2008 World3 in Modelica: Creating System Dynamics Models in the Modelica Framework.
Key Stone Problem… Key Stone Problem… next Set 21 © 2007 Herbert I. Gross.
FIRST AND SECOND-ORDER TRANSIENT CIRCUITS
MATH 685/ CSI 700/ OR 682 Lecture Notes
Start Presentation October 4, rd Homework Problem In this homework problem, we wish to exercise the application of the algorithms by Pantelides.
Linear Equations in Linear Algebra
Chapter 9 Gauss Elimination The Islamic University of Gaza
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier September 20, st Homework Problem We wish to analyze.
Start of Presentation Mathematical Modeling of Physical Systems © Prof. Dr. François E. Cellier Electrical CircuitsI This lecture discusses the mathematical.
Wrapping Multi-bond Graphs: A Structured Approach to Modeling Complex Multi-body Dynamics François E. Cellier and Dirk Zimmer ETH Zürich.
Start Presentation Conference 2008 © Prof. Dr. François E. Cellier March 4, 2008 Support for Dymola in the Modeling and Simulation of Physical Systems.
Object-oriented Modeling of Mechatronics Systems in Modelica Using Wrapped Bond Graphs François E. Cellier and Dirk Zimmer ETH Zürich.
François E. Cellier and Matthias Krebs
© John M. Abowd 2005, all rights reserved Statistical Tools for Data Integration John M. Abowd April 2005.
2-Layer Crossing Minimisation Johan van Rooij. Overview Problem definitions NP-Hardness proof Heuristics & Performance Practical Computation One layer:
Efficient Simulation of Physical System Models Using Inlined Implicit Runge-Kutta Algorithms Vicha Treeaporn Department of Electrical & Computer Engineering.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems
1 Adjoint Method in Network Analysis Dr. Janusz A. Starzyk.
Discretizing Time or States? A Comparative Study between DASSL and QSS EOOLT workshop – October 3, 2010 Xenofon Floros 1 Francois E. Cellier 1 Ernesto.
College Algebra Exam 2 Material.
Ordinary Differential Equations (ODEs)
Differential Equations and Boundary Value Problems
Chapter 3 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Start Presentation January 16, 2014 On the Importance of Quantized State Systems in Applied Mathematics François E. Cellier Computer Science Department.
Start Presentation November 29, th Homework – Solution In this homework, we shall attempt the modeling of a planar mechanical system. We shall.
LINEAR PROGRAMMING SIMPLEX METHOD.
1 Chapter 3 Methods of Analysis Copyright © 2013 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Node Voltage Method
EENG 2610: Circuit Analysis Class 4: Nodal Analysis
FIRST ORDER TRANSIENT CIRCUITS
Primal-Dual Meets Local Search: Approximating MST’s with Non-uniform Degree Bounds Author: Jochen Könemann R. Ravi From CMU CS 3150 Presentation by Dan.
Start Presentation November 22, th Homework In this homework, we shall attempt the modeling of a planar mechanical system. We shall do so once.
Erin Catto Blizzard Entertainment Numerical Integration.
Computational Intelligence: Methods and Applications Lecture 31 Combinatorial reasoning, or learning from partial observations. Włodzisław Duch Dept. of.
Start PresentationSeptember 21, 2009 Modeling Chemical Reactions in Modelica By Use of Chemo-bonds Prof. Dr. François E. Cellier Department of Computer.
AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,
Bond Graphs II In this class, we shall deal with the effects of algebraic loops and structural singularities on the bond graphs of physical systems. We.
Methods of Analysis Circuits 1 Fall 2005 Harding University Jonathan White.
ME451 Kinematics and Dynamics of Machine Systems Numerical Solution of DAE IVP Newmark Method November 1, 2013 Radu Serban University of Wisconsin-Madison.
Start Presentation October 4, 2012 Solution of Non-linear Equation Systems In this lecture, we shall look at the mixed symbolic and numerical solution.
Start Presentation November 1, 2012 Treatment of Discontinuities Today, we shall look at the problem of dealing with discontinuities in models. Models.
Start of Presentation September 27, st Homework Problem We wish to analyze the following electrical circuit.
NODE ANALYSIS One of the systematic ways to determine every voltage and current in a circuit The variables used to describe the circuit will be “Node Voltages”
Start of presentation September 27, 2012 Algebraic Loops and Structural Singularities The sorting algorithm, as it was demonstrated so far, does not always.
CS 478 – Tools for Machine Learning and Data Mining SVM.
Start Presentation November 1, 2012 Treatment of Discontinuities II We shall today once more look at the modeling of discontinuous systems. First, an additional.
Chapter 9 Gauss Elimination The Islamic University of Gaza
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
Building Industrial grade Modelica compiler
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Multi-bond Graphs We shall today look at vectors of bonds, called multi-bonds. Especially when dealing with 2D and 3D mechanics, the d’Alembert principle.
Start Presentation October 4, 2012 Efficient Solution of Equation Systems This lecture deals with the efficient mixed symbolic/numeric solution of algebraically.
EKT 441 MICROWAVE COMMUNICATIONS CHAPTER 3: MICROWAVE NETWORK ANALYSIS (PART 1)
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Review of Last Class  Calculation of Input Resistance The Equivalent Change of electric Current source  Voltage source Key Points and Difficult Points.
Boundary Element Analysis of Systems Using Interval Methods
FIRST AND SECOND-ORDER TRANSIENT CIRCUITS
Chapter 27.
4th Homework Problem In this homework problem, we wish to exercise the tearing and relaxation methods by means of a slightly larger problem than that presented.
4th Homework Solution In this homework problem, we wish to exercise the tearing and relaxation methods by means of a slightly larger problem than that.
Chapter 3 Methods of Analysis
Chapter 3 – Methods of Analysis
Presentation transcript:

Start of Presentation Maple soft Conference 2006 The Need for Formulae Manipulation in the Object-oriented Modeling of Physical Systems François E. Cellier, Ph.D. Institute of Computational Science ETH Zurich Switzerland July 26, 2006

Start of Presentation Maple soft Conference 2006 Today’s modeling needs extend to physical systems that are described by many thousands of mathematical equations. Such models are being created and maintained by employing the principles of object-oriented graphical modeling. Each object contains a number of different layers (aspects, realities) that are to be described shortly. Symbolic formula manipulation plays a central role in converting these object-oriented descriptions to a form that can be simulated effectively and efficiently. Object-oriented Modeling

Start of Presentation Maple soft Conference 2006 Object Descriptions Objects may contain an iconic representation that is being used to embed the object at the next higher hierarchical level. Objects may contain a geometric representation that is being used for animation. Objects may contain a topological description that shows its decomposition structure. Objects may contain a mathematical description that shows the equations that the model is formed of. Objects may contain a parametric description that shows parameters and their default values. Objects may contain a documentation layer that describes the object verbally.

Start of Presentation Maple soft Conference 2006 Heterogeneous Modeling Formalisms

Start of Presentation Maple soft Conference 2006 Heterogeneous Modeling Formalisms II

Start of Presentation Maple soft Conference 2006 A First Example

Start of Presentation Maple soft Conference 2006 The circuit contains 5 components and 3 nodes.  We require 13 equations in 13 unknowns. Component equations: U 0 = f(t)U 0 = v 1 – v 0 u R1 = R 1 · i R1 u R1 = v 1 – v 2 u R2 = R 2 · i R2 u R2 = v 2 – v 0 i C = C 1 · du C /dt u C = v 2 – v 0 u L = L 1 · di L /dt u L = v 1 – v 0 v 0 = 0 Node equations: i 0 = i R1 + i L i R1 = i R2 + i C A First Example II

Start of Presentation Maple soft Conference 2006 The Structure Incidence Matrix 1: U 0 = f(t) 2: i 0 = i L + i R1 3: u L = U 0 4: di L /dt = u L / L 1 5: v 1 = U 0 6: u R1 = v 1 – v 2 7: i R1 = u R1 / R 1 8: v 2 = u C 9: i C = i R1 – i R2 10: du C /dt = i C / C 1 11: u R2 = u C 12: i R2 = u R2 / R 2 di L dt du C dt S = U0U0 i0i0 uLuL v1v1 v2v2 iCiC u R1 i R1 i R2 u R2 

Start of Presentation Maple soft Conference 2006 The Structure Digraph 1: U 0 = f(t) 2: i 0 = i L + i R1 3: u L = U 0 4: di L /dt = u L / L 1 5: v 1 = U 0 6: u R1 = v 1 – v 2 7: i R1 = u R1 / R 1 8: v 2 = u C 9: i C = i R1 – i R2 10: du C /dt = i C / C 1 11: u R2 = u C 12: i R2 = u R2 / R 2  Equations U0U0 i0 i0 uLuL di L /dt v1 v1 u R1 i R1 v2 v2 iC iC du C /dt u R2 i R2 Unknowns

Start of Presentation Maple soft Conference 2006 The Tarjan Algorithm The Tarjan Algorithm is based on the structure digraph. It is a graph coloring algorithm.  equations with only a single black line leading to them, color that line in red and color all black lines that emanate from the indicated unknown in blue. Renumber the equations anew starting with 1.  unknowns with only a single black line leading to them, color that line in red and color all black lines that emanate from the indicated equation in blue. Renumber the equations anew starting with n, where n denotes the number of equations.

Start of Presentation Maple soft Conference 2006 The Tarjan Algorithm: An Example  Equations U0U0 i0 i0 uLuL di L /dt v1 v1 u R1 i R1 v2 v2 iC iC du C /dt u R2 i R2 Unknowns 1: U 0 = f(t) 2: i 0 = i L + i R1 3: u L = U 0 4: di L /dt = u L / L 1 5: v 1 = U 0 6: u R1 = v 1 – v 2 7: i R1 = u R1 / R 1 8: v 2 = u C 9: i C = i R1 – i R2 10: du C /dt = i C / C 1 11: u R2 = u C 12: i R2 = u R2 / R 2 01 U 0 U 0 U 0 02 v 2 v 2 03 u R2 u 12 du /dt C i C 11 di /dt L u L 10 i 0 i R1

Start of Presentation Maple soft Conference 2006 The Tarjan Algorithm: An Example II  Equations U0U0 i0 i0 uLuL di L /dt v1 v1 u R1 i R1 v2 v2 iC iC du C /dt u R2 i R2 Unknowns 1: U 0 = f(t) 2: i 0 = i L + i R1 3: u L = U 0 4: di L /dt = u L / L 1 5: v 1 = U 0 6: u R1 = v 1 – v 2 7: i R1 = u R1 / R 1 8: v 2 = u C 9: i C = i R1 – i R2 10: du C /dt = i C / C 1 11: u R2 = u C 12: i R2 = u R2 / R 2 01 U 0 U 0 U 0 02 v 2 v 2 03 u R2 u 12 du /dt C i C 11 di /dt L u L 10 i 0 i R1 04 u L 05 v 1 v 1 06 i R2 i 09 i C i R1

Start of Presentation Maple soft Conference 2006 The Tarjan Algorithm: An Example III  Equations U0U0 i0 i0 uLuL di L /dt v1 v1 u R1 i R1 v2 v2 iC iC du C /dt u R2 i R2 Unknowns 1: U 0 = f(t) 2: i 0 = i L + i R1 3: u L = U 0 4: di L /dt = u L / L 1 5: v 1 = U 0 6: u R1 = v 1 – v 2 7: i R1 = u R1 / R 1 8: v 2 = u C 9: i C = i R1 – i R2 10: du C /dt = i C / C 1 11: u R2 = u C 12: i R2 = u R2 / R 2 01 U 0 U 0 U 0 02 v 2 v 2 03 u R2 u 12 du /dt C i C 11 di /dt L u L 10 i 0 i R1 04 u L 05 v 1 v 1 06 i R2 i 09 i C i R1 07 u R1 u 08 i R1

Start of Presentation Maple soft Conference 2006 The Tarjan Algorithm: An Example IV Equations U0U0 i0 i0 uLuL di L /dt v1 v1 u R1 i R1 v2 v2 iC iC du C /dt u R2 i R2 Unknowns  1: U 0 = f(t) 2: v 2 = u C 3: u R2 = u C 4: u L = U 0 5: v 1 = U 0 6: i R2 = u R2 / R 2 7: u R1 = v 1 – v 2 8: i R1 = u R1 / R 1 9: i C = i R1 – i R2 10: i 0 = i L + i R1 11: di L /dt = u L / L 1 12: du C /dt = i C / C 1

Start of Presentation Maple soft Conference 2006  The structure incidence matrix of the completely sorted equation system is brought into lower triangular form. The Structure Incidence Matrix II 1: U 0 = f(t) 2: v 2 = u C 3: u R2 = u C 4: u L = U 0 5: v 1 = U 0 6: i R2 = u R2 / R 2 7: u R1 = v 1 – v 2 8: i R1 = u R1 / R 1 9: i C = i R1 – i R2 10: i 0 = i L + i R1 11: di L /dt = u L / L 1 12: du C /dt = i C / C 1  di L dt du C dt S = U0U0 i0i0 u R2 v2v2 v1v1 iCiC u R1 i R1 i R2 uLuL

Start of Presentation Maple soft Conference 2006 Algebraic Loops Component equations: U 0 = f(t)u 3 = R 3 · i 3 u 1 = R 1 · i 1 u L = L· di L /dt u 2 = R 2 · i 2 Node equations: i 0 = i 1 + i L i 1 = i 2 + i 3 Mesh equations: U 0 = u 1 + u 3 u L = u 1 + u 2 u 3 = u 2 The circuit contains 5 components  We require 10 equations in 10 unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example II 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example III 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns  The algorithm fails as there are no longer single black lines to either equations or unknowns.

Start of Presentation Maple soft Conference 2006 The Tearing of Algebraic Loops The following heuristic may be used to find suitable tearing variables: Determine those equations in the digraph that contain the largest number of black lines. For each of these equations, find the unknown with the largest number of black lines emanating from it. Determine for each of these variables, how many additional equations can be causalized, when this variable is assumed known. Choose that variable as the next tearing variable that causalizes the largest number of additional equations.

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example IV  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns : U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 Choice

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example V 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 Choice  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example VI 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 Choice  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example VII 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 Choice  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example VIII 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 Choice  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006 Algebraic Loops: An Example IX 1: U 0 = f(t) 2: i 1 = i 2 + i 3 3: u 1 = R 1 · i 1 4: u 3 = U 0 - u 1 5: u 2 = u 3 6: i 2 = u 2 / R 2 7: i 3 = u 3 / R 3 8: u L = u 1 + u 2 9: i 0 = i 1 + i L 10: di L /dt = u L / L Choice  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns

Start of Presentation Maple soft Conference 2006  The structure incidence matrix now assumes a block lower triangular (BLT) form. The Structure Incidence Matrix III  di L dt S = U0U0 i0i0 i2i2 u3u3 i2i2 u1u1 i1i1 i3i3 uLuL 1: U 0 = f(t) 2: i 1 = i 2 + i 3 3: u 1 = R 1 · i 1 4: u 3 = U 0 - u 1 5: u 2 = u 3 6: i 2 = u 2 / R 2 7: i 3 = u 3 / R 3 8: u L = u 1 + u 2 9: i 0 = i 1 + i L 10: di L /dt = u L / L Choice u2u2

Start of Presentation Maple soft Conference 2006 The Solving of Algebraic Loops I The Tarjan algorithm identifies and isolates algebraic loops. It transforms the structure incidence matrix to BLT form, whereby the diagonal blocks are made as small as possible. The selection of the tearing variables is not done in a truly optimal fashion. This is not meaningful, because the optimal selection of tearing variables has been shown to be an np-complete problem. Instead, a set of heuristics is being used, which usually comes up with a small number of tearing variables, although the number may not be truly minimal. The Tarjan algorithm does not concern itself with how the resulting algebraic loops are being solved.

Start of Presentation Maple soft Conference 2006 The Solving of Algebraic Loops II 1. u 1 = R 1 · i 1 2. u 2 = R 2 · i 2 3. u 3 = R 3 · i 3 4. i 1 = i 2 + i 3 5. U 0 = u 1 + u 3 6. u 3 = u 2 i2i2 i1i1 u1u1 u3u3 i3i3 u2u2 U0U Algebraic Loops Structure diagram

Start of Presentation Maple soft Conference 2006 Solution of Algebraic Loops III 1. u 1 = R 1 · i 1 2. u 2 = R 2 · i 2 3. u 3 = R 3 · i 3 4. i 1 = i 2 + i 3 5. U 0 = u 1 + u 3 6. u 3 = u 2 1. u 1 = R 1 · i 1 2. i 2 = u 2 / R 2 3. i 3 = u 3 / R 3 4. i 1 = i 2 + i 3 5. u 3 = U 0 - u 1 6. u 2 = u 3  i 1 = i 2 + i 3 = u 2 / R 2 + u 3 / R 3 = u 3 / R 2 + u 3 / R 3 = ((R 2 + R 3 ) / (R 2 · R 3 )) · u 3 = ((R 2 + R 3 ) / (R 2 · R 3 )) · (U 0 - u 1 ) = ((R 2 + R 3 ) / (R 2 · R 3 )) · (U 0 - R 1 · i 1 )  i 1 = R 2 + R 3 R 1 R 2 + R 1 R 3 + R 2 R 3 · U 0 Equation 4. is replaced by the new equation.

Start of Presentation Maple soft Conference 2006 The Solving of Algebraic Loops IV The algebraic loops can be solved either analytically or numerically. If the loop equations are non-linear, a Newton iteration on the tearing variables may be optimal. If the loop equations are linear and if the set is fairly large, Newton iteration may still be the method of choice. If the loop equations are linear and if the set is of modest size, the equations can either be solved by matrix techniques or by means of explicit formulae manipulation.

Start of Presentation Maple soft Conference 2006 Structural Singularities: An Example I I 1 I 2 I 3 i C i L1 i L2 i R v 1 v 2 v 3 v 0 We compose a model using the currents, the Voltages and the potentials. Consequently, the mesh equations are being ignored. We have 7 circuit components plus the ground, therefore 2  = 15 equations. In addition, there are 4 nodes giving rise to another 3 equations. Therefore, we expect 18 equations in 18 unknowns. For passive components, it is customary to normalize the Voltages in the same direction as the currents. For active components (sources), the reverse is true.

Start of Presentation Maple soft Conference 2006 Structural Singularities: An Example II 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 /dt 7: i C = C · du C /dt 8: v 0 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0  I1I1 I2I2 I3I3 uRuR iRiR u L1 di L1 /dt u L2 di L2 /dt iCiC du C /dt v0v0 v1v1 v2v2 v3v3 u1u1 u2u2 u3u3

Start of Presentation Maple soft Conference 2006 Structural Singularities: An Example III 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 /dt 7: i C = C · du C /dt 8: v 0 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0  I1I1 I2I2 I3I3 uRuR iRiR u L1 di L1 /dt u L2 di L2 /dt iCiC du C /dt v0v0 v1v1 v2v2 v3v3 u1u1 u2u2 u3u

Start of Presentation Maple soft Conference 2006 Structural Singularities: An Example IV 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 /dt 7: i C = C · du C /dt 8: v 0 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0  I1I1 I2I2 I3I3 uRuR iRiR u L1 di L1 /dt u L2 di L2 /dt iCiC du C /dt v0v0 v1v1 v2v2 v3v3 u1u1 u2u2 u3u Constraint Equation All connections are blue

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides As soon as a constraint equation has been found, this equation must be differentiated. In the algorithm of Pantelides, the differentiated constraint equation is added to the set of equations. Consequently, the set of equations has now one equation too many. In order to re-equalize the number of equations and unknowns, one of the integrators that is associated with the constraint equation is being eliminated.

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides II dx dt x  unknown known, since this is a state variable dx dt x  unknown  dx x unknown  An additional unknown was created by the elimination of the integrator. x and dx are now algebraic variables, for which there must be found equations.

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides III When differentiating constraint equations, it can happen that additional new variables are being created, e.g. v  dv, where v is an algebraic variable. Since v was already blue (otherwise, this would not have been a constraint equation), there already exists another equation to compute v. This equation must also be differentiated. The differentiation of additional equations continues until no additional variables are being created.

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides : An Example 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 /dt 7: i C = C · du C /dt 8: v 0 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0 dI 1 + di C + di L2 + dI 3 = 0 eliminated integrator newly introduced variables

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides : An Example II 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 /dt 7: i C = C · du C /dt 8: v 0 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0 19: dI 1 + di C + di L2 + dI 3 = 0 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2  1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 7: i C = C · du C /dt 8: v 0 = 0 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0 19: dI 1 + di C + di L2 + dI 3 = 0

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides : An Example III 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 20: dI 1 = df 1 (t)/dt 21: dI 3 = df 3 (t)/dt 22: di C = di L1 /dt + dI 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0 19: dI 1 + di C + di L2 + dI 3 = 0 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 7: i C = C · du C /dt 8: v 0 = 0 u L1 = L 1 · di L1 /dt newly introduced variable 23: dI 2 = df 2 (t)/dt

Start of Presentation Maple soft Conference 2006 The Algorithm by Pantelides : An Example IV 9: u 1 = v 0 – v 1 10: u 2 = v 3 – v 2 11: u 3 = v 0 – v 1 12: u R = v 3 – v 0 13: u L1 = v 2 – v 0 14: u L2 = v 1 – v 3 15: u C = v 1 – v 2 16: i C = i L1 + I 2 17: i R = i L2 + I 2 18: I 1 + i C + i L2 + I 3 = 0 19: dI 1 + di C + di L2 + dI 3 = 0 1: I 1 = f 1 (t) 2: I 2 = f 2 (t) 3: I 3 = f 3 (t) 4: u R = R · i R 5: u L1 = L 1 · di L1 /dt 6: u L2 = L 2 · di L2 7: i C = C · du C /dt 8: v 0 = 0 20: dI 1 = df 1 (t)/dt 21: dI 3 = df 3 (t)/dt 22: di C = di L1 /dt + dI 2 23: dI 2 = df 2 (t)/dt

Start of Presentation Maple soft Conference 2006 Inline Integration Higher-order models are almost invariably stiff. Stiff models require an implicit ODE solver for their simulation. Implicit ODE solvers call for an additional iteration during each integration step. Inline integration may be able to reduce the number of iteration variables by merging the solver equations with the model equations.

Start of Presentation Maple soft Conference 2006 Inline Integration: An Example 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 11: i L = pre(i L ) + h · diL/dt  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns 11 iLiL

Start of Presentation Maple soft Conference 2006 Inline Integration: An Example II 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 11: i L = pre(i L ) + h · diL/dt  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns 11 iLiL

Start of Presentation Maple soft Conference 2006 Inline Integration: An Example III 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 11: i L = pre(i L ) + h · diL/dt  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns 11 iLiL Choice 02

Start of Presentation Maple soft Conference 2006 Inline Integration: An Example IV 1: U 0 = f(t) 2: u 1 = R 1 · i 1 3: u 2 = R 2 · i 2 4: u 3 = R 3 · i 3 5: u L = L· di L /dt 6: i 0 = i 1 + i L 7: i 1 = i 2 + i 3 8: U 0 = u 1 + u 3 9: u 3 = u 2 10: u L = u 1 + u 2 11: i L = pre(i L ) + h · diL/dt  Equations U0U0 i0 i0 uLuL di L /dt u1 u1 i1i1 u2u2 i2 i2 u3 u3 i3i3 Unknowns 11 iLiL Choice

Start of Presentation Maple soft Conference 2006 Inline Integration II DASSL would have required to use all state variables (1) plus all tearing variables (1) as iteration variables. With inline integration, we got away with a single iteration variable in this example. Determining a good (small) set of tearing variables is thus essential, as it ultimately determines the efficiency of the simulation. Dymola offers a highly sophisticated selection of heuristics to determine small sets of tearing variables. These heuristics have not been published, as the company views them as their technological edge.

Start of Presentation Maple soft Conference 2006 Discontinuity Handling Discontinuity handling requires special considerations during the (symbolic) translation. (Switching equations change their computational causality as a function of the switch position.) Discontinuity handling also requires special considerations during the (numerical) simulation. (Extrapolation polynomials don’t exhibit discontinuities.)

Start of Presentation Maple soft Conference 2006 Mixed Symbolic and Numerical Processing