Discretizing Time or States? A Comparative Study between DASSL and QSS EOOLT workshop – October 3, 2010 Xenofon Floros 1 Francois E. Cellier 1 Ernesto.

Slides:



Advertisements
Similar presentations
Noise-Predictive Turbo Equalization for Partial Response Channels Sharon Aviran, Paul H. Siegel and Jack K. Wolf Department of Electrical and Computer.
Advertisements

Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Lect.3 Modeling in The Time Domain Basil Hamed
Timed Automata.
Supervisory Control of Hybrid Systems Written by X. D. Koutsoukos et al. Presented by Wu, Jian 04/16/2002.
Point-wise Discretization Errors in Boundary Element Method for Elasticity Problem Bart F. Zalewski Case Western Reserve University Robert L. Mullen Case.
Programming Types of Testing.
Trajectory Generation
An Approach to Evaluate Data Trustworthiness Based on Data Provenance Department of Computer Science Purdue University.
Visual Recognition Tutorial
Quantized State System Simulation in Dymola/Modelica Using the DEVS Formalism Tamara Beltrame VTT, Industrial Systems PO Box 1000, VM Espoo, Finland.
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
Dirk Zimmer François E. Cellier Institute of Computational Science Department of Computer Science ETH Zürich A bondgraphic modeling tool and its application.
François E. Cellier and Matthias Krebs
NORM BASED APPROACHES FOR AUTOMATIC TUNING OF MODEL BASED PREDICTIVE CONTROL Pastora Vega, Mario Francisco, Eladio Sanz University of Salamanca – Spain.
Development of Empirical Models From Process Data
Start of Presentation Maple soft Conference 2006 The Need for Formulae Manipulation in the Object-oriented Modeling of Physical Systems François E. Cellier,
WSN Simulation Template for OMNeT++
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Ordinary Differential Equations (ODEs)
Lecture II-2: Probability Review
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.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Towers of Hanoi. Introduction This problem is discussed in many maths texts, And in computer science an AI as an illustration of recursion and problem.
Neurons, Neural Networks, and Learning 1. Human brain contains a massively interconnected net of (10 billion) neurons (cortical cells) Biological.
Nth-order Activity of Continuous Systems a,b,c Rodrigo Castro and c Ernesto Kofman a ETH Zürich, Switzerland b University of Buenos Aires & c CIFASIS-CONICET,
DEVSView: A DEVS Visualization Tool Wilson Venhola.
Introduction to variable selection I Qi Yu. 2 Problems due to poor variable selection: Input dimension is too large; the curse of dimensionality problem.
Using Partitioning in the Numerical Treatment of ODE Systems with Applications to Atmospheric Modelling Zahari Zlatev National Environmental Research Institute.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Deterministic vs. Random Maximum A Posteriori Maximum Likelihood Minimum.
Ajit Kurup, Imperial College London P. Bonnal, B. Daudin, J. De Jonghe, CERN An Accelerator Design Tool for the International Design Study for the Neutrino.
Yaomin Jin Design of Experiments Morris Method.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
Indo-European network on Advanced Instability Methods Sensitivity and Adjoint operators: a simple matlab example (the discrete adjoint approach)‏
OPENPROD ITEA2 Final Review Meeting EDF - Site de Chatou University of Applied Science Bernhard Bachmann.
A Real-Time Numerical Integrator for the Spring 2004 Scientific Computing – Professor L. G. de Pillis A Real-Time Numerical Integrator for the One-Dimensional.
© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating that content has been modified from the.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: ML and Simple Regression Bias of the ML Estimate Variance of the ML Estimate.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved. 1.
Time-dependent Schrodinger Equation Numerical solution of the time-independent equation is straightforward constant energy solutions do not require us.
Boundary Value Problems l Up to this point we have solved differential equations that have all of their initial conditions specified. l There is another.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Texas A&M University, Department of Aerospace Engineering AN EMBEDDED FUNCTION TOOL FOR MODELING AND SIMULATING ESTIMATION PROBLEMS IN AEROSPACE ENGINEERING.
Chapter 20 1 Overall Objectives of Model Predictive Control 1.Prevent violations of input and output constraints. 2.Drive some output variables to their.
Design Realization lecture 22
CHAPTER 17 O PTIMAL D ESIGN FOR E XPERIMENTAL I NPUTS Organization of chapter in ISSO –Background Motivation Finite sample and asymptotic (continuous)
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
I ndustrial Cy ber- Ph ysical Systems October 16, 2015 CyPhySim CyPhySim is an open-source simulator for cyber-physical systems. The.
1 Presented by Sarbagya Buddhacharya. 2 Increasing bandwidth demand in telecommunication networks is satisfied by WDM networks. Dimensioning of WDM networks.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
Generating Software Documentation in Use Case Maps from Filtered Execution Traces Edna Braun, Daniel Amyot, Timothy Lethbridge University of Ottawa, Canada.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Visual-FIR: A new platform for modeling and prediction of dynamical Systems Antoni Escobet 1 Àngela Nebot 2 François E. Cellier 3 1 Dept. ESAII Universitat.
IBM Global Services © 2005 IBM Corporation SAP Legacy System Migration Workbench| March-2005 ALE (Application Link Enabling)
System To Generate Test Data: The Analysis Program Syed Nabeel.
Monte Carlo Linear Algebra Techniques and Their Parallelization Ashok Srinivasan Computer Science Florida State University
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
ICS 3UI - Introduction to Computer Science
OPERATING SYSTEMS CS 3502 Fall 2017
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Quantum Two.
Hidden Markov Models Part 2: Algorithms
Objective of This Course
COMP60621 Fundamentals of Parallel and Distributed Systems
COMP60611 Fundamentals of Parallel and Distributed Systems
Presentation transcript:

Discretizing Time or States? A Comparative Study between DASSL and QSS EOOLT workshop – October 3, 2010 Xenofon Floros 1 Francois E. Cellier 1 Ernesto Kofman 2 1 Department of Computer Science, ETH Zurich, Switzerland {xenofon.floros, 2 Laboratorio de Sistemas Dinámicos, FCEIA, Universidad Nacional de Rosario, Argentina

Floros et al Outline  Modelica Language  QSS methods and PowerDEVS  Non-Discontinuous Modelica Models Simulation with QSS and DEVS  OpenModelica to PowerDEVS (OMPD) Interface  Simulation Results 2 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Modelica – The next generation modeling language 3 (Open)Modelica, QSS and the OPENPROD project (ML group – 1/2/2010) Graphical editor for Modelica models Modelica modeling environment (free or commercial) Translation of Modelica models in C-Code and Simulation Modelica simulation environment (free or commercial) Textual description Free Modelica language

Floros et al QSS methods Simulation of continuous systems by a digital computer requires discretization.  Classical methods (e.g. Euler, Runge-Kutta etc.), that are implemented in Modelica environments, are based on discretization of time.  On the other hand, the Discrete Event System Specification (DEVS) formalism, introduced by Zeigler in the 90s, enables the discretization of states.  The Quantized-State Systems (QSS) methods, introduced by Kofman in 2001, improved the original quantized-state approach of Zeigler.  PowerDEVS is the environment where QSS methods have been implemented for the simulation of systems described in DEVS. 4 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QSS methods Let’s assume that the OpenModelica compiler has performed all the preprocessing steps and reached a reduced ODE of the form: or Then the simulation environments (usually) provide solvers that evaluate the right- hand side of the above equation at discrete time steps in order to compute the next value of the state variable. 5 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QSS methods Contrary, in QSS methods the state variables have to be quantized in order to obtain piecewise constant trajectories. Let be piecewise constant approximations of. Then, we can write: and considering a single component we can define the “simple” DEVS models: 6 Quantized Integrator Static Function Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QSS methods In QSS methods function Q has been chosen to be a Quantization Function with Hysteresis. Usually the discrete values are equidistant and is called quantum.  At each step only one (quantized) state variable that changes more than the quantum value ΔQ is updated producing a discrete event. 7 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QSS higher order methods  QSS is a first-order approximation of the real system trajectory. (In QSS quantized variables and state derivatives are piecewise constant, thus state variables piecewise linear).  The problem is that both the approximation error and the time interval between successive events grows linearly with the quantum. Thus reducing the error will cause a proportional increase of the computational time.  There are also available higher-order approximations (QSS2, QSS3) that reduce the computation time. 8 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QSS higher order methods  For example, in QSS2 the quantized variables have piecewise linear trajectories thus (in the linear case) the state derivatives are also piecewise linear and the state variables piecewise parabolic 9 QSS2 approximation Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al PowerDEVS 10 (Open)Modelica, QSS and the OPENPROD project (ML group – 1/2/2010) Specify system structure (using DEVS formalism) Block implementation hidden (C++ code) Integrators implement the QSS methods Simulation using hierarchical master-slave structure and message passing Allows for real-time simulation

Floros et al Simulate Modelica Models with QSS and DEVS Thus, in absence of discontinuities, we can simulate our Modelica model using a coupled DEVS model consisting of coupling, n Quantized Integrators and n Static Functions, e.g. 11 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Goal Design and implement an interface between OpenModelica and PowerDEVS 12 (Open)Modelica, QSS and the OPENPROD project (ML group – 1/2/2010)

Floros et al Goal Interfacing OpenModelica and PowerDEVS we take advantage of  The powerful modeling tools and market share offered by Modelica  Users can still define their models using the Modelica language or their favorite graphical interface.  No prior knowledge of DEVS and QSS methods is needed.  The superior performance of quantization-based techniques in some particular problem instances  QSS methods allow for asynchronous variable updates, which potentially speeds up the computations for real-world sparse systems.  QSS methods do not need to iterate backwards to handle discontinuities, they rather predict them, enabling real-time simulation. 13 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Interfacing OpenModelica and PowerDEVS (OMPD interface) 14 (Open)Modelica, QSS and the OPENPROD project (ML group – 1/2/2010)

Floros et al OMPD Interface (I) 1. Equation splitting The interface extracts the indices of the equations needed in order to compute the derivative of each state variable. 2. Mapping split equations to BLT blocks The splitted equations are mapped back to BLT blocks of equations. This is needed in order to pass this information to the OMC module that is responsible for solving algebraic loops. 3. Mapping split equations to DEVS blocks Since the state variables and the equations needed to compute them have been identified, they are assigned sequentially to static blocks in the DEVS structure. 4. Generating DEVS structure In order to correctly identify the DEVS structure of the model, the dependencies between the state variables that are computed in each static block have to be resolved. This is achieved employing the incidence matrix and the mapping of equations to DEVS blocks. 15 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al OMPD Interface (II) 5. Generating the.pds structure file Based on the DEVS structure it is straightforward to generate the.pds structure file. 6. Generating static blocks code In this step the functionality of each static block is defined. Each static block needs to know its inputs and outputs, supplied by the DEVS structure, as well as the BLT blocks needed to compute the corresponding state derivatives. Then the existing code generation OMC module is employed to provide the actual simulation code for each static block. 7. Generating the.cpp code file The code for the static blocks is ouput in the.cpp code file along with other information needed by PowerDEVS. 16 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al OMPD Interface - Example Model  Various tests have been performed to ensure that the implemented OMPD interface is working correctly.  Here we present the results of processing the following second-order model through the implemented interface: 17 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al OMPD Interface - Example Model 18 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010) Information extracted by OMC compiler : In other words OMC has identified that model M1 has: 2 state variables 1 algebraic variable and 3 equations: organized in 3 BLT blocks.

Floros et al OMPD Interface - Example Model 19 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010) Automatically generated DEVS structure

Floros et al OMPD Interface - Example Model  Simulation Results for model M1. 20 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Simulation Results – Benchmark Framework  We want to compare the performance of the standard DASSL solver of OpenModelica with the QSS3 method implemented in PowerDEVS.  More specifically we would like to investigate the performance of both algorithms for non- stiff models of different size and sparsity without discontinuities.  To achieve that we generate linear test models of the form: In order to control the eigenvalues of the system matrix A is constructed as follows: 21 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010) 1. Generate real-valued random eigenvalues drawn from a Gaussian distribution : 2. Create a diagonal matrix 3. Create a random orthogonal matrix 4. Then, matrix has the desired eigenvalues. 1. Generate real-valued random eigenvalues drawn from a Gaussian distribution : 2. Create a diagonal matrix 3. Create a random orthogonal matrix 4. Then, matrix has the desired eigenvalues.  Sparsity s is defined as the number of connections to each state variable. To achieve a certain sparsity level s, we set the n-s absolute smallest elements of each row of A to zero.

Floros et al Simulation Results – Benchmark Framework 22 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010) For each parameter configuration (n,s)  100 Modelica models were randomly generated and given as input to the standard OMC and via the OMPD interface to PowerDEVS.  The CPU time needed for the simulation was measured for each generated executable.  To obtain more reliable results, each simulation was repeated 10 times and the median was considered as the measured CPU time.  Finally, the mean of the measurements is reported along with +/- 1 standard deviation. For the comparison simulations the following settings were used:  OpenModelica with DASSL as the standard solver  PowerDEVS with QSS3  Tolerance was set to for both environments.  Simulation End-Time was set to 3 sec.  The output file generation was disabled.

Floros et al Simulation Results – Fixed Number of States 23 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Simulation Results – Fixed Number of States 24 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Simulation Results – Fixed Sparsity 25 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al Simulation Results – Fixed Sparsity 26 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al  Goal: Interface OpenModelica and PowerDEVS  Motivation:  Established and easy model definition in Modelica.  Exploit the superiority of QSS methods in certain classes of problems without the overhead of a manual conversion.  Give the user the freedom to simulate either in a discretized-time or discretized- state world.  Current status:  All models without discontinuities  Manual application of the designed algorithm on 3 examples.  Future work:  Extend the interface to cover cases with discontinuities.  Further investigate the performance of QSS methods compared to DASSL for various classes of large-scale, real-world problems. Summary 27 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)

Floros et al QUESTIONS ? 28 Discretizing Time or States? A Comparative Study between DASSL and QSS (EOOLT 2010)