Continuous System Simulation

Contents

  1. Introduction, Scope, Definitions
    1. Modeling and Simulation: A Circuit Example
    2. Modeling vs. Simulation
    3. Time and Again
    4. Simulation as a Problem Solving Tool
    5. Simulation Software: Today and Tomorrow

  2. Basic Principles of Numerical Integration
    1. Introduction
    2. The Approximation Accuracy
    3. Euler Integration
    4. The Domain of Numerical Stability
    5. The Newton Iteration
    6. Semi–analytic Algorithms
    7. Spectral Algorithms

  3. Single–step Integration Methods
    1. Introduction
    2. Runge–Kutta Algorithms
    3. Stability Domains of RK Algorithms
    4. Stiff Systems
    5. Extrapolation Techniques
    6. Marginally Stable Systems
    7. Backinterpolation Methods
    8. Accuracy Considerations
    9. Step–size and Order Control

  4. Multi–step Integration Methods
    1. Introduction
    2. Newton–Gregory Polynomials
    3. Numerical Integration Through Polynomial Extrapolation
    4. Explicit Adams–Bashforth Formulae
    5. Implicit Adams–Moulton Formulae
    6. Adams–Bashforth–Moulton Predictor–Corrector Formulae
    7. Backward Difference Formulae
    8. Nyström and Milne Algorithms
    9. In Search for Stiffly–stable Methods
    10. High–order Backward Difference Formulae
    11. Newton Iteration
    12. Step–size and Order Control
    13. The Startup Problem
    14. The Readout Problem

  5. Second Derivative Systems
    1. Introduction
    2. Conversion of Second–derivative Models to State–space Form
    3. Velocity–free Models
    4. Linear Velocity Models
    5. Nonlinear Velocity Models
    6. Stability and Damping of Godunov Scheme
    7. Explicit and Implicit Godunov Algorithms of Different Orders
    8. The Newmark Algorithm

  6. Partial Differential Equations
    1. Introduction
    2. The Method of Lines
    3. Parabolic PDEs
    4. Hyperbolic PDEs
    5. Shock Waves
    6. Upwind Discretization
    7. Grid–width Control
    8. PDEs in Multiple Space Dimensions
    9. Elliptic PDEs and Invariant Embedding
    10. Finite Element Approximations

  7. Differential Algebraic Equations
    1. Introduction
    2. Causalization of Equations
    3. Algebraic Loops
    4. The Tearing Algorithm
    5. The Relaxation Algorithm
    6. Structural Singularities
    7. Structural Singularity Elimination
    8. The Solvability Issue

  8. Differential Algebraic Equation Solvers
    1. Introduction
    2. Multi-step Formulae
    3. Single–step Formulae
    4. DASSL
    5. Inline Integration
    6. Inlining Implicit Runge–Kutta Algorithms
    7. Stiffly Stable Step–size Control of Radau IIA
    8. Stiffly Stable Step–size Control of Lobatto IIIC
    9. Inlining Partial Differential Equations
    10. Overdetermined DAEs
    11. Electronic Circuit Simulators
    12. Multibody System Dynamics Simulators
    13. Chemical Process Dynamics Simulators

  9. Simulation of Discontinuous Systems
    1. Introduction
    2. Basic Difficulties
    3. Time Events
    4. Simulation of Sampled–data Systems
    5. State Events
      1. Multiple Zero Crossings
      2. Single Zero Crossings, Single–step Algorithms
      3. Single Zero Crossings, Multi-step Algorithms
      4. Non–essential State Events
    6. Consistent Initial Conditions
    7. Object–oriented Descriptions of Discontinuities
      1. The Computational Causality of if–Statements
      2. Multi–valued Functions
    8. The Switch Equation
    9. Ideal Diodes and Parameterized Curve Descriptions
    10. Variable Structure Models
    11. Mixed–mode Integration
    12. State Transition Diagrams
    13. Petri Nets

  10. Real–time Simulation
    1. Introduction
    2. The Race Against Time
    3. Suitable Numerical Integration Methods
    4. Linearly Implicit Methods
    5. Multi–rate Integration
    6. Inline Integration
    7. Mixed–mode Integration
    8. Discontinuous Systems
    9. Simulation Architecture
    10. Overruns

  11. Discrete Event Simulation
    1. Introduction
    2. Space Discretization: A Simple Example
    3. Discrete Event Systems and DEVS
    4. Coupled DEVS Models
    5. Simulation of DEVS Models
    6. DEVS and Continuous Systems Simulation
    7. Quantized State Systems

  12. Quantization-based Integration
    1. Introduction
    2. Convergence, Accuracy, and Stability in QSS
    3. Choosing Quantum and Hysteresis Width
    4. Input Signals in the QSS Method
    5. Startup and Output Interpolation
    6. Second-order QSS
    7. Algebraic Loops in QSS Methods
    8. DAE Simulation with QSS Methods
    9. Discontinuity Handling
    10. Real-time Simulation
    11. Open Problems in Quantization–based Methods


Introduction, Scope, Definitions

The purpose of this chapter is to provide a framework for what this book is to cover. Which are the types of questions that it aspires to answer, and what are the kinds of knowledge that you, the reader, can expect to gain by working through the material presented in this book? What are the relations between real physical systems and their mathematical models? What are the characteristics of mathematical descriptions of physical systems? We shall then talk about simulation as a problem solving tool, and finally, we shall offer a classification of the basic characteristics of simulation software systems.


Basic Principles of Numerical Integration

In this chapter, we shall discuss some basic ideas behind the algorithms that are used to numerically solve sets of ordinary differential equations specified by means of a state–space model. Following a brief introduction into the concept of numerical extrapolation that is at the heart of all numerical integration techniques, and after analyzing the types of numerical errors that all these algorithms are destined to exhibit, the two most basic algorithms, Forward Euler (FE) and Backward Euler (BE), are introduced, and the fundamental differences between explicit and implicit integration schemes are demonstrated by means of these two algorithms.

The reader is then introduced to the concept of numerical stability as opposed to analytical stability. The numerical stability domain is introduced as a tool to characterize an integration algorithm, and a general procedure to find the numerical stability domain of any integration scheme is presented. The numerical stability domain of an integration method is a convenient tool to assess some of its most important numerical characteristics.


Single–step Integration Methods

This chapter extends the ideas of numerical integration by means of a Taylor–Series expansion from the first–order (FE and BE) techniques to higher orders of approximation accuracy. The well–known class of explicit Runge–Kutta techniques is introduced by generalizing the predictor–corrector idea.

The chapter then explores special classes of single–step techniques that are well suited for the simulation of stiff systems and for that of marginally stable systems, namely the extrapolation methods and the backinterpolation algorithms. The stability domain serves as a good vehicle for analyzing the stability properties of these classes of algorithms.

We are then delving more deeply into the question of approximation accuracy. The accuracy domain is introduced as a simple tool to explore this issue, and the order star approach is subsequently introduced as a more refined and satisfying alternative.

The chapter ends with a discussion of the ideas behind step–size control and order control, and the techniques used to accomplish these in the realm of single–step algorithms.


Multi–step Integration Methods

In this chapter, we shall look at several families of integration algorithms that all have in common the fact that only a single function evaluation needs to be performed in every integration step, irrespective of the order of the algorithm. Both explicit and implicit varieties of this kind of algorithms exist and shall be discussed. As in the last chapter, we shall spend some time discussing the stability and accuracy properties of these families of integration algorithms.

Whereas step–size and order control were easily accomplished in the case of the single–step techniques, these issues are much more difficult to tackle in the case of the multi–step algorithms. Consequently, their discussion must occupy a significant portion of this chapter.

The chapter starts out with mathematical preliminaries that shall simplify considerably the subsequent derivation of the multi–step methods.


Second Derivative Systems

In this chapter, we shall look at integration algorithms designed to deal with system descriptions containing second–order derivatives in time. Such system descriptions occur naturally in the mathematical modeling of mechanical systems, as well as in the mathematical modeling of distributed parameter systems leading to hyperbolic partial differential equations.

In this chapter, we shall concentrate on mechanical systems. The discussion of partial differential equations is postponed to the next chapter.

Whereas it is always possible to convert second derivative systems to state–space form, integration algorithms that deal with the second derivatives directly may, in some cases, offer a numerical advantage.


Partial Differential Equations

In this chapter, we shall deal with method–of–lines solutions to models that are described by individual partial differential equations, by sets of coupled partial differential equations, or possibly by sets of mixed partial and ordinary differential equations.

Emphasis will be placed on the process of converting partial differential equations to equivalent sets of ordinary differential equations, and particular attention will be devoted to the problem of converting boundary conditions. To this end, we shall again consult our –meanwhile well–understood– Newton–Gregory polynomials.

We shall then spend some time analyzing the particular difficulties that await us when numerically solving the sets of resulting differential equations in the cases of parabolic, hyperbolic, and elliptic partial differential equations. It turns out that each class of partial differential equations exhibits its own particular and peculiar types of difficulties.


Differential Algebraic Equations

In this chapter, we shall analyze simulation problems that don’t present themselves initially in an explicit state–space form. For many physical systems, it is quite easy to formulate a model where the state derivatives show up implicitly and possibly even in a non-linear fashion anywhere within the equations. We call system descriptions that consist of a mixture of implicitly formulated algebraic and differential equations Differential Algebraic Equations (DAEs). Since these cases constitute a substantial and important portion of the models encountered in science and engineering, they deserve our attention. In this chapter, we shall discuss the question, how sets of DAEs can be converted symbolically in an automated fashion to equivalent sets of ODEs.


Differential Algebraic Equation Solvers

In the previous chapter, we have discussed symbolic algorithms for converting implicit and even higher–index DAE systems to explicit ODE form. In this chapter, we shall look at these very same problems once more from a different angle. Rather than converting implicit DAEs to explicit ODE form, we shall try to solve the DAE systems directly. Solvers that are capable of dealing with implicit DAE descriptions directly have been coined differential algebraic equation solvers or DAE solvers. They are the focus point of this chapter.


Simulation of Discontinuous Systems

In this chapter, we shall discuss how discontinuous models can be handled by the simulation software, and in particular by the numerical integration algorithm. Discontinuous models are extremely common in many areas of engineering, e.g. to describe dry friction phenomena or impact between bodies in mechanical engineering, or to describe switching circuits in electronics. In the first part of this chapter, we shall be dealing with the numerical aspects of integrating across discontinuities. Two types of discontinuities are introduced, time events and state events, that require different treatment by the simulation software. In the second part of this chapter, we shall discuss the modeling aspects of how discontinuities can be conveniently described by the user in an object–oriented manner, and what the compiler needs to do to translate these object–oriented descriptions down into event descriptions.


Real–time Simulation

In this chapter, we shall discuss the special requirements of real–time simulation, i.e., of simulation runs that keep abreast of the passing of real time, and that can accommodate driving functions (input signals) that are generated outside the computer and that are read in by means of analog to digital (A/D) converters.

Until now, computing speed has always been a soft constraint — slow simulation meant expensive simulation, but now, it becomes a very hard constraint. Simulation becomes a race against time. If we cannot complete the computations associated with one integration step before the real–time clock has advanced by h time units, where h is the current step size of the integration algorithm, the simulation is out of sync, and we just lost the race.

Until now, we always tried to make simulation more comfortable for the user. For example, we introduced step–size controlled algorithms so that the user wouldn’t have to worry any more about whether or not the numerical integration meets his or her accuracy requirements. The algorithm would do so on its own. In the context of real–time simulation, we may not be able to afford all this comfort any longer. We may have to throw many of the more advanced features of simulation over board in the interest of saving time, but of course, this means that we have to understand even better ourselves how simulation works in reality.


Discrete Event Simulation

This chapter explores a new way of approximating differential equations, replacing the time discretization by a quantization of the state variables. We shall see that this idea will lead us to discrete event systems in terms of the DEVS formalism instead of difference equations, as in the previous approximations.

Thus, before formulating the numerical methods derived from this approach, we shall introduce the basic definitions of DEVS. This methodology, as a general discrete event systems modeling and simulation formalism, will provide us the tools to describe and translate into computer programs the routines that implement a new family of methods for the numerical integration of continuous systems.

Further, the chapter explores the principles of quantization–based approximations of ordinary differential equations and their representation as DEVS simulation models.

Finally, we shall briefly introduce the QSS method in preparation for the next chapter, where we shall study this numerical method in more detail.


Quantization-based Integration

This chapter focuses on the Quantized State Systems (QSS) method and its extensions. After a brief explanation concerning the connections between this discrete event method and perturbation theory, the main theoretical properties of the method, i.e., convergence, stability, and error control properties, are presented.

The reader is then introduced to some practical aspects of the method related to the choice of quantum and hysteresis, the incorporation of input signals, as well as output interpolation.

In spite of the theoretical and practical advantages that the QSS method offers, the method has a serious drawback, as it is only first-order accurate. For this reason, a second-order accurate quantization-based method is subsequently presented that conserves the main theoretical properties that characterize the QSS method.

Further, we shall focus on the use of both quantization–based methods in the simulation of DAEs and discontinuous systems, where we shall observe some interesting advantages that these methods have over the classical discrete-time methods.

Finally, and following the discussion of a real-time implementation of these methods, some drawbacks and open problems of the proposed methodology shall be discussed with particular emphasis given to the simulation of stiff system.


Homepage


Last modified: September 16, 2006 -- © François Cellier